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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (364) 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-50fa27f6.js} +14 -1
  4. package/dist/cjs/helpers-50fa27f6.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 +9 -7
  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 +1 -1
  64. package/dist/cjs/ic-toggle-button.cjs.entry.js +1 -1
  65. package/dist/cjs/ic-top-navigation.cjs.entry.js +2 -2
  66. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  67. package/dist/cjs/ic-typography.cjs.entry.js +1 -1
  68. package/dist/cjs/index-f982899d.js +4 -4
  69. package/dist/cjs/loader.cjs.js +1 -1
  70. package/dist/collection/ag-theme-icds.css +32 -31
  71. package/dist/collection/components/ic-alert/ic-alert.js +3 -10
  72. package/dist/collection/components/ic-alert/ic-alert.js.map +1 -1
  73. package/dist/collection/components/ic-alert/test/basic/ic-alert.spec.js +21 -3
  74. package/dist/collection/components/ic-alert/test/basic/ic-alert.spec.js.map +1 -1
  75. package/dist/collection/components/ic-card-vertical/ic-card-vertical.js +13 -20
  76. package/dist/collection/components/ic-card-vertical/ic-card-vertical.js.map +1 -1
  77. package/dist/collection/components/ic-card-vertical/test/basic/ic-card-vertical.spec.js +34 -3
  78. package/dist/collection/components/ic-card-vertical/test/basic/ic-card-vertical.spec.js.map +1 -1
  79. package/dist/collection/components/ic-empty-state/ic-empty-state.js +3 -13
  80. package/dist/collection/components/ic-empty-state/ic-empty-state.js.map +1 -1
  81. package/dist/collection/components/ic-footer/ic-footer.js +18 -7
  82. package/dist/collection/components/ic-footer/ic-footer.js.map +1 -1
  83. package/dist/collection/components/ic-footer/test/basic/ic-footer.spec.js +41 -0
  84. package/dist/collection/components/ic-footer/test/basic/ic-footer.spec.js.map +1 -1
  85. package/dist/collection/components/ic-hero/ic-hero.js +3 -10
  86. package/dist/collection/components/ic-hero/ic-hero.js.map +1 -1
  87. package/dist/collection/components/ic-hero/test/basic/ic-hero.spec.js +21 -3
  88. package/dist/collection/components/ic-hero/test/basic/ic-hero.spec.js.map +1 -1
  89. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +3 -10
  90. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js.map +1 -1
  91. package/dist/collection/components/ic-input-component-container/test/basic/ic-input-component-container.spec.js +21 -3
  92. package/dist/collection/components/ic-input-component-container/test/basic/ic-input-component-container.spec.js.map +1 -1
  93. package/dist/collection/components/ic-menu/ic-menu.css +6 -0
  94. package/dist/collection/components/ic-menu/ic-menu.js +38 -11
  95. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  96. package/dist/collection/components/ic-menu/test/basic/ic-menu.spec.js +9 -9
  97. package/dist/collection/components/ic-menu/test/basic/ic-menu.spec.js.map +1 -1
  98. package/dist/collection/components/ic-search-bar/ic-search-bar.css +66 -4
  99. package/dist/collection/components/ic-search-bar/ic-search-bar.js +53 -28
  100. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  101. package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.spec.js +59 -93
  102. package/dist/collection/components/ic-search-bar/test/basic/ic-search-bar.spec.js.map +1 -1
  103. package/dist/collection/components/ic-select/ic-select.js +46 -34
  104. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  105. package/dist/collection/components/ic-select/test/basic/ic-select.spec.js +64 -0
  106. package/dist/collection/components/ic-select/test/basic/ic-select.spec.js.map +1 -1
  107. package/dist/collection/components/ic-text-field/ic-text-field.js +15 -8
  108. package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
  109. package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +4 -0
  110. package/dist/collection/testspec.setup.js +14 -0
  111. package/dist/collection/testspec.setup.js.map +1 -1
  112. package/dist/collection/utils/helpers.js +11 -0
  113. package/dist/collection/utils/helpers.js.map +1 -1
  114. package/dist/components/helpers.js +13 -1
  115. package/dist/components/helpers.js.map +1 -1
  116. package/dist/components/ic-alert.js +3 -10
  117. package/dist/components/ic-alert.js.map +1 -1
  118. package/dist/components/ic-card-vertical.js +13 -20
  119. package/dist/components/ic-card-vertical.js.map +1 -1
  120. package/dist/components/ic-empty-state.js +3 -13
  121. package/dist/components/ic-empty-state.js.map +1 -1
  122. package/dist/components/ic-footer.js +18 -7
  123. package/dist/components/ic-footer.js.map +1 -1
  124. package/dist/components/ic-hero.js +3 -10
  125. package/dist/components/ic-hero.js.map +1 -1
  126. package/dist/components/ic-input-component-container2.js +3 -10
  127. package/dist/components/ic-input-component-container2.js.map +1 -1
  128. package/dist/components/ic-menu2.js +25 -12
  129. package/dist/components/ic-menu2.js.map +1 -1
  130. package/dist/components/ic-search-bar.js +46 -53
  131. package/dist/components/ic-search-bar.js.map +1 -1
  132. package/dist/components/ic-select.js +45 -33
  133. package/dist/components/ic-select.js.map +1 -1
  134. package/dist/components/ic-side-navigation.js +1 -1
  135. package/dist/components/ic-stepper.js +1 -1
  136. package/dist/components/ic-text-field.js +371 -1
  137. package/dist/components/ic-text-field.js.map +1 -1
  138. package/dist/components/ic-theme.js +1 -1
  139. package/dist/components/ic-top-navigation.js +2 -2
  140. package/dist/components/ic-top-navigation.js.map +1 -1
  141. package/dist/core/ag-theme-icds.css +32 -31
  142. package/dist/core/core.css +15 -3
  143. package/dist/core/core.esm.js +1 -1
  144. package/dist/core/core.esm.js.map +1 -1
  145. package/dist/core/p-050e3e36.entry.js +2 -0
  146. package/dist/core/p-050e3e36.entry.js.map +1 -0
  147. package/dist/core/{p-5ba8e679.entry.js → p-08a82b71.entry.js} +2 -2
  148. package/dist/core/{p-5d417fc0.entry.js → p-12bd8ade.entry.js} +2 -2
  149. package/dist/core/{p-ded2dbed.entry.js → p-13637d3f.entry.js} +2 -2
  150. package/dist/core/{p-406e58af.entry.js → p-1425c78b.entry.js} +2 -2
  151. package/dist/core/{p-4af52174.entry.js → p-16df8bcf.entry.js} +2 -2
  152. package/dist/core/{p-1234f7a5.entry.js → p-1b1f7523.entry.js} +2 -2
  153. package/dist/core/{p-bc7b8a1e.entry.js → p-2179e015.entry.js} +2 -2
  154. package/dist/core/{p-810f5a2d.entry.js → p-273f9b03.entry.js} +2 -2
  155. package/dist/core/p-273f9b03.entry.js.map +1 -0
  156. package/dist/core/{p-b5439baa.entry.js → p-27933dfe.entry.js} +2 -2
  157. package/dist/core/{p-c83e933c.entry.js → p-2aca1bac.entry.js} +2 -2
  158. package/dist/core/{p-a24bcf5f.entry.js → p-30f91e2e.entry.js} +2 -2
  159. package/dist/core/p-3361ac8f.entry.js +2 -0
  160. package/dist/core/p-3361ac8f.entry.js.map +1 -0
  161. package/dist/core/{p-98dbbb34.entry.js → p-34e89ebf.entry.js} +2 -2
  162. package/dist/core/{p-b9aa801f.entry.js → p-353893b7.entry.js} +2 -2
  163. package/dist/core/{p-0821fc5b.entry.js → p-3645c4e6.entry.js} +2 -2
  164. package/dist/core/p-369ff74c.entry.js +2 -0
  165. package/dist/core/p-369ff74c.entry.js.map +1 -0
  166. package/dist/core/p-46dd7413.entry.js +2 -0
  167. package/dist/core/p-46dd7413.entry.js.map +1 -0
  168. package/dist/core/{p-225384ab.entry.js → p-4e57c7ba.entry.js} +2 -2
  169. package/dist/core/{p-0b8c3770.entry.js → p-51990f23.entry.js} +2 -2
  170. package/dist/core/{p-4dc48606.entry.js → p-5347f687.entry.js} +2 -2
  171. package/dist/core/{p-6859019c.entry.js → p-538f1bb9.entry.js} +2 -2
  172. package/dist/core/{p-07cd8a50.entry.js → p-5479be2b.entry.js} +2 -2
  173. package/dist/core/{p-b51e378c.entry.js → p-5801598f.entry.js} +2 -2
  174. package/dist/core/{p-c2b359d9.entry.js → p-5b118dec.entry.js} +2 -2
  175. package/dist/core/p-5d89525e.entry.js +2 -0
  176. package/dist/core/p-5d89525e.entry.js.map +1 -0
  177. package/dist/core/{p-f42c0469.entry.js → p-5dcafe90.entry.js} +2 -2
  178. package/dist/core/{p-705db6a5.entry.js → p-5e694b17.entry.js} +2 -2
  179. package/dist/core/{p-b27dfa1b.entry.js → p-6331782f.entry.js} +2 -2
  180. package/dist/core/{p-5d653608.entry.js → p-6a5d58bc.entry.js} +2 -2
  181. package/dist/core/p-6d0c5a77.entry.js +2 -0
  182. package/dist/core/{p-cfe32b37.entry.js.map → p-6d0c5a77.entry.js.map} +1 -1
  183. package/dist/core/p-6f16a69e.entry.js +2 -0
  184. package/dist/core/{p-dcb2073d.entry.js.map → p-6f16a69e.entry.js.map} +1 -1
  185. package/dist/core/{p-9c1d4f72.entry.js → p-7a16046a.entry.js} +2 -2
  186. package/dist/core/p-7c0ff8cf.entry.js +2 -0
  187. package/dist/core/p-7c0ff8cf.entry.js.map +1 -0
  188. package/dist/core/{p-3cfef37a.entry.js → p-7c39afb5.entry.js} +2 -2
  189. package/dist/core/{p-a23c515d.entry.js → p-7e546e88.entry.js} +2 -2
  190. package/dist/core/{p-520c6089.entry.js → p-8dda6121.entry.js} +2 -2
  191. package/dist/core/{p-518ea375.entry.js → p-9505b0f1.entry.js} +2 -2
  192. package/dist/core/{p-b2a41070.entry.js → p-a25d535a.entry.js} +2 -2
  193. package/dist/core/p-a519e9a6.entry.js +2 -0
  194. package/dist/core/p-a519e9a6.entry.js.map +1 -0
  195. package/dist/core/p-b052e67a.entry.js +2 -0
  196. package/dist/core/{p-3420a999.entry.js.map → p-b052e67a.entry.js.map} +1 -1
  197. package/dist/core/{p-580b1593.entry.js → p-bafcbecc.entry.js} +2 -2
  198. package/dist/core/{p-61510f00.entry.js → p-bdbce1a0.entry.js} +2 -2
  199. package/dist/core/p-c68d98f8.entry.js +2 -0
  200. package/dist/core/p-c68d98f8.entry.js.map +1 -0
  201. package/dist/core/{p-4f72a02a.entry.js → p-cae08ac2.entry.js} +2 -2
  202. package/dist/core/{p-7124b387.entry.js → p-d6ce4473.entry.js} +2 -2
  203. package/dist/core/{p-193582d4.entry.js → p-dcdfe5f9.entry.js} +2 -2
  204. package/dist/core/{p-3994d86d.entry.js → p-e9c078fa.entry.js} +2 -2
  205. package/dist/core/p-eafa4df2.js +2 -0
  206. package/dist/core/p-eafa4df2.js.map +1 -0
  207. package/dist/core/{p-da85eaf6.entry.js → p-eb132c44.entry.js} +2 -2
  208. package/dist/core/p-ebf2b874.entry.js +2 -0
  209. package/dist/core/p-ebf2b874.entry.js.map +1 -0
  210. package/dist/core/{p-0d505c1f.entry.js → p-eec110a7.entry.js} +2 -2
  211. package/dist/core/{p-91c1327d.entry.js → p-f1b7e4f4.entry.js} +2 -2
  212. package/dist/core/{p-d2909711.entry.js → p-f8890135.entry.js} +2 -2
  213. package/dist/esm/core.js +1 -1
  214. package/dist/esm/{helpers-e594bfc6.js → helpers-8565b5c5.js} +14 -2
  215. package/dist/esm/helpers-8565b5c5.js.map +1 -0
  216. package/dist/esm/ic-accordion-group.entry.js +1 -1
  217. package/dist/esm/ic-accordion.entry.js +1 -1
  218. package/dist/esm/ic-alert.entry.js +3 -10
  219. package/dist/esm/ic-alert.entry.js.map +1 -1
  220. package/dist/esm/ic-back-to-top.entry.js +1 -1
  221. package/dist/esm/ic-badge.entry.js +1 -1
  222. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  223. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  224. package/dist/esm/ic-button_3.entry.js +1 -1
  225. package/dist/esm/ic-card-vertical.entry.js +13 -20
  226. package/dist/esm/ic-card-vertical.entry.js.map +1 -1
  227. package/dist/esm/ic-checkbox-group.entry.js +1 -1
  228. package/dist/esm/ic-checkbox.entry.js +1 -1
  229. package/dist/esm/ic-chip.entry.js +1 -1
  230. package/dist/esm/ic-data-row.entry.js +1 -1
  231. package/dist/esm/ic-dialog.entry.js +1 -1
  232. package/dist/esm/ic-divider.entry.js +1 -1
  233. package/dist/esm/ic-empty-state.entry.js +3 -13
  234. package/dist/esm/ic-empty-state.entry.js.map +1 -1
  235. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  236. package/dist/esm/ic-footer-link.entry.js +1 -1
  237. package/dist/esm/ic-footer.entry.js +18 -7
  238. package/dist/esm/ic-footer.entry.js.map +1 -1
  239. package/dist/esm/ic-hero.entry.js +3 -10
  240. package/dist/esm/ic-hero.entry.js.map +1 -1
  241. package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
  242. package/dist/esm/ic-input-component-container_3.entry.js +28 -22
  243. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  244. package/dist/esm/ic-input-label_2.entry.js +1 -1
  245. package/dist/esm/ic-link.entry.js +1 -1
  246. package/dist/esm/ic-menu-group.entry.js +1 -1
  247. package/dist/esm/ic-menu-item.entry.js +1 -1
  248. package/dist/esm/ic-navigation-button.entry.js +1 -1
  249. package/dist/esm/ic-navigation-group.entry.js +1 -1
  250. package/dist/esm/ic-navigation-item.entry.js +1 -1
  251. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  252. package/dist/esm/ic-page-header.entry.js +1 -1
  253. package/dist/esm/ic-pagination-item.entry.js +1 -1
  254. package/dist/esm/ic-pagination.entry.js +1 -1
  255. package/dist/esm/ic-popover-menu.entry.js +1 -1
  256. package/dist/esm/ic-radio-group.entry.js +1 -1
  257. package/dist/esm/ic-radio-option.entry.js +1 -1
  258. package/dist/esm/ic-search-bar.entry.js +32 -28
  259. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  260. package/dist/esm/ic-select.entry.js +44 -32
  261. package/dist/esm/ic-select.entry.js.map +1 -1
  262. package/dist/esm/ic-side-navigation.entry.js +1 -1
  263. package/dist/esm/ic-status-tag.entry.js +1 -1
  264. package/dist/esm/ic-step.entry.js +1 -1
  265. package/dist/esm/ic-stepper.entry.js +1 -1
  266. package/dist/esm/ic-switch.entry.js +1 -1
  267. package/dist/esm/ic-tab-group.entry.js +1 -1
  268. package/dist/esm/ic-tab-panel.entry.js +1 -1
  269. package/dist/esm/ic-tab.entry.js +1 -1
  270. package/dist/esm/ic-text-field.entry.js +9 -7
  271. package/dist/esm/ic-text-field.entry.js.map +1 -1
  272. package/dist/esm/ic-theme.entry.js +1 -1
  273. package/dist/esm/ic-toast.entry.js +1 -1
  274. package/dist/esm/ic-toggle-button-group.entry.js +1 -1
  275. package/dist/esm/ic-toggle-button.entry.js +1 -1
  276. package/dist/esm/ic-top-navigation.entry.js +2 -2
  277. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  278. package/dist/esm/ic-typography.entry.js +1 -1
  279. package/dist/esm/index-d1d2c456.js +4 -4
  280. package/dist/esm/loader.js +1 -1
  281. package/dist/types/components/ic-alert/ic-alert.d.ts +0 -1
  282. package/dist/types/components/ic-card-vertical/ic-card-vertical.d.ts +0 -1
  283. package/dist/types/components/ic-empty-state/ic-empty-state.d.ts +0 -1
  284. package/dist/types/components/ic-footer/ic-footer.d.ts +1 -0
  285. package/dist/types/components/ic-hero/ic-hero.d.ts +0 -1
  286. package/dist/types/components/ic-input-component-container/ic-input-component-container.d.ts +0 -1
  287. package/dist/types/components/ic-menu/ic-menu.d.ts +6 -1
  288. package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +9 -2
  289. package/dist/types/components/ic-select/ic-select.d.ts +5 -4
  290. package/dist/types/components/ic-text-field/ic-text-field.d.ts +2 -1
  291. package/dist/types/components.d.ts +13 -3
  292. package/dist/types/testspec.setup.d.ts +9 -0
  293. package/dist/types/utils/helpers.d.ts +2 -0
  294. package/hydrate/index.js +150 -128
  295. package/package.json +2 -9
  296. package/vscode-data.json +1 -1
  297. package/dist/cjs/helpers-dd569d97.js.map +0 -1
  298. package/dist/components/ic-text-field2.js +0 -373
  299. package/dist/components/ic-text-field2.js.map +0 -1
  300. package/dist/core/p-3420a999.entry.js +0 -2
  301. package/dist/core/p-3bfc4a52.entry.js +0 -2
  302. package/dist/core/p-3bfc4a52.entry.js.map +0 -1
  303. package/dist/core/p-48e98730.js +0 -2
  304. package/dist/core/p-48e98730.js.map +0 -1
  305. package/dist/core/p-59800237.entry.js +0 -2
  306. package/dist/core/p-59800237.entry.js.map +0 -1
  307. package/dist/core/p-6159b077.entry.js +0 -2
  308. package/dist/core/p-6159b077.entry.js.map +0 -1
  309. package/dist/core/p-810744b5.entry.js +0 -2
  310. package/dist/core/p-810744b5.entry.js.map +0 -1
  311. package/dist/core/p-810f5a2d.entry.js.map +0 -1
  312. package/dist/core/p-8a2670c1.entry.js +0 -2
  313. package/dist/core/p-8a2670c1.entry.js.map +0 -1
  314. package/dist/core/p-aefebee9.entry.js +0 -2
  315. package/dist/core/p-aefebee9.entry.js.map +0 -1
  316. package/dist/core/p-c67f7603.entry.js +0 -2
  317. package/dist/core/p-c67f7603.entry.js.map +0 -1
  318. package/dist/core/p-c6e91e13.entry.js +0 -2
  319. package/dist/core/p-c6e91e13.entry.js.map +0 -1
  320. package/dist/core/p-ca27ab19.entry.js +0 -2
  321. package/dist/core/p-ca27ab19.entry.js.map +0 -1
  322. package/dist/core/p-cfe32b37.entry.js +0 -2
  323. package/dist/core/p-dcb2073d.entry.js +0 -2
  324. package/dist/esm/helpers-e594bfc6.js.map +0 -1
  325. /package/dist/core/{p-5ba8e679.entry.js.map → p-08a82b71.entry.js.map} +0 -0
  326. /package/dist/core/{p-5d417fc0.entry.js.map → p-12bd8ade.entry.js.map} +0 -0
  327. /package/dist/core/{p-ded2dbed.entry.js.map → p-13637d3f.entry.js.map} +0 -0
  328. /package/dist/core/{p-406e58af.entry.js.map → p-1425c78b.entry.js.map} +0 -0
  329. /package/dist/core/{p-4af52174.entry.js.map → p-16df8bcf.entry.js.map} +0 -0
  330. /package/dist/core/{p-1234f7a5.entry.js.map → p-1b1f7523.entry.js.map} +0 -0
  331. /package/dist/core/{p-bc7b8a1e.entry.js.map → p-2179e015.entry.js.map} +0 -0
  332. /package/dist/core/{p-b5439baa.entry.js.map → p-27933dfe.entry.js.map} +0 -0
  333. /package/dist/core/{p-c83e933c.entry.js.map → p-2aca1bac.entry.js.map} +0 -0
  334. /package/dist/core/{p-a24bcf5f.entry.js.map → p-30f91e2e.entry.js.map} +0 -0
  335. /package/dist/core/{p-98dbbb34.entry.js.map → p-34e89ebf.entry.js.map} +0 -0
  336. /package/dist/core/{p-b9aa801f.entry.js.map → p-353893b7.entry.js.map} +0 -0
  337. /package/dist/core/{p-0821fc5b.entry.js.map → p-3645c4e6.entry.js.map} +0 -0
  338. /package/dist/core/{p-225384ab.entry.js.map → p-4e57c7ba.entry.js.map} +0 -0
  339. /package/dist/core/{p-0b8c3770.entry.js.map → p-51990f23.entry.js.map} +0 -0
  340. /package/dist/core/{p-4dc48606.entry.js.map → p-5347f687.entry.js.map} +0 -0
  341. /package/dist/core/{p-6859019c.entry.js.map → p-538f1bb9.entry.js.map} +0 -0
  342. /package/dist/core/{p-07cd8a50.entry.js.map → p-5479be2b.entry.js.map} +0 -0
  343. /package/dist/core/{p-b51e378c.entry.js.map → p-5801598f.entry.js.map} +0 -0
  344. /package/dist/core/{p-c2b359d9.entry.js.map → p-5b118dec.entry.js.map} +0 -0
  345. /package/dist/core/{p-f42c0469.entry.js.map → p-5dcafe90.entry.js.map} +0 -0
  346. /package/dist/core/{p-705db6a5.entry.js.map → p-5e694b17.entry.js.map} +0 -0
  347. /package/dist/core/{p-b27dfa1b.entry.js.map → p-6331782f.entry.js.map} +0 -0
  348. /package/dist/core/{p-5d653608.entry.js.map → p-6a5d58bc.entry.js.map} +0 -0
  349. /package/dist/core/{p-9c1d4f72.entry.js.map → p-7a16046a.entry.js.map} +0 -0
  350. /package/dist/core/{p-3cfef37a.entry.js.map → p-7c39afb5.entry.js.map} +0 -0
  351. /package/dist/core/{p-a23c515d.entry.js.map → p-7e546e88.entry.js.map} +0 -0
  352. /package/dist/core/{p-520c6089.entry.js.map → p-8dda6121.entry.js.map} +0 -0
  353. /package/dist/core/{p-518ea375.entry.js.map → p-9505b0f1.entry.js.map} +0 -0
  354. /package/dist/core/{p-b2a41070.entry.js.map → p-a25d535a.entry.js.map} +0 -0
  355. /package/dist/core/{p-580b1593.entry.js.map → p-bafcbecc.entry.js.map} +0 -0
  356. /package/dist/core/{p-61510f00.entry.js.map → p-bdbce1a0.entry.js.map} +0 -0
  357. /package/dist/core/{p-4f72a02a.entry.js.map → p-cae08ac2.entry.js.map} +0 -0
  358. /package/dist/core/{p-7124b387.entry.js.map → p-d6ce4473.entry.js.map} +0 -0
  359. /package/dist/core/{p-193582d4.entry.js.map → p-dcdfe5f9.entry.js.map} +0 -0
  360. /package/dist/core/{p-3994d86d.entry.js.map → p-e9c078fa.entry.js.map} +0 -0
  361. /package/dist/core/{p-da85eaf6.entry.js.map → p-eb132c44.entry.js.map} +0 -0
  362. /package/dist/core/{p-0d505c1f.entry.js.map → p-eec110a7.entry.js.map} +0 -0
  363. /package/dist/core/{p-91c1327d.entry.js.map → p-f1b7e4f4.entry.js.map} +0 -0
  364. /package/dist/core/{p-d2909711.entry.js.map → p-f8890135.entry.js.map} +0 -0
@@ -1,2 +0,0 @@
1
- import{r as e,c as t,h as i,H as o,g as n}from"./p-6b5e91e2.js";import{d as s,r,a,i as c}from"./p-48e98730.js";import{C as u}from"./p-c2e091d7.js";import{C as l}from"./p-3b185c32.js";const d='/*! 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}li{list-style:none;padding:0}:host ::part(button){color:var(--ic-popover-menu-item-check);padding:calc(var(--ic-space-xxxs) / 2);display:flex;align-items:flex-start;gap:var(--ic-space-xs);border-radius:0;min-height:2.5rem;height:auto}.focus-border{display:flex;align-items:flex-start;gap:var(--ic-space-xs);border-radius:var(--ic-border-radius);margin:calc(var(--ic-space-xxxs) / 2);padding:var(--ic-space-xxs);border:var(--ic-space-xxxs) dashed transparent;--icon-height:auto}:host(.ic-menu-item-disabled) ::part(button){color:var(--ic-popover-menu-item-check-disabled) !important;--ic-typography-color:var(--ic-popover-menu-item-check-disabled) !important;pointer-events:none}:host(.ic-menu-item-disabled) .menu-item-label,:host(.ic-menu-item-disabled) .shortcut,:host(.ic-menu-item-disabled) .menu-item-description{--ic-typography-color:var(--ic-popover-menu-item-label-disabled) !important}:host([variant="destructive"]) ::part(button){color:var(--ic-popover-menu-destructive-item-icon);--ic-typography-color:var(--ic-popover-menu-destructive-item-label)}:host ::part(button):hover{background-color:var(--ic-popover-background-hover)}:host ::part(button):focus-visible,:host ::part(button):focus{color:var(--ic-popover-menu-item-icon-focused);--ic-typography-color:purple;background-color:var(--ic-popover-background-focus);box-shadow:none}:host(.ic-menu-item-disabled) ::part(button):focus-visible,:host(.ic-menu-item-disabled) ::part(button):focus{color:var(--ic-popover-menu-item-icon-disabled) !important;--ic-typography-color:orange !important}:host([variant="destructive"]) ::part(button):focus-visible,:host([variant="destructive"]) ::part(button):focus{background-color:var(--ic-popover-destructive-background-focus)}ic-button:focus-within .menu-item-label,ic-button:focus-within .shortcut,ic-button:focus-within .menu-item-description{--ic-typography-color:var(--ic-popover-menu-item-label-focused)}:host(.ic-menu-item-disabled) ic-button:focus-within .focus-border{border-color:var(--ic-popover-menu-border)}:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-label,:host(.ic-menu-item-disabled) ic-button:focus-within .shortcut,:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-description{--ic-typography-color:var(--ic-popover-menu-item-label-disabled) !important}:host ::part(button):active{background-color:var(--ic-popover-background-pressed);color:var(--ic-popover-menu-item-label) !important;--ic-typography-color:var(--ic-popover-menu-item-label) !important}:host([variant="destructive"]) ::part(button):active{background-color:var(--ic-popover-background-pressed);color:var(--ic-popover-menu-destructive-item-label) !important;--ic-typography-color:var(\n --ic-popover-menu-destructive-item-label\n ) !important}.menu-item-info{display:flex;flex-direction:column;flex:1;align-items:baseline;white-space:pre-line;text-align:left}.menu-labels{display:flex;align-items:baseline;gap:var(--ic-space-xs)}.menu-item-description{--ic-typography-color:var(--ic-popover-menu-item-description)}.shortcut{--ic-typography-color:var(--ic-popover-menu-item-shortcut);display:flex;flex:min-content}:host([variant="destructive"]) .menu-item-label{text-transform:uppercase;font-weight:600;letter-spacing:0.025em}ic-button:active .menu-item-label{--ic-typography-color:var(--ic-popover-menu-item-label)}ic-button:active .menu-item-description{--ic-typography-color:var(--ic-popover-menu-item-description)}ic-button:active .shortcut{--ic-typography-color:var(--ic-popover-menu-item-shortcut)}:host([variant="destructive"]) ic-button:active .menu-item-label{--ic-typography-color:var(\n --ic-popover-menu-destructive-item-label\n ) !important}.icon,.check-icon,.submenu-icon,.icon ::slotted(svg),.check-icon svg,.submenu-icon svg{width:var(--ic-space-lg);height:var(--ic-space-lg)}.check-icon.hide{visibility:hidden}@media (forced-colors: active){:host ::part(button){border:canvas}:host ::part(button):focus-visible{outline:var(--ic-space-xxxs) solid transparent}.focus-border{border-color:canvas}:host(.ic-menu-item-disabled) ic-button:focus-within .focus-border{border-color:GrayText}:host(.ic-menu-item-disabled) .menu-item-info,:host(.ic-menu-item-disabled) .menu-item-label,:host(.ic-menu-item-disabled) .shortcut,:host(.ic-menu-item-disabled) .menu-item-description,:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-info,:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-label,:host(.ic-menu-item-disabled) ic-button:focus-within .shortcut,:host(.ic-menu-item-disabled) ic-button:focus-within .menu-item-description{--ic-typography-color:GrayText !important}:host(.ic-menu-item-disabled) ::part(button):focus-visible,:host(.ic-menu-item-disabled) ::part(button):focus{outline-color:GrayText !important}}';const p=class{constructor(i){e(this,i);this.childBlur=t(this,"childBlur",7);this.handleMenuItemClick=t(this,"handleMenuItemClick",7);this.icToggleChecked=t(this,"icToggleChecked",7);this.triggerPopoverMenuInstance=t(this,"triggerPopoverMenuInstance",7);this.handleClick=e=>{if(s(this.submenuTriggerFor)){this.triggerPopoverMenuInstance.emit()}else if(this.variant==="toggle"){e.preventDefault();this.checked=!this.checked;this.icToggleChecked.emit({checked:this.checked})}this.handleMenuItemClick.emit(this.el)};this.getMenuItemAriaLabel=()=>{let e=this.label;if(s(this.description)){e=`${e}, ${this.description}`}if(s(this.keyboardShortcutLabel)){e=`${e}, ${this.keyboardShortcutLabel}`}if(this.variant==="destructive"){e=`${e}, destructive`}if(s(this.submenuTriggerFor)){e=`${e}, triggers submenu`}if(this.el.classList.contains("ic-popover-submenu-back-button")){e="Go back to parent menu"}const t=this.el.parentElement;if(t.tagName==="IC-MENU-GROUP"&&t.label){return`${e}, ${t.label} menu group`}else{return e}};this.checked=false;this.description=undefined;this.disabled=false;this.href=undefined;this.hreflang=undefined;this.keyboardShortcutLabel=undefined;this.label=undefined;this.referrerpolicy=undefined;this.rel=undefined;this.submenuTriggerFor=undefined;this.target=undefined;this.variant="default"}watchDisabledHandler(){r(this.disabled,this.el)}componentWillLoad(){if(s(this.submenuTriggerFor)&&this.variant!=="default"){this.variant="default"}r(this.disabled,this.el)}componentDidLoad(){a([{prop:this.label,propName:"label"}],"Menu Item")}handleHostClick(e){if(this.disabled){e.stopImmediatePropagation()}}render(){const e=()=>i("div",{class:"menu-item-info"},i("div",{class:"menu-labels"},i("ic-typography",{class:"menu-item-label"},this.label),this.keyboardShortcutLabel&&i("ic-typography",{variant:"caption",class:"shortcut"},this.keyboardShortcutLabel)),this.description&&i("ic-typography",{class:"menu-item-description",variant:"caption"},this.description));return i(o,{class:{["ic-menu-item-disabled"]:this.disabled}},i("li",{role:this.variant==="toggle"?"menuitemcheckbox":"menuitem","aria-disabled":`${this.disabled}`,"aria-checked":this.variant==="toggle"?this.checked?"true":"false":undefined},i("ic-button",{fullWidth:true,variant:"tertiary",onClick:this.handleClick,href:s(this.href),hreflang:s(this.hreflang),target:s(this.target),rel:s(this.rel),referrerpolicy:this.referrerpolicy!==undefined?this.referrerpolicy:null,"aria-disabled":`${this.disabled}`,"aria-label":this.getMenuItemAriaLabel(),"aria-haspopup":s(this.submenuTriggerFor)||this.el.classList.contains("ic-popover-submenu-back-button")?"menu":false},i("div",{class:"focus-border"},c(this.el,"icon")&&i("span",{class:"icon"},i("slot",{name:"icon"})),i(e,null),this.variant==="toggle"&&i("span",{class:{["check-icon"]:true,["hide"]:!this.checked},"aria-hidden":"true",innerHTML:u}),s(this.submenuTriggerFor)&&i("span",{class:{["submenu-icon"]:true},"aria-hidden":"true",innerHTML:l})))))}static get delegatesFocus(){return true}get el(){return n(this)}static get watchers(){return{disabled:["watchDisabledHandler"]}}};p.style=d;export{p as ic_menu_item};
2
- //# sourceMappingURL=p-3420a999.entry.js.map
@@ -1,2 +0,0 @@
1
- import{r as i,c as t,f as e,h as s,H as l,g as o}from"./p-6b5e91e2.js";import{c as a,C as h,A as n,E as r,r as c,k as d,v as u,j as p,a as b,l as f,n as v,p as m,F as g,w as x,G as w}from"./p-48e98730.js";const y=`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n<path d="M7 9.5L12 14.5L17 9.5H7Z" fill="currentColor" />\n</svg>\n`;const k=`<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">\n<path d="M12.6666 4.27334L11.7266 3.33334L7.99998 7.06001L4.27331 3.33334L3.33331 4.27334L7.05998 8.00001L3.33331 11.7267L4.27331 12.6667L7.99998 8.94001L11.7266 12.6667L12.6666 11.7267L8.93998 8.00001L12.6666 4.27334Z" fill="currentColor" />\n</svg>\n`;const L='/*! 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;position:relative;--ic-input-label-helpertext-padding:var(--ic-space-xxs);--menu-max-height:100px;--border-color:var(--ic-select-field-border);--border-color-hover:var(--ic-select-field-border-hover);--border-color-pressed:var(--ic-select-field-border-pressed);--border-color-disabled:var(--ic-select-field-border-disabled);--border-color-error:var(--ic-select-field-border-error);--border-color-error-hover:var(--ic-select-field-border-error-hover);--border-color-error-pressed:var(--ic-select-field-border-error-pressed);--border-color-success:var(--ic-select-field-border-success);--border-color-success-hover:var(--ic-select-field-border-success-hover);--border-color-success-pressed:var(--ic-select-field-border-success-pressed);--border-color-warning:var(--ic-select-field-border-warning);--border-color-warning-hover:var(--ic-select-field-border-warning-hover);--border-color-warning-pressed:var(--ic-select-field-border-warning-pressed);--ic-input-label-text-color:var(--ic-select-field-labe);--ic-input-label-helper-text-color:var(\n --ic-select-input-field-label-subtitle\n );--ic-input-validation-status-text-color:var(--ic-select-state-text);--ic-input-validation-error:var(--ic-select-state-icon-error);--ic-input-validation-warning-icon-color:var(--ic-select-state-icon-warning);--ic-input-validation-success-icon-color:var(--ic-select-state-icon-success);--menu-item-text-color:var(--ic-select-list-option-text);--menu-bg-color:var(--ic-select-list-option-background);--menu-border-color:var(--ic-select-dropdown-list-border)}:host(.ic-select-disabled){--ic-input-label-text-color:var(--ic-select-field-label-disabled);--ic-input-label-helper-text-color:var(\n --ic-select-input-field-label-subtitle-disabled\n )}:host(.ic-select-full-width){width:100%}ic-input-component-container.menu-open{--border-color:var(--ic-select-field-border-pressed)}ic-input-validation .status-icon,ic-input-validation .statustext{visibility:visible}ic-input-validation.menu-open .status-icon,ic-input-validation.menu-open .statustext{visibility:hidden;transition:visibility 0s}ic-input-label{margin-bottom:var(--ic-space-xs) !important}select{border:0;border-radius:var(--ic-border-radius);background-color:var(--ic-select-field-background);color:var(--ic-select-content-text);line-height:1.5rem;letter-spacing:0.005rem;width:100%;height:100%;padding-left:0.375rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-repeat:no-repeat;background-position:right 0.375rem center;background-image:var(--ic-select-mobile-dropdown-icon);caret-color:var(--ic-select-input-field-text-cursor)}select option,.select-option-selected{color:var(--ic-select-list-option-text)}select:disabled{color:var(--ic-select-content-text-disabled);background-image:var(--ic-select-mobile-dropdown-icon-disabled)}select:focus{border:0;outline:0}select:not([disabled]){cursor:pointer}.select-container{width:100%;display:flex;align-items:center;position:relative}.select-input{width:100%;height:100%;padding:0 0.375rem;display:flex;cursor:pointer;align-items:center;justify-content:space-between;background:none;border:none;background-color:var(--ic-select-field-background);color:var(--ic-select-content-text)}.select-input:focus{outline:var(--ic-hc-focus-outline)}.select-input[disabled]{pointer-events:none}:host(.ic-select-searchable) .select-input{cursor:auto}.select-input.with-clear-button{padding-right:0}.value-text{max-width:calc(100% - (var(--ic-space-lg) + var(--ic-space-xxs)));box-sizing:border-box;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin-bottom:0 !important}.value-text.with-clear-button{padding-right:calc(var(--ic-space-xl) + var(--ic-space-xs))}.searchable-select-container{align-items:center;display:flex;width:100%;position:relative}.expand-icon{height:var(--ic-space-lg);padding-left:var(--ic-space-xxs);color:var(--ic-select-expand-icon-color)}.expand-icon>svg{display:inline-block;width:var(--ic-space-lg);height:var(--ic-space-lg)}:host(.ic-select-disabled) .expand-icon,:host(.ic-select-disabled) .expand-icon>svg>path{color:var(--ic-select-disabled-expand-icon-color)}:host(.ic-select-searchable) .expand-icon{padding-left:0;height:2.25rem}:host(.ic-select-searchable) .expand-icon>svg{height:2.25rem;padding:0 calc(var(--ic-space-xxxs) + var(--ic-space-xxs)) 0\n var(--ic-space-xxs)}:host(.ic-select-searchable:not(.ic-select-disabled)) .expand-icon>svg{cursor:pointer}.expand-icon-open{color:var(--ic-select-expand-icon-color)}.expand-icon-open,:host(.ic-select-searchable) .expand-icon-open{transform:rotateX(180deg)}:host(.ic-select-disabled) .value-text,.placeholder{color:var(--ic-select-content-placeholder-text)}.select-input-end{display:flex;align-items:center}.clear-button-container{display:flex;align-items:center}.divider{width:var(--ic-space-1px);background-color:var(--ic-select-content-divider);margin:var(--ic-space-xxs) 0;border-radius:var(--ic-space-1px);height:var(--ic-space-lg)}:host(.ic-select-small) .divider{height:var(--ic-space-md)}:host(.ic-select-large) .divider{height:var(--ic-space-xl)}.clear-button{color:var(--ic-select-clear-button);position:absolute;right:calc(var(--ic-space-xl) + var(--ic-space-xxs) - var(--ic-space-1px));border-radius:var(--ic-border-radius);transition:box-shadow var(--ic-easing-transition),\n border-radius var(--ic-easing-transition)}.clear-button:focus{background-color:var(--ic-color-focus-inner);box-shadow:inset 0 0 0 0.125rem var(--ic-color-focus-outer);border-radius:0.25rem}.clear-button.searchable{position:static}.searchable-select-results-status,.multi-select-selected-count{border:0;clip:rect(0, 0, 0, 0, 0);height:var(--ic-space-1px);overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:var(--ic-space-1px)}::slotted([slot="icon"]){fill:var(--ic-select-content-placeholder-text)}.has-value ::slotted([slot="icon"]){fill:var(--ic-select-content-text)}.readonly ::slotted([slot="icon"]){padding:0.375rem;margin-bottom:0.75rem}@media (forced-colors: active){.has-value ::slotted([slot="icon"]){fill:currentcolor}}';let z=0;const C=[...x,"tabindex","title"];const $=class{constructor(s){i(this,s);this.icBlur=t(this,"icBlur",7);this.icChange=t(this,"icChange",7);this.icClear=t(this,"icClear",7);this.icClose=t(this,"icClose",7);this.icFocus=t(this,"icFocus",7);this.icInput=t(this,"icInput",7);this.icOpen=t(this,"icOpen",7);this.icOptionSelect=t(this,"icOptionSelect",7);this.icOptionDeselect=t(this,"icOptionDeselect",7);this.icRetryLoad=t(this,"icRetryLoad",7);this.hasSetDefaultValue=false;this.inheritedAttributes={};this.initialOptionsEmpty=false;this.inputId=`ic-select-input-${z++}`;this.menuId=`${this.inputId}-menu`;this.searchableMenuItemSelected=false;this.ungroupedOptions=[];this.hostMutationObserver=null;this.hostMutationCallback=i=>{let t=false;i.forEach((({attributeName:i,type:e,addedNodes:s,removedNodes:l})=>{if(C.includes(i)){this.inheritedAttributes[i]=this.el.getAttribute(i);t=true}else if(e==="childList"){t=a(s,l,"icon")}}));if(t){e(this)}};this.handleRetry=i=>{var t;if(i.detail.keyPressed)(t=this.searchableSelectElement)===null||t===void 0?void 0:t.focus();this.blurredBecauseButtonPressed=true;this.retryButtonClick=true;this.hasSetDefaultValue=true;this.icRetryLoad.emit({value:this.hiddenInputValue})};this.emitIcChange=i=>{if(!this.searchable){if(this.multiple&&!Array.isArray(i)&&i!==null){this.handleMultipleSelectChange(i)}else{this.value=i}}clearTimeout(this.debounceIcChange);this.debounceIcChange=window.setTimeout((()=>{const t=this.multiple?this.value:i;this.icChange.emit({value:t})}),this.currDebounce)};this.emitImmediateIcChange=i=>{this.value=i;clearTimeout(this.debounceIcChange);this.icChange.emit({value:i})};this.deduplicateOptions=i=>{const t=[];const e=[];let s;i.forEach((i=>{if(i.children){s=[];i.children.forEach((i=>{if(t.includes(i.value)){console.warn(`ic-select with label ${this.label} was populated with duplicate option (value: ${i.value}) which has been removed.`)}else{t.push(i.value);s.push(i)}}));const l=Object.assign(Object.assign({},i),{children:s});e.push(l)}else{if(t.includes(i.value)){console.warn(`ic-select with label ${this.label} was populated with duplicate option (value: ${i.value}) which has been removed.`)}else{t.push(i.value);e.push(i)}}}));return e};this.setOptionsValuesFromLabels=()=>{var i;if(((i=this.options)===null||i===void 0?void 0:i.length)>0&&this.options.map){this.options.map((i=>{if(!i.value){i.value=i.label}}))}};this.setUngroupedOptions=i=>{this.ungroupedOptions=i.detail.options};this.setTextColor=()=>{if(this.nativeSelectElement.selectedIndex===0){this.nativeSelectElement.className="placeholder"}else{this.nativeSelectElement.className="select-option-selected"}};this.setMenuChange=i=>{if(this.open!==i){this.open=i}};this.getLabelFromValue=i=>h(i,this.uniqueOptions);this.getMultipleOptionsString=i=>{const t=i===null||i===void 0?void 0:i.map((i=>this.getLabelFromValue(i)));return t===null||t===void 0?void 0:t.join(", ")};this.getFilteredChildMenuOptions=i=>{let t=i.children;if(this.searchable){t=n(i.children,this.includeDescriptionsInSearch,this.searchableSelectInputValue,this.searchMatchPosition)}else{t=n(i.children,false,this.pressedCharacters,"start")}const e=Object.assign({},i);e.children=t;return e};this.getValueSortedByOptions=i=>{const t=i;const e=this.ungroupedOptions.map((i=>i.value));t.sort(((i,t)=>e.indexOf(i)-e.indexOf(t)));return t};this.handleNativeSelectChange=()=>{this.icOptionSelect.emit({value:this.nativeSelectElement.value});this.emitImmediateIcChange(this.nativeSelectElement.value);this.setTextColor()};this.handleCustomSelectChange=i=>{var t;const e=i.detail.value;if(i.detail.label===this.emptyOptionListText){if(this.searchable){this.searchableSelectElement.focus()}return}if(this.searchable){this.value=e;this.searchableMenuItemSelected=true;if(this.value===this.currValue){this.searchableSelectInputValue=this.getLabelFromValue(this.value)}this.inputValueToFilter=null;this.hiddenInputValue=this.getValueFromLabel(this.searchableSelectInputValue)}if(this.multiple&&((t=this.value)===null||t===void 0?void 0:t.includes(e))){this.icOptionDeselect.emit({value:e})}else{this.icOptionSelect.emit({value:e})}this.ariaActiveDescendant=i.detail.optionId;this.emitIcChange(e)};this.handleMultipleSelectChange=i=>{if(this.value){let t=this.value.slice();if(this.value.includes(i)){const e=t.indexOf(i);t.splice(e,1)}else{t.push(i);t=this.getValueSortedByOptions(t)}this.value=t.length===0?null:t}else{const t=[];t.push(i);this.value=t}};this.handleSelectAllChange=i=>{const t=i.detail.select;const e=this.ungroupedOptions.filter((i=>!i.disabled));const s=e.map((i=>i.value));let l;if(t){let i;if(this.value){i=s.filter((i=>this.value&&!this.value.includes(i)))}else{i=s}i.forEach((i=>this.icOptionSelect.emit({value:i})));l=s}else{this.value.forEach((i=>this.icOptionDeselect.emit({value:i})));l=null}this.emitIcChange(l)};this.handleMenuChange=i=>{this.open=i.detail.open;this.pressedCharacters="";this.searchable&&this.handleFocusIndicatorDisplay()};this.handleMenuKeyPress=i=>{i.cancelBubble=true;if(!this.multiple){this.handleCharacterKeyDown(i.detail.key)}};this.handleFocusIndicatorDisplay=()=>{const i=this.el.shadowRoot.querySelector(".focus-indicator");if(this.open){i.classList.add("focus-indicator-enabled")}else{i.classList.remove("focus-indicator-enabled")}};this.handleMouseDown=i=>{if(!this.open){i.preventDefault()}};this.isExternalFiltering=()=>this.searchable&&this.disableAutoFiltering;this.handleClick=i=>{var t;if(!this.open){if(this.isExternalFiltering()){this.menu.options=this.filteredOptions}else if(!this.hasTimedOut&&!this.loading&&!((t=this.noOptions)===null||t===void 0?void 0:t.length)&&(!this.searchable||this.searchableMenuItemSelected)){this.noOptions=null;this.menu.options=this.uniqueOptions}}if(i.detail!==0){this.menu.handleClickOpen()}};this.handleExpandIconMouseDown=i=>{if(!this.disabled){i.preventDefault();this.searchableSelectElement.focus();this.handleClick(i)}};this.handleClear=i=>{i.stopPropagation();this.hasTimedOut=false;clearTimeout(this.timeoutTimer);this.noOptions=null;this.emitImmediateIcChange(null);this.icClear.emit();if(this.searchable){this.searchableSelectElement.value=null;this.searchableSelectInputValue=null;this.filteredOptions=this.uniqueOptions;this.hiddenInputValue=null;this.searchableSelectElement.focus()}else{this.customSelectElement.focus()}};this.handleCharacterKeyDown=i=>{if(this.open&&i===" "&&this.pressedCharacters.length===0&&!this.hasTimedOut&&!this.loading){this.setMenuChange(false)}if(i.length===1&&!this.searchable){window.clearTimeout(this.characterKeyPressTimer);this.characterKeyPressTimer=window.setTimeout((()=>this.pressedCharacters=""),1e3);if(!(i===" "&&!this.pressedCharacters)){this.pressedCharacters+=i;this.handleFilter();if(!this.noOptions){this.emitImmediateIcChange(this.filteredOptions[0].value)}}}else{this.pressedCharacters=""}};this.handleNativeSelectKeyDown=i=>{if(i.key!=="Escape"&&i.key!=="Tab"||this.open){i.cancelBubble=true}this.handleCharacterKeyDown(i.key)};this.handleKeyDown=i=>{if(i.key!=="Escape"&&i.key!=="Tab"||this.open){i.cancelBubble=true}const t=i.key==="ArrowDown"||i.key==="ArrowUp";if(!this.open){if(this.isExternalFiltering()&&(i.key==="Enter"||t)){this.menu.options=this.filteredOptions}else{if(!this.hasTimedOut){this.noOptions=null;this.menu.options=this.uniqueOptions}}}if(this.open&&i.key==="Enter"){this.setMenuChange(false)}else{if(!(t&&this.noOptions!==null)){if(!(i.key===" "&&this.pressedCharacters.length>0)){this.menu.handleKeyboardOpen(i)}if(!this.multiple){this.handleCharacterKeyDown(i.key)}}}};this.handleClearButtonFocus=()=>{this.clearButtonFocused=true};this.handleClearButtonBlur=i=>{var t;const e=(t=this.menu)===null||t===void 0?void 0:t.querySelector("#retry-button");if(!(this.searchableSelectElement&&i.relatedTarget===this.searchableSelectElement)&&!(e&&i.relatedTarget===e)){this.setMenuChange(false);this.handleFocusIndicatorDisplay()}this.clearButtonFocused=false};this.handleFilter=()=>{var i;const t=this.deduplicateOptions(this.searchable?[...this.uniqueOptions]:this.ungroupedOptions);let e=false;let s=[];t.map((i=>{if(i.children)e=true}));let l;if(this.searchable){l=n(t,this.includeDescriptionsInSearch,this.inputValueToFilter,this.searchMatchPosition);this.searchableMenuItemSelected=false}else{l=n(t,false,this.pressedCharacters,"start")}if(!e&&((i=l[0])===null||i===void 0?void 0:i.label)!==this.emptyOptionListText){s=l}else if(e){t.map((i=>{if(this.includeGroupTitlesInSearch){if(l.indexOf(i)!==-1){s.push(i)}else{s.push(this.getFilteredChildMenuOptions(i))}}else{s.push(this.getFilteredChildMenuOptions(i))}}))}let o=false;if(e){o=true;s.map((i=>{if(i.children.length>0){o=false}}))}if(s.length>0&&!o){this.noOptions=null;this.filteredOptions=s}else{this.noOptions=[{label:this.emptyOptionListText,value:""}];this.filteredOptions=this.noOptions}};this.triggerLoading=()=>{this.hasTimedOut=false;this.noOptions=[{label:this.loadingLabel,value:"",loading:true}];if(this.filteredOptions!==this.noOptions&&this.searchable){this.filteredOptions=this.noOptions}else if(this.uniqueOptions!==this.noOptions&&!this.searchable){this.uniqueOptions=this.noOptions}if(this.timeout){this.timeoutTimer=window.setTimeout((()=>{this.loading=false;this.hasTimedOut=true;this.noOptions=[{label:this.loadingErrorLabel,value:"",timedOut:true}];this.filteredOptions=this.noOptions;if(!this.searchable)this.uniqueOptions=this.noOptions}),this.timeout)}};this.getValueFromLabel=i=>{var t;return(t=this.uniqueOptions.find((t=>t.label===i)))===null||t===void 0?void 0:t.value};this.handleSearchableSelectInput=i=>{this.searchableSelectInputValue=i.target.value;this.icInput.emit({value:this.searchableSelectInputValue});this.emitIcChange(this.searchableSelectInputValue);this.hiddenInputValue=this.searchableSelectInputValue;this.inputValueToFilter=this.searchableSelectInputValue;this.setMenuChange(true);if(!this.disableAutoFiltering){this.handleFilter();this.debounceAriaLiveUpdate()}};this.updateSearchableSelectResultAriaLive=()=>{const i=this.el.shadowRoot.querySelector(".searchable-select-results-status");if(i){if(this.noOptions!==null){i.innerText=this.emptyOptionListText}else{i.innerText=""}}};this.updateMultiSelectedCountAriaLive=()=>{var i;const t=this.el.shadowRoot.querySelector(".multi-select-selected-count");const e=`${(i=this.currValue)===null||i===void 0?void 0:i.length} of ${r(this.options)} selected`;if(t&&t.innerText!==e){t.innerText=e}};this.getDefaultValue=i=>this.getLabelFromValue(i)||i||null;this.setDefaultValue=()=>{if(!this.hasSetDefaultValue&&this.currValue){this.searchableSelectInputValue=this.searchable&&this.getDefaultValue(this.currValue);this.initialValue=this.currValue;this.hasSetDefaultValue=true}};this.onFocus=()=>{this.icFocus.emit()};this.onBlur=({relatedTarget:i})=>{var t;const e=i;if(e!==null&&(e.tagName==="UL"&&e.className.includes("menu")||e.tagName==="LI"&&e.className.includes("option"))){return}const s=(t=this.menu)===null||t===void 0?void 0:t.querySelector("#retry-button");const l=this.searchable&&!!this.menu&&e!==this.menu&&!Array.from(this.menu.querySelectorAll("[role='option']")).includes(e)&&!(this.clearButton&&e===this.clearButton)&&!(s&&e===s);if(l){if(!this.retryButtonClick){this.setMenuChange(false)}this.handleFocusIndicatorDisplay()}this.retryButtonClick=false;this.icBlur.emit()};this.onTimeoutBlur=i=>{if(i.detail.ev.relatedTarget!==this.searchableSelectElement&&!this.blurredBecauseButtonPressed){this.setMenuChange(false);this.handleFocusIndicatorDisplay();this.icBlur.emit()}this.blurredBecauseButtonPressed=false};this.handleFormReset=()=>{this.value=this.initialValue;if(this.searchable){this.searchableSelectInputValue=this.getDefaultValue(this.value);this.hiddenInputValue=this.value}};this.ariaActiveDescendant=undefined;this.clearButtonFocused=false;this.debounceIcChange=undefined;this.hiddenInputValue=undefined;this.noOptions=null;this.open=false;this.pressedCharacters="";this.searchableSelectInputValue=null;this.disabled=false;this.disableAutoFiltering=false;this.emptyOptionListText="No results found";this.form=undefined;this.fullWidth=false;this.helperText="";this.hideLabel=false;this.includeDescriptionsInSearch=false;this.includeGroupTitlesInSearch=false;this.label=undefined;this.loadingErrorLabel="Loading Error";this.loadingLabel="Loading...";this.multiple=false;this.name=this.inputId;this.placeholder="Select an option";this.readonly=false;this.required=false;this.searchable=false;this.searchMatchPosition="anywhere";this.selectOnEnter=false;this.showClearButton=false;this.size="medium";this.timeout=undefined;this.theme="inherit";this.validationStatus="";this.validationText="";this.loading=false;this.options=[];this.filteredOptions=this.options;this.uniqueOptions=this.options;this.debounce=0;this.currDebounce=this.debounce;this.value=undefined;this.initialValue=this.value;this.inputValueToFilter=this.value;this.currValue=this.value}watchDisabledHandler(){c(this.disabled,this.el)}loadingHandler(i){i&&this.triggerLoading()}watchOptionsHandler(){var i;if(!this.hasTimedOut&&this.options!==this.noOptions){this.loading=false;clearTimeout(this.timeoutTimer);if(this.isExternalFiltering()){if(((i=this.options)===null||i===void 0?void 0:i.length)>0){this.setOptionsValuesFromLabels();this.noOptions=null;this.uniqueOptions=this.deduplicateOptions(this.options);this.filteredOptions=this.uniqueOptions}else{this.noOptions=[{label:this.emptyOptionListText,value:""}];this.uniqueOptions=this.noOptions;this.filteredOptions=this.noOptions}this.updateSearchableSelectResultAriaLive();this.setDefaultValue()}else{this.setOptionsValuesFromLabels();this.uniqueOptions=this.deduplicateOptions(this.options);this.filteredOptions=this.uniqueOptions;if(this.initialOptionsEmpty){this.setDefaultValue();this.initialOptionsEmpty=false}}}else{if(!this.searchable){this.options=this.noOptions}}}debounceChangedHandler(i){this.updateOnChangeDebounce(i)}valueChangedHandler(){if(this.value!==this.currValue){if(this.value&&this.multiple){this.currValue=this.getValueSortedByOptions(this.value);this.updateMultiSelectedCountAriaLive()}else{this.currValue=this.value}}if(this.searchable){this.searchableSelectInputValue=this.getLabelFromValue(this.currValue)||this.currValue}}openChangedHandler(){this.open?this.icOpen.emit():this.icClose.emit()}disconnectedCallback(){var i;d(this.el,this.handleFormReset);(i=this.hostMutationObserver)===null||i===void 0?void 0:i.disconnect()}componentWillLoad(){var i;this.inheritedAttributes=u(this.el,C);c(this.disabled,this.el);this.setOptionsValuesFromLabels();p(this.el,this.handleFormReset);if(!((i=this.options)===null||i===void 0?void 0:i.length)){this.initialOptionsEmpty=true;this.noOptions=[{label:this.emptyOptionListText,value:""}];this.uniqueOptions=this.noOptions;this.filteredOptions=this.noOptions}else{this.setDefaultValue();this.uniqueOptions=this.deduplicateOptions(this.options)}}componentDidLoad(){b([{prop:this.label,propName:"label"}],"Select");if(this.loading){this.triggerLoading()}this.hiddenInputValue=this.searchable&&this.currValue;this.hostMutationObserver=new MutationObserver(this.hostMutationCallback);this.hostMutationObserver.observe(this.el,{attributes:true,childList:true})}componentDidRender(){if(this.nativeSelectElement&&!this.disabled){this.setTextColor()}}async setFocus(){if(this.nativeSelectElement){this.nativeSelectElement.focus()}else if(this.customSelectElement){this.customSelectElement.focus()}else if(this.searchableSelectElement){this.searchableSelectElement.focus()}}updateOnChangeDebounce(i){if(this.currDebounce!==i){this.currDebounce=i}}debounceAriaLiveUpdate(){clearTimeout(this.debounceAria);window.setTimeout((()=>{this.updateSearchableSelectResultAriaLive()}),800)}render(){const{size:i,disabled:t,fullWidth:e,helperText:o,hideLabel:a,label:h,menuId:n,multiple:c,name:d,options:u,placeholder:p,readonly:b,required:x,searchable:L,showClearButton:z,validationStatus:C,validationText:$,currValue:T,theme:H}=this;f(true,this.el,d,this.searchable?this.hiddenInputValue:T,t);const O=`${C===w.Error}`;const M=v(this.inputId,o!=="",m(this.validationStatus,this.disabled)).trim();let B=!!this.el.querySelector(`[slot="icon"]`);if(B&&(t||b&&!this.value)){B=false}const D=`${T===null||T===void 0?void 0:T.length} of ${r(this.options)} selected`;return s(l,{class:{"ic-select-disabled":t,"ic-select-searchable":L,[`ic-select-${i}`]:i!=="medium","ic-select-full-width":e,[`ic-theme-${H}`]:H!=="inherit"},onBlur:this.onBlur},s("ic-input-container",{readonly:b},!a&&s("ic-input-label",{for:this.inputId,label:h,helperText:o,required:x,disabled:t,readonly:b}),s("ic-input-component-container",{ref:i=>this.anchorEl=i,class:{"menu-open":this.open},size:i,fullWidth:e,disabled:t,readonly:b,validationStatus:C},B&&s("span",{slot:"left-icon",class:{["readonly"]:b,["has-value"]:!!this.value}},s("slot",{name:"icon"})),b?s("ic-typography",null,s("p",null,c?this.getMultipleOptionsString(T):this.getLabelFromValue(T))):g()&&!c?s("select",Object.assign({ref:i=>this.nativeSelectElement=i,disabled:t,onChange:this.handleNativeSelectChange,required:x,id:this.inputId,"aria-label":h,"aria-describedby":M,"aria-invalid":O,onBlur:this.onBlur,onFocus:this.onFocus,onKeyDown:this.handleNativeSelectKeyDown,form:this.form},this.inheritedAttributes),s("option",{value:"",selected:true,disabled:!z},p),u.map((i=>{if(i.children){return s("optgroup",{label:i.label},i.children.map((i=>s("option",{value:i.value,disabled:i.disabled,selected:i.value===T},i.label))))}else{return s("option",{value:i.value,disabled:i.disabled,selected:i.value===T},i.label)}}))):L?s("div",{class:"searchable-select-container"},s("input",{class:{"select-input":true,"with-clear-button":!!this.searchableSelectInputValue},role:"combobox",autocomplete:"off","aria-label":h,"aria-describedby":M,"aria-activedescendant":this.ariaActiveDescendant,"aria-autocomplete":"list","aria-expanded":`${this.open}`,"aria-invalid":O,"aria-required":`${x}`,"aria-controls":n,ref:i=>this.searchableSelectElement=i,id:this.inputId,value:this.searchableSelectInputValue,placeholder:p,disabled:t,onInput:this.handleSearchableSelectInput,onClick:this.handleClick,onKeyDown:this.handleKeyDown,onFocus:this.onFocus,onBlur:this.onBlur,form:this.form}),this.searchableSelectInputValue&&(z||L)&&s("div",{class:"clear-button-container"},s("ic-button",{id:"clear-button",ref:i=>this.clearButton=i,"aria-label":this.searchableSelectInputValue&&T===null?"Clear input":"Clear selection",class:"clear-button",innerHTML:k,onClick:this.handleClear,onFocus:this.handleClearButtonFocus,onBlur:this.handleClearButtonBlur,size:i,variant:"icon",theme:this.clearButtonFocused?"light":"dark"}),s("div",{class:"divider"})),s("span",{onMouseDown:this.handleExpandIconMouseDown,class:{"expand-icon":true,"expand-icon-open":this.open},innerHTML:y,"aria-hidden":"true"}),s("div",{"aria-live":"polite",role:"status",class:"searchable-select-results-status"})):s("div",{class:"select-container"},s("button",{class:"select-input",ref:i=>this.customSelectElement=i,id:this.inputId,"aria-label":`${h}, ${(c&&T?`${D}, ${this.getMultipleOptionsString(T)}`:this.getLabelFromValue(T))||p}${x?", required":""}`,"aria-describedby":M,"aria-invalid":O,"aria-haspopup":"listbox","aria-expanded":this.open?"true":"false","aria-owns":n,"aria-controls":n,disabled:t,onBlur:this.onBlur,onFocus:this.onFocus,onClick:this.handleClick,onMouseDown:this.handleMouseDown,onKeyDown:this.handleKeyDown},s("ic-typography",{variant:"body",class:{"value-text":true,"with-clear-button":T&&z,placeholder:!this.value||c&&this.value.length<1}},(c?this.getMultipleOptionsString(T):this.getLabelFromValue(T))||p),s("div",{class:"select-input-end"},T&&z&&s("div",{class:"divider"}),s("span",{class:{"expand-icon":true,"expand-icon-open":this.open},innerHTML:y,"aria-hidden":"true"}))),T&&z&&s("ic-button",{id:"clear-button","aria-label":"Clear selection",class:"clear-button",innerHTML:k,onClick:this.handleClear,onFocus:this.handleClearButtonFocus,onBlur:this.handleClearButtonBlur,size:i,variant:"icon",theme:this.clearButtonFocused?"light":"dark"}))),(!g()||c)&&s("ic-menu",{class:{"no-results":this.loading||this.hasTimedOut||this.noOptions!==null&&this.noOptions[0]&&this.noOptions[0].label===this.emptyOptionListText},ref:i=>this.menu=i,inputEl:L?this.searchableSelectElement:this.customSelectElement,inputLabel:h,anchorEl:this.anchorEl,size:i,menuId:n,open:this.open,options:L?this.filteredOptions:this.uniqueOptions,value:c?T:T,fullWidth:e,selectOnEnter:this.selectOnEnter,onMenuStateChange:this.handleMenuChange,onMenuOptionSelect:this.handleCustomSelectChange,onMenuOptionSelectAll:this.handleSelectAllChange,onMenuKeyPress:this.handleMenuKeyPress,onUngroupedOptionsSet:this.setUngroupedOptions,onRetryButtonClicked:this.handleRetry,parentEl:this.el,onTimeoutBlur:this.onTimeoutBlur,activationType:this.searchable||c||this.selectOnEnter?"manual":"automatic",closeOnSelect:!c}),this.multiple&&s("div",{"aria-live":"polite",role:"status",class:"multi-select-selected-count"}),m(this.validationStatus,this.disabled)&&s("ic-input-validation",{class:{"menu-open":this.open},ariaLiveMode:"polite",status:C,message:$,for:this.inputId})))}static get delegatesFocus(){return true}get el(){return o(this)}static get watchers(){return{disabled:["watchDisabledHandler"],loading:["loadingHandler"],options:["watchOptionsHandler"],debounce:["debounceChangedHandler"],value:["valueChangedHandler"],open:["openChangedHandler"]}}};$.style=L;export{$ as ic_select};
2
- //# sourceMappingURL=p-3bfc4a52.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["icSelectCss","inputIds","MUTABLE_ATTRIBUTES","IC_INHERITED_ARIA","Select","this","hasSetDefaultValue","inheritedAttributes","initialOptionsEmpty","inputId","menuId","searchableMenuItemSelected","ungroupedOptions","hostMutationObserver","hostMutationCallback","mutationList","forceComponentUpdate","forEach","attributeName","type","addedNodes","removedNodes","includes","el","getAttribute","checkSlotInChildMutations","forceUpdate","handleRetry","ev","detail","keyPressed","_a","searchableSelectElement","focus","blurredBecauseButtonPressed","retryButtonClick","icRetryLoad","emit","value","hiddenInputValue","emitIcChange","searchable","multiple","Array","isArray","handleMultipleSelectChange","clearTimeout","debounceIcChange","window","setTimeout","valueToEmit","icChange","currDebounce","emitImmediateIcChange","deduplicateOptions","options","uniqueValues","dedupedOptions","dedupedChildren","option","children","child","console","warn","label","push","modifiedParent","Object","assign","setOptionsValuesFromLabels","length","map","setUngroupedOptions","event","setTextColor","nativeSelectElement","selectedIndex","className","setMenuChange","open","getLabelFromValue","uniqueOptions","getMultipleOptionsString","selectedValues","selectedLabels","join","getFilteredChildMenuOptions","getFilteredMenuOptions","includeDescriptionsInSearch","searchableSelectInputValue","searchMatchPosition","pressedCharacters","newOption","getValueSortedByOptions","valueArray","valuesFromAllOptions","sort","a","b","indexOf","handleNativeSelectChange","icOptionSelect","handleCustomSelectChange","emptyOptionListText","currValue","inputValueToFilter","getValueFromLabel","icOptionDeselect","ariaActiveDescendant","optionId","slice","valueIndex","splice","handleSelectAllChange","selectAllOptions","select","allEnabledOptions","filter","disabled","allValues","newValue","unselectedValues","handleMenuChange","handleFocusIndicatorDisplay","handleMenuKeyPress","cancelBubble","handleCharacterKeyDown","key","focusIndicator","shadowRoot","querySelector","classList","add","remove","handleMouseDown","preventDefault","isExternalFiltering","disableAutoFiltering","handleClick","menu","filteredOptions","hasTimedOut","loading","noOptions","handleClickOpen","handleExpandIconMouseDown","handleClear","stopPropagation","timeoutTimer","icClear","customSelectElement","characterKeyPressTimer","handleFilter","handleNativeSelectKeyDown","handleKeyDown","isArrowKey","handleKeyboardOpen","handleClearButtonFocus","clearButtonFocused","handleClearButtonBlur","retryButton","relatedTarget","isGrouped","newFilteredOptions","menuOptionsFiltered","includeGroupTitlesInSearch","noChildOptionsWhenFiltered","triggerLoading","loadingLabel","timeout","loadingErrorLabel","timedOut","find","handleSearchableSelectInput","target","icInput","debounceAriaLiveUpdate","updateSearchableSelectResultAriaLive","searchableSelectResultsStatusEl","innerText","updateMultiSelectedCountAriaLive","multiSelectSelectedCountEl","selectedCount","getOptionsWithoutGroupTitlesCount","getDefaultValue","setDefaultValue","initialValue","onFocus","icFocus","onBlur","tagName","isSearchableAndNoFocusedInternalElements","from","querySelectorAll","clearButton","icBlur","onTimeoutBlur","handleFormReset","debounce","watchDisabledHandler","removeDisabledFalse","loadingHandler","watchOptionsHandler","debounceChangedHandler","updateOnChangeDebounce","valueChangedHandler","openChangedHandler","icOpen","icClose","disconnectedCallback","removeFormResetListener","disconnect","componentWillLoad","inheritAttributes","addFormResetListener","componentDidLoad","onComponentRequiredPropUndefined","prop","propName","MutationObserver","observe","attributes","childList","componentDidRender","setFocus","debounceAria","render","size","fullWidth","helperText","hideLabel","name","placeholder","readonly","required","showClearButton","validationStatus","validationText","theme","renderHiddenInput","invalid","IcInformationStatus","Error","describedBy","getInputDescribedByText","hasValidationStatus","trim","showLeftIcon","optionsSelectedCount","h","Host","class","for","ref","anchorEl","slot","isMobileOrTablet","onChange","id","onKeyDown","form","selected","role","autocomplete","onInput","onClick","innerHTML","Clear","variant","onMouseDown","Expand","inputEl","inputLabel","selectOnEnter","onMenuStateChange","onMenuOptionSelect","onMenuOptionSelectAll","onMenuKeyPress","onUngroupedOptionsSet","onRetryButtonClicked","parentEl","activationType","closeOnSelect","ariaLiveMode","status","message"],"sources":["src/components/ic-select/ic-select.css?tag=ic-select&encapsulation=shadow","src/components/ic-select/ic-select.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n/**\n * @prop --input-width: Width of the input field\n * @prop --menu-width: Width of the dropdown menu\n * @prop --ic-z-index-menu: z-index of select menu\n */\n\n:host {\n display: block;\n position: relative;\n\n --ic-input-label-helpertext-padding: var(--ic-space-xxs);\n --menu-max-height: 100px;\n --border-color: var(--ic-select-field-border);\n --border-color-hover: var(--ic-select-field-border-hover);\n --border-color-pressed: var(--ic-select-field-border-pressed);\n --border-color-disabled: var(--ic-select-field-border-disabled);\n --border-color-error: var(--ic-select-field-border-error);\n --border-color-error-hover: var(--ic-select-field-border-error-hover);\n --border-color-error-pressed: var(--ic-select-field-border-error-pressed);\n --border-color-success: var(--ic-select-field-border-success);\n --border-color-success-hover: var(--ic-select-field-border-success-hover);\n --border-color-success-pressed: var(--ic-select-field-border-success-pressed);\n --border-color-warning: var(--ic-select-field-border-warning);\n --border-color-warning-hover: var(--ic-select-field-border-warning-hover);\n --border-color-warning-pressed: var(--ic-select-field-border-warning-pressed);\n --ic-input-label-text-color: var(--ic-select-field-labe);\n --ic-input-label-helper-text-color: var(\n --ic-select-input-field-label-subtitle\n );\n --ic-input-validation-status-text-color: var(--ic-select-state-text);\n --ic-input-validation-error: var(--ic-select-state-icon-error);\n --ic-input-validation-warning-icon-color: var(--ic-select-state-icon-warning);\n --ic-input-validation-success-icon-color: var(--ic-select-state-icon-success);\n --menu-item-text-color: var(--ic-select-list-option-text);\n --menu-bg-color: var(--ic-select-list-option-background);\n --menu-border-color: var(--ic-select-dropdown-list-border);\n}\n\n:host(.ic-select-disabled) {\n --ic-input-label-text-color: var(--ic-select-field-label-disabled);\n --ic-input-label-helper-text-color: var(\n --ic-select-input-field-label-subtitle-disabled\n );\n}\n\n:host(.ic-select-full-width) {\n width: 100%;\n}\n\nic-input-component-container.menu-open {\n --border-color: var(--ic-select-field-border-pressed);\n}\n\nic-input-validation .status-icon,\nic-input-validation .statustext {\n visibility: visible;\n}\n\nic-input-validation.menu-open .status-icon,\nic-input-validation.menu-open .statustext {\n visibility: hidden;\n transition: visibility 0s;\n}\n\nic-input-label {\n margin-bottom: var(--ic-space-xs) !important;\n}\n\nselect {\n border: 0;\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-select-field-background);\n color: var(--ic-select-content-text);\n line-height: 1.5rem;\n letter-spacing: 0.005rem;\n width: 100%;\n height: 100%;\n padding-left: 0.375rem;\n appearance: none;\n background-repeat: no-repeat;\n background-position: right 0.375rem center;\n background-image: var(--ic-select-mobile-dropdown-icon);\n caret-color: var(--ic-select-input-field-text-cursor);\n}\n\nselect option,\n.select-option-selected {\n color: var(--ic-select-list-option-text);\n}\n\nselect:disabled {\n color: var(--ic-select-content-text-disabled);\n background-image: var(--ic-select-mobile-dropdown-icon-disabled);\n}\n\nselect:focus {\n border: 0;\n outline: 0;\n}\n\nselect:not([disabled]) {\n cursor: pointer;\n}\n\n.select-container {\n width: 100%;\n display: flex;\n align-items: center;\n position: relative;\n}\n\n.select-input {\n width: 100%;\n height: 100%;\n padding: 0 0.375rem;\n display: flex;\n cursor: pointer;\n align-items: center;\n justify-content: space-between;\n background: none;\n border: none;\n background-color: var(--ic-select-field-background);\n color: var(--ic-select-content-text);\n}\n\n.select-input:focus {\n outline: var(--ic-hc-focus-outline);\n}\n\n.select-input[disabled] {\n pointer-events: none;\n}\n\n:host(.ic-select-searchable) .select-input {\n cursor: auto;\n}\n\n.select-input.with-clear-button {\n padding-right: 0;\n}\n\n.value-text {\n max-width: calc(100% - (var(--ic-space-lg) + var(--ic-space-xxs)));\n box-sizing: border-box;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n margin-bottom: 0 !important;\n}\n\n.value-text.with-clear-button {\n padding-right: calc(var(--ic-space-xl) + var(--ic-space-xs));\n}\n\n.searchable-select-container {\n align-items: center;\n display: flex;\n width: 100%;\n position: relative;\n}\n\n.expand-icon {\n height: var(--ic-space-lg);\n padding-left: var(--ic-space-xxs);\n color: var(--ic-select-expand-icon-color);\n}\n\n.expand-icon > svg {\n display: inline-block;\n width: var(--ic-space-lg);\n height: var(--ic-space-lg);\n}\n\n:host(.ic-select-disabled) .expand-icon,\n:host(.ic-select-disabled) .expand-icon > svg > path {\n color: var(--ic-select-disabled-expand-icon-color);\n}\n\n:host(.ic-select-searchable) .expand-icon {\n padding-left: 0;\n height: 2.25rem;\n}\n\n:host(.ic-select-searchable) .expand-icon > svg {\n height: 2.25rem;\n padding: 0 calc(var(--ic-space-xxxs) + var(--ic-space-xxs)) 0\n var(--ic-space-xxs);\n}\n\n:host(.ic-select-searchable:not(.ic-select-disabled)) .expand-icon > svg {\n cursor: pointer;\n}\n\n.expand-icon-open {\n color: var(--ic-select-expand-icon-color);\n}\n\n.expand-icon-open,\n:host(.ic-select-searchable) .expand-icon-open {\n transform: rotateX(180deg);\n}\n\n:host(.ic-select-disabled) .value-text,\n.placeholder {\n color: var(--ic-select-content-placeholder-text);\n}\n\n.select-input-end {\n display: flex;\n align-items: center;\n}\n\n.clear-button-container {\n display: flex;\n align-items: center;\n}\n\n.divider {\n width: var(--ic-space-1px);\n background-color: var(--ic-select-content-divider);\n margin: var(--ic-space-xxs) 0;\n border-radius: var(--ic-space-1px);\n height: var(--ic-space-lg);\n}\n\n:host(.ic-select-small) .divider {\n height: var(--ic-space-md);\n}\n\n:host(.ic-select-large) .divider {\n height: var(--ic-space-xl);\n}\n\n.clear-button {\n color: var(--ic-select-clear-button);\n position: absolute;\n right: calc(var(--ic-space-xl) + var(--ic-space-xxs) - var(--ic-space-1px));\n border-radius: var(--ic-border-radius);\n transition: box-shadow var(--ic-easing-transition),\n border-radius var(--ic-easing-transition);\n}\n\n.clear-button:focus {\n background-color: var(--ic-color-focus-inner);\n box-shadow: inset 0 0 0 0.125rem var(--ic-color-focus-outer);\n border-radius: 0.25rem;\n}\n\n.clear-button.searchable {\n position: static;\n}\n\n.searchable-select-results-status,\n.multi-select-selected-count {\n border: 0;\n clip: rect(0, 0, 0, 0, 0);\n height: var(--ic-space-1px);\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: var(--ic-space-1px);\n}\n\n::slotted([slot=\"icon\"]) {\n fill: var(--ic-select-content-placeholder-text);\n}\n\n.has-value ::slotted([slot=\"icon\"]) {\n fill: var(--ic-select-content-text);\n}\n\n.readonly ::slotted([slot=\"icon\"]) {\n padding: 0.375rem;\n margin-bottom: 0.75rem;\n}\n\n@media (forced-colors: active) {\n .has-value ::slotted([slot=\"icon\"]) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Method,\n Prop,\n h,\n State,\n Watch,\n forceUpdate,\n} from \"@stencil/core\";\n\nimport {\n getInputDescribedByText,\n getLabelFromValue,\n hasValidationStatus,\n inheritAttributes,\n onComponentRequiredPropUndefined,\n renderHiddenInput,\n isMobileOrTablet,\n getFilteredMenuOptions,\n getOptionsWithoutGroupTitlesCount,\n addFormResetListener,\n removeFormResetListener,\n removeDisabledFalse,\n checkSlotInChildMutations,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcInformationStatus,\n IcInformationStatusOrEmpty,\n IcMenuOption,\n IcSearchMatchPositions,\n IcValueEventDetail,\n IcSizes,\n IcThemeMode,\n} from \"../../utils/types\";\nimport Expand from \"./assets/Expand.svg\";\nimport Clear from \"./assets/Clear.svg\";\nimport { IcOptionSelectEventDetail } from \"../ic-menu/ic-menu.types\";\n\nlet inputIds = 0;\nconst MUTABLE_ATTRIBUTES = [...IC_INHERITED_ARIA, \"tabindex\", \"title\"];\n\n/**\n * @slot icon - Content will be placed to the left of the select text input.\n */\n@Component({\n tag: \"ic-select\",\n styleUrl: \"ic-select.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Select {\n private anchorEl: HTMLElement;\n private blurredBecauseButtonPressed: boolean;\n private characterKeyPressTimer: number;\n private clearButton: HTMLIcButtonElement;\n private customSelectElement: HTMLButtonElement;\n private debounceAria: number;\n private hasSetDefaultValue = false;\n private hasTimedOut: boolean;\n private inheritedAttributes: { [k: string]: string } = {};\n private initialOptionsEmpty = false;\n private inputId = `ic-select-input-${inputIds++}`;\n private menu: HTMLIcMenuElement;\n private menuId = `${this.inputId}-menu`;\n private nativeSelectElement: HTMLSelectElement;\n private retryButtonClick: boolean;\n private searchableMenuItemSelected: boolean = false;\n private searchableSelectElement: HTMLInputElement;\n private timeoutTimer: number;\n private ungroupedOptions: IcMenuOption[] = [];\n private hostMutationObserver: MutationObserver = null;\n\n @Element() el!: HTMLIcSelectElement;\n\n @State() ariaActiveDescendant: string;\n @State() clearButtonFocused: boolean = false;\n @State() debounceIcChange: number;\n @State() hiddenInputValue: string;\n @State() noOptions: IcMenuOption[] = null;\n @State() open: boolean = false;\n @State() pressedCharacters: string = \"\";\n @State() searchableSelectInputValue: string = null;\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop({ reflect: true }) disabled?: boolean = false;\n @Watch(\"disabled\")\n watchDisabledHandler(): void {\n removeDisabledFalse(this.disabled, this.el);\n }\n\n /**\n * If `true`, the built in filtering will be disabled for a searchable variant. For example, if options will already be filtered from external source.\n */\n @Prop() disableAutoFiltering?: boolean = false;\n\n /**\n * The text displayed when there are no options in the option list.\n */\n @Prop() emptyOptionListText = \"No results found\";\n\n /**\n * The <form> element to associate the select with.\n */\n @Prop() form?: string;\n\n /**\n * If `true`, the select will fill the width of the container.\n */\n @Prop() fullWidth: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText?: string = \"\";\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel?: boolean = false;\n\n /**\n * If `true`, descriptions of options will be included when filtering options in a searchable select. Only applies to built in filtering.\n */\n @Prop() includeDescriptionsInSearch?: boolean = false;\n\n /**\n * If `true`, group titles of grouped options will be included when filtering options in a searchable select. Only applies to built in filtering.\n */\n @Prop() includeGroupTitlesInSearch?: boolean = false;\n\n /**\n * The label for the select.\n */\n @Prop() label!: string;\n\n /**\n * The message displayed when external loading times out.\n */\n @Prop() loadingErrorLabel?: string = \"Loading Error\";\n\n /**\n * The message displayed whilst the options are being loaded externally.\n */\n @Prop() loadingLabel?: string = \"Loading...\";\n\n /**\n * If `true`, multiple options can be selected.\n */\n @Prop() multiple?: boolean = false;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name?: string = this.inputId;\n\n /**\n * The placeholder value to be displayed.\n */\n @Prop() placeholder?: string = \"Select an option\";\n\n /**\n * If `true`, the readonly state will be set.\n */\n @Prop() readonly?: boolean = false;\n\n /**\n * If `true`, the select will require a value.\n */\n @Prop() required?: boolean = false;\n\n /**\n * If `true`, a searchable variant of the select will be displayed which can be typed in to filter options. This functionality is only available on the single-select variant of the select component.\n */\n @Prop() searchable?: boolean = false;\n\n /**\n * Whether the search string of the searchable select should match the start of or anywhere in the options. Only applies to built in filtering.\n */\n @Prop() searchMatchPosition?: IcSearchMatchPositions = \"anywhere\";\n\n /**\n * If `true`, the icOptionSelect event will be fired on enter instead of ArrowUp and ArrowDown on the single select.\n */\n @Prop() selectOnEnter?: boolean = false;\n\n /**\n * If `true`, a button which clears the select input when clicked will be displayed. The button will always appear on the searchable select.\n */\n @Prop() showClearButton?: boolean = false;\n\n /**\n * The size of the select.\n */\n @Prop() size?: IcSizes = \"medium\";\n\n /**\n * If using external filtering, set a timeout for when loading takes too long.\n */\n @Prop() timeout?: number;\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 * The validation status - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus?: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The text to display as the validation message.\n */\n @Prop() validationText?: string = \"\";\n\n /**\n * If `true`, the loading state will be triggered when fetching options asynchronously.\n */\n @Prop({ mutable: true }) loading?: boolean = false;\n\n @Watch(\"loading\")\n loadingHandler(newValue: boolean): void {\n newValue && this.triggerLoading();\n }\n\n /**\n * The possible selection options.\n */\n @Prop() options?: IcMenuOption[] = [];\n @State() filteredOptions: IcMenuOption[] = this.options;\n @State() uniqueOptions: IcMenuOption[] = this.options;\n\n @Watch(\"options\")\n watchOptionsHandler(): void {\n if (!this.hasTimedOut && this.options !== this.noOptions) {\n this.loading = false;\n clearTimeout(this.timeoutTimer);\n if (this.isExternalFiltering()) {\n // When searchable select\n if (this.options?.length > 0) {\n this.setOptionsValuesFromLabels();\n this.noOptions = null;\n this.uniqueOptions = this.deduplicateOptions(this.options);\n this.filteredOptions = this.uniqueOptions;\n } else {\n this.noOptions = [{ label: this.emptyOptionListText, value: \"\" }];\n this.uniqueOptions = this.noOptions;\n this.filteredOptions = this.noOptions;\n }\n this.updateSearchableSelectResultAriaLive();\n this.setDefaultValue();\n } else {\n this.setOptionsValuesFromLabels();\n this.uniqueOptions = this.deduplicateOptions(this.options);\n this.filteredOptions = this.uniqueOptions;\n if (this.initialOptionsEmpty) {\n this.setDefaultValue();\n this.initialOptionsEmpty = false;\n }\n }\n } else {\n if (!this.searchable) {\n this.options = this.noOptions;\n }\n }\n }\n\n /**\n * The amount of time, in milliseconds, to wait to trigger the `icChange` event after each keystroke.\n */\n @Prop() debounce?: number = 0;\n @State() currDebounce = this.debounce;\n\n @Watch(\"debounce\")\n debounceChangedHandler(newValue: number): void {\n this.updateOnChangeDebounce(newValue);\n }\n\n /**\n * The value of the select, reflected by the value of the currently selected option.\n * For the searchable variant, the value is also reflected by the user input.\n * For the multi-select variant, the value must be an array of option values.\n */\n @Prop({ mutable: true }) value?: string | string[];\n @State() initialValue = this.value;\n @State() inputValueToFilter = this.value as string;\n @State() currValue = this.value;\n\n @Watch(\"value\")\n valueChangedHandler(): void {\n if (this.value !== this.currValue) {\n if (this.value && this.multiple) {\n this.currValue = this.getValueSortedByOptions(this.value as string[]);\n this.updateMultiSelectedCountAriaLive();\n } else {\n this.currValue = this.value;\n }\n }\n\n if (this.searchable) {\n this.searchableSelectInputValue =\n this.getLabelFromValue(this.currValue as string) ||\n (this.currValue as string);\n }\n }\n\n @Watch(\"open\")\n openChangedHandler(): void {\n this.open ? this.icOpen.emit() : this.icClose.emit();\n }\n\n /**\n * Emitted when the select loses focus.\n */\n @Event() icBlur: EventEmitter<void>;\n\n /**\n * Emitted when the value changes.\n */\n @Event() icChange: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when the clear button is clicked.\n */\n @Event() icClear: EventEmitter<void>;\n\n /**\n * Emitted when the select options menu is closed.\n */\n @Event() icClose: EventEmitter<void>;\n\n /**\n * Emitted when the select gains focus.\n */\n @Event() icFocus: EventEmitter<void>;\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() icInput: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when the select options menu is opened.\n */\n @Event() icOpen: EventEmitter<void>;\n\n /**\n * Emitted when an option is selected.\n * Selecting an option will also trigger an `icChange/onIcChange` due to the value being updated.\n */\n @Event() icOptionSelect: EventEmitter<IcOptionSelectEventDetail>;\n\n /**\n * Emitted when `multiple` is `true` and an option is deselected.\n */\n @Event() icOptionDeselect: EventEmitter<IcOptionSelectEventDetail>;\n\n /**\n * Emitted when the 'retry loading' button is clicked for a searchable variant.\n */\n @Event() icRetryLoad: EventEmitter<IcValueEventDetail>;\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n this.hostMutationObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n this.inheritedAttributes = inheritAttributes(this.el, MUTABLE_ATTRIBUTES);\n\n removeDisabledFalse(this.disabled, this.el);\n\n this.setOptionsValuesFromLabels();\n\n addFormResetListener(this.el, this.handleFormReset);\n\n if (!this.options?.length) {\n this.initialOptionsEmpty = true;\n this.noOptions = [{ label: this.emptyOptionListText, value: \"\" }];\n this.uniqueOptions = this.noOptions;\n this.filteredOptions = this.noOptions;\n } else {\n this.setDefaultValue();\n this.uniqueOptions = this.deduplicateOptions(this.options);\n }\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Select\"\n );\n\n if (this.loading) {\n this.triggerLoading();\n }\n\n this.hiddenInputValue = this.searchable && (this.currValue as string);\n\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n attributes: true,\n childList: true,\n });\n }\n\n componentDidRender(): void {\n if (this.nativeSelectElement && !this.disabled) {\n this.setTextColor();\n }\n }\n\n /**\n * Sets focus on the input box.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.nativeSelectElement) {\n this.nativeSelectElement.focus();\n } else if (this.customSelectElement) {\n this.customSelectElement.focus();\n } else if (this.searchableSelectElement) {\n this.searchableSelectElement.focus();\n }\n }\n\n // 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 private handleRetry = (ev: CustomEvent<IcValueEventDetail>) => {\n if (ev.detail.keyPressed) this.searchableSelectElement?.focus();\n this.blurredBecauseButtonPressed = true;\n this.retryButtonClick = true;\n this.hasSetDefaultValue = true;\n this.icRetryLoad.emit({ value: this.hiddenInputValue });\n };\n\n private updateOnChangeDebounce(newValue: number) {\n if (this.currDebounce !== newValue) {\n this.currDebounce = newValue;\n }\n }\n\n private emitIcChange = (value: string | string[] | null) => {\n if (!this.searchable) {\n // If \"Select all\" button clicked, replace value with new value (array of all option values)\n if (this.multiple && !Array.isArray(value) && value !== null) {\n this.handleMultipleSelectChange(value as string);\n } else {\n this.value = value;\n }\n }\n\n clearTimeout(this.debounceIcChange);\n this.debounceIcChange = window.setTimeout(() => {\n const valueToEmit = this.multiple ? this.value : value;\n this.icChange.emit({ value: valueToEmit });\n }, this.currDebounce);\n };\n\n private emitImmediateIcChange = (value: string) => {\n this.value = value;\n clearTimeout(this.debounceIcChange);\n this.icChange.emit({ value });\n };\n\n /**\n * Processes the provided array of IcMenuOptions, removing duplicates and reporting them with a console.warn\n * @param options array of IcMenuOptions\n * @returns a new options object, with all entries possessing a duplicate 'value' field removed\n */\n private deduplicateOptions = (options: IcMenuOption[]): IcMenuOption[] => {\n const uniqueValues: string[] = [];\n const dedupedOptions: IcMenuOption[] = [];\n let dedupedChildren: IcMenuOption[];\n\n options.forEach((option: IcMenuOption) => {\n if (option.children) {\n //If an option has children, we will loop through them\n dedupedChildren = [];\n option.children.forEach((child) => {\n if (uniqueValues.includes(child.value)) {\n console.warn(\n `ic-select with label ${this.label} was populated with duplicate option (value: ${child.value}) which has been removed.`\n );\n } else {\n uniqueValues.push(child.value);\n dedupedChildren.push(child);\n }\n });\n // construct a modified option, inserting the deduplicated children alongside the original information\n const modifiedParent: IcMenuOption = {\n ...option,\n children: dedupedChildren,\n };\n dedupedOptions.push(modifiedParent);\n } else {\n // If an option does not have children, assess to see if it's value has been included already\n if (uniqueValues.includes(option.value)) {\n console.warn(\n `ic-select with label ${this.label} was populated with duplicate option (value: ${option.value}) which has been removed.`\n );\n } else {\n uniqueValues.push(option.value);\n dedupedOptions.push(option);\n }\n }\n });\n return dedupedOptions;\n };\n\n /**\n * Loop through options array and for all options with no value, infer it from the label\n */\n private setOptionsValuesFromLabels = (): void => {\n if (this.options?.length > 0 && this.options.map) {\n this.options.map((option) => {\n if (!option.value) {\n option.value = option.label;\n }\n });\n }\n };\n\n private setUngroupedOptions = (event: CustomEvent): void => {\n this.ungroupedOptions = event.detail.options;\n };\n\n private setTextColor = (): void => {\n if (this.nativeSelectElement.selectedIndex === 0) {\n this.nativeSelectElement.className = \"placeholder\";\n } else {\n this.nativeSelectElement.className = \"select-option-selected\";\n }\n };\n\n private setMenuChange = (open: boolean) => {\n if (this.open !== open) {\n this.open = open;\n }\n };\n\n private getLabelFromValue = (value: string): string | undefined => {\n return getLabelFromValue(value, this.uniqueOptions);\n };\n\n private getMultipleOptionsString = (selectedValues: string[]) => {\n const selectedLabels = selectedValues?.map((value) =>\n this.getLabelFromValue(value)\n );\n return selectedLabels?.join(\", \");\n };\n\n private getFilteredChildMenuOptions = (option: IcMenuOption) => {\n let children = option.children;\n\n if (this.searchable) {\n children = getFilteredMenuOptions(\n option.children,\n this.includeDescriptionsInSearch,\n this.searchableSelectInputValue,\n this.searchMatchPosition\n );\n } else {\n children = getFilteredMenuOptions(\n option.children,\n false,\n this.pressedCharacters,\n \"start\"\n );\n }\n\n const newOption = { ...option };\n newOption.children = children;\n return newOption;\n };\n\n // (For multi-select) get value array, i.e. selected option values, in order they appear in option list\n private getValueSortedByOptions = (value: string[]) => {\n const valueArray = value;\n const valuesFromAllOptions = this.ungroupedOptions.map(\n (option) => option.value\n );\n\n valueArray.sort(\n (a, b) =>\n valuesFromAllOptions.indexOf(a) - valuesFromAllOptions.indexOf(b)\n );\n\n return valueArray;\n };\n\n private handleNativeSelectChange = (): void => {\n this.icOptionSelect.emit({ value: this.nativeSelectElement.value });\n this.emitImmediateIcChange(this.nativeSelectElement.value);\n this.setTextColor();\n };\n\n // Handle option select for when a custom input box and menu is rendered\n // (rather than native <select> - rendered when viewed on a mobile / tablet screen)\n private handleCustomSelectChange = (event: CustomEvent): void => {\n const value = event.detail.value;\n\n if (event.detail.label === this.emptyOptionListText) {\n if (this.searchable) {\n this.searchableSelectElement.focus();\n }\n return;\n }\n\n if (this.searchable) {\n this.value = value;\n this.searchableMenuItemSelected = true;\n\n // After editing the input, if selecting the same option as before, set the input value to label again\n if (this.value === this.currValue) {\n this.searchableSelectInputValue = this.getLabelFromValue(\n this.value as string\n );\n }\n\n this.inputValueToFilter = null;\n this.hiddenInputValue = this.getValueFromLabel(\n this.searchableSelectInputValue\n );\n }\n\n if (this.multiple && this.value?.includes(value)) {\n this.icOptionDeselect.emit({ value });\n } else {\n this.icOptionSelect.emit({ value });\n }\n\n this.ariaActiveDescendant = event.detail.optionId;\n this.emitIcChange(value);\n };\n\n // Update selected options - adds / removes them, in order of option list\n // Create new array if value prop is undefined\n private handleMultipleSelectChange = (value: string) => {\n if (this.value) {\n let valueArray = (this.value as string[]).slice();\n\n if (this.value.includes(value)) {\n const valueIndex = valueArray.indexOf(value);\n valueArray.splice(valueIndex, 1);\n } else {\n valueArray.push(value);\n valueArray = this.getValueSortedByOptions(valueArray);\n }\n\n this.value = valueArray.length === 0 ? null : valueArray;\n } else {\n const valueArray = [];\n valueArray.push(value);\n this.value = valueArray;\n }\n };\n\n private handleSelectAllChange = (event: CustomEvent) => {\n const selectAllOptions = event.detail.select;\n const allEnabledOptions = this.ungroupedOptions.filter(\n (option) => !option.disabled\n );\n const allValues = allEnabledOptions.map((option) => option.value);\n let newValue: string[];\n\n if (selectAllOptions) {\n let unselectedValues;\n\n // Only emit icOptionSelect for all values that are newly selected\n if (this.value) {\n unselectedValues = allValues.filter(\n (value) => this.value && !(this.value as string[]).includes(value)\n );\n } else {\n unselectedValues = allValues;\n }\n\n unselectedValues.forEach((value) => this.icOptionSelect.emit({ value }));\n newValue = allValues;\n } else {\n // Only emit icOptionDeselect for values that were selected\n (this.value as string[]).forEach((value) =>\n this.icOptionDeselect.emit({ value })\n );\n newValue = null;\n }\n\n this.emitIcChange(newValue);\n };\n\n private handleMenuChange = (event: CustomEvent): void => {\n this.open = event.detail.open;\n this.pressedCharacters = \"\";\n\n this.searchable && this.handleFocusIndicatorDisplay();\n };\n\n // clears the debounce delay when navigating the menu with arrow keys etc\n // to prevent delay in change event, which should only occur when typing in input\n private handleMenuKeyPress = (ev: CustomEvent): void => {\n ev.cancelBubble = true;\n if (!this.multiple) {\n this.handleCharacterKeyDown(ev.detail.key);\n }\n };\n\n private handleFocusIndicatorDisplay = () => {\n const focusIndicator = this.el.shadowRoot.querySelector(\".focus-indicator\");\n\n if (this.open) {\n focusIndicator.classList.add(\"focus-indicator-enabled\");\n } else {\n focusIndicator.classList.remove(\"focus-indicator-enabled\");\n }\n };\n\n private handleMouseDown = (event: Event): void => {\n if (!this.open) {\n event.preventDefault();\n }\n };\n\n private isExternalFiltering = (): boolean =>\n this.searchable && this.disableAutoFiltering;\n\n private handleClick = (event: MouseEvent): void => {\n if (!this.open) {\n if (this.isExternalFiltering()) {\n this.menu.options = this.filteredOptions;\n } else if (\n !this.hasTimedOut &&\n !this.loading &&\n !this.noOptions?.length &&\n (!this.searchable || this.searchableMenuItemSelected)\n ) {\n this.noOptions = null;\n this.menu.options = this.uniqueOptions;\n }\n }\n\n if (event.detail !== 0) {\n this.menu.handleClickOpen();\n }\n };\n\n private handleExpandIconMouseDown = (event: MouseEvent) => {\n if (!this.disabled) {\n event.preventDefault();\n this.searchableSelectElement.focus();\n this.handleClick(event);\n }\n };\n\n private handleClear = (event: Event): void => {\n event.stopPropagation();\n this.hasTimedOut = false;\n clearTimeout(this.timeoutTimer);\n this.noOptions = null;\n this.emitImmediateIcChange(null);\n this.icClear.emit();\n\n if (this.searchable) {\n this.searchableSelectElement.value = null;\n this.searchableSelectInputValue = null;\n this.filteredOptions = this.uniqueOptions;\n this.hiddenInputValue = null;\n this.searchableSelectElement.focus();\n } else {\n this.customSelectElement.focus();\n }\n };\n\n private handleCharacterKeyDown = (key: string) => {\n // Only close menu when space is pressed if not being used alongside character keys to quickly select options\n if (\n this.open &&\n key === \" \" &&\n this.pressedCharacters.length === 0 &&\n !this.hasTimedOut &&\n !this.loading\n ) {\n this.setMenuChange(false);\n }\n\n if (key.length === 1 && !this.searchable) {\n window.clearTimeout(this.characterKeyPressTimer);\n this.characterKeyPressTimer = window.setTimeout(\n () => (this.pressedCharacters = \"\"),\n 1000\n );\n\n if (!(key === \" \" && !this.pressedCharacters)) {\n this.pressedCharacters += key;\n this.handleFilter();\n\n if (!this.noOptions) {\n this.emitImmediateIcChange(this.filteredOptions[0].value);\n }\n }\n } else {\n this.pressedCharacters = \"\";\n }\n };\n\n private handleNativeSelectKeyDown = (event: KeyboardEvent) => {\n if ((event.key !== \"Escape\" && event.key !== \"Tab\") || this.open) {\n event.cancelBubble = true;\n }\n this.handleCharacterKeyDown(event.key);\n };\n\n private handleKeyDown = (event: KeyboardEvent): void => {\n if ((event.key !== \"Escape\" && event.key !== \"Tab\") || this.open) {\n event.cancelBubble = true;\n }\n const isArrowKey = event.key === \"ArrowDown\" || event.key === \"ArrowUp\";\n\n if (!this.open) {\n if (this.isExternalFiltering() && (event.key === \"Enter\" || isArrowKey)) {\n this.menu.options = this.filteredOptions;\n } else {\n if (!this.hasTimedOut) {\n this.noOptions = null;\n this.menu.options = this.uniqueOptions;\n }\n }\n }\n\n if (this.open && event.key === \"Enter\") {\n this.setMenuChange(false);\n } else {\n if (!(isArrowKey && this.noOptions !== null)) {\n if (!(event.key === \" \" && this.pressedCharacters.length > 0)) {\n // Keyboard events get passed onto ic-menu\n this.menu.handleKeyboardOpen(event);\n }\n if (!this.multiple) {\n this.handleCharacterKeyDown(event.key);\n }\n }\n }\n };\n\n private handleClearButtonFocus = (): void => {\n this.clearButtonFocused = true;\n };\n\n private handleClearButtonBlur = (ev: FocusEvent): void => {\n const retryButton = this.menu?.querySelector(\"#retry-button\");\n if (\n !(\n this.searchableSelectElement &&\n ev.relatedTarget === this.searchableSelectElement\n ) &&\n !(retryButton && ev.relatedTarget === retryButton)\n ) {\n this.setMenuChange(false);\n this.handleFocusIndicatorDisplay();\n }\n this.clearButtonFocused = false;\n };\n\n private handleFilter = (): void => {\n const options = this.deduplicateOptions(\n this.searchable ? [...this.uniqueOptions] : this.ungroupedOptions\n );\n\n let isGrouped = false;\n let newFilteredOptions: IcMenuOption[] = [];\n\n options.map((option) => {\n if (option.children) isGrouped = true;\n });\n\n let menuOptionsFiltered: IcMenuOption[];\n\n if (this.searchable) {\n menuOptionsFiltered = getFilteredMenuOptions(\n options,\n this.includeDescriptionsInSearch,\n this.inputValueToFilter,\n this.searchMatchPosition\n );\n this.searchableMenuItemSelected = false;\n } else {\n menuOptionsFiltered = getFilteredMenuOptions(\n options,\n false,\n this.pressedCharacters,\n \"start\"\n );\n }\n\n if (\n !isGrouped &&\n menuOptionsFiltered[0]?.label !== this.emptyOptionListText\n ) {\n newFilteredOptions = menuOptionsFiltered;\n } else if (isGrouped) {\n options.map((option) => {\n if (this.includeGroupTitlesInSearch) {\n if (menuOptionsFiltered.indexOf(option) !== -1) {\n newFilteredOptions.push(option);\n } else {\n newFilteredOptions.push(this.getFilteredChildMenuOptions(option));\n }\n } else {\n newFilteredOptions.push(this.getFilteredChildMenuOptions(option));\n }\n });\n }\n\n let noChildOptionsWhenFiltered = false;\n\n if (isGrouped) {\n noChildOptionsWhenFiltered = true;\n newFilteredOptions.map((option) => {\n if (option.children.length > 0) {\n noChildOptionsWhenFiltered = false;\n }\n });\n }\n\n if (newFilteredOptions.length > 0 && !noChildOptionsWhenFiltered) {\n this.noOptions = null;\n this.filteredOptions = newFilteredOptions;\n } else {\n this.noOptions = [{ label: this.emptyOptionListText, value: \"\" }];\n this.filteredOptions = this.noOptions;\n }\n };\n\n /**\n * Put the select component into loading state.\n * Replace options with the loading message. If timeout is enabled, set the timeout and once passed, replace options with the loading error message\n */\n private triggerLoading = () => {\n this.hasTimedOut = false;\n this.noOptions = [{ label: this.loadingLabel, value: \"\", loading: true }];\n if (this.filteredOptions !== this.noOptions && this.searchable) {\n this.filteredOptions = this.noOptions;\n } else if (this.uniqueOptions !== this.noOptions && !this.searchable) {\n this.uniqueOptions = this.noOptions;\n }\n if (this.timeout) {\n this.timeoutTimer = window.setTimeout(() => {\n this.loading = false;\n this.hasTimedOut = true;\n this.noOptions = [\n { label: this.loadingErrorLabel, value: \"\", timedOut: true },\n ];\n this.filteredOptions = this.noOptions;\n if (!this.searchable) this.uniqueOptions = this.noOptions;\n }, this.timeout);\n }\n };\n\n private getValueFromLabel = (label: string): string | undefined => {\n return this.uniqueOptions.find((option) => option.label === label)?.value;\n };\n\n private handleSearchableSelectInput = (event: Event): void => {\n this.searchableSelectInputValue = (event.target as HTMLInputElement).value;\n this.icInput.emit({ value: this.searchableSelectInputValue });\n this.emitIcChange(this.searchableSelectInputValue);\n\n this.hiddenInputValue = this.searchableSelectInputValue;\n this.inputValueToFilter = this.searchableSelectInputValue;\n this.setMenuChange(true);\n\n if (!this.disableAutoFiltering) {\n this.handleFilter();\n this.debounceAriaLiveUpdate();\n }\n };\n\n private updateSearchableSelectResultAriaLive = (): void => {\n const searchableSelectResultsStatusEl = this.el.shadowRoot.querySelector(\n \".searchable-select-results-status\"\n ) as HTMLDivElement;\n\n if (searchableSelectResultsStatusEl) {\n if (this.noOptions !== null) {\n searchableSelectResultsStatusEl.innerText = this.emptyOptionListText;\n } else {\n searchableSelectResultsStatusEl.innerText = \"\";\n }\n }\n };\n\n private debounceAriaLiveUpdate() {\n clearTimeout(this.debounceAria);\n\n window.setTimeout(() => {\n this.updateSearchableSelectResultAriaLive();\n }, 800);\n }\n\n private updateMultiSelectedCountAriaLive = (): void => {\n const multiSelectSelectedCountEl = this.el.shadowRoot.querySelector(\n \".multi-select-selected-count\"\n ) as HTMLDivElement;\n\n const selectedCount = `${\n this.currValue?.length\n } of ${getOptionsWithoutGroupTitlesCount(this.options)} selected`;\n\n if (\n multiSelectSelectedCountEl &&\n multiSelectSelectedCountEl.innerText !== selectedCount\n ) {\n multiSelectSelectedCountEl.innerText = selectedCount;\n }\n };\n\n private getDefaultValue = (value: string): string | null =>\n this.getLabelFromValue(value) || value || null;\n\n private setDefaultValue = (): void => {\n if (!this.hasSetDefaultValue && this.currValue) {\n this.searchableSelectInputValue =\n this.searchable && this.getDefaultValue(this.currValue as string);\n\n this.initialValue = this.currValue;\n this.hasSetDefaultValue = true;\n }\n };\n\n private onFocus = (): void => {\n this.icFocus.emit();\n };\n\n private onBlur = ({ relatedTarget }: FocusEvent): void => {\n const target = relatedTarget as HTMLElement;\n if (\n target !== null &&\n ((target.tagName === \"UL\" && target.className.includes(\"menu\")) ||\n (target.tagName === \"LI\" && target.className.includes(\"option\")))\n ) {\n return;\n }\n\n const retryButton = this.menu?.querySelector(\"#retry-button\");\n const isSearchableAndNoFocusedInternalElements =\n this.searchable &&\n !!this.menu &&\n target !== this.menu &&\n !Array.from(this.menu.querySelectorAll(\"[role='option']\")).includes(\n target\n ) &&\n !(this.clearButton && target === this.clearButton) &&\n !(retryButton && target === retryButton);\n\n if (isSearchableAndNoFocusedInternalElements) {\n if (!this.retryButtonClick) {\n this.setMenuChange(false);\n }\n this.handleFocusIndicatorDisplay();\n }\n\n this.retryButtonClick = false;\n this.icBlur.emit();\n };\n\n private onTimeoutBlur = (ev: CustomEvent) => {\n if (\n (ev.detail.ev as FocusEvent).relatedTarget !==\n this.searchableSelectElement &&\n !this.blurredBecauseButtonPressed\n ) {\n this.setMenuChange(false);\n this.handleFocusIndicatorDisplay();\n this.icBlur.emit();\n }\n this.blurredBecauseButtonPressed = false;\n };\n\n private handleFormReset = (): void => {\n this.value = this.initialValue;\n if (this.searchable) {\n this.searchableSelectInputValue = this.getDefaultValue(\n this.value as string\n );\n this.hiddenInputValue = this.value as string;\n }\n };\n\n render() {\n const {\n size,\n disabled,\n fullWidth,\n helperText,\n hideLabel,\n label,\n menuId,\n multiple,\n name,\n options,\n placeholder,\n readonly,\n required,\n searchable,\n showClearButton,\n validationStatus,\n validationText,\n currValue,\n theme,\n } = this;\n\n // HTML inputs only accept 'string' for their value\n // Does not cause errors when it is a multi-select - sets value correctly, to a comma-separated string\n renderHiddenInput(\n true,\n this.el,\n name,\n this.searchable ? this.hiddenInputValue : (currValue as string),\n disabled\n );\n\n const invalid = `${validationStatus === IcInformationStatus.Error}`;\n\n const describedBy = getInputDescribedByText(\n this.inputId,\n helperText !== \"\",\n hasValidationStatus(this.validationStatus, this.disabled)\n ).trim();\n\n let showLeftIcon = !!this.el.querySelector(`[slot=\"icon\"]`);\n if (showLeftIcon && (disabled || (readonly && !this.value))) {\n showLeftIcon = false;\n }\n\n const optionsSelectedCount = `${\n currValue?.length\n } of ${getOptionsWithoutGroupTitlesCount(this.options)} selected`;\n\n return (\n <Host\n class={{\n \"ic-select-disabled\": disabled,\n \"ic-select-searchable\": searchable,\n [`ic-select-${size}`]: size !== \"medium\",\n \"ic-select-full-width\": fullWidth,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n onBlur={this.onBlur}\n >\n <ic-input-container readonly={readonly}>\n {!hideLabel && (\n <ic-input-label\n for={this.inputId}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabled}\n readonly={readonly}\n ></ic-input-label>\n )}\n <ic-input-component-container\n ref={(el: HTMLElement) => (this.anchorEl = el)}\n class={{ \"menu-open\": this.open }}\n size={size}\n fullWidth={fullWidth}\n disabled={disabled}\n readonly={readonly}\n validationStatus={validationStatus}\n >\n {showLeftIcon && (\n <span\n slot=\"left-icon\"\n class={{\n [\"readonly\"]: readonly,\n [\"has-value\"]: !!this.value,\n }}\n >\n <slot name=\"icon\" />\n </span>\n )}\n {readonly ? (\n <ic-typography>\n <p>\n {multiple\n ? this.getMultipleOptionsString(currValue as string[])\n : this.getLabelFromValue(currValue as string)}\n </p>\n </ic-typography>\n ) : isMobileOrTablet() && !multiple ? (\n <select\n ref={(el) => (this.nativeSelectElement = el)}\n disabled={disabled}\n onChange={this.handleNativeSelectChange}\n required={required}\n id={this.inputId}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n onKeyDown={this.handleNativeSelectKeyDown}\n form={this.form}\n {...this.inheritedAttributes}\n >\n <option value=\"\" selected disabled={!showClearButton}>\n {placeholder}\n </option>\n {options.map((option) => {\n if (option.children) {\n return (\n <optgroup label={option.label}>\n {option.children.map((option) => (\n <option\n value={option.value}\n disabled={option.disabled}\n selected={option.value === currValue}\n >\n {option.label}\n </option>\n ))}\n </optgroup>\n );\n } else {\n return (\n <option\n value={option.value}\n disabled={option.disabled}\n selected={option.value === currValue}\n >\n {option.label}\n </option>\n );\n }\n })}\n </select>\n ) : searchable ? (\n <div class=\"searchable-select-container\">\n <input\n class={{\n \"select-input\": true,\n \"with-clear-button\": !!this.searchableSelectInputValue,\n }}\n role=\"combobox\"\n autocomplete=\"off\"\n aria-label={label}\n aria-describedby={describedBy}\n aria-activedescendant={this.ariaActiveDescendant}\n aria-autocomplete=\"list\"\n aria-expanded={`${this.open}`}\n aria-invalid={invalid}\n aria-required={`${required}`}\n aria-controls={menuId}\n ref={(el) => (this.searchableSelectElement = el)}\n id={this.inputId}\n value={this.searchableSelectInputValue}\n placeholder={placeholder}\n disabled={disabled}\n onInput={this.handleSearchableSelectInput}\n onClick={this.handleClick}\n onKeyDown={this.handleKeyDown}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n form={this.form}\n ></input>\n {this.searchableSelectInputValue &&\n (showClearButton || searchable) && (\n <div class=\"clear-button-container\">\n <ic-button\n id=\"clear-button\"\n ref={(el: HTMLIcButtonElement) =>\n (this.clearButton = el)\n }\n aria-label={\n this.searchableSelectInputValue && currValue === null\n ? \"Clear input\"\n : \"Clear selection\"\n }\n class=\"clear-button\"\n innerHTML={Clear}\n onClick={this.handleClear}\n onFocus={this.handleClearButtonFocus}\n onBlur={this.handleClearButtonBlur}\n size={size}\n variant=\"icon\"\n theme={this.clearButtonFocused ? \"light\" : \"dark\"}\n ></ic-button>\n <div class=\"divider\"></div>\n </div>\n )}\n <span\n onMouseDown={this.handleExpandIconMouseDown}\n class={{\n \"expand-icon\": true,\n \"expand-icon-open\": this.open,\n }}\n innerHTML={Expand}\n aria-hidden=\"true\"\n />\n <div\n aria-live=\"polite\"\n role=\"status\"\n class=\"searchable-select-results-status\"\n ></div>\n </div>\n ) : (\n <div class=\"select-container\">\n <button\n class=\"select-input\"\n ref={(el) => (this.customSelectElement = el)}\n id={this.inputId}\n aria-label={`${label}, ${\n (multiple && currValue\n ? `${optionsSelectedCount}, ${this.getMultipleOptionsString(\n currValue as string[]\n )}`\n : this.getLabelFromValue(currValue as string)) ||\n placeholder\n }${required ? \", required\" : \"\"}`}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n aria-haspopup=\"listbox\"\n aria-expanded={this.open ? \"true\" : \"false\"}\n aria-owns={menuId}\n aria-controls={menuId}\n disabled={disabled}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n onClick={this.handleClick}\n onMouseDown={this.handleMouseDown}\n onKeyDown={this.handleKeyDown}\n >\n <ic-typography\n variant=\"body\"\n class={{\n \"value-text\": true,\n \"with-clear-button\": currValue && showClearButton,\n placeholder:\n !this.value || (multiple && this.value.length < 1),\n }}\n >\n {(multiple\n ? this.getMultipleOptionsString(currValue as string[])\n : this.getLabelFromValue(currValue as string)) ||\n placeholder}\n </ic-typography>\n <div class=\"select-input-end\">\n {currValue && showClearButton && (\n <div class=\"divider\"></div>\n )}\n <span\n class={{\n \"expand-icon\": true,\n \"expand-icon-open\": this.open,\n }}\n innerHTML={Expand}\n aria-hidden=\"true\"\n />\n </div>\n </button>\n {currValue && showClearButton && (\n <ic-button\n id=\"clear-button\"\n aria-label=\"Clear selection\"\n class=\"clear-button\"\n innerHTML={Clear}\n onClick={this.handleClear}\n onFocus={this.handleClearButtonFocus}\n onBlur={this.handleClearButtonBlur}\n size={size}\n variant=\"icon\"\n theme={this.clearButtonFocused ? \"light\" : \"dark\"}\n ></ic-button>\n )}\n </div>\n )}\n </ic-input-component-container>\n {(!isMobileOrTablet() || multiple) && (\n <ic-menu\n class={{\n \"no-results\":\n this.loading ||\n this.hasTimedOut ||\n (this.noOptions !== null &&\n this.noOptions[0] &&\n this.noOptions[0].label === this.emptyOptionListText),\n }}\n ref={(el: HTMLIcMenuElement) => (this.menu = el)}\n inputEl={\n searchable\n ? this.searchableSelectElement\n : this.customSelectElement\n }\n inputLabel={label}\n anchorEl={this.anchorEl}\n size={size}\n menuId={menuId}\n open={this.open}\n options={searchable ? this.filteredOptions : this.uniqueOptions}\n value={multiple ? (currValue as string[]) : (currValue as string)}\n fullWidth={fullWidth}\n selectOnEnter={this.selectOnEnter}\n onMenuStateChange={this.handleMenuChange}\n onMenuOptionSelect={this.handleCustomSelectChange}\n onMenuOptionSelectAll={this.handleSelectAllChange}\n onMenuKeyPress={this.handleMenuKeyPress}\n onUngroupedOptionsSet={this.setUngroupedOptions}\n onRetryButtonClicked={this.handleRetry}\n parentEl={this.el}\n onTimeoutBlur={this.onTimeoutBlur}\n activationType={\n this.searchable || multiple || this.selectOnEnter\n ? \"manual\"\n : \"automatic\"\n }\n closeOnSelect={!multiple}\n ></ic-menu>\n )}\n {this.multiple && (\n <div\n aria-live=\"polite\"\n role=\"status\"\n class=\"multi-select-selected-count\"\n ></div>\n )}\n {hasValidationStatus(this.validationStatus, this.disabled) && (\n <ic-input-validation\n class={{ \"menu-open\": this.open }}\n ariaLiveMode=\"polite\"\n status={validationStatus}\n message={validationText}\n for={this.inputId}\n ></ic-input-validation>\n )}\n </ic-input-container>\n </Host>\n );\n }\n}\n"],"mappings":"qrBAAA,MAAMA,EAAc,2xQC2CpB,IAAIC,EAAW,EACf,MAAMC,EAAqB,IAAIC,EAAmB,WAAY,S,MAYjDC,EAAM,M,yYAOTC,KAAAC,mBAAqB,MAErBD,KAAAE,oBAA+C,GAC/CF,KAAAG,oBAAsB,MACtBH,KAAAI,QAAU,mBAAmBR,MAE7BI,KAAAK,OAAS,GAAGL,KAAKI,eAGjBJ,KAAAM,2BAAsC,MAGtCN,KAAAO,iBA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AAKvP,KAAKI,W"}
@@ -1,2 +0,0 @@
1
- var n;(function(n){n["Warning"]="warning";n["Error"]="error";n["Success"]="success"})(n||(n={}));var t;(function(n){n["Default"]="default";n["Dark"]="dark";n["Light"]="light"})(t||(t={}));const e=`<svg aria-labelledby="error-title" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000000">\n <title id="error-title">Error</title>\n <g id="close-octagon">\n <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" />\n </g>\n</svg>\n`;const i=`<svg aria-labelledby="info-title" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000000">\n <title id="info-title">For your information</title>\n <g id="info">\n <path id="Vector" d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 17C11.45 17 11 16.55 11 16V12C11 11.45 11.45 11 12 11C12.55 11 13 11.45 13 12V16C13 16.55 12.55 17 12 17ZM13 9H11V7H13V9Z" />\n </g>\n</svg>\n`;const a=`<svg aria-labelledby="neutral-title" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000000">\n<title id="neutral-title">Neutral</title>\n <g id="Icon">\n <path id="Vector" d="M19.5 3H5.5C4.4 3 3.5 3.9 3.5 5V19C3.5 20.1 4.4 21 5.5 21H19.5C20.6 21 21.5 20.1 21.5 19V5C21.5 3.9 20.6 3 19.5 3ZM12.51 18C11.81 18 11.25 17.44 11.25 16.74C11.25 16.03 11.81 15.49 12.51 15.49C13.22 15.49 13.76 16.03 13.76 16.74C13.75 17.43 13.22 18 12.51 18ZM15.52 10.6C14.76 11.71 14.04 12.06 13.65 12.77C13.55 12.95 13.49 13.09 13.46 13.4C13.41 13.85 13.01 14.18 12.56 14.18H12.5C11.98 14.18 11.57 13.74 11.62 13.22C11.65 12.88 11.73 12.53 11.92 12.19C12.41 11.32 13.34 10.8 13.88 10.03C14.45 9.22 14.13 7.7 12.51 7.7C11.8 7.7 11.33 8.06 11.04 8.49C10.79 8.85 10.35 9.02 9.94 8.85C9.41 8.64 9.22 8 9.54 7.54C10.15 6.65 11.17 6 12.49 6C13.97 6 14.98 6.67 15.5 7.52C15.94 8.24 16.2 9.59 15.52 10.6Z" />\n </g>\n</svg>\n`;const r=`<svg aria-labelledby="success-title" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000000">\n <title id="success-title">Success</title>\n <g id="check_circle">\n <path id="Vector" d="M12.5 2C6.98 2 2.5 6.48 2.5 12C2.5 17.52 6.98 22 12.5 22C18.02 22 22.5 17.52 22.5 12C22.5 6.48 18.02 2 12.5 2ZM9.79 16.29L6.2 12.7C5.81 12.31 5.81 11.68 6.2 11.29C6.59 10.9 7.22 10.9 7.61 11.29L10.5 14.17L17.38 7.29C17.77 6.9 18.4 6.9 18.79 7.29C19.18 7.68 19.18 8.31 18.79 8.7L11.2 16.29C10.82 16.68 10.18 16.68 9.79 16.29Z" />\n </g>\n</svg>\n`;const o=`<svg aria-labelledby="warning-title" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#000000">\n <title id="warning-title">Warning</title>\n <g id="warning">\n <path id="Vector" d="M4.47 20.5037H19.53C21.07 20.5037 22.03 18.8337 21.26 17.5037L13.73 4.49375C12.96 3.16375 11.04 3.16375 10.27 4.49375L2.74 17.5037C1.97 18.8337 2.93 20.5037 4.47 20.5037ZM12 13.5037C11.45 13.5037 11 13.0537 11 12.5037V10.5037C11 9.95375 11.45 9.50375 12 9.50375C12.55 9.50375 13 9.95375 13 10.5037V12.5037C13 13.0537 12.55 13.5037 12 13.5037ZM13 17.5037H11V15.5037H13V17.5037Z" />\n </g>\n</svg>\n`;const s={neutral:{icon:a,ariaLabel:"Neutral"},info:{icon:i,ariaLabel:"For your information"},warning:{icon:o,ariaLabel:"Warning"},error:{icon:e,ariaLabel:"Error"},success:{icon:r,ariaLabel:"Success"}};const c=["aria-atomic","aria-autocomplete","aria-busy","aria-controls","aria-current","aria-describedby","aria-description","aria-details","aria-disabled","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-relevant","aria-roledescription"];const l={XS:576,S:768,M:992,L:1200,XL:99999};const u=["ic-hero","ic-top-navigation","ic-footer","ic-side-navigation","ic-alert"];const d=["ic-alert"];const p={"ic-alert":["ic-link"]};const f=136.701;const g=130;const v=133.3505;const b="ic-input";const C="input.ic-input";const w=(n,t=[])=>{const e={};t.forEach((t=>{if(n.hasAttribute(t)){const i=n.getAttribute(t);if(i!==null){e[t]=i}n.removeAttribute(t)}}));return e};const m=(n,t)=>{const e=n._original||n;return{_original:n,emit:y(e.emit.bind(e),t)}};const y=(n,t=0)=>{let e;return(...i)=>{clearTimeout(e);e=setTimeout(n,t,...i)}};const L=(n,t,e,i,a)=>{if(e!==undefined&&(n||M(t))){const n=t.querySelectorAll(C);const r=Array.from(n);const o=r.filter((n=>t===n.parentElement));let s=o[0];if(s===null||s===undefined){s=t.ownerDocument.createElement("input");s.type="hidden";s.classList.add(b);t.appendChild(s)}s.disabled=a;s.name=e;if(i instanceof Date){s.value=i?i.toISOString():null}else{s.value=i||""}}};const h=(n,t,e,i,a,r,o)=>{if(i!==undefined&&M(t)){const s=t.querySelectorAll(C);const c=Array.from(s);const l=c.filter((n=>t===n.parentElement));let u=l[0];if(u===null||u===undefined){u=t.ownerDocument.createElement("input");u.classList.add(b);t.appendChild(u)}u.type="file";u.hidden=true;u.multiple=e;u.name=i;u.files=a;u.disabled=r;u.accept=o;u.onchange=()=>{n.emit(u.files)};u.click()}};const x=n=>{const t=n.querySelectorAll("input.ic-input");const e=Array.from(t);const i=e.filter((t=>n===t.parentElement));const a=i[0];a===null||a===void 0?void 0:a.remove()};const M=n=>!!n.shadowRoot&&!!n.attachShadow;const V=n=>n+"-helper-text";const I=n=>n+"-validation-text";const N=(n,t,e)=>`${t?V(n):""} ${e?I(n):""}`.trim();const A=(n,e=null)=>{var i;const a=n.parentElement||n.getRootNode().host.parentElement;const r=a.closest(u.join(","));if(r!==null){const a=r.tagName.toLowerCase();const o=n.tagName.toLowerCase();if((i=p[a])===null||i===void 0?void 0:i.includes(o)){return t.Default}else if(e!==null&&!d.includes(a)){return e}else if(r.classList.contains(`${a}-${t.Dark}`)||r.classList.contains(t.Dark)){return t.Dark}return t.Light}return t.Default};const k=()=>"maxTouchPoints"in navigator&&"userAgent"in navigator?navigator.maxTouchPoints>0&&/iPad|iPhone|iPod|Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent):false;const $=(n,t)=>{const e=document.createElement("button");e.setAttribute("type",t.type);e.style.display="none";n.appendChild(e);e.click();e.remove()};const T=n=>n?n.trim().length===0:true;const Z=n=>n!==undefined?n:null;const E=(n,t,e="value",i="label")=>{const a=[];if(t.length>0&&t.map){t.map((n=>{if(n.children){n.children.map((n=>a.push(n)))}else{a.push(n)}}));const r=a.find((t=>t[e]===n));if(r!==undefined)return r[i]}return undefined};const H=(n,t,e,i,a="label")=>n.filter((n=>{var r;const o=n[a].toLowerCase();const s=(r=n.description)===null||r===void 0?void 0:r.toLowerCase();const c=e.toLowerCase();return i==="anywhere"?t?o.includes(c)||(s===null||s===void 0?void 0:s.includes(c)):o.includes(c):t?o.startsWith(c)||(s===null||s===void 0?void 0:s.startsWith(c)):o.startsWith(c)}));const O=n=>{const t=[];if(n.length>0&&n.map){n.map((n=>{if(n.children){n.children.map((n=>t.push(n)))}else{t.push(n)}}))}return t.length};const S=n=>window.matchMedia(`(max-width: ${n}px)`).matches;const B=()=>{if(S(q.S)){return q.S}if(S(q.M)){return q.M}if(S(q.L)){return q.L}if(S(q.XL)){return q.XL}return q.UNDEFINED};const P=n=>getComputedStyle(document.documentElement).getPropertyValue(n);const D=()=>{const n=P("--ic-brand-color-primary-r");const t=P("--ic-brand-color-primary-g");const e=P("--ic-brand-color-primary-b");return(parseInt(n)*299+parseInt(t)*587+parseInt(e)*114)/1e3};const F=(n=D())=>n>v?t.Dark:t.Light;const G=(n,t)=>{if(n&&n.querySelector){return n.querySelector(`[slot="${t}"]`)}return null};const R=(n,t)=>G(n,t)!==null;const W=(n,t)=>{const e=G(n,t);if(e){return X(e)}return null};const X=n=>{const t=n.firstElementChild;if(t!==null){const e=t.assignedElements?t.assignedElements():t.childNodes;return e.length?e:n.tagName?[n]:null}else{return n===null?null:[n]}};const U=({parentElement:n})=>{let t={navType:"",parent:null};switch(n.tagName){case"IC-NAVIGATION-GROUP":t=U(n);break;case"IC-TOP-NAVIGATION":t={navType:"top",parent:n};break;case"IC-SIDE-NAVIGATION":t={navType:"side",parent:n};break;case"IC-PAGE-HEADER":t={navType:"page-header",parent:null};break}return t};const q={XS:Number(P("--ic-breakpoint-xs").replace("px","")),S:Number(P("--ic-breakpoint-sm").replace("px","")),M:Number(P("--ic-breakpoint-md").replace("px","")),L:Number(P("--ic-breakpoint-lg").replace("px","")),XL:Number(P("--ic-breakpoint-xl").replace("px","")),UNDEFINED:1200};const _=(n,t)=>!!n&&!t;const j=({children:n},t)=>Array.from(n).some((n=>n.getAttribute("slot")===t));const z=(n,t,e)=>{if(n===undefined&&t!==n){e()}};const J=(n,t)=>{n.forEach((({prop:n,propName:e})=>{if(n===null||n===undefined){console.error(`No ${e} specified for ${t} component - prop '${e}' (web components) / '${K(e)}' (react) required`)}}))};const K=n=>n.toLowerCase().split("-").map(((n,t)=>t===0?n:`${n.substring(0,1).toUpperCase()}${n.substring(1)}`)).join("");const Q=n=>{if(typeof window!=="undefined"&&typeof window.ResizeObserver!=="undefined"){n()}};const Y=n=>parseInt(n,16);const nn=n=>{const t=n.replace("#","").split("").map((n=>n.repeat(2)));return{r:Y(n.length===4?t[0]:n.slice(1,3)),g:Y(n.length===4?t[1]:n.slice(3,5)),b:Y(n.length===4?t[2]:n.slice(5)),a:1}};const tn=n=>{const t=n.slice(3,4).toLowerCase()==="a";const e=n.substring(t?5:4,n.length-1).replace(/ /g,"").split(",").map(Number);return{r:e[0],g:e[1],b:e[2],a:t?e[3]:1}};const en=({scrollWidth:n,clientWidth:t})=>n>t;const an=()=>!!document.querySelector("ic-classification-banner:not([inline='true'])");const rn=(n,t)=>{var e;(e=n.closest("FORM"))===null||e===void 0?void 0:e.addEventListener("reset",t)};const on=(n,t)=>{var e;(e=n.closest("FORM"))===null||e===void 0?void 0:e.removeEventListener("reset",t)};const sn=(n,t=16)=>`${1/t*parseInt(n)}rem`;const cn=(n,t)=>{if(!n){t.removeAttribute("disabled")}};const ln=()=>window.navigator.userAgent.toUpperCase().indexOf("MAC")>=0;const un=n=>{const t=n===null||n===void 0?void 0:n.slice(0,1).toLowerCase();return t==="#"?nn(n):t==="r"?tn(n):null};const dn=n=>n.charAt(0).toUpperCase()+n.slice(1);const pn=(n,t,e)=>{const i=n=>Array.from(n).some((n=>Array.isArray(e)?e.some((t=>n.slot===t)):n.slot===e));return i(n)||i(t)};const fn=n=>!!n.closest(".ag-cell")&&!!n.closest(".ag-root");export{H as A,$ as B,E as C,q as D,O as E,k as F,n as G,T as H,t as I,sn as J,D as K,f as L,G as M,W as N,dn as O,m as P,r as Q,ln as R,en as S,V as T,I as U,s as V,g as W,o as X,e as Y,h as Z,J as a,un as b,pn as c,Z as d,B as e,Q as f,F as g,A as h,j as i,rn as j,on as k,L as l,x as m,N as n,z as o,_ as p,fn as q,cn as r,R as s,l as t,an as u,w as v,c as w,U as x,P as y,X as z};
2
- //# sourceMappingURL=p-48e98730.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["IcInformationStatus","IcBrandForegroundEnum","VARIANT_ICONS","neutral","icon","neutralIcon","ariaLabel","info","infoIcon","warning","warningIcon","error","errorIcon","success","successIcon","IC_INHERITED_ARIA","IC_DEVICE_SIZES","XS","S","M","L","XL","IC_BLOCK_COLOR_COMPONENTS","IC_FIXED_COLOR_COMPONENTS","IC_BLOCK_COLOR_EXCEPTIONS","BLACK_MIN_COLOR_BRIGHTNESS","WHITE_MAX_COLOR_BRIGHTNESS","DARK_MODE_THRESHOLD","icInput","linkIcInput","inheritAttributes","element","attributes","attributeObject","forEach","attr","hasAttribute","value","getAttribute","removeAttribute","debounceEvent","event","wait","original","_original","emit","debounce","bind","func","timer","args","clearTimeout","setTimeout","renderHiddenInput","always","container","name","disabled","undefined","hasShadowDom","inputs","querySelectorAll","inputEls","Array","from","filtered","filter","el","parentElement","input","ownerDocument","createElement","type","classList","add","appendChild","Date","toISOString","renderFileHiddenInput","multiple","accept","hidden","files","onchange","click","removeHiddenInput","remove","shadowRoot","attachShadow","getInputHelperTextID","id","getInputValidationTextID","getInputDescribedByText","inputId","helperText","validationText","trim","getBrandFromContext","brandFromEvent","getRootNode","host","blockColorParent","closest","join","parentTag","tagName","toLowerCase","currentTag","_a","includes","Default","contains","Dark","Light","isMobileOrTablet","navigator","maxTouchPoints","test","userAgent","handleHiddenFormButtonClick","form","button","hiddenFormButton","document","setAttribute","style","display","isEmptyString","length","isPropDefined","prop","getLabelFromValue","options","valueField","labelField","ungroupedOptions","map","option","children","push","matchingValue","find","getFilteredMenuOptions","includeDescriptions","searchString","position","label","description","lowerSearchString","startsWith","getOptionsWithoutGroupTitlesCount","optionsWithoutGroupTitles","deviceSizeMatches","size","window","matchMedia","matches","getCurrentDeviceSize","DEVICE_SIZES","UNDEFINED","getCssProperty","cssVar","getComputedStyle","documentElement","getPropertyValue","getBrandColorBrightness","themeRed","themeGreen","themeBlue","parseInt","getBrandForegroundAppearance","brightness","getSlot","querySelector","slotHasContent","getSlotContent","slot","getSlotElements","slotContent","firstElementChild","elements","assignedElements","childNodes","getNavItemParentDetails","navType","parent","Number","replace","hasValidationStatus","status","isSlotUsed","slotName","some","child","onComponentPropUndefinedChange","oldValue","newValue","callback","onComponentRequiredPropUndefined","props","component","propName","console","kebabToCamelCase","kebabCase","split","word","index","substring","toUpperCase","checkResizeObserver","callbackFn","ResizeObserver","hex2dec","v","hexToRgba","hex","hexChars","char","repeat","r","slice","g","b","a","rgbaStrToObj","rgbaStr","isRGBA","rgbValues","elementOverflowsX","scrollWidth","clientWidth","hasClassificationBanner","addFormResetListener","addEventListener","removeFormResetListener","removeEventListener","pxToRem","px","base","removeDisabledFalse","isMacDevice","indexOf","convertToRGBA","color","firstChar","capitalize","text","charAt","checkSlotInChildMutations","addedNodes","removedNodes","hasSlot","nodeList","node","isArray","isElInAGGrid"],"sources":["src/utils/types.ts","src/utils/constants.ts","src/utils/helpers.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nexport type IcFocusableComponents =\n | HTMLIcBreadcrumbElement\n | HTMLIcButtonElement\n | HTMLIcCardVerticalElement\n | HTMLIcCheckboxElement\n | HTMLIcChipElement\n | HTMLIcLinkElement\n | HTMLIcNavigationButtonElement\n | HTMLIcNavigationGroupElement\n | HTMLIcNavigationItemElement\n | HTMLIcRadioOptionElement\n | HTMLIcSearchBarElement\n | HTMLIcSelectElement\n | HTMLIcSwitchElement\n | HTMLIcTabElement\n | HTMLIcTextFieldElement;\n\nexport type IcStatusVariants =\n | \"neutral\"\n | \"info\"\n | \"warning\"\n | \"error\"\n | \"success\";\n\nexport enum IcInformationStatus {\n Warning = \"warning\",\n Error = \"error\",\n Success = \"success\",\n}\n\nexport type IcSizes = \"medium\" | \"large\" | \"small\";\n\nexport type IcSizesNoLarge = \"medium\" | \"small\";\n\nexport type IcInformationStatusOrEmpty = \"warning\" | \"error\" | \"success\" | \"\";\n\nexport type IcNavType = \"side\" | \"top\" | \"page-header\";\n\n// From: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete\nexport type IcAutocompleteTypes =\n | \"on\"\n | \"off\"\n | \"name\"\n | \"honorific-prefix\"\n | \"given-name\"\n | \"additional-name\"\n | \"family-name\"\n | \"honorific-suffix\"\n | \"nickname\"\n | \"email\"\n | \"username\"\n | \"new-password\"\n | \"current-password\"\n | \"one-time-code\"\n | \"organization-title\"\n | \"organization\"\n | \"street-address\"\n | \"address-line1\"\n | \"address-line2\"\n | \"address-line3\"\n | \"address-level4\"\n | \"address-level3\"\n | \"address-level2\"\n | \"address-level1\"\n | \"country\"\n | \"country-name\"\n | \"postal-code\"\n | \"cc-name\"\n | \"cc-given-name\"\n | \"cc-additional-name\"\n | \"cc-family-name\"\n | \"cc-family-name\"\n | \"cc-number\"\n | \"cc-exp\"\n | \"cc-exp-month\"\n | \"cc-exp-year\"\n | \"cc-csc\"\n | \"cc-type\"\n | \"transaction-currency\"\n | \"transaction-amount\"\n | \"language\"\n | \"bday\"\n | \"bday-day\"\n | \"bday-month\"\n | \"bday-year\"\n | \"sex\"\n | \"tel\"\n | \"tel-country-code\"\n | \"tel-national\"\n | \"tel-area-code\"\n | \"tel-local\"\n | \"tel-extension\"\n | \"impp\"\n | \"url\"\n | \"photo\";\n\nexport type IcAlignment = \"left\" | \"center\" | \"full-width\";\n\nexport enum IcBrandForegroundEnum {\n Default = \"default\",\n Dark = \"dark\",\n Light = \"light\",\n}\n\nexport type IcThemeMode = \"dark\" | \"light\" | \"inherit\";\n\nexport type IcBrandForeground = \"default\" | \"dark\" | \"light\";\n\nexport type IcBrandForegroundNoDefault = \"dark\" | \"light\";\n\nexport type IcBrand = {\n mode: IcBrandForeground;\n color: IcColorRGB;\n};\n\nexport type IcAdditionalFieldTypes = \"static\" | \"dynamic\";\n\nexport type IcColorRGB = {\n r: number;\n g: number;\n b: number;\n};\n\nexport type IcColorRGBA = IcColorRGB & {\n a: number;\n};\n\nexport type IcActivationTypes = \"automatic\" | \"manual\";\n\nexport type IcAutocorrectStates = \"on\" | \"off\";\n\nexport type IcNavParentDetails = {\n navType: IcNavType | \"\";\n parent: HTMLElement;\n};\n\nexport type IcTypographyVariants =\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"subtitle-large\"\n | \"subtitle-small\"\n | \"body\"\n | \"label\"\n | \"label-uppercase\"\n | \"caption\"\n | \"caption-uppercase\"\n | \"code-large\"\n | \"code-small\"\n | \"code-extra-small\"\n | \"badge\"\n | \"badge-small\";\n\n/**\n * @interface IcMenuOption\n * @field {string} A label field to options. Defaults to \"label\", but can have any custom name.\n * @field {string} A value field to options. Defaults to \"value\", but can have any custom name.\n */\nexport interface IcMenuOption {\n description?: string;\n disabled?: boolean;\n recommended?: boolean;\n children?: IcMenuOption[];\n loading?: boolean;\n timedOut?: boolean;\n [key: string]: any;\n element?: {\n component: any;\n ariaLabel: string;\n };\n icon?: any;\n}\n\nexport type IcSearchMatchPositions = \"start\" | \"anywhere\";\n\nexport type IcCallbackFunctionNoReturn = (...args: unknown[]) => void;\n\nexport type IcRequiredPropsTypes =\n | string\n | boolean\n | number\n | HTMLElement\n | IcMenuOption[];\n\nexport type IcPropObject = { prop: IcRequiredPropsTypes; propName: string };\n\nexport type IcRelatedTarget = EventTarget | undefined;\n\nexport type IcOrientation = \"horizontal\" | \"vertical\";\n\nexport type IcEmphasisType = \"filled\" | \"outlined\";\n\nexport interface IcValueEventDetail {\n value: string | string[];\n keyPressed?: string;\n}\n\nexport interface IcBlurEventDetail {\n relatedTarget: IcRelatedTarget;\n}\n\nexport type IcSelectTypes = \"single\" | \"multi\";\n\nexport type IcSelectMethodTypes = \"auto\" | \"manual\";\n\nexport type IcDeviceSizes = 0 | 576 | 768 | 992 | 1200;\n\ntype RGB = `rgb(${string})`;\ntype RGBA = `rgba(${string})`;\ntype HEX = `#${string}`;\n\nexport type IcColor = RGB | RGBA | HEX;\n","import errorIcon from \"../assets/error-icon.svg\";\nimport infoIcon from \"../assets/info-icon.svg\";\nimport neutralIcon from \"../assets/neutral-icon.svg\";\nimport successIcon from \"../assets/success-icon.svg\";\nimport warningIcon from \"../assets/warning-icon.svg\";\n\n// Global status icons\nexport const VARIANT_ICONS = {\n neutral: {\n icon: neutralIcon,\n ariaLabel: \"Neutral\",\n },\n info: {\n icon: infoIcon,\n ariaLabel: \"For your information\",\n },\n warning: {\n icon: warningIcon,\n ariaLabel: \"Warning\",\n },\n error: {\n icon: errorIcon,\n ariaLabel: \"Error\",\n },\n success: {\n icon: successIcon,\n ariaLabel: \"Success\",\n },\n};\n\n// Global ARIA attributes\nexport const IC_INHERITED_ARIA = [\n \"aria-atomic\",\n \"aria-autocomplete\",\n \"aria-busy\",\n \"aria-controls\",\n \"aria-current\",\n \"aria-describedby\",\n \"aria-description\",\n \"aria-details\",\n \"aria-disabled\",\n \"aria-dropeffect\",\n \"aria-errormessage\",\n \"aria-expanded\",\n \"aria-flowto\",\n \"aria-grabbed\",\n \"aria-haspopup\",\n \"aria-hidden\",\n \"aria-invalid\",\n \"aria-keyshortcuts\",\n \"aria-label\",\n \"aria-labelledby\",\n \"aria-live\",\n \"aria-owns\",\n \"aria-relevant\",\n \"aria-roledescription\",\n];\n\nexport const IC_DEVICE_SIZES = {\n XS: 576,\n S: 768,\n M: 992,\n L: 1200,\n XL: 99999,\n};\n\nexport const IC_BLOCK_COLOR_COMPONENTS = [\n \"ic-hero\",\n \"ic-top-navigation\",\n \"ic-footer\",\n \"ic-side-navigation\",\n \"ic-alert\",\n];\n\nexport const IC_FIXED_COLOR_COMPONENTS = [\"ic-alert\"];\n\nexport interface IcColorExceptions {\n [details: string]: string[];\n}\n\nexport const IC_BLOCK_COLOR_EXCEPTIONS: IcColorExceptions = {\n \"ic-alert\": [\"ic-link\"],\n};\n\n/* Range within which the chosen theme colour would not have a sufficient brightness difference with either of the black or white foreground colours\n * The brightness difference must be greater than 125 to provide good colour visibility\n * Calculated by:\n * - Using the brightness formula for both colours: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding 125 to the brightness of the black foreground colour - RGB(11, 12, 12)\n * - Subtracting 125 from the brightness of the white foreground colour - RGB(255, 255, 255)\n */\nexport const BLACK_MIN_COLOR_BRIGHTNESS = 136.701;\nexport const WHITE_MAX_COLOR_BRIGHTNESS = 130;\n","import { EventEmitter } from \"@stencil/core\";\nimport {\n IcCallbackFunctionNoReturn,\n IcInformationStatusOrEmpty,\n IcNavParentDetails,\n IcPropObject,\n IcSearchMatchPositions,\n IcColorRGBA,\n IcDeviceSizes,\n IcColor,\n IcBrandForegroundNoDefault,\n} from \"./types\";\n\nimport {\n IcMenuOption,\n IcBrandForeground,\n IcBrandForegroundEnum,\n} from \"../utils/types\";\nimport {\n IC_BLOCK_COLOR_COMPONENTS,\n IC_BLOCK_COLOR_EXCEPTIONS,\n IC_FIXED_COLOR_COMPONENTS,\n} from \"./constants\";\n\nconst DARK_MODE_THRESHOLD = 133.3505;\nconst icInput = \"ic-input\";\nconst linkIcInput = \"input.ic-input\";\n\n/**\n * converts an enum of strings into an array of strings\n */\nexport const stringEnumToArray = (\n theEnum: Record<string, string | number>\n): string[] => {\n const arr: string[] = [];\n Object.values(theEnum).forEach((val) => {\n if (isNaN(Number(val))) {\n const str = val as string;\n arr.push(str);\n }\n });\n return arr;\n};\n\n/**\n * Used to inherit global attributes set on the host. Called in componentWillLoad and assigned\n * to a variable that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\nexport const inheritAttributes = (\n element: HTMLElement,\n attributes: string[] = []\n): { [key: string]: string } => {\n const attributeObject: { [key: string]: string } = {};\n\n attributes.forEach((attr) => {\n if (element.hasAttribute(attr)) {\n const value = element.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = value;\n }\n element.removeAttribute(attr);\n }\n });\n\n return attributeObject;\n};\n\nexport const debounceEvent = (\n event: EventEmitter,\n wait: number\n): EventEmitter => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const original = (event as any)._original || event;\n return {\n _original: event,\n emit: debounce(original.emit.bind(original), wait),\n } as EventEmitter;\n};\n\nexport const debounce = (\n func: (...args: unknown[]) => void,\n wait = 0\n): unknown => {\n let timer: ReturnType<typeof setTimeout>;\n return (...args: unknown[]) => {\n clearTimeout(timer);\n timer = setTimeout(func, wait, ...args);\n };\n};\n\n/**\n * This method is used to add a hidden input to a host element that contains\n * a Shadow DOM. It does not add the input inside of the Shadow root which\n * allows it to be picked up inside of forms. It should contain the same\n * values as the host element.\n *\n * @param always Add a hidden input even if the container does not use Shadow\n * @param container The element where the input will be added\n * @param name The name of the input\n * @param value The value of the input\n * @param disabled If true, the input is disabled\n */\nexport const renderHiddenInput = (\n always: boolean,\n container: HTMLElement,\n name: string,\n value: string | Date | undefined | null,\n disabled: boolean\n): void => {\n if (name !== undefined && (always || hasShadowDom(container))) {\n const inputs = container.querySelectorAll(linkIcInput);\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n\n let input = filtered[0] as HTMLInputElement;\n if (input === null || input === undefined) {\n input = container.ownerDocument.createElement(\"input\");\n input.type = \"hidden\";\n input.classList.add(icInput);\n container.appendChild(input);\n }\n input.disabled = disabled;\n input.name = name;\n\n if (value instanceof Date) {\n input.value = value ? value.toISOString() : null;\n } else {\n input.value = value || \"\";\n }\n }\n};\n\n/**\n * This method is used to add a hidden file input to a host element that contains\n * a Shadow DOM. It does not add the input inside of the Shadow root which\n * allows it to be picked up inside of forms. It should contain the same\n * values as the host element.\n *\n * @param event: The event that is emitted once a file is selected.\n * @param container The element where the input will be added\n * @param multiple If true, multiple files can be selected\n * @param name The name of the input\n * @param value The value of the input\n * @param disabled If true, the input is disabled\n * @param accept A string of the accepted files\n */\nexport const renderFileHiddenInput = (\n event: EventEmitter,\n container: HTMLElement,\n multiple: boolean,\n name: string,\n value: FileList | undefined | null,\n disabled: boolean,\n accept: string\n): void => {\n if (name !== undefined && hasShadowDom(container)) {\n const inputs = container.querySelectorAll(linkIcInput);\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n\n let input = filtered[0] as HTMLInputElement;\n if (input === null || input === undefined) {\n input = container.ownerDocument.createElement(\"input\");\n input.classList.add(icInput);\n container.appendChild(input);\n }\n input.type = \"file\";\n input.hidden = true;\n input.multiple = multiple;\n input.name = name;\n input.files = value;\n input.disabled = disabled;\n input.accept = accept;\n input.onchange = () => {\n event.emit(input.files);\n };\n input.click();\n }\n};\n\nexport const removeHiddenInput = (container: HTMLElement): void => {\n const inputs = container.querySelectorAll(\"input.ic-input\");\n const inputEls = Array.from(inputs);\n const filtered = inputEls.filter((el) => container === el.parentElement);\n const input = filtered[0] as HTMLInputElement;\n input?.remove();\n};\n\nexport const hasShadowDom = (el: HTMLElement): boolean =>\n !!el.shadowRoot && !!el.attachShadow;\n\nexport const getInputHelperTextID = (id: string): string => id + \"-helper-text\";\n\nexport const getInputValidationTextID = (id: string): string =>\n id + \"-validation-text\";\n\nexport const getInputDescribedByText = (\n inputId: string,\n helperText: boolean,\n validationText: boolean\n): string =>\n `${helperText ? getInputHelperTextID(inputId) : \"\"} ${\n validationText ? getInputValidationTextID(inputId) : \"\"\n }`.trim();\n\n/**\n * This method helps to understand the context in which a component exists,\n * to assist with choosing appropriate foreground colours to use. For example,\n * this method will help you use the 'white' version of a button if it's within\n * a block colour element using white foreground text.\n *\n * This only works for components/elements passed via <slot> and not if they\n * are part of an IC component.\n *\n * \"\"\n * @returns IcBrandForeground depending on the context\n */\nexport const getBrandFromContext = (\n el: Element,\n brandFromEvent: IcBrandForeground = null\n): IcBrandForeground => {\n const parentElement =\n el.parentElement || (<ShadowRoot>el.getRootNode()).host.parentElement;\n const blockColorParent = parentElement.closest(\n IC_BLOCK_COLOR_COMPONENTS.join(\",\")\n );\n\n // If within a block color component\n if (blockColorParent !== null) {\n const parentTag = blockColorParent.tagName.toLowerCase();\n const currentTag = el.tagName.toLowerCase();\n\n if (IC_BLOCK_COLOR_EXCEPTIONS[parentTag]?.includes(currentTag)) {\n return IcBrandForegroundEnum.Default;\n } else if (\n brandFromEvent !== null &&\n !IC_FIXED_COLOR_COMPONENTS.includes(parentTag)\n ) {\n return brandFromEvent;\n } else if (\n blockColorParent.classList.contains(\n `${parentTag}-${IcBrandForegroundEnum.Dark}`\n ) ||\n blockColorParent.classList.contains(IcBrandForegroundEnum.Dark)\n ) {\n return IcBrandForegroundEnum.Dark;\n }\n\n return IcBrandForegroundEnum.Light;\n }\n\n return IcBrandForegroundEnum.Default;\n};\n\n/**\n * Checks if the current device is a mobile or tablet device.\n * @returns {boolean} Returns true if the device is a mobile or tablet device, otherwise returns false.\n */\nexport const isMobileOrTablet = (): boolean =>\n \"maxTouchPoints\" in navigator && \"userAgent\" in navigator\n ? navigator.maxTouchPoints > 0 &&\n /iPad|iPhone|iPod|Android|webOS|BlackBerry|IEMobile|Opera Mini/i.test(\n navigator.userAgent\n )\n : false;\n\n/**\n * Will create a button within the lightDOM which interacts with the parent form.\n * This is required as buttons within the shadowDOM will not invoke a submit or reset\n *\n * @param form - parent form element which contains shadowDom button\n * @param button - shadowDOM button\n */\nexport const handleHiddenFormButtonClick = (\n form: HTMLFormElement,\n button: HTMLIcButtonElement | HTMLButtonElement\n): void => {\n const hiddenFormButton = document.createElement(\"button\");\n\n hiddenFormButton.setAttribute(\"type\", button.type);\n hiddenFormButton.style.display = \"none\";\n\n form.appendChild(hiddenFormButton);\n\n hiddenFormButton.click();\n hiddenFormButton.remove();\n};\n\nexport const isEmptyString = (value: string): boolean =>\n value ? value.trim().length === 0 : true;\n\n// A helper function that checks if a prop has been defined\nexport const isPropDefined = (prop: string): string | null =>\n prop !== undefined ? prop : null;\n\n/**\n * Extracts the label using the value from an object. Requires the object to have a label and value property.\n * @param value - value from object\n * @param options - list of menu items\n * @returns - label corresponding to value\n */\nexport const getLabelFromValue = (\n value: string,\n options: IcMenuOption[],\n valueField = \"value\",\n labelField = \"label\"\n): string | undefined => {\n const ungroupedOptions: IcMenuOption[] = [];\n if (options.length > 0 && options.map) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option: IcMenuOption) =>\n ungroupedOptions.push(option)\n );\n } else {\n ungroupedOptions.push(option);\n }\n });\n const matchingValue = ungroupedOptions.find(\n (option) => option[valueField] === value\n );\n if (matchingValue !== undefined) return matchingValue[labelField];\n }\n\n return undefined;\n};\n\n/**\n * Filters the options based on the search string.\n * @param options - array of options\n * @param includeDescriptions - determines whether option descriptions are included when filtering options\n * @param searchString - string used to filter the options\n * @param position - whether the search string matches the start of or anywhere in the options\n * @returns filtered array of options\n */\nexport const getFilteredMenuOptions = (\n options: IcMenuOption[],\n includeDescriptions: boolean,\n searchString: string,\n position: IcSearchMatchPositions,\n labelField = \"label\"\n): IcMenuOption[] =>\n options.filter((option) => {\n const label: string = option[labelField].toLowerCase();\n const description = option.description?.toLowerCase();\n const lowerSearchString = searchString.toLowerCase();\n\n return position === \"anywhere\"\n ? includeDescriptions\n ? label.includes(lowerSearchString) ||\n description?.includes(lowerSearchString)\n : label.includes(lowerSearchString)\n : includeDescriptions\n ? label.startsWith(lowerSearchString) ||\n description?.startsWith(lowerSearchString)\n : label.startsWith(lowerSearchString);\n });\n\n/**\n * Gets count of options where only group title \"parent\" options have been removed.\n * Disabled options are included in the count.\n * @param options - array of options\n * @returns number of options not including group titles\n */\nexport const getOptionsWithoutGroupTitlesCount = (\n options: IcMenuOption[]\n): number => {\n const optionsWithoutGroupTitles: IcMenuOption[] = [];\n\n if (options.length > 0 && options.map) {\n options.map((option) => {\n if (option.children) {\n option.children.map((option) => optionsWithoutGroupTitles.push(option));\n } else {\n optionsWithoutGroupTitles.push(option);\n }\n });\n }\n\n return optionsWithoutGroupTitles.length;\n};\n\nexport const deviceSizeMatches = (size: number): boolean =>\n window.matchMedia(`(max-width: ${size}px)`).matches;\n\nexport const getCurrentDeviceSize = (): number => {\n if (deviceSizeMatches(DEVICE_SIZES.S)) {\n return DEVICE_SIZES.S;\n }\n if (deviceSizeMatches(DEVICE_SIZES.M)) {\n return DEVICE_SIZES.M;\n }\n if (deviceSizeMatches(DEVICE_SIZES.L)) {\n return DEVICE_SIZES.L;\n }\n if (deviceSizeMatches(DEVICE_SIZES.XL)) {\n return DEVICE_SIZES.XL;\n }\n //fallback needed as all of above get initialised to 0 in jest tests\n return DEVICE_SIZES.UNDEFINED;\n};\n\nexport const getCssProperty = (cssVar: string): string =>\n getComputedStyle(document.documentElement).getPropertyValue(cssVar);\n\n/**\n * Returns the brightness of the theme colour, calculated by using the theme RGB CSS values by:\n * - Multiplying each RGB value by a set number: https://www.w3.org/TR/AERT/#color-contrast\n * - Adding them together and dividing by 1000\n * This is a similar calculation to its CSS counterpart: \"--ic-brand-text-color\"\n * @returns number representing the brightness of the theme colour\n */\nexport const getBrandColorBrightness = (): number => {\n const themeRed = getCssProperty(\"--ic-brand-color-primary-r\");\n const themeGreen = getCssProperty(\"--ic-brand-color-primary-g\");\n const themeBlue = getCssProperty(\"--ic-brand-color-primary-b\");\n return (\n (parseInt(themeRed) * 299 +\n parseInt(themeGreen) * 587 +\n parseInt(themeBlue) * 114) /\n 1000\n );\n};\n\n/**\n * Returns if dark or light foreground colors should be used for color contrast reasons\n * @returns \"dark\" or \"light\"\n * @param brightness - Optional custom brightness value. Defaults to `getBrandColorBrightness`\n */\nexport const getBrandForegroundAppearance = (\n brightness = getBrandColorBrightness()\n): IcBrandForegroundNoDefault =>\n brightness > DARK_MODE_THRESHOLD\n ? IcBrandForegroundEnum.Dark\n : IcBrandForegroundEnum.Light;\n\nexport const getSlot = (element: HTMLElement, name: string): Element | null => {\n if (element && element.querySelector) {\n return element.querySelector(`[slot=\"${name}\"]`);\n }\n return null;\n};\n\nexport const slotHasContent = (element: HTMLElement, name: string): boolean =>\n getSlot(element, name) !== null;\n\nexport const getSlotContent = (\n element: HTMLElement,\n name: string\n): Element[] | NodeListOf<ChildNode> | null => {\n const slot = getSlot(element, name);\n if (slot) {\n return getSlotElements(slot);\n }\n\n return null;\n};\n\nexport const getSlotElements = (\n slot: Element\n): NodeListOf<ChildNode> | Element[] => {\n const slotContent = slot.firstElementChild as HTMLSlotElement;\n\n if (slotContent !== null) {\n const elements = slotContent.assignedElements\n ? slotContent.assignedElements()\n : slotContent.childNodes;\n return elements.length ? elements : slot.tagName ? [slot] : null;\n } else {\n //check for single element\n return slot === null ? null : [slot];\n }\n};\n\nexport const getNavItemParentDetails = ({\n parentElement,\n}: HTMLElement): IcNavParentDetails => {\n let navType: IcNavParentDetails = { navType: \"\", parent: null };\n switch (parentElement.tagName) {\n case \"IC-NAVIGATION-GROUP\":\n navType = getNavItemParentDetails(parentElement);\n break;\n case \"IC-TOP-NAVIGATION\":\n navType = { navType: \"top\", parent: parentElement };\n break;\n case \"IC-SIDE-NAVIGATION\":\n navType = { navType: \"side\", parent: parentElement };\n break;\n case \"IC-PAGE-HEADER\":\n navType = { navType: \"page-header\", parent: null };\n break;\n }\n return navType;\n};\n\nexport const DEVICE_SIZES = {\n XS: Number(\n getCssProperty(\"--ic-breakpoint-xs\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 0\n S: Number(\n getCssProperty(\"--ic-breakpoint-sm\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 576\n M: Number(\n getCssProperty(\"--ic-breakpoint-md\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 768\n L: Number(\n getCssProperty(\"--ic-breakpoint-lg\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 992\n XL: Number(\n getCssProperty(\"--ic-breakpoint-xl\").replace(\"px\", \"\")\n ) as IcDeviceSizes, // 1200\n UNDEFINED: 1200,\n};\n\nexport const hasValidationStatus = (\n status: IcInformationStatusOrEmpty,\n disabled: boolean\n): boolean => !!status && !disabled;\n\nexport const isSlotUsed = (\n { children }: HTMLElement,\n slotName: string\n): boolean =>\n Array.from(children).some((child) => child.getAttribute(\"slot\") === slotName);\n\n// added as a common method to allow detection of gatsby hydration issue, where (camelCase) props are initially undefined & then update\n// with a value. Allows a callback function to be executed when this is the case\nexport const onComponentPropUndefinedChange = (\n oldValue: string | undefined,\n newValue: string | undefined,\n callback: IcCallbackFunctionNoReturn\n): void => {\n if (oldValue === undefined && newValue !== oldValue) {\n callback();\n }\n};\n\nexport const onComponentRequiredPropUndefined = (\n props: IcPropObject[],\n component: string\n): void => {\n props.forEach(({ prop, propName }) => {\n if (prop === null || prop === undefined) {\n console.error(\n `No ${propName} specified for ${component} component - prop '${propName}' (web components) / '${kebabToCamelCase(\n propName\n )}' (react) required`\n );\n }\n });\n};\n\nexport const kebabToCamelCase = (kebabCase: string): string =>\n kebabCase\n .toLowerCase()\n .split(\"-\")\n .map((word, index) =>\n index === 0\n ? word\n : `${word.substring(0, 1).toUpperCase()}${word.substring(1)}`\n )\n .join(\"\");\n\nexport const checkResizeObserver = (\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n if (\n typeof window !== \"undefined\" &&\n typeof window.ResizeObserver !== \"undefined\"\n ) {\n callbackFn();\n }\n};\n\nconst hex2dec = (v: string) => parseInt(v, 16);\n\nexport const hexToRgba = (hex: string): IcColorRGBA => {\n const hexChars = hex\n .replace(\"#\", \"\")\n .split(\"\")\n .map((char) => char.repeat(2));\n return {\n r: hex2dec(hex.length === 4 ? hexChars[0] : hex.slice(1, 3)),\n g: hex2dec(hex.length === 4 ? hexChars[1] : hex.slice(3, 5)),\n b: hex2dec(hex.length === 4 ? hexChars[2] : hex.slice(5)),\n a: 1,\n };\n};\n\nexport const rgbaStrToObj = (rgbaStr: string): IcColorRGBA => {\n const isRGBA = rgbaStr.slice(3, 4).toLowerCase() === \"a\";\n const rgbValues = rgbaStr\n .substring(isRGBA ? 5 : 4, rgbaStr.length - 1)\n .replace(/ /g, \"\")\n .split(\",\")\n .map(Number);\n return {\n r: rgbValues[0],\n g: rgbValues[1],\n b: rgbValues[2],\n a: isRGBA ? rgbValues[3] : 1,\n };\n};\n\nexport const elementOverflowsX = ({\n scrollWidth,\n clientWidth,\n}: HTMLElement): boolean => scrollWidth > clientWidth;\n\nexport const hasClassificationBanner = (): boolean =>\n !!document.querySelector(\"ic-classification-banner:not([inline='true'])\");\n\nexport const addFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n el.closest(\"FORM\")?.addEventListener(\"reset\", callbackFn);\n};\n\nexport const removeFormResetListener = (\n el: HTMLElement,\n callbackFn: IcCallbackFunctionNoReturn\n): void => {\n el.closest(\"FORM\")?.removeEventListener(\"reset\", callbackFn);\n};\n\nexport const pxToRem = (px: string, base = 16): string =>\n `${(1 / base) * parseInt(px)}rem`;\n\n/**\n * Removes the disabled attribute from the provided element when its value is set to false.\n * This effectively makes it null, to not confuse screen readers that cannot interpret the false value\n */\nexport const removeDisabledFalse = (\n disabled: boolean,\n element: HTMLElement\n): void => {\n if (!disabled) {\n element.removeAttribute(\"disabled\");\n }\n};\n\nexport const isMacDevice = (): boolean =>\n window.navigator.userAgent.toUpperCase().indexOf(\"MAC\") >= 0;\n\nexport const isNumeric = (value: string): boolean => /^-?\\d+$/.test(value);\n\nexport async function waitForHydration(): Promise<boolean> {\n const elements = document.getElementsByTagName(\"*\");\n\n for (let i = 0; i < elements.length; i++) {\n if (elements[i].tagName.startsWith(\"IC-\")) {\n if (elements[i].classList.contains(\"hydrated\")) {\n return true;\n }\n } else {\n return false;\n }\n }\n\n return false;\n}\n\nexport const convertToRGBA = (color: IcColor): IcColorRGBA | null => {\n const firstChar = color?.slice(0, 1).toLowerCase();\n return firstChar === \"#\"\n ? hexToRgba(color)\n : firstChar === \"r\"\n ? rgbaStrToObj(color)\n : null;\n};\n\nexport const capitalize = (text: string): string =>\n text.charAt(0).toUpperCase() + text.slice(1);\n\nexport const checkSlotInChildMutations = (\n addedNodes: NodeList,\n removedNodes: NodeList,\n slotName: string | string[]\n): boolean => {\n const hasSlot = (nodeList: NodeList) =>\n Array.from(nodeList).some((node) =>\n Array.isArray(slotName)\n ? slotName.some((name) => (node as Element).slot === name)\n : (node as Element).slot === slotName\n );\n return hasSlot(addedNodes) || hasSlot(removedNodes);\n};\n\nexport const isElInAGGrid = (el: HTMLElement): boolean =>\n !!el.closest(\".ag-cell\") && !!el.closest(\".ag-root\");\n"],"mappings":"IAyBYA,GAAZ,SAAYA,GACVA,EAAA,qBACAA,EAAA,iBACAA,EAAA,oBACD,EAJD,CAAYA,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CwB,GAA0B,CACrCxK,EACAgJ,K,OAEAvG,EAAAzC,EAAGmC,QAAQ,WAAO,MAAAM,SAAA,SAAAA,EAAEgI,oBAAoB,QAASzB,EAAW,E,MAGjD0B,GAAU,CAACC,EAAYC,EAAO,KACzC,GAAI,EAAIA,EAAQtE,SAASqE,Q,MAMdE,GAAsB,CACjCvL,EACA1B,KAEA,IAAK0B,EAAU,CACb1B,EAAQQ,gBAAgB,W,SAIf0M,GAAc,IACzBvF,OAAOvC,UAAUG,UAAU2F,cAAciC,QAAQ,QAAU,E,MAoBhDC,GAAiBC,IAC5B,MAAMC,EAAYD,IAAK,MAALA,SAAK,SAALA,EAAOvB,MAAM,EAAG,GAAGnH,cACrC,OAAO2I,IAAc,IACjB9B,GAAU6B,GACVC,IAAc,IACdpB,GAAamB,GACb,IAAI,E,MAGGE,GAAcC,GACzBA,EAAKC,OAAO,GAAGvC,cAAgBsC,EAAK1B,MAAM,G,MAE/B4B,GAA4B,CACvCC,EACAC,EACA5D,KAEA,MAAM6D,EAAWC,GACf9L,MAAMC,KAAK6L,GAAU7D,MAAM8D,GACzB/L,MAAMgM,QAAQhE,GACVA,EAASC,MAAMxI,GAAUsM,EAAiB9E,OAASxH,IAClDsM,EAAiB9E,OAASe,IAEnC,OAAO6D,EAAQF,IAAeE,EAAQD,EAAa,E,MAGxCK,GAAgB7L,KACzBA,EAAGmC,QAAQ,eAAiBnC,EAAGmC,QAAQ,mB"}
@@ -1,2 +0,0 @@
1
- import{r as t,c as i,h as s,H as e,g as a}from"./p-6b5e91e2.js";import{A as h,B as r,r as o,C as n,a as l,n as c,l as d}from"./p-48e98730.js";const u=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M15.8327 5.34199L14.6577 4.16699L9.99935 8.82533L5.34102 4.16699L4.16602 5.34199L8.82435 10.0003L4.16602 14.6587L5.34102 15.8337L9.99935 11.1753L14.6577 15.8337L15.8327 14.6587L11.1743 10.0003L15.8327 5.34199Z" fill="currentColor"/>\n</svg>\n`;const b=`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">\n <path d="M13.1292 11.8792H12.4708L12.2375 11.6542C13.0542 10.7042 13.5458 9.47083 13.5458 8.12916C13.5458 5.13749 11.1208 2.71249 8.12916 2.71249C5.13749 2.71249 2.71249 5.13749 2.71249 8.12916C2.71249 11.1208 5.13749 13.5458 8.12916 13.5458C9.47083 13.5458 10.7042 13.0542 11.6542 12.2375L11.8792 12.4708V13.1292L16.0458 17.2875L17.2875 16.0458L13.1292 11.8792ZM8.12916 11.8792C6.05416 11.8792 4.37916 10.2042 4.37916 8.12916C4.37916 6.05416 6.05416 4.37916 8.12916 4.37916C10.2042 4.37916 11.8792 6.05416 11.8792 8.12916C11.8792 10.2042 10.2042 11.8792 8.12916 11.8792Z" fill="currentColor"/>\n</svg>`;const f='/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0;}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px;}[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host(.ic-search-bar-search){--divider-height:1.5rem;--ic-input-label-helpertext-padding:var(--ic-space-xxs);--border-color:var(--ic-search-bar-outline);--input-bg-color:var(--ic-search-bar-background);--border-color-disabled:var(--ic-search-bar-outline-disabled);--text-field-placeholder-color:var(--ic-search-bar-placeholder-text);--text-field-disabled-text-color:var(--ic-search-bar-disabled-text);--text-field-text-color:var(--ic-search-bar-filled-text);--menu-item-text-color:var(--ic-search-bar-dropdown-option-text);--menu-item-desc-text-color:var(--ic-search-bar-dropdown-option-description);--menu-bg-color:var(--ic-search-bar-dropdown-background);--menu-border-color:var(--ic-search-bar-dropdown-outline);--text-field-typing-cursor:var(--ic-search-bar-filled-text-cursor)}:host(.ic-search-bar-search:hover){--border-color:var(--ic-search-bar-outline-hover)}:host(.ic-search-bar-search:active){--border-color:var(--ic-search-bar-outline-pressed)}:host(.ic-search-bar-search.ic-search-bar-small){--divider-height:1rem}:host(.ic-search-bar-full-width){width:100%}:host(.ic-search-bar-search) .ic-button-disabled:hover{border-color:var(--ic-architectural-200)}:host(.ic-search-bar-search.ic-search-bar-disabled) .ic-button-disabled svg{color:var(--ic-architectural-200)}:host(.ic-search-bar-search) .ic-button-disabled svg{color:var(--ic-architectural-400)}.clear-button-container{align-items:center;margin-right:var(--ic-space-1px);display:none;visibility:hidden}.clear-button{border-radius:var(--ic-border-radius);transition:box-shadow var(--ic-easing-transition),\n border-radius var(--ic-easing-transition)}.clear-button:focus,.clear-button:active{background-color:var(--ic-color-focus-inner);box-shadow:inset 0 0 0 0.125rem var(--ic-color-focus-outer);border-radius:0.25rem}.clear-button-unfocused *{fill:var(--ic-search-bar-clear-button)}.clear-button:focus,.clear-button:active *{fill:white}.clear-button-visible{visibility:visible;display:flex}.search-submit-button-container{display:flex;align-items:center}.search-submit-button-unfocused *{fill:var(--ic-search-bar-filled-icon)}.search-submit-button-disabled *{fill:var(--ic-search-bar-icon-disabled)}.search-submit-button-disabled .ic-tooltip-container{display:none !important}.search-submit-button:focus,.search-submit-button:active{background-color:var(--ic-color-focus-inner) !important;box-shadow:inset 0 0 0 0.125rem var(--ic-color-focus-outer) !important;border-radius:var(--ic-space-xxs)}.search-submit-button:focus,.search-submit-button:active *{fill:white}.divider{width:var(--ic-border-width);background-color:var(--ic-search-bar-dropdown-divider);height:var(--divider-height)}.menu-container{width:var(--input-width, 20rem);position:relative;top:var(--ic-space-xxxs)}.menu-container.fullwidth{width:100%}.no-results{cursor:not-allowed}.search-results-status{border:0;clip:rect(0, 0, 0, 0, 0);height:var(--ic-space-1px);margin-bottom:calc(-1 * var(--ic-space-1px));margin-right:calc(-1 * var(--ic-space-1px));overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:var(--ic-space-1px)}@media (forced-colors: active){.search-submit-button-unfocused *{fill:canvastext}.search-submit-button-disabled *{fill:GrayText}}';let p=0;const m=class{constructor(s){t(this,s);this.icChange=i(this,"icChange",7);this.icClear=i(this,"icClear",7);this.icInput=i(this,"icInput",7);this.icOptionSelect=i(this,"icOptionSelect",7);this.icMenuChange=i(this,"icMenuChange",7);this.icClearBlur=i(this,"icClearBlur",7);this.icRetryLoad=i(this,"icRetryLoad",7);this.icSubmitSearch=i(this,"icSubmitSearch",7);this.icSubmitSearchBlur=i(this,"icSubmitSearchBlur",7);this.icSearchBarBlur=i(this,"icSearchBarBlur",7);this.icSearchBarFocus=i(this,"icSearchBarFocus",7);this.assistiveHintEl=null;this.hasTimedOut=false;this.inputId=`ic-search-bar-input-${p++}`;this.menuCloseFromMenuChangeEvent=false;this.menuId=`${this.inputId}-menu`;this.preLoad=true;this.preventSubmit=false;this.prevNoOption=false;this.retryButtonClick=false;this.truncateValue=false;this.handleClear=t=>{const i=t;const s=t;if(s.type==="click"||i.code==="Enter"||i.code==="Space"){this.value="";this.inputEl.value="";this.loading=false;clearTimeout(this.timeoutTimer);this.filteredOptions=this.options;this.el.setFocus();this.icClear.emit();t.preventDefault();this.preventSubmit=true}};this.onInput=t=>{this.value=t.target.value;const i=[{[this.labelField]:this.emptyOptionListText,[this.valueField]:""}];if(this.options.length>0){this.setMenuChange(true);this.preLoad=false;if(this.disableAutoFiltering===false){const t=h(this.options,false,this.value,"anywhere",this.labelField);this.filteredOptions=t.length>0?t:i}}if(!this.showClearButton){this.handleShowClearButton(true)}this.debounceAriaLiveUpdate()};this.onInputBlur=t=>{const i=t.target.value;const s=t.relatedTarget;this.icSearchBarBlur.emit({value:i,relatedTarget:s})};this.onInputFocus=t=>{const i=t.target.value;this.icSearchBarFocus.emit({value:i});this.handleShowClearButton(true)};this.handleClearBlur=t=>{const i=t.relatedTarget;this.icClearBlur.emit({relatedTarget:i});this.clearButtonFocused=false};this.handleSubmitSearchBlur=t=>{const i=t.relatedTarget;this.icSubmitSearchBlur.emit({relatedTarget:i});this.searchSubmitFocused=false};this.handleMouseDown=t=>{t.preventDefault()};this.handleSubmitSearchFocus=()=>{this.searchSubmitFocused=true};this.handleSubmitSearch=()=>{this.highlightedValue&&(this.value=this.highlightedValue);this.highlightedValue=undefined;this.icSubmitSearch.emit({value:this.value});const t=this.el.closest("FORM");if(this.searchSubmitButton&&!!t&&!this.preventSubmit){r(t,this.searchSubmitButton)}};this.handleSubmitSearchKeyDown=t=>{if(t.key===" "){t.preventDefault();this.handleSubmitSearch()}};this.handleRetry=t=>{this.retryViaKeyPress=t.detail.keyPressed==="Enter";this.icRetryLoad.emit({value:t.detail.value});this.triggerLoading();this.retryButtonClick=true};this.triggerLoading=()=>{const t=[{[this.labelField]:this.loadingLabel,[this.valueField]:"",loading:true}];if(this.filteredOptions!==t)this.filteredOptions=t;if(this.timeout){this.timeoutTimer=window.setTimeout((()=>{this.filteredOptions=[{[this.labelField]:this.loadingErrorLabel,[this.valueField]:"",timedOut:true}]}),this.timeout)}};this.handleOptionSelect=t=>{if(t.detail.label===this.emptyOptionListText){this.el.setFocus();return}this.value=t.detail.value;this.icOptionSelect.emit({value:this.value})};this.handleMenuOptionHighlight=t=>{var i;const s=(i=t.detail.optionId)===null||i===void 0?void 0:i.replace(`${this.menuId}-`,"");s&&(this.highlightedValue=s);if(t.detail.optionId){this.ariaActiveDescendant=t.detail.optionId}else{this.ariaActiveDescendant=undefined}};this.handleMenuChange=t=>{this.setMenuChange(t.detail.open);if(!t.detail.open){this.handleMenuCloseFromMenuChange(true);if(t.detail.focusInput===undefined||t.detail.focusInput){this.el.setFocus()}}};this.setMenuChange=t=>{if(this.open!==t){this.open=t;this.icMenuChange.emit({open:t})}};this.handleHostFocus=()=>{if(this.options&&this.value&&!this.menuCloseFromMenuChangeEvent){this.setMenuChange(true)}this.handleTruncateValue(false);this.icSearchBarFocus.emit()};this.handleHostBlur=t=>{const i=t.relatedTarget;if(this.open&&this.options&&i!==this.menu&&!this.retryViaKeyPress&&!this.retryButtonClick){this.setMenuChange(false)}if(this.retryButtonClick||this.retryViaKeyPress){this.inputEl.setFocus()}this.handleShowClearButton(false);this.handleMenuCloseFromMenuChange(false);this.handleTruncateValue(true);this.icSearchBarBlur.emit({relatedTarget:i,value:this.value});this.retryViaKeyPress=false;this.retryButtonClick=false};this.handleShowClearButton=t=>{this.showClearButton=t};this.handleFocusClearButton=()=>{this.clearButtonFocused=true};this.handleMenuCloseFromMenuChange=t=>{this.menuCloseFromMenuChangeEvent=t};this.handleTruncateValue=t=>{this.truncateValue=t};this.renderAssistiveHintEl=()=>{var t,i;const s=(i=(t=this.el.shadowRoot.querySelector("ic-text-field"))===null||t===void 0?void 0:t.shadowRoot)===null||i===void 0?void 0:i.querySelector(`#${this.inputId}`);if(s&&Object.keys(s).length>0&&this.hasOptionsOrFilterDisabled()){this.assistiveHintEl=document.createElement("span");this.assistiveHintEl.innerText=this.assistiveHintText;this.assistiveHintEl.id=`${this.inputId}-assistive-hint`;this.assistiveHintEl.style.display="none";if(s.after!==undefined){s.after(this.assistiveHintEl)}}};this.updateSearchResultAriaLive=()=>{const t=this.el.shadowRoot.querySelector(".search-results-status");if(t){if(!this.open||this.value===""||this.value.length<this.charactersUntilSuggestion){t.innerText=""}else if(this.hasOptionsOrFilterDisabled()&&this.filteredOptions.length>0&&this.open&&!this.filteredOptions[0].loading){if(this.hadNoOptions()){t.innerText=this.emptyOptionListText}else{t.innerText=`${this.filteredOptions.length} result${this.filteredOptions.length>1?"s":""} available`}}}};this.hasOptionsOrFilterDisabled=()=>this.options.length>0||this.disableAutoFiltering;this.hadNoOptions=()=>this.filteredOptions.length===1&&this.filteredOptions[0][this.labelField]===this.emptyOptionListText&&this.searchMode==="navigation";this.isSubmitDisabled=()=>{const t=this.value===undefined||this.value===null||this.value==="";const i=this.value.length<this.charactersUntilSuggestion;return t||i||this.disabled||this.hadNoOptions()||this.hasTimedOut||this.loading};this.highlightFirstOptionAfterNoResults=()=>{if(this.prevNoOption&&this.menu&&!this.hasTimedOut){this.menu.handleSetFirstOption();this.prevNoOption=false}const t=this.filteredOptions.find((t=>t[this.labelField]===this.emptyOptionListText||t[this.labelField]===this.loadingErrorLabel||t[this.labelField]===this.loadingLabel));if(t){this.prevNoOption=true}};this.ariaActiveDescendant=undefined;this.clearButtonFocused=false;this.highlightedValue=undefined;this.open=false;this.searchSubmitFocused=false;this.showClearButton=false;this.autocapitalize="off";this.autocomplete="off";this.autocorrect="off";this.autofocus=false;this.charactersUntilSuggestion=2;this.disabled=false;this.disableAutoFiltering=false;this.debounce=0;this.emptyOptionListText="No results found";this.focusOnLoad=false;this.fullWidth=false;this.helperText="";this.hideLabel=false;this.assistiveHintText="When autocomplete results are available use the up and down arrows to choose and press enter to select";this.label=undefined;this.labelField="label";this.loading=false;this.loadingErrorLabel="Loading Error";this.loadingLabel="Loading...";this.name=this.inputId;this.placeholder="Search";this.readonly=false;this.required=false;this.searchMode="navigation";this.size="medium";this.spellcheck=false;this.theme="inherit";this.timeout=undefined;this.valueField="value";this.filteredOptions=[];this.options=[];this.value=""}watchDisabledHandler(){o(this.disabled,this.el)}loadingHandler(t){if(t&&!this.hasTimedOut){this.preLoad=false;this.triggerLoading()}}filteredOptionsHandler(t){this.hasTimedOut=t.some((t=>t.timedOut))}watchOptionsHandler(t){if(this.disableAutoFiltering&&!this.hasTimedOut){this.loading=false;clearTimeout(this.timeoutTimer);if(t.length>0){this.filteredOptions=t}else{if(this.hadNoOptions()){return}this.setMenuChange(true);!this.preLoad&&(this.filteredOptions=[{[this.labelField]:this.emptyOptionListText,[this.valueField]:""}]);this.preLoad=true}}this.debounceAriaLiveUpdate()}watchValueHandler(t){if(this.inputEl&&this.options&&!!n(t,this.options,this.valueField,this.labelField)){this.inputEl.value=n(t,this.options,this.valueField,this.labelField)}else if(this.inputEl&&this.inputEl.value!==t){this.inputEl.value=t}}disconnectedCallback(){if(this.assistiveHintEl){this.assistiveHintEl.remove()}}componentWillLoad(){this.watchValueHandler(this.value);o(this.disabled,this.el)}componentDidLoad(){if(this.focusOnLoad){this.el.setFocus()}if(this.hasOptionsOrFilterDisabled()){this.renderAssistiveHintEl();if(this.disableAutoFiltering){this.filteredOptions=this.options}}l([{prop:this.label,propName:"label"}],"Search Bar");if(this.inputEl!==undefined){this.anchorEl=this.inputEl.shadowRoot.querySelector("ic-input-component-container")}}componentWillRender(){this.highlightFirstOptionAfterNoResults()}handleKeyDown(t){const i=t.detail.event;if(this.menu&&this.open){this.menu.handleKeyboardOpen(i)}}handleKeyUp(t){if(t.key==="Enter"){if(this.preventSubmit||this.isSubmitDisabled()){return}this.handleSubmitSearch();this.setMenuChange(false)}if(t.key==="Escape"){this.setMenuChange(false)}if(this.preventSubmit){this.preventSubmit=false}}async setFocus(){this.retryViaKeyPress=false;this.retryButtonClick=false;if(this.inputEl){this.inputEl.setFocus()}}debounceAriaLiveUpdate(){clearTimeout(this.debounceAriaLive);this.debounceAriaLive=window.setTimeout((()=>{this.updateSearchResultAriaLive()}),500)}render(){const{inputId:t,name:i,label:a,required:h,size:r,placeholder:o,helperText:l,disabled:f,value:p,readonly:m,spellcheck:v,fullWidth:g,options:w,open:x,hideLabel:y,menuId:k,ariaActiveDescendant:L,truncateValue:z,autofocus:C,autocapitalize:B,autocomplete:T,filteredOptions:H,theme:M}=this;const S=m||f;const O=c(t,l!=="",false).trim();let $;if(O!==""&&this.hasOptionsOrFilterDisabled()){$=`${O} ${this.inputId}-assistive-hint`}else if(this.hasOptionsOrFilterDisabled()){$=`${this.inputId}-assistive-hint`}else if(O!==""){$=O}else{$=undefined}const D=!!p&&this.hasOptionsOrFilterDisabled();const F=D&&x&&H.length>0;const E=F&&p.length>=this.charactersUntilSuggestion;const I=n(p,w,this.valueField,this.labelField);d(true,this.el,i,p,S);return s(e,{class:{["ic-search-bar-search"]:true,["ic-search-bar-full-width"]:g,["ic-search-bar-disabled"]:f,["ic-search-bar-small"]:r==="small",[`ic-theme-${M}`]:M!=="inherit"},onFocus:this.handleHostFocus,onBlur:this.handleHostBlur},s("ic-text-field",{ref:t=>this.inputEl=t,inputId:t,label:a,helperText:l,required:h,disabled:S&&!m,readonly:m,size:r,hideLabel:y,fullWidth:g,name:i,truncateValue:z,value:w&&!!I?I:p,placeholder:o,onInput:this.onInput,onBlur:this.onInputBlur,onFocus:this.onInputFocus,"aria-label":y?a:"","aria-describedby":$,"aria-owns":E?k:undefined,"aria-controls":E?k:undefined,"aria-haspopup":w.length>0?"listbox":undefined,ariaExpanded:w.length>0?`${F}`:undefined,ariaActiveDescendant:L,"aria-autocomplete":D?"list":undefined,role:w.length>0?"combobox":undefined,autocomplete:T,autocapitalize:B,autofocus:C,spellcheck:v,inputmode:"search",debounce:this.debounce},s("div",{class:{"clear-button-container":true,"clear-button-visible":p&&!S&&this.showClearButton},slot:"clear-button"},s("ic-button",{id:"clear-button",class:{"clear-button":true,"clear-button-unfocused":!this.clearButtonFocused},"aria-label":"Clear",innerHTML:u,onClick:this.handleClear,onMouseDown:this.handleMouseDown,size:r,onFocus:this.handleFocusClearButton,onBlur:this.handleClearBlur,onKeyDown:this.handleClear,type:"submit",variant:"icon",theme:this.clearButtonFocused?"light":"dark"}),s("div",{class:"divider"})),s("div",{class:{"search-submit-button-container":true,"search-submit-button-disabled":this.isSubmitDisabled()},slot:"search-submit-button"},s("ic-button",{id:"search-submit-button","aria-label":"Search",ref:t=>this.searchSubmitButton=t,class:{["search-submit-button"]:true,["search-submit-button-small"]:r==="small",["search-submit-button-unfocused"]:!this.searchSubmitFocused,["search-submit-button-disabled"]:this.isSubmitDisabled()},disabled:this.isSubmitDisabled(),innerHTML:b,size:r,onClick:this.handleSubmitSearch,onMouseDown:this.handleMouseDown,onBlur:this.handleSubmitSearchBlur,onFocus:this.handleSubmitSearchFocus,onKeyDown:this.handleSubmitSearchKeyDown,type:"submit",variant:"icon",theme:this.searchSubmitFocused?"light":"dark"})),s("div",{class:{"menu-container":true,fullwidth:g},slot:"menu"},E&&s("ic-menu",{class:{"no-results":this.hadNoOptions()||H.length===1&&(H[0][this.labelField]===this.loadingLabel||H[0][this.labelField]===this.loadingErrorLabel)},activationType:"manual",anchorEl:this.anchorEl,autofocusOnSelected:false,searchMode:this.searchMode,inputEl:this.inputEl,inputLabel:a,ref:t=>this.menu=t,fullWidth:g,menuId:k,open:!!E,options:H,onMenuOptionSelect:this.handleOptionSelect,onMenuStateChange:this.handleMenuChange,onMenuOptionId:this.handleMenuOptionHighlight,onRetryButtonClicked:this.handleRetry,parentEl:this.el,value:p,labelField:this.labelField,valueField:this.valueField}))),s("div",{"aria-live":"polite",role:"status",class:"search-results-status"}))}static get delegatesFocus(){return true}get el(){return a(this)}static get watchers(){return{disabled:["watchDisabledHandler"],loading:["loadingHandler"],filteredOptions:["filteredOptionsHandler"],options:["watchOptionsHandler"],value:["watchValueHandler"]}}};m.style=f;export{m as ic_search_bar};
2
- //# sourceMappingURL=p-59800237.entry.js.map