@ukic/web-components 3.0.0-alpha.6 → 3.0.0-alpha.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (385) hide show
  1. package/README.md +4 -4
  2. package/dist/cjs/core.cjs.js +1 -1
  3. package/dist/cjs/{helpers-dd569d97.js → helpers-8ca38600.js} +24 -1
  4. package/dist/cjs/helpers-8ca38600.js.map +1 -0
  5. package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
  6. package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
  7. package/dist/cjs/ic-alert.cjs.entry.js +2 -9
  8. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  9. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  10. package/dist/cjs/ic-badge.cjs.entry.js +1 -1
  11. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  12. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  13. package/dist/cjs/ic-button_3.cjs.entry.js +1 -1
  14. package/dist/cjs/ic-card-vertical.cjs.entry.js +12 -19
  15. package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
  17. package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
  18. package/dist/cjs/ic-chip.cjs.entry.js +1 -1
  19. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  20. package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
  21. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  22. package/dist/cjs/ic-empty-state.cjs.entry.js +2 -12
  23. package/dist/cjs/ic-empty-state.cjs.entry.js.map +1 -1
  24. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  25. package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
  26. package/dist/cjs/ic-footer.cjs.entry.js +18 -7
  27. package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
  28. package/dist/cjs/ic-hero.cjs.entry.js +2 -9
  29. package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
  30. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
  31. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +27 -21
  32. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  33. package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
  34. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  35. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  36. package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
  37. package/dist/cjs/ic-navigation-button.cjs.entry.js +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 +1 -1
  43. package/dist/cjs/ic-pagination.cjs.entry.js +1 -1
  44. package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
  45. package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
  46. package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
  47. package/dist/cjs/ic-search-bar.cjs.entry.js +32 -28
  48. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  49. package/dist/cjs/ic-select.cjs.entry.js +44 -32
  50. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  51. package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
  52. package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
  53. package/dist/cjs/ic-step.cjs.entry.js +1 -1
  54. package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
  55. package/dist/cjs/ic-switch.cjs.entry.js +1 -1
  56. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  57. package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
  58. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  59. package/dist/cjs/ic-text-field.cjs.entry.js +10 -8
  60. package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
  61. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  62. package/dist/cjs/ic-toast.cjs.entry.js +1 -1
  63. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +27 -11
  64. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
  65. package/dist/cjs/ic-toggle-button.cjs.entry.js +51 -5
  66. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  67. package/dist/cjs/ic-top-navigation.cjs.entry.js +2 -2
  68. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  69. package/dist/cjs/ic-typography.cjs.entry.js +1 -1
  70. package/dist/cjs/index-f982899d.js +4 -4
  71. package/dist/cjs/loader.cjs.js +1 -1
  72. package/dist/collection/ag-theme-icds.css +32 -31
  73. package/dist/collection/components/ic-alert/ic-alert.js +3 -10
  74. package/dist/collection/components/ic-alert/ic-alert.js.map +1 -1
  75. package/dist/collection/components/ic-alert/test/basic/ic-alert.spec.js +21 -3
  76. package/dist/collection/components/ic-alert/test/basic/ic-alert.spec.js.map +1 -1
  77. package/dist/collection/components/ic-card-vertical/ic-card-vertical.js +13 -20
  78. package/dist/collection/components/ic-card-vertical/ic-card-vertical.js.map +1 -1
  79. package/dist/collection/components/ic-card-vertical/test/basic/ic-card-vertical.spec.js +34 -3
  80. package/dist/collection/components/ic-card-vertical/test/basic/ic-card-vertical.spec.js.map +1 -1
  81. package/dist/collection/components/ic-empty-state/ic-empty-state.js +3 -13
  82. package/dist/collection/components/ic-empty-state/ic-empty-state.js.map +1 -1
  83. package/dist/collection/components/ic-footer/ic-footer.js +18 -7
  84. package/dist/collection/components/ic-footer/ic-footer.js.map +1 -1
  85. package/dist/collection/components/ic-footer/test/basic/ic-footer.spec.js +41 -0
  86. package/dist/collection/components/ic-footer/test/basic/ic-footer.spec.js.map +1 -1
  87. package/dist/collection/components/ic-hero/ic-hero.js +3 -10
  88. package/dist/collection/components/ic-hero/ic-hero.js.map +1 -1
  89. package/dist/collection/components/ic-hero/test/basic/ic-hero.spec.js +21 -3
  90. package/dist/collection/components/ic-hero/test/basic/ic-hero.spec.js.map +1 -1
  91. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +3 -10
  92. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js.map +1 -1
  93. package/dist/collection/components/ic-input-component-container/test/basic/ic-input-component-container.spec.js +21 -3
  94. package/dist/collection/components/ic-input-component-container/test/basic/ic-input-component-container.spec.js.map +1 -1
  95. package/dist/collection/components/ic-menu/ic-menu.css +6 -0
  96. package/dist/collection/components/ic-menu/ic-menu.js +38 -11
  97. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  98. package/dist/collection/components/ic-menu/test/basic/ic-menu.spec.js +9 -9
  99. package/dist/collection/components/ic-menu/test/basic/ic-menu.spec.js.map +1 -1
  100. package/dist/collection/components/ic-search-bar/ic-search-bar.css +66 -4
  101. package/dist/collection/components/ic-search-bar/ic-search-bar.js +53 -28
  102. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  103. package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.spec.js +59 -93
  104. package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.spec.js.map +1 -1
  105. package/dist/collection/components/ic-select/ic-select.js +46 -34
  106. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  107. package/dist/collection/components/ic-select/test/basic/ic-select.spec.js +64 -0
  108. package/dist/collection/components/ic-select/test/basic/ic-select.spec.js.map +1 -1
  109. package/dist/collection/components/ic-text-field/ic-text-field.js +16 -9
  110. package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
  111. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +68 -15
  112. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js.map +1 -1
  113. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +33 -9
  114. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js.map +1 -1
  115. package/dist/collection/components/ic-toggle-button-group/test/ic-toggle-button-group.spec.js +79 -14
  116. package/dist/collection/components/ic-toggle-button-group/test/ic-toggle-button-group.spec.js.map +1 -1
  117. package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +4 -0
  118. package/dist/collection/testspec.setup.js +14 -0
  119. package/dist/collection/testspec.setup.js.map +1 -1
  120. package/dist/collection/utils/helpers.js +20 -0
  121. package/dist/collection/utils/helpers.js.map +1 -1
  122. package/dist/collection/utils/types.js.map +1 -1
  123. package/dist/components/helpers.js +22 -1
  124. package/dist/components/helpers.js.map +1 -1
  125. package/dist/components/ic-alert.js +3 -10
  126. package/dist/components/ic-alert.js.map +1 -1
  127. package/dist/components/ic-card-vertical.js +13 -20
  128. package/dist/components/ic-card-vertical.js.map +1 -1
  129. package/dist/components/ic-empty-state.js +3 -13
  130. package/dist/components/ic-empty-state.js.map +1 -1
  131. package/dist/components/ic-footer.js +18 -7
  132. package/dist/components/ic-footer.js.map +1 -1
  133. package/dist/components/ic-hero.js +3 -10
  134. package/dist/components/ic-hero.js.map +1 -1
  135. package/dist/components/ic-input-component-container2.js +3 -10
  136. package/dist/components/ic-input-component-container2.js.map +1 -1
  137. package/dist/components/ic-menu2.js +25 -12
  138. package/dist/components/ic-menu2.js.map +1 -1
  139. package/dist/components/ic-search-bar.js +46 -53
  140. package/dist/components/ic-search-bar.js.map +1 -1
  141. package/dist/components/ic-select.js +45 -33
  142. package/dist/components/ic-select.js.map +1 -1
  143. package/dist/components/ic-side-navigation.js +1 -1
  144. package/dist/components/ic-stepper.js +1 -1
  145. package/dist/components/ic-text-field.js +371 -1
  146. package/dist/components/ic-text-field.js.map +1 -1
  147. package/dist/components/ic-theme.js +1 -1
  148. package/dist/components/ic-toggle-button-group.js +31 -11
  149. package/dist/components/ic-toggle-button-group.js.map +1 -1
  150. package/dist/components/ic-toggle-button.js +58 -12
  151. package/dist/components/ic-toggle-button.js.map +1 -1
  152. package/dist/components/ic-top-navigation.js +2 -2
  153. package/dist/components/ic-top-navigation.js.map +1 -1
  154. package/dist/core/ag-theme-icds.css +32 -31
  155. package/dist/core/core.css +15 -3
  156. package/dist/core/core.esm.js +1 -1
  157. package/dist/core/core.esm.js.map +1 -1
  158. package/dist/core/{p-bc7b8a1e.entry.js → p-076c3140.entry.js} +2 -2
  159. package/dist/core/p-08ff51ff.entry.js +2 -0
  160. package/dist/core/p-08ff51ff.entry.js.map +1 -0
  161. package/dist/core/{p-b5439baa.entry.js → p-229523bc.entry.js} +2 -2
  162. package/dist/core/p-2392b3ef.js +2 -0
  163. package/dist/core/p-2392b3ef.js.map +1 -0
  164. package/dist/core/p-28af4d8a.entry.js +2 -0
  165. package/dist/core/p-28af4d8a.entry.js.map +1 -0
  166. package/dist/core/p-333d1e79.entry.js +2 -0
  167. package/dist/core/p-333d1e79.entry.js.map +1 -0
  168. package/dist/core/p-3a1a7524.entry.js +2 -0
  169. package/dist/core/{p-cfe32b37.entry.js.map → p-3a1a7524.entry.js.map} +1 -1
  170. package/dist/core/{p-a23c515d.entry.js → p-434fa633.entry.js} +2 -2
  171. package/dist/core/{p-5d417fc0.entry.js → p-492c7e88.entry.js} +2 -2
  172. package/dist/core/{p-b9aa801f.entry.js → p-4bdd6aad.entry.js} +2 -2
  173. package/dist/core/{p-0b8c3770.entry.js → p-4e9a0efe.entry.js} +2 -2
  174. package/dist/core/{p-3cfef37a.entry.js → p-50601f1e.entry.js} +2 -2
  175. package/dist/core/p-537af2dd.entry.js +2 -0
  176. package/dist/core/p-537af2dd.entry.js.map +1 -0
  177. package/dist/core/{p-07cd8a50.entry.js → p-54604d29.entry.js} +2 -2
  178. package/dist/core/p-5637b986.entry.js +2 -0
  179. package/dist/core/{p-dcb2073d.entry.js.map → p-5637b986.entry.js.map} +1 -1
  180. package/dist/core/p-56b5e33e.entry.js +2 -0
  181. package/dist/core/p-56b5e33e.entry.js.map +1 -0
  182. package/dist/core/p-5aa7dcae.entry.js +2 -0
  183. package/dist/core/p-5aa7dcae.entry.js.map +1 -0
  184. package/dist/core/{p-c2b359d9.entry.js → p-5c5b0b12.entry.js} +2 -2
  185. package/dist/core/p-6594d2df.entry.js +2 -0
  186. package/dist/core/{p-3420a999.entry.js.map → p-6594d2df.entry.js.map} +1 -1
  187. package/dist/core/{p-810f5a2d.entry.js → p-67a75b77.entry.js} +2 -2
  188. package/dist/core/p-67a75b77.entry.js.map +1 -0
  189. package/dist/core/{p-4f72a02a.entry.js → p-68046114.entry.js} +2 -2
  190. package/dist/core/{p-705db6a5.entry.js → p-6c7836ff.entry.js} +2 -2
  191. package/dist/core/{p-da85eaf6.entry.js → p-74b8206f.entry.js} +2 -2
  192. package/dist/core/{p-520c6089.entry.js → p-7f05cc17.entry.js} +2 -2
  193. package/dist/core/{p-d2909711.entry.js → p-81e8d7c5.entry.js} +2 -2
  194. package/dist/core/{p-b2a41070.entry.js → p-840113b1.entry.js} +2 -2
  195. package/dist/core/{p-ded2dbed.entry.js → p-84c28c4d.entry.js} +2 -2
  196. package/dist/core/{p-7124b387.entry.js → p-88fdd912.entry.js} +2 -2
  197. package/dist/core/{p-b51e378c.entry.js → p-8a66d8b0.entry.js} +2 -2
  198. package/dist/core/{p-225384ab.entry.js → p-8aceec77.entry.js} +2 -2
  199. package/dist/core/{p-0821fc5b.entry.js → p-91c46a86.entry.js} +2 -2
  200. package/dist/core/p-91c46a86.entry.js.map +1 -0
  201. package/dist/core/{p-91c1327d.entry.js → p-92e3c5a2.entry.js} +2 -2
  202. package/dist/core/{p-f42c0469.entry.js → p-98429cbe.entry.js} +2 -2
  203. package/dist/core/{p-b27dfa1b.entry.js → p-98963b03.entry.js} +2 -2
  204. package/dist/core/{p-3994d86d.entry.js → p-a3b00ec1.entry.js} +2 -2
  205. package/dist/core/{p-9c1d4f72.entry.js → p-a4467032.entry.js} +2 -2
  206. package/dist/core/{p-193582d4.entry.js → p-a6f25812.entry.js} +2 -2
  207. package/dist/core/p-a81a91a2.entry.js +2 -0
  208. package/dist/core/p-a81a91a2.entry.js.map +1 -0
  209. package/dist/core/{p-c83e933c.entry.js → p-ab14882b.entry.js} +2 -2
  210. package/dist/core/p-ac61fa48.entry.js +2 -0
  211. package/dist/core/p-ac61fa48.entry.js.map +1 -0
  212. package/dist/core/{p-580b1593.entry.js → p-b468aa80.entry.js} +2 -2
  213. package/dist/core/{p-4dc48606.entry.js → p-cf5f427b.entry.js} +2 -2
  214. package/dist/core/{p-5d653608.entry.js → p-cfcb0c5b.entry.js} +2 -2
  215. package/dist/core/p-d41e5b62.entry.js +2 -0
  216. package/dist/core/p-d41e5b62.entry.js.map +1 -0
  217. package/dist/core/{p-98dbbb34.entry.js → p-d7043445.entry.js} +2 -2
  218. package/dist/core/{p-406e58af.entry.js → p-e2de6dd4.entry.js} +2 -2
  219. package/dist/core/{p-0d505c1f.entry.js → p-e719ae4e.entry.js} +2 -2
  220. package/dist/core/{p-4af52174.entry.js → p-ea71e89f.entry.js} +2 -2
  221. package/dist/core/{p-518ea375.entry.js → p-ee0d4bf4.entry.js} +2 -2
  222. package/dist/core/{p-a24bcf5f.entry.js → p-f0e45316.entry.js} +2 -2
  223. package/dist/core/p-f297c365.entry.js +2 -0
  224. package/dist/core/p-f297c365.entry.js.map +1 -0
  225. package/dist/core/{p-5ba8e679.entry.js → p-f61170f3.entry.js} +2 -2
  226. package/dist/core/{p-61510f00.entry.js → p-f7b71154.entry.js} +2 -2
  227. package/dist/core/{p-1234f7a5.entry.js → p-fb7a9d6b.entry.js} +2 -2
  228. package/dist/esm/core.js +1 -1
  229. package/dist/esm/{helpers-e594bfc6.js → helpers-1c6e542d.js} +23 -2
  230. package/dist/esm/helpers-1c6e542d.js.map +1 -0
  231. package/dist/esm/ic-accordion-group.entry.js +1 -1
  232. package/dist/esm/ic-accordion.entry.js +1 -1
  233. package/dist/esm/ic-alert.entry.js +3 -10
  234. package/dist/esm/ic-alert.entry.js.map +1 -1
  235. package/dist/esm/ic-back-to-top.entry.js +1 -1
  236. package/dist/esm/ic-badge.entry.js +1 -1
  237. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  238. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  239. package/dist/esm/ic-button_3.entry.js +1 -1
  240. package/dist/esm/ic-card-vertical.entry.js +13 -20
  241. package/dist/esm/ic-card-vertical.entry.js.map +1 -1
  242. package/dist/esm/ic-checkbox-group.entry.js +1 -1
  243. package/dist/esm/ic-checkbox.entry.js +1 -1
  244. package/dist/esm/ic-chip.entry.js +1 -1
  245. package/dist/esm/ic-data-row.entry.js +1 -1
  246. package/dist/esm/ic-dialog.entry.js +1 -1
  247. package/dist/esm/ic-divider.entry.js +1 -1
  248. package/dist/esm/ic-empty-state.entry.js +3 -13
  249. package/dist/esm/ic-empty-state.entry.js.map +1 -1
  250. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  251. package/dist/esm/ic-footer-link.entry.js +1 -1
  252. package/dist/esm/ic-footer.entry.js +18 -7
  253. package/dist/esm/ic-footer.entry.js.map +1 -1
  254. package/dist/esm/ic-hero.entry.js +3 -10
  255. package/dist/esm/ic-hero.entry.js.map +1 -1
  256. package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
  257. package/dist/esm/ic-input-component-container_3.entry.js +28 -22
  258. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  259. package/dist/esm/ic-input-label_2.entry.js +1 -1
  260. package/dist/esm/ic-link.entry.js +1 -1
  261. package/dist/esm/ic-menu-group.entry.js +1 -1
  262. package/dist/esm/ic-menu-item.entry.js +1 -1
  263. package/dist/esm/ic-navigation-button.entry.js +1 -1
  264. package/dist/esm/ic-navigation-group.entry.js +1 -1
  265. package/dist/esm/ic-navigation-item.entry.js +1 -1
  266. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  267. package/dist/esm/ic-page-header.entry.js +1 -1
  268. package/dist/esm/ic-pagination-item.entry.js +1 -1
  269. package/dist/esm/ic-pagination.entry.js +1 -1
  270. package/dist/esm/ic-popover-menu.entry.js +1 -1
  271. package/dist/esm/ic-radio-group.entry.js +1 -1
  272. package/dist/esm/ic-radio-option.entry.js +1 -1
  273. package/dist/esm/ic-search-bar.entry.js +32 -28
  274. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  275. package/dist/esm/ic-select.entry.js +44 -32
  276. package/dist/esm/ic-select.entry.js.map +1 -1
  277. package/dist/esm/ic-side-navigation.entry.js +1 -1
  278. package/dist/esm/ic-status-tag.entry.js +1 -1
  279. package/dist/esm/ic-step.entry.js +1 -1
  280. package/dist/esm/ic-stepper.entry.js +1 -1
  281. package/dist/esm/ic-switch.entry.js +1 -1
  282. package/dist/esm/ic-tab-group.entry.js +1 -1
  283. package/dist/esm/ic-tab-panel.entry.js +1 -1
  284. package/dist/esm/ic-tab.entry.js +1 -1
  285. package/dist/esm/ic-text-field.entry.js +10 -8
  286. package/dist/esm/ic-text-field.entry.js.map +1 -1
  287. package/dist/esm/ic-theme.entry.js +1 -1
  288. package/dist/esm/ic-toast.entry.js +1 -1
  289. package/dist/esm/ic-toggle-button-group.entry.js +27 -11
  290. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
  291. package/dist/esm/ic-toggle-button.entry.js +51 -5
  292. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  293. package/dist/esm/ic-top-navigation.entry.js +2 -2
  294. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  295. package/dist/esm/ic-typography.entry.js +1 -1
  296. package/dist/esm/index-d1d2c456.js +4 -4
  297. package/dist/esm/loader.js +1 -1
  298. package/dist/types/components/ic-alert/ic-alert.d.ts +0 -1
  299. package/dist/types/components/ic-card-vertical/ic-card-vertical.d.ts +0 -1
  300. package/dist/types/components/ic-empty-state/ic-empty-state.d.ts +0 -1
  301. package/dist/types/components/ic-footer/ic-footer.d.ts +1 -0
  302. package/dist/types/components/ic-hero/ic-hero.d.ts +0 -1
  303. package/dist/types/components/ic-input-component-container/ic-input-component-container.d.ts +0 -1
  304. package/dist/types/components/ic-menu/ic-menu.d.ts +6 -1
  305. package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +9 -2
  306. package/dist/types/components/ic-select/ic-select.d.ts +5 -4
  307. package/dist/types/components/ic-text-field/ic-text-field.d.ts +2 -1
  308. package/dist/types/components/ic-toggle-button/ic-toggle-button.d.ts +3 -3
  309. package/dist/types/components/ic-toggle-button-group/ic-toggle-button-group.d.ts +4 -0
  310. package/dist/types/components.d.ts +17 -7
  311. package/dist/types/testspec.setup.d.ts +9 -0
  312. package/dist/types/utils/helpers.d.ts +3 -0
  313. package/dist/types/utils/types.d.ts +1 -0
  314. package/hydrate/index.js +243 -150
  315. package/package.json +2 -9
  316. package/vscode-data.json +1 -1
  317. package/dist/cjs/helpers-dd569d97.js.map +0 -1
  318. package/dist/components/ic-text-field2.js +0 -373
  319. package/dist/components/ic-text-field2.js.map +0 -1
  320. package/dist/core/p-0821fc5b.entry.js.map +0 -1
  321. package/dist/core/p-3420a999.entry.js +0 -2
  322. package/dist/core/p-3bfc4a52.entry.js +0 -2
  323. package/dist/core/p-3bfc4a52.entry.js.map +0 -1
  324. package/dist/core/p-48e98730.js +0 -2
  325. package/dist/core/p-48e98730.js.map +0 -1
  326. package/dist/core/p-59800237.entry.js +0 -2
  327. package/dist/core/p-59800237.entry.js.map +0 -1
  328. package/dist/core/p-6159b077.entry.js +0 -2
  329. package/dist/core/p-6159b077.entry.js.map +0 -1
  330. package/dist/core/p-6859019c.entry.js +0 -2
  331. package/dist/core/p-6859019c.entry.js.map +0 -1
  332. package/dist/core/p-810744b5.entry.js +0 -2
  333. package/dist/core/p-810744b5.entry.js.map +0 -1
  334. package/dist/core/p-810f5a2d.entry.js.map +0 -1
  335. package/dist/core/p-8a2670c1.entry.js +0 -2
  336. package/dist/core/p-8a2670c1.entry.js.map +0 -1
  337. package/dist/core/p-aefebee9.entry.js +0 -2
  338. package/dist/core/p-aefebee9.entry.js.map +0 -1
  339. package/dist/core/p-c67f7603.entry.js +0 -2
  340. package/dist/core/p-c67f7603.entry.js.map +0 -1
  341. package/dist/core/p-c6e91e13.entry.js +0 -2
  342. package/dist/core/p-c6e91e13.entry.js.map +0 -1
  343. package/dist/core/p-ca27ab19.entry.js +0 -2
  344. package/dist/core/p-ca27ab19.entry.js.map +0 -1
  345. package/dist/core/p-cfe32b37.entry.js +0 -2
  346. package/dist/core/p-dcb2073d.entry.js +0 -2
  347. package/dist/esm/helpers-e594bfc6.js.map +0 -1
  348. /package/dist/core/{p-bc7b8a1e.entry.js.map → p-076c3140.entry.js.map} +0 -0
  349. /package/dist/core/{p-b5439baa.entry.js.map → p-229523bc.entry.js.map} +0 -0
  350. /package/dist/core/{p-a23c515d.entry.js.map → p-434fa633.entry.js.map} +0 -0
  351. /package/dist/core/{p-5d417fc0.entry.js.map → p-492c7e88.entry.js.map} +0 -0
  352. /package/dist/core/{p-b9aa801f.entry.js.map → p-4bdd6aad.entry.js.map} +0 -0
  353. /package/dist/core/{p-0b8c3770.entry.js.map → p-4e9a0efe.entry.js.map} +0 -0
  354. /package/dist/core/{p-3cfef37a.entry.js.map → p-50601f1e.entry.js.map} +0 -0
  355. /package/dist/core/{p-07cd8a50.entry.js.map → p-54604d29.entry.js.map} +0 -0
  356. /package/dist/core/{p-c2b359d9.entry.js.map → p-5c5b0b12.entry.js.map} +0 -0
  357. /package/dist/core/{p-4f72a02a.entry.js.map → p-68046114.entry.js.map} +0 -0
  358. /package/dist/core/{p-705db6a5.entry.js.map → p-6c7836ff.entry.js.map} +0 -0
  359. /package/dist/core/{p-da85eaf6.entry.js.map → p-74b8206f.entry.js.map} +0 -0
  360. /package/dist/core/{p-520c6089.entry.js.map → p-7f05cc17.entry.js.map} +0 -0
  361. /package/dist/core/{p-d2909711.entry.js.map → p-81e8d7c5.entry.js.map} +0 -0
  362. /package/dist/core/{p-b2a41070.entry.js.map → p-840113b1.entry.js.map} +0 -0
  363. /package/dist/core/{p-ded2dbed.entry.js.map → p-84c28c4d.entry.js.map} +0 -0
  364. /package/dist/core/{p-7124b387.entry.js.map → p-88fdd912.entry.js.map} +0 -0
  365. /package/dist/core/{p-b51e378c.entry.js.map → p-8a66d8b0.entry.js.map} +0 -0
  366. /package/dist/core/{p-225384ab.entry.js.map → p-8aceec77.entry.js.map} +0 -0
  367. /package/dist/core/{p-91c1327d.entry.js.map → p-92e3c5a2.entry.js.map} +0 -0
  368. /package/dist/core/{p-f42c0469.entry.js.map → p-98429cbe.entry.js.map} +0 -0
  369. /package/dist/core/{p-b27dfa1b.entry.js.map → p-98963b03.entry.js.map} +0 -0
  370. /package/dist/core/{p-3994d86d.entry.js.map → p-a3b00ec1.entry.js.map} +0 -0
  371. /package/dist/core/{p-9c1d4f72.entry.js.map → p-a4467032.entry.js.map} +0 -0
  372. /package/dist/core/{p-193582d4.entry.js.map → p-a6f25812.entry.js.map} +0 -0
  373. /package/dist/core/{p-c83e933c.entry.js.map → p-ab14882b.entry.js.map} +0 -0
  374. /package/dist/core/{p-580b1593.entry.js.map → p-b468aa80.entry.js.map} +0 -0
  375. /package/dist/core/{p-4dc48606.entry.js.map → p-cf5f427b.entry.js.map} +0 -0
  376. /package/dist/core/{p-5d653608.entry.js.map → p-cfcb0c5b.entry.js.map} +0 -0
  377. /package/dist/core/{p-98dbbb34.entry.js.map → p-d7043445.entry.js.map} +0 -0
  378. /package/dist/core/{p-406e58af.entry.js.map → p-e2de6dd4.entry.js.map} +0 -0
  379. /package/dist/core/{p-0d505c1f.entry.js.map → p-e719ae4e.entry.js.map} +0 -0
  380. /package/dist/core/{p-4af52174.entry.js.map → p-ea71e89f.entry.js.map} +0 -0
  381. /package/dist/core/{p-518ea375.entry.js.map → p-ee0d4bf4.entry.js.map} +0 -0
  382. /package/dist/core/{p-a24bcf5f.entry.js.map → p-f0e45316.entry.js.map} +0 -0
  383. /package/dist/core/{p-5ba8e679.entry.js.map → p-f61170f3.entry.js.map} +0 -0
  384. /package/dist/core/{p-61510f00.entry.js.map → p-f7b71154.entry.js.map} +0 -0
  385. /package/dist/core/{p-1234f7a5.entry.js.map → p-fb7a9d6b.entry.js.map} +0 -0
