@ukic/web-components 2.32.0 → 2.33.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (424) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-94b33ab0.js → helpers-df61b63f.js} +5 -1
  3. package/dist/cjs/helpers-df61b63f.js.map +1 -0
  4. package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
  5. package/dist/cjs/ic-accordion.cjs.entry.js +8 -1
  6. package/dist/cjs/ic-accordion.cjs.entry.js.map +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 +1 -1
  10. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  11. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  12. package/dist/cjs/ic-button_3.cjs.entry.js +1 -1
  13. package/dist/cjs/ic-card.cjs.entry.js +7 -1
  14. package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-checkbox-group.cjs.entry.js +5 -1
  16. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  17. package/dist/cjs/ic-checkbox.cjs.entry.js +5 -1
  18. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ic-chip.cjs.entry.js +9 -4
  20. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  21. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  22. package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
  23. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  24. package/dist/cjs/ic-empty-state.cjs.entry.js +1 -1
  25. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  26. package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
  27. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  28. package/dist/cjs/ic-hero.cjs.entry.js +1 -1
  29. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
  30. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +11 -2
  31. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  32. package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
  33. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  34. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  35. package/dist/cjs/ic-menu-item.cjs.entry.js +7 -1
  36. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  37. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  38. package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
  39. package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
  40. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  41. package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
  42. package/dist/cjs/ic-pagination-item.cjs.entry.js +5 -1
  43. package/dist/cjs/ic-pagination-item.cjs.entry.js.map +1 -1
  44. package/dist/cjs/ic-pagination.cjs.entry.js +5 -1
  45. package/dist/cjs/ic-pagination.cjs.entry.js.map +1 -1
  46. package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
  47. package/dist/cjs/ic-radio-group.cjs.entry.js +2 -1
  48. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  49. package/dist/cjs/ic-radio-option.cjs.entry.js +5 -1
  50. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  51. package/dist/cjs/ic-search-bar.cjs.entry.js +5 -1
  52. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  53. package/dist/cjs/ic-select.cjs.entry.js +5 -1
  54. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  55. package/dist/cjs/ic-side-navigation.cjs.entry.js +13 -9
  56. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  57. package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
  58. package/dist/cjs/ic-step.cjs.entry.js +1 -1
  59. package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
  60. package/dist/cjs/ic-switch.cjs.entry.js +6 -2
  61. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  62. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  63. package/dist/cjs/ic-tab.cjs.entry.js +5 -2
  64. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  65. package/dist/cjs/ic-text-field.cjs.entry.js +18 -10
  66. package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
  67. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  68. package/dist/cjs/ic-toast.cjs.entry.js +1 -1
  69. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +9 -0
  70. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
  71. package/dist/cjs/ic-toggle-button.cjs.entry.js +7 -1
  72. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  73. package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
  74. package/dist/cjs/ic-typography.cjs.entry.js +1 -1
  75. package/dist/cjs/loader.cjs.js +1 -1
  76. package/dist/collection/components/ic-accordion/ic-accordion.js +10 -1
  77. package/dist/collection/components/ic-accordion/ic-accordion.js.map +1 -1
  78. package/dist/collection/components/ic-accordion/test/basic/ic-accordion.spec.js +3 -0
  79. package/dist/collection/components/ic-accordion/test/basic/ic-accordion.spec.js.map +1 -1
  80. package/dist/collection/components/ic-card/ic-card.js +9 -0
  81. package/dist/collection/components/ic-card/ic-card.js.map +1 -1
  82. package/dist/collection/components/ic-card/test/basic/ic-card.spec.js +10 -0
  83. package/dist/collection/components/ic-card/test/basic/ic-card.spec.js.map +1 -1
  84. package/dist/collection/components/ic-checkbox/ic-checkbox.js +6 -0
  85. package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
  86. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +6 -0
  87. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
  88. package/dist/collection/components/ic-checkbox-group/test/basic/ic-checkbox-group.spec.js +3 -0
  89. package/dist/collection/components/ic-checkbox-group/test/basic/ic-checkbox-group.spec.js.map +1 -1
  90. package/dist/collection/components/ic-chip/ic-chip.js +27 -2
  91. package/dist/collection/components/ic-chip/ic-chip.js.map +1 -1
  92. package/dist/collection/components/ic-chip/test/basic/ic-chip.spec.js +3 -0
  93. package/dist/collection/components/ic-chip/test/basic/ic-chip.spec.js.map +1 -1
  94. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +15 -3
  95. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js.map +1 -1
  96. package/dist/collection/components/ic-input-component-container/test/basic/ic-input-component-container.spec.js +9 -0
  97. package/dist/collection/components/ic-input-component-container/test/basic/ic-input-component-container.spec.js.map +1 -1
  98. package/dist/collection/components/ic-menu-item/ic-menu-item.js +9 -0
  99. package/dist/collection/components/ic-menu-item/ic-menu-item.js.map +1 -1
  100. package/dist/collection/components/ic-menu-item/test/basic/ic-menu-item.spec.js +13 -0
  101. package/dist/collection/components/ic-menu-item/test/basic/ic-menu-item.spec.js.map +1 -1
  102. package/dist/collection/components/ic-pagination/ic-pagination.js +6 -0
  103. package/dist/collection/components/ic-pagination/ic-pagination.js.map +1 -1
  104. package/dist/collection/components/ic-pagination/test/basic/ic-pagination.spec.js +10 -0
  105. package/dist/collection/components/ic-pagination/test/basic/ic-pagination.spec.js.map +1 -1
  106. package/dist/collection/components/ic-pagination-item/ic-pagination-item.js +6 -0
  107. package/dist/collection/components/ic-pagination-item/ic-pagination-item.js.map +1 -1
  108. package/dist/collection/components/ic-pagination-item/test/basic/ic-pagination-item.spec.js +3 -0
  109. package/dist/collection/components/ic-pagination-item/test/basic/ic-pagination-item.spec.js.map +1 -1
  110. package/dist/collection/components/ic-radio-group/ic-radio-group.js +1 -0
  111. package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
  112. package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.spec.js +6 -0
  113. package/dist/collection/components/ic-radio-group/test/basic/ic-radio-group.spec.js.map +1 -1
  114. package/dist/collection/components/ic-radio-option/ic-radio-option.js +6 -0
  115. package/dist/collection/components/ic-radio-option/ic-radio-option.js.map +1 -1
  116. package/dist/collection/components/ic-search-bar/ic-search-bar.js +6 -0
  117. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  118. package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.spec.js +3 -0
  119. package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.spec.js.map +1 -1
  120. package/dist/collection/components/ic-select/ic-select.js +6 -0
  121. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  122. package/dist/collection/components/ic-select/test/basic/ic-select.spec.js +10 -0
  123. package/dist/collection/components/ic-select/test/basic/ic-select.spec.js.map +1 -1
  124. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +12 -8
  125. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
  126. package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation.spec.js +107 -0
  127. package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation.spec.js.map +1 -1
  128. package/dist/collection/components/ic-switch/ic-switch.js +6 -0
  129. package/dist/collection/components/ic-switch/ic-switch.js.map +1 -1
  130. package/dist/collection/components/ic-switch/test/basic/ic-switch.spec.js +3 -0
  131. package/dist/collection/components/ic-switch/test/basic/ic-switch.spec.js.map +1 -1
  132. package/dist/collection/components/ic-tab/ic-tab.js +6 -0
  133. package/dist/collection/components/ic-tab/ic-tab.js.map +1 -1
  134. package/dist/collection/components/ic-tab/test/basic/ic-tab.spec.js +16 -0
  135. package/dist/collection/components/ic-tab/test/basic/ic-tab.spec.js.map +1 -1
  136. package/dist/collection/components/ic-text-field/ic-text-field.js +19 -9
  137. package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
  138. package/dist/collection/components/ic-text-field/test/basic/ic-text-field.input.spec.js +3 -0
  139. package/dist/collection/components/ic-text-field/test/basic/ic-text-field.input.spec.js.map +1 -1
  140. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +9 -0
  141. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js.map +1 -1
  142. package/dist/collection/components/ic-toggle-button/test/basic/ic-toggle-button.spec.js +10 -0
  143. package/dist/collection/components/ic-toggle-button/test/basic/ic-toggle-button.spec.js.map +1 -1
  144. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +11 -0
  145. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js.map +1 -1
  146. package/dist/collection/components/ic-toggle-button-group/test/ic-toggle-button-group.spec.js +104 -0
  147. package/dist/collection/components/ic-toggle-button-group/test/ic-toggle-button-group.spec.js.map +1 -1
  148. package/dist/collection/utils/helpers.js +4 -0
  149. package/dist/collection/utils/helpers.js.map +1 -1
  150. package/dist/components/helpers.js +5 -1
  151. package/dist/components/helpers.js.map +1 -1
  152. package/dist/components/ic-accordion.js +9 -1
  153. package/dist/components/ic-accordion.js.map +1 -1
  154. package/dist/components/ic-card.js +9 -1
  155. package/dist/components/ic-card.js.map +1 -1
  156. package/dist/components/ic-checkbox-group.js +5 -0
  157. package/dist/components/ic-checkbox-group.js.map +1 -1
  158. package/dist/components/ic-checkbox.js +5 -0
  159. package/dist/components/ic-checkbox.js.map +1 -1
  160. package/dist/components/ic-chip.js +11 -4
  161. package/dist/components/ic-chip.js.map +1 -1
  162. package/dist/components/ic-input-component-container2.js +13 -2
  163. package/dist/components/ic-input-component-container2.js.map +1 -1
  164. package/dist/components/ic-menu-item2.js +9 -1
  165. package/dist/components/ic-menu-item2.js.map +1 -1
  166. package/dist/components/ic-pagination-item2.js +6 -1
  167. package/dist/components/ic-pagination-item2.js.map +1 -1
  168. package/dist/components/ic-pagination.js +5 -0
  169. package/dist/components/ic-pagination.js.map +1 -1
  170. package/dist/components/ic-radio-group.js +1 -0
  171. package/dist/components/ic-radio-group.js.map +1 -1
  172. package/dist/components/ic-radio-option.js +6 -1
  173. package/dist/components/ic-radio-option.js.map +1 -1
  174. package/dist/components/ic-search-bar.js +6 -1
  175. package/dist/components/ic-search-bar.js.map +1 -1
  176. package/dist/components/ic-select.js +6 -1
  177. package/dist/components/ic-select.js.map +1 -1
  178. package/dist/components/ic-side-navigation.js +13 -9
  179. package/dist/components/ic-side-navigation.js.map +1 -1
  180. package/dist/components/ic-switch.js +8 -3
  181. package/dist/components/ic-switch.js.map +1 -1
  182. package/dist/components/ic-tab.js +5 -2
  183. package/dist/components/ic-tab.js.map +1 -1
  184. package/dist/components/ic-text-field2.js +19 -10
  185. package/dist/components/ic-text-field2.js.map +1 -1
  186. package/dist/components/ic-toggle-button-group.js +11 -1
  187. package/dist/components/ic-toggle-button-group.js.map +1 -1
  188. package/dist/components/ic-toggle-button.js +9 -1
  189. package/dist/components/ic-toggle-button.js.map +1 -1
  190. package/dist/components/ic-top-navigation.js +1 -1
  191. package/dist/core/core.esm.js +1 -1
  192. package/dist/core/core.esm.js.map +1 -1
  193. package/dist/core/{p-22ef3303.entry.js → p-04876964.entry.js} +2 -2
  194. package/dist/core/p-04876964.entry.js.map +1 -0
  195. package/dist/core/p-050dc124.entry.js +2 -0
  196. package/dist/core/p-050dc124.entry.js.map +1 -0
  197. package/dist/core/{p-230187a8.entry.js → p-0bd82370.entry.js} +2 -2
  198. package/dist/core/{p-1d6e6ebe.entry.js → p-145a4619.entry.js} +2 -2
  199. package/dist/core/{p-96505636.entry.js → p-1ee0b4eb.entry.js} +2 -2
  200. package/dist/core/p-1ee0b4eb.entry.js.map +1 -0
  201. package/dist/core/{p-3b4c9571.entry.js → p-20203682.entry.js} +2 -2
  202. package/dist/core/p-20203682.entry.js.map +1 -0
  203. package/dist/core/{p-2d930c9c.entry.js → p-2c93290d.entry.js} +2 -2
  204. package/dist/core/p-2c93290d.entry.js.map +1 -0
  205. package/dist/core/{p-7591805d.entry.js → p-350d89d0.entry.js} +2 -2
  206. package/dist/core/p-45b9b893.entry.js +2 -0
  207. package/dist/core/p-45b9b893.entry.js.map +1 -0
  208. package/dist/core/{p-74a7b421.entry.js → p-48922e0a.entry.js} +2 -2
  209. package/dist/core/p-48922e0a.entry.js.map +1 -0
  210. package/dist/core/{p-570f1930.entry.js → p-4bb9c52f.entry.js} +2 -2
  211. package/dist/core/{p-223889da.entry.js → p-5739e0a9.entry.js} +2 -2
  212. package/dist/core/{p-d638d75d.entry.js → p-5a7fd661.entry.js} +2 -2
  213. package/dist/core/p-5a7fd661.entry.js.map +1 -0
  214. package/dist/core/{p-60f7f555.entry.js → p-5ec8938f.entry.js} +2 -2
  215. package/dist/core/{p-02262e76.entry.js → p-614cb828.entry.js} +2 -2
  216. package/dist/core/p-614cb828.entry.js.map +1 -0
  217. package/dist/core/{p-be5d5f93.entry.js → p-618a0098.entry.js} +2 -2
  218. package/dist/core/{p-ea58ae1d.entry.js → p-63b88ad2.entry.js} +2 -2
  219. package/dist/core/{p-03f23a55.entry.js → p-649bd0e1.entry.js} +2 -2
  220. package/dist/core/{p-843ed766.entry.js → p-6c31fd9f.entry.js} +2 -2
  221. package/dist/core/{p-fef9e8c9.js → p-6d23ec8e.js} +2 -2
  222. package/dist/core/{p-fef9e8c9.js.map → p-6d23ec8e.js.map} +1 -1
  223. package/dist/core/{p-c1d5e7f2.entry.js → p-72a854dd.entry.js} +2 -2
  224. package/dist/core/{p-78605899.entry.js → p-742189ad.entry.js} +2 -2
  225. package/dist/core/{p-dd9d8e68.entry.js → p-7e6fa0ea.entry.js} +2 -2
  226. package/dist/core/{p-e1def80b.entry.js → p-7ef7adc4.entry.js} +2 -2
  227. package/dist/core/p-8920ebe6.entry.js +2 -0
  228. package/dist/core/p-8920ebe6.entry.js.map +1 -0
  229. package/dist/core/{p-85f30b1c.entry.js → p-90e4679d.entry.js} +2 -2
  230. package/dist/core/{p-def5ba6b.entry.js → p-9ab3b47e.entry.js} +2 -2
  231. package/dist/core/{p-5fad22f1.entry.js → p-a15dfa51.entry.js} +2 -2
  232. package/dist/core/{p-69576aa0.entry.js → p-a4f42217.entry.js} +2 -2
  233. package/dist/core/p-ac39415d.entry.js +2 -0
  234. package/dist/core/p-ac39415d.entry.js.map +1 -0
  235. package/dist/core/{p-77d49138.entry.js → p-ad2a8eab.entry.js} +2 -2
  236. package/dist/core/{p-5ccd3703.entry.js → p-ae89e61c.entry.js} +2 -2
  237. package/dist/core/{p-55b11f6f.entry.js → p-b8de998d.entry.js} +2 -2
  238. package/dist/core/{p-13a6e7ea.entry.js → p-bb21769c.entry.js} +2 -2
  239. package/dist/core/p-bdb77a91.entry.js +2 -0
  240. package/dist/core/p-bdb77a91.entry.js.map +1 -0
  241. package/dist/core/{p-0a20131b.entry.js → p-c02f2a47.entry.js} +2 -2
  242. package/dist/core/p-c02f2a47.entry.js.map +1 -0
  243. package/dist/core/{p-dd4ef67f.entry.js → p-c0885ea6.entry.js} +2 -2
  244. package/dist/core/{p-8c325d9b.entry.js → p-c8b56283.entry.js} +2 -2
  245. package/dist/core/{p-2c587c73.entry.js → p-cb344d95.entry.js} +2 -2
  246. package/dist/core/{p-c1a74ee4.entry.js → p-cb5f7b90.entry.js} +2 -2
  247. package/dist/core/p-cc6a677b.entry.js +2 -0
  248. package/dist/core/p-cc6a677b.entry.js.map +1 -0
  249. package/dist/core/{p-0aed0cee.entry.js → p-d4d4b392.entry.js} +2 -2
  250. package/dist/core/{p-9c9ba3cd.entry.js → p-d9e36712.entry.js} +2 -2
  251. package/dist/core/p-de3d293b.entry.js +2 -0
  252. package/dist/core/p-de3d293b.entry.js.map +1 -0
  253. package/dist/core/{p-13ec2a00.entry.js → p-e218165c.entry.js} +2 -2
  254. package/dist/core/{p-ee1c9f20.entry.js → p-ec15bf1b.entry.js} +2 -2
  255. package/dist/core/{p-9feec47e.entry.js → p-ef4acad9.entry.js} +2 -2
  256. package/dist/core/p-f1583332.entry.js +2 -0
  257. package/dist/core/p-f1583332.entry.js.map +1 -0
  258. package/dist/core/{p-0677ee1e.entry.js → p-f1bf36e4.entry.js} +2 -2
  259. package/dist/core/p-f1bf36e4.entry.js.map +1 -0
  260. package/dist/core/{p-604e72ac.entry.js → p-f53503ca.entry.js} +2 -2
  261. package/dist/core/{p-457a4c63.entry.js → p-f61a4e8d.entry.js} +2 -2
  262. package/dist/core/p-f61a4e8d.entry.js.map +1 -0
  263. package/dist/core/{p-3af60dee.entry.js → p-f73cb96b.entry.js} +2 -2
  264. package/dist/core/{p-de0afa78.entry.js → p-fa83d7c2.entry.js} +2 -2
  265. package/dist/core/p-fa83d7c2.entry.js.map +1 -0
  266. package/dist/esm/core.js +1 -1
  267. package/dist/esm/{helpers-3905ccc4.js → helpers-b0150c61.js} +6 -2
  268. package/dist/esm/helpers-b0150c61.js.map +1 -0
  269. package/dist/esm/ic-accordion-group.entry.js +1 -1
  270. package/dist/esm/ic-accordion.entry.js +8 -1
  271. package/dist/esm/ic-accordion.entry.js.map +1 -1
  272. package/dist/esm/ic-alert.entry.js +1 -1
  273. package/dist/esm/ic-back-to-top.entry.js +1 -1
  274. package/dist/esm/ic-badge.entry.js +1 -1
  275. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  276. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  277. package/dist/esm/ic-button_3.entry.js +1 -1
  278. package/dist/esm/ic-card.entry.js +7 -1
  279. package/dist/esm/ic-card.entry.js.map +1 -1
  280. package/dist/esm/ic-checkbox-group.entry.js +5 -1
  281. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  282. package/dist/esm/ic-checkbox.entry.js +5 -1
  283. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  284. package/dist/esm/ic-chip.entry.js +9 -4
  285. package/dist/esm/ic-chip.entry.js.map +1 -1
  286. package/dist/esm/ic-data-row.entry.js +1 -1
  287. package/dist/esm/ic-dialog.entry.js +1 -1
  288. package/dist/esm/ic-divider.entry.js +1 -1
  289. package/dist/esm/ic-empty-state.entry.js +1 -1
  290. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  291. package/dist/esm/ic-footer-link.entry.js +1 -1
  292. package/dist/esm/ic-footer.entry.js +1 -1
  293. package/dist/esm/ic-hero.entry.js +1 -1
  294. package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
  295. package/dist/esm/ic-input-component-container_3.entry.js +11 -2
  296. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  297. package/dist/esm/ic-input-label_2.entry.js +1 -1
  298. package/dist/esm/ic-link.entry.js +1 -1
  299. package/dist/esm/ic-menu-group.entry.js +1 -1
  300. package/dist/esm/ic-menu-item.entry.js +7 -1
  301. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  302. package/dist/esm/ic-navigation-button.entry.js +1 -1
  303. package/dist/esm/ic-navigation-group.entry.js +1 -1
  304. package/dist/esm/ic-navigation-item.entry.js +1 -1
  305. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  306. package/dist/esm/ic-page-header.entry.js +1 -1
  307. package/dist/esm/ic-pagination-item.entry.js +5 -1
  308. package/dist/esm/ic-pagination-item.entry.js.map +1 -1
  309. package/dist/esm/ic-pagination.entry.js +5 -1
  310. package/dist/esm/ic-pagination.entry.js.map +1 -1
  311. package/dist/esm/ic-popover-menu.entry.js +1 -1
  312. package/dist/esm/ic-radio-group.entry.js +2 -1
  313. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  314. package/dist/esm/ic-radio-option.entry.js +5 -1
  315. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  316. package/dist/esm/ic-search-bar.entry.js +5 -1
  317. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  318. package/dist/esm/ic-select.entry.js +5 -1
  319. package/dist/esm/ic-select.entry.js.map +1 -1
  320. package/dist/esm/ic-side-navigation.entry.js +13 -9
  321. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  322. package/dist/esm/ic-status-tag.entry.js +1 -1
  323. package/dist/esm/ic-step.entry.js +1 -1
  324. package/dist/esm/ic-stepper.entry.js +1 -1
  325. package/dist/esm/ic-switch.entry.js +6 -2
  326. package/dist/esm/ic-switch.entry.js.map +1 -1
  327. package/dist/esm/ic-tab-group.entry.js +1 -1
  328. package/dist/esm/ic-tab.entry.js +5 -2
  329. package/dist/esm/ic-tab.entry.js.map +1 -1
  330. package/dist/esm/ic-text-field.entry.js +18 -10
  331. package/dist/esm/ic-text-field.entry.js.map +1 -1
  332. package/dist/esm/ic-theme.entry.js +1 -1
  333. package/dist/esm/ic-toast.entry.js +1 -1
  334. package/dist/esm/ic-toggle-button-group.entry.js +9 -0
  335. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
  336. package/dist/esm/ic-toggle-button.entry.js +7 -1
  337. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  338. package/dist/esm/ic-top-navigation.entry.js +1 -1
  339. package/dist/esm/ic-typography.entry.js +1 -1
  340. package/dist/esm/loader.js +1 -1
  341. package/dist/types/components/ic-accordion/ic-accordion.d.ts +2 -0
  342. package/dist/types/components/ic-card/ic-card.d.ts +1 -0
  343. package/dist/types/components/ic-checkbox/ic-checkbox.d.ts +1 -0
  344. package/dist/types/components/ic-checkbox-group/ic-checkbox-group.d.ts +1 -0
  345. package/dist/types/components/ic-chip/ic-chip.d.ts +5 -0
  346. package/dist/types/components/ic-input-component-container/ic-input-component-container.d.ts +2 -0
  347. package/dist/types/components/ic-menu-item/ic-menu-item.d.ts +1 -0
  348. package/dist/types/components/ic-pagination/ic-pagination.d.ts +1 -0
  349. package/dist/types/components/ic-pagination-item/ic-pagination-item.d.ts +1 -0
  350. package/dist/types/components/ic-radio-option/ic-radio-option.d.ts +1 -0
  351. package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +1 -0
  352. package/dist/types/components/ic-select/ic-select.d.ts +1 -0
  353. package/dist/types/components/ic-switch/ic-switch.d.ts +1 -0
  354. package/dist/types/components/ic-tab/ic-tab.d.ts +1 -0
  355. package/dist/types/components/ic-text-field/ic-text-field.d.ts +2 -0
  356. package/dist/types/components/ic-toggle-button/ic-toggle-button.d.ts +1 -0
  357. package/dist/types/components/ic-toggle-button-group/ic-toggle-button-group.d.ts +1 -0
  358. package/dist/types/components.d.ts +8 -0
  359. package/dist/types/utils/helpers.d.ts +4 -0
  360. package/hydrate/index.js +122 -23
  361. package/package.json +4 -9
  362. package/vscode-data.json +4 -0
  363. package/dist/cjs/helpers-94b33ab0.js.map +0 -1
  364. package/dist/core/p-02262e76.entry.js.map +0 -1
  365. package/dist/core/p-0677ee1e.entry.js.map +0 -1
  366. package/dist/core/p-07514ea0.entry.js +0 -2
  367. package/dist/core/p-07514ea0.entry.js.map +0 -1
  368. package/dist/core/p-0a20131b.entry.js.map +0 -1
  369. package/dist/core/p-22ef3303.entry.js.map +0 -1
  370. package/dist/core/p-2889cc17.entry.js +0 -2
  371. package/dist/core/p-2889cc17.entry.js.map +0 -1
  372. package/dist/core/p-2d930c9c.entry.js.map +0 -1
  373. package/dist/core/p-3b4c9571.entry.js.map +0 -1
  374. package/dist/core/p-457a4c63.entry.js.map +0 -1
  375. package/dist/core/p-74a7b421.entry.js.map +0 -1
  376. package/dist/core/p-81deed36.entry.js +0 -2
  377. package/dist/core/p-81deed36.entry.js.map +0 -1
  378. package/dist/core/p-94d5aa77.entry.js +0 -2
  379. package/dist/core/p-94d5aa77.entry.js.map +0 -1
  380. package/dist/core/p-96505636.entry.js.map +0 -1
  381. package/dist/core/p-b1879a44.entry.js +0 -2
  382. package/dist/core/p-b1879a44.entry.js.map +0 -1
  383. package/dist/core/p-cdf6e902.entry.js +0 -2
  384. package/dist/core/p-cdf6e902.entry.js.map +0 -1
  385. package/dist/core/p-d638d75d.entry.js.map +0 -1
  386. package/dist/core/p-da5098db.entry.js +0 -2
  387. package/dist/core/p-da5098db.entry.js.map +0 -1
  388. package/dist/core/p-dbc0f5da.entry.js +0 -2
  389. package/dist/core/p-dbc0f5da.entry.js.map +0 -1
  390. package/dist/core/p-de0afa78.entry.js.map +0 -1
  391. package/dist/esm/helpers-3905ccc4.js.map +0 -1
  392. /package/dist/core/{p-230187a8.entry.js.map → p-0bd82370.entry.js.map} +0 -0
  393. /package/dist/core/{p-1d6e6ebe.entry.js.map → p-145a4619.entry.js.map} +0 -0
  394. /package/dist/core/{p-7591805d.entry.js.map → p-350d89d0.entry.js.map} +0 -0
  395. /package/dist/core/{p-570f1930.entry.js.map → p-4bb9c52f.entry.js.map} +0 -0
  396. /package/dist/core/{p-223889da.entry.js.map → p-5739e0a9.entry.js.map} +0 -0
  397. /package/dist/core/{p-60f7f555.entry.js.map → p-5ec8938f.entry.js.map} +0 -0
  398. /package/dist/core/{p-be5d5f93.entry.js.map → p-618a0098.entry.js.map} +0 -0
  399. /package/dist/core/{p-ea58ae1d.entry.js.map → p-63b88ad2.entry.js.map} +0 -0
  400. /package/dist/core/{p-03f23a55.entry.js.map → p-649bd0e1.entry.js.map} +0 -0
  401. /package/dist/core/{p-843ed766.entry.js.map → p-6c31fd9f.entry.js.map} +0 -0
  402. /package/dist/core/{p-c1d5e7f2.entry.js.map → p-72a854dd.entry.js.map} +0 -0
  403. /package/dist/core/{p-78605899.entry.js.map → p-742189ad.entry.js.map} +0 -0
  404. /package/dist/core/{p-dd9d8e68.entry.js.map → p-7e6fa0ea.entry.js.map} +0 -0
  405. /package/dist/core/{p-e1def80b.entry.js.map → p-7ef7adc4.entry.js.map} +0 -0
  406. /package/dist/core/{p-85f30b1c.entry.js.map → p-90e4679d.entry.js.map} +0 -0
  407. /package/dist/core/{p-def5ba6b.entry.js.map → p-9ab3b47e.entry.js.map} +0 -0
  408. /package/dist/core/{p-5fad22f1.entry.js.map → p-a15dfa51.entry.js.map} +0 -0
  409. /package/dist/core/{p-69576aa0.entry.js.map → p-a4f42217.entry.js.map} +0 -0
  410. /package/dist/core/{p-77d49138.entry.js.map → p-ad2a8eab.entry.js.map} +0 -0
  411. /package/dist/core/{p-5ccd3703.entry.js.map → p-ae89e61c.entry.js.map} +0 -0
  412. /package/dist/core/{p-55b11f6f.entry.js.map → p-b8de998d.entry.js.map} +0 -0
  413. /package/dist/core/{p-13a6e7ea.entry.js.map → p-bb21769c.entry.js.map} +0 -0
  414. /package/dist/core/{p-dd4ef67f.entry.js.map → p-c0885ea6.entry.js.map} +0 -0
  415. /package/dist/core/{p-8c325d9b.entry.js.map → p-c8b56283.entry.js.map} +0 -0
  416. /package/dist/core/{p-2c587c73.entry.js.map → p-cb344d95.entry.js.map} +0 -0
  417. /package/dist/core/{p-c1a74ee4.entry.js.map → p-cb5f7b90.entry.js.map} +0 -0
  418. /package/dist/core/{p-0aed0cee.entry.js.map → p-d4d4b392.entry.js.map} +0 -0
  419. /package/dist/core/{p-9c9ba3cd.entry.js.map → p-d9e36712.entry.js.map} +0 -0
  420. /package/dist/core/{p-13ec2a00.entry.js.map → p-e218165c.entry.js.map} +0 -0
  421. /package/dist/core/{p-ee1c9f20.entry.js.map → p-ec15bf1b.entry.js.map} +0 -0
  422. /package/dist/core/{p-9feec47e.entry.js.map → p-ef4acad9.entry.js.map} +0 -0
  423. /package/dist/core/{p-604e72ac.entry.js.map → p-f53503ca.entry.js.map} +0 -0
  424. /package/dist/core/{p-3af60dee.entry.js.map → p-f73cb96b.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"ic-card.js","mappings":";;;;;;;AAAA,MAAM,SAAS,GAAG,s/MAAs/M;;MC0C3/M,IAAI;;;;;QACP,yBAAoB,GAAqB,IAAI,CAAC;QAmI9C,mBAAc,GAAG;YACvB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;SACxB,CAAC;QAEM,kBAAa,GAAG;YACtB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;SACzB,CAAC;QAUM,mBAAc,GAAG;YACvB,IAAI,CAAC,YAAY,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC;SACxC,CAAC;QAEM,yBAAoB,GAAG,CAAC,YAA8B;YAC5D,IACE,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,KACnD,IAAI,KAAK,WAAW;kBAChB,yBAAyB,CAAC,UAA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CAAC,IAAI,UAAU,MACzD,WAAK,KAAK,EAAC,kBAAkB,IAC3B,WAAK,KAAK,EAAC,sBAAsB,IAC/B,YAAM,IAAI,EAAC,sBAAsB,GAAQ,CACrC,EACL,UAAU,KACT,kBACE,EAAE,EAAC,0BAA0B,EAC7B,KAAK,EAAC,wBAAwB,EAC9B,MAAM,UAEN,cACE,KAAK,EAAE;gBACL,CAAC,eAAe,GAAG,IAAI;gBACvB,CAAC,iBACC,IAAI,CAAC,YAAY,GAAG,UAAU,GAAG,QACnC,EAAE,GAAG,IAAI;aACV,gBACU,wBAAwB,mBACpB,GAAG,IAAI,CAAC,YAAY,EAAE,mBAEnC,IAAI,CAAC,YAAY,GAAG,uBAAuB,GAAG,IAAI,EAEpD,OAAO,EAAE,IAAI,CAAC,cAAc,EAC5B,SAAS,EAAE,WAAW,GACd,CACC,CACd,CACG,CACP,EACA,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,kBAAkB,CAAC,IAAI,IAAI,CAAC,YAAY,KAC3D,WAAK,KAAK,EAAC,kBAAkB,EAAC,EAAE,EAAC,uBAAuB,IACtD,YAAM,IAAI,EAAC,kBAAkB,GAAQ,CACjC,CACP,EACA,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,IAAI,YAAM,IAAI,EAAC,OAAO,GAAQ,CACjD,EACZ;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-card/ic-card.css?tag=ic-card&encapsulation=shadow","src/components/ic-card/ic-card.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: flex;\n}\n\na {\n text-decoration: none !important;\n color: var(--ic-architechtural-black) !important;\n}\n\nbutton {\n border: none;\n background-color: transparent;\n outline: var(--ic-hc-focus-outline);\n}\n\n.card,\n.card.clickable {\n display: flex;\n flex-direction: column;\n border: var(--ic-border-default);\n border-radius: var(--ic-border-radius);\n box-sizing: border-box;\n padding: var(--ic-space-md);\n text-align: left;\n color: var(--ic-architechtural-black);\n transition: var(--ic-easing-transition-fast);\n position: relative;\n width: inherit;\n min-width: fit-content;\n height: fit-content;\n min-height: 100%;\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-underline-offset: 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 color: var(--ic-action-default);\n width: 2.5rem;\n height: 2.5rem;\n padding: var(--ic-space-xs);\n margin: var(--ic-space-1px) 0;\n min-width: 0;\n cursor: pointer;\n transition: var(--ic-easing-transition-fast);\n border-radius: var(--ic-border-radius);\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#ic-tooltip-expand-button {\n margin-left: auto;\n position: relative;\n}\n\n.toggle-button:hover,\n.toggle-button:hover:focus {\n background-color: var(--ic-action-default-bg-hover);\n color: var(--ic-action-default-hover);\n}\n\n.toggle-button:focus {\n box-shadow: var(--ic-border-focus);\n}\n\n.toggle-button:active:not(:focus) {\n background-color: var(--ic-action-default-bg-active);\n color: var(--ic-action-default-active);\n}\n\n.toggle-button svg {\n pointer-events: none;\n width: 100% !important;\n height: 100% !important;\n fill: currentcolor !important;\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\n/* Add back in after storybook has the `color-scheme: light dark` code */\n\n/* @media (prefers-color-scheme: dark) and (not (forced-colors: active)) {\n ::slotted([slot=\"icon\"]) {\n fill: var(--ic-architectural-white);\n }\n} */\n","import {\n Component,\n Element,\n Listen,\n Prop,\n State,\n h,\n Method,\n forceUpdate,\n} from \"@stencil/core\";\nimport {\n onComponentRequiredPropUndefined,\n isSlotUsed,\n getThemeFromContext,\n removeDisabledFalse,\n checkSlotInChildMutations,\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 private hostMutationObserver: MutationObserver = null;\n\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 this.hostMutationObserver?.disconnect();\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 this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\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 private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n if (\n mutationList.some(({ type, addedNodes, removedNodes }) =>\n type === \"childList\"\n ? checkSlotInChildMutations(addedNodes, removedNodes, [\n \"message\",\n \"adornment\",\n \"expanded-content\",\n \"image-top\",\n \"image-mid\",\n \"icon\",\n \"interaction-button\",\n \"badge\",\n \"interaction-controls\",\n ])\n : false\n )\n ) {\n forceUpdate(this);\n }\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-tooltip\n id=\"ic-tooltip-expand-button\"\n label=\"Toggle expandable area\"\n silent\n >\n <button\n class={{\n [\"toggle-button\"]: true,\n [`toggle-button-${\n this.areaExpanded ? \"expanded\" : \"closed\"\n }`]: true,\n }}\n aria-label=\"Toggle expandable area\"\n aria-expanded={`${this.areaExpanded}`}\n aria-controls={\n this.areaExpanded ? \"expanded-content-area\" : null\n }\n onClick={this.toggleExpanded}\n innerHTML={chevronIcon}\n ></button>\n </ic-tooltip>\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"],"version":3}