@@ -1,2 +0,0 @@
1
- import{r as i,f as t,h as e,H as s,g as n,c,F as o}from"./p-6b5e91e2.js";import{c as r,r as a,s as h,G as l,Q as u,R as d,a as p,E as m}from"./p-48e98730.js";import{C as f}from"./p-c2e091d7.js";import{c as b}from"./p-68a5aaff.js";const v="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(--input-bg-color, var(--ic-color-background-primary));box-sizing:border-box;fill:var(--ic-architectural-400);outline:none}ic-input-component-container.ic-input-component-container-full-width{width:100%}ic-input-component-container.ic-input-component-container-disabled,ic-input-component-container.ic-input-component-container-disabled:hover{border:var(--ic-border-width) dashed\n var(--border-color-disabled, var(--ic-color-border-neutral-disabled))}ic-input-component-container.ic-input-component-container-readonly,ic-input-component-container.ic-input-component-container-readonly:hover{border:none;padding:0}ic-input-component-container.ic-input-component-container-error{border:var(--ic-space-xxxs) solid\n var(--border-color-error, var(--ic-color-border-error));padding:0}ic-input-component-container.ic-input-component-container-error:hover{border:var(--ic-space-xxxs) solid\n var(--border-color-error-hover, var(--ic-color-border-error-hover))}ic-input-component-container.ic-input-component-container-error:focus-within{border:var(--ic-space-xxxs) solid\n var(--border-color-error-pressed, var(--ic-color-border-error-pressed))}ic-input-component-container.ic-input-component-container-warning{border:var(--ic-space-xxxs) solid\n var(--border-color-warning, var(--ic-color-border-warning));padding:0}ic-input-component-container.ic-input-component-container-warning:hover{border:var(--ic-space-xxxs) solid\n var(--border-color-warning-hover, var(--ic-color-border-warning-hover))}ic-input-component-container.ic-input-component-container-warning:focus-within{border:var(--ic-space-xxxs) solid\n var(--border-color-warning-pressed, var(--ic-color-border-warning-pressed))}ic-input-component-container.ic-input-component-container-success{border:var(--ic-space-xxxs) solid\n var(--border-color-success, var(--ic-color-border-success));padding:0}ic-input-component-container.ic-input-component-container-success:hover{border:var(--ic-space-xxxs) solid\n var(--border-color-success-hover, var(--ic-color-border-success-hover))}ic-input-component-container.ic-input-component-container-success:focus-within{border:var(--ic-space-xxxs) solid\n var(--border-color-success-pressed, var(--ic-color-border-success-pressed))}ic-input-component-container.ic-input-component-container-small{height:var(--ic-space-xl)}ic-input-component-container.ic-input-component-container-large{height:var(--ic-space-xxl)}ic-input-component-container.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.ic-input-component-container-multiline .icon-container,ic-input-component-container.ic-input-component-container-multiline.ic-input-component-container-small .icon-container{margin-top:0.375rem;display:block}ic-input-component-container.ic-input-component-container-readonly .icon-container{margin-left:-0.313rem}ic-input-component-container.ic-input-component-container-disabled ::-moz-placeholder{display:none}ic-input-component-container.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 .inline-success>svg{fill:var(--ic-input-component-container-success-icon-inline-color);height:1.25rem;width:1.25rem}ic-input-component-container:hover{border:var(--ic-input-component-container-hover-border);border-color:var(--border-color-hover, var(--ic-color-border-neutral-hover));color:var(--ic-action-dark-hover)}ic-input-component-container:focus{border:var(--ic-border-pressed);border-color:var(\n --border-color-pressed,\n var(--ic-color-border-neutral-pressed)\n )}.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.ic-input-component-container-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.ic-input-component-container-disabled,ic-input-component-container.ic-input-component-container-disabled:hover{border:var(--ic-border-width) dashed GrayText}}";const g=class{constructor(e){i(this,e);this.hostMutationCallback=i=>{if(i.some((({type:i,addedNodes:t,removedNodes:e})=>i==="childList"?r(t,e,"left-icon"):false))){t(this)}};this.disabled=false;this.fullWidth=false;this.multiLine=false;this.readonly=false;this.size="medium";this.validationInline=false;this.validationStatus=""}watchDisabledHandler(){a(this.disabled,this.el)}componentWillLoad(){a(this.disabled,this.el)}componentDidLoad(){this.hostMutationObserver=new MutationObserver(this.hostMutationCallback);this.hostMutationObserver.observe(this.el,{childList:true})}render(){const{size:i,validationStatus:t,disabled:n,readonly:c,multiLine:o,fullWidth:r,validationInline:a}=this;return e(s,{class:{[`ic-input-component-container-${i}`]:true,[`ic-input-component-container-${t}`]:t!==""&&!n&&!c,"ic-input-component-container-disabled":n,"ic-input-component-container-readonly":c,"ic-input-component-container-multiline":o,"ic-input-component-container-full-width":r},"aria-disabled":n?"true":null},e("div",{class:"focus-indicator"},h(this.el,"left-icon")&&e("div",{class:"icon-container"},e("slot",{name:"left-icon"})),e("slot",null),a&&t===l.Success&&e("span",{class:"inline-success",innerHTML:u})))}get el(){return n(this)}static get watchers(){return{disabled:["watchDisabledHandler"]}}};g.style=v;const x="ic-input-container .component-container{display:flex;flex-direction:column}";const y=class{constructor(t){i(this,t);this.disabled=false;this.readonly=false}render(){return e(s,null,e("div",{class:{["component-container"]:true,["disabled"]:this.disabled,["readonly"]:this.readonly}},e("slot",null)))}};y.style=x;const w='html.sc-ic-menu{line-height:1.15;-webkit-text-size-adjust:100%}body.sc-ic-menu{margin:0}main.sc-ic-menu{display:block}h1.sc-ic-menu{font-size:2em;margin:0.67em 0}hr.sc-ic-menu{box-sizing:content-box;height:0;overflow:visible}pre.sc-ic-menu{font-family:monospace, monospace;font-size:1em}a.sc-ic-menu{background-color:transparent}abbr[title].sc-ic-menu{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b.sc-ic-menu,strong.sc-ic-menu{font-weight:bolder}code.sc-ic-menu,kbd.sc-ic-menu,samp.sc-ic-menu{font-family:monospace, monospace;font-size:1em}small.sc-ic-menu{font-size:80%}sub.sc-ic-menu,sup.sc-ic-menu{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub.sc-ic-menu{bottom:-0.25em}sup.sc-ic-menu{top:-0.5em}img.sc-ic-menu{border-style:none}button.sc-ic-menu,input.sc-ic-menu,optgroup.sc-ic-menu,select.sc-ic-menu,textarea.sc-ic-menu{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button.sc-ic-menu,input.sc-ic-menu{overflow:visible}button.sc-ic-menu,select.sc-ic-menu{text-transform:none}button.sc-ic-menu,[type="button"].sc-ic-menu,[type="reset"].sc-ic-menu,[type="submit"].sc-ic-menu{-webkit-appearance:button}button.sc-ic-menu::-moz-focus-inner,[type="button"].sc-ic-menu::-moz-focus-inner,[type="reset"].sc-ic-menu::-moz-focus-inner,[type="submit"].sc-ic-menu::-moz-focus-inner{border-style:none;padding:0}button.sc-ic-menu:-moz-focusring,[type="button"].sc-ic-menu:-moz-focusring,[type="reset"].sc-ic-menu:-moz-focusring,[type="submit"].sc-ic-menu:-moz-focusring{outline:1px dotted ButtonText}fieldset.sc-ic-menu{padding:0.35em 0.75em 0.625em}legend.sc-ic-menu{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress.sc-ic-menu{vertical-align:baseline}textarea.sc-ic-menu{overflow:auto}[type="checkbox"].sc-ic-menu,[type="radio"].sc-ic-menu{box-sizing:border-box;padding:0}[type="number"].sc-ic-menu::-webkit-inner-spin-button,[type="number"].sc-ic-menu::-webkit-outer-spin-button{height:auto}[type="search"].sc-ic-menu{-webkit-appearance:textfield;outline-offset:-2px}[type="search"].sc-ic-menu::-webkit-search-decoration{-webkit-appearance:none}.sc-ic-menu::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details.sc-ic-menu{display:block}summary.sc-ic-menu{display:list-item}template.sc-ic-menu{display:none}[hidden].sc-ic-menu{display:none}html.sc-ic-menu,body.sc-ic-menu,div.sc-ic-menu,span.sc-ic-menu,applet.sc-ic-menu,object.sc-ic-menu,iframe.sc-ic-menu,h1.sc-ic-menu,h2.sc-ic-menu,h3.sc-ic-menu,h4.sc-ic-menu,h5.sc-ic-menu,h6.sc-ic-menu,p.sc-ic-menu,blockquote.sc-ic-menu,pre.sc-ic-menu,a.sc-ic-menu,abbr.sc-ic-menu,acronym.sc-ic-menu,address.sc-ic-menu,big.sc-ic-menu,cite.sc-ic-menu,code.sc-ic-menu,del.sc-ic-menu,dfn.sc-ic-menu,em.sc-ic-menu,img.sc-ic-menu,ins.sc-ic-menu,kbd.sc-ic-menu,q.sc-ic-menu,s.sc-ic-menu,samp.sc-ic-menu,small.sc-ic-menu,strike.sc-ic-menu,strong.sc-ic-menu,sub.sc-ic-menu,sup.sc-ic-menu,tt.sc-ic-menu,var.sc-ic-menu,b.sc-ic-menu,u.sc-ic-menu,i.sc-ic-menu,center.sc-ic-menu,dl.sc-ic-menu,dt.sc-ic-menu,dd.sc-ic-menu,ol.sc-ic-menu,ul.sc-ic-menu,li.sc-ic-menu,fieldset.sc-ic-menu,form.sc-ic-menu,label.sc-ic-menu,legend.sc-ic-menu,table.sc-ic-menu,caption.sc-ic-menu,tbody.sc-ic-menu,tfoot.sc-ic-menu,thead.sc-ic-menu,tr.sc-ic-menu,th.sc-ic-menu,td.sc-ic-menu,article.sc-ic-menu,aside.sc-ic-menu,canvas.sc-ic-menu,details.sc-ic-menu,embed.sc-ic-menu,figure.sc-ic-menu,figcaption.sc-ic-menu,footer.sc-ic-menu,header.sc-ic-menu,hgroup.sc-ic-menu,menu.sc-ic-menu,nav.sc-ic-menu,output.sc-ic-menu,ruby.sc-ic-menu,section.sc-ic-menu,summary.sc-ic-menu,time.sc-ic-menu,mark.sc-ic-menu,audio.sc-ic-menu,video.sc-ic-menu{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}@media (prefers-reduced-motion: no-preference){.ic-menu-open.sc-ic-menu-h .menu.sc-ic-menu{transition:max-height var(--ic-transition-duration-slow)}}.sc-ic-menu-h{max-height:0;width:var(--menu-width, var(--input-width, 20rem));color:var(--menu-item-text-color, var(--ic-menu-list-option-text-color));--ic-typography-color:var(\n --menu-item-text-color,\n var(--ic-menu-list-option-text-color)\n );background-color:var(\n --menu-bg-color,\n var(--ic-menu-list-option-background-color)\n );position:relative;z-index:var(--ic-z-index-menu);box-sizing:border-box;box-shadow:var(--ic-elevation-overlay);border-radius:var(--ic-border-radius)}.ic-menu-open.sc-ic-menu-h:not(.ic-menu-no-focus):focus-within{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline)}.ic-select-select-all-focused.sc-ic-menu-h{box-shadow:var(--ic-elevation-overlay) !important}#retry-button.sc-ic-menu::part(button){height:var(--ic-space-lg)}.small.sc-ic-menu #retry-button.sc-ic-menu::part(button){height:var(--ic-space-md)}.on-dialog.sc-ic-menu-h{inset:auto !important}.menu.sc-ic-menu{text-decoration:none;list-style-type:none;border-radius:1px;background-color:var(\n --menu-bg-color,\n var(--ic-menu-list-option-background-color)\n );visibility:hidden;max-height:0;overflow-y:hidden}.menu.sc-ic-menu:has(+.option-bar).sc-ic-menu{border-radius:0 0 1px 1px}.menu-scroll.sc-ic-menu{overflow-y:auto}.menu.sc-ic-menu:focus-visible{outline:none}.ic-menu-open.sc-ic-menu-h{max-height:none;display:flex;flex-direction:column-reverse;border:var(--ic-border-width) solid\n var(--menu-border-color, var(--ic-menu-border-color));transition:box-shadow var(--ic-easing-transition-fast)}.ic-menu-open.sc-ic-menu-h .menu.sc-ic-menu{visibility:visible;max-height:calc(var(--ic-space-xl) * 10 + var(--ic-space-xxxs))}.ic-menu-open.sc-ic-menu-h .option-bar.sc-ic-menu{visibility:visible}.ic-menu-open.sc-ic-menu-h .select-all-button.sc-ic-menu{display:block}.ic-menu-full-width.sc-ic-menu-h{width:100%}.option.sc-ic-menu{padding:var(--ic-space-xs) calc(var(--ic-space-xs) - var(--ic-space-1px));cursor:pointer;display:flex;align-items:center}.loading-option.sc-ic-menu p.sc-ic-menu{margin-bottom:0 !important}.option.sc-ic-menu:not(.loading-option){justify-content:space-between}.ic-menu-small.sc-ic-menu-h .option.sc-ic-menu{padding:var(--ic-space-xxs) calc(var(--ic-space-xs) - var(--ic-space-1px))}.ic-menu-large.sc-ic-menu-h .option.sc-ic-menu{padding:var(--ic-space-sm) calc(var(--ic-space-xs) - var(--ic-space-1px))}.option.sc-ic-menu:last-child{border-radius:0 0 1px 1px}.sc-ic-menu:not(.menu:has(+.option-bar)).sc-ic-menu .option.sc-ic-menu:first-child{border-radius:1px 1px 0 0}.option.sc-ic-menu:not(.disabled-option):hover{background-color:var(--ic-menu-list-option-hover-background-color)}.option.sc-ic-menu:not(.disabled-option):active{background-color:var(--ic-menu-list-option-pressed-background-color)}.option.sc-ic-menu:focus-visible{outline:var(--ic-hc-focus-outline)}.option.sc-ic-menu:not(.disabled-option) .option-description.sc-ic-menu{--ic-typography-color:var(\n --menu-item-desc-text-color,\n var(--ic-menu-list-option-description-text-color)\n )}.option.sc-ic-menu .option-label.sc-ic-menu{display:flex;flex-direction:row;align-items:top}.option.sc-ic-menu .option-label.sc-ic-menu ic-typography.sc-ic-menu{max-width:100%;word-wrap:break-word}.option.sc-ic-menu .option-element.sc-ic-menu{margin-top:var(--ic-space-xxs)}.option.sc-ic-menu .option-icon.sc-ic-menu{height:var(--ic-space-md);width:var(--ic-space-md);margin-top:var(--ic-space-xxs);margin-right:var(--ic-space-xxxs)}.option-text-container.sc-ic-menu{pointer-events:none;width:100%}.option-text-container.show-check-icon.sc-ic-menu{width:calc(var(--ic-space-lg) * 10 + var(--ic-space-xl))}.option.loading-option.sc-ic-menu .option-text-container.sc-ic-menu{margin-left:calc(var(--ic-space-xs) + var(--ic-space-xxxs));color:var(--ic-menu-loading-list-option-text-color);--ic-typography-color:var(--ic-menu-loading-list-option-text-color)}.error-icon-svg.sc-ic-menu{height:var(--ic-space-md);width:var(--ic-space-md);fill:var(--ic-atoms-status-icon-error);align-self:center;display:flex;margin-right:calc(var(--ic-space-xxs) * 1.2)}.loading-error-info.sc-ic-menu{display:flex}.check-icon.sc-ic-menu{height:var(--ic-space-lg);min-width:var(--ic-space-lg);width:var(--ic-space-lg);margin-left:var(--ic-space-xs);pointer-events:none}.focused-option.sc-ic-menu .check-icon.sc-ic-menu *.sc-ic-menu{fill:currentcolor}.option-group-title.sc-ic-menu{padding:var(--ic-space-lg) calc(var(--ic-space-xs) - var(--ic-space-1px))\n var(--ic-space-xs);--ic-typography-color:var(--ic-menu-option-group-label-text-color)}.ic-menu-small.sc-ic-menu-h .option-group-title.sc-ic-menu{padding:var(--ic-space-sm) calc(var(--ic-space-xs) - var(--ic-space-1px))\n var(--ic-space-xxs)}.last-recommended-option.sc-ic-menu{border-bottom:var(--ic-menu-last-recommended-option-border)}.disabled-option.sc-ic-menu{color:var(--ic-atoms-list-option-text-disabled-light);--ic-typography-color:var(--ic-atoms-list-option-text-disabled-light);cursor:default;pointer-events:none}.focused-option.sc-ic-menu,.focused-option.sc-ic-menu .option-description.sc-ic-menu{background-color:var(--ic-color-focus-inner) !important;color:var(--ic-atoms-list-option-text-focused-light) !important;--ic-typography-color:var(\n --ic-atoms-list-option-text-focused-light\n ) !important}.no-results.sc-ic-menu-h li.sc-ic-menu{cursor:no-drop}.no-results.sc-ic-menu-h li.sc-ic-menu:hover{background-color:transparent}.option-bar.sc-ic-menu{padding:var(--ic-space-xxs) var(--ic-space-xs);display:flex;align-items:center;justify-content:space-between;background-color:var(--ic-menu-option-bar-background-color);visibility:hidden;border-bottom:var(--ic-border-width) solid\n var(--ic-menu-option-bar-divider-color);border-radius:1px 1px 0 0}.option-bar.sc-ic-menu p.sc-ic-menu{margin-bottom:0 !important}.ic-menu-large.sc-ic-menu-h .option-bar.sc-ic-menu{padding:var(--ic-space-xs)}.select-all-button.sc-ic-menu{display:none}.select-all-button.sc-ic-menu:focus{z-index:calc(var(--ic-z-index-menu) + 1)}@media (forced-colors: active){.focused-option.sc-ic-menu:focus{outline:none;border:0.125rem solid transparent}}';const k=class{constructor(t){i(this,t);this.menuKeyPress=c(this,"menuKeyPress",7);this.menuOptionId=c(this,"menuOptionId",7);this.menuOptionSelect=c(this,"menuOptionSelect",7);this.menuOptionSelectAll=c(this,"menuOptionSelectAll",7);this.menuStateChange=c(this,"menuStateChange",7);this.retryButtonClicked=c(this,"retryButtonClicked",7);this.timeoutBlur=c(this,"timeoutBlur",7);this.ungroupedOptionsSet=c(this,"ungroupedOptionsSet",7);this.ACTIVE_DESCENDANT="aria-activedescendant";this.CLEAR_BUTTON_ID="clear-button";this.disabledOptionSelected=false;this.hasPreviouslyBlurred=false;this.hasTimedOut=false;this.isLoading=false;this.isMultiSelect=false;this.isSearchBar=false;this.isSearchableSelect=false;this.lastOptionSelected=null;this.lastOptionFocused=null;this.multiOptionClicked=null;this.preventClickOpen=false;this.preventMenuFocus=false;this.shiftPressed=false;this.ungroupedOptions=[];this.handleClearListener=()=>{this.optionHighlighted=""};this.handleSubmitSearch=()=>{const i=this.options.findIndex((i=>i[this.valueField]===this.optionHighlighted));this.setInputValue(i)};this.handleMenuChange=(i,t)=>{this.menuStateChange.emit({open:i,focusInput:t});if(!i){if(t!==false){this.inputEl.focus();this.preventClickOpen=false}if(this.isMultiSelect){this.optionHighlighted=undefined;this.multiOptionClicked=null}}};this.setNextOptionValue=i=>{if(this.ungroupedOptions[i+1]){this.menuOptionSelect.emit({value:this.ungroupedOptions[i+1][this.valueField],optionId:this.getOptionId(this.ungroupedOptions[i+1][this.valueField])})}else{this.menuOptionSelect.emit({value:this.ungroupedOptions[0][this.valueField],optionId:this.getOptionId(this.ungroupedOptions[0][this.valueField])})}};this.setPreviousOptionValue=i=>{if(this.ungroupedOptions[i-1]){this.menuOptionSelect.emit({value:this.ungroupedOptions[i-1][this.valueField],optionId:this.getOptionId(this.ungroupedOptions[i-1][this.valueField])})}else{this.menuOptionSelect.emit({value:this.ungroupedOptions[this.ungroupedOptions.length-1][this.valueField],optionId:this.getOptionId(this.ungroupedOptions[this.ungroupedOptions.length-1][this.valueField])})}};this.getParentEl=i=>{if(i.tagName==="IC-SEARCH-BAR"){this.isSearchBar=true}else if(i.tagName==="IC-SELECT"){if(i.getAttribute("searchable")!==null&&i.getAttribute("searchable")!==undefined){this.isSearchableSelect=true}else if(i.getAttribute("multiple")!==null&&i.getAttribute("multiple")!==undefined){this.isMultiSelect=true}}};this.arrowBehaviour=i=>{i.preventDefault();this.handleMenuChange(true)};this.getMenuOptions=()=>this.isSearchBar?this.options:this.ungroupedOptions;this.setHighlightedOption=i=>{const t=this.getMenuOptions();t[i]&&!t[i].timedOut&&(this.optionHighlighted=t[i][this.valueField]||undefined)};this.autoSetInputValueKeyboardOpen=i=>{const t=this.ungroupedOptions.findIndex((i=>i[this.valueField]===this.value));this.keyboardNav=false;switch(i.key){case"ArrowDown":this.keyboardNav=true;this.arrowBehaviour(i);this.setNextOptionValue(t);break;case"ArrowUp":this.keyboardNav=true;this.arrowBehaviour(i);this.setPreviousOptionValue(t);break;case" ":case"Enter":if(i.target.id!==this.CLEAR_BUTTON_ID){this.handleMenuChange(true)}break}};this.selectHighlightedOption=(i,t)=>{if(!this.isLoading&&!this.hasTimedOut){this.keyboardNav=true}const e=this.isSearchBar||this.isSearchableSelect||this.open;if(e){if(t>=0){if(i[t]!==undefined){if(this.isSearchBar&&i[t].disabled===true){this.disabledOptionSelected=true}else{this.setInputValue(t)}}}else{this.setInputValue(t)}}else{this.handleMenuChange(true)}};this.isOptionSelected=i=>{const t=this.getMenuOptions();return this.value?this.value.includes(t[i][this.valueField]):false};this.deselectSelectedOptions=i=>{const t=this.getMenuOptions();if(this.value){const e=this.value.map((i=>t.findIndex((t=>t[this.valueField]===i))));e.forEach((t=>!i.includes(t)&&this.setInputValue(t)))}};this.manualSetInputValueKeyboardOpen=i=>{const t=this.getMenuOptions();const e=i.shiftKey||i.metaKey||i.ctrlKey;const s=this.getOptionHighlightedIndex();const n=t.findIndex((i=>i[this.valueField]===this.multiOptionClicked));const c=i=>{var t;return(t=Array.from(this.host.querySelectorAll("li"))[i])===null||t===void 0?void 0:t.id};if(i.key===" "&&this.isMultiSelect){this.handleOptionSelect(i,s)}else{switch(i.key){case"ArrowDown":this.keyboardNav=true;this.arrowBehaviour(i);if(this.multiOptionClicked){this.setHighlightedOption(n);this.multiOptionClicked=null}else{this.handleSingleShiftSelect(i,s,t);if(s<t.length-1){this.setHighlightedOption(s+1);this.menuOptionId.emit({optionId:c(s+1)});this.handleSingleShiftSelect(i,s+1,t)}else{this.setHighlightedOption(0);this.menuOptionId.emit({optionId:c(0)});this.handleSingleShiftSelect(i,0,t)}if(this.isMultiSelect&&this.shiftPressed){this.deselectSelectedOptions([s,this.getOptionHighlightedIndex()]);this.shiftPressed=false}}this.lastOptionFocused=this.getOptionHighlightedIndex();this.preventIncorrectTabOrder=false;this.focusFromSearchKeypress=false;break;case"ArrowUp":this.keyboardNav=true;this.arrowBehaviour(i);if(this.multiOptionClicked){this.setHighlightedOption(n);this.multiOptionClicked=null}else{this.handleSingleShiftSelect(i,s,t);if(s<=0||s>t.length+1){this.setHighlightedOption(t.length-1);this.menuOptionId.emit({optionId:c(t.length-1)});this.handleSingleShiftSelect(i,t.length-1,t)}else{this.setHighlightedOption(s-1);this.menuOptionId.emit({optionId:c(s-1)});this.handleSingleShiftSelect(i,s-1,t)}if(this.isMultiSelect&&this.shiftPressed){this.deselectSelectedOptions([s,this.getOptionHighlightedIndex()]);this.shiftPressed=false}}this.lastOptionFocused=this.getOptionHighlightedIndex();this.preventIncorrectTabOrder=false;this.focusFromSearchKeypress=false;break;case"Home":{const t=0;this.keyboardNav=true;i.preventDefault();this.arrowBehaviour(i);this.setHighlightedOption(t);this.menuOptionId.emit({optionId:c(t)});if(i.shiftKey&&i.ctrlKey){this.handleMultipleShiftSelect(t)}this.lastOptionFocused=t;this.lastOptionSelected=t;break}case"End":{const e=t.length-1;this.keyboardNav=true;i.preventDefault();this.arrowBehaviour(i);this.setHighlightedOption(e);this.menuOptionId.emit({optionId:c(e)});if(i.shiftKey&&i.ctrlKey){this.handleMultipleShiftSelect(e)}this.lastOptionFocused=e;this.lastOptionSelected=e;break}case" ":if(!e){this.keyboardNav=false}if(this.isSearchBar||this.isSearchableSelect){break}else{if(i.target.id!==this.CLEAR_BUTTON_ID){this.handleMenuChange(true)}}break;case"Enter":i.preventDefault();if(!e){this.keyboardNav=false}this.handleOptionSelect(i,s);break;case"Escape":if(this.open){i.stopImmediatePropagation()}this.handleMenuChange(false);this.menuOptionId.emit({optionId:undefined});break;case"a":if(d()&&i.metaKey||!d()&&i.ctrlKey){this.emitSelectAll();this.lastOptionFocused=null;this.lastOptionSelected=null}break;case"Shift":case"Tab":if(i.key==="Shift"){this.shiftPressed=true}if(this.isSearchBar){this.keyboardNav=true}if(this.isMultiSelect){if(this.open&&!i.shiftKey&&this.selectAllButton){i.preventDefault();this.selectAllButton.focus();this.preventMenuFocus=true;this.preventClickOpen=true;this.optionHighlighted=undefined}}else{this.preventIncorrectTabOrder=true}break;default:if(!e){this.keyboardNav=false}this.focusOnSearchOrSelectInput(t,s)}}};this.setInputValue=i=>{const t=this.getMenuOptions();if(t[i]!==undefined){this.menuOptionSelect.emit({value:t[i][this.valueField]});if(this.closeOnSelect){this.optionHighlighted=undefined;this.menuOptionId.emit({optionId:undefined})}}if(this.closeOnSelect){if(!this.hasTimedOut){this.handleMenuChange(false)}else{this.parentEl.setFocus()}}};this.handleOptionClick=i=>{const{value:t,label:e}=i.target.dataset;if(this.isMultiSelect){const e=this.getMenuOptions();const s=e.findIndex((i=>i.value===t));this.handleOptionSelect(i,s,true);this.multiOptionClicked=t}else{this.menuOptionSelect.emit({value:t,label:e});this.handleMenuChange(false)}this.optionHighlighted=undefined};this.handleRetry=()=>{this.retryButtonClicked.emit({value:this.value})};this.handleRetryKeyDown=i=>{if(i.key==="Enter"||i.key===" "){i.preventDefault();this.retryButtonClicked.emit({value:this.value,keyPressed:i.key})}};this.handleBlur=i=>{if(i.relatedTarget!==this.inputEl){if(i.relatedTarget===this.selectAllButton){this.menu.removeAttribute(this.ACTIVE_DESCENDANT)}if(!(this.menu.contains(i.relatedTarget)||i.relatedTarget===this.selectAllButton)){this.handleMenuChange(false,this.hasPreviouslyBlurred);this.menu.removeAttribute(this.ACTIVE_DESCENDANT);this.lastOptionFocused=null;this.lastOptionSelected=null}}else{this.handleMenuChange(false);this.preventClickOpen=true;this.menu.removeAttribute(this.ACTIVE_DESCENDANT);this.lastOptionFocused=null;this.lastOptionSelected=null}if(!this.isSearchBar)this.hasPreviouslyBlurred=!!i.relatedTarget};this.handleMouseDown=i=>{i.preventDefault()};this.handleMenuKeyDown=i=>{if(this.activationType==="automatic"){this.autoSetValueOnMenuKeyDown(i)}else if(this.activationType==="manual"&&!this.isSearchBar){this.manualSetInputValueKeyboardOpen(i)}};this.handleMenuKeyUp=i=>{if(i.key==="Tab"&&i.shiftKey){this.preventClickOpen=false}if(i.key==="Enter"&&this.disabledOptionSelected){this.disabledOptionSelected=false;i.stopImmediatePropagation()}if(i.key==="Shift"){this.shiftPressed=false}};this.handleSelectAllClick=()=>{this.keyboardNav=false;this.menu.focus();this.emitSelectAll();this.lastOptionFocused=null;this.lastOptionSelected=null};this.handleSelectAllBlur=i=>{this.host.classList.remove("ic-select-select-all-focused");if(!this.menu.contains(i.relatedTarget)){this.handleMenuChange(false,false)}};this.handleSelectAllFocus=()=>{this.host.classList.add("ic-select-select-all-focused");this.lastOptionFocused=null;this.lastOptionSelected=null};this.handleSelectAllMouseDown=i=>{i.preventDefault()};this.handleSingleShiftSelect=(i,t,e)=>{if(this.isMultiSelect&&i.shiftKey&&!this.isOptionSelected(t)){this.selectHighlightedOption(e,t);this.lastOptionSelected=t}};this.handleMultipleShiftSelect=(i,t=false,e=null)=>{this.shiftPressed=false;const s=e===null?this.getFirstOptionInSelection(t):e;if(s!==null){const t=[];if(s<i){for(let e=s;e<i+1;e++){t.push(e)}}else{for(let e=s;e>i-1;e--){t.push(e)}}t.forEach((i=>!this.isOptionSelected(i)&&this.setInputValue(i)));this.deselectSelectedOptions(t)}};this.handleOptionSelect=(i,t,e=false)=>{const s=this.getMenuOptions();const n=this.getFirstOptionInSelection(e);if(i.shiftKey&&n!==null){this.handleMultipleShiftSelect(t,e,n)}else{this.selectHighlightedOption(s,t)}this.lastOptionFocused=t;this.lastOptionSelected=t};this.getFirstOptionInSelection=i=>i&&this.lastOptionFocused!==null?this.lastOptionFocused:this.lastOptionSelected!==null?this.lastOptionSelected:null;this.emitSelectAll=()=>{var i;this.menuOptionSelectAll.emit({select:!this.value||!(((i=this.value)===null||i===void 0?void 0:i.length)===this.ungroupedOptions.length)})};this.emitMenuKeyPress=(i,t)=>{this.menuKeyPress.emit({isNavKey:i,key:t})};this.autoSetValueOnMenuKeyDown=i=>{i.cancelBubble=true;const t=this.ungroupedOptions.findIndex((i=>i[this.valueField]===this.value));const e=this.inputEl.tagName==="INPUT";this.keyboardNav=false;switch(i.key){case" ":i.preventDefault();break;case"ArrowUp":if(!this.hasTimedOut){i.preventDefault();this.setPreviousOptionValue(t);this.keyboardNav=true}break;case"ArrowDown":if(!this.hasTimedOut){i.preventDefault();this.setNextOptionValue(t);this.keyboardNav=true}break;case"Home":this.menuOptionSelect.emit({value:this.ungroupedOptions[0][this.valueField]});this.keyboardNav=true;break;case"End":this.menuOptionSelect.emit({value:this.ungroupedOptions[this.ungroupedOptions.length-1][this.valueField]});this.keyboardNav=true;break;case"Enter":!this.hasTimedOut&&this.handleMenuChange(false);break;case"Escape":this.handleMenuChange(false);break;case"Backspace":if(e){this.inputEl.focus()}break;case"Shift":break;default:if(e&&i.key!=="Tab"&&!this.hasTimedOut){this.inputEl.focus()}if(i.key.length===1){this.keyboardNav=true}break}this.emitMenuKeyPress(this.keyboardNav,i.key)};this.getOptionId=i=>`${this.menuId}-${i}`;this.getOptionAriaLabel=(i,t)=>{let e=i[this.labelField];if(i.description){e=`${e}, ${i.description}`}if(i.element){e=`${e}, ${i.element.ariaLabel}`}if(t){return`${e}, ${t[this.labelField]} group`}else{return e}};this.getSortedOptions=i=>{let t=[];if(i.sort){t=i.sort(((i,t)=>i.recommended&&!t.recommended?-1:0))}return t};this.getOptionHighlightedIndex=()=>{const i=this.getMenuOptions();return i.findIndex((i=>i[this.valueField]===this.optionHighlighted))};this.isManualMode=this.activationType==="manual";this.scrollToSelected=i=>{const t=this.selectOnEnter?this.host.querySelector(`li[data-value="${this.optionHighlighted}"]`):i.querySelector(".option[aria-selected='true']");if(t){const e=t.offsetTop+t.offsetHeight;if(e>i.scrollTop+i.offsetHeight||e<i.scrollTop+i.offsetHeight){i.scrollTop=t.offsetTop}this.menu.setAttribute(this.ACTIVE_DESCENDANT,t.id);t.focus()}};this.loadUngroupedOptions=()=>{if(this.options.length>0&&this.options.map){this.options.map((i=>{if(i.children){i.children.map((i=>!i.disabled&&this.ungroupedOptions.push(i)))}else if(!i.disabled){this.ungroupedOptions.push(i)}}))}this.ungroupedOptions=this.getSortedOptions(this.ungroupedOptions);this.ungroupedOptionsSet.emit({options:this.ungroupedOptions})};this.setMenuScrollbar=()=>{let i=0;this.host.querySelectorAll(".option").forEach((t=>i+=t.clientHeight));if(i>=320){this.menu.classList.add("menu-scroll")}};this.handleTimeoutBlur=i=>{this.timeoutBlur.emit({ev:i})};this.optionContent=(i,t)=>{const s=!!i[this.valueField]&&!!this.value&&t&&this.parentEl.tagName!=="IC-SEARCH-BAR";return e(o,null,i.loading&&e("ic-loading-indicator",{size:"icon"}),e("div",{class:{"option-text-container":true,"show-check-icon":s}},e("div",{class:"option-label"},i.icon&&e("div",{class:"option-icon",innerHTML:i.icon,"aria-hidden":"true"}),e("ic-typography",{variant:"body","aria-hidden":"true"},i[this.labelField])),i.description&&e("ic-typography",{id:`${this.getOptionId(i[this.valueField])}-description`,class:"option-description",variant:"caption","aria-hidden":"true"},e("p",null,i.description)),i.element&&e("div",{class:"option-element",innerHTML:i.element.component,"aria-hidden":"true"})),s&&e("span",{class:"check-icon",innerHTML:f}))};this.displayOption=(i,t,s,n)=>{const{open:c,keyboardNav:r,isManualMode:a,initialOptionsListRender:h,optionHighlighted:l,options:u}=this;return e("li",{id:this.getOptionId(i[this.valueField]),class:{option:true,"focused-option":a?(r||h)&&i[this.valueField]===l:r&&t,"last-recommended-option":i.recommended&&u[s+1]&&!u[s+1].recommended,"disabled-option":i.disabled,"loading-option":i.loading,timeout:i.timedOut},role:"option",tabindex:c&&(t||i[this.valueField]===l)&&r?"0":"-1","aria-label":this.getOptionAriaLabel(i,n),"aria-selected":t?"true":"false","aria-disabled":i.disabled?"true":"false",onClick:!i.timedOut&&!i.loading&&this.handleOptionClick,onBlur:this.handleBlur,onMouseDown:this.handleMouseDown,"data-value":i[this.valueField],"data-label":i[this.labelField]},i.timedOut?e(o,null,e("div",{class:"loading-error-info"},e("svg",{class:"error-icon-svg","aria-labelledby":"error-title",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#000000"},e("title",{id:"error-title"},"Error"),e("g",{id:"close-octagon"},e("path",{id:"Vector",d:"M8.77 3L3.5 8.27V15.73L8.77 21H16.23L21.5 15.73V8.27L16.23 3M8.91 7L12.5 10.59L16.09 7L17.5 8.41L13.91 12L17.5 15.59L16.09 17L12.5 13.41L8.91 17L7.5 15.59L11.09 12L7.5 8.41"}))),e("ic-typography",{variant:"label"},i[this.labelField])),e("ic-button",{size:"small",variant:"tertiary",onClick:this.handleRetry,onKeyDown:this.handleRetryKeyDown,onBlur:this.handleTimeoutBlur,id:"retry-button"},"Retry")):this.optionContent(i,t))};this.focusFromSearchKeypress=false;this.initialOptionsListRender=false;this.keyboardNav=false;this.optionHighlighted=undefined;this.preventIncorrectTabOrder=false;this.menuOptions=undefined;this.activationType="automatic";this.anchorEl=undefined;this.autofocusOnSelected=true;this.closeOnSelect=true;this.fullWidth=false;this.inputEl=undefined;this.inputLabel=undefined;this.labelField="label";this.menuId=undefined;this.open=undefined;this.parentEl=undefined;this.searchMode="navigation";this.selectOnEnter=false;this.size="medium";this.options=undefined;this.value=undefined;this.valueField="value"}watchOpenHandler(){if(!this.open&&this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}}watchOptionsHandler(i){this.hasTimedOut=i.some((i=>i.timedOut));this.isLoading=i.some((i=>i.loading));this.ungroupedOptions=[];this.loadUngroupedOptions()}connectedCallback(){this.getParentEl(this.parentEl);if(this.isSearchBar){if(this.searchMode==="navigation")this.setHighlightedOption(0);this.initialOptionsListRender=true}}disconnectedCallback(){var i,t;if(this.popperInstance){this.popperInstance.destroy()}(i=this.parentEl)===null||i===void 0?void 0:i.removeEventListener("icClear",this.handleClearListener);(t=this.parentEl)===null||t===void 0?void 0:t.removeEventListener("icSubmitSearch",this.handleSubmitSearch)}componentWillLoad(){var i,t;this.loadUngroupedOptions();this.parentEl.addEventListener("icClear",this.handleClearListener);this.parentEl.addEventListener("icSubmitSearch",this.handleSubmitSearch);this.hasTimedOut=(i=this.options)===null||i===void 0?void 0:i.some((i=>i.timedOut));this.isLoading=(t=this.options)===null||t===void 0?void 0:t.some((i=>i.loading))}componentDidLoad(){if(this.isSearchBar&&this.parentEl.disableAutoFiltering){this.focusFromSearchKeypress=true}p([{prop:this.open,propName:"open"},{prop:this.options,propName:"options"},{prop:this.menuId,propName:"menu-id"},{prop:this.inputLabel,propName:"input-label"}],"Menu")}componentDidUpdate(){const i=this.options.some((i=>i[this.valueField]===this.value));if(this.open&&this.options.length!==0&&!this.preventMenuFocus){if(this.value&&this.keyboardNav&&i&&this.autofocusOnSelected&&!this.isSearchableSelect){this.scrollToSelected(this.menu)}else if(this.selectOnEnter){this.menu.focus()}else if(!!this.optionHighlighted&&!this.focusFromSearchKeypress&&!this.preventIncorrectTabOrder){const i=this.host.querySelector(`li[data-value="${this.optionHighlighted}"]`);if(i){this.menu.setAttribute(this.ACTIVE_DESCENDANT,i.id);i.focus()}}else if(this.inputEl.tagName!=="IC-TEXT-FIELD"&&this.inputEl.tagName!=="INPUT"){this.menu.focus()}}if(this.open&&!this.value&&this.selectOnEnter){this.scrollToSelected(this.menu)}this.preventMenuFocus=false}componentDidRender(){if(this.open&&!this.popperInstance&&this.anchorEl){this.initPopperJs(this.anchorEl)}if(this.open&&!!this.options.length){this.setMenuScrollbar()}}async handleClickOpen(){if(!this.preventClickOpen){this.menuStateChange.emit({open:!this.open});this.keyboardNav=false}this.preventClickOpen=false}async handleKeyboardOpen(i){if(this.activationType==="automatic"){this.autoSetInputValueKeyboardOpen(i)}else{this.manualSetInputValueKeyboardOpen(i)}}async handleSetFirstOption(){this.setHighlightedOption(0)}async initPopperJs(i){this.popperInstance=b(i,this.host,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,7]}},{name:"flip",options:{fallbackPlacements:["top-start"],rootBoundary:"viewport"}}]})}focusOnSearchOrSelectInput(i,t){if(!i[t])return;if(this.isSearchBar){this.parentEl.setFocus();if(this.searchMode==="navigation")this.setHighlightedOption(0)}if(this.isSearchableSelect){this.parentEl.setFocus()}this.focusFromSearchKeypress=true}render(){const{inputLabel:i,options:t,menuId:n,value:c,fullWidth:o,hasTimedOut:r,isLoading:a,size:h,open:l,inputEl:u,keyboardNav:d}=this;const p=`${(c===null||c===void 0?void 0:c.length)===this.ungroupedOptions.length?"Clear":"Select"} all`;const f=this.host.classList.contains("no-results");return e(s,{class:{"ic-menu-full-width":o,"ic-menu-no-focus":(u===null||u===void 0?void 0:u.tagName)==="INPUT"||r||a,[`ic-menu-${h}`]:true,"ic-menu-open":l&&t.length!==0,"ic-menu-multiple":this.isMultiSelect}},t.length!==0&&e("ul",{id:n,class:"menu",role:"listbox","aria-label":`${i} pop-up`,"aria-multiselectable":this.isMultiSelect?"true":"false",tabindex:l&&!d&&(u===null||u===void 0?void 0:u.tagName)!=="INPUT"?"0":"-1",ref:i=>this.menu=i,onKeyDown:this.handleMenuKeyDown,onKeyUp:this.handleMenuKeyUp,onBlur:this.handleBlur},this.getSortedOptions(t).map(((i,t)=>{if(i.children){if(i.children.length>0){return e("div",null,e("ic-typography",{class:"option-group-title",role:"presentation",variant:"subtitle-small"},e("p",null,i[this.labelField])),i.children.map((e=>e.label&&this.displayOption(e,this.isMultiSelect?c===null||c===void 0?void 0:c.includes(e[this.valueField]):e[this.valueField]===c,t,i))))}else{return null}}else{return i.label&&this.displayOption(i,this.isMultiSelect?c===null||c===void 0?void 0:c.includes(i[this.valueField]):i[this.valueField]===c,t)}}))),t.length!==0&&this.isMultiSelect&&!a&&!r&&!f&&e("div",{class:"option-bar"},e("ic-typography",null,e("p",null,`${c?c.length:0}/${m(this.options)} selected`)),e("ic-button",{class:"select-all-button","aria-label":`${p} options for ${i}`,ref:i=>this.selectAllButton=i,variant:"tertiary",onClick:this.handleSelectAllClick,onMouseDown:this.handleSelectAllMouseDown,onBlur:this.handleSelectAllBlur,onFocus:this.handleSelectAllFocus,size:h==="small"?"small":"medium"},p)))}get host(){return n(this)}static get watchers(){return{open:["watchOpenHandler"],options:["watchOptionsHandler"]}}};k.style=w;export{g as ic_input_component_container,y as ic_input_container,k as ic_menu};
2
- //# sourceMappingURL=p-aefebee9.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["icInputComponentContainerCss","InputComponentContainer","this","hostMutationCallback","mutationList","some","type","addedNodes","removedNodes","checkSlotInChildMutations","forceUpdate","watchDisabledHandler","removeDisabledFalse","disabled","el","componentWillLoad","componentDidLoad","hostMutationObserver","MutationObserver","observe","childList","render","size","validationStatus","readonly","multiLine","fullWidth","validationInline","h","Host","class","slotHasContent","name","IcInformationStatus","Success","innerHTML","successIcon","icInputContainerCss","InputContainer","icMenuCss","Menu","ACTIVE_DESCENDANT","CLEAR_BUTTON_ID","disabledOptionSelected","hasPreviouslyBlurred","hasTimedOut","isLoading","isMultiSelect","isSearchBar","isSearchableSelect","lastOptionSelected","lastOptionFocused","multiOptionClicked","preventClickOpen","preventMenuFocus","shiftPressed","ungroupedOptions","handleClearListener","optionHighlighted","handleSubmitSearch","highlightedOptionIndex","options","findIndex","option","valueField","setInputValue","handleMenuChange","open","focusInput","menuStateChange","emit","inputEl","focus","undefined","setNextOptionValue","selectedOptionIndex","menuOptionSelect","value","optionId","getOptionId","setPreviousOptionValue","length","getParentEl","parent","tagName","getAttribute","arrowBehaviour","event","preventDefault","getMenuOptions","setHighlightedOption","highlightedIndex","menuOptions","timedOut","autoSetInputValueKeyboardOpen","keyboardNav","key","target","id","selectHighlightedOption","isOpen","isOptionSelected","index","includes","deselectSelectedOptions","optionsToKeepSelected","selectedOptionIndexes","map","forEach","manualSetInputValueKeyboardOpen","isKeyboardCombination","shiftKey","metaKey","ctrlKey","getOptionHighlightedIndex","clickedMultiOptionIndex","_a","Array","from","host","querySelectorAll","handleOptionSelect","handleSingleShiftSelect","menuOptionId","preventIncorrectTabOrder","focusFromSearchKeypress","startOptionIndex","handleMultipleShiftSelect","endOptionIndex","stopImmediatePropagation","isMacDevice","emitSelectAll","selectAllButton","focusOnSearchOrSelectInput","closeOnSelect","parentEl","setFocus","handleOptionClick","label","dataset","handleRetry","retryButtonClicked","handleRetryKeyDown","ev","keyPressed","handleBlur","relatedTarget","menu","removeAttribute","contains","handleMouseDown","handleMenuKeyDown","activationType","autoSetValueOnMenuKeyDown","handleMenuKeyUp","handleSelectAllClick","handleSelectAllBlur","classList","remove","handleSelectAllFocus","add","handleSelectAllMouseDown","optionToSelectIndex","lastOptionInSelection","useFocusForSelection","firstOptionSelected","firstOptionInSelection","getFirstOptionInSelection","optionsToSelect","i","push","optionIndex","menuOptionSelectAll","select","emitMenuKeyPress","isNavKey","menuKeyPress","cancelBubble","menuId","getOptionAriaLabel","parentOption","ariaLabel","labelField","description","element","getSortedOptions","sorted","sort","optionA","optionB","recommended","isManualMode","scrollToSelected","selectedOption","selectOnEnter","querySelector","elTop","offsetTop","offsetHeight","scrollTop","setAttribute","loadUngroupedOptions","children","ungroupedOptionsSet","setMenuScrollbar","optionsHeight","clientHeight","handleTimeoutBlur","timeoutBlur","optionContent","selected","showCheckIcon","Fragment","loading","icon","variant","component","Check","displayOption","initialOptionsListRender","timeout","role","tabindex","onClick","onBlur","onMouseDown","xmlns","viewBox","fill","d","onKeyDown","watchOpenHandler","popperInstance","destroy","watchOptionsHandler","newOptions","opt","connectedCallback","searchMode","disconnectedCallback","removeEventListener","_b","addEventListener","disableAutoFiltering","onComponentRequiredPropUndefined","prop","propName","inputLabel","componentDidUpdate","inputValueInOptions","autofocusOnSelected","highlightedEl","componentDidRender","anchorEl","initPopperJs","handleClickOpen","handleKeyboardOpen","handleSetFirstOption","anchor","createPopper","placement","modifiers","offset","fallbackPlacements","rootBoundary","selectAllButtonText","hasNoResults","ref","onKeyUp","childOption","getOptionsWithoutGroupTitlesCount","onFocus"],"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","src/components/ic-input-container/ic-input-container.css?tag=ic-input-container","src/components/ic-input-container/ic-input-container.tsx","src/components/ic-menu/ic-menu.css?tag=ic-menu&encapsulation=scoped","src/components/ic-menu/ic-menu.tsx"],"sourcesContent":["ic-input-component-container {\n /**\n * @prop --border-color: Border colour of the input component container\n * @prop --border-color-hover: Border colour of the input component container on hover\n * @prop --border-color-pressed: Border colour of the input component container when pressed\n * @prop --border-color-disabled: Border colour of the input component container when disabled\n * @prop --border-color-error: Border colour of the error variant for input component container\n * @prop --border-color-error-hover: Border colour of the error hover variant for input component container\n * @prop --border-color-error-pressed: Border colour of the error pressed variant for input component container\n * @prop --border-color-warning: Border colour of the warning variant for input component container\n * @prop --border-color-warning-hover: Border colour of the warning hover variant for input component container\n * @prop --border-color-warning-pressed: Border colour of the warning pressed variant for input component container\n * @prop --border-color-success: Border colour of the success variant for input component container\n * @prop --border-color-success-hover: Border colour of the success hover variant for input component container\n * @prop --border-color-success-pressed: Border colour of the success pressed variant for 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(--input-bg-color, var(--ic-color-background-primary));\n box-sizing: border-box;\n fill: var(--ic-architectural-400);\n outline: none;\n}\n\nic-input-component-container.ic-input-component-container-full-width {\n width: 100%;\n}\n\nic-input-component-container.ic-input-component-container-disabled,\nic-input-component-container.ic-input-component-container-disabled:hover {\n border: var(--ic-border-width) dashed\n var(--border-color-disabled, var(--ic-color-border-neutral-disabled));\n}\n\nic-input-component-container.ic-input-component-container-readonly,\nic-input-component-container.ic-input-component-container-readonly:hover {\n border: none;\n padding: 0;\n}\n\nic-input-component-container.ic-input-component-container-error {\n border: var(--ic-space-xxxs) solid\n var(--border-color-error, var(--ic-color-border-error));\n padding: 0;\n}\n\nic-input-component-container.ic-input-component-container-error:hover {\n border: var(--ic-space-xxxs) solid\n var(--border-color-error-hover, var(--ic-color-border-error-hover));\n}\n\nic-input-component-container.ic-input-component-container-error:focus-within {\n border: var(--ic-space-xxxs) solid\n var(--border-color-error-pressed, var(--ic-color-border-error-pressed));\n}\n\nic-input-component-container.ic-input-component-container-warning {\n border: var(--ic-space-xxxs) solid\n var(--border-color-warning, var(--ic-color-border-warning));\n padding: 0;\n}\n\nic-input-component-container.ic-input-component-container-warning:hover {\n border: var(--ic-space-xxxs) solid\n var(--border-color-warning-hover, var(--ic-color-border-warning-hover));\n}\n\nic-input-component-container.ic-input-component-container-warning:focus-within {\n border: var(--ic-space-xxxs) solid\n var(--border-color-warning-pressed, var(--ic-color-border-warning-pressed));\n}\n\nic-input-component-container.ic-input-component-container-success {\n border: var(--ic-space-xxxs) solid\n var(--border-color-success, var(--ic-color-border-success));\n padding: 0;\n}\n\nic-input-component-container.ic-input-component-container-success:hover {\n border: var(--ic-space-xxxs) solid\n var(--border-color-success-hover, var(--ic-color-border-success-hover));\n}\n\nic-input-component-container.ic-input-component-container-success:focus-within {\n border: var(--ic-space-xxxs) solid\n var(--border-color-success-pressed, var(--ic-color-border-success-pressed));\n}\n\nic-input-component-container.ic-input-component-container-small {\n height: var(--ic-space-xl);\n}\n\nic-input-component-container.ic-input-component-container-large {\n height: var(--ic-space-xxl);\n}\n\nic-input-component-container.ic-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.ic-input-component-container-multiline\n .icon-container,\nic-input-component-container.ic-input-component-container-multiline.ic-input-component-container-small\n .icon-container {\n margin-top: 0.375rem;\n display: block;\n}\n\nic-input-component-container.ic-input-component-container-readonly\n .icon-container {\n margin-left: -0.313rem;\n}\n\nic-input-component-container.ic-input-component-container-disabled\n ::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 .inline-success > svg {\n fill: var(--ic-input-component-container-success-icon-inline-color);\n height: 1.25rem;\n width: 1.25rem;\n}\n\nic-input-component-container:hover {\n border: var(--ic-input-component-container-hover-border);\n border-color: var(--border-color-hover, var(--ic-color-border-neutral-hover));\n color: var(--ic-action-dark-hover);\n}\n\nic-input-component-container:focus {\n border: var(--ic-border-pressed);\n border-color: var(\n --border-color-pressed,\n var(--ic-color-border-neutral-pressed)\n );\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.ic-input-component-container-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.ic-input-component-container-disabled,\n ic-input-component-container.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 * 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 = \"medium\";\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 validationStatus,\n disabled,\n readonly,\n multiLine,\n fullWidth,\n validationInline,\n } = this;\n\n return (\n <Host\n class={{\n [`ic-input-component-container-${size}`]: true,\n [`ic-input-component-container-${validationStatus}`]:\n validationStatus !== \"\" && !disabled && !readonly,\n \"ic-input-component-container-disabled\": disabled,\n \"ic-input-component-container-readonly\": readonly,\n \"ic-input-component-container-multiline\": multiLine,\n \"ic-input-component-container-full-width\": fullWidth,\n }}\n aria-disabled={disabled ? \"true\" : null}\n >\n <div class=\"focus-indicator\">\n {slotHasContent(this.el, \"left-icon\") && (\n <div class=\"icon-container\">\n <slot name=\"left-icon\" />\n </div>\n )}\n <slot></slot>\n\n {validationInline &&\n validationStatus === IcInformationStatus.Success && (\n <span class=\"inline-success\" innerHTML={successIcon} />\n )}\n </div>\n </Host>\n );\n }\n}\n","ic-input-container .component-container {\n display: flex;\n flex-direction: column;\n}\n","import { Component, Host, Prop, h } from \"@stencil/core\";\n\n@Component({\n tag: \"ic-input-container\",\n styleUrl: \"ic-input-container.css\",\n})\nexport class InputContainer {\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * If `true`, the readonly state will be set.\n */\n @Prop() readonly?: boolean = false;\n\n render() {\n return (\n <Host>\n <div\n class={{\n [\"component-container\"]: true,\n [\"disabled\"]: this.disabled,\n [\"readonly\"]: this.readonly,\n }}\n >\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n","@import \"../../global/normalize.css\";\n\n/**\n * @prop --ic-z-index-menu: z-index of menu\n */\n\n@media (prefers-reduced-motion: no-preference) {\n :host(.ic-menu-open) .menu {\n transition: max-height var(--ic-transition-duration-slow);\n }\n}\n\n:host {\n max-height: 0;\n width: var(--menu-width, var(--input-width, 20rem));\n color: var(--menu-item-text-color, var(--ic-menu-list-option-text-color));\n\n --ic-typography-color: var(\n --menu-item-text-color,\n var(--ic-menu-list-option-text-color)\n );\n\n background-color: var(\n --menu-bg-color,\n var(--ic-menu-list-option-background-color)\n );\n position: relative;\n z-index: var(--ic-z-index-menu);\n box-sizing: border-box;\n box-shadow: var(--ic-elevation-overlay);\n border-radius: var(--ic-border-radius);\n}\n\n:host(.ic-menu-open:not(.ic-menu-no-focus):focus-within) {\n box-shadow: var(--ic-border-focus);\n outline: var(--ic-hc-focus-outline);\n}\n\n:host(.ic-select-select-all-focused) {\n box-shadow: var(--ic-elevation-overlay) !important;\n}\n\n#retry-button::part(button) {\n height: var(--ic-space-lg);\n}\n\n.small #retry-button::part(button) {\n height: var(--ic-space-md);\n}\n\n:host(.on-dialog) {\n inset: auto !important;\n}\n\n.menu {\n text-decoration: none;\n list-style-type: none;\n border-radius: 1px;\n background-color: var(\n --menu-bg-color,\n var(--ic-menu-list-option-background-color)\n );\n visibility: hidden;\n max-height: 0;\n overflow-y: hidden;\n}\n\n.menu:has(+ .option-bar) {\n border-radius: 0 0 1px 1px;\n}\n\n.menu-scroll {\n overflow-y: auto;\n}\n\n.menu:focus-visible {\n outline: none;\n}\n\n:host(.ic-menu-open) {\n max-height: none;\n display: flex;\n flex-direction: column-reverse;\n border: var(--ic-border-width) solid\n var(--menu-border-color, var(--ic-menu-border-color));\n transition: box-shadow var(--ic-easing-transition-fast);\n}\n\n:host(.ic-menu-open) .menu {\n visibility: visible;\n max-height: calc(var(--ic-space-xl) * 10 + var(--ic-space-xxxs));\n}\n\n:host(.ic-menu-open) .option-bar {\n visibility: visible;\n}\n\n:host(.ic-menu-open) .select-all-button {\n display: block;\n}\n\n:host(.ic-menu-full-width) {\n width: 100%;\n}\n\n.option {\n padding: var(--ic-space-xs) calc(var(--ic-space-xs) - var(--ic-space-1px));\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n\n.loading-option p {\n margin-bottom: 0 !important;\n}\n\n.option:not(.loading-option) {\n justify-content: space-between;\n}\n\n:host(.ic-menu-small) .option {\n padding: var(--ic-space-xxs) calc(var(--ic-space-xs) - var(--ic-space-1px));\n}\n\n:host(.ic-menu-large) .option {\n padding: var(--ic-space-sm) calc(var(--ic-space-xs) - var(--ic-space-1px));\n}\n\n.option:last-child {\n border-radius: 0 0 1px 1px;\n}\n\n:not(.menu:has(+ .option-bar)) .option:first-child {\n border-radius: 1px 1px 0 0;\n}\n\n.option:not(.disabled-option):hover {\n background-color: var(--ic-menu-list-option-hover-background-color);\n}\n\n.option:not(.disabled-option):active {\n background-color: var(--ic-menu-list-option-pressed-background-color);\n}\n\n.option:focus-visible {\n outline: var(--ic-hc-focus-outline);\n}\n\n.option:not(.disabled-option) .option-description {\n --ic-typography-color: var(\n --menu-item-desc-text-color,\n var(--ic-menu-list-option-description-text-color)\n );\n}\n\n.option .option-label {\n display: flex;\n flex-direction: row;\n align-items: top;\n}\n\n.option .option-label ic-typography {\n max-width: 100%;\n word-wrap: break-word;\n}\n\n.option .option-element {\n margin-top: var(--ic-space-xxs);\n}\n\n.option .option-icon {\n height: var(--ic-space-md);\n width: var(--ic-space-md);\n margin-top: var(--ic-space-xxs);\n margin-right: var(--ic-space-xxxs);\n}\n\n.option-text-container {\n pointer-events: none;\n width: 100%;\n}\n\n.option-text-container.show-check-icon {\n width: calc(var(--ic-space-lg) * 10 + var(--ic-space-xl));\n}\n\n.option.loading-option .option-text-container {\n margin-left: calc(var(--ic-space-xs) + var(--ic-space-xxxs));\n color: var(--ic-menu-loading-list-option-text-color);\n\n --ic-typography-color: var(--ic-menu-loading-list-option-text-color);\n}\n\n.error-icon-svg {\n height: var(--ic-space-md);\n width: var(--ic-space-md);\n fill: var(--ic-atoms-status-icon-error);\n align-self: center;\n display: flex;\n margin-right: calc(var(--ic-space-xxs) * 1.2);\n}\n\n.loading-error-info {\n display: flex;\n}\n\n.check-icon {\n height: var(--ic-space-lg);\n min-width: var(--ic-space-lg);\n width: var(--ic-space-lg);\n margin-left: var(--ic-space-xs);\n pointer-events: none;\n}\n\n.focused-option .check-icon * {\n fill: currentcolor;\n}\n\n.option-group-title {\n padding: var(--ic-space-lg) calc(var(--ic-space-xs) - var(--ic-space-1px))\n var(--ic-space-xs);\n\n --ic-typography-color: var(--ic-menu-option-group-label-text-color);\n}\n\n:host(.ic-menu-small) .option-group-title {\n padding: var(--ic-space-sm) calc(var(--ic-space-xs) - var(--ic-space-1px))\n var(--ic-space-xxs);\n}\n\n.last-recommended-option {\n border-bottom: var(--ic-menu-last-recommended-option-border);\n}\n\n.disabled-option {\n color: var(--ic-atoms-list-option-text-disabled-light);\n\n --ic-typography-color: var(--ic-atoms-list-option-text-disabled-light);\n\n cursor: default;\n pointer-events: none;\n}\n\n.focused-option,\n.focused-option .option-description {\n background-color: var(--ic-color-focus-inner) !important;\n color: var(--ic-atoms-list-option-text-focused-light) !important;\n\n --ic-typography-color: var(\n --ic-atoms-list-option-text-focused-light\n ) !important;\n}\n\n:host(.no-results) li {\n cursor: no-drop;\n}\n\n:host(.no-results) li:hover {\n background-color: transparent;\n}\n\n.option-bar {\n padding: var(--ic-space-xxs) var(--ic-space-xs);\n display: flex;\n align-items: center;\n justify-content: space-between;\n background-color: var(--ic-menu-option-bar-background-color);\n visibility: hidden;\n border-bottom: var(--ic-border-width) solid\n var(--ic-menu-option-bar-divider-color);\n border-radius: 1px 1px 0 0;\n}\n\n.option-bar p {\n margin-bottom: 0 !important;\n}\n\n:host(.ic-menu-large) .option-bar {\n padding: var(--ic-space-xs);\n}\n\n.select-all-button {\n display: none;\n}\n\n.select-all-button:focus {\n z-index: calc(var(--ic-z-index-menu) + 1);\n}\n\n@media (forced-colors: active) {\n .focused-option:focus {\n outline: none;\n border: 0.125rem solid transparent;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n Method,\n State,\n Watch,\n Fragment,\n} from \"@stencil/core\";\nimport { createPopper, Instance as PopperInstance } from \"@popperjs/core\";\n\nimport {\n IcActivationTypes,\n IcMenuOption,\n IcSizes,\n IcValueEventDetail,\n} from \"../../utils/types\";\nimport Check from \"../../assets/check-icon.svg\";\nimport {\n getOptionsWithoutGroupTitlesCount,\n isMacDevice,\n onComponentRequiredPropUndefined,\n} from \"../../utils/helpers\";\nimport {\n IcOptionSelectEventDetail,\n IcMenuChangeEventDetail,\n IcMenuOptionIdEventDetail,\n} from \"./ic-menu.types\";\nimport { IcSearchBarSearchModes } from \"../ic-search-bar/ic-search-bar.types\";\n\n@Component({\n tag: \"ic-menu\",\n styleUrl: \"ic-menu.css\",\n scoped: true,\n})\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport class Menu {\n private ACTIVE_DESCENDANT = \"aria-activedescendant\";\n private CLEAR_BUTTON_ID = \"clear-button\";\n private disabledOptionSelected: boolean = false;\n private hasPreviouslyBlurred: boolean = false;\n private hasTimedOut: boolean = false;\n private isLoading: boolean = false;\n private isMultiSelect: boolean = false;\n private isSearchBar: boolean = false;\n private isSearchableSelect: boolean = false;\n private lastOptionSelected: number = null; // Index of last option selected\n private lastOptionFocused: number = null; // Index of last option focused\n private menu: HTMLUListElement;\n private multiOptionClicked: string = null;\n private popperInstance: PopperInstance;\n private preventClickOpen: boolean = false; // Prevents menu re-opening immediately after it is closed on blur when clicking input.\n private preventMenuFocus: boolean = false; // (When multiple) ensures focus moves straight to select all button from menu.\n private selectAllButton: HTMLIcButtonElement;\n private shiftPressed: boolean = false;\n private ungroupedOptions: IcMenuOption[] = [];\n\n @Element() host: HTMLIcMenuElement;\n\n @State() focusFromSearchKeypress: boolean = false;\n @State() initialOptionsListRender: boolean = false;\n @State() keyboardNav: boolean = false;\n @State() optionHighlighted: string;\n @State() preventIncorrectTabOrder: boolean = false;\n @State() menuOptions: IcMenuOption[];\n\n /**\n * Determines whether options manually set as values (by pressing 'Enter') when they receive focus using keyboard navigation.\n */\n @Prop() activationType?: IcActivationTypes = \"automatic\";\n\n /**\n * The reference to an anchor element the menu will position itself from when rendered.\n */\n @Prop() anchorEl!: HTMLElement;\n\n /**\n * @internal If `true`, autofocus will be applied on selected item when menu is open.\n */\n @Prop() autofocusOnSelected: boolean = true;\n\n /**\n * If `true`, the menu will close when an option is selected.\n */\n @Prop() closeOnSelect: boolean = true;\n\n /**\n * If `true`, the menu will fill the width of the container.\n */\n @Prop() fullWidth: boolean = false;\n\n /**\n * The reference to the input element.\n */\n @Prop() inputEl!: HTMLElement;\n\n /**\n * The label for the input element.\n */\n @Prop() inputLabel!: string;\n\n /**\n * The custom name for the label field for IcMenuOption.\n */\n @Prop() labelField: string = \"label\";\n\n /**\n * The ID of the menu.\n */\n @Prop() menuId!: string;\n\n /**\n * If `true`, the menu will be displayed open.\n */\n @Prop({ reflect: true }) open!: boolean;\n\n @Watch(\"open\")\n watchOpenHandler(): void {\n if (!this.open && this.popperInstance) {\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n }\n\n /**\n * @internal - The parent element if ic-menu is nested inside another component.\n */\n @Prop() parentEl?: HTMLElement;\n\n /**\n * Specify the mode search bar uses to search. `navigation` allows for quick lookups of a set of values, `query` allows for more general searches.\n */\n @Prop() searchMode?: IcSearchBarSearchModes = \"navigation\";\n\n /**\n * @internal If `true`, the icOptionSelect event will be fired on enter instead of ArrowUp and ArrowDown.\n */\n @Prop() selectOnEnter?: boolean = false;\n\n /**\n * The size of the menu.\n */\n @Prop() size?: IcSizes = \"medium\";\n\n /**\n * The possible menu selection options.\n */\n @Prop() options!: IcMenuOption[];\n\n @Watch(\"options\")\n watchOptionsHandler(newOptions: IcMenuOption[]): void {\n this.hasTimedOut = newOptions.some((opt) => opt.timedOut);\n this.isLoading = newOptions.some((opt) => opt.loading);\n this.ungroupedOptions = [];\n this.loadUngroupedOptions();\n }\n\n /**\n * The value of the currently selected option - or array of values (if multiple options allowed).\n */\n @Prop() value!: string | string[];\n\n /**\n * The custom name for the value field for IcMenuOption.\n */\n @Prop() valueField: string = \"value\";\n\n /**\n * @internal Emitted when key is pressed while menu is open.\n */\n @Event() menuKeyPress: EventEmitter<{ isNavKey: boolean; key: string }>;\n\n /**\n * @internal Emitted when an option has been highlighted.\n */\n @Event() menuOptionId: EventEmitter<IcMenuOptionIdEventDetail>;\n\n /**\n * @internal Emitted when an option is selected.\n */\n @Event() menuOptionSelect!: EventEmitter<IcOptionSelectEventDetail>;\n\n /**\n * @internal Emitted when all options are selected or deselected.\n */\n @Event() menuOptionSelectAll!: EventEmitter<{ select: boolean }>;\n\n /**\n * @internal Emitted when state of menu changes (i.e. open or closed).\n */\n @Event() menuStateChange!: EventEmitter<IcMenuChangeEventDetail>;\n\n /**\n * @internal Emitted when the retry button is clicked.\n */\n @Event() retryButtonClicked: EventEmitter<IcValueEventDetail>;\n\n /**\n * @internal Emitted when the timeout menu loses focus.\n */\n @Event() timeoutBlur: EventEmitter<{ ev: FocusEvent }>;\n\n /**\n * @internal Emitted when the ungrouped options have been set.\n */\n @Event() ungroupedOptionsSet: EventEmitter<{ options: IcMenuOption[] }>;\n\n connectedCallback(): void {\n this.getParentEl(this.parentEl);\n\n if (this.isSearchBar) {\n if (this.searchMode === \"navigation\") this.setHighlightedOption(0);\n this.initialOptionsListRender = true;\n }\n }\n\n disconnectedCallback(): void {\n if (this.popperInstance) {\n this.popperInstance.destroy();\n }\n this.parentEl?.removeEventListener(\"icClear\", this.handleClearListener);\n this.parentEl?.removeEventListener(\n \"icSubmitSearch\",\n this.handleSubmitSearch\n );\n }\n\n componentWillLoad(): void {\n this.loadUngroupedOptions();\n this.parentEl.addEventListener(\"icClear\", this.handleClearListener);\n this.parentEl.addEventListener(\"icSubmitSearch\", this.handleSubmitSearch);\n this.hasTimedOut = this.options?.some((opt) => opt.timedOut);\n this.isLoading = this.options?.some((opt) => opt.loading);\n }\n\n componentDidLoad(): void {\n if (\n this.isSearchBar &&\n (this.parentEl as HTMLIcSearchBarElement).disableAutoFiltering\n ) {\n this.focusFromSearchKeypress = true;\n }\n\n onComponentRequiredPropUndefined(\n [\n { prop: this.open, propName: \"open\" },\n { prop: this.options, propName: \"options\" },\n { prop: this.menuId, propName: \"menu-id\" },\n { prop: this.inputLabel, propName: \"input-label\" },\n //NOTE: no check for value, input-el or anchor-el as otherwise get console errors on first load of select component\n ],\n \"Menu\"\n );\n }\n\n componentDidUpdate(): void {\n const inputValueInOptions = this.options.some(\n (option) => option[this.valueField] === this.value\n );\n\n if (this.open && this.options.length !== 0 && !this.preventMenuFocus) {\n if (\n this.value &&\n this.keyboardNav &&\n inputValueInOptions &&\n this.autofocusOnSelected &&\n !this.isSearchableSelect\n ) {\n this.scrollToSelected(this.menu);\n } else if (this.selectOnEnter) {\n this.menu.focus();\n } else if (\n !!this.optionHighlighted &&\n !this.focusFromSearchKeypress &&\n !this.preventIncorrectTabOrder\n ) {\n const highlightedEl = this.host.querySelector(\n `li[data-value=\"${this.optionHighlighted}\"]`\n ) as HTMLElement;\n\n if (highlightedEl) {\n this.menu.setAttribute(this.ACTIVE_DESCENDANT, highlightedEl.id);\n highlightedEl.focus();\n }\n } else if (\n this.inputEl.tagName !== \"IC-TEXT-FIELD\" &&\n this.inputEl.tagName !== \"INPUT\"\n ) {\n this.menu.focus();\n }\n }\n\n if (this.open && !this.value && this.selectOnEnter) {\n this.scrollToSelected(this.menu);\n }\n\n this.preventMenuFocus = false;\n }\n\n componentDidRender(): void {\n if (this.open && !this.popperInstance && this.anchorEl) {\n this.initPopperJs(this.anchorEl);\n }\n\n if (this.open && !!this.options.length) {\n this.setMenuScrollbar();\n }\n }\n\n /**\n * @internal If menu is opened with the mouse, emit menuStateChange custom event.\n */\n @Method()\n async handleClickOpen(): Promise<void> {\n if (!this.preventClickOpen) {\n this.menuStateChange.emit({ open: !this.open });\n this.keyboardNav = false;\n }\n this.preventClickOpen = false;\n }\n\n /**\n * Used alongside activationType\n * If menu is opened via keyboard navigation (i.e. Enter, ArrowUp or ArrowDown), emit optionSelect custom event.\n * @param {KeyboardEvent} event The keyboard event which is available when handleKeyboardOpen is invoked.\n */\n @Method()\n async handleKeyboardOpen(event: KeyboardEvent): Promise<void> {\n if (this.activationType === \"automatic\") {\n this.autoSetInputValueKeyboardOpen(event);\n } else {\n this.manualSetInputValueKeyboardOpen(event);\n }\n }\n\n /**\n * @internal Used to highlight the first option in the menu.\n */\n @Method()\n async handleSetFirstOption(): Promise<void> {\n this.setHighlightedOption(0);\n }\n\n /**\n * @internal Used to initialize popperJS with an anchor element.\n * 5/12/2023: Tested with Floating UI, however, discovered inconsistent\n * boundary behaviour so sticking with PopperJS.\n */\n @Method()\n async initPopperJs(anchor: HTMLElement): Promise<void> {\n // Placements set to \"-start\" to accommodate for custom menu width - menu should always be aligned to the left\n this.popperInstance = createPopper(anchor, this.host, {\n placement: \"bottom-start\",\n modifiers: [\n {\n name: \"offset\",\n options: {\n offset: [0, 7],\n },\n },\n {\n name: \"flip\",\n options: {\n fallbackPlacements: [\"top-start\"],\n rootBoundary: \"viewport\",\n },\n },\n ],\n });\n }\n\n private handleClearListener = (): void => {\n this.optionHighlighted = \"\";\n };\n\n private handleSubmitSearch = (): void => {\n const highlightedOptionIndex = this.options.findIndex(\n (option) => option[this.valueField] === this.optionHighlighted\n );\n\n this.setInputValue(highlightedOptionIndex);\n };\n\n private handleMenuChange = (open: boolean, focusInput?: boolean): void => {\n this.menuStateChange.emit({ open, focusInput });\n\n if (!open) {\n if (focusInput !== false) {\n this.inputEl.focus();\n this.preventClickOpen = false;\n }\n\n // Reset optionHighlighted so previously highlighted option doesn't get reselected when Enter pressed\n if (this.isMultiSelect) {\n this.optionHighlighted = undefined;\n this.multiOptionClicked = null;\n }\n }\n };\n\n private setNextOptionValue = (selectedOptionIndex: number): void => {\n if (this.ungroupedOptions[selectedOptionIndex + 1]) {\n this.menuOptionSelect.emit({\n value: this.ungroupedOptions[selectedOptionIndex + 1][this.valueField],\n optionId: this.getOptionId(\n this.ungroupedOptions[selectedOptionIndex + 1][this.valueField]\n ),\n });\n } else {\n this.menuOptionSelect.emit({\n value: this.ungroupedOptions[0][this.valueField],\n optionId: this.getOptionId(this.ungroupedOptions[0][this.valueField]),\n });\n }\n };\n\n private setPreviousOptionValue = (selectedOptionIndex: number): void => {\n if (this.ungroupedOptions[selectedOptionIndex - 1]) {\n this.menuOptionSelect.emit({\n value: this.ungroupedOptions[selectedOptionIndex - 1][this.valueField],\n optionId: this.getOptionId(\n this.ungroupedOptions[selectedOptionIndex - 1][this.valueField]\n ),\n });\n } else {\n this.menuOptionSelect.emit({\n value:\n this.ungroupedOptions[this.ungroupedOptions.length - 1][\n this.valueField\n ],\n optionId: this.getOptionId(\n this.ungroupedOptions[this.ungroupedOptions.length - 1][\n this.valueField\n ]\n ),\n });\n }\n };\n\n private getParentEl = (parent: HTMLElement) => {\n if (parent.tagName === \"IC-SEARCH-BAR\") {\n this.isSearchBar = true;\n } else if (parent.tagName === \"IC-SELECT\") {\n if (\n parent.getAttribute(\"searchable\") !== null &&\n parent.getAttribute(\"searchable\") !== undefined\n ) {\n this.isSearchableSelect = true;\n } else if (\n parent.getAttribute(\"multiple\") !== null &&\n parent.getAttribute(\"multiple\") !== undefined\n ) {\n this.isMultiSelect = true;\n }\n }\n };\n\n // Open menu when up or down arrow keys are pressed\n private arrowBehaviour = (event: KeyboardEvent): void => {\n event.preventDefault();\n this.handleMenuChange(true);\n };\n\n private getMenuOptions = () =>\n this.isSearchBar ? this.options : this.ungroupedOptions;\n\n // Set option that is focused and so should show focus state\n private setHighlightedOption = (highlightedIndex: number): void => {\n const menuOptions = this.getMenuOptions();\n\n menuOptions[highlightedIndex] &&\n !menuOptions[highlightedIndex].timedOut &&\n (this.optionHighlighted =\n menuOptions[highlightedIndex][this.valueField] || undefined);\n };\n\n // Determines keyboard behaviour when selection is automatic\n // (i.e. you don't have to press Enter select an option - just focus on it)\n // and menu is closed\n private autoSetInputValueKeyboardOpen = (event: KeyboardEvent) => {\n const selectedOptionIndex = this.ungroupedOptions.findIndex(\n (option) => option[this.valueField] === this.value\n );\n\n this.keyboardNav = false;\n\n switch (event.key) {\n case \"ArrowDown\":\n this.keyboardNav = true;\n this.arrowBehaviour(event);\n this.setNextOptionValue(selectedOptionIndex);\n break;\n case \"ArrowUp\":\n this.keyboardNav = true;\n this.arrowBehaviour(event);\n this.setPreviousOptionValue(selectedOptionIndex);\n break;\n case \" \":\n case \"Enter\":\n if ((event.target as HTMLElement).id !== this.CLEAR_BUTTON_ID) {\n this.handleMenuChange(true);\n }\n break;\n }\n };\n\n private selectHighlightedOption = (\n options: IcMenuOption[],\n highlightedOptionIndex: number\n ) => {\n if (!this.isLoading && !this.hasTimedOut) {\n this.keyboardNav = true;\n }\n\n const isOpen: boolean =\n this.isSearchBar || this.isSearchableSelect || this.open;\n\n if (isOpen) {\n if (highlightedOptionIndex >= 0) {\n if (options[highlightedOptionIndex] !== undefined) {\n if (\n this.isSearchBar &&\n options[highlightedOptionIndex].disabled === true\n ) {\n this.disabledOptionSelected = true;\n } else {\n this.setInputValue(highlightedOptionIndex);\n }\n }\n } else {\n this.setInputValue(highlightedOptionIndex);\n }\n } else {\n this.handleMenuChange(true);\n }\n };\n\n // Check if option is selected based on the index of the option\n private isOptionSelected = (index: number) => {\n const menuOptions = this.getMenuOptions();\n\n return this.value\n ? this.value.includes(menuOptions[index][this.valueField])\n : false;\n };\n\n // Deselect currently selected options when shift pressed, but keep certain options selected\n private deselectSelectedOptions = (optionsToKeepSelected: number[]) => {\n const menuOptions = this.getMenuOptions();\n\n if (this.value) {\n const selectedOptionIndexes = (this.value as string[]).map((value) => {\n return menuOptions.findIndex(\n (option) => option[this.valueField] === value\n );\n });\n\n // Call setInputValue (which toggles the selected state) on options that need to be deselected\n selectedOptionIndexes.forEach(\n (index) =>\n !optionsToKeepSelected.includes(index) && this.setInputValue(index)\n );\n }\n };\n\n // Determines keyboard behaviour when selection is manual (i.e. when you have to press Enter to select an option)\n private manualSetInputValueKeyboardOpen = (event: KeyboardEvent) => {\n const menuOptions = this.getMenuOptions();\n\n // For preventing focus disappearing on currently focused option when Shift / Cmd / Ctrl pressed\n // (i.e. when user is likely in the middle of executing a keyboard combination to select options)\n const isKeyboardCombination =\n event.shiftKey || event.metaKey || event.ctrlKey;\n\n const highlightedOptionIndex = this.getOptionHighlightedIndex();\n\n const clickedMultiOptionIndex = menuOptions.findIndex(\n (option) => option[this.valueField] === this.multiOptionClicked\n );\n\n const getOptionId = (index: number): string =>\n Array.from(this.host.querySelectorAll(\"li\"))[index]?.id;\n\n // Space press should be equivalent to Enter when multi-select\n if (event.key === \" \" && this.isMultiSelect) {\n this.handleOptionSelect(event, highlightedOptionIndex);\n } else {\n switch (event.key) {\n case \"ArrowDown\":\n this.keyboardNav = true;\n this.arrowBehaviour(event);\n if (this.multiOptionClicked) {\n // Set focus to option last clicked\n // Prevents it resetting to the top of the menu when user switches to using keyboard\n this.setHighlightedOption(clickedMultiOptionIndex);\n this.multiOptionClicked = null;\n } else {\n this.handleSingleShiftSelect(\n event,\n highlightedOptionIndex,\n menuOptions\n );\n\n if (highlightedOptionIndex < menuOptions.length - 1) {\n this.setHighlightedOption(highlightedOptionIndex + 1);\n this.menuOptionId.emit({\n optionId: getOptionId(highlightedOptionIndex + 1),\n });\n\n this.handleSingleShiftSelect(\n event,\n highlightedOptionIndex + 1,\n menuOptions\n );\n } else {\n this.setHighlightedOption(0);\n this.menuOptionId.emit({\n optionId: getOptionId(0),\n });\n\n this.handleSingleShiftSelect(event, 0, menuOptions);\n }\n\n // Deselect currently selected options if arrow was pressed for first time after shift is held\n if (this.isMultiSelect && this.shiftPressed) {\n this.deselectSelectedOptions([\n highlightedOptionIndex,\n this.getOptionHighlightedIndex(),\n ]);\n this.shiftPressed = false;\n }\n }\n this.lastOptionFocused = this.getOptionHighlightedIndex();\n this.preventIncorrectTabOrder = false;\n this.focusFromSearchKeypress = false;\n break;\n case \"ArrowUp\":\n this.keyboardNav = true;\n this.arrowBehaviour(event);\n if (this.multiOptionClicked) {\n // Set focus to option last clicked\n // Prevents it resetting to the bottom of the menu when user switches to using keyboard\n this.setHighlightedOption(clickedMultiOptionIndex);\n this.multiOptionClicked = null;\n } else {\n this.handleSingleShiftSelect(\n event,\n highlightedOptionIndex,\n menuOptions\n );\n\n if (\n highlightedOptionIndex <= 0 ||\n highlightedOptionIndex > menuOptions.length + 1\n ) {\n this.setHighlightedOption(menuOptions.length - 1);\n this.menuOptionId.emit({\n optionId: getOptionId(menuOptions.length - 1),\n });\n\n this.handleSingleShiftSelect(\n event,\n menuOptions.length - 1,\n menuOptions\n );\n } else {\n this.setHighlightedOption(highlightedOptionIndex - 1);\n this.menuOptionId.emit({\n optionId: getOptionId(highlightedOptionIndex - 1),\n });\n\n this.handleSingleShiftSelect(\n event,\n highlightedOptionIndex - 1,\n menuOptions\n );\n }\n\n // Deselect currently selected options if arrow was pressed for first time after shift is held\n if (this.isMultiSelect && this.shiftPressed) {\n this.deselectSelectedOptions([\n highlightedOptionIndex,\n this.getOptionHighlightedIndex(),\n ]);\n this.shiftPressed = false;\n }\n }\n\n this.lastOptionFocused = this.getOptionHighlightedIndex();\n this.preventIncorrectTabOrder = false;\n this.focusFromSearchKeypress = false;\n break;\n case \"Home\": {\n const startOptionIndex = 0;\n\n this.keyboardNav = true;\n event.preventDefault();\n this.arrowBehaviour(event);\n this.setHighlightedOption(startOptionIndex);\n this.menuOptionId.emit({\n optionId: getOptionId(startOptionIndex),\n });\n\n if (event.shiftKey && event.ctrlKey) {\n this.handleMultipleShiftSelect(startOptionIndex);\n }\n\n this.lastOptionFocused = startOptionIndex;\n this.lastOptionSelected = startOptionIndex;\n break;\n }\n case \"End\": {\n const endOptionIndex = menuOptions.length - 1;\n\n this.keyboardNav = true;\n event.preventDefault();\n this.arrowBehaviour(event);\n this.setHighlightedOption(endOptionIndex);\n this.menuOptionId.emit({\n optionId: getOptionId(endOptionIndex),\n });\n\n if (event.shiftKey && event.ctrlKey) {\n this.handleMultipleShiftSelect(endOptionIndex);\n }\n\n this.lastOptionFocused = endOptionIndex;\n this.lastOptionSelected = endOptionIndex;\n break;\n }\n case \" \":\n if (!isKeyboardCombination) {\n this.keyboardNav = false;\n }\n if (this.isSearchBar || this.isSearchableSelect) {\n break;\n } else {\n if ((event.target as HTMLElement).id !== this.CLEAR_BUTTON_ID) {\n this.handleMenuChange(true);\n }\n }\n break;\n case \"Enter\":\n event.preventDefault();\n if (!isKeyboardCombination) {\n this.keyboardNav = false;\n }\n this.handleOptionSelect(event, highlightedOptionIndex);\n break;\n case \"Escape\":\n if (this.open) {\n event.stopImmediatePropagation();\n }\n this.handleMenuChange(false);\n this.menuOptionId.emit({ optionId: undefined });\n break;\n case \"a\":\n // Checks if Cmd (meta) key is pressed if Mac device (while excluding meta key on Windows)\n // Otherwise, if a different OS, checks Ctrl key\n if (\n (isMacDevice() && event.metaKey) ||\n (!isMacDevice() && event.ctrlKey)\n ) {\n this.emitSelectAll();\n this.lastOptionFocused = null;\n this.lastOptionSelected = null;\n }\n break;\n case \"Shift\":\n case \"Tab\":\n if (event.key === \"Shift\") {\n this.shiftPressed = true;\n }\n if (this.isSearchBar) {\n this.keyboardNav = true;\n }\n if (this.isMultiSelect) {\n if (this.open && !event.shiftKey && this.selectAllButton) {\n event.preventDefault();\n this.selectAllButton.focus(); // Move focus to select all button instead of focused option\n this.preventMenuFocus = true;\n this.preventClickOpen = true;\n this.optionHighlighted = undefined; // Stop any option focus states showing when focus moved to select all button\n }\n } else {\n this.preventIncorrectTabOrder = true;\n }\n break;\n default:\n if (!isKeyboardCombination) {\n this.keyboardNav = false;\n }\n this.focusOnSearchOrSelectInput(menuOptions, highlightedOptionIndex);\n }\n }\n };\n\n private setInputValue = (highlightedOptionIndex: number) => {\n const menuOptions = this.getMenuOptions();\n\n if (menuOptions[highlightedOptionIndex] !== undefined) {\n this.menuOptionSelect.emit({\n value: menuOptions[highlightedOptionIndex][this.valueField],\n });\n\n if (this.closeOnSelect) {\n this.optionHighlighted = undefined;\n this.menuOptionId.emit({ optionId: undefined });\n }\n }\n\n if (this.closeOnSelect) {\n if (!this.hasTimedOut) {\n this.handleMenuChange(false);\n } else {\n (this.parentEl as HTMLIcSearchBarElement).setFocus();\n }\n }\n };\n\n private handleOptionClick = (event: MouseEvent): void => {\n const { value, label } = (event.target as HTMLLIElement).dataset;\n\n if (this.isMultiSelect) {\n const menuOptions = this.getMenuOptions();\n const selectedOptionIndex = menuOptions.findIndex(\n (option) => option.value === value\n );\n\n this.handleOptionSelect(event, selectedOptionIndex, true);\n this.multiOptionClicked = value;\n } else {\n this.menuOptionSelect.emit({ value, label });\n this.handleMenuChange(false);\n }\n\n this.optionHighlighted = undefined;\n };\n\n private handleRetry = (): void => {\n this.retryButtonClicked.emit({ value: this.value });\n };\n\n private handleRetryKeyDown = (ev: KeyboardEvent): void => {\n if (ev.key === \"Enter\" || ev.key === \" \") {\n ev.preventDefault();\n this.retryButtonClicked.emit({ value: this.value, keyPressed: ev.key });\n }\n };\n\n private handleBlur = (event: FocusEvent): void => {\n if (event.relatedTarget !== this.inputEl) {\n if (event.relatedTarget === this.selectAllButton) {\n this.menu.removeAttribute(this.ACTIVE_DESCENDANT);\n }\n\n if (\n !(\n this.menu.contains(event.relatedTarget as HTMLElement) ||\n event.relatedTarget === this.selectAllButton\n )\n ) {\n this.handleMenuChange(false, this.hasPreviouslyBlurred);\n this.menu.removeAttribute(this.ACTIVE_DESCENDANT);\n this.lastOptionFocused = null;\n this.lastOptionSelected = null;\n }\n } else {\n this.handleMenuChange(false);\n this.preventClickOpen = true;\n this.menu.removeAttribute(this.ACTIVE_DESCENDANT);\n this.lastOptionFocused = null;\n this.lastOptionSelected = null;\n }\n if (!this.isSearchBar) this.hasPreviouslyBlurred = !!event.relatedTarget;\n };\n\n private handleMouseDown = (event: Event): void => {\n event.preventDefault();\n };\n\n private handleMenuKeyDown = (event: KeyboardEvent) => {\n if (this.activationType === \"automatic\") {\n this.autoSetValueOnMenuKeyDown(event);\n } else if (this.activationType === \"manual\" && !this.isSearchBar) {\n this.manualSetInputValueKeyboardOpen(event);\n }\n };\n\n private handleMenuKeyUp = (event: KeyboardEvent): void => {\n if (event.key === \"Tab\" && event.shiftKey) {\n this.preventClickOpen = false;\n }\n if (event.key === \"Enter\" && this.disabledOptionSelected) {\n this.disabledOptionSelected = false;\n event.stopImmediatePropagation();\n }\n\n if (event.key === \"Shift\") {\n this.shiftPressed = false;\n }\n };\n\n private handleSelectAllClick = () => {\n this.keyboardNav = false;\n this.menu.focus();\n this.emitSelectAll();\n this.lastOptionFocused = null;\n this.lastOptionSelected = null;\n };\n\n private handleSelectAllBlur = (event: FocusEvent) => {\n this.host.classList.remove(\"ic-select-select-all-focused\");\n if (!this.menu.contains(event.relatedTarget as HTMLElement)) {\n this.handleMenuChange(false, false);\n }\n };\n\n private handleSelectAllFocus = () => {\n this.host.classList.add(\"ic-select-select-all-focused\");\n this.lastOptionFocused = null;\n this.lastOptionSelected = null;\n };\n\n // Fix for Safari - select all button click was causing menu to close\n private handleSelectAllMouseDown = (event: Event) => {\n event.preventDefault();\n };\n\n // When shift key is being used to select contiguous options one by one on a multi-select\n // I.e. holding shift and pressing up and down arrow keys\n private handleSingleShiftSelect = (\n event: KeyboardEvent,\n optionToSelectIndex: number,\n options: IcMenuOption[]\n ) => {\n if (\n this.isMultiSelect &&\n event.shiftKey &&\n !this.isOptionSelected(optionToSelectIndex)\n ) {\n this.selectHighlightedOption(options, optionToSelectIndex);\n this.lastOptionSelected = optionToSelectIndex;\n }\n };\n\n // When shift key is being used to select multiple options at once on a multi-select\n // I.e. holding shift when selecting another option\n private handleMultipleShiftSelect = (\n lastOptionInSelection: number,\n useFocusForSelection = false,\n firstOptionSelected: number = null\n ) => {\n this.shiftPressed = false;\n\n const firstOptionInSelection =\n firstOptionSelected === null\n ? this.getFirstOptionInSelection(useFocusForSelection)\n : firstOptionSelected;\n if (firstOptionInSelection !== null) {\n const optionsToSelect = [];\n\n if (firstOptionInSelection < lastOptionInSelection) {\n for (\n let i = firstOptionInSelection;\n i < lastOptionInSelection + 1;\n i++\n ) {\n optionsToSelect.push(i);\n }\n } else {\n for (\n let i = firstOptionInSelection;\n i > lastOptionInSelection - 1;\n i--\n ) {\n optionsToSelect.push(i);\n }\n }\n\n optionsToSelect.forEach(\n (optionIndex) =>\n !this.isOptionSelected(optionIndex) && this.setInputValue(optionIndex)\n );\n this.deselectSelectedOptions(optionsToSelect);\n }\n };\n\n private handleOptionSelect = (\n event: KeyboardEvent | MouseEvent,\n optionIndex: number,\n useFocusForSelection = false\n ) => {\n const menuOptions = this.getMenuOptions();\n const firstOptionInSelection =\n this.getFirstOptionInSelection(useFocusForSelection);\n if (event.shiftKey && firstOptionInSelection !== null) {\n this.handleMultipleShiftSelect(\n optionIndex,\n useFocusForSelection,\n firstOptionInSelection\n );\n } else {\n this.selectHighlightedOption(menuOptions, optionIndex);\n }\n\n this.lastOptionFocused = optionIndex;\n this.lastOptionSelected = optionIndex;\n };\n\n private getFirstOptionInSelection = (\n useFocusForSelection: boolean\n ): number => {\n return useFocusForSelection && this.lastOptionFocused !== null\n ? this.lastOptionFocused\n : this.lastOptionSelected !== null\n ? this.lastOptionSelected\n : null;\n };\n\n private emitSelectAll = () => {\n // Select all if there is either no value or not all options are selected\n // 'true' means select all, 'false' means clear all\n this.menuOptionSelectAll.emit({\n select:\n !this.value || !(this.value?.length === this.ungroupedOptions.length),\n });\n };\n\n private emitMenuKeyPress = (isNavKey: boolean, key: string) => {\n this.menuKeyPress.emit({ isNavKey: isNavKey, key: key });\n };\n\n // Determines keyboard behaviour when selection is automatic\n // (i.e. you don't have to press Enter select an option - just focus on it)\n // and menu is focused\n private autoSetValueOnMenuKeyDown = (event: KeyboardEvent): void => {\n event.cancelBubble = true;\n const selectedOptionIndex = this.ungroupedOptions.findIndex(\n (option) => option[this.valueField] === this.value\n );\n\n const isSearchableSelect = this.inputEl.tagName === \"INPUT\";\n\n this.keyboardNav = false;\n\n switch (event.key) {\n case \" \":\n event.preventDefault();\n break;\n case \"ArrowUp\":\n if (!this.hasTimedOut) {\n event.preventDefault();\n this.setPreviousOptionValue(selectedOptionIndex);\n this.keyboardNav = true;\n }\n break;\n case \"ArrowDown\":\n if (!this.hasTimedOut) {\n event.preventDefault();\n this.setNextOptionValue(selectedOptionIndex);\n this.keyboardNav = true;\n }\n break;\n case \"Home\":\n this.menuOptionSelect.emit({\n value: this.ungroupedOptions[0][this.valueField],\n });\n this.keyboardNav = true;\n break;\n case \"End\":\n this.menuOptionSelect.emit({\n value:\n this.ungroupedOptions[this.ungroupedOptions.length - 1][\n this.valueField\n ],\n });\n this.keyboardNav = true;\n break;\n case \"Enter\":\n !this.hasTimedOut && this.handleMenuChange(false);\n break;\n case \"Escape\":\n this.handleMenuChange(false);\n break;\n case \"Backspace\":\n if (isSearchableSelect) {\n this.inputEl.focus();\n }\n break;\n case \"Shift\":\n break;\n default:\n if (isSearchableSelect && event.key !== \"Tab\" && !this.hasTimedOut) {\n this.inputEl.focus();\n }\n if (event.key.length === 1) {\n this.keyboardNav = true;\n }\n break;\n }\n this.emitMenuKeyPress(this.keyboardNav, event.key);\n };\n\n private getOptionId = (value: string): string => {\n return `${this.menuId}-${value}`;\n };\n\n private getOptionAriaLabel = (\n option: IcMenuOption,\n parentOption: IcMenuOption\n ): string => {\n let ariaLabel = option[this.labelField];\n\n if (option.description) {\n ariaLabel = `${ariaLabel}, ${option.description}`;\n }\n\n if (option.element) {\n ariaLabel = `${ariaLabel}, ${option.element.ariaLabel}`;\n }\n\n if (parentOption) {\n return `${ariaLabel}, ${parentOption[this.labelField]} group`;\n } else {\n return ariaLabel;\n }\n };\n\n private getSortedOptions = (options: IcMenuOption[]): IcMenuOption[] => {\n let sorted: IcMenuOption[] = [];\n if (options.sort) {\n sorted = options.sort((optionA, optionB) =>\n optionA.recommended && !optionB.recommended ? -1 : 0\n );\n }\n return sorted;\n };\n\n private getOptionHighlightedIndex = () => {\n const menuOptions = this.getMenuOptions();\n\n return menuOptions.findIndex(\n (option) => option[this.valueField] === this.optionHighlighted\n );\n };\n\n private isManualMode = this.activationType === \"manual\";\n\n private scrollToSelected = (menu: HTMLUListElement) => {\n const selectedOption = this.selectOnEnter\n ? (this.host.querySelector(\n `li[data-value=\"${this.optionHighlighted}\"]`\n ) as HTMLElement)\n : (menu.querySelector(\".option[aria-selected='true']\") as HTMLElement);\n\n if (selectedOption) {\n const elTop = selectedOption.offsetTop + selectedOption.offsetHeight;\n if (\n elTop > menu.scrollTop + menu.offsetHeight ||\n elTop < menu.scrollTop + menu.offsetHeight\n ) {\n menu.scrollTop = selectedOption.offsetTop;\n }\n // 'aria-activedescendant' affects screen reader focus\n // https://www.w3.org/TR/2017/WD-wai-aria-practices-1.1-20170628/#kbd_focus_activedescendant\n this.menu.setAttribute(this.ACTIVE_DESCENDANT, selectedOption.id);\n selectedOption.focus();\n }\n };\n\n // Set 'ungroupedOptions' variable and emit its value\n // - this is all the options with disabled options and group titles removed\n private loadUngroupedOptions = () => {\n if (this.options.length > 0 && this.options.map) {\n this.options.map((option) => {\n if (option.children) {\n option.children.map(\n (option) => !option.disabled && this.ungroupedOptions.push(option)\n );\n } else if (!option.disabled) {\n this.ungroupedOptions.push(option);\n }\n });\n }\n this.ungroupedOptions = this.getSortedOptions(this.ungroupedOptions);\n this.ungroupedOptionsSet.emit({ options: this.ungroupedOptions });\n };\n\n private setMenuScrollbar = () => {\n let optionsHeight = 0;\n this.host\n .querySelectorAll(\".option\")\n .forEach((option) => (optionsHeight += option.clientHeight));\n\n if (optionsHeight >= 320) {\n this.menu.classList.add(\"menu-scroll\");\n }\n };\n\n private handleTimeoutBlur = (ev: FocusEvent) => {\n this.timeoutBlur.emit({ ev });\n };\n\n private focusOnSearchOrSelectInput(\n menuOptions: IcMenuOption[],\n highlightedOptionIndex: number\n ) {\n if (!menuOptions[highlightedOptionIndex]) return;\n\n if (this.isSearchBar) {\n (this.parentEl as HTMLIcSearchBarElement).setFocus();\n if (this.searchMode === \"navigation\") this.setHighlightedOption(0);\n }\n\n if (this.isSearchableSelect) {\n (this.parentEl as HTMLIcSelectElement).setFocus();\n }\n\n this.focusFromSearchKeypress = true;\n }\n\n private optionContent = (option: IcMenuOption, selected: boolean) => {\n const showCheckIcon =\n !!option[this.valueField] &&\n !!this.value &&\n selected &&\n this.parentEl.tagName !== \"IC-SEARCH-BAR\";\n\n return (\n <Fragment>\n {option.loading && <ic-loading-indicator size=\"icon\" />}\n <div\n class={{\n \"option-text-container\": true,\n \"show-check-icon\": showCheckIcon,\n }}\n >\n <div class=\"option-label\">\n {option.icon && (\n <div\n class=\"option-icon\"\n innerHTML={option.icon}\n aria-hidden=\"true\"\n ></div>\n )}\n <ic-typography variant=\"body\" aria-hidden=\"true\">\n {option[this.labelField]}\n </ic-typography>\n </div>\n {option.description && (\n <ic-typography\n id={`${this.getOptionId(option[this.valueField])}-description`}\n class=\"option-description\"\n variant=\"caption\"\n aria-hidden=\"true\"\n >\n <p>{option.description}</p>\n </ic-typography>\n )}\n {option.element && (\n <div\n class=\"option-element\"\n innerHTML={option.element.component}\n aria-hidden=\"true\"\n ></div>\n )}\n </div>\n {showCheckIcon && <span class=\"check-icon\" innerHTML={Check} />}\n </Fragment>\n );\n };\n\n private displayOption = (\n option: IcMenuOption,\n selected: boolean,\n index?: number,\n parentOption?: IcMenuOption\n ): HTMLLIElement => {\n const {\n open,\n keyboardNav,\n isManualMode,\n initialOptionsListRender,\n optionHighlighted,\n options,\n } = this;\n\n return (\n <li\n id={this.getOptionId(option[this.valueField])}\n class={{\n option: true,\n \"focused-option\": isManualMode\n ? (keyboardNav || initialOptionsListRender) &&\n option[this.valueField] === optionHighlighted\n : keyboardNav && selected,\n \"last-recommended-option\":\n option.recommended &&\n options[index + 1] &&\n !options[index + 1].recommended,\n \"disabled-option\": option.disabled,\n \"loading-option\": option.loading,\n timeout: option.timedOut,\n }}\n role=\"option\"\n tabindex={\n open &&\n (selected || option[this.valueField] === optionHighlighted) &&\n keyboardNav\n ? \"0\"\n : \"-1\"\n }\n aria-label={this.getOptionAriaLabel(option, parentOption)}\n aria-selected={selected ? \"true\" : \"false\"}\n aria-disabled={option.disabled ? \"true\" : \"false\"}\n onClick={!option.timedOut && !option.loading && this.handleOptionClick}\n onBlur={this.handleBlur}\n onMouseDown={this.handleMouseDown}\n data-value={option[this.valueField]}\n data-label={option[this.labelField]}\n >\n {option.timedOut ? (\n <Fragment>\n <div class=\"loading-error-info\">\n <svg\n class=\"error-icon-svg\"\n aria-labelledby=\"error-title\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"#000000\"\n >\n <title id=\"error-title\">Error</title>\n <g id=\"close-octagon\">\n <path\n id=\"Vector\"\n d=\"M8.77 3L3.5 8.27V15.73L8.77 21H16.23L21.5 15.73V8.27L16.23 3M8.91 7L12.5 10.59L16.09 7L17.5 8.41L13.91 12L17.5 15.59L16.09 17L12.5 13.41L8.91 17L7.5 15.59L11.09 12L7.5 8.41\"\n />\n </g>\n </svg>\n <ic-typography variant=\"label\">\n {option[this.labelField]}\n </ic-typography>\n </div>\n <ic-button\n size=\"small\"\n variant=\"tertiary\"\n onClick={this.handleRetry}\n onKeyDown={this.handleRetryKeyDown}\n onBlur={this.handleTimeoutBlur}\n id=\"retry-button\"\n >\n Retry\n </ic-button>\n </Fragment>\n ) : (\n this.optionContent(option, selected)\n )}\n </li>\n );\n };\n\n render() {\n const {\n inputLabel,\n options,\n menuId,\n value,\n fullWidth,\n hasTimedOut,\n isLoading,\n size,\n open,\n inputEl,\n keyboardNav,\n } = this;\n\n const selectAllButtonText = `${\n value?.length === this.ungroupedOptions.length ? \"Clear\" : \"Select\"\n } all`;\n\n const hasNoResults = this.host.classList.contains(\"no-results\");\n\n return (\n <Host\n class={{\n \"ic-menu-full-width\": fullWidth,\n \"ic-menu-no-focus\":\n inputEl?.tagName === \"INPUT\" || hasTimedOut || isLoading,\n [`ic-menu-${size}`]: true,\n \"ic-menu-open\": open && options.length !== 0,\n \"ic-menu-multiple\": this.isMultiSelect,\n }}\n >\n {options.length !== 0 && (\n <ul\n id={menuId}\n class=\"menu\"\n role=\"listbox\"\n aria-label={`${inputLabel} pop-up`}\n aria-multiselectable={this.isMultiSelect ? \"true\" : \"false\"}\n tabindex={\n open && !keyboardNav && inputEl?.tagName !== \"INPUT\" ? \"0\" : \"-1\"\n }\n ref={(el) => (this.menu = el)}\n onKeyDown={this.handleMenuKeyDown}\n onKeyUp={this.handleMenuKeyUp}\n onBlur={this.handleBlur}\n >\n {this.getSortedOptions(options).map((option, index) => {\n if (option.children) {\n if (option.children.length > 0) {\n return (\n <div>\n <ic-typography\n class=\"option-group-title\"\n role=\"presentation\"\n variant=\"subtitle-small\"\n >\n <p>{option[this.labelField]}</p>\n </ic-typography>\n {option.children.map(\n (childOption) =>\n childOption.label &&\n this.displayOption(\n childOption,\n this.isMultiSelect\n ? value?.includes(childOption[this.valueField])\n : childOption[this.valueField] === value,\n index,\n option\n )\n )}\n </div>\n );\n } else {\n return null;\n }\n } else {\n // Display option only if it has a label (rather than displaying an empty space)\n return (\n option.label &&\n this.displayOption(\n option,\n this.isMultiSelect\n ? value?.includes(option[this.valueField])\n : option[this.valueField] === value,\n index\n )\n );\n }\n })}\n </ul>\n )}\n {options.length !== 0 &&\n this.isMultiSelect &&\n !isLoading &&\n !hasTimedOut &&\n !hasNoResults && (\n <div class=\"option-bar\">\n <ic-typography>\n <p>{`${\n value ? value.length : 0\n }/${getOptionsWithoutGroupTitlesCount(\n this.options\n )} selected`}</p>\n </ic-typography>\n <ic-button\n class=\"select-all-button\"\n aria-label={`${selectAllButtonText} options for ${inputLabel}`}\n ref={(el: HTMLIcButtonElement) => (this.selectAllButton = el)}\n variant=\"tertiary\"\n onClick={this.handleSelectAllClick}\n onMouseDown={this.handleSelectAllMouseDown}\n onBlur={this.handleSelectAllBlur}\n onFocus={this.handleSelectAllFocus}\n size={size === \"small\" ? \"small\" : \"medium\"}\n >\n {selectAllButtonText}\n </ic-button>\n </div>\n )}\n </Host>\n );\n }\n}\n"],"mappings":"sOAAA,MAAMA,EAA+B,0vJ,MC6BxBC,EAAuB,M,yBAoD1BC,KAAAC,qBAAwBC,IAC9B,GACEA,EAAaC,MAAK,EAAGC,OAAMC,aAAYC,kBACrCF,IAAS,YACLG,EAA0BF,EAAYC,EAAc,aACpD,QAEN,CACAE,EAAYR,K,iBArDY,M,eASC,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AA,WACEA,EAAA,iBACEE,MAAM,qBACN+L,KAAK,eACLN,QAAQ,kBAER3L,EAAA,SAAImC,EAAO7D,KAAKoL,cAEjBvH,EAAO2I,SAAS/F,KACdkK,GACCA,EAAYnI,OACZxI,KAAKwN,cACHmD,EACA3Q,KAAK6C,cACD8B,IAAK,MAALA,SAAK,SAALA,EAAO0B,SAASsK,EAAY3Q,KAAK8D,aACjC6M,EAAY3Q,KAAK8D,cAAgBa,EACrCyB,EACAvC,K,KAKL,CACL,OAAO,I,MAEJ,CAEL,OACEA,EAAO2E,OACPxI,KAAKwN,cACH3J,EACA7D,KAAK6C,cACD8B,IAAK,MAALA,SAAK,SAALA,EAAO0B,SAASxC,EAAO7D,KAAK8D,aAC5BD,EAAO7D,KAAK8D,cAAgBa,EAChCyB,E,MAOXzC,EAAQoB,SAAW,GAClB/E,KAAK6C,gBACJD,IACAD,IACA6N,GACC9O,EAAA,OAAKE,MAAM,cACTF,EAAA,qBACEA,EAAA,SAAI,GACFiD,EAAQA,EAAMI,OAAS,KACrB6L,EACF5Q,KAAK2D,sBAGTjC,EAAA,aACEE,MAAM,oBAAmB,aACb,GAAG2O,iBAAmClB,IAClDoB,IAAM7P,GAA6BZ,KAAKkI,gBAAkBtH,EAC1DyM,QAAQ,WACRQ,QAAS7N,KAAKyJ,qBACdsE,YAAa/N,KAAK+J,yBAClB+D,OAAQ9N,KAAK0J,oBACbmH,QAAS7Q,KAAK6J,qBACdzI,KAAMA,IAAS,QAAU,QAAU,UAElCmP,I"}
@@ -1,2 +0,0 @@
1
- import{r as t,f as i,h as e,H as a,g as s}from"./p-6b5e91e2.js";import{c as o,i as c,a as n}from"./p-48e98730.js";const r=":host{gap:var(--ic-space-xs);padding:var(--ic-space-xs)}:host,.action-area{display:flex;flex-direction:column}.action-area{gap:var(--ic-space-md)}:host ::slotted(svg),:host ::slotted(img){border-radius:var(--ic-space-xxs)}:host(.ic-empty-state-right),:host(.ic-empty-state-right) .action-area{align-items:flex-end;text-align:right}:host(.ic-empty-state-center),:host(.ic-empty-state-center) .action-area{align-items:center;text-align:center}:host(.image-medium) ::slotted(svg),:host(.image-medium) ::slotted(img){height:calc(3 * var(--ic-space-lg)) !important;width:calc(3 * var(--ic-space-lg)) !important}:host(.image-small) ::slotted(svg),:host(.image-small) ::slotted(img){height:var(--ic-space-xxl) !important;width:var(--ic-space-xxl) !important}:host(.image-large) ::slotted(svg),:host(.image-large) ::slotted(img){height:calc(4 * var(--ic-space-xl)) !important;width:calc(4 * var(--ic-space-xl)) !important}";const h=class{constructor(e){t(this,e);this.hostMutationObserver=null;this.hostMutationCallback=t=>{if(t.some((({type:t,addedNodes:i,removedNodes:e})=>t==="childList"?o(i,e,["image","actions"]):false))){i(this)}};this.aligned="left";this.body=undefined;this.maxLines=undefined;this.heading=undefined;this.imageSize="medium";this.subheading=undefined}disconnectedCallback(){var t;(t=this.hostMutationObserver)===null||t===void 0?void 0:t.disconnect()}componentDidLoad(){!c(this.el,"heading")&&n([{prop:this.heading,propName:"heading"}],"Empty State");this.hostMutationObserver=new MutationObserver(this.hostMutationCallback);this.hostMutationObserver.observe(this.el,{childList:true})}render(){const{aligned:t,body:i,maxLines:s,heading:o,imageSize:n,subheading:r}=this;return e(a,{class:{[`ic-empty-state-${t}`]:true,[`image-${n}`]:c(this.el,"image")}},c(this.el,"image")&&e("slot",{name:"image"}),e("div",null,e("slot",{name:"heading"},e("ic-typography",{variant:"h4"},o)),e("slot",{name:"subheading"},e("ic-typography",{variant:"subtitle-small"},r)),e("slot",{name:"body"},e("ic-typography",{maxLines:s},i))),c(this.el,"actions")&&e("div",{class:"action-area"},e("slot",{name:"actions"})))}get el(){return s(this)}};h.style=r;export{h as ic_empty_state};
2
- //# sourceMappingURL=p-c67f7603.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["icEmptyStateCss","EmptyState","this","hostMutationObserver","hostMutationCallback","mutationList","some","type","addedNodes","removedNodes","checkSlotInChildMutations","forceUpdate","disconnectedCallback","_a","disconnect","componentDidLoad","isSlotUsed","el","onComponentRequiredPropUndefined","prop","heading","propName","MutationObserver","observe","childList","render","aligned","body","maxLines","imageSize","subheading","h","Host","class","name","variant"],"sources":["src/components/ic-empty-state/ic-empty-state.css?tag=ic-empty-state&encapsulation=shadow","src/components/ic-empty-state/ic-empty-state.tsx"],"sourcesContent":[":host {\n gap: var(--ic-space-xs);\n padding: var(--ic-space-xs);\n}\n\n:host,\n.action-area {\n display: flex;\n flex-direction: column;\n}\n\n.action-area {\n gap: var(--ic-space-md);\n}\n\n:host ::slotted(svg),\n:host ::slotted(img) {\n border-radius: var(--ic-space-xxs);\n}\n\n:host(.ic-empty-state-right),\n:host(.ic-empty-state-right) .action-area {\n align-items: flex-end;\n text-align: right;\n}\n\n:host(.ic-empty-state-center),\n:host(.ic-empty-state-center) .action-area {\n align-items: center;\n text-align: center;\n}\n\n:host(.image-medium) ::slotted(svg),\n:host(.image-medium) ::slotted(img) {\n height: calc(3 * var(--ic-space-lg)) !important;\n width: calc(3 * var(--ic-space-lg)) !important;\n}\n\n:host(.image-small) ::slotted(svg),\n:host(.image-small) ::slotted(img) {\n height: var(--ic-space-xxl) !important;\n width: var(--ic-space-xxl) !important;\n}\n\n:host(.image-large) ::slotted(svg),\n:host(.image-large) ::slotted(img) {\n height: calc(4 * var(--ic-space-xl)) !important;\n width: calc(4 * var(--ic-space-xl)) !important;\n}\n","import { h, Component, Host, Prop, Element, forceUpdate } from \"@stencil/core\";\n\nimport { IcEmptyStateAlignment } from \"./ic-empty-state.types\";\nimport {\n isSlotUsed,\n onComponentRequiredPropUndefined,\n checkSlotInChildMutations,\n} from \"../../utils/helpers\";\nimport { IcSizes } from \"../../utils/types\";\n\n/**\n * @slot image - Content is placed at the top above all other content.\n * @slot actions - Content is placed at the bottom below all other content.\n * @slot heading - Content will be rendered in place of the heading prop.\n * @slot subheading - Content will be rendered in place of the subheading prop.\n * @slot body - Content will be rendered in place of the body prop.\n */\n@Component({\n tag: \"ic-empty-state\",\n styleUrl: \"ic-empty-state.css\",\n shadow: true,\n})\nexport class EmptyState {\n private hostMutationObserver: MutationObserver = null;\n\n @Element() el: HTMLIcEmptyStateElement;\n\n /**\n * The alignment of the empty state container.\n */\n @Prop() aligned?: IcEmptyStateAlignment = \"left\";\n\n /**\n * The body text rendered in the empty state container.\n */\n @Prop() body?: string;\n\n /**\n * The number of lines of body text to display before truncating.\n */\n @Prop() maxLines?: number;\n\n /**\n * The title rendered in the empty state container.\n */\n @Prop() heading?: string;\n\n /**\n * The size of the image or icon used in the image slot.\n */\n @Prop() imageSize?: IcSizes = \"medium\";\n\n /**\n * The subtitle rendered in the empty state container.\n */\n @Prop() subheading?: string;\n\n disconnectedCallback(): void {\n this.hostMutationObserver?.disconnect();\n }\n\n componentDidLoad(): void {\n !isSlotUsed(this.el, \"heading\") &&\n onComponentRequiredPropUndefined(\n [{ prop: this.heading, propName: \"heading\" }],\n \"Empty State\"\n );\n\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n }\n\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n if (\n mutationList.some(({ type, addedNodes, removedNodes }) =>\n type === \"childList\"\n ? checkSlotInChildMutations(addedNodes, removedNodes, [\n \"image\",\n \"actions\",\n ])\n : false\n )\n ) {\n forceUpdate(this);\n }\n };\n\n render() {\n const { aligned, body, maxLines, heading, imageSize, subheading } = this;\n return (\n <Host\n class={{\n [`ic-empty-state-${aligned}`]: true,\n [`image-${imageSize}`]: isSlotUsed(this.el, \"image\"),\n }}\n >\n {isSlotUsed(this.el, \"image\") && <slot name=\"image\"></slot>}\n <div>\n <slot name=\"heading\">\n <ic-typography variant=\"h4\">{heading}</ic-typography>\n </slot>\n <slot name=\"subheading\">\n <ic-typography variant=\"subtitle-small\">{subheading}</ic-typography>\n </slot>\n <slot name=\"body\">\n <ic-typography maxLines={maxLines}>{body}</ic-typography>\n </slot>\n </div>\n {isSlotUsed(this.el, \"actions\") && (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r}from"./p-6b5e91e2.js";import{c as o,r as n,P as l,k as c,v as d,j as h,a as u,G as p,n as b,l as f,i as m,H as x,w as v}from"./p-48e98730.js";const g='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;--ic-input-label-helpertext-padding:var(--ic-space-xxs);--border-color:var(--ic-text-field-border-neutral);--border-color-hover:var(--ic-text-field-border-neutral-hover);--border-color-pressed:var(--ic-text-field-border-neutral-pressed);--border-color-disabled:var(--ic-text-field-border-disabled);--border-color-error:var(--ic-text-field-border-error);--border-color-error-hover:var(--ic-text-field-border-error-hover);--border-color-error-pressed:var(--ic-text-field-border-error-pressed);--border-color-success:var(--ic-text-field-border-success);--border-color-success-hover:var(--ic-text-field-border-success-hover);--border-color-success-pressed:var(--ic-text-field-border-success-pressed);--border-color-warning:var(--ic-text-field-border-warning);--border-color-warning-hover:var(--ic-text-field-border-warning-hover);--border-color-warning-pressed:var(--ic-text-field-border-warning-pressed);--ic-input-label-text-color:var(--ic-text-field-label);--ic-input-label-helper-text-color:var(--ic-text-field-subtitle);--ic-input-validation-status-text-color:var(--ic-text-field-state-text);--ic-input-validation-error:var(--ic-text-field-state-icon-error);--ic-input-validation-warning-icon-color:var(\n --ic-text-field-state-icon-warning\n );--ic-input-validation-success-icon-color:var(\n --ic-text-field-state-icon-success\n );--ic-input-component-container-success-icon-inline-color:var(\n --ic-text-field-state-icon-success\n )}:host(.ic-text-field-disabled){--ic-input-label-text-color:var(--ic-text-field-label-disabled);--ic-input-label-helper-text-color:var(--ic-text-field-subtitle-disabled);--text-field-placeholder-color:var(\n --ic-text-field-text-area-placeholder-text-disabled\n )}:host(.ic-text-field-full-width){width:100%}::-moz-placeholder{color:var(\n --text-field-placeholder-color,\n var(--ic-text-field-placeholder-text)\n );opacity:1}::placeholder{color:var(\n --text-field-placeholder-color,\n var(--ic-text-field-placeholder-text)\n );opacity:1}input,textarea{border:0;border-radius:var(--ic-border-radius);color:var(--text-field-text-color, var(--ic-text-field-text));background-color:var(--input-bg-color, var(--ic-text-field-background));line-height:1.5rem;letter-spacing:0.005rem;width:100%;padding-right:var(--ic-space-xs);padding-left:var(--ic-space-xs);caret-color:var(\n --text-field-typing-cursor,\n var(--ic-text-field-typing-cursor)\n )}textarea{min-height:var(--ic-space-lg);resize:vertical;padding-top:0.375rem}input:focus,textarea:focus{border:0;outline:0}input:disabled,textarea:disabled{color:var(\n --text-field-disabled-text-color,\n var(--ic-text-field-text-disabled)\n )}input.readonly,textarea.readonly{color:var(--ic-text-field-read-only-input-text-internal)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type="number"]{-moz-appearance:textfield}textarea.no-resize{resize:none}.char-count-text{--ic-typography-color:var(--ic-text-field-character-limit);padding-right:var(--ic-space-xxxs)}:host(.ic-text-field-disabled) .char-count-text{--ic-typography-color:var(--ic-text-field-character-limit-disabled)}.no-left-pad{padding-left:0}::slotted([slot="icon"]){fill:var(--ic-text-field-text-disabled)}.has-value ::slotted([slot="icon"]){fill:var(--ic-text-field-input-internal-icon)}.char-count{margin-right:calc(-1 * var(--ic-space-xxxs))}.remaining-char-count-desc{position:absolute;left:-9999px}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-results-button,input[type="search"]::-webkit-search-results-decoration{display:none}input[type="search"].truncate-value{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@media (forced-colors: active){input.readonly,textarea.readonly{color:canvastext}.has-value ::slotted([slot="icon"]){fill:currentcolor}}';let y=0;const w=[...v,"title"];const k=class{constructor(s){e(this,s);this.getValidationText=t(this,"getValidationText",7);this.icBlur=t(this,"icBlur",7);this.icChange=t(this,"icChange",7);this.icFocus=t(this,"icFocus",7);this.icInput=t(this,"icInput",7);this.icKeydown=t(this,"icKeydown",7);this.inheritedAttributes={};this.hostMutationObserver=null;this.checkChildHydration=()=>{var e;const t=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector("ic-typography");if(t&&t.classList.contains("hydrated")){this.setFocus();clearInterval(this.interval)}};this.getMaxValueExceeded=e=>{if(this.type==="number"){this.minValueUnattained=e&&Number(e)<Number(this.min);this.maxValueExceeded=Number(e)>Number(this.max)}};this.getMaxCharactersReached=e=>{this.numChars=e.length;this.maxCharactersReached=this.maxCharacters>0?this.numChars>=this.maxCharacters:false;if(this.maxCharactersWarning&&!this.maxCharactersReached){this.maxCharactersWarning=false}};this.onInput=e=>{this.value=e.target.value;this.icInput.emit({value:this.value})};this.onBlur=e=>{const t=e.target.value;this.numChars=t.length;this.minCharactersUnattained=this.minCharacters>0?this.numChars<this.minCharacters:false;this.icBlur.emit({value:t})};this.onFocus=e=>{this.icFocus.emit({value:e.target.value})};this.hasStatus=e=>e!==""&&!this.disabled;this.handleFormReset=()=>{this.value=this.initialValue};this.hostMutationCallback=e=>{let t=false;e.forEach((({attributeName:e,type:i,addedNodes:s,removedNodes:a})=>{if(w.includes(e)){this.inheritedAttributes[e]=this.el.getAttribute(e);t=true}else if(i==="childList"){t=o(s,a,"icon")}}));if(t){i(this)}};this.numChars=0;this.maxCharactersReached=false;this.maxCharactersWarning=false;this.minCharactersUnattained=false;this.maxValueExceeded=false;this.minValueUnattained=false;this.ariaActiveDescendant=undefined;this.ariaAutocomplete=undefined;this.ariaExpanded=undefined;this.ariaOwns=undefined;this.autocapitalize="off";this.autocomplete="off";this.autocorrect="off";this.autofocus=false;this.disabled=false;this.fullWidth=false;this.helperText="";this.hideCharCount=false;this.hideLabel=false;this.hiddenInput=true;this.inputId=`ic-text-field-input-${y++}`;this.inputmode="text";this.label=undefined;this.max=undefined;this.maxCharacters=0;this.min=undefined;this.minCharacters=0;this.name=this.inputId;this.placeholder="";this.readonly=false;this.required=false;this.resize=false;this.role=undefined;this.rows=1;this.size="medium";this.spellcheck=false;this.theme="inherit";this.truncateValue=undefined;this.type="text";this.validationInline=false;this.validationInlineInternal=false;this.validationStatus="";this.validationText="";this.debounce=0;this.value="";this.initialValue=this.value}watchDisabledHandler(){n(this.disabled,this.el)}debounceChanged(){this.icChange=l(this.icChange,this.debounce)}watchValueHandler(e){let t;if(this.maxCharacters>0){t=e.substring(0,this.maxCharacters);this.value=t}else{t=e}if(this.inputEl&&this.inputEl.value!==t){this.inputEl.value=t}this.getMaxValueExceeded(t);this.getMaxCharactersReached(t);this.icChange.emit({value:t})}connectedCallback(){this.debounceChanged()}disconnectedCallback(){var e;c(this.el,this.handleFormReset);(e=this.hostMutationObserver)===null||e===void 0?void 0:e.disconnect()}componentWillLoad(){if(this.value!==this.initialValue){this.watchValueHandler(this.value)}else if(this.maxCharacters>0){this.value=this.value.substring(0,this.maxCharacters)}this.getMaxValueExceeded(this.value);this.getMaxCharactersReached(this.value);this.inheritedAttributes=d(this.el,w);if(this.readonly){this.maxValueExceeded=false;this.minValueUnattained=false}h(this.el,this.handleFormReset);n(this.disabled,this.el)}componentDidLoad(){u([{prop:this.label,propName:"label"}],"Text Field");if(this.validationInlineInternal){this.getValidationText.emit({value:this.validationText})}this.hostMutationObserver=new MutationObserver(this.hostMutationCallback);this.hostMutationObserver.observe(this.el,{attributes:true,childList:true});if(this.autofocus&&!this.disabled&&!this.readonly){this.interval=setInterval(this.checkChildHydration,50)}}handleKeyDown(e){this.icKeydown.emit({event:e});this.maxCharactersWarning=this.maxCharactersReached}setFocus(){var e;(e=this.inputEl)===null||e===void 0?void 0:e.focus()}render(){const{inputId:e,name:t,label:i,required:r,size:o,placeholder:n,helperText:l,hideCharCount:c,rows:d,resize:h,disabled:u,value:v,min:g,max:y,numChars:w,readonly:k,maxCharacters:z,maxCharactersWarning:C,maxCharactersReached:I,minCharacters:$,minCharactersUnattained:N,minValueUnattained:j,maxValueExceeded:L,validationStatus:M,validationText:T,validationInline:q,validationInlineInternal:F,spellcheck:H,inputmode:V,fullWidth:W,truncateValue:B,hiddenInput:D,theme:O}=this;const K=k||u;const S=L||j||N||C?C?p.Warning:p.Error:M;const U=C?`Maximum input is ${z} characters`:L?`Maximum value of ${y} exceeded`:j?`Minimum value of ${g} not met`:N?`Minimum input is ${$} characters`:T;const _=k?0:z;const E=C||L||j||S===p.Error?"assertive":"polite";const G=this.hasStatus(S)&&!(S==p.Success&&q)&&!F;const P=d>1;const R=_-w;const A=`${R} character${R===1?"":"s"} remaining.`;const J=z>0?`${e}-char-count-desc`:"";const Q=`${J} ${b(e,l!=="",G)}`.trim();const X=K&&!k;const Y=!!this.el.querySelector(`[slot="icon"]`)&&!X;const Z=`${S===p.Error}`;if(D){f(true,this.el,t,v,K)}return s(a,{class:{"ic-text-field-full-width":W,[`ic-theme-${O}`]:O!=="inherit","ic-text-field-disabled":K}},s("ic-input-container",{readonly:k,disabled:K},!this.hideLabel&&s("ic-input-label",{for:e,label:i,helperText:l,required:r,disabled:X,readonly:k}),s("ic-input-component-container",{size:o,validationStatus:S,multiLine:P,disabled:K,readonly:k,validationInline:q,fullWidth:W},Y&&s("span",{class:{readonly:k,"has-value":v.length>0},slot:"left-icon"},s("slot",{name:"icon"})),!P?s("input",Object.assign({id:e,name:t,ref:e=>this.inputEl=e,type:this.type,min:g,max:y,value:v,class:{"no-left-pad":!Y&&k,readonly:k,"truncate-value":B},placeholder:n?n:"",required:r,disabled:K,readonly:k,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,"aria-label":i,"aria-describedby":Q,"aria-invalid":Z,"aria-activedescendant":this.ariaActiveDescendant,"aria-expanded":this.ariaExpanded,"aria-owns":this.ariaOwns,autocomplete:this.autocomplete,autocapitalize:this.autocapitalize,spellcheck:H,inputmode:V,role:this.role,maxlength:I?z:null,minlength:N?$:null},this.inheritedAttributes)):s("textarea",Object.assign({id:e,class:{"no-resize":h===false||k,"no-left-pad":!Y&&k,readonly:k},name:t,ref:e=>this.inputEl=e,value:v,rows:d,required:r,disabled:K,placeholder:n?n:"",readonly:k,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,"aria-label":i,"aria-describedby":Q,"aria-invalid":Z,autocapitalize:this.autocapitalize,spellcheck:H,inputmode:V,maxlength:I?z:null,minlength:N?$:null},this.inheritedAttributes)),m(this.el,"clear-button")&&s("slot",{name:"clear-button"}),m(this.el,"search-submit-button")&&s("slot",{name:"search-submit-button"})),m(this.el,"menu")&&s("slot",{name:"menu"}),(!x(M)||!x(T)||_>0||L||C||N||j)&&!F&&s("ic-input-validation",{status:this.hasStatus(S)===false||S===p.Success&&q||F?"":S,message:G?U:"",ariaLiveMode:E,for:e,fullWidth:W},!k&&_>0&&s("div",{slot:"validation-message-adornment"},!c&&s("ic-typography",{variant:"caption",class:"char-count-text"},s("span",{class:"char-count"},w,"/",_)),s("span",{class:"remaining-char-count-desc","aria-live":"polite"},A),s("span",{hidden:true,id:J},"Field can contain a maximum of ",_," characters.")))))}get el(){return r(this)}static get watchers(){return{disabled:["watchDisabledHandler"],debounce:["debounceChanged"],value:["watchValueHandler"]}}};k.style=g;export{k as ic_text_field};
2
- //# sourceMappingURL=p-c6e91e13.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["icTextFieldCss","inputIds","MUTABLE_ATTRIBUTES","IC_INHERITED_ARIA","TextField","this","inheritedAttributes","hostMutationObserver","checkChildHydration","el","_a","shadowRoot","querySelector","classList","contains","setFocus","clearInterval","interval","getMaxValueExceeded","value","type","minValueUnattained","Number","min","maxValueExceeded","max","getMaxCharactersReached","numChars","length","maxCharactersReached","maxCharacters","maxCharactersWarning","onInput","ev","target","icInput","emit","onBlur","minCharactersUnattained","minCharacters","icBlur","onFocus","icFocus","hasStatus","status","disabled","handleFormReset","initialValue","hostMutationCallback","mutationList","forceComponentUpdate","forEach","attributeName","addedNodes","removedNodes","includes","getAttribute","checkSlotInChildMutations","forceUpdate","undefined","inputId","watchDisabledHandler","removeDisabledFalse","debounceChanged","icChange","debounceEvent","debounce","watchValueHandler","newValue","substring","inputEl","connectedCallback","disconnectedCallback","removeFormResetListener","disconnect","componentWillLoad","inheritAttributes","readonly","addFormResetListener","componentDidLoad","onComponentRequiredPropUndefined","prop","label","propName","validationInlineInternal","getValidationText","validationText","MutationObserver","observe","attributes","childList","autofocus","setInterval","handleKeyDown","icKeydown","event","focus","render","name","required","size","placeholder","helperText","hideCharCount","rows","resize","validationStatus","validationInline","spellcheck","inputmode","fullWidth","truncateValue","hiddenInput","theme","disabledMode","currentStatus","IcInformationStatus","Warning","Error","currentValidationText","maxNumChars","messageAriaLive","showStatusText","Success","multiline","charsRemaining","hiddenRemainingCharCountDesc","hiddenCharCountDescId","describedBy","getInputDescribedByText","trim","disabledText","showLeftIcon","invalid","renderHiddenInput","h","Host","class","hideLabel","for","multiLine","slot","Object","assign","id","ref","ariaActiveDescendant","ariaExpanded","ariaOwns","autocomplete","autocapitalize","role","maxlength","minlength","isSlotUsed","isEmptyString","message","ariaLiveMode","variant","hidden"],"sources":["src/components/ic-text-field/ic-text-field.css?tag=ic-text-field&encapsulation=shadow","src/components/ic-text-field/ic-text-field.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n /**\n * @prop --input-width: Width of the input field\n */\n display: block;\n\n --ic-input-label-helpertext-padding: var(--ic-space-xxs);\n --border-color: var(--ic-text-field-border-neutral);\n --border-color-hover: var(--ic-text-field-border-neutral-hover);\n --border-color-pressed: var(--ic-text-field-border-neutral-pressed);\n --border-color-disabled: var(--ic-text-field-border-disabled);\n --border-color-error: var(--ic-text-field-border-error);\n --border-color-error-hover: var(--ic-text-field-border-error-hover);\n --border-color-error-pressed: var(--ic-text-field-border-error-pressed);\n --border-color-success: var(--ic-text-field-border-success);\n --border-color-success-hover: var(--ic-text-field-border-success-hover);\n --border-color-success-pressed: var(--ic-text-field-border-success-pressed);\n --border-color-warning: var(--ic-text-field-border-warning);\n --border-color-warning-hover: var(--ic-text-field-border-warning-hover);\n --border-color-warning-pressed: var(--ic-text-field-border-warning-pressed);\n --ic-input-label-text-color: var(--ic-text-field-label);\n --ic-input-label-helper-text-color: var(--ic-text-field-subtitle);\n --ic-input-validation-status-text-color: var(--ic-text-field-state-text);\n --ic-input-validation-error: var(--ic-text-field-state-icon-error);\n --ic-input-validation-warning-icon-color: var(\n --ic-text-field-state-icon-warning\n );\n --ic-input-validation-success-icon-color: var(\n --ic-text-field-state-icon-success\n );\n --ic-input-component-container-success-icon-inline-color: var(\n --ic-text-field-state-icon-success\n );\n}\n\n:host(.ic-text-field-disabled) {\n --ic-input-label-text-color: var(--ic-text-field-label-disabled);\n --ic-input-label-helper-text-color: var(--ic-text-field-subtitle-disabled);\n --text-field-placeholder-color: var(\n --ic-text-field-text-area-placeholder-text-disabled\n );\n}\n\n:host(.ic-text-field-full-width) {\n width: 100%;\n}\n\n::placeholder {\n color: var(\n --text-field-placeholder-color,\n var(--ic-text-field-placeholder-text)\n );\n opacity: 1;\n}\n\ninput,\ntextarea {\n border: 0;\n border-radius: var(--ic-border-radius);\n color: var(--text-field-text-color, var(--ic-text-field-text));\n background-color: var(--input-bg-color, var(--ic-text-field-background));\n line-height: 1.5rem;\n letter-spacing: 0.005rem;\n width: 100%;\n padding-right: var(--ic-space-xs);\n padding-left: var(--ic-space-xs);\n caret-color: var(\n --text-field-typing-cursor,\n var(--ic-text-field-typing-cursor)\n );\n}\n\ntextarea {\n min-height: var(--ic-space-lg);\n resize: vertical;\n padding-top: 0.375rem;\n}\n\ninput:focus,\ntextarea:focus {\n border: 0;\n outline: 0;\n}\n\ninput:disabled,\ntextarea:disabled {\n color: var(\n --text-field-disabled-text-color,\n var(--ic-text-field-text-disabled)\n );\n}\n\ninput.readonly,\ntextarea.readonly {\n color: var(--ic-text-field-read-only-input-text-internal);\n}\n\n/* Chrome, Safari, Edge */\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n/* Firefox */\ninput[type=\"number\"] {\n -moz-appearance: textfield;\n}\n\ntextarea.no-resize {\n resize: none;\n}\n\n.char-count-text {\n --ic-typography-color: var(--ic-text-field-character-limit);\n\n padding-right: var(--ic-space-xxxs);\n}\n\n:host(.ic-text-field-disabled) .char-count-text {\n --ic-typography-color: var(--ic-text-field-character-limit-disabled);\n}\n\n.no-left-pad {\n padding-left: 0;\n}\n\n::slotted([slot=\"icon\"]) {\n fill: var(--ic-text-field-text-disabled);\n}\n\n.has-value ::slotted([slot=\"icon\"]) {\n fill: var(--ic-text-field-input-internal-icon);\n}\n\n.char-count {\n margin-right: calc(-1 * var(--ic-space-xxxs));\n}\n\n.remaining-char-count-desc {\n position: absolute;\n left: -9999px;\n}\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration,\ninput[type=\"search\"]::-webkit-search-results-button,\ninput[type=\"search\"]::-webkit-search-results-decoration {\n display: none;\n}\n\ninput[type=\"search\"].truncate-value {\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n@media (forced-colors: active) {\n input.readonly,\n textarea.readonly {\n color: canvastext;\n }\n\n .has-value ::slotted([slot=\"icon\"]) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n Method,\n h,\n forceUpdate,\n} from \"@stencil/core\";\nimport {\n IcInformationStatus,\n IcAutocompleteTypes,\n IcAutocorrectStates,\n IcInformationStatusOrEmpty,\n IcValueEventDetail,\n IcSizesNoLarge,\n IcThemeMode,\n} from \"../../utils/types\";\nimport {\n inheritAttributes,\n debounceEvent,\n getInputDescribedByText,\n renderHiddenInput,\n isEmptyString,\n onComponentRequiredPropUndefined,\n addFormResetListener,\n removeFormResetListener,\n isSlotUsed,\n removeDisabledFalse,\n checkSlotInChildMutations,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcAriaAutocompleteTypes,\n IcTextFieldInputModes,\n IcTextFieldTypes,\n} from \"./ic-text-field.types\";\n\nlet inputIds = 0;\nconst MUTABLE_ATTRIBUTES = [...IC_INHERITED_ARIA, \"title\"];\n\n/**\n * @slot icon - Content will be placed to the left of the text input.\n */\n@Component({\n tag: \"ic-text-field\",\n styleUrl: \"ic-text-field.css\",\n shadow: true,\n})\nexport class TextField {\n private inheritedAttributes: { [k: string]: string } = {};\n private inputEl: HTMLInputElement | HTMLTextAreaElement;\n private hostMutationObserver: MutationObserver = null;\n private interval: ReturnType<typeof setInterval>;\n\n @Element() el: HTMLIcTextFieldElement;\n\n @State() numChars: number = 0;\n @State() maxCharactersReached: boolean = false;\n @State() maxCharactersWarning: boolean = false;\n @State() minCharactersUnattained: boolean = false;\n @State() maxValueExceeded: boolean = false;\n @State() minValueUnattained: boolean = false;\n\n /**\n * @slot clear-button - an ic-button clear component will render as an end adornment to the input.\n * @slot search-submit-button - an ic-button search submit component will render as an end adornment to the input.\n * @slot menu - an ic-menu component will appear below the input.\n */\n\n /**\n * @internal The active element when focus is on the ic-menu items.\n */\n @Prop() ariaActiveDescendant?: string;\n\n /**\n * @internal Used to identify whether inputting any text triggers more predictions\n */\n @Prop() ariaAutocomplete: IcAriaAutocompleteTypes = undefined;\n\n /**\n * @internal Used to identify if the slotted menu is rendered\n */\n @Prop() ariaExpanded: string;\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaOwns: string;\n\n /**\n * The automatic capitalisation of the text value as it is entered/edited by the user.\n * Available options: \"off\", \"none\", \"on\", \"sentences\", \"words\", \"characters\".\n */\n @Prop() autocapitalize = \"off\";\n\n /**\n * The state of autocompletion the browser can apply on the text value.\n */\n @Prop() autocomplete: IcAutocompleteTypes = \"off\";\n\n /**\n * The state of autocorrection the browser can apply when the user is entering/editing the text value.\n */\n @Prop() autocorrect: IcAutocorrectStates = \"off\";\n\n /**\n * If `true`, the form control will have input focus when the page loads.\n */\n @Prop() autofocus = 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 * Specify whether the text field fills the full width of the container.\n * If `true`, this overrides the --input-width CSS variable.\n */\n @Prop() fullWidth: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText: string = \"\";\n\n /**\n * If `true`, the character count which is displayed when `maxCharacters` is set will be visually hidden.\n */\n @Prop() hideCharCount: boolean = false;\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 * @internal If `true`, the hidden form input will stop rendering for form submission.\n */\n @Prop() hiddenInput: boolean = true;\n\n /**\n * The ID for the input.\n */\n @Prop() inputId?: string = `ic-text-field-input-${inputIds++}`;\n\n /**\n * A hint to the browser for which keyboard to display.\n * Possible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n * `\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.\n */\n @Prop() inputmode: IcTextFieldInputModes = \"text\";\n\n /**\n * The label for the input.\n */\n @Prop() label!: string;\n\n /**\n * The maximum number that can be accepted as a value, when `type` is `number` and `rows` is `1`. (NOTE: Ensure to include visual indication of max value in `helperText` or `label`)\n */\n @Prop() max: string | number = undefined;\n\n /**\n * The count of characters in the field. Will display a warning if the bound is reached. (NOTE: If the value of the text field has been set using the `value` prop, it will be truncated to this number of characters)\n */\n @Prop() maxCharacters: number = 0;\n\n /**\n * The minimum number that can be accepted as a value, when `type` is `number` and `rows` is `1`. (NOTE: Ensure to include visual indication of min value in `helperText` or `label`)\n */\n @Prop() min: string | number = undefined;\n\n /**\n * The minimum number of characters that can be entered in the field.\n */\n @Prop() minCharacters: number = 0;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * The placeholder value to be displayed.\n */\n @Prop() placeholder: string = \"\";\n\n /**\n * If `true`, the read only state will be set.\n */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /**\n * If `true`, the input will require a value.\n */\n @Prop() required: boolean = false;\n\n /**\n * If `true`, the multiline text area will be resizeable.\n */\n @Prop() resize: boolean = false;\n\n /**\n * @internal Used to set the role if not default textbox;\n */\n @Prop() role: string;\n\n /**\n * The number of rows to transform the text field into a text area with a specific height.\n */\n @Prop() rows: number = 1;\n\n /**\n * The size of the text field component.\n */\n @Prop() size?: IcSizesNoLarge = \"medium\";\n\n /**\n * If `true`, the value of the text field will have its spelling and grammar checked.\n */\n @Prop() spellcheck: boolean = false;\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme: IcThemeMode = \"inherit\";\n\n /**\n * @internal If `true`, an ellipsis will be displayed at the end of the value if the value is longer than the container.\n */\n @Prop() truncateValue?: boolean;\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop() type: IcTextFieldTypes = \"text\";\n\n /**\n * If `true`, the icon in input control will be displayed - only applies when validationStatus ='success'.\n */\n @Prop() validationInline: boolean = false;\n\n /**\n * @internal If `true`, the validation will display inline.\n */\n @Prop() validationInlineInternal: boolean = false;\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationText: string = \"\";\n\n /**\n * The amount of time, in milliseconds, to wait to trigger the `icChange` event after each keystroke.\n */\n @Prop() debounce: number = 0;\n\n @Watch(\"debounce\")\n private debounceChanged() {\n this.icChange = debounceEvent(this.icChange, this.debounce);\n }\n\n /**\n * The value of the text field.\n */\n @Prop({ reflect: true, mutable: true }) value: string = \"\";\n @State() initialValue = this.value;\n\n @Watch(\"value\")\n private watchValueHandler(newValue: string): void {\n let value;\n\n if (this.maxCharacters > 0) {\n value = newValue.substring(0, this.maxCharacters);\n this.value = value;\n } else {\n value = newValue;\n }\n\n if (this.inputEl && this.inputEl.value !== value) {\n this.inputEl.value = value;\n }\n\n this.getMaxValueExceeded(value);\n\n this.getMaxCharactersReached(value);\n\n this.icChange.emit({ value });\n }\n\n /**\n * @internal Emitted when the validationInlineInternal is `true`\n */\n @Event() getValidationText: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when input loses focus.\n */\n @Event() icBlur: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when the value has changed.\n */\n @Event() icChange: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when input gains focus.\n */\n @Event() icFocus: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() icInput: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when a keydown event occurred.\n */\n @Event() icKeydown: EventEmitter<{ event: KeyboardEvent }>;\n\n connectedCallback(): void {\n this.debounceChanged();\n }\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n this.hostMutationObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n if (this.value !== this.initialValue) {\n this.watchValueHandler(this.value);\n } else if (this.maxCharacters > 0) {\n this.value = this.value.substring(0, this.maxCharacters);\n }\n\n this.getMaxValueExceeded(this.value);\n this.getMaxCharactersReached(this.value);\n\n this.inheritedAttributes = inheritAttributes(this.el, MUTABLE_ATTRIBUTES);\n\n if (this.readonly) {\n this.maxValueExceeded = false;\n this.minValueUnattained = false;\n }\n\n addFormResetListener(this.el, this.handleFormReset);\n\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Text Field\"\n );\n if (this.validationInlineInternal) {\n this.getValidationText.emit({ value: this.validationText });\n }\n\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n attributes: true,\n childList: true,\n });\n\n if (this.autofocus && !this.disabled && !this.readonly) {\n this.interval = setInterval(this.checkChildHydration, 50);\n }\n }\n\n private checkChildHydration = () => {\n const el = this.el.shadowRoot?.querySelector(\"ic-typography\");\n if (el && el.classList.contains(\"hydrated\")) {\n this.setFocus();\n clearInterval(this.interval);\n }\n };\n\n @Listen(\"keydown\", {})\n handleKeyDown(ev: KeyboardEvent): void {\n this.icKeydown.emit({ event: ev });\n this.maxCharactersWarning = this.maxCharactersReached;\n }\n\n /**\n * Sets focus on the native `input`.\n */\n\n @Method()\n setFocus() {\n this.inputEl?.focus();\n }\n\n private getMaxValueExceeded = (value: string) => {\n if (this.type === \"number\") {\n this.minValueUnattained = value && Number(value) < Number(this.min);\n this.maxValueExceeded = Number(value) > Number(this.max);\n }\n };\n\n private getMaxCharactersReached = (value: string) => {\n this.numChars = value.length;\n this.maxCharactersReached =\n this.maxCharacters > 0 ? this.numChars >= this.maxCharacters : false;\n\n if (this.maxCharactersWarning && !this.maxCharactersReached) {\n this.maxCharactersWarning = false;\n }\n };\n\n private onInput = (ev: Event) => {\n this.value = (ev.target as HTMLInputElement).value;\n this.icInput.emit({ value: this.value });\n };\n\n private onBlur = (ev: Event) => {\n const value = (ev.target as HTMLInputElement).value;\n this.numChars = value.length;\n this.minCharactersUnattained =\n this.minCharacters > 0 ? this.numChars < this.minCharacters : false;\n this.icBlur.emit({ value: value });\n };\n\n private onFocus = (ev: Event) => {\n this.icFocus.emit({ value: (ev.target as HTMLInputElement).value });\n };\n\n private hasStatus = (status: IcInformationStatusOrEmpty) =>\n status !== \"\" && !this.disabled;\n\n private handleFormReset = (): void => {\n this.value = this.initialValue;\n };\n\n // triggered when attributes of host element change\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n let forceComponentUpdate = false;\n mutationList.forEach(\n ({ attributeName, type, addedNodes, removedNodes }) => {\n if (MUTABLE_ATTRIBUTES.includes(attributeName)) {\n this.inheritedAttributes[attributeName] =\n this.el.getAttribute(attributeName);\n forceComponentUpdate = true;\n } else if (type === \"childList\") {\n forceComponentUpdate = checkSlotInChildMutations(\n addedNodes,\n removedNodes,\n \"icon\"\n );\n }\n }\n );\n if (forceComponentUpdate) {\n forceUpdate(this);\n }\n };\n\n render() {\n const {\n inputId,\n name,\n label,\n required,\n size,\n placeholder,\n helperText,\n hideCharCount,\n rows,\n resize,\n disabled,\n value,\n min,\n max,\n numChars,\n readonly,\n maxCharacters,\n maxCharactersWarning,\n maxCharactersReached,\n minCharacters,\n minCharactersUnattained,\n minValueUnattained,\n maxValueExceeded,\n validationStatus,\n validationText,\n validationInline,\n validationInlineInternal,\n spellcheck,\n inputmode,\n fullWidth,\n truncateValue,\n hiddenInput,\n theme,\n } = this;\n\n const disabledMode = readonly || disabled;\n\n const currentStatus =\n maxValueExceeded ||\n minValueUnattained ||\n minCharactersUnattained ||\n maxCharactersWarning\n ? maxCharactersWarning\n ? IcInformationStatus.Warning\n : IcInformationStatus.Error\n : validationStatus;\n\n const currentValidationText = maxCharactersWarning\n ? `Maximum input is ${maxCharacters} characters`\n : maxValueExceeded\n ? `Maximum value of ${max} exceeded`\n : minValueUnattained\n ? `Minimum value of ${min} not met`\n : minCharactersUnattained\n ? `Minimum input is ${minCharacters} characters`\n : validationText;\n\n const maxNumChars = readonly ? 0 : maxCharacters;\n const messageAriaLive =\n maxCharactersWarning ||\n maxValueExceeded ||\n minValueUnattained ||\n currentStatus === IcInformationStatus.Error\n ? \"assertive\"\n : \"polite\";\n\n const showStatusText =\n this.hasStatus(currentStatus) &&\n !(currentStatus == IcInformationStatus.Success && validationInline) &&\n !validationInlineInternal;\n\n const multiline = rows > 1;\n\n const charsRemaining = maxNumChars - numChars;\n const hiddenRemainingCharCountDesc = `${charsRemaining} character${\n charsRemaining === 1 ? \"\" : \"s\"\n } remaining.`;\n const hiddenCharCountDescId =\n maxCharacters > 0 ? `${inputId}-char-count-desc` : \"\";\n\n const describedBy = `${hiddenCharCountDescId} ${getInputDescribedByText(\n inputId,\n helperText !== \"\",\n showStatusText\n )}`.trim();\n\n const disabledText = disabledMode && !readonly;\n const showLeftIcon =\n !!this.el.querySelector(`[slot=\"icon\"]`) && !disabledText;\n\n const invalid = `${currentStatus === IcInformationStatus.Error}`;\n\n if (hiddenInput) {\n renderHiddenInput(true, this.el, name, value, disabledMode);\n }\n return (\n <Host\n class={{\n \"ic-text-field-full-width\": fullWidth,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n \"ic-text-field-disabled\": disabledMode,\n }}\n >\n <ic-input-container readonly={readonly} disabled={disabledMode}>\n {!this.hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabledText}\n readonly={readonly}\n ></ic-input-label>\n )}\n\n <ic-input-component-container\n size={size}\n validationStatus={currentStatus}\n multiLine={multiline}\n disabled={disabledMode}\n readonly={readonly}\n validationInline={validationInline}\n fullWidth={fullWidth}\n >\n {showLeftIcon && (\n <span\n class={{\n readonly,\n \"has-value\": value.length > 0,\n }}\n slot=\"left-icon\"\n >\n <slot name=\"icon\" />\n </span>\n )}\n\n {!multiline ? (\n <input\n id={inputId}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLInputElement)}\n type={this.type}\n min={min}\n max={max}\n value={value}\n class={{\n \"no-left-pad\": !showLeftIcon && readonly,\n readonly,\n \"truncate-value\": truncateValue,\n }}\n placeholder={placeholder ? placeholder : \"\"}\n required={required}\n disabled={disabledMode}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n aria-activedescendant={this.ariaActiveDescendant}\n aria-expanded={this.ariaExpanded}\n aria-owns={this.ariaOwns}\n autocomplete={this.autocomplete}\n autocapitalize={this.autocapitalize}\n spellcheck={spellcheck}\n inputmode={inputmode}\n role={this.role}\n maxlength={maxCharactersReached ? maxCharacters : null}\n minlength={minCharactersUnattained ? minCharacters : null}\n {...this.inheritedAttributes}\n ></input>\n ) : (\n <textarea\n id={inputId}\n class={{\n \"no-resize\": resize === false || readonly,\n \"no-left-pad\": !showLeftIcon && readonly,\n readonly,\n }}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLTextAreaElement)}\n value={value}\n rows={rows}\n required={required}\n disabled={disabledMode}\n placeholder={placeholder ? placeholder : \"\"}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n autocapitalize={this.autocapitalize}\n spellcheck={spellcheck}\n inputmode={inputmode}\n maxlength={maxCharactersReached ? maxCharacters : null}\n minlength={minCharactersUnattained ? minCharacters : null}\n {...this.inheritedAttributes}\n ></textarea>\n )}\n {isSlotUsed(this.el, \"clear-button\") && (\n <slot name=\"clear-button\"></slot>\n )}\n {isSlotUsed(this.el, \"search-submit-button\") && (\n <slot name=\"search-submit-button\"></slot>\n )}\n </ic-input-component-container>\n {isSlotUsed(this.el, \"menu\") && <slot name=\"menu\"></slot>}\n {(!isEmptyString(validationStatus) ||\n !isEmptyString(validationText) ||\n maxNumChars > 0 ||\n maxValueExceeded ||\n maxCharactersWarning ||\n minCharactersUnattained ||\n minValueUnattained) &&\n !validationInlineInternal && (\n <ic-input-validation\n status={\n this.hasStatus(currentStatus) === false ||\n (currentStatus === IcInformationStatus.Success &&\n validationInline) ||\n validationInlineInternal\n ? \"\"\n : currentStatus\n }\n message={showStatusText ? currentValidationText : \"\"}\n ariaLiveMode={messageAriaLive}\n for={inputId}\n fullWidth={fullWidth}\n >\n {!readonly && maxNumChars > 0 && (\n <div slot=\"validation-message-adornment\">\n {!hideCharCount && (\n <ic-typography variant=\"caption\" class=\"char-count-text\">\n <span class=\"char-count\">\n {numChars}/{maxNumChars}\n </span>\n </ic-typography>\n )}\n <span class=\"remaining-char-count-desc\" aria-live=\"polite\">\n {hiddenRemainingCharCountDesc}\n </span>\n <span hidden={true} id={hiddenCharCountDescId}>\n Field can contain a maximum of {maxNumChars} characters.\n </span>\n </div>\n )}\n </ic-input-validation>\n )}\n </ic-input-container>\n </Host>\n );\n }\n}\n"],"mappings":"+LAAA,MAAMA,EAAiB,6rMC2CvB,IAAIC,EAA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MAAM,cACT9G,EAAQ,IAAG6F,IAIlBe,EAAA,QAAME,MAAM,4BAA2B,YAAW,UAC/CX,GAEHS,EAAA,QAAMwB,OAAQ,KAAMf,GAAIjB,GAAqB,kCACXP,EAAW,mB"}
@@ -1,2 +0,0 @@
1
- import{r as e,c as i,f as t,h as r,H as a,g as s}from"./p-6b5e91e2.js";import{c as o}from"./p-f074ef5b.js";import{c as n,i as c,V as l,I as d}from"./p-48e98730.js";const p='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block}:host ::slotted(ic-typography){--ic-typography-color:var(--ic-alert-description)}.container{min-height:3.5rem;border-radius:var(--ic-space-xxs) var(--ic-space-xxxs) var(--ic-space-xxxs)\n var(--ic-space-xxs);position:relative;display:flex;align-items:center}.container-neutral{background-color:var(--ic-alert-background-neutral);border:var(--ic-space-xxxs) solid var(--ic-alert-border-neutral)}.container-info{background-color:var(--ic-alert-background-info);border:var(--ic-space-xxxs) solid var(--ic-alert-border-info)}.container-warning{background-color:var(--ic-alert-background-warning);border:var(--ic-space-xxxs) solid var(--ic-alert-border-warning)}.container-error{background-color:var(--ic-alert-background-error);border:var(--ic-space-xxxs) solid var(--ic-alert-border-error)}.container-success{background-color:var(--ic-alert-background-success);border:var(--ic-space-xxxs) solid var(--ic-alert-border-success)}.alert-icon-container{height:100%;display:flex;align-items:center}.divider{height:100%;width:var(--ic-space-xs);border-radius:var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs);position:absolute}.divider-neutral{background-color:var(--ic-alert-status-type-neutral)}.divider-info{background-color:var(--ic-alert-status-type-info)}.divider-warning{background-color:var(--ic-alert-status-type-warning)}.divider-error{background-color:var(--ic-alert-status-type-error)}.divider-success{background-color:var(--ic-alert-status-type-success)}.alert-icon{height:var(--ic-space-lg);width:1.375rem;margin-left:1.125rem}.icon-placeholder{margin-left:var(--ic-space-xs)}.alert-icon>svg{height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block}:host([showdefaulticon="false"]) .icon-neutral{visibility:hidden;width:0;margin-left:0.625rem}.icon-neutral>svg,::slotted(svg){height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block;fill:var(--ic-alert-icon-neutral)}:host([variant="info"]) .alert-icon svg{fill:var(--ic-alert-icon-info)}:host([variant="warning"]) .alert-icon svg{fill:var(--ic-alert-icon-warning)}:host([variant="error"]) .alert-icon svg{fill:var(--ic-alert-icon-error)}:host([variant="success"]) .alert-icon svg{fill:var(--ic-alert-icon-success)}.alert-content{display:flex;align-items:center;margin-left:0.625rem;width:100%}.alert-message{display:flex;align-items:center;padding:var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;flex:1;--ic-typography-color:var(--ic-alert-description)}.alert-message-title-above{display:inline}.alert-title{margin-right:var(--ic-space-xs);--ic-typography-color:var(--ic-alert-title)}.alert-title-above{white-space:normal}.alert-action-container{margin-right:var(--ic-space-xs);display:flex;align-items:center}.dismiss-icon{margin-right:var(--ic-space-xxxs);margin-left:-0.375rem;padding:0.375rem;border:none;border-radius:50%;background-color:inherit;display:flex;align-items:center;justify-content:center}.dismiss-icon>svg{color:var(--ic-alert-icon-dismissible)}.dismiss-icon:hover{cursor:pointer}@media (max-width: 628px){.alert-content{display:flex;flex-direction:column;align-items:flex-start}.alert-message{display:flex;flex-direction:column;align-items:flex-start}.alert-title{white-space:normal}.alert-action-container{margin-bottom:var(--ic-space-xs)}}@media (forced-colors: active){.container{border:var(--ic-border-hc)}}';const u=class{constructor(r){e(this,r);this.icDismiss=i(this,"icDismiss",7);this.hostMutationObserver=null;this.dismissAction=()=>{this.icDismiss.emit()};this.hostMutationCallback=e=>{if(e.some((({type:e,addedNodes:i,removedNodes:t})=>e==="childList"?n(i,t,"action"):false))){t(this)}};this.alertTitleWrap=false;this.visible=true;this.announced=true;this.dismissible=false;this.heading="";this.message=undefined;this.showDefaultIcon=true;this.theme="inherit";this.titleAbove=false;this.variant="neutral"}disconnectedCallback(){var e;(e=this.hostMutationObserver)===null||e===void 0?void 0:e.disconnect()}componentDidLoad(){this.alertTitleShouldWrap();this.hostMutationObserver=new MutationObserver(this.hostMutationCallback);this.hostMutationObserver.observe(this.el,{childList:true})}handleClick(){this.visible=!this.visible}alertTitleShouldWrap(){var e;const i=(e=this.el.shadowRoot.querySelector(".alert-title"))===null||e===void 0?void 0:e.clientHeight;if(i>24)this.alertTitleWrap=true}render(){const{variant:e,heading:i,message:t,titleAbove:s,dismissible:n,announced:p,visible:u,showDefaultIcon:b,theme:h}=this;return u&&r(a,{role:p?"alert":null,class:{[d.Dark]:true,[`ic-theme-${h}`]:h!=="inherit"}},r("div",{class:{["container"]:true,[`container-${e}`]:true}},r("div",{class:"alert-icon-container"},r("div",{class:{["divider"]:true,[`divider-${e}`]:true}}),e==="neutral"?c(this.el,"neutral-icon")?r("div",{class:"alert-icon svg-container icon-neutral"},r("slot",{name:"neutral-icon"})):b?r("span",{class:{["alert-icon"]:true,["svg-container"]:true,[`icon-${e}`]:true},innerHTML:l[e].icon}):r("div",{class:"icon-placeholder"}):r("span",{class:{["alert-icon"]:true,["svg-container"]:true,[`icon-${e}`]:true},innerHTML:l[e].icon})),r("div",{class:"alert-content"},r("div",{class:{["alert-message"]:true,["alert-message-title-above"]:s||this.alertTitleWrap}},i&&r("ic-typography",{class:{["alert-title"]:true,["alert-title-above"]:s||this.alertTitleWrap},variant:"subtitle-large"},r("p",null,i)),r("slot",{name:"message"},r("ic-typography",{variant:"body"},t))),c(this.el,"action")&&r("div",{class:"alert-action-container"},r("slot",{name:"action"}))),r("div",{class:"dismiss-icon-container"},n&&r("ic-button",{class:{["svg-container"]:true,["dismiss-icon"]:true},innerHTML:o,onClick:this.dismissAction,variant:"icon",theme:"dark",title:"Dismiss"}))))}get el(){return s(this)}};u.style=p;export{u as ic_alert};
2
- //# sourceMappingURL=p-ca27ab19.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["icAlertCss","Alert","this","hostMutationObserver","dismissAction","icDismiss","emit","hostMutationCallback","mutationList","some","type","addedNodes","removedNodes","checkSlotInChildMutations","forceUpdate","disconnectedCallback","_a","disconnect","componentDidLoad","alertTitleShouldWrap","MutationObserver","observe","el","childList","handleClick","visible","titleHeight","shadowRoot","querySelector","clientHeight","alertTitleWrap","render","variant","heading","message","titleAbove","dismissible","announced","showDefaultIcon","theme","h","Host","role","class","IcBrandForegroundEnum","Dark","isSlotUsed","name","innerHTML","VARIANT_ICONS","icon","closeIcon","onClick","title"],"sources":["src/components/ic-alert/ic-alert.css?tag=ic-alert&encapsulation=shadow","src/components/ic-alert/ic-alert.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: block;\n}\n\n:host ::slotted(ic-typography) {\n --ic-typography-color: var(--ic-alert-description);\n}\n\n.container {\n min-height: 3.5rem;\n border-radius: var(--ic-space-xxs) var(--ic-space-xxxs) var(--ic-space-xxxs)\n var(--ic-space-xxs);\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.container-neutral {\n background-color: var(--ic-alert-background-neutral);\n border: var(--ic-space-xxxs) solid var(--ic-alert-border-neutral);\n}\n\n.container-info {\n background-color: var(--ic-alert-background-info);\n border: var(--ic-space-xxxs) solid var(--ic-alert-border-info);\n}\n\n.container-warning {\n background-color: var(--ic-alert-background-warning);\n border: var(--ic-space-xxxs) solid var(--ic-alert-border-warning);\n}\n\n.container-error {\n background-color: var(--ic-alert-background-error);\n border: var(--ic-space-xxxs) solid var(--ic-alert-border-error);\n}\n\n.container-success {\n background-color: var(--ic-alert-background-success);\n border: var(--ic-space-xxxs) solid var(--ic-alert-border-success);\n}\n\n.alert-icon-container {\n height: 100%;\n display: flex;\n align-items: center;\n}\n\n.divider {\n height: 100%;\n width: var(--ic-space-xs);\n border-radius: var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs);\n position: absolute;\n}\n\n.divider-neutral {\n background-color: var(--ic-alert-status-type-neutral);\n}\n\n.divider-info {\n background-color: var(--ic-alert-status-type-info);\n}\n\n.divider-warning {\n background-color: var(--ic-alert-status-type-warning);\n}\n\n.divider-error {\n background-color: var(--ic-alert-status-type-error);\n}\n\n.divider-success {\n background-color: var(--ic-alert-status-type-success);\n}\n\n.alert-icon {\n height: var(--ic-space-lg);\n width: 1.375rem;\n margin-left: 1.125rem;\n}\n\n.icon-placeholder {\n margin-left: var(--ic-space-xs);\n}\n\n.alert-icon > svg {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n display: inline-block;\n}\n\n/* required for Gatsby as prop does not seem to work when set to false */\n:host([showdefaulticon=\"false\"]) .icon-neutral {\n visibility: hidden;\n width: 0;\n margin-left: 0.625rem;\n}\n\n.icon-neutral > svg,\n::slotted(svg) {\n height: var(--ic-space-lg);\n width: var(--ic-space-lg);\n display: inline-block;\n fill: var(--ic-alert-icon-neutral);\n}\n\n:host([variant=\"info\"]) .alert-icon svg {\n fill: var(--ic-alert-icon-info);\n}\n\n:host([variant=\"warning\"]) .alert-icon svg {\n fill: var(--ic-alert-icon-warning);\n}\n\n:host([variant=\"error\"]) .alert-icon svg {\n fill: var(--ic-alert-icon-error);\n}\n\n:host([variant=\"success\"]) .alert-icon svg {\n fill: var(--ic-alert-icon-success);\n}\n\n.alert-content {\n display: flex;\n align-items: center;\n margin-left: 0.625rem;\n width: 100%;\n}\n\n.alert-message {\n display: flex;\n align-items: center;\n padding: var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0;\n flex: 1;\n --ic-typography-color: var(--ic-alert-description);\n}\n\n.alert-message-title-above {\n display: inline;\n}\n\n.alert-title {\n margin-right: var(--ic-space-xs);\n --ic-typography-color: var(--ic-alert-title);\n}\n\n.alert-title-above {\n white-space: normal;\n}\n\n.alert-action-container {\n margin-right: var(--ic-space-xs);\n display: flex;\n align-items: center;\n}\n\n.dismiss-icon {\n margin-right: var(--ic-space-xxxs);\n margin-left: -0.375rem;\n padding: 0.375rem;\n border: none;\n border-radius: 50%;\n background-color: inherit;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.dismiss-icon > svg {\n color: var(--ic-alert-icon-dismissible);\n}\n\n.dismiss-icon:hover {\n cursor: pointer;\n}\n\n@media (max-width: 628px) {\n .alert-content {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n\n .alert-message {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n\n .alert-title {\n white-space: normal;\n }\n\n .alert-action-container {\n margin-bottom: var(--ic-space-xs);\n }\n}\n\n@media (forced-colors: active) {\n .container {\n border: var(--ic-border-hc);\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n State,\n Listen,\n Prop,\n h,\n forceUpdate,\n} from \"@stencil/core\";\nimport closeIcon from \"../../assets/close-icon.svg\";\nimport { isSlotUsed, checkSlotInChildMutations } from \"../../utils/helpers\";\nimport {\n IcBrandForegroundEnum,\n IcStatusVariants,\n IcThemeMode,\n} from \"../../utils/types\";\nimport { VARIANT_ICONS } from \"../../utils/constants\";\n\n/**\n * @slot message - Content is placed to the right of the title.\n * @slot action - Content is placed to the right of the message.\n * @slot neutral-icon - A custom neutral icon is placed to the left of the title. This will override the default icon if used.\n */\n@Component({\n tag: \"ic-alert\",\n styleUrl: \"ic-alert.css\",\n shadow: true,\n})\nexport class Alert {\n private hostMutationObserver: MutationObserver = null;\n\n @Element() el: HTMLIcAlertElement;\n\n @State() alertTitleWrap: boolean = false;\n @State() visible: boolean = true;\n\n /**\n * If `true`, the alert will have the 'alert' ARIA role and will be announced to screen readers.\n */\n @Prop() announced?: boolean = true;\n\n /**\n * If `true`, the alert will have a close icon at the end to dismiss it.\n */\n @Prop() dismissible?: boolean = false;\n\n /**\n * The optional title to display at the start of the alert.\n */\n @Prop() heading?: string = \"\";\n\n /**\n * The main body message of the alert.\n */\n @Prop() message?: string;\n\n /**\n * If `true`, the default icon for the neutral variant will appear on the left of the alert.\n */\n @Prop() showDefaultIcon: boolean = true;\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * If `true`, the title and message will appear above and below instead of inline.\n */\n @Prop() titleAbove?: boolean = false;\n\n /**\n * The variant of the alert which will be rendered.\n */\n @Prop() variant?: IcStatusVariants = \"neutral\";\n\n /**\n * Is emitted when the user dismisses the alert.\n */\n @Event() icDismiss: EventEmitter<void>;\n\n disconnectedCallback(): void {\n this.hostMutationObserver?.disconnect();\n }\n\n componentDidLoad(): void {\n this.alertTitleShouldWrap();\n\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n childList: true,\n });\n }\n\n @Listen(\"icDismiss\", { capture: true })\n handleClick(): void {\n this.visible = !this.visible;\n }\n\n private dismissAction = (): void => {\n this.icDismiss.emit();\n };\n\n private alertTitleShouldWrap() {\n const titleHeight =\n this.el.shadowRoot.querySelector(\".alert-title\")?.clientHeight;\n if (titleHeight > 24) this.alertTitleWrap = true;\n }\n\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n if (\n mutationList.some(({ type, addedNodes, removedNodes }) =>\n type === \"childList\"\n ? checkSlotInChildMutations(addedNodes, removedNodes, \"action\")\n : false\n )\n ) {\n forceUpdate(this);\n }\n };\n\n render() {\n const {\n variant,\n heading,\n message,\n titleAbove,\n dismissible,\n announced,\n visible,\n showDefaultIcon,\n theme,\n } = this;\n\n return (\n visible && (\n <Host\n role={announced ? \"alert\" : null}\n class={{\n [IcBrandForegroundEnum.Dark]: true,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n <div\n class={{\n [\"container\"]: true,\n [`container-${variant}`]: true,\n }}\n >\n <div class=\"alert-icon-container\">\n <div\n class={{\n [\"divider\"]: true,\n [`divider-${variant}`]: true,\n }}\n ></div>\n {variant === \"neutral\" ? (\n isSlotUsed(this.el, \"neutral-icon\") ? (\n <div class=\"alert-icon svg-container icon-neutral\">\n <slot name=\"neutral-icon\"></slot>\n </div>\n ) : showDefaultIcon ? (\n <span\n class={{\n [\"alert-icon\"]: true,\n [\"svg-container\"]: true,\n [`icon-${variant}`]: true,\n }}\n innerHTML={VARIANT_ICONS[variant].icon}\n ></span>\n ) : (\n <div class=\"icon-placeholder\"></div>\n )\n ) : (\n <span\n class={{\n [\"alert-icon\"]: true,\n [\"svg-container\"]: true,\n [`icon-${variant}`]: true,\n }}\n innerHTML={VARIANT_ICONS[variant].icon}\n ></span>\n )}\n </div>\n <div class=\"alert-content\">\n <div\n class={{\n [\"alert-message\"]: true,\n [\"alert-message-title-above\"]:\n titleAbove || this.alertTitleWrap,\n }}\n >\n {heading && (\n <ic-typography\n class={{\n [\"alert-title\"]: true,\n [\"alert-title-above\"]: titleAbove || this.alertTitleWrap,\n }}\n variant=\"subtitle-large\"\n >\n <p>{heading}</p>\n </ic-typography>\n )}\n <slot name=\"message\">\n <ic-typography variant=\"body\">{message}</ic-typography>\n </slot>\n </div>\n {isSlotUsed(this.el, \"action\") && (\n <div class=\"alert-action-container\">\n <slot name=\"action\" />\n </div>\n )}\n </div>\n <div class=\"dismiss-icon-container\">\n {dismissible && (\n <ic-button\n class={{\n [\"svg-container\"]: true,\n [\"dismiss-icon\"]: true,\n }}\n innerHTML={closeIcon}\n onClick={this.dismissAction}\n variant=\"icon\"\n theme=\"dark\"\n title=\"Dismiss\"\n ></ic-button>\n )}\n </div>\n </div>\n </Host>\n )\n );\n }\n}\n"],"mappings":"oKAAA,MAAMA,EAAa,snL,MC+BNC,EAAK,M,8DACRC,KAAAC,qBAAyC,KAsEzCD,KAAAE,cAAgB,KACtBF,KAAKG,UAAUC,MAAM,EASfJ,KAAAK,qBAAwBC,IAC9B,GACEA,EAAaC,MAAK,EAAGC,OAAMC,aAAYC,kBACrCF,IAAS,YACLG,EAA0BF,EAAYC,EAAc,UACpD,QAEN,CACAE,EAAYZ,K,uBApFmB,M,aACP,K,eAKE,K,iBAKE,M,aAKL,G,4CAUQ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KAAY,MAEvBgB,UAAWC,EAAcjB,GAASkB,QAIxCV,EAAA,OAAKG,MAAM,iBACTH,EAAA,OACEG,MAAO,CACL,CAAC,iBAAkB,KACnB,CAAC,6BACCR,GAAcjC,KAAK4B,iBAGtBG,GACCO,EAAA,iBACEG,MAAO,CACL,CAAC,eAAgB,KACjB,CAAC,qBAAsBR,GAAcjC,KAAK4B,gBAE5CE,QAAQ,kBAERQ,EAAA,SAAIP,IAGRO,EAAA,QAAMO,KAAK,WACTP,EAAA,iBAAeR,QAAQ,QAAQE,KAGlCY,EAAW5C,KAAKoB,GAAI,WACnBkB,EAAA,OAAKG,MAAM,0BACTH,EAAA,QAAMO,KAAK,aAIjBP,EAAA,OAAKG,MAAM,0BACRP,GACCI,EAAA,aACEG,MAAO,CACL,CAAC,iBAAkB,KACnB,CAAC,gBAAiB,MAEpBK,UAAWG,EACXC,QAASlD,KAAKE,cACd4B,QAAQ,OACRO,MAAM,OACNc,MAAM,c"}
@@ -1,2 +0,0 @@
1
- import{r as o,c as r,h as t,H as s}from"./p-6b5e91e2.js";import{K as e,L as i,W as a,b as h,g as c}from"./p-48e98730.js";const n=class{constructor(t){o(this,t);this.brandChange=r(this,"brandChange",7);this.darkModeChangeHandler=()=>{if(this.theme==="system"){this.themeClass=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"ic-theme-dark":"ic-theme-light"}else{this.themeClass=`ic-theme-${this.theme}`}};this.checkBrandColorContrast=()=>{if(e()<i&&e()>a){console.warn(`The brand colour does not provide enough contrast with either of the ICDS black or white foreground colours. Consider choosing a colour with a different brightness to achieve sufficient colour contrast for good visibility. See https://www.w3.org/TR/AERT/#color-contrast for more information about colour contrast.`)}};this.setBrandColor=()=>{const o=h(this.brandColor);if(o){const{r,g:t,b:s,a:e}=o;const{style:i}=document.documentElement;i.setProperty("--ic-brand-color-primary-r",`${r}`);i.setProperty("--ic-brand-color-primary-g",`${t}`);i.setProperty("--ic-brand-color-primary-b",`${s}`);i.setProperty("--ic-brand-color-primary-a",`${e}`);this.checkBrandColorContrast();this.brandChange.emit({mode:c(),color:o})}};this.themeClass="";this.brandColor=null;this.theme="light"}watchBrandColorPropHandler(){this.setBrandColor()}watchThemePropHandler(){this.darkModeChangeHandler()}componentWillLoad(){this.darkModeChangeHandler();this.setBrandColor();window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",this.darkModeChangeHandler)}render(){const{themeClass:o}=this;return t(s,{class:o},t("slot",null))}static get watchers(){return{brandColor:["watchBrandColorPropHandler"],theme:["watchThemePropHandler"]}}};export{n as ic_theme};
2
- //# sourceMappingURL=p-cfe32b37.entry.js.map