1
+ {"file":"ic-card.js","mappings":";;;;;;;AAAA,MAAM,SAAS,GAAG,s/MAAs/M;;MC2C3/M,IAAI;;;;;QACP,yBAAoB,GAAqB,IAAI,CAAC;QAuI9C,mBAAc,GAAG;YACvB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;SACxB,CAAC;QAEM,kBAAa,GAAG;YACtB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;SACzB,CAAC;QAUM,mBAAc,GAAG;YACvB,IAAI,CAAC,YAAY,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC;SACxC,CAAC;QAEM,yBAAoB,GAAG,CAAC,YAA8B;YAC5D,IACE,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,KACnD,IAAI,KAAK,WAAW;kBAChB,yBAAyB,CAAC,UAAU,EAAE,YAAY,EAAE;oBAClD,SAAS;oBACT,WAAW;oBACX,kBAAkB;oBAClB,WAAW;oBACX,WAAW;oBACX,MAAM;oBACN,oBAAoB;oBACpB,OAAO;oBACP,sBAAsB;iBACvB,CAAC;kBACF,KAAK,CACV,EACD;gBACA,WAAW,CAAC,IAAI,CAAC,CAAC;aACnB;SACF,CAAC;0BA3KwC,SAAS;4BAClB,KAAK;0BACP,KAAK;wBACI,IAAI;iCACN,KAAK;yBAKI,KAAK;wBAKvB,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EN,cACE,KAAK,EAAE;gBACL,CAAC,eAAe,GAAG,IAAI;gBACvB,CAAC,iBACC,IAAI,CAAC,YAAY,GAAG,UAAU,GAAG,QACnC,EAAE,GAAG,IAAI;aACV,gBACU,wBAAwB,mBACpB,GAAG,IAAI,CAAC,YAAY,EAAE,mBAEnC,IAAI,CAAC,YAAY,GAAG,uBAAuB,GAAG,IAAI,EAEpD,OAAO,EAAE,IAAI,CAAC,cAAc,EAC5B,SAAS,EAAE,WAAW,GACd,CACC,CACd,CACG,CACP,EACA,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,kBAAkB,CAAC,IAAI,IAAI,CAAC,YAAY,KAC3D,WAAK,KAAK,EAAC,kBAAkB,EAAC,EAAE,EAAC,uBAAuB,IACtD,YAAM,IAAI,EAAC,kBAAkB,GAAQ,CACjC,CACP,EACA,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,CAAC,IAAI,YAAM,IAAI,EAAC,OAAO,GAAQ,CACjD,EACZ;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-card/ic-card.css?tag=ic-card&encapsulation=shadow","src/components/ic-card/ic-card.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: flex;\n}\n\na {\n text-decoration: none !important;\n color: var(--ic-architechtural-black) !important;\n}\n\nbutton {\n border: none;\n background-color: transparent;\n outline: var(--ic-hc-focus-outline);\n}\n\n.card,\n.card.clickable {\n display: flex;\n flex-direction: column;\n border: var(--ic-border-default);\n border-radius: var(--ic-border-radius);\n box-sizing: border-box;\n padding: var(--ic-space-md);\n text-align: left;\n color: var(--ic-architechtural-black);\n transition: var(--ic-easing-transition-fast);\n position: relative;\n width: inherit;\n min-width: fit-content;\n height: fit-content;\n min-height: 100%;\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-underline-offset: 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 color: var(--ic-action-default);\n width: 2.5rem;\n height: 2.5rem;\n padding: var(--ic-space-xs);\n margin: var(--ic-space-1px) 0;\n min-width: 0;\n cursor: pointer;\n transition: var(--ic-easing-transition-fast);\n border-radius: var(--ic-border-radius);\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#ic-tooltip-expand-button {\n margin-left: auto;\n position: relative;\n}\n\n.toggle-button:hover,\n.toggle-button:hover:focus {\n background-color: var(--ic-action-default-bg-hover);\n color: var(--ic-action-default-hover);\n}\n\n.toggle-button:focus {\n box-shadow: var(--ic-border-focus);\n}\n\n.toggle-button:active:not(:focus) {\n background-color: var(--ic-action-default-bg-active);\n color: var(--ic-action-default-active);\n}\n\n.toggle-button svg {\n pointer-events: none;\n width: 100% !important;\n height: 100% !important;\n fill: currentcolor !important;\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\n/* Add back in after storybook has the `color-scheme: light dark` code */\n\n/* @media (prefers-color-scheme: dark) and (not (forced-colors: active)) {\n ::slotted([slot=\"icon\"]) {\n fill: var(--ic-architectural-white);\n }\n} */\n","import {\n Component,\n Element,\n Listen,\n Prop,\n State,\n h,\n Method,\n forceUpdate,\n Watch,\n} from \"@stencil/core\";\nimport {\n onComponentRequiredPropUndefined,\n isSlotUsed,\n getThemeFromContext,\n removeDisabledFalse,\n checkSlotInChildMutations,\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 private hostMutationObserver: MutationObserver = null;\n\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 @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\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 this.hostMutationObserver?.disconnect();\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 this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\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 private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n if (\n mutationList.some(({ type, addedNodes, removedNodes }) =>\n type === \"childList\"\n ? checkSlotInChildMutations(addedNodes, removedNodes, [\n \"message\",\n \"adornment\",\n \"expanded-content\",\n \"image-top\",\n \"image-mid\",\n \"icon\",\n \"interaction-button\",\n \"badge\",\n \"interaction-controls\",\n ])\n : false\n )\n ) {\n forceUpdate(this);\n }\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-tooltip\n id=\"ic-tooltip-expand-button\"\n label=\"Toggle expandable area\"\n silent\n >\n <button\n class={{\n [\"toggle-button\"]: true,\n [`toggle-button-${\n this.areaExpanded ? \"expanded\" : \"closed\"\n }`]: true,\n }}\n aria-label=\"Toggle expandable area\"\n aria-expanded={`${this.areaExpanded}`}\n aria-controls={\n this.areaExpanded ? \"expanded-content-area\" : null\n }\n onClick={this.toggleExpanded}\n innerHTML={chevronIcon}\n ></button>\n </ic-tooltip>\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"],"version":3}
@@ -23,6 +23,9 @@ const CheckboxGroup = /*@__PURE__*/ proxyCustomElement(class CheckboxGroup exten
23
23
  this.validationStatus = "";
24
24
  this.validationText = "";
25
25
  }
26
+ watchDisabledHandler() {
27
+ removeDisabledFalse(this.disabled, this.el);
28
+ }
26
29
  labelNameHandler(newValue, oldValue, propName) {
27
30
  Array.from(this.el.querySelectorAll("ic-checkbox")).forEach((checkbox) => {
28
31
  if (propName === "label")
@@ -72,6 +75,7 @@ const CheckboxGroup = /*@__PURE__*/ proxyCustomElement(class CheckboxGroup exten
72
75
  }
73
76
  get el() { return this; }
74
77
  static get watchers() { return {
78
+ "disabled": ["watchDisabledHandler"],
75
79
  "label": ["labelNameHandler"],
76
80
  "name": ["labelNameHandler"]
77
81
  }; }
@@ -88,6 +92,7 @@ const CheckboxGroup = /*@__PURE__*/ proxyCustomElement(class CheckboxGroup exten
88
92
  "validationStatus": [1, "validation-status"],
89
93
  "validationText": [1, "validation-text"]
90
94
  }, [[0, "icChange", "handleChange"], [0, "icCheck", "selectHandler"]], {
95
+ "disabled": ["watchDisabledHandler"],
91
96
  "label": ["labelNameHandler"],
92
97
  "name": ["labelNameHandler"]
93
98
  }]);
@@ -1 +1 @@
1
- {"file":"ic-checkbox-group.js","mappings":";;;;;;AAAA,MAAM,kBAAkB,GAAG,y9FAAy9F;;MC0Bv+F,aAAa;;;;;;wBAMI,KAAK;0BAKJ,EAAE;yBAKF,KAAK;;;wBA+BN,KAAK;oBAKR,SAAS;qBAKT,KAAK;gCAKyB,EAAE;8BAKxB,EAAE;;IArCnC,gBAAgB,CACd,QA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,GACO,CACX,CACV,EACD,WAAK,KAAK,EAAC,sBAAsB,IAC/B,eAAa,CACT,CACG,EACV,mBAAmB,CAAC,gBAAgB,EAAE,QAAQ,CAAC,KAC9C,2BACE,GAAG,EAAE,IAAI,EACT,YAAY,EAAC,QAAQ,EACrB,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,cAAc,GACF,CACxB,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-checkbox-group/ic-checkbox-group.css?tag=ic-checkbox-group&encapsulation=shadow","src/components/ic-checkbox-group/ic-checkbox-group.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n}\n\nic-input-label.error {\n color: var(--ic-status-error);\n}\n\nic-input-label ic-typography {\n margin-bottom: var(--ic-space-sm);\n}\n\n:host(.small) ic-input-label ic-typography {\n margin-bottom: calc(var(--ic-space-sm) / 2);\n}\n\nic-input-validation {\n margin-top: var(--ic-space-sm);\n}\n\n:host(.small) ic-input-validation {\n margin-top: calc(var(--ic-space-sm) / 2);\n}\n\n.checkboxes-container {\n margin-bottom: calc(-1 * var(--ic-space-xxs));\n}\n\n:host(.small) .checkboxes-container {\n margin-bottom: calc(-1 * var(--ic-space-xxxs));\n}\n\n.screen-reader-only-text {\n position: absolute;\n left: -9999px;\n background-color: #fff;\n color: #000;\n text-transform: none;\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Listen,\n Element,\n Event,\n EventEmitter,\n Watch,\n} from \"@stencil/core\";\nimport {\n getInputDescribedByText,\n hasValidationStatus,\n onComponentRequiredPropUndefined,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport { IcInformationStatusOrEmpty, IcSizes } from \"../../utils/types\";\nimport { IcChangeEventDetail } from \"./ic-checkbox-group.types\";\n\n@Component({\n tag: \"ic-checkbox-group\",\n styleUrl: \"ic-checkbox-group.css\",\n shadow: true,\n})\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport class CheckboxGroup {\n @Element() el: HTMLIcCheckboxGroupElement;\n\n /**\n * If `true`, the checkbox group will be set to the disabled state.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText: string = \"\";\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * The label for the checkbox group to be displayed.\n */\n @Prop() label!: string;\n\n /**\n * The name for the checkbox group to differentiate from other groups.\n */\n @Prop() name!: string;\n\n @Watch(\"label\")\n @Watch(\"name\")\n labelNameHandler(\n newValue: string,\n oldValue: string,\n propName: \"label\" | \"name\"\n ): void {\n Array.from(this.el.querySelectorAll(\"ic-checkbox\")).forEach((checkbox) => {\n if (propName === \"label\") checkbox.groupLabel = newValue;\n else if (checkbox.name === oldValue) {\n // If the checkbox name has been set by the parent, then override it\n checkbox.name = newValue;\n }\n });\n }\n\n /**\n * If `true`, the checkbox group will require a value.\n */\n @Prop() required: boolean = false;\n\n /**\n * The size of the checkboxes to be displayed. This does not affect the font size of the label.\n */\n @Prop() size?: IcSizes = \"default\";\n\n /**\n * @deprecated This prop should not be used anymore. Set prop `size` to \"small\" instead.\n */\n @Prop() small: boolean = false;\n\n /**\n * The validation status - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The validation text - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationText: string = \"\";\n\n /**\n * Emitted when a checkbox is checked.\n */\n @Event() icChange: EventEmitter<IcChangeEventDetail>;\n\n @Listen(\"icChange\")\n handleChange(ev: CustomEvent): void {\n //don't pass on the event if it has come from slotted text field\n //otherwise any icChange handler bound to the checkbox group will also run\n if ((ev.target as HTMLElement).tagName === \"IC-TEXT-FIELD\") {\n ev.stopImmediatePropagation();\n }\n }\n\n componentWillLoad(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [\n { prop: this.label, propName: \"label\" },\n { prop: this.name, propName: \"name\" },\n ],\n \"Checkbox Group\"\n );\n }\n\n @Listen(\"icCheck\")\n selectHandler({ target }: CustomEvent): void {\n const checkedOptions = Array.from(\n this.el.querySelectorAll(\"ic-checkbox\")\n ).filter(({ checked, disabled }) => checked && !disabled);\n this.icChange.emit({\n value: checkedOptions.map(({ value }) => value),\n checkedOptions: checkedOptions.map((opt) => ({\n checkbox: opt,\n textFieldValue: opt.querySelector(\"ic-text-field\")?.value,\n })),\n selectedOption: target as HTMLIcCheckboxElement,\n });\n }\n\n render() {\n const {\n disabled,\n helperText,\n hideLabel,\n label,\n name,\n required,\n size,\n small,\n validationStatus,\n validationText,\n } = this;\n\n const describedBy = getInputDescribedByText(\n name,\n helperText !== \"\",\n validationStatus !== \"\"\n );\n\n return (\n <Host class={{ [\"small\"]: small, [`${size}`]: true }}>\n {(validationStatus === \"error\" || required || hideLabel) && (\n <span\n id=\"screenReaderOnlyText\"\n class=\"screen-reader-only-text\"\n aria-hidden=\"true\"\n >\n {label} {validationStatus === \"error\" ? \"invalid data \" : null}{\" \"}\n {required ? \"required\" : null}\n </span>\n )}\n <fieldset\n id={name}\n aria-labelledby={`${\n validationStatus === \"error\" || required || hideLabel\n ? \"screenReaderOnlyText\"\n : \"\"\n } ${describedBy}`.trim()}\n disabled={disabled}\n >\n {!hideLabel && (\n <legend>\n <ic-input-label\n class={{ [`${validationStatus}`]: true }}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabled}\n for={name}\n ></ic-input-label>\n </legend>\n )}\n <div class=\"checkboxes-container\">\n <slot></slot>\n </div>\n </fieldset>\n {hasValidationStatus(validationStatus, disabled) && (\n <ic-input-validation\n for={name}\n ariaLiveMode=\"polite\"\n status={validationStatus}\n message={validationText}\n ></ic-input-validation>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-checkbox-group.js","mappings":";;;;;;AAA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tB,EACN,IAAI,WAAW,EAAE,CAAC,IAAI,EAAE,EACxB,QAAQ,EAAE,QAAQ,IAEjB,CAAC,SAAS,KACT,kBACE,sBACE,KAAK,EAAE,EAAE,CAAC,GAAG,gBAAgB,EAAE,GAAG,IAAI,EAAE,EACxC,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,IAAI,GACO,CACX,CACV,EACD,WAAK,KAAK,EAAC,sBAAsB,IAC/B,eAAa,CACT,CACG,EACV,mBAAmB,CAAC,gBAAgB,EAAE,QAAQ,CAAC,KAC9C,2BACE,GAAG,EAAE,IAAI,EACT,YAAY,EAAC,QAAQ,EACrB,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,cAAc,GACF,CACxB,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-checkbox-group/ic-checkbox-group.css?tag=ic-checkbox-group&encapsulation=shadow","src/components/ic-checkbox-group/ic-checkbox-group.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n}\n\nic-input-label.error {\n color: var(--ic-status-error);\n}\n\nic-input-label ic-typography {\n margin-bottom: var(--ic-space-sm);\n}\n\n:host(.small) ic-input-label ic-typography {\n margin-bottom: calc(var(--ic-space-sm) / 2);\n}\n\nic-input-validation {\n margin-top: var(--ic-space-sm);\n}\n\n:host(.small) ic-input-validation {\n margin-top: calc(var(--ic-space-sm) / 2);\n}\n\n.checkboxes-container {\n margin-bottom: calc(-1 * var(--ic-space-xxs));\n}\n\n:host(.small) .checkboxes-container {\n margin-bottom: calc(-1 * var(--ic-space-xxxs));\n}\n\n.screen-reader-only-text {\n position: absolute;\n left: -9999px;\n background-color: #fff;\n color: #000;\n text-transform: none;\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Listen,\n Element,\n Event,\n EventEmitter,\n Watch,\n} from \"@stencil/core\";\nimport {\n getInputDescribedByText,\n hasValidationStatus,\n onComponentRequiredPropUndefined,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport { IcInformationStatusOrEmpty, IcSizes } from \"../../utils/types\";\nimport { IcChangeEventDetail } from \"./ic-checkbox-group.types\";\n\n@Component({\n tag: \"ic-checkbox-group\",\n styleUrl: \"ic-checkbox-group.css\",\n shadow: true,\n})\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport class CheckboxGroup {\n @Element() el: HTMLIcCheckboxGroupElement;\n\n /**\n * If `true`, the checkbox group will be set to the disabled state.\n */\n @Prop() disabled: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText: string = \"\";\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * The label for the checkbox group to be displayed.\n */\n @Prop() label!: string;\n\n /**\n * The name for the checkbox group to differentiate from other groups.\n */\n @Prop() name!: string;\n\n @Watch(\"label\")\n @Watch(\"name\")\n labelNameHandler(\n newValue: string,\n oldValue: string,\n propName: \"label\" | \"name\"\n ): void {\n Array.from(this.el.querySelectorAll(\"ic-checkbox\")).forEach((checkbox) => {\n if (propName === \"label\") checkbox.groupLabel = newValue;\n else if (checkbox.name === oldValue) {\n // If the checkbox name has been set by the parent, then override it\n checkbox.name = newValue;\n }\n });\n }\n\n /**\n * If `true`, the checkbox group will require a value.\n */\n @Prop() required: boolean = false;\n\n /**\n * The size of the checkboxes to be displayed. This does not affect the font size of the label.\n */\n @Prop() size?: IcSizes = \"default\";\n\n /**\n * @deprecated This prop should not be used anymore. Set prop `size` to \"small\" instead.\n */\n @Prop() small: boolean = false;\n\n /**\n * The validation status - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The validation text - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationText: string = \"\";\n\n /**\n * Emitted when a checkbox is checked.\n */\n @Event() icChange: EventEmitter<IcChangeEventDetail>;\n\n @Listen(\"icChange\")\n handleChange(ev: CustomEvent): void {\n //don't pass on the event if it has come from slotted text field\n //otherwise any icChange handler bound to the checkbox group will also run\n if ((ev.target as HTMLElement).tagName === \"IC-TEXT-FIELD\") {\n ev.stopImmediatePropagation();\n }\n }\n\n componentWillLoad(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [\n { prop: this.label, propName: \"label\" },\n { prop: this.name, propName: \"name\" },\n ],\n \"Checkbox Group\"\n );\n }\n\n @Listen(\"icCheck\")\n selectHandler({ target }: CustomEvent): void {\n const checkedOptions = Array.from(\n this.el.querySelectorAll(\"ic-checkbox\")\n ).filter(({ checked, disabled }) => checked && !disabled);\n this.icChange.emit({\n value: checkedOptions.map(({ value }) => value),\n checkedOptions: checkedOptions.map((opt) => ({\n checkbox: opt,\n textFieldValue: opt.querySelector(\"ic-text-field\")?.value,\n })),\n selectedOption: target as HTMLIcCheckboxElement,\n });\n }\n\n render() {\n const {\n disabled,\n helperText,\n hideLabel,\n label,\n name,\n required,\n size,\n small,\n validationStatus,\n validationText,\n } = this;\n\n const describedBy = getInputDescribedByText(\n name,\n helperText !== \"\",\n validationStatus !== \"\"\n );\n\n return (\n <Host class={{ [\"small\"]: small, [`${size}`]: true }}>\n {(validationStatus === \"error\" || required || hideLabel) && (\n <span\n id=\"screenReaderOnlyText\"\n class=\"screen-reader-only-text\"\n aria-hidden=\"true\"\n >\n {label} {validationStatus === \"error\" ? \"invalid data \" : null}{\" \"}\n {required ? \"required\" : null}\n </span>\n )}\n <fieldset\n id={name}\n aria-labelledby={`${\n validationStatus === \"error\" || required || hideLabel\n ? \"screenReaderOnlyText\"\n : \"\"\n } ${describedBy}`.trim()}\n disabled={disabled}\n >\n {!hideLabel && (\n <legend>\n <ic-input-label\n class={{ [`${validationStatus}`]: true }}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabled}\n for={name}\n ></ic-input-label>\n </legend>\n )}\n <div class=\"checkboxes-container\">\n <slot></slot>\n </div>\n </fieldset>\n {hasValidationStatus(validationStatus, disabled) && (\n <ic-input-validation\n for={name}\n ariaLiveMode=\"polite\"\n status={validationStatus}\n message={validationText}\n ></ic-input-validation>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
@@ -44,6 +44,9 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends HTMLEle
44
44
  this.value = undefined;
45
45
  this.hideLabel = false;
46
46
  }
47
+ watchDisabledHandler() {
48
+ removeDisabledFalse(this.disabled, this.el);
49
+ }
47
50
  watchIndeterminateHandler() {
48
51
  this.displayIndeterminate = this.nativeIndeterminateBehaviour
49
52
  ? this.indeterminate
@@ -114,6 +117,7 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends HTMLEle
114
117
  static get delegatesFocus() { return true; }
115
118
  get el() { return this; }
116
119
  static get watchers() { return {
120
+ "disabled": ["watchDisabledHandler"],
117
121
  "indeterminate": ["watchIndeterminateHandler"]
118
122
  }; }
119
123
  static get style() { return icCheckboxCss; }
@@ -141,6 +145,7 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends HTMLEle
141
145
  "displayIndeterminate": [32],
142
146
  "setFocus": [64]
143
147
  }, undefined, {
148
+ "disabled": ["watchDisabledHandler"],
144
149
  "indeterminate": ["watchIndeterminateHandler"]
145
150
  }]);
146
151
  function defineCustomElement$1() {
@@ -1 +1 @@
1
- {"file":"ic-checkbox.js","mappings":";;;;AAAA,MAAM,aAAa,GAAG,01NAA01N;;MCmCn2N,QAAQ;;;;;;;QA0KX,gBAAW,GAAG;YACpB,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;YAC7B,IAAI,CAAC,oBAAoB,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AAS,CACrB,CACjB,CACG,EACL,UAAU,CAAC,EAAE,EAAE,kBAAkB,CAAC,KACjC,WACE,KAAK,EAAC,mBAAmB,EACzB,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,wBAAwB,GAAG,EAAE,CAAC,IAEhD,sBAAsB,KAAK,SAAS,KACnC,WAAK,KAAK,EAAC,eAAe,GAAO,CAClC,EACD,eACG,sBAAsB,KAAK,SAAS,KACnC,qBAAe,OAAO,EAAC,SAAS,IAC9B,SAAG,KAAK,EAAC,cAAc,eAAW,QAAQ,IACvC,WAAW,CACV,CACU,CACjB,EACD,WACE,KAAK,EAAE;gBACL,0BAA0B,EACxB,sBAAsB,KAAK,QAAQ;aACtC,IAED,YAAM,IAAI,EAAC,kBAAkB,GAAQ,CACjC,CACF,CACF,CACP,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-checkbox/ic-checkbox.css?tag=ic-checkbox&encapsulation=shadow","src/components/ic-checkbox/ic-checkbox.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host(.disabled) {\n color: var(--ic-architectural-200);\n pointer-events: none;\n}\n\n.container {\n display: flex;\n width: fit-content;\n padding: var(--ic-space-xxs) 0 var(--ic-space-xxs) var(--ic-space-xxs);\n margin-bottom: var(--ic-space-xxs);\n align-items: center;\n}\n\n:host(.small) .container {\n margin-bottom: var(--ic-space-xxxs);\n}\n\n.checkbox {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n display: block;\n position: relative;\n top: 0;\n left: 0;\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n background-color: var(--ic-architectural-white);\n border: var(--ic-border-width) solid var(--ic-architectural-400);\n border-radius: var(--ic-border-radius);\n outline: none;\n cursor: pointer;\n transition: var(--ic-easing-transition-fast);\n flex-shrink: 0;\n}\n\n:host .container svg {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n:host(.small) .checkbox,\n:host(.small) .container svg {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n}\n\n:host(.large) .checkbox,\n:host(.large) .container svg {\n width: var(--ic-space-xl);\n height: var(--ic-space-xl);\n}\n\n.checkbox:checked {\n background-color: var(--ic-action-default);\n border: var(--ic-border-width) solid var(--ic-action-default);\n transition: var(--ic-easing-transition-slow);\n}\n\n.checkbox:checked:disabled {\n background-color: var(--ic-architectural-200);\n}\n\n.checkbox:indeterminate,\n.checkbox.indeterminate:checked {\n background-color: var(--ic-architectural-white);\n border: 0.125rem solid var(--ic-action-default);\n}\n\n.checkbox:checked:hover {\n background-color: var(--ic-action-default-hover);\n}\n\n.checkbox:indeterminate:hover,\n.checkbox.indeterminate:checked:hover {\n background-color: var(--ic-action-default-bg-hover-no-alpha);\n border: 0.125rem solid var(--ic-action-default-hover);\n}\n\n.checkbox:checked:active {\n background-color: var(--ic-action-default-active);\n}\n\n.checkbox:indeterminate:active,\n.checkbox.indeterminate:checked:active {\n background-color: var(--ic-action-default-bg-active-no-alpha);\n border: 0.125rem solid var(--ic-action-default-active);\n}\n\n.checkbox:hover {\n background-color: var(--ic-action-default-bg-hover-no-alpha);\n box-shadow: 0 0 0 0.25rem var(--ic-action-default-bg-hover);\n border: var(--ic-border-width) solid var(--ic-action-default-hover);\n}\n\n.checkbox:active {\n background-color: var(--ic-action-default-bg-active-no-alpha);\n box-shadow: 0 0 0 0.25rem var(--ic-action-default-bg-active);\n border: var(--ic-border-width) solid var(--ic-action-default-active);\n}\n\n.checkbox:focus {\n box-shadow: var(--ic-border-focus);\n}\n\n.checkbox:disabled {\n border: var(--ic-border-width) dashed var(--ic-architectural-200);\n}\n\n.checkbox-label {\n padding-left: var(--ic-space-sm);\n}\n\n.checkbox-label:hover {\n cursor: pointer;\n}\n\n.checkmark {\n position: relative;\n right: calc(-1 * var(--ic-space-lg));\n margin-left: calc(-1 * var(--ic-space-lg));\n fill: white;\n z-index: 1;\n background-color: transparent;\n pointer-events: none;\n flex-shrink: 0;\n}\n\n:host(.small) .checkmark {\n margin-left: calc(-1 * var(--ic-space-md));\n right: calc(-1 * var(--ic-space-md));\n}\n\n:host(.large) .checkmark {\n margin-left: calc(-1 * var(--ic-space-xl));\n right: calc(-1 * var(--ic-space-xl));\n}\n\n.indeterminate-symbol {\n position: relative;\n width: 0.875rem;\n height: var(--ic-space-xxxs);\n right: -1.188rem;\n margin-left: -0.875rem;\n z-index: 1;\n background-color: var(--ic-action-default);\n pointer-events: none;\n flex-shrink: 0;\n}\n\n:host(.small) .indeterminate-symbol {\n width: 0.6rem;\n right: -0.8rem;\n margin-left: -0.6rem;\n}\n\n:host(.large) .indeterminate-symbol {\n width: 1.25rem;\n right: -1.625rem;\n margin-left: -1.25rem;\n}\n\n.container:hover .indeterminate-symbol {\n background-color: var(--ic-action-default-hover);\n}\n\n.container:active .indeterminate-symbol {\n background-color: var(--ic-action-default-active);\n}\n\n.additional-field-wrapper {\n margin-left: calc(var(--ic-space-md) + var(--ic-space-lg));\n margin-top: calc(var(--ic-space-sm) / 2);\n}\n\n.branch-corner {\n color: var(--ic-action-default);\n height: var(--ic-space-md);\n width: var(--ic-space-xl);\n border-radius: 0 0 0 0.188rem;\n border-bottom: 0.125rem solid var(--ic-action-default);\n border-left: 0.125rem solid var(--ic-action-default);\n}\n\n.dynamic-container {\n display: flex;\n position: relative;\n margin: var(--ic-space-xxxs) 0 var(--ic-space-xxs) var(--ic-space-md);\n gap: var(--ic-space-xs);\n}\n\n.dynamic-text {\n color: var(--ic-action-default);\n margin-top: calc(var(--ic-space-sm) / 2);\n margin-bottom: var(--ic-space-xs);\n border-radius: 2%;\n}\n\n@media (max-width: 576px) {\n ::slotted(ic-text-field) {\n --input-width: 100%;\n }\n}\n\n@media (forced-colors: active) {\n /* Styles here only apply to Forced Colors Mode */\n .checkbox {\n appearance: revert;\n transition: none;\n }\n\n .checkbox:checked {\n transition: none;\n }\n\n .checkbox:focus-visible {\n outline: 0.125rem solid highlight;\n }\n\n .checkbox:disabled:not(:checked) {\n appearance: none;\n border-color: GrayText;\n }\n\n .checkmark {\n fill: none;\n }\n\n .indeterminate-symbol {\n display: none;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Element,\n Event,\n EventEmitter,\n State,\n Method,\n Watch,\n} from \"@stencil/core\";\nimport { IcAdditionalFieldTypes, IcSizes } from \"../../utils/types\";\nimport {\n isSlotUsed,\n onComponentRequiredPropUndefined,\n renderHiddenInput,\n removeHiddenInput,\n addFormResetListener,\n removeFormResetListener,\n removeDisabledFalse,\n isPropDefined,\n} from \"../../utils/helpers\";\n\n/**\n * @slot additional-field - Content to be displayed alongside a checkbox.\n */\n@Component({\n tag: \"ic-checkbox\",\n styleUrl: \"ic-checkbox.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport class Checkbox {\n private additionalFieldContainer: HTMLDivElement;\n\n @Element() el: HTMLIcCheckboxElement;\n\n /**\n * The style of additionalField that will be displayed if used.\n */\n @Prop({ reflect: true }) additionalFieldDisplay: IcAdditionalFieldTypes =\n \"static\";\n\n /**\n * If `true`, the checkbox will be set to the checked state. This is only the initial state and will be updated to unchecked if the checkbox is clicked.\n */\n @Prop({ reflect: true, mutable: true }) checked?: boolean = false;\n @State() initiallyChecked = this.checked;\n\n /**\n * If `true`, the checkbox will be set to the disabled state.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * The text to be displayed when dynamic.\n */\n\n @Prop() dynamicText: string = \"This selection requires additional answers\";\n\n /**\n * The <form> element to associate the checkbox with.\n */\n @Prop() form?: string;\n\n /**\n * The URL that processes the information submitted by the checkbox. It overrides the action attribute of the checkbox'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 checkbox's form owner.\n */\n @Prop() formtarget?: string;\n\n /**\n * The group label for the checkbox.\n */\n @Prop({ mutable: true }) groupLabel: string;\n\n /**\n * If `true`, the indeterminate state will be displayed when checked.\n */\n @Prop() indeterminate: boolean = false;\n @State() displayIndeterminate = this.indeterminate;\n\n @Watch(\"indeterminate\")\n watchIndeterminateHandler(): void {\n this.displayIndeterminate = this.nativeIndeterminateBehaviour\n ? this.indeterminate\n : this.indeterminate && this.checked;\n }\n\n /**\n * The label for the checkbox.\n */\n @Prop() label!: string;\n\n /**\n * The name for the checkbox. If not set when used in a checkbox group, the name will be based on the group name.\n */\n @Prop({ mutable: true }) name: string;\n\n /**\n * If `true`, the checkbox will behave like a native checkbox where the `indeterminate` prop sets the indeterminate visual styling, independent of the `checked` state.\n */\n @Prop() nativeIndeterminateBehaviour: boolean = false;\n\n /**\n * The size of the checkbox to be displayed. This does not affect the font size of the label. If a checkbox is contained in a checkbox group, this will override the size set on checkbox group.\n */\n @Prop() size?: IcSizes;\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 for the checkbox.\n */\n @Prop() value!: 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 = false;\n\n /**\n * @deprecated This event should not be used anymore. Use icCheck instead.\n */\n @Event() checkboxChecked: EventEmitter<void>;\n\n /**\n * Emitted when a checkbox has been checked.\n */\n @Event() icCheck: EventEmitter<void>;\n\n componentWillLoad(): void {\n removeDisabledFalse(this.disabled, this.el);\n\n addFormResetListener(this.el, this.handleFormReset);\n\n const checkboxGroup = this.el.parentElement as HTMLIcCheckboxGroupElement;\n if (checkboxGroup) {\n if (!this.name) this.name = checkboxGroup.name;\n this.groupLabel = checkboxGroup.label;\n }\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [\n { prop: this.label, propName: \"label\" },\n { prop: this.value, propName: \"value\" },\n ],\n \"Checkbox\"\n );\n }\n\n componentDidRender(): void {\n if (this.additionalFieldDisplay === \"static\") {\n const textfield = this.el.querySelector(\"ic-text-field\");\n if (!this.checked) {\n textfield?.setAttribute(\"disabled\", \"\");\n } else {\n textfield?.removeAttribute(\"disabled\");\n }\n } else if (this.additionalFieldContainer) {\n this.additionalFieldContainer.style.display = !this.checked\n ? \"none\"\n : \"flex\";\n }\n }\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n\n /**\n * Sets focus on the checkbox.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.el.shadowRoot.querySelector<HTMLElement>(\".checkbox\")?.focus();\n }\n\n private handleClick = () => {\n this.checked = !this.checked;\n this.displayIndeterminate = this.nativeIndeterminateBehaviour\n ? false\n : this.indeterminate && this.checked;\n this.icCheck.emit();\n this.checkboxChecked.emit();\n };\n\n private handleFormReset = (): void => {\n this.checked = this.initiallyChecked;\n };\n\n render() {\n const {\n additionalFieldDisplay,\n checked,\n disabled,\n dynamicText,\n el,\n form,\n formaction,\n formenctype,\n formmethod,\n formnovalidate,\n formtarget,\n displayIndeterminate,\n groupLabel,\n label,\n name,\n size,\n small,\n value,\n } = this;\n\n const id = `ic-checkbox-${\n isPropDefined(label) || value\n }-${groupLabel}`.replace(/ /g, \"-\");\n\n const parentElementSize = (el.parentElement as HTMLIcCheckboxGroupElement)\n .size;\n\n checked\n ? renderHiddenInput(true, el, name, checked && value, disabled)\n : removeHiddenInput(el);\n\n return (\n <Host\n class={{\n disabled,\n small,\n [`${size || parentElementSize}`]: true,\n }}\n >\n <div class=\"container\">\n {displayIndeterminate && <div class=\"indeterminate-symbol\" />}\n {!displayIndeterminate && checked && (\n <svg\n class=\"checkmark\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n >\n <title>checkmark icon</title>\n <path d=\"M21 6.285l-11.16 12.733-6.84-6.018 1.319-1.49 5.341 4.686 9.865-11.196 1.475 1.285z\" />\n </svg>\n )}\n <input\n role=\"checkbox\"\n class={{\n checkbox: true,\n checked,\n indeterminate: displayIndeterminate,\n }}\n type=\"checkbox\"\n name={name}\n id={id}\n value={value}\n disabled={disabled ? true : null}\n checked={checked}\n indeterminate={displayIndeterminate}\n onClick={this.handleClick}\n form={form}\n formaction={formaction}\n formenctype={formenctype}\n formmethod={formmethod}\n formnovalidate={formnovalidate}\n formtarget={formtarget}\n aria-label={this.hideLabel ? this.label : undefined}\n ></input>\n {!this.hideLabel && (\n <ic-typography class=\"checkbox-label\" variant=\"body\">\n <label htmlFor={id}>{label}</label>\n </ic-typography>\n )}\n </div>\n {isSlotUsed(el, \"additional-field\") && (\n <div\n class=\"dynamic-container\"\n ref={(el) => (this.additionalFieldContainer = el)}\n >\n {additionalFieldDisplay === \"dynamic\" && (\n <div class=\"branch-corner\"></div>\n )}\n <div>\n {additionalFieldDisplay === \"dynamic\" && (\n <ic-typography variant=\"caption\">\n <p class=\"dynamic-text\" aria-live=\"polite\">\n {dynamicText}\n </p>\n </ic-typography>\n )}\n <div\n class={{\n \"additional-field-wrapper\":\n additionalFieldDisplay === \"static\",\n }}\n >\n <slot name=\"additional-field\"></slot>\n </div>\n </div>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-checkbox.js","mappings":";;;;AAAA,MAAM,aAAa,GAAG,01NAA01N;;MCmCn2N,QAAQ;;;;;;;QA8KX,gBAAW,GAAG;YACpB,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;YAC7B,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,4BAA4B;kBACzD,KAAK;kBACL,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,OAAO,CAAC;YACvC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YACpB,IAAI,CAAC,eAAe,CAAC,IAAI,E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,EAAC,mBAAmB,EACzB,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,wBAAwB,GAAG,EAAE,CAAC,IAEhD,sBAAsB,KAAK,SAAS,KACnC,WAAK,KAAK,EAAC,eAAe,GAAO,CAClC,EACD,eACG,sBAAsB,KAAK,SAAS,KACnC,qBAAe,OAAO,EAAC,SAAS,IAC9B,SAAG,KAAK,EAAC,cAAc,eAAW,QAAQ,IACvC,WAAW,CACV,CACU,CACjB,EACD,WACE,KAAK,EAAE;gBACL,0BAA0B,EACxB,sBAAsB,KAAK,QAAQ;aACtC,IAED,YAAM,IAAI,EAAC,kBAAkB,GAAQ,CACjC,CACF,CACF,CACP,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-checkbox/ic-checkbox.css?tag=ic-checkbox&encapsulation=shadow","src/components/ic-checkbox/ic-checkbox.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host(.disabled) {\n color: var(--ic-architectural-200);\n pointer-events: none;\n}\n\n.container {\n display: flex;\n width: fit-content;\n padding: var(--ic-space-xxs) 0 var(--ic-space-xxs) var(--ic-space-xxs);\n margin-bottom: var(--ic-space-xxs);\n align-items: center;\n}\n\n:host(.small) .container {\n margin-bottom: var(--ic-space-xxxs);\n}\n\n.checkbox {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n display: block;\n position: relative;\n top: 0;\n left: 0;\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n background-color: var(--ic-architectural-white);\n border: var(--ic-border-width) solid var(--ic-architectural-400);\n border-radius: var(--ic-border-radius);\n outline: none;\n cursor: pointer;\n transition: var(--ic-easing-transition-fast);\n flex-shrink: 0;\n}\n\n:host .container svg {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n:host(.small) .checkbox,\n:host(.small) .container svg {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n}\n\n:host(.large) .checkbox,\n:host(.large) .container svg {\n width: var(--ic-space-xl);\n height: var(--ic-space-xl);\n}\n\n.checkbox:checked {\n background-color: var(--ic-action-default);\n border: var(--ic-border-width) solid var(--ic-action-default);\n transition: var(--ic-easing-transition-slow);\n}\n\n.checkbox:checked:disabled {\n background-color: var(--ic-architectural-200);\n}\n\n.checkbox:indeterminate,\n.checkbox.indeterminate:checked {\n background-color: var(--ic-architectural-white);\n border: 0.125rem solid var(--ic-action-default);\n}\n\n.checkbox:checked:hover {\n background-color: var(--ic-action-default-hover);\n}\n\n.checkbox:indeterminate:hover,\n.checkbox.indeterminate:checked:hover {\n background-color: var(--ic-action-default-bg-hover-no-alpha);\n border: 0.125rem solid var(--ic-action-default-hover);\n}\n\n.checkbox:checked:active {\n background-color: var(--ic-action-default-active);\n}\n\n.checkbox:indeterminate:active,\n.checkbox.indeterminate:checked:active {\n background-color: var(--ic-action-default-bg-active-no-alpha);\n border: 0.125rem solid var(--ic-action-default-active);\n}\n\n.checkbox:hover {\n background-color: var(--ic-action-default-bg-hover-no-alpha);\n box-shadow: 0 0 0 0.25rem var(--ic-action-default-bg-hover);\n border: var(--ic-border-width) solid var(--ic-action-default-hover);\n}\n\n.checkbox:active {\n background-color: var(--ic-action-default-bg-active-no-alpha);\n box-shadow: 0 0 0 0.25rem var(--ic-action-default-bg-active);\n border: var(--ic-border-width) solid var(--ic-action-default-active);\n}\n\n.checkbox:focus {\n box-shadow: var(--ic-border-focus);\n}\n\n.checkbox:disabled {\n border: var(--ic-border-width) dashed var(--ic-architectural-200);\n}\n\n.checkbox-label {\n padding-left: var(--ic-space-sm);\n}\n\n.checkbox-label:hover {\n cursor: pointer;\n}\n\n.checkmark {\n position: relative;\n right: calc(-1 * var(--ic-space-lg));\n margin-left: calc(-1 * var(--ic-space-lg));\n fill: white;\n z-index: 1;\n background-color: transparent;\n pointer-events: none;\n flex-shrink: 0;\n}\n\n:host(.small) .checkmark {\n margin-left: calc(-1 * var(--ic-space-md));\n right: calc(-1 * var(--ic-space-md));\n}\n\n:host(.large) .checkmark {\n margin-left: calc(-1 * var(--ic-space-xl));\n right: calc(-1 * var(--ic-space-xl));\n}\n\n.indeterminate-symbol {\n position: relative;\n width: 0.875rem;\n height: var(--ic-space-xxxs);\n right: -1.188rem;\n margin-left: -0.875rem;\n z-index: 1;\n background-color: var(--ic-action-default);\n pointer-events: none;\n flex-shrink: 0;\n}\n\n:host(.small) .indeterminate-symbol {\n width: 0.6rem;\n right: -0.8rem;\n margin-left: -0.6rem;\n}\n\n:host(.large) .indeterminate-symbol {\n width: 1.25rem;\n right: -1.625rem;\n margin-left: -1.25rem;\n}\n\n.container:hover .indeterminate-symbol {\n background-color: var(--ic-action-default-hover);\n}\n\n.container:active .indeterminate-symbol {\n background-color: var(--ic-action-default-active);\n}\n\n.additional-field-wrapper {\n margin-left: calc(var(--ic-space-md) + var(--ic-space-lg));\n margin-top: calc(var(--ic-space-sm) / 2);\n}\n\n.branch-corner {\n color: var(--ic-action-default);\n height: var(--ic-space-md);\n width: var(--ic-space-xl);\n border-radius: 0 0 0 0.188rem;\n border-bottom: 0.125rem solid var(--ic-action-default);\n border-left: 0.125rem solid var(--ic-action-default);\n}\n\n.dynamic-container {\n display: flex;\n position: relative;\n margin: var(--ic-space-xxxs) 0 var(--ic-space-xxs) var(--ic-space-md);\n gap: var(--ic-space-xs);\n}\n\n.dynamic-text {\n color: var(--ic-action-default);\n margin-top: calc(var(--ic-space-sm) / 2);\n margin-bottom: var(--ic-space-xs);\n border-radius: 2%;\n}\n\n@media (max-width: 576px) {\n ::slotted(ic-text-field) {\n --input-width: 100%;\n }\n}\n\n@media (forced-colors: active) {\n /* Styles here only apply to Forced Colors Mode */\n .checkbox {\n appearance: revert;\n transition: none;\n }\n\n .checkbox:checked {\n transition: none;\n }\n\n .checkbox:focus-visible {\n outline: 0.125rem solid highlight;\n }\n\n .checkbox:disabled:not(:checked) {\n appearance: none;\n border-color: GrayText;\n }\n\n .checkmark {\n fill: none;\n }\n\n .indeterminate-symbol {\n display: none;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n Element,\n Event,\n EventEmitter,\n State,\n Method,\n Watch,\n} from \"@stencil/core\";\nimport { IcAdditionalFieldTypes, IcSizes } from \"../../utils/types\";\nimport {\n isSlotUsed,\n onComponentRequiredPropUndefined,\n renderHiddenInput,\n removeHiddenInput,\n addFormResetListener,\n removeFormResetListener,\n removeDisabledFalse,\n isPropDefined,\n} from \"../../utils/helpers\";\n\n/**\n * @slot additional-field - Content to be displayed alongside a checkbox.\n */\n@Component({\n tag: \"ic-checkbox\",\n styleUrl: \"ic-checkbox.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport class Checkbox {\n private additionalFieldContainer: HTMLDivElement;\n\n @Element() el: HTMLIcCheckboxElement;\n\n /**\n * The style of additionalField that will be displayed if used.\n */\n @Prop({ reflect: true }) additionalFieldDisplay: IcAdditionalFieldTypes =\n \"static\";\n\n /**\n * If `true`, the checkbox will be set to the checked state. This is only the initial state and will be updated to unchecked if the checkbox is clicked.\n */\n @Prop({ reflect: true, mutable: true }) checked?: boolean = false;\n @State() initiallyChecked = this.checked;\n\n /**\n * If `true`, the checkbox will be set to the disabled state.\n */\n @Prop() disabled?: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * The text to be displayed when dynamic.\n */\n\n @Prop() dynamicText: string = \"This selection requires additional answers\";\n\n /**\n * The <form> element to associate the checkbox with.\n */\n @Prop() form?: string;\n\n /**\n * The URL that processes the information submitted by the checkbox. It overrides the action attribute of the checkbox'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 checkbox's form owner.\n */\n @Prop() formtarget?: string;\n\n /**\n * The group label for the checkbox.\n */\n @Prop({ mutable: true }) groupLabel: string;\n\n /**\n * If `true`, the indeterminate state will be displayed when checked.\n */\n @Prop() indeterminate: boolean = false;\n @State() displayIndeterminate = this.indeterminate;\n\n @Watch(\"indeterminate\")\n watchIndeterminateHandler(): void {\n this.displayIndeterminate = this.nativeIndeterminateBehaviour\n ? this.indeterminate\n : this.indeterminate && this.checked;\n }\n\n /**\n * The label for the checkbox.\n */\n @Prop() label!: string;\n\n /**\n * The name for the checkbox. If not set when used in a checkbox group, the name will be based on the group name.\n */\n @Prop({ mutable: true }) name: string;\n\n /**\n * If `true`, the checkbox will behave like a native checkbox where the `indeterminate` prop sets the indeterminate visual styling, independent of the `checked` state.\n */\n @Prop() nativeIndeterminateBehaviour: boolean = false;\n\n /**\n * The size of the checkbox to be displayed. This does not affect the font size of the label. If a checkbox is contained in a checkbox group, this will override the size set on checkbox group.\n */\n @Prop() size?: IcSizes;\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 for the checkbox.\n */\n @Prop() value!: 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 = false;\n\n /**\n * @deprecated This event should not be used anymore. Use icCheck instead.\n */\n @Event() checkboxChecked: EventEmitter<void>;\n\n /**\n * Emitted when a checkbox has been checked.\n */\n @Event() icCheck: EventEmitter<void>;\n\n componentWillLoad(): void {\n removeDisabledFalse(this.disabled, this.el);\n\n addFormResetListener(this.el, this.handleFormReset);\n\n const checkboxGroup = this.el.parentElement as HTMLIcCheckboxGroupElement;\n if (checkboxGroup) {\n if (!this.name) this.name = checkboxGroup.name;\n this.groupLabel = checkboxGroup.label;\n }\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [\n { prop: this.label, propName: \"label\" },\n { prop: this.value, propName: \"value\" },\n ],\n \"Checkbox\"\n );\n }\n\n componentDidRender(): void {\n if (this.additionalFieldDisplay === \"static\") {\n const textfield = this.el.querySelector(\"ic-text-field\");\n if (!this.checked) {\n textfield?.setAttribute(\"disabled\", \"\");\n } else {\n textfield?.removeAttribute(\"disabled\");\n }\n } else if (this.additionalFieldContainer) {\n this.additionalFieldContainer.style.display = !this.checked\n ? \"none\"\n : \"flex\";\n }\n }\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n\n /**\n * Sets focus on the checkbox.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.el.shadowRoot.querySelector<HTMLElement>(\".checkbox\")?.focus();\n }\n\n private handleClick = () => {\n this.checked = !this.checked;\n this.displayIndeterminate = this.nativeIndeterminateBehaviour\n ? false\n : this.indeterminate && this.checked;\n this.icCheck.emit();\n this.checkboxChecked.emit();\n };\n\n private handleFormReset = (): void => {\n this.checked = this.initiallyChecked;\n };\n\n render() {\n const {\n additionalFieldDisplay,\n checked,\n disabled,\n dynamicText,\n el,\n form,\n formaction,\n formenctype,\n formmethod,\n formnovalidate,\n formtarget,\n displayIndeterminate,\n groupLabel,\n label,\n name,\n size,\n small,\n value,\n } = this;\n\n const id = `ic-checkbox-${\n isPropDefined(label) || value\n }-${groupLabel}`.replace(/ /g, \"-\");\n\n const parentElementSize = (el.parentElement as HTMLIcCheckboxGroupElement)\n .size;\n\n checked\n ? renderHiddenInput(true, el, name, checked && value, disabled)\n : removeHiddenInput(el);\n\n return (\n <Host\n class={{\n disabled,\n small,\n [`${size || parentElementSize}`]: true,\n }}\n >\n <div class=\"container\">\n {displayIndeterminate && <div class=\"indeterminate-symbol\" />}\n {!displayIndeterminate && checked && (\n <svg\n class=\"checkmark\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n >\n <title>checkmark icon</title>\n <path d=\"M21 6.285l-11.16 12.733-6.84-6.018 1.319-1.49 5.341 4.686 9.865-11.196 1.475 1.285z\" />\n </svg>\n )}\n <input\n role=\"checkbox\"\n class={{\n checkbox: true,\n checked,\n indeterminate: displayIndeterminate,\n }}\n type=\"checkbox\"\n name={name}\n id={id}\n value={value}\n disabled={disabled ? true : null}\n checked={checked}\n indeterminate={displayIndeterminate}\n onClick={this.handleClick}\n form={form}\n formaction={formaction}\n formenctype={formenctype}\n formmethod={formmethod}\n formnovalidate={formnovalidate}\n formtarget={formtarget}\n aria-label={this.hideLabel ? this.label : undefined}\n ></input>\n {!this.hideLabel && (\n <ic-typography class=\"checkbox-label\" variant=\"body\">\n <label htmlFor={id}>{label}</label>\n </ic-typography>\n )}\n </div>\n {isSlotUsed(el, \"additional-field\") && (\n <div\n class=\"dynamic-container\"\n ref={(el) => (this.additionalFieldContainer = el)}\n >\n {additionalFieldDisplay === \"dynamic\" && (\n <div class=\"branch-corner\"></div>\n )}\n <div>\n {additionalFieldDisplay === \"dynamic\" && (\n <ic-typography variant=\"caption\">\n <p class=\"dynamic-text\" aria-live=\"polite\">\n {dynamicText}\n </p>\n </ic-typography>\n )}\n <div\n class={{\n \"additional-field-wrapper\":\n additionalFieldDisplay === \"static\",\n }}\n >\n <slot name=\"additional-field\"></slot>\n </div>\n </div>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
@@ -46,12 +46,16 @@ const Chip = /*@__PURE__*/ proxyCustomElement(class Chip extends HTMLElement {
46
46
  this.size = "default";
47
47
  this.transparentBackground = true;
48
48
  this.variant = "filled";
49
+ this.dismissLabel = "Dismiss";
49
50
  }
50
51
  customColorHandler() {
51
52
  if (!this.dismissible) {
52
53
  this.setChipColour();
53
54
  }
54
55
  }
56
+ watchDisabledHandler() {
57
+ removeDisabledFalse(this.disabled, this.el);
58
+ }
55
59
  componentWillLoad() {
56
60
  removeDisabledFalse(this.disabled, this.el);
57
61
  if (!this.dismissible) {
@@ -80,7 +84,7 @@ const Chip = /*@__PURE__*/ proxyCustomElement(class Chip extends HTMLElement {
80
84
  (_a = this.el.shadowRoot.querySelector("button")) === null || _a === void 0 ? void 0 : _a.focus();
81
85
  }
82
86
  render() {
83
- const { label, appearance, variant, size, dismissible, visible, disabled, hovered, } = this;
87
+ const { label, appearance, variant, size, dismissible, visible, disabled, hovered, dismissLabel, } = this;
84
88
  return (visible && (h("div", { class: {
85
89
  chip: true,
86
90
  [`${appearance}`]: appearance !== undefined,
@@ -90,12 +94,13 @@ const Chip = /*@__PURE__*/ proxyCustomElement(class Chip extends HTMLElement {
90
94
  dismissible,
91
95
  hovered,
92
96
  "white-background": this.variant === "outlined" && !this.transparentBackground,
93
- } }, isSlotUsed(this.el, "icon") && (h("div", { class: "icon" }, h("slot", { name: "icon" }))), h("ic-typography", { variant: "label", "apply-vertical-margins": false, class: { label: true, "in-ag-grid": this.inAGGrid } }, h("span", null, label)), dismissible && (h("ic-tooltip", { label: "Dismiss", target: "dismiss-icon", class: { "tooltip-disabled": disabled } }, h("button", { id: "dismiss-icon", class: "dismiss-icon", "aria-label": `Dismiss ${label} chip`, disabled: disabled, tabindex: disabled ? -1 : 0, onClick: this.dismissAction, onMouseEnter: this.mouseEnterHandler, onMouseLeave: this.mouseLeaveHandler, innerHTML: dismissIcon }))), isSlotUsed(this.el, "badge") && h("slot", { name: "badge" }))));
97
+ } }, isSlotUsed(this.el, "icon") && (h("div", { class: "icon" }, h("slot", { name: "icon" }))), h("ic-typography", { variant: "label", "apply-vertical-margins": false, class: { label: true, "in-ag-grid": this.inAGGrid } }, h("span", null, label)), dismissible && (h("ic-tooltip", { label: dismissLabel, target: "dismiss-icon", class: { "tooltip-disabled": disabled } }, h("button", { id: "dismiss-icon", class: "dismiss-icon", "aria-label": `${dismissLabel} ${label} chip`, disabled: disabled, tabindex: disabled ? -1 : 0, onClick: this.dismissAction, onMouseEnter: this.mouseEnterHandler, onMouseLeave: this.mouseLeaveHandler, innerHTML: dismissIcon }))), isSlotUsed(this.el, "badge") && h("slot", { name: "badge" }))));
94
98
  }
95
99
  static get delegatesFocus() { return true; }
96
100
  get el() { return this; }
97
101
  static get watchers() { return {
98
- "customColor": ["customColorHandler"]
102
+ "customColor": ["customColorHandler"],
103
+ "disabled": ["watchDisabledHandler"]
99
104
  }; }
100
105
  static get style() { return icChipCss; }
101
106
  }, [17, "ic-chip", {
@@ -107,11 +112,13 @@ const Chip = /*@__PURE__*/ proxyCustomElement(class Chip extends HTMLElement {
107
112
  "size": [1],
108
113
  "transparentBackground": [4, "transparent-background"],
109
114
  "variant": [1],
115
+ "dismissLabel": [1, "dismiss-label"],
110
116
  "hovered": [32],
111
117
  "visible": [32],
112
118
  "setFocus": [64]
113
119
  }, [[2, "icDismiss", "handleClick"]], {
114
- "customColor": ["customColorHandler"]
120
+ "customColor": ["customColorHandler"],
121
+ "disabled": ["watchDisabledHandler"]
115
122
  }]);
116
123
  function defineCustomElement$1() {
117
124
  if (typeof customElements === "undefined") {
@@ -1 +1 @@
1
- {"file":"ic-chip.js","mappings":";;;;;;;;;;AAAA,MAAM,SAAS,GAAG,+sKAA+sK;;MCkCptK,IAAI;;;;;;;QACP,aAAQ,GAAY,KAAK,CAAC;QAuG1B,kBAAa,GAAG;YACtB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YACpB,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;SACvB,CAAC;QAEM,sBAAiB,GAAG;YAC1B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;SACrB,CAAC;QAEM,sBAAiB,GAAG;YAC1B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;SACtB,CAAC;QAEM,kBAAa,GAAG;YACtB,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAClD,IAAI,SAAS,EAAE;gBACb,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,SAAS,CAAC;gBACjC,MAAM,gBAAgB,GACpB,CAAC,CAAC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EAAE,OAAO,CAAC,IAAI,YAAM,IAAI,EAAC,OAAO,GAAQ,CACvD,CACP,EACD;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-chip/ic-chip.css?tag=ic-chip&encapsulation=shadow","src/components/ic-chip/ic-chip.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: inline-block;\n max-width: 100%;\n}\n\n.chip {\n display: flex;\n padding: var(--ic-space-xxs);\n font-size: 0.875rem;\n border-radius: var(--ic-space-md);\n text-align: left;\n text-decoration: none;\n transition: var(--ic-easing-transition-fast);\n position: relative;\n}\n\n.chip.small {\n padding: var(--ic-space-xxxs);\n border-radius: calc(var(--ic-space-md) - var(--ic-space-xxxs));\n}\n\n.chip.large {\n padding: var(--ic-space-xs);\n border-radius: calc(var(--ic-space-md) + var(--ic-space-xxs));\n}\n\n.label {\n padding: 0 var(--ic-space-xs);\n}\n\n.chip.hovered:not(:focus-within) {\n background-color: var(--ic-architectural-300);\n}\n\n.chip:focus-within {\n box-shadow: var(--ic-border-focus);\n outline: var(--ic-hc-focus-outline);\n z-index: 1;\n}\n\n.chip.outline.hovered:not(:focus-within),\n.chip.outlined.hovered:not(:focus-within) {\n background-color: var(--ic-action-dark-bg-hover);\n}\n\nic-tooltip:focus-within {\n z-index: 1;\n}\n\n.filled {\n background-color: var(--chip-custom-color, var(--ic-architectural-200));\n color: var(--chip-custom-foreground-color, black);\n border: none;\n}\n\n.filled.disabled {\n background-color: var(--ic-architectural-100);\n}\n\n.outline,\n.outlined {\n color: var(--ic-architectural-900);\n border: var(--ic-border-width) solid\n var(--chip-custom-color, var(--ic-architectural-900));\n padding: calc(var(--ic-space-xxs) - var(--ic-space-1px));\n}\n\n.outline.small,\n.outlined.small {\n padding: calc(var(--ic-space-xxxs) - var(--ic-space-1px));\n}\n\n.outline.large,\n.outlined.large {\n padding: calc(var(--ic-space-xs) - var(--ic-space-1px));\n}\n\n.outline.disabled,\n.outlined.disabled {\n border: var(--ic-border-disabled);\n background: none;\n}\n\n.chip.disabled ic-typography {\n color: var(--ic-architectural-500);\n}\n\n.filled.disabled ic-typography {\n color: var(--ic-architectural-600);\n}\n\n.dismiss-icon {\n border: none;\n border-radius: 50%;\n padding: 0;\n background: none;\n cursor: pointer;\n margin: var(--ic-space-xxxs);\n height: calc(var(--ic-space-lg) - var(--ic-space-xxs));\n width: calc(var(--ic-space-lg) - var(--ic-space-xxs));\n}\n\n.dismiss-icon:focus {\n outline: var(--ic-hc-focus-outline);\n}\n\n.dismiss-icon[disabled] {\n pointer-events: none;\n color: var(--ic-architectural-200);\n}\n\n.icon {\n padding: var(--ic-space-xxxs);\n box-sizing: border-box;\n}\n\n.icon,\nic-tooltip {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n.chip.disabled path,\n.chip.disabled ::slotted(svg) {\n fill: var(--ic-architectural-200);\n}\n\n.chip.white-background {\n background-color: var(--ic-architectural-white);\n}\n\n.chip.white-background.hovered:not(:focus-within) {\n background-color: var(--ic-action-dark-bg-hover-no-alpha) !important;\n}\n\n@media (forced-colors: active) {\n .chip {\n border: var(--ic-hc-border);\n }\n\n .filled.small {\n padding: calc(var(--ic-space-xxxs) - var(--ic-space-1px));\n }\n\n .filled {\n padding: calc(var(--ic-space-xxxs) + var(--ic-space-1px));\n }\n\n .filled.large {\n padding: calc(var(--ic-space-xs) - var(--ic-space-1px));\n }\n\n .chip.disabled {\n appearance: none;\n border-color: GrayText;\n }\n\n .chip.disabled ic-typography {\n color: GrayText;\n }\n\n .chip.disabled path,\n .chip.disabled ::slotted(svg) {\n fill: GrayText;\n }\n\n .chip:focus-within {\n outline: none;\n border-color: Highlight;\n }\n}\n","import {\n Component,\n h,\n Prop,\n State,\n Listen,\n Event,\n EventEmitter,\n Element,\n Method,\n Watch,\n} from \"@stencil/core\";\nimport {\n onComponentRequiredPropUndefined,\n isSlotUsed,\n removeDisabledFalse,\n convertToRGBA,\n isElInAGGrid,\n} from \"../../utils/helpers\";\nimport { IcChipAppearance } from \"./ic-chip.types\";\nimport { IcColor, IcEmphasisType, IcSizes } from \"../../utils/types\";\nimport dismissIcon from \"../../assets/dismiss-icon.svg\";\n\n/**\n * @slot icon - Content will be rendered at the start of the chip.\n * @slot badge - Badge component overlaying the top right of the chip.\n */\n@Component({\n tag: \"ic-chip\",\n styleUrl: \"ic-chip.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Chip {\n private inAGGrid: boolean = false;\n\n @Element() el: HTMLIcChipElement;\n\n @State() hovered: boolean = false;\n @State() visible: boolean = true;\n\n /**\n * @deprecated This prop should not be used anymore. Use variant prop instead.\n */\n @Prop() appearance?: IcChipAppearance;\n\n /**\n * The custom chip colour. This prop will be applied to the chip component if `dismissible` is set to `false`.\n * Can be a hex value e.g. \"#ff0000\", RGB e.g. \"rgb(255, 0, 0)\", or RGBA e.g. \"rgba(255, 0, 0, 1)\".\n */\n @Prop() customColor?: IcColor = null;\n\n @Watch(\"customColor\")\n customColorHandler(): void {\n if (!this.dismissible) {\n this.setChipColour();\n }\n }\n\n /**\n * If `true`, the chip will appear disabled.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * If `true`, the chip will have a close button at the end to dismiss it.\n */\n @Prop() dismissible?: boolean = false;\n\n /**\n * The text rendered within the chip.\n */\n @Prop() label!: string;\n\n /**\n * The size of the chip.\n */\n @Prop() size?: IcSizes = \"default\";\n\n /**\n * If `true`, the outlined variant of chip will have a transparent background rather than white.\n */\n @Prop() transparentBackground?: boolean = true;\n\n /**\n * The emphasis of the chip.\n */\n @Prop() variant?: IcEmphasisType = \"filled\";\n\n /**\n * @deprecated This event should not be used anymore. Use icDismiss instead.\n */\n @Event() dismiss: EventEmitter<void>;\n\n /**\n * Is emitted when the user dismisses the chip.\n */\n @Event() icDismiss: EventEmitter<void>;\n\n componentWillLoad(): void {\n removeDisabledFalse(this.disabled, this.el);\n\n if (!this.dismissible) {\n this.setChipColour();\n }\n\n if (this.appearance === \"outline\") {\n this.variant = \"outlined\";\n }\n }\n\n componentWillRender(): void {\n if (isElInAGGrid(this.el)) {\n this.inAGGrid = true;\n }\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Chip\"\n );\n }\n\n @Listen(\"icDismiss\", { capture: true })\n handleClick(): void {\n this.visible = !this.visible;\n }\n\n /**\n * Sets focus on the chip.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.el.shadowRoot.querySelector(\"button\")?.focus();\n }\n\n private dismissAction = (): void => {\n this.dismiss.emit();\n this.icDismiss.emit();\n };\n\n private mouseEnterHandler = (): void => {\n this.hovered = true;\n };\n\n private mouseLeaveHandler = (): void => {\n this.hovered = false;\n };\n\n private setChipColour = () => {\n const colorRGBA = convertToRGBA(this.customColor);\n if (colorRGBA) {\n const { r, g, b, a } = colorRGBA;\n const foregroundColour =\n (r * 299 + g * 587 + b * 114) / 1000 > 133.3505 ? \"black\" : \"white\";\n this.el.setAttribute(\n \"style\",\n `--chip-custom-color: rgba(${r}, ${g}, ${b}, ${a}); --chip-custom-foreground-color: var(--ic-architectural-${foregroundColour})`\n );\n }\n };\n\n render() {\n const {\n label,\n appearance,\n variant,\n size,\n dismissible,\n visible,\n disabled,\n hovered,\n } = this;\n\n return (\n visible && (\n <div\n class={{\n chip: true,\n [`${appearance}`]: appearance !== undefined,\n [`${variant}`]: true,\n [`${size}`]: true,\n disabled,\n dismissible,\n hovered,\n \"white-background\":\n this.variant === \"outlined\" && !this.transparentBackground,\n }}\n >\n {isSlotUsed(this.el, \"icon\") && (\n <div class=\"icon\">\n <slot name=\"icon\" />\n </div>\n )}\n <ic-typography\n variant=\"label\"\n apply-vertical-margins={false}\n class={{ label: true, \"in-ag-grid\": this.inAGGrid }}\n >\n <span>{label}</span>\n </ic-typography>\n {dismissible && (\n <ic-tooltip\n label=\"Dismiss\"\n target=\"dismiss-icon\"\n class={{ \"tooltip-disabled\": disabled }}\n >\n <button\n id=\"dismiss-icon\"\n class=\"dismiss-icon\"\n aria-label={`Dismiss ${label} chip`}\n disabled={disabled}\n tabindex={disabled ? -1 : 0}\n onClick={this.dismissAction}\n onMouseEnter={this.mouseEnterHandler}\n onMouseLeave={this.mouseLeaveHandler}\n innerHTML={dismissIcon}\n ></button>\n </ic-tooltip>\n )}\n {isSlotUsed(this.el, \"badge\") && <slot name=\"badge\"></slot>}\n </div>\n )\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-chip.js","mappings":";;;;;;;;;;AAAA,MAAM,SAAS,GAAG,+sKAA+sK;;MCkCptK,IAAI;;;;;;;QACP,aAAQ,GAAY,KAAK,CAAC;QAgH1B,kBAAa,GAAG;YACtB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YACpB,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;SACvB,CAAC;QAEM,sBAAiB,GAAG;YAC1B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;SACrB,CAAC;QAEM,sBAAiB,GAAG;YAC1B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;SACtB,CAAC;QAEM,kBAAa,GAAG;YACtB,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAClD,IAAI,SAAS,EAAE;gBACb,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,SAAS,CAAC;gBACjC,MAAM,gBAAgB,GACpB,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,IAAI,IAAI,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;gBACtE,IAAI,CAAC,EAAE,CAAC,YAAY,CAClB,OAAO,EACP,6BAA6B,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,6DAA6D,gBAAgB,GAAG,CACjI,CAAC;aACH;SACF,CAAC;uBApI0B,KAAK;uBACL,IA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ip/ic-chip.css?tag=ic-chip&encapsulation=shadow","src/components/ic-chip/ic-chip.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: inline-block;\n max-width: 100%;\n}\n\n.chip {\n display: flex;\n padding: var(--ic-space-xxs);\n font-size: 0.875rem;\n border-radius: var(--ic-space-md);\n text-align: left;\n text-decoration: none;\n transition: var(--ic-easing-transition-fast);\n position: relative;\n}\n\n.chip.small {\n padding: var(--ic-space-xxxs);\n border-radius: calc(var(--ic-space-md) - var(--ic-space-xxxs));\n}\n\n.chip.large {\n padding: var(--ic-space-xs);\n border-radius: calc(var(--ic-space-md) + var(--ic-space-xxs));\n}\n\n.label {\n padding: 0 var(--ic-space-xs);\n}\n\n.chip.hovered:not(:focus-within) {\n background-color: var(--ic-architectural-300);\n}\n\n.chip:focus-within {\n box-shadow: var(--ic-border-focus);\n outline: var(--ic-hc-focus-outline);\n z-index: 1;\n}\n\n.chip.outline.hovered:not(:focus-within),\n.chip.outlined.hovered:not(:focus-within) {\n background-color: var(--ic-action-dark-bg-hover);\n}\n\nic-tooltip:focus-within {\n z-index: 1;\n}\n\n.filled {\n background-color: var(--chip-custom-color, var(--ic-architectural-200));\n color: var(--chip-custom-foreground-color, black);\n border: none;\n}\n\n.filled.disabled {\n background-color: var(--ic-architectural-100);\n}\n\n.outline,\n.outlined {\n color: var(--ic-architectural-900);\n border: var(--ic-border-width) solid\n var(--chip-custom-color, var(--ic-architectural-900));\n padding: calc(var(--ic-space-xxs) - var(--ic-space-1px));\n}\n\n.outline.small,\n.outlined.small {\n padding: calc(var(--ic-space-xxxs) - var(--ic-space-1px));\n}\n\n.outline.large,\n.outlined.large {\n padding: calc(var(--ic-space-xs) - var(--ic-space-1px));\n}\n\n.outline.disabled,\n.outlined.disabled {\n border: var(--ic-border-disabled);\n background: none;\n}\n\n.chip.disabled ic-typography {\n color: var(--ic-architectural-500);\n}\n\n.filled.disabled ic-typography {\n color: var(--ic-architectural-600);\n}\n\n.dismiss-icon {\n border: none;\n border-radius: 50%;\n padding: 0;\n background: none;\n cursor: pointer;\n margin: var(--ic-space-xxxs);\n height: calc(var(--ic-space-lg) - var(--ic-space-xxs));\n width: calc(var(--ic-space-lg) - var(--ic-space-xxs));\n}\n\n.dismiss-icon:focus {\n outline: var(--ic-hc-focus-outline);\n}\n\n.dismiss-icon[disabled] {\n pointer-events: none;\n color: var(--ic-architectural-200);\n}\n\n.icon {\n padding: var(--ic-space-xxxs);\n box-sizing: border-box;\n}\n\n.icon,\nic-tooltip {\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n.chip.disabled path,\n.chip.disabled ::slotted(svg) {\n fill: var(--ic-architectural-200);\n}\n\n.chip.white-background {\n background-color: var(--ic-architectural-white);\n}\n\n.chip.white-background.hovered:not(:focus-within) {\n background-color: var(--ic-action-dark-bg-hover-no-alpha) !important;\n}\n\n@media (forced-colors: active) {\n .chip {\n border: var(--ic-hc-border);\n }\n\n .filled.small {\n padding: calc(var(--ic-space-xxxs) - var(--ic-space-1px));\n }\n\n .filled {\n padding: calc(var(--ic-space-xxxs) + var(--ic-space-1px));\n }\n\n .filled.large {\n padding: calc(var(--ic-space-xs) - var(--ic-space-1px));\n }\n\n .chip.disabled {\n appearance: none;\n border-color: GrayText;\n }\n\n .chip.disabled ic-typography {\n color: GrayText;\n }\n\n .chip.disabled path,\n .chip.disabled ::slotted(svg) {\n fill: GrayText;\n }\n\n .chip:focus-within {\n outline: none;\n border-color: Highlight;\n }\n}\n","import {\n Component,\n h,\n Prop,\n State,\n Listen,\n Event,\n EventEmitter,\n Element,\n Method,\n Watch,\n} from \"@stencil/core\";\nimport {\n onComponentRequiredPropUndefined,\n isSlotUsed,\n removeDisabledFalse,\n convertToRGBA,\n isElInAGGrid,\n} from \"../../utils/helpers\";\nimport { IcChipAppearance } from \"./ic-chip.types\";\nimport { IcColor, IcEmphasisType, IcSizes } from \"../../utils/types\";\nimport dismissIcon from \"../../assets/dismiss-icon.svg\";\n\n/**\n * @slot icon - Content will be rendered at the start of the chip.\n * @slot badge - Badge component overlaying the top right of the chip.\n */\n@Component({\n tag: \"ic-chip\",\n styleUrl: \"ic-chip.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Chip {\n private inAGGrid: boolean = false;\n\n @Element() el: HTMLIcChipElement;\n\n @State() hovered: boolean = false;\n @State() visible: boolean = true;\n\n /**\n * @deprecated This prop should not be used anymore. Use variant prop instead.\n */\n @Prop() appearance?: IcChipAppearance;\n\n /**\n * The custom chip colour. This prop will be applied to the chip component if `dismissible` is set to `false`.\n * Can be a hex value e.g. \"#ff0000\", RGB e.g. \"rgb(255, 0, 0)\", or RGBA e.g. \"rgba(255, 0, 0, 1)\".\n */\n @Prop() customColor?: IcColor = null;\n\n @Watch(\"customColor\")\n customColorHandler(): void {\n if (!this.dismissible) {\n this.setChipColour();\n }\n }\n\n /**\n * If `true`, the chip will appear disabled.\n */\n @Prop() disabled?: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * If `true`, the chip will have a close button at the end to dismiss it.\n */\n @Prop() dismissible?: boolean = false;\n\n /**\n * The text rendered within the chip.\n */\n @Prop() label!: string;\n\n /**\n * The size of the chip.\n */\n @Prop() size?: IcSizes = \"default\";\n\n /**\n * If `true`, the outlined variant of chip will have a transparent background rather than white.\n */\n @Prop() transparentBackground?: boolean = true;\n\n /**\n * The emphasis of the chip.\n */\n @Prop() variant?: IcEmphasisType = \"filled\";\n\n /**\n * The text in the dismiss button tooltip and aria label.\n */\n @Prop() dismissLabel?: string = \"Dismiss\";\n\n /**\n * @deprecated This event should not be used anymore. Use icDismiss instead.\n */\n @Event() dismiss: EventEmitter<void>;\n\n /**\n * Is emitted when the user dismisses the chip.\n */\n @Event() icDismiss: EventEmitter<void>;\n\n componentWillLoad(): void {\n removeDisabledFalse(this.disabled, this.el);\n\n if (!this.dismissible) {\n this.setChipColour();\n }\n\n if (this.appearance === \"outline\") {\n this.variant = \"outlined\";\n }\n }\n\n componentWillRender(): void {\n if (isElInAGGrid(this.el)) {\n this.inAGGrid = true;\n }\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Chip\"\n );\n }\n\n @Listen(\"icDismiss\", { capture: true })\n handleClick(): void {\n this.visible = !this.visible;\n }\n\n /**\n * Sets focus on the chip.\n */\n @Method()\n async setFocus(): Promise<void> {\n this.el.shadowRoot.querySelector(\"button\")?.focus();\n }\n\n private dismissAction = (): void => {\n this.dismiss.emit();\n this.icDismiss.emit();\n };\n\n private mouseEnterHandler = (): void => {\n this.hovered = true;\n };\n\n private mouseLeaveHandler = (): void => {\n this.hovered = false;\n };\n\n private setChipColour = () => {\n const colorRGBA = convertToRGBA(this.customColor);\n if (colorRGBA) {\n const { r, g, b, a } = colorRGBA;\n const foregroundColour =\n (r * 299 + g * 587 + b * 114) / 1000 > 133.3505 ? \"black\" : \"white\";\n this.el.setAttribute(\n \"style\",\n `--chip-custom-color: rgba(${r}, ${g}, ${b}, ${a}); --chip-custom-foreground-color: var(--ic-architectural-${foregroundColour})`\n );\n }\n };\n\n render() {\n const {\n label,\n appearance,\n variant,\n size,\n dismissible,\n visible,\n disabled,\n hovered,\n dismissLabel,\n } = this;\n\n return (\n visible && (\n <div\n class={{\n chip: true,\n [`${appearance}`]: appearance !== undefined,\n [`${variant}`]: true,\n [`${size}`]: true,\n disabled,\n dismissible,\n hovered,\n \"white-background\":\n this.variant === \"outlined\" && !this.transparentBackground,\n }}\n >\n {isSlotUsed(this.el, \"icon\") && (\n <div class=\"icon\">\n <slot name=\"icon\" />\n </div>\n )}\n <ic-typography\n variant=\"label\"\n apply-vertical-margins={false}\n class={{ label: true, \"in-ag-grid\": this.inAGGrid }}\n >\n <span>{label}</span>\n </ic-typography>\n {dismissible && (\n <ic-tooltip\n label={dismissLabel}\n target=\"dismiss-icon\"\n class={{ \"tooltip-disabled\": disabled }}\n >\n <button\n id=\"dismiss-icon\"\n class=\"dismiss-icon\"\n aria-label={`${dismissLabel} ${label} chip`}\n disabled={disabled}\n tabindex={disabled ? -1 : 0}\n onClick={this.dismissAction}\n onMouseEnter={this.mouseEnterHandler}\n onMouseLeave={this.mouseLeaveHandler}\n innerHTML={dismissIcon}\n ></button>\n </ic-tooltip>\n )}\n {isSlotUsed(this.el, \"badge\") && <slot name=\"badge\"></slot>}\n </div>\n )\n );\n }\n}\n"],"version":3}
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, forceUpdate, h, Host } from '@stencil/core/internal/client';
2
2
  import { a as IcInformationStatus } from './types.js';
3
- import { f as checkSlotInChildMutations, C as slotHasContent, B as successIcon } from './helpers.js';
3
+ import { f as checkSlotInChildMutations, r as removeDisabledFalse, C as slotHasContent, B as successIcon } from './helpers.js';
4
4
 
5
5
  const icInputComponentContainerCss = "ic-input-component-container{display:flex;border:var(--ic-border-width) solid\n var(--border-color, var(--ic-architectural-400));border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-slow);height:2.5rem;width:var(--input-width, 20rem);padding:var(--ic-space-1px);background-color:var(--ic-architectural-white);box-sizing:border-box;fill:var(--ic-architectural-400);outline:none}ic-input-component-container.fullwidth{width:100%}ic-input-component-container.disabled,ic-input-component-container.disabled:hover{border:var(--ic-border-width) dashed var(--ic-architectural-200)}ic-input-component-container.readonly,ic-input-component-container.readonly:hover{border:none;padding:0}ic-input-component-container.error{border:var(--ic-error-border-default);padding:0}ic-input-component-container.error:hover{border:var(--ic-error-border-hover)}ic-input-component-container.error:focus-within{border:var(--ic-error-border-pressed)}ic-input-component-container.warning{border:var(--ic-warning-border-default);padding:0}ic-input-component-container.warning:hover{border:var(--ic-warning-border-hover)}ic-input-component-container.warning:focus-within{border:var(--ic-warning-border-pressed)}ic-input-component-container.success{border:var(--ic-success-border-default);padding:0}ic-input-component-container.success:hover{border:var(--ic-success-border-hover)}ic-input-component-container.success:focus-within{border:var(--ic-success-border-pressed)}ic-input-component-container.small{height:var(--ic-space-xl)}ic-input-component-container.large{height:var(--ic-space-xxl)}ic-input-component-container.multiline{height:auto}ic-input-component-container .icon-container{margin-top:var(--ic-space-xxs);margin-left:0.438rem;display:flex;align-items:center}ic-input-component-container.multiline .icon-container,ic-input-component-container.multiline.small .icon-container{margin-top:0.375rem;display:block}ic-input-component-container.readonly .icon-container{margin-left:-0.313rem}ic-input-component-container.disabled ::-moz-placeholder{display:none}ic-input-component-container.disabled ::placeholder{display:none}ic-input-component-container .inline-success{margin:var(--ic-space-xs) 0.375rem;display:flex;align-items:center}ic-input-component-container.dark:hover{--border-color:var(--ic-architectural-400)}ic-input-component-container .inline-success>svg{fill:var(--ic-status-success);height:1.25rem;width:1.25rem}ic-input-component-container:hover{border:var(--ic-border-hover);color:var(--ic-action-dark-hover)}ic-input-component-container:focus{border:var(--ic-border-pressed)}.focus-indicator{display:flex;width:100%;margin:-0.125rem;padding:0.125rem;border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-fast)}.focus-indicator:focus-within,.focus-indicator-enabled{box-shadow:var(--ic-border-focus)}.focus-indicator.dark:focus-within{box-shadow:var(--ic-border-focus)}@media (forced-colors: active){ic-input-component-container,.focus-indicator{transition:none}ic-input-component-container:focus-within{border:var(--ic-border-width) solid Highlight;outline:0.125rem solid Highlight}ic-input-component-container.disabled,ic-input-component-container.disabled:hover{border:var(--ic-border-width) dashed GrayText}}";
6
6
 
@@ -26,6 +26,12 @@ const InputComponentContainer = /*@__PURE__*/ proxyCustomElement(class InputComp
26
26
  this.validationInline = false;
27
27
  this.validationStatus = "";
28
28
  }
29
+ watchDisabledHandler() {
30
+ removeDisabledFalse(this.disabled, this.el);
31
+ }
32
+ componentWillLoad() {
33
+ removeDisabledFalse(this.disabled, this.el);
34
+ }
29
35
  componentDidLoad() {
30
36
  this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);
31
37
  this.hostMutationObserver.observe(this.el, { childList: true });
@@ -44,7 +50,7 @@ const InputComponentContainer = /*@__PURE__*/ proxyCustomElement(class InputComp
44
50
  ["multiline"]: multiLine,
45
51
  ["fullwidth"]: fullWidth,
46
52
  ["dark"]: dark || appearance === "dark",
47
- }, "aria-disabled": disabled && `${disabled}` }, h("div", { class: {
53
+ }, "aria-disabled": disabled ? "true" : null }, h("div", { class: {
48
54
  "focus-indicator": true,
49
55
  dark: dark || appearance === "dark",
50
56
  } }, slotHasContent(this.el, "left-icon") && (h("div", { class: {
@@ -55,6 +61,9 @@ const InputComponentContainer = /*@__PURE__*/ proxyCustomElement(class InputComp
55
61
  }, innerHTML: successIcon })))));
56
62
  }
57
63
  get el() { return this; }
64
+ static get watchers() { return {
65
+ "disabled": ["watchDisabledHandler"]
66
+ }; }
58
67
  static get style() { return icInputComponentContainerCss; }
59
68
  }, [4, "ic-input-component-container", {
60
69
  "appearance": [1],
@@ -67,6 +76,8 @@ const InputComponentContainer = /*@__PURE__*/ proxyCustomElement(class InputComp
67
76
  "small": [4],
68
77
  "validationInline": [4, "validation-inline"],
69
78
  "validationStatus": [1, "validation-status"]
79
+ }, undefined, {
80
+ "disabled": ["watchDisabledHandler"]
70
81
  }]);
71
82
  function defineCustomElement() {
72
83
  if (typeof customElements === "undefined") {
@@ -1 +1 @@
1
- {"file":"ic-input-component-container2.js","mappings":";;;;AAAA,MAAM,4BAA4B,GAAG,2rGAA2rG;;MCiBntG,uBAAuB;;;;QA2D1B,yBAAoB,GAAG,CAAC,YAA8B;YAC5D,IACE,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,KACnD,IAAI,KAAK,WAAW;kBAChB,yBAAyB,CAAC,UAAU,EAAE,YAAY,EAAE,WAAW,CAAC;kBAChE,KAAK,CACV,EACD;gBACA,WAAW,CAAC,IAAI,CAAC,CAAC;aACnB;SACF,CAAC;0BA9DwC,SAAS;oBAK1B,KAAK;wBAKF,KAAK;yBAKJ,KAAK;yBAKL,KAAK;wBAKN,KAAK;oBAKR,SAAS;qB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ACf,gBAAgB,KAAK,mBAAmB,CAAC,OAAO,KAC9C,YACE,KAAK,EAAE;gBACL,CAAC,gBAAgB,GAAG,IAAI;aACzB,EACD,SAAS,EAAE,WAAW,GACtB,CACH,CACC,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-input-component-container/ic-input-component-container.css?tag=ic-input-component-container","src/components/ic-input-component-container/ic-input-component-container.tsx"],"sourcesContent":["ic-input-component-container {\n /**\n * @prop --border-color: Border colour of the input component container\n */\n\n display: flex;\n border: var(--ic-border-width) solid\n var(--border-color, var(--ic-architectural-400));\n border-radius: var(--ic-border-radius);\n transition: var(--ic-easing-transition-slow);\n height: 2.5rem;\n width: var(--input-width, 20rem);\n padding: var(--ic-space-1px);\n background-color: var(--ic-architectural-white);\n box-sizing: border-box;\n fill: var(--ic-architectural-400);\n outline: none;\n}\n\nic-input-component-container.fullwidth {\n width: 100%;\n}\n\nic-input-component-container.disabled,\nic-input-component-container.disabled:hover {\n border: var(--ic-border-width) dashed var(--ic-architectural-200);\n}\n\nic-input-component-container.readonly,\nic-input-component-container.readonly:hover {\n border: none;\n padding: 0;\n}\n\nic-input-component-container.error {\n border: var(--ic-error-border-default);\n padding: 0;\n}\n\nic-input-component-container.error:hover {\n border: var(--ic-error-border-hover);\n}\n\nic-input-component-container.error:focus-within {\n border: var(--ic-error-border-pressed);\n}\n\nic-input-component-container.warning {\n border: var(--ic-warning-border-default);\n padding: 0;\n}\n\nic-input-component-container.warning:hover {\n border: var(--ic-warning-border-hover);\n}\n\nic-input-component-container.warning:focus-within {\n border: var(--ic-warning-border-pressed);\n}\n\nic-input-component-container.success {\n border: var(--ic-success-border-default);\n padding: 0;\n}\n\nic-input-component-container.success:hover {\n border: var(--ic-success-border-hover);\n}\n\nic-input-component-container.success:focus-within {\n border: var(--ic-success-border-pressed);\n}\n\nic-input-component-container.small {\n height: var(--ic-space-xl);\n}\n\nic-input-component-container.large {\n height: var(--ic-space-xxl);\n}\n\nic-input-component-container.multiline {\n height: auto;\n}\n\nic-input-component-container .icon-container {\n margin-top: var(--ic-space-xxs);\n margin-left: 0.438rem;\n display: flex;\n align-items: center;\n}\n\nic-input-component-container.multiline .icon-container,\nic-input-component-container.multiline.small .icon-container {\n margin-top: 0.375rem;\n display: block;\n}\n\nic-input-component-container.readonly .icon-container {\n margin-left: -0.313rem;\n}\n\nic-input-component-container.disabled ::placeholder {\n display: none;\n}\n\nic-input-component-container .inline-success {\n margin: var(--ic-space-xs) 0.375rem;\n display: flex;\n align-items: center;\n}\n\nic-input-component-container.dark:hover {\n --border-color: var(--ic-architectural-400);\n}\n\nic-input-component-container .inline-success > svg {\n fill: var(--ic-status-success);\n height: 1.25rem;\n width: 1.25rem;\n}\n\nic-input-component-container:hover {\n border: var(--ic-border-hover);\n color: var(--ic-action-dark-hover);\n}\n\nic-input-component-container:focus {\n border: var(--ic-border-pressed);\n}\n\n.focus-indicator {\n display: flex;\n width: 100%;\n margin: -0.125rem;\n padding: 0.125rem;\n border-radius: var(--ic-border-radius);\n transition: var(--ic-easing-transition-fast);\n}\n\n.focus-indicator:focus-within,\n.focus-indicator-enabled {\n box-shadow: var(--ic-border-focus);\n}\n\n.focus-indicator.dark:focus-within {\n box-shadow: var(--ic-border-focus);\n}\n\n@media (forced-colors: active) {\n /* Styles here only apply to Forced Colors Mode */\n ic-input-component-container,\n .focus-indicator {\n transition: none;\n }\n\n ic-input-component-container:focus-within {\n border: var(--ic-border-width) solid Highlight;\n outline: 0.125rem solid Highlight;\n }\n\n ic-input-component-container.disabled,\n ic-input-component-container.disabled:hover {\n border: var(--ic-border-width) dashed GrayText;\n }\n}\n","import { Component, Element, Host, Prop, forceUpdate, h } from \"@stencil/core\";\n\nimport {\n IcInformationStatus,\n IcInformationStatusOrEmpty,\n IcSizes,\n} from \"../../utils/types\";\nimport successIcon from \"../../assets/success-icon.svg\";\nimport { checkSlotInChildMutations, slotHasContent } from \"../../utils/helpers\";\n\n/**\n * @slot left-icon - Content will be placed to the left of the input.\n */\n@Component({\n tag: \"ic-input-component-container\",\n styleUrl: \"ic-input-component-container.css\",\n})\nexport class InputComponentContainer {\n private hostMutationObserver: MutationObserver;\n @Element() el: HTMLIcInputComponentContainerElement;\n\n /**\n * The appearance of the input component container.\n */\n @Prop() appearance?: \"dark\" | \"default\" = \"default\";\n\n /**\n * @deprecated This prop should not be used anymore. Set prop `appearance` to \"dark\" instead.\n */\n @Prop() dark?: boolean = false;\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * If `true`, the input component container will fill the width of the container it is in.\n */\n @Prop() fullWidth: boolean = false;\n\n /**\n * If `true`, the input component container will allow for multiple lines.\n */\n @Prop() multiLine: boolean = false;\n\n /**\n * If `true`, the readonly state will be set.\n */\n @Prop() readonly: boolean = false;\n\n /**\n * The size of the input component container component.\n */\n @Prop() size?: IcSizes = \"default\";\n\n /**\n * @deprecated This prop should not be used anymore. Set prop `size` to \"small\" instead.\n */\n @Prop() small?: boolean = false;\n\n /**\n * If `true`, the validation will display inline.\n */\n @Prop() validationInline: boolean = false;\n\n /**\n * The validation status of the input component container - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n componentDidLoad(): void {\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, { childList: true });\n }\n\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n if (\n mutationList.some(({ type, addedNodes, removedNodes }) =>\n type === \"childList\"\n ? checkSlotInChildMutations(addedNodes, removedNodes, \"left-icon\")\n : false\n )\n ) {\n forceUpdate(this);\n }\n };\n\n render() {\n const {\n size,\n small,\n validationStatus,\n disabled,\n readonly,\n multiLine,\n fullWidth,\n dark,\n appearance,\n validationInline,\n } = this;\n const hasValidationStatus =\n this.validationStatus !== \"\" && !this.disabled && !this.readonly\n ? true\n : false;\n\n return (\n <Host\n class={{\n small: small,\n [`${size}`]: true,\n [validationStatus]: hasValidationStatus,\n disabled: disabled,\n readonly: readonly,\n [\"multiline\"]: multiLine,\n [\"fullwidth\"]: fullWidth,\n [\"dark\"]: dark || appearance === \"dark\",\n }}\n aria-disabled={disabled && `${disabled}`}\n >\n <div\n class={{\n \"focus-indicator\": true,\n dark: dark || appearance === \"dark\",\n }}\n >\n {slotHasContent(this.el, \"left-icon\") && (\n <div\n class={{\n [\"icon-container\"]: true,\n }}\n >\n <slot name=\"left-icon\" />\n </div>\n )}\n <slot></slot>\n\n {validationInline &&\n validationStatus === IcInformationStatus.Success && (\n <span\n class={{\n [\"inline-success\"]: true,\n }}\n innerHTML={successIcon}\n />\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-input-component-container2.js","mappings":";;;;AAAA,MAAM,4BAA4B,GAAG,2rGAA2rG;;MC6BntG,uBAAuB;;;;QAmE1B,yBAAoB,GAAG,CAAC,YAA8B;YAC5D,IACE,YAAY,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,KACnD,IAAI,KAAK,WAAW;kBAChB,yBAAyB,CAAC,UAAU,EAAE,YAAY,EAAE,WAAW,CAAC;kBAChE,KAAK,CACV,EACD;gBACA,WAAW,CAAC,IAAI,CAAC,CAAC;aACnB;SACF,CAAC;0BAtEwC,SAAS;oBAK1B,KAAK;wBAKF,KAAK;yBASJ,KAAK;yBAKL,KAAK;wBAKN,KAAK;oBAKR,SAAS;qBAKR,KAAK;gCAKK,KAAK;gCAKc,EAAE;;IArCzD,oBAAoB;QAClB,mBAAmB,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;KAC7C;IAqCD,iBAAiB;QACf,mBAAmB,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;KAC7C;IAED,gBAAgB;QACd,IAAI,CAAC,oBAAoB,GAAG,IAAI,gBAAgB,CAAC,IAAI,C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AAE,WAAW,GACtB,CACH,CACC,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-input-component-container/ic-input-component-container.css?tag=ic-input-component-container","src/components/ic-input-component-container/ic-input-component-container.tsx"],"sourcesContent":["ic-input-component-container {\n /**\n * @prop --border-color: Border colour of the input component container\n */\n\n display: flex;\n border: var(--ic-border-width) solid\n var(--border-color, var(--ic-architectural-400));\n border-radius: var(--ic-border-radius);\n transition: var(--ic-easing-transition-slow);\n height: 2.5rem;\n width: var(--input-width, 20rem);\n padding: var(--ic-space-1px);\n background-color: var(--ic-architectural-white);\n box-sizing: border-box;\n fill: var(--ic-architectural-400);\n outline: none;\n}\n\nic-input-component-container.fullwidth {\n width: 100%;\n}\n\nic-input-component-container.disabled,\nic-input-component-container.disabled:hover {\n border: var(--ic-border-width) dashed var(--ic-architectural-200);\n}\n\nic-input-component-container.readonly,\nic-input-component-container.readonly:hover {\n border: none;\n padding: 0;\n}\n\nic-input-component-container.error {\n border: var(--ic-error-border-default);\n padding: 0;\n}\n\nic-input-component-container.error:hover {\n border: var(--ic-error-border-hover);\n}\n\nic-input-component-container.error:focus-within {\n border: var(--ic-error-border-pressed);\n}\n\nic-input-component-container.warning {\n border: var(--ic-warning-border-default);\n padding: 0;\n}\n\nic-input-component-container.warning:hover {\n border: var(--ic-warning-border-hover);\n}\n\nic-input-component-container.warning:focus-within {\n border: var(--ic-warning-border-pressed);\n}\n\nic-input-component-container.success {\n border: var(--ic-success-border-default);\n padding: 0;\n}\n\nic-input-component-container.success:hover {\n border: var(--ic-success-border-hover);\n}\n\nic-input-component-container.success:focus-within {\n border: var(--ic-success-border-pressed);\n}\n\nic-input-component-container.small {\n height: var(--ic-space-xl);\n}\n\nic-input-component-container.large {\n height: var(--ic-space-xxl);\n}\n\nic-input-component-container.multiline {\n height: auto;\n}\n\nic-input-component-container .icon-container {\n margin-top: var(--ic-space-xxs);\n margin-left: 0.438rem;\n display: flex;\n align-items: center;\n}\n\nic-input-component-container.multiline .icon-container,\nic-input-component-container.multiline.small .icon-container {\n margin-top: 0.375rem;\n display: block;\n}\n\nic-input-component-container.readonly .icon-container {\n margin-left: -0.313rem;\n}\n\nic-input-component-container.disabled ::placeholder {\n display: none;\n}\n\nic-input-component-container .inline-success {\n margin: var(--ic-space-xs) 0.375rem;\n display: flex;\n align-items: center;\n}\n\nic-input-component-container.dark:hover {\n --border-color: var(--ic-architectural-400);\n}\n\nic-input-component-container .inline-success > svg {\n fill: var(--ic-status-success);\n height: 1.25rem;\n width: 1.25rem;\n}\n\nic-input-component-container:hover {\n border: var(--ic-border-hover);\n color: var(--ic-action-dark-hover);\n}\n\nic-input-component-container:focus {\n border: var(--ic-border-pressed);\n}\n\n.focus-indicator {\n display: flex;\n width: 100%;\n margin: -0.125rem;\n padding: 0.125rem;\n border-radius: var(--ic-border-radius);\n transition: var(--ic-easing-transition-fast);\n}\n\n.focus-indicator:focus-within,\n.focus-indicator-enabled {\n box-shadow: var(--ic-border-focus);\n}\n\n.focus-indicator.dark:focus-within {\n box-shadow: var(--ic-border-focus);\n}\n\n@media (forced-colors: active) {\n /* Styles here only apply to Forced Colors Mode */\n ic-input-component-container,\n .focus-indicator {\n transition: none;\n }\n\n ic-input-component-container:focus-within {\n border: var(--ic-border-width) solid Highlight;\n outline: 0.125rem solid Highlight;\n }\n\n ic-input-component-container.disabled,\n ic-input-component-container.disabled:hover {\n border: var(--ic-border-width) dashed GrayText;\n }\n}\n","import {\n Component,\n Element,\n Host,\n Prop,\n Watch,\n forceUpdate,\n h,\n} from \"@stencil/core\";\n\nimport {\n IcInformationStatus,\n IcInformationStatusOrEmpty,\n IcSizes,\n} from \"../../utils/types\";\nimport successIcon from \"../../assets/success-icon.svg\";\nimport {\n checkSlotInChildMutations,\n removeDisabledFalse,\n slotHasContent,\n} from \"../../utils/helpers\";\n\n/**\n * @slot left-icon - Content will be placed to the left of the input.\n */\n@Component({\n tag: \"ic-input-component-container\",\n styleUrl: \"ic-input-component-container.css\",\n})\nexport class InputComponentContainer {\n private hostMutationObserver: MutationObserver;\n @Element() el: HTMLIcInputComponentContainerElement;\n\n /**\n * The appearance of the input component container.\n */\n @Prop() appearance?: \"dark\" | \"default\" = \"default\";\n\n /**\n * @deprecated This prop should not be used anymore. Set prop `appearance` to \"dark\" instead.\n */\n @Prop() dark?: boolean = false;\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * If `true`, the input component container will fill the width of the container it is in.\n */\n @Prop() fullWidth: boolean = false;\n\n /**\n * If `true`, the input component container will allow for multiple lines.\n */\n @Prop() multiLine: boolean = false;\n\n /**\n * If `true`, the readonly state will be set.\n */\n @Prop() readonly: boolean = false;\n\n /**\n * The size of the input component container component.\n */\n @Prop() size?: IcSizes = \"default\";\n\n /**\n * @deprecated This prop should not be used anymore. Set prop `size` to \"small\" instead.\n */\n @Prop() small?: boolean = false;\n\n /**\n * If `true`, the validation will display inline.\n */\n @Prop() validationInline: boolean = false;\n\n /**\n * The validation status of the input component container - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n componentWillLoad(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, { childList: true });\n }\n\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n if (\n mutationList.some(({ type, addedNodes, removedNodes }) =>\n type === \"childList\"\n ? checkSlotInChildMutations(addedNodes, removedNodes, \"left-icon\")\n : false\n )\n ) {\n forceUpdate(this);\n }\n };\n\n render() {\n const {\n size,\n small,\n validationStatus,\n disabled,\n readonly,\n multiLine,\n fullWidth,\n dark,\n appearance,\n validationInline,\n } = this;\n const hasValidationStatus =\n this.validationStatus !== \"\" && !this.disabled && !this.readonly\n ? true\n : false;\n\n return (\n <Host\n class={{\n small: small,\n [`${size}`]: true,\n [validationStatus]: hasValidationStatus,\n disabled: disabled,\n readonly: readonly,\n [\"multiline\"]: multiLine,\n [\"fullwidth\"]: fullWidth,\n [\"dark\"]: dark || appearance === \"dark\",\n }}\n aria-disabled={disabled ? \"true\" : null}\n >\n <div\n class={{\n \"focus-indicator\": true,\n dark: dark || appearance === \"dark\",\n }}\n >\n {slotHasContent(this.el, \"left-icon\") && (\n <div\n class={{\n [\"icon-container\"]: true,\n }}\n >\n <slot name=\"left-icon\" />\n </div>\n )}\n <slot></slot>\n\n {validationInline &&\n validationStatus === IcInformationStatus.Success && (\n <span\n class={{\n [\"inline-success\"]: true,\n }}\n innerHTML={successIcon}\n />\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -70,6 +70,9 @@ const MenuItem = /*@__PURE__*/ proxyCustomElement(class MenuItem extends HTMLEle
70
70
  this.toggleChecked = false;
71
71
  this.variant = "default";
72
72
  }
73
+ watchDisabledHandler() {
74
+ removeDisabledFalse(this.disabled, this.el);
75
+ }
73
76
  componentWillLoad() {
74
77
  // This ensures that trigger menu items are always set to the default variant
75
78
  if (isPropDefined(this.submenuTriggerFor) && this.variant !== "default") {
@@ -106,6 +109,9 @@ const MenuItem = /*@__PURE__*/ proxyCustomElement(class MenuItem extends HTMLEle
106
109
  }
107
110
  static get delegatesFocus() { return true; }
108
111
  get el() { return this; }
112
+ static get watchers() { return {
113
+ "disabled": ["watchDisabledHandler"]
114
+ }; }
109
115
  static get style() { return icMenuItemCss; }
110
116
  }, [17, "ic-menu-item", {
111
117
  "description": [1],
@@ -120,7 +126,9 @@ const MenuItem = /*@__PURE__*/ proxyCustomElement(class MenuItem extends HTMLEle
120
126
  "target": [1],
121
127
  "toggleChecked": [1540, "toggle-checked"],
122
128
  "variant": [1537]
123
- }, [[2, "click", "handleHostClick"]]]);
129
+ }, [[2, "click", "handleHostClick"]], {
130
+ "disabled": ["watchDisabledHandler"]
131
+ }]);
124
132
  function defineCustomElement() {
125
133
  if (typeof customElements === "undefined") {
126
134
  return;