@ukic/canary-web-components 2.0.0-canary.7 → 2.0.0-canary.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (361) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/helpers-93c5fc92.js +198 -0
  3. package/dist/cjs/helpers-93c5fc92.js.map +1 -0
  4. package/dist/cjs/{helpers-00b08718.js → helpers-b525d45a.js} +2 -2
  5. package/dist/cjs/helpers-b525d45a.js.map +1 -0
  6. package/dist/cjs/ic-accordion-group.cjs.entry.js +6 -2
  7. package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
  8. package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
  9. package/dist/cjs/ic-alert.cjs.entry.js +1 -1
  10. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  11. package/dist/cjs/ic-badge.cjs.entry.js +4 -3
  12. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  13. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  14. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  15. package/dist/cjs/ic-button_3.cjs.entry.js +23 -12
  16. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  17. package/dist/cjs/ic-card.cjs.entry.js +5 -6
  18. package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
  20. package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
  21. package/dist/cjs/ic-chip.cjs.entry.js +1 -1
  22. package/dist/cjs/ic-data-entity.cjs.entry.js +3 -6
  23. package/dist/cjs/ic-data-entity.cjs.entry.js.map +1 -1
  24. package/dist/cjs/ic-data-row.cjs.entry.js +21 -35
  25. package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
  26. package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
  27. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  28. package/dist/cjs/ic-empty-state.cjs.entry.js +1 -1
  29. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  30. package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
  31. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  32. package/dist/cjs/ic-hero.cjs.entry.js +1 -1
  33. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
  34. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +12 -10
  35. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  36. package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
  37. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  38. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  39. package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
  40. package/dist/cjs/ic-menu-with-multi.cjs.entry.js +2599 -0
  41. package/dist/cjs/ic-menu-with-multi.cjs.entry.js.map +1 -0
  42. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  43. package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
  44. package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
  45. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  46. package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
  47. package/dist/cjs/ic-pagination-bar.cjs.entry.js +2 -18
  48. package/dist/cjs/ic-pagination-bar.cjs.entry.js.map +1 -1
  49. package/dist/cjs/ic-pagination_4.cjs.entry.js +21 -13
  50. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  51. package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
  52. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  53. package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
  54. package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
  55. package/dist/cjs/ic-search-bar.cjs.entry.js +1 -1
  56. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  57. package/dist/cjs/ic-select-with-multi.cjs.entry.js +837 -0
  58. package/dist/cjs/ic-select-with-multi.cjs.entry.js.map +1 -0
  59. package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
  60. package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
  61. package/dist/cjs/ic-step.cjs.entry.js +1 -1
  62. package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
  63. package/dist/cjs/ic-switch.cjs.entry.js +1 -1
  64. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  65. package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
  66. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  67. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  68. package/dist/cjs/ic-toast.cjs.entry.js +1 -1
  69. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +184 -0
  70. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -0
  71. package/dist/cjs/ic-toggle-button.cjs.entry.js +6 -3
  72. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  73. package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
  74. package/dist/cjs/ic-typography.cjs.entry.js +1 -1
  75. package/dist/cjs/index-4cf27b16.js +12 -0
  76. package/dist/cjs/loader.cjs.js +1 -1
  77. package/dist/collection/collection-manifest.json +4 -1
  78. package/dist/collection/components/ic-menu-with-multi/ic-menu.css +701 -0
  79. package/dist/collection/components/ic-menu-with-multi/ic-menu.js +1458 -0
  80. package/dist/collection/components/ic-menu-with-multi/ic-menu.js.map +1 -0
  81. package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js +880 -0
  82. package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js.map +1 -0
  83. package/dist/collection/components/ic-select-with-multi/assets/Check.svg +3 -0
  84. package/dist/collection/components/ic-select-with-multi/assets/Clear.svg +3 -0
  85. package/dist/collection/components/ic-select-with-multi/assets/Expand.svg +3 -0
  86. package/dist/collection/components/ic-select-with-multi/ic-select.css +693 -0
  87. package/dist/collection/components/ic-select-with-multi/ic-select.js +1649 -0
  88. package/dist/collection/components/ic-select-with-multi/ic-select.js.map +1 -0
  89. package/dist/collection/components/ic-select-with-multi/story-data.js +216 -0
  90. package/dist/collection/components/ic-select-with-multi/story-data.js.map +1 -0
  91. package/dist/collection/components/ic-select-with-multi/test/a11y/ic-select.test.a11y.js +146 -0
  92. package/dist/collection/components/ic-select-with-multi/test/a11y/ic-select.test.a11y.js.map +1 -0
  93. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.e2e.js +2040 -0
  94. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.e2e.js.map +1 -0
  95. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js +1518 -0
  96. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js.map +1 -0
  97. package/dist/collection/utils/constants.js +28 -0
  98. package/dist/collection/utils/constants.js.map +1 -0
  99. package/dist/collection/utils/helpers.js +168 -5
  100. package/dist/collection/utils/helpers.js.map +1 -1
  101. package/dist/collection/utils/types.js +13 -0
  102. package/dist/collection/utils/types.js.map +1 -0
  103. package/dist/components/helpers.js +1 -1
  104. package/dist/components/helpers.js.map +1 -1
  105. package/dist/components/helpers2.js +183 -0
  106. package/dist/components/helpers2.js.map +1 -0
  107. package/dist/components/ic-accordion-group.js +7 -2
  108. package/dist/components/ic-accordion-group.js.map +1 -1
  109. package/dist/components/ic-badge.js +3 -2
  110. package/dist/components/ic-badge.js.map +1 -1
  111. package/dist/components/ic-button2.js +22 -11
  112. package/dist/components/ic-button2.js.map +1 -1
  113. package/dist/components/ic-card.js +5 -18
  114. package/dist/components/ic-card.js.map +1 -1
  115. package/dist/components/ic-data-entity.js +3 -6
  116. package/dist/components/ic-data-entity.js.map +1 -1
  117. package/dist/components/ic-data-row.js +20 -34
  118. package/dist/components/ic-data-row.js.map +1 -1
  119. package/dist/components/ic-input-component-container2.js +6 -5
  120. package/dist/components/ic-input-component-container2.js.map +1 -1
  121. package/dist/components/ic-menu-with-multi.d.ts +11 -0
  122. package/dist/components/ic-menu-with-multi.js +8 -0
  123. package/dist/components/ic-menu-with-multi.js.map +1 -0
  124. package/dist/components/ic-menu2.js +5 -4
  125. package/dist/components/ic-menu2.js.map +1 -1
  126. package/dist/components/ic-menu3.js +2665 -0
  127. package/dist/components/ic-menu3.js.map +1 -0
  128. package/dist/components/ic-pagination-bar2.js +1 -17
  129. package/dist/components/ic-pagination-bar2.js.map +1 -1
  130. package/dist/components/ic-popover-menu.js +1 -1
  131. package/dist/components/ic-popover-menu.js.map +1 -1
  132. package/dist/components/ic-search-bar.js.map +1 -1
  133. package/dist/components/ic-select-with-multi.d.ts +11 -0
  134. package/dist/components/ic-select-with-multi.js +962 -0
  135. package/dist/components/ic-select-with-multi.js.map +1 -0
  136. package/dist/components/ic-select2.js +22 -13
  137. package/dist/components/ic-select2.js.map +1 -1
  138. package/dist/components/ic-toggle-button-group.js +210 -0
  139. package/dist/components/ic-toggle-button-group.js.map +1 -0
  140. package/dist/components/ic-toggle-button.js +5 -2
  141. package/dist/components/ic-toggle-button.js.map +1 -1
  142. package/dist/core/core.css +8 -5
  143. package/dist/core/core.esm.js +1 -1
  144. package/dist/core/core.esm.js.map +1 -1
  145. package/dist/core/{p-9ce5f082.entry.js → p-045359e1.entry.js} +2 -2
  146. package/dist/core/{p-7276339a.entry.js → p-10fb4c46.entry.js} +2 -2
  147. package/dist/core/{p-d9342548.entry.js → p-169bfa51.entry.js} +2 -2
  148. package/dist/core/{p-5746577f.entry.js → p-1ca332ca.entry.js} +2 -2
  149. package/dist/core/{p-c345a874.entry.js → p-204ace96.entry.js} +2 -2
  150. package/dist/core/p-21150122.entry.js +2 -0
  151. package/dist/core/p-21150122.entry.js.map +1 -0
  152. package/dist/core/{p-f436630b.entry.js → p-2eac7dcc.entry.js} +2 -2
  153. package/dist/core/{p-b43bd4f3.entry.js → p-3803a5b5.entry.js} +2 -2
  154. package/dist/core/{p-24945ee5.entry.js → p-452985d9.entry.js} +2 -2
  155. package/dist/core/p-452985d9.entry.js.map +1 -0
  156. package/dist/core/{p-ca262cdc.entry.js → p-4753bac8.entry.js} +2 -2
  157. package/dist/core/{p-3d2fcf84.entry.js → p-4baa0916.entry.js} +2 -2
  158. package/dist/core/{p-79b71c18.entry.js → p-4f413fc0.entry.js} +2 -2
  159. package/dist/core/{p-051b8266.entry.js → p-595be57d.entry.js} +2 -2
  160. package/dist/core/{p-434780c8.entry.js → p-5ae93c16.entry.js} +2 -2
  161. package/dist/core/{p-ff1d23cd.entry.js → p-5e0c830b.entry.js} +2 -2
  162. package/dist/core/p-624d4f5f.entry.js +2 -0
  163. package/dist/core/p-624d4f5f.entry.js.map +1 -0
  164. package/dist/core/{p-c263542a.entry.js → p-6933f8e9.entry.js} +2 -2
  165. package/dist/core/{p-32f18701.entry.js → p-6c3044b6.entry.js} +2 -2
  166. package/dist/core/{p-da4f0a58.entry.js → p-73be1251.entry.js} +2 -2
  167. package/dist/core/{p-d49660e0.entry.js → p-75dac3d1.entry.js} +2 -2
  168. package/dist/core/{p-a3ab9f4c.entry.js → p-76915584.entry.js} +2 -2
  169. package/dist/core/p-76915584.entry.js.map +1 -0
  170. package/dist/core/{p-88971cea.entry.js → p-7ef8d616.entry.js} +2 -2
  171. package/dist/core/{p-9fd84c69.entry.js → p-81ddc39d.entry.js} +2 -2
  172. package/dist/core/{p-fbb1fba0.entry.js → p-869954a2.entry.js} +2 -2
  173. package/dist/core/{p-3c859b9e.entry.js → p-88d54b72.entry.js} +2 -2
  174. package/dist/core/{p-5e94fae8.entry.js → p-8b08d8fe.entry.js} +2 -2
  175. package/dist/core/p-8b08d8fe.entry.js.map +1 -0
  176. package/dist/core/{p-d78fd9f3.entry.js → p-917c5721.entry.js} +2 -2
  177. package/dist/core/{p-2094c844.entry.js → p-942282cd.entry.js} +2 -2
  178. package/dist/core/p-99cad6c2.js +2 -0
  179. package/dist/core/p-99cad6c2.js.map +1 -0
  180. package/dist/core/p-9caf19eb.js +2 -0
  181. package/dist/core/p-9caf19eb.js.map +1 -0
  182. package/dist/core/{p-966ab920.entry.js → p-a0f8efb2.entry.js} +2 -2
  183. package/dist/core/{p-7632acc6.entry.js → p-a31031a5.entry.js} +2 -2
  184. package/dist/core/{p-a7d52bd1.entry.js → p-a434c3d4.entry.js} +2 -2
  185. package/dist/core/{p-95d3cd52.entry.js → p-a43c12cd.entry.js} +2 -2
  186. package/dist/core/{p-aafb2c79.entry.js → p-a50c3b9e.entry.js} +2 -2
  187. package/dist/core/{p-28fb7cca.entry.js → p-ab09986c.entry.js} +2 -2
  188. package/dist/core/p-ab09986c.entry.js.map +1 -0
  189. package/dist/core/p-ac4e40a7.entry.js +2 -0
  190. package/dist/core/p-ac4e40a7.entry.js.map +1 -0
  191. package/dist/core/{p-7dfd61bb.entry.js → p-b82dcc29.entry.js} +2 -2
  192. package/dist/core/{p-337b6e05.entry.js → p-ba86928c.entry.js} +2 -2
  193. package/dist/core/{p-f827e4c0.entry.js → p-c125b65a.entry.js} +2 -2
  194. package/dist/core/{p-27aa95e7.entry.js → p-c34848da.entry.js} +2 -2
  195. package/dist/core/{p-3b9f3a07.entry.js → p-d8469ac0.entry.js} +2 -2
  196. package/dist/core/{p-a2f366c7.entry.js → p-db9c03c0.entry.js} +2 -2
  197. package/dist/core/{p-6de46cb7.entry.js → p-e0462b23.entry.js} +2 -2
  198. package/dist/core/p-e0462b23.entry.js.map +1 -0
  199. package/dist/core/p-e0a94f2d.entry.js +2 -0
  200. package/dist/core/p-e0a94f2d.entry.js.map +1 -0
  201. package/dist/core/{p-116b18fe.entry.js → p-e3997d60.entry.js} +2 -2
  202. package/dist/core/p-e79e0292.entry.js +2 -0
  203. package/dist/core/p-e79e0292.entry.js.map +1 -0
  204. package/dist/core/{p-0d181ac8.entry.js → p-e834344e.entry.js} +2 -2
  205. package/dist/core/p-f14454b1.entry.js +2 -0
  206. package/dist/core/{p-93c5b849.entry.js.map → p-f14454b1.entry.js.map} +1 -1
  207. package/dist/core/{p-a162744e.entry.js → p-f3c840cd.entry.js} +2 -2
  208. package/dist/core/{p-a162744e.entry.js.map → p-f3c840cd.entry.js.map} +1 -1
  209. package/dist/core/{p-7b849cb5.entry.js → p-f6888309.entry.js} +2 -2
  210. package/dist/core/p-f74a8752.entry.js +2 -0
  211. package/dist/core/p-f74a8752.entry.js.map +1 -0
  212. package/dist/core/{p-4df42c76.entry.js → p-f7a14c01.entry.js} +2 -2
  213. package/dist/core/{p-d5cc084b.entry.js → p-f843da01.entry.js} +2 -2
  214. package/dist/core/{p-d5cc084b.entry.js.map → p-f843da01.entry.js.map} +1 -1
  215. package/dist/core/{p-0f0509ee.entry.js → p-fc5611e2.entry.js} +2 -2
  216. package/dist/core/p-fc5611e2.entry.js.map +1 -0
  217. package/dist/core/p-fde45b29.entry.js +2 -0
  218. package/dist/core/p-fde45b29.entry.js.map +1 -0
  219. package/dist/esm/core.js +1 -1
  220. package/dist/esm/{helpers-d06dc4ed.js → helpers-12b4266a.js} +2 -2
  221. package/dist/esm/helpers-12b4266a.js.map +1 -0
  222. package/dist/esm/helpers-5271897c.js +183 -0
  223. package/dist/esm/helpers-5271897c.js.map +1 -0
  224. package/dist/esm/ic-accordion-group.entry.js +6 -2
  225. package/dist/esm/ic-accordion-group.entry.js.map +1 -1
  226. package/dist/esm/ic-accordion.entry.js +1 -1
  227. package/dist/esm/ic-alert.entry.js +1 -1
  228. package/dist/esm/ic-back-to-top.entry.js +1 -1
  229. package/dist/esm/ic-badge.entry.js +4 -3
  230. package/dist/esm/ic-badge.entry.js.map +1 -1
  231. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  232. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  233. package/dist/esm/ic-button_3.entry.js +23 -12
  234. package/dist/esm/ic-button_3.entry.js.map +1 -1
  235. package/dist/esm/ic-card.entry.js +5 -6
  236. package/dist/esm/ic-card.entry.js.map +1 -1
  237. package/dist/esm/ic-checkbox-group.entry.js +1 -1
  238. package/dist/esm/ic-checkbox.entry.js +1 -1
  239. package/dist/esm/ic-chip.entry.js +1 -1
  240. package/dist/esm/ic-data-entity.entry.js +3 -6
  241. package/dist/esm/ic-data-entity.entry.js.map +1 -1
  242. package/dist/esm/ic-data-row.entry.js +21 -35
  243. package/dist/esm/ic-data-row.entry.js.map +1 -1
  244. package/dist/esm/ic-dialog.entry.js +1 -1
  245. package/dist/esm/ic-divider.entry.js +1 -1
  246. package/dist/esm/ic-empty-state.entry.js +1 -1
  247. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  248. package/dist/esm/ic-footer-link.entry.js +1 -1
  249. package/dist/esm/ic-footer.entry.js +1 -1
  250. package/dist/esm/ic-hero.entry.js +1 -1
  251. package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
  252. package/dist/esm/ic-input-component-container_3.entry.js +12 -10
  253. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  254. package/dist/esm/ic-input-label_2.entry.js +1 -1
  255. package/dist/esm/ic-link.entry.js +1 -1
  256. package/dist/esm/ic-menu-group.entry.js +1 -1
  257. package/dist/esm/ic-menu-item.entry.js +1 -1
  258. package/dist/esm/ic-menu-with-multi.entry.js +2595 -0
  259. package/dist/esm/ic-menu-with-multi.entry.js.map +1 -0
  260. package/dist/esm/ic-navigation-button.entry.js +1 -1
  261. package/dist/esm/ic-navigation-group.entry.js +1 -1
  262. package/dist/esm/ic-navigation-item.entry.js +1 -1
  263. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  264. package/dist/esm/ic-page-header.entry.js +1 -1
  265. package/dist/esm/ic-pagination-bar.entry.js +1 -17
  266. package/dist/esm/ic-pagination-bar.entry.js.map +1 -1
  267. package/dist/esm/ic-pagination_4.entry.js +21 -13
  268. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  269. package/dist/esm/ic-popover-menu.entry.js +1 -1
  270. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  271. package/dist/esm/ic-radio-group.entry.js +1 -1
  272. package/dist/esm/ic-radio-option.entry.js +1 -1
  273. package/dist/esm/ic-search-bar.entry.js +1 -1
  274. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  275. package/dist/esm/ic-select-with-multi.entry.js +833 -0
  276. package/dist/esm/ic-select-with-multi.entry.js.map +1 -0
  277. package/dist/esm/ic-side-navigation.entry.js +1 -1
  278. package/dist/esm/ic-status-tag.entry.js +1 -1
  279. package/dist/esm/ic-step.entry.js +1 -1
  280. package/dist/esm/ic-stepper.entry.js +1 -1
  281. package/dist/esm/ic-switch.entry.js +1 -1
  282. package/dist/esm/ic-tab-group.entry.js +1 -1
  283. package/dist/esm/ic-tab-panel.entry.js +1 -1
  284. package/dist/esm/ic-tab.entry.js +1 -1
  285. package/dist/esm/ic-theme.entry.js +1 -1
  286. package/dist/esm/ic-toast.entry.js +1 -1
  287. package/dist/esm/ic-toggle-button-group.entry.js +180 -0
  288. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -0
  289. package/dist/esm/ic-toggle-button.entry.js +6 -3
  290. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  291. package/dist/esm/ic-top-navigation.entry.js +1 -1
  292. package/dist/esm/ic-typography.entry.js +1 -1
  293. package/dist/esm/index-93509377.js +12 -0
  294. package/dist/esm/loader.js +1 -1
  295. package/dist/types/components/ic-menu-with-multi/ic-menu.d.ts +208 -0
  296. package/dist/types/components/ic-select-with-multi/ic-select.d.ts +289 -0
  297. package/dist/types/components/ic-select-with-multi/story-data.d.ts +32 -0
  298. package/dist/types/components/ic-select-with-multi/test/a11y/ic-select.test.a11y.d.ts +1 -0
  299. package/dist/types/components.d.ts +531 -0
  300. package/dist/types/utils/constants.d.ts +1 -0
  301. package/dist/types/utils/helpers.d.ts +61 -2
  302. package/dist/types/utils/types.d.ts +16 -0
  303. package/hydrate/index.js +6795 -2907
  304. package/package.json +3 -3
  305. package/dist/cjs/helpers-00b08718.js.map +0 -1
  306. package/dist/core/p-0f0509ee.entry.js.map +0 -1
  307. package/dist/core/p-24945ee5.entry.js.map +0 -1
  308. package/dist/core/p-28fb7cca.entry.js.map +0 -1
  309. package/dist/core/p-2aad58b6.js +0 -2
  310. package/dist/core/p-2aad58b6.js.map +0 -1
  311. package/dist/core/p-38314d45.entry.js +0 -2
  312. package/dist/core/p-38314d45.entry.js.map +0 -1
  313. package/dist/core/p-5e94fae8.entry.js.map +0 -1
  314. package/dist/core/p-6de46cb7.entry.js.map +0 -1
  315. package/dist/core/p-93c5b849.entry.js +0 -2
  316. package/dist/core/p-9fdd7d73.entry.js +0 -2
  317. package/dist/core/p-9fdd7d73.entry.js.map +0 -1
  318. package/dist/core/p-a3ab9f4c.entry.js.map +0 -1
  319. package/dist/core/p-c9b11488.entry.js +0 -2
  320. package/dist/core/p-c9b11488.entry.js.map +0 -1
  321. package/dist/core/p-f163a406.entry.js +0 -2
  322. package/dist/core/p-f163a406.entry.js.map +0 -1
  323. package/dist/esm/helpers-d06dc4ed.js.map +0 -1
  324. /package/dist/core/{p-9ce5f082.entry.js.map → p-045359e1.entry.js.map} +0 -0
  325. /package/dist/core/{p-7276339a.entry.js.map → p-10fb4c46.entry.js.map} +0 -0
  326. /package/dist/core/{p-d9342548.entry.js.map → p-169bfa51.entry.js.map} +0 -0
  327. /package/dist/core/{p-5746577f.entry.js.map → p-1ca332ca.entry.js.map} +0 -0
  328. /package/dist/core/{p-c345a874.entry.js.map → p-204ace96.entry.js.map} +0 -0
  329. /package/dist/core/{p-f436630b.entry.js.map → p-2eac7dcc.entry.js.map} +0 -0
  330. /package/dist/core/{p-b43bd4f3.entry.js.map → p-3803a5b5.entry.js.map} +0 -0
  331. /package/dist/core/{p-ca262cdc.entry.js.map → p-4753bac8.entry.js.map} +0 -0
  332. /package/dist/core/{p-3d2fcf84.entry.js.map → p-4baa0916.entry.js.map} +0 -0
  333. /package/dist/core/{p-79b71c18.entry.js.map → p-4f413fc0.entry.js.map} +0 -0
  334. /package/dist/core/{p-051b8266.entry.js.map → p-595be57d.entry.js.map} +0 -0
  335. /package/dist/core/{p-434780c8.entry.js.map → p-5ae93c16.entry.js.map} +0 -0
  336. /package/dist/core/{p-ff1d23cd.entry.js.map → p-5e0c830b.entry.js.map} +0 -0
  337. /package/dist/core/{p-c263542a.entry.js.map → p-6933f8e9.entry.js.map} +0 -0
  338. /package/dist/core/{p-32f18701.entry.js.map → p-6c3044b6.entry.js.map} +0 -0
  339. /package/dist/core/{p-da4f0a58.entry.js.map → p-73be1251.entry.js.map} +0 -0
  340. /package/dist/core/{p-d49660e0.entry.js.map → p-75dac3d1.entry.js.map} +0 -0
  341. /package/dist/core/{p-88971cea.entry.js.map → p-7ef8d616.entry.js.map} +0 -0
  342. /package/dist/core/{p-9fd84c69.entry.js.map → p-81ddc39d.entry.js.map} +0 -0
  343. /package/dist/core/{p-fbb1fba0.entry.js.map → p-869954a2.entry.js.map} +0 -0
  344. /package/dist/core/{p-3c859b9e.entry.js.map → p-88d54b72.entry.js.map} +0 -0
  345. /package/dist/core/{p-d78fd9f3.entry.js.map → p-917c5721.entry.js.map} +0 -0
  346. /package/dist/core/{p-2094c844.entry.js.map → p-942282cd.entry.js.map} +0 -0
  347. /package/dist/core/{p-966ab920.entry.js.map → p-a0f8efb2.entry.js.map} +0 -0
  348. /package/dist/core/{p-7632acc6.entry.js.map → p-a31031a5.entry.js.map} +0 -0
  349. /package/dist/core/{p-a7d52bd1.entry.js.map → p-a434c3d4.entry.js.map} +0 -0
  350. /package/dist/core/{p-95d3cd52.entry.js.map → p-a43c12cd.entry.js.map} +0 -0
  351. /package/dist/core/{p-aafb2c79.entry.js.map → p-a50c3b9e.entry.js.map} +0 -0
  352. /package/dist/core/{p-7dfd61bb.entry.js.map → p-b82dcc29.entry.js.map} +0 -0
  353. /package/dist/core/{p-337b6e05.entry.js.map → p-ba86928c.entry.js.map} +0 -0
  354. /package/dist/core/{p-f827e4c0.entry.js.map → p-c125b65a.entry.js.map} +0 -0
  355. /package/dist/core/{p-27aa95e7.entry.js.map → p-c34848da.entry.js.map} +0 -0
  356. /package/dist/core/{p-3b9f3a07.entry.js.map → p-d8469ac0.entry.js.map} +0 -0
  357. /package/dist/core/{p-a2f366c7.entry.js.map → p-db9c03c0.entry.js.map} +0 -0
  358. /package/dist/core/{p-116b18fe.entry.js.map → p-e3997d60.entry.js.map} +0 -0
  359. /package/dist/core/{p-0d181ac8.entry.js.map → p-e834344e.entry.js.map} +0 -0
  360. /package/dist/core/{p-7b849cb5.entry.js.map → p-f6888309.entry.js.map} +0 -0
  361. /package/dist/core/{p-4df42c76.entry.js.map → p-f7a14c01.entry.js.map} +0 -0
@@ -0,0 +1,837 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-4cf27b16.js');
6
+ const helpers = require('./helpers-93c5fc92.js');
7
+
8
+ // Global ARIA attributes
9
+ const IC_INHERITED_ARIA = [
10
+ "aria-atomic",
11
+ "aria-autocomplete",
12
+ "aria-busy",
13
+ "aria-controls",
14
+ "aria-current",
15
+ "aria-describedby",
16
+ "aria-description",
17
+ "aria-details",
18
+ "aria-disabled",
19
+ "aria-dropeffect",
20
+ "aria-errormessage",
21
+ "aria-expanded",
22
+ "aria-flowto",
23
+ "aria-grabbed",
24
+ "aria-haspopup",
25
+ "aria-hidden",
26
+ "aria-invalid",
27
+ "aria-keyshortcuts",
28
+ "aria-label",
29
+ "aria-labelledby",
30
+ "aria-live",
31
+ "aria-owns",
32
+ "aria-relevant",
33
+ "aria-roledescription",
34
+ ];
35
+
36
+ var IcInformationStatus;
37
+ (function (IcInformationStatus) {
38
+ IcInformationStatus["Warning"] = "warning";
39
+ IcInformationStatus["Error"] = "error";
40
+ IcInformationStatus["Success"] = "success";
41
+ })(IcInformationStatus || (IcInformationStatus = {}));
42
+ var IcThemeForegroundEnum;
43
+ (function (IcThemeForegroundEnum) {
44
+ IcThemeForegroundEnum["Default"] = "default";
45
+ IcThemeForegroundEnum["Dark"] = "dark";
46
+ IcThemeForegroundEnum["Light"] = "light";
47
+ })(IcThemeForegroundEnum || (IcThemeForegroundEnum = {}));
48
+
49
+ const Expand = `<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
50
+ <path d="M7 9.5L12 14.5L17 9.5H7Z" fill="currentColor" />
51
+ </svg>
52
+ `;
53
+
54
+ const Clear = `<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
55
+ <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" />
56
+ </svg>
57
+ `;
58
+
59
+ const icSelectCss = "/*! 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;--menu-max-height:100px}:host(.full-width){width:100%}ic-input-component-container:hover{--border-color:var(--ic-action-dark-hover)}ic-input-component-container:active{--border-color:var(--ic-action-dark-active);color:var(--ic-action-dark-active)}ic-input-component-container.menu-open{--border-color:var(--ic-architectural-400);color:var(--ic-action-dark)}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-architectural-white);color:var(--ic-color-primary-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:url(\"data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>\")}select option,.select-option-selected{color:var(--ic-color-primary-text)}select:disabled{color:var(--ic-architectural-200);background-image:url(\"data:image/svg+xml;utf8,<svg fill='grey' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>\")}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}.select-input:focus{outline:var(--ic-hc-focus-outline)}:host(:not(.disabled)) ic-input-component-container:hover .select-input{background-color:var(--ic-architectural-white)}.select-input[disabled]{pointer-events:none}:host(.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}.value-text.with-clear-button{padding-right:calc(var(--ic-space-xl) + var(--ic-space-xs))}.value-text p{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin-bottom:0 !important}.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-action-dark)}.expand-icon>svg{display:inline-block;width:var(--ic-space-lg);height:var(--ic-space-lg)}:host(.disabled) .expand-icon,:host(.disabled) .expand-icon>svg>path{color:var(--ic-architectural-200)}:host(.searchable) .expand-icon{padding-left:0;height:2.25rem}:host(.searchable) .expand-icon>svg{height:2.25rem;padding:0 0.375rem}:host(.searchable:not(.disabled)) .expand-icon>svg{cursor:pointer}.expand-icon-open{color:var(--ic-action-dark)}.expand-icon-open,:host(.searchable) .expand-icon-open{transform:rotateX(180deg)}:host(.disabled) .value-text,.placeholder{color:var(--ic-color-tertiary-text)}.select-input-end{display:flex;align-items:center}.clear-button-container{display:flex}.divider{width:var(--ic-space-1px);background-color:var(--ic-architectural-400);margin:var(--ic-space-xxs) 0;border-radius:var(--ic-space-1px);height:var(--ic-space-lg)}:host(.small) .divider{height:var(--ic-space-md)}:host(.large) .divider{height:var(--ic-space-xl)}.clear-button{position:absolute;right:calc(var(--ic-space-xl) + var(--ic-space-xxs));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-focus-blue);box-shadow:inset 0 0 0 0.125rem var(--ic-focus-glow);border-radius:0.25rem}.clear-button:focus *{fill:white}.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)}";
60
+
61
+ let inputIds = 0;
62
+ const Select = class {
63
+ constructor(hostRef) {
64
+ index.registerInstance(this, hostRef);
65
+ this.icBlur = index.createEvent(this, "icBlur", 7);
66
+ this.icChange = index.createEvent(this, "icChange", 7);
67
+ this.icClear = index.createEvent(this, "icClear", 7);
68
+ this.icFocus = index.createEvent(this, "icFocus", 7);
69
+ this.icInput = index.createEvent(this, "icInput", 7);
70
+ this.icOptionSelect = index.createEvent(this, "icOptionSelect", 7);
71
+ this.icOptionDeselect = index.createEvent(this, "icOptionDeselect", 7);
72
+ this.icRetryLoad = index.createEvent(this, "icRetryLoad", 7);
73
+ this.hasSetDefaultValue = false;
74
+ this.inheritedAttributes = {};
75
+ this.initialOptionsEmpty = false;
76
+ this.inputId = `ic-select-input-${inputIds++}`;
77
+ this.menuId = `${this.inputId}-menu`;
78
+ this.searchableMenuItemSelected = false;
79
+ this.ungroupedOptions = [];
80
+ this.handleRetry = (ev) => {
81
+ var _a;
82
+ if (ev.detail.keyPressed)
83
+ (_a = this.searchableSelectElement) === null || _a === void 0 ? void 0 : _a.focus();
84
+ this.blurredBecauseButtonPressed = true;
85
+ this.retryButtonClick = true;
86
+ this.hasSetDefaultValue = true;
87
+ this.icRetryLoad.emit({ value: this.hiddenInputValue });
88
+ };
89
+ this.emitIcChange = (value) => {
90
+ if (!this.searchable) {
91
+ // If "Select all" button clicked, replace value with new value (array of all option values)
92
+ if (this.multiple && !Array.isArray(value) && value !== null) {
93
+ this.handleMultipleSelectChange(value);
94
+ }
95
+ else {
96
+ this.value = value;
97
+ }
98
+ }
99
+ clearTimeout(this.debounceIcChange);
100
+ this.debounceIcChange = window.setTimeout(() => {
101
+ const valueToEmit = this.multiple ? this.value : value;
102
+ this.icChange.emit({ value: valueToEmit });
103
+ }, this.currDebounce);
104
+ };
105
+ this.emitImmediateIcChange = (value) => {
106
+ this.value = value;
107
+ clearTimeout(this.debounceIcChange);
108
+ this.icChange.emit({ value });
109
+ };
110
+ /**
111
+ * Processes the provided array of IcMenuOptions, removing duplicates and reporting them with a console.warn
112
+ * @param options array of IcMenuOptions
113
+ * @returns a new options object, with all entries possessing a duplicate 'value' field removed
114
+ */
115
+ this.deduplicateOptions = (options) => {
116
+ const uniqueValues = [];
117
+ const dedupedOptions = [];
118
+ let dedupedChildren;
119
+ options.forEach((option) => {
120
+ if (option.children) {
121
+ //If an option has children, we will loop through them
122
+ dedupedChildren = [];
123
+ option.children.forEach((child) => {
124
+ if (uniqueValues.includes(child.value)) {
125
+ console.warn(`ic-select with label ${this.label} was populated with duplicate option (value: ${child.value}) which has been removed.`);
126
+ }
127
+ else {
128
+ uniqueValues.push(child.value);
129
+ dedupedChildren.push(child);
130
+ }
131
+ });
132
+ // construct a modified option, inserting the deduplicated children alongside the original information
133
+ const modifiedParent = Object.assign(Object.assign({}, option), { children: dedupedChildren });
134
+ dedupedOptions.push(modifiedParent);
135
+ }
136
+ else {
137
+ // If an option does not have children, assess to see if it's value has been included already
138
+ if (uniqueValues.includes(option.value)) {
139
+ console.warn(`ic-select with label ${this.label} was populated with duplicate option (value: ${option.value}) which has been removed.`);
140
+ }
141
+ else {
142
+ uniqueValues.push(option.value);
143
+ dedupedOptions.push(option);
144
+ }
145
+ }
146
+ });
147
+ return dedupedOptions;
148
+ };
149
+ /**
150
+ * Loop through options array and for all options with no value, infer it from the label
151
+ */
152
+ this.setOptionsValuesFromLabels = () => {
153
+ if (this.options.length > 0 && this.options.map) {
154
+ this.options.map((option) => {
155
+ if (!option.value) {
156
+ option.value = option.label;
157
+ }
158
+ });
159
+ }
160
+ };
161
+ this.setUngroupedOptions = (event) => {
162
+ this.ungroupedOptions = event.detail.options;
163
+ };
164
+ this.setTextColor = () => {
165
+ if (this.nativeSelectElement.selectedIndex === 0) {
166
+ this.nativeSelectElement.className = "placeholder";
167
+ }
168
+ else {
169
+ this.nativeSelectElement.className = "select-option-selected";
170
+ }
171
+ };
172
+ this.setMenuChange = (open) => {
173
+ if (this.open !== open) {
174
+ this.open = open;
175
+ }
176
+ };
177
+ this.getLabelFromValue = (value) => {
178
+ return helpers.getLabelFromValue(value, this.uniqueOptions);
179
+ };
180
+ this.getMultipleOptionsString = (selectedValues) => {
181
+ const selectedLabels = selectedValues === null || selectedValues === void 0 ? void 0 : selectedValues.map((value) => this.getLabelFromValue(value));
182
+ return selectedLabels === null || selectedLabels === void 0 ? void 0 : selectedLabels.join(", ");
183
+ };
184
+ this.getFilteredChildMenuOptions = (option) => {
185
+ let children = option.children;
186
+ if (this.searchable) {
187
+ children = helpers.getFilteredMenuOptions(option.children, this.includeDescriptionsInSearch, this.searchableSelectInputValue, this.searchMatchPosition);
188
+ }
189
+ else {
190
+ children = helpers.getFilteredMenuOptions(option.children, false, this.pressedCharacters, "start");
191
+ }
192
+ const newOption = Object.assign({}, option);
193
+ newOption.children = children;
194
+ return newOption;
195
+ };
196
+ // (For multi-select) get value array, i.e. selected option values, in order they appear in option list
197
+ this.getValueSortedByOptions = (value) => {
198
+ const valueArray = value;
199
+ const valuesFromAllOptions = this.ungroupedOptions.map((option) => option.value);
200
+ valueArray.sort((a, b) => valuesFromAllOptions.indexOf(a) - valuesFromAllOptions.indexOf(b));
201
+ return valueArray;
202
+ };
203
+ this.handleNativeSelectChange = () => {
204
+ this.icOptionSelect.emit({ value: this.nativeSelectElement.value });
205
+ this.emitImmediateIcChange(this.nativeSelectElement.value);
206
+ this.setTextColor();
207
+ };
208
+ // Handle option select for when a custom input box and menu is rendered
209
+ // (rather than native <select> - rendered when viewed on a mobile / tablet screen)
210
+ this.handleCustomSelectChange = (event) => {
211
+ var _a;
212
+ const value = event.detail.value;
213
+ if (this.searchable && event.detail.label === this.emptyOptionListText) {
214
+ this.searchableSelectElement.focus();
215
+ return;
216
+ }
217
+ if (this.searchable) {
218
+ this.value = value;
219
+ this.searchableMenuItemSelected = true;
220
+ // After editing the input, if selecting the same option as before, set the input value to label again
221
+ if (this.value === this.currValue) {
222
+ this.searchableSelectInputValue = this.getLabelFromValue(this.value);
223
+ }
224
+ this.inputValueToFilter = null;
225
+ this.hiddenInputValue = this.getValueFromLabel(this.searchableSelectInputValue);
226
+ }
227
+ if (this.multiple && ((_a = this.value) === null || _a === void 0 ? void 0 : _a.includes(value))) {
228
+ this.icOptionDeselect.emit({ value });
229
+ }
230
+ else {
231
+ this.icOptionSelect.emit({ value });
232
+ }
233
+ this.ariaActiveDescendant = event.detail.optionId;
234
+ this.emitIcChange(value);
235
+ };
236
+ // Update selected options - adds / removes them, in order of option list
237
+ // Create new array if value prop is undefined
238
+ this.handleMultipleSelectChange = (value) => {
239
+ if (this.value) {
240
+ let valueArray = this.value.slice();
241
+ if (this.value.includes(value)) {
242
+ const valueIndex = valueArray.indexOf(value);
243
+ valueArray.splice(valueIndex, 1);
244
+ }
245
+ else {
246
+ valueArray.push(value);
247
+ valueArray = this.getValueSortedByOptions(valueArray);
248
+ }
249
+ this.value = valueArray.length === 0 ? null : valueArray;
250
+ }
251
+ else {
252
+ const valueArray = [];
253
+ valueArray.push(value);
254
+ this.value = valueArray;
255
+ }
256
+ };
257
+ this.handleSelectAllChange = (event) => {
258
+ const selectAllOptions = event.detail.select;
259
+ const allEnabledOptions = this.ungroupedOptions.filter((option) => !option.disabled);
260
+ const allValues = allEnabledOptions.map((option) => option.value);
261
+ let newValue;
262
+ if (selectAllOptions) {
263
+ let unselectedValues;
264
+ // Only emit icOptionSelect for all values that are newly selected
265
+ if (this.value) {
266
+ unselectedValues = allValues.filter((value) => this.value && !this.value.includes(value));
267
+ }
268
+ else {
269
+ unselectedValues = allValues;
270
+ }
271
+ unselectedValues.forEach((value) => this.icOptionSelect.emit({ value }));
272
+ newValue = allValues;
273
+ }
274
+ else {
275
+ // Only emit icOptionDeselect for values that were selected
276
+ this.value.forEach((value) => this.icOptionDeselect.emit({ value }));
277
+ newValue = null;
278
+ }
279
+ this.emitIcChange(newValue);
280
+ };
281
+ this.handleMenuChange = (event) => {
282
+ this.open = event.detail.open;
283
+ this.pressedCharacters = "";
284
+ this.searchable && this.handleFocusIndicatorDisplay();
285
+ };
286
+ // clears the debounce delay when navigating the menu with arrow keys etc
287
+ // to prevent delay in change event, which should only occur when typing in input
288
+ this.handleMenuKeyPress = (ev) => {
289
+ ev.cancelBubble = true;
290
+ if (!this.multiple) {
291
+ this.handleCharacterKeyDown(ev.detail.key);
292
+ }
293
+ };
294
+ this.handleFocusIndicatorDisplay = () => {
295
+ const focusIndicator = this.el.shadowRoot.querySelector(".focus-indicator");
296
+ if (this.open) {
297
+ focusIndicator.classList.add("focus-indicator-enabled");
298
+ }
299
+ else {
300
+ focusIndicator.classList.remove("focus-indicator-enabled");
301
+ }
302
+ };
303
+ this.handleMouseDown = (event) => {
304
+ if (!this.open) {
305
+ event.preventDefault();
306
+ }
307
+ };
308
+ this.isExternalFiltering = () => this.searchable && this.disableFilter;
309
+ this.handleClick = (event) => {
310
+ var _a;
311
+ if (!this.open) {
312
+ if (this.isExternalFiltering()) {
313
+ this.menu.options = this.filteredOptions;
314
+ }
315
+ else if (!this.hasTimedOut &&
316
+ !this.loading &&
317
+ !((_a = this.noOptions) === null || _a === void 0 ? void 0 : _a.length) &&
318
+ (!this.searchable || this.searchableMenuItemSelected)) {
319
+ this.noOptions = null;
320
+ this.menu.options = this.uniqueOptions;
321
+ }
322
+ }
323
+ if (event.detail !== 0) {
324
+ this.menu.handleClickOpen();
325
+ }
326
+ };
327
+ this.handleExpandIconMouseDown = (event) => {
328
+ if (!this.disabled) {
329
+ event.preventDefault();
330
+ this.searchableSelectElement.focus();
331
+ this.handleClick(event);
332
+ }
333
+ };
334
+ this.handleClear = (event) => {
335
+ event.stopPropagation();
336
+ this.hasTimedOut = false;
337
+ clearTimeout(this.timeoutTimer);
338
+ this.noOptions = null;
339
+ this.emitImmediateIcChange(null);
340
+ this.icClear.emit();
341
+ if (this.searchable) {
342
+ this.searchableSelectElement.value = null;
343
+ this.searchableSelectInputValue = null;
344
+ this.filteredOptions = this.uniqueOptions;
345
+ this.hiddenInputValue = null;
346
+ this.searchableSelectElement.focus();
347
+ }
348
+ else {
349
+ this.customSelectElement.focus();
350
+ }
351
+ };
352
+ this.handleCharacterKeyDown = (key) => {
353
+ // Only close menu when space is pressed if not being used alongside character keys to quickly select options
354
+ if (this.open &&
355
+ key === " " &&
356
+ this.pressedCharacters.length === 0 &&
357
+ !this.hasTimedOut &&
358
+ !this.loading) {
359
+ this.setMenuChange(false);
360
+ }
361
+ if (key.length === 1 && !this.searchable) {
362
+ window.clearTimeout(this.characterKeyPressTimer);
363
+ this.characterKeyPressTimer = window.setTimeout(() => (this.pressedCharacters = ""), 1000);
364
+ if (!(key === " " && !this.pressedCharacters)) {
365
+ this.pressedCharacters += key;
366
+ this.handleFilter();
367
+ if (!this.noOptions) {
368
+ this.emitImmediateIcChange(this.filteredOptions[0].value);
369
+ }
370
+ }
371
+ }
372
+ else {
373
+ this.pressedCharacters = "";
374
+ }
375
+ };
376
+ this.handleNativeSelectKeyDown = (event) => {
377
+ if ((event.key !== "Escape" && event.key !== "Tab") || this.open) {
378
+ event.cancelBubble = true;
379
+ }
380
+ this.handleCharacterKeyDown(event.key);
381
+ };
382
+ this.handleKeyDown = (event) => {
383
+ if ((event.key !== "Escape" && event.key !== "Tab") || this.open) {
384
+ event.cancelBubble = true;
385
+ }
386
+ const isArrowKey = event.key === "ArrowDown" || event.key === "ArrowUp";
387
+ if (!this.open) {
388
+ if (this.isExternalFiltering() && (event.key === "Enter" || isArrowKey)) {
389
+ this.menu.options = this.filteredOptions;
390
+ }
391
+ else {
392
+ if (!this.hasTimedOut) {
393
+ this.noOptions = null;
394
+ this.menu.options = this.uniqueOptions;
395
+ }
396
+ }
397
+ }
398
+ if (this.open && event.key === "Enter") {
399
+ this.setMenuChange(false);
400
+ }
401
+ else {
402
+ if (!(isArrowKey && this.noOptions !== null)) {
403
+ if (!(event.key === " " && this.pressedCharacters.length > 0)) {
404
+ // Keyboard events get passed onto ic-menu
405
+ this.menu.handleKeyboardOpen(event);
406
+ }
407
+ if (!this.multiple) {
408
+ this.handleCharacterKeyDown(event.key);
409
+ }
410
+ }
411
+ }
412
+ };
413
+ this.handleClearButtonFocus = () => {
414
+ this.clearButtonFocused = true;
415
+ };
416
+ this.handleClearButtonBlur = (ev) => {
417
+ var _a;
418
+ const retryButton = (_a = this.menu) === null || _a === void 0 ? void 0 : _a.querySelector("#retry-button");
419
+ if (!(this.searchableSelectElement &&
420
+ ev.relatedTarget === this.searchableSelectElement) &&
421
+ !(retryButton && ev.relatedTarget === retryButton)) {
422
+ this.setMenuChange(false);
423
+ this.handleFocusIndicatorDisplay();
424
+ }
425
+ this.clearButtonFocused = false;
426
+ };
427
+ this.handleFilter = () => {
428
+ var _a;
429
+ const options = this.deduplicateOptions(this.searchable ? [...this.uniqueOptions] : this.ungroupedOptions);
430
+ let isGrouped = false;
431
+ let newFilteredOptions = [];
432
+ options.map((option) => {
433
+ if (option.children)
434
+ isGrouped = true;
435
+ });
436
+ let menuOptionsFiltered;
437
+ if (this.searchable) {
438
+ menuOptionsFiltered = helpers.getFilteredMenuOptions(options, this.includeDescriptionsInSearch, this.inputValueToFilter, this.searchMatchPosition);
439
+ this.searchableMenuItemSelected = false;
440
+ }
441
+ else {
442
+ menuOptionsFiltered = helpers.getFilteredMenuOptions(options, false, this.pressedCharacters, "start");
443
+ }
444
+ if (!isGrouped &&
445
+ ((_a = menuOptionsFiltered[0]) === null || _a === void 0 ? void 0 : _a.label) !== this.emptyOptionListText) {
446
+ newFilteredOptions = menuOptionsFiltered;
447
+ }
448
+ else if (isGrouped) {
449
+ options.map((option) => {
450
+ if (this.includeGroupTitlesInSearch) {
451
+ if (menuOptionsFiltered.indexOf(option) !== -1) {
452
+ newFilteredOptions.push(option);
453
+ }
454
+ else {
455
+ newFilteredOptions.push(this.getFilteredChildMenuOptions(option));
456
+ }
457
+ }
458
+ else {
459
+ newFilteredOptions.push(this.getFilteredChildMenuOptions(option));
460
+ }
461
+ });
462
+ }
463
+ let noChildOptionsWhenFiltered = false;
464
+ if (isGrouped) {
465
+ noChildOptionsWhenFiltered = true;
466
+ newFilteredOptions.map((option) => {
467
+ if (option.children.length > 0) {
468
+ noChildOptionsWhenFiltered = false;
469
+ }
470
+ });
471
+ }
472
+ if (newFilteredOptions.length > 0 && !noChildOptionsWhenFiltered) {
473
+ this.noOptions = null;
474
+ this.filteredOptions = newFilteredOptions;
475
+ }
476
+ else {
477
+ this.noOptions = [{ label: this.emptyOptionListText, value: "" }];
478
+ this.filteredOptions = this.noOptions;
479
+ }
480
+ };
481
+ /**
482
+ * Put the select component into loading state.
483
+ * Replace options with the loading message. If timeout is enabled, set the timeout and once passed, replace options with the loading error message
484
+ */
485
+ this.triggerLoading = () => {
486
+ this.hasTimedOut = false;
487
+ this.noOptions = [{ label: this.loadingLabel, value: "", loading: true }];
488
+ if (this.filteredOptions !== this.noOptions && this.searchable) {
489
+ this.filteredOptions = this.noOptions;
490
+ }
491
+ else if (this.uniqueOptions !== this.noOptions && !this.searchable) {
492
+ this.uniqueOptions = this.noOptions;
493
+ }
494
+ if (this.timeout) {
495
+ this.timeoutTimer = window.setTimeout(() => {
496
+ this.loading = false;
497
+ this.hasTimedOut = true;
498
+ this.noOptions = [
499
+ { label: this.loadingErrorLabel, value: "", timedOut: true },
500
+ ];
501
+ this.filteredOptions = this.noOptions;
502
+ if (!this.searchable)
503
+ this.uniqueOptions = this.noOptions;
504
+ }, this.timeout);
505
+ }
506
+ };
507
+ this.getValueFromLabel = (label) => {
508
+ var _a;
509
+ return (_a = this.uniqueOptions.find((option) => option.label === label)) === null || _a === void 0 ? void 0 : _a.value;
510
+ };
511
+ this.handleSearchableSelectInput = (event) => {
512
+ this.searchableSelectInputValue = event.target.value;
513
+ this.icInput.emit({ value: this.searchableSelectInputValue });
514
+ this.emitIcChange(this.searchableSelectInputValue);
515
+ this.hiddenInputValue = this.searchableSelectInputValue;
516
+ this.inputValueToFilter = this.searchableSelectInputValue;
517
+ this.setMenuChange(true);
518
+ if (!this.disableFilter) {
519
+ this.handleFilter();
520
+ this.debounceAriaLiveUpdate();
521
+ }
522
+ };
523
+ this.updateSearchableSelectResultAriaLive = () => {
524
+ const searchableSelectResultsStatusEl = this.el.shadowRoot.querySelector(".searchable-select-results-status");
525
+ if (searchableSelectResultsStatusEl) {
526
+ if (this.noOptions !== null) {
527
+ searchableSelectResultsStatusEl.innerText = this.emptyOptionListText;
528
+ }
529
+ else {
530
+ searchableSelectResultsStatusEl.innerText = "";
531
+ }
532
+ }
533
+ };
534
+ this.updateMultiSelectedCountAriaLive = () => {
535
+ var _a;
536
+ const multiSelectSelectedCountEl = this.el.shadowRoot.querySelector(".multi-select-selected-count");
537
+ const selectedCount = `${(_a = this.currValue) === null || _a === void 0 ? void 0 : _a.length} of ${helpers.getOptionsWithoutGroupTitlesCount(this.options)} selected`;
538
+ if (multiSelectSelectedCountEl &&
539
+ multiSelectSelectedCountEl.innerText !== selectedCount) {
540
+ multiSelectSelectedCountEl.innerText = selectedCount;
541
+ }
542
+ };
543
+ this.getDefaultValue = (value) => this.getLabelFromValue(value) || value || null;
544
+ this.setDefaultValue = () => {
545
+ if (!this.hasSetDefaultValue && this.currValue) {
546
+ this.searchableSelectInputValue =
547
+ this.searchable && this.getDefaultValue(this.currValue);
548
+ this.initialValue = this.currValue;
549
+ this.hasSetDefaultValue = true;
550
+ }
551
+ };
552
+ this.onFocus = () => {
553
+ this.icFocus.emit();
554
+ };
555
+ this.onBlur = (event) => {
556
+ var _a;
557
+ const target = event.relatedTarget;
558
+ if (target !== null &&
559
+ target.tagName === "UL" &&
560
+ target.className.includes("menu")) {
561
+ return;
562
+ }
563
+ const retryButton = (_a = this.menu) === null || _a === void 0 ? void 0 : _a.querySelector("#retry-button");
564
+ const isSearchableAndNoFocusedInternalElements = this.searchable &&
565
+ event.relatedTarget !== this.menu &&
566
+ !Array.from(this.menu.querySelectorAll("[role='option']")).includes(event.relatedTarget) &&
567
+ !(this.clearButton && event.relatedTarget === this.clearButton) &&
568
+ !(retryButton && event.relatedTarget === retryButton);
569
+ if (isSearchableAndNoFocusedInternalElements) {
570
+ if (!this.retryButtonClick) {
571
+ this.setMenuChange(false);
572
+ }
573
+ this.handleFocusIndicatorDisplay();
574
+ }
575
+ this.retryButtonClick = false;
576
+ this.icBlur.emit();
577
+ };
578
+ this.onTimeoutBlur = (ev) => {
579
+ if (ev.detail.ev.relatedTarget !==
580
+ this.searchableSelectElement &&
581
+ !this.blurredBecauseButtonPressed) {
582
+ this.setMenuChange(false);
583
+ this.handleFocusIndicatorDisplay();
584
+ this.icBlur.emit();
585
+ }
586
+ this.blurredBecauseButtonPressed = false;
587
+ };
588
+ this.handleFormReset = () => {
589
+ this.value = this.initialValue;
590
+ if (this.searchable) {
591
+ this.searchableSelectInputValue = this.getDefaultValue(this.value);
592
+ this.hiddenInputValue = this.value;
593
+ }
594
+ };
595
+ this.ariaActiveDescendant = undefined;
596
+ this.clearButtonFocused = false;
597
+ this.debounceIcChange = undefined;
598
+ this.hiddenInputValue = undefined;
599
+ this.noOptions = null;
600
+ this.open = false;
601
+ this.pressedCharacters = "";
602
+ this.searchableSelectInputValue = null;
603
+ this.charactersUntilSuggestions = 0;
604
+ this.disabled = false;
605
+ this.disableFilter = false;
606
+ this.emptyOptionListText = "No results found";
607
+ this.form = undefined;
608
+ this.formaction = undefined;
609
+ this.formenctype = undefined;
610
+ this.formmethod = undefined;
611
+ this.formnovalidate = undefined;
612
+ this.formtarget = undefined;
613
+ this.fullWidth = false;
614
+ this.helperText = "";
615
+ this.hideLabel = false;
616
+ this.includeDescriptionsInSearch = false;
617
+ this.includeGroupTitlesInSearch = false;
618
+ this.label = undefined;
619
+ this.loadingErrorLabel = "Loading Error";
620
+ this.loadingLabel = "Loading...";
621
+ this.multiple = false;
622
+ this.name = this.inputId;
623
+ this.placeholder = "Select an option";
624
+ this.readonly = false;
625
+ this.required = false;
626
+ this.searchable = false;
627
+ this.searchMatchPosition = "anywhere";
628
+ this.selectOnEnter = false;
629
+ this.showClearButton = false;
630
+ this.size = "default";
631
+ this.small = false;
632
+ this.timeout = undefined;
633
+ this.validationStatus = "";
634
+ this.validationText = "";
635
+ this.loading = false;
636
+ this.options = [];
637
+ this.filteredOptions = this.options;
638
+ this.uniqueOptions = this.options;
639
+ this.debounce = 0;
640
+ this.currDebounce = this.debounce;
641
+ this.value = undefined;
642
+ this.initialValue = this.value;
643
+ this.inputValueToFilter = this.value;
644
+ this.currValue = this.value;
645
+ }
646
+ loadingHandler(newValue) {
647
+ newValue && this.triggerLoading();
648
+ }
649
+ watchOptionsHandler() {
650
+ if (!this.hasTimedOut && this.options !== this.noOptions) {
651
+ this.loading = false;
652
+ clearTimeout(this.timeoutTimer);
653
+ if (this.isExternalFiltering()) {
654
+ // When searchable select
655
+ if (this.options.length > 0) {
656
+ this.setOptionsValuesFromLabels();
657
+ this.noOptions = null;
658
+ this.uniqueOptions = this.deduplicateOptions(this.options);
659
+ this.filteredOptions = this.uniqueOptions;
660
+ }
661
+ else {
662
+ this.noOptions = [{ label: this.emptyOptionListText, value: "" }];
663
+ this.uniqueOptions = this.noOptions;
664
+ this.filteredOptions = this.noOptions;
665
+ }
666
+ this.updateSearchableSelectResultAriaLive();
667
+ this.setDefaultValue();
668
+ }
669
+ else {
670
+ this.setOptionsValuesFromLabels();
671
+ this.uniqueOptions = this.deduplicateOptions(this.options);
672
+ this.filteredOptions = this.uniqueOptions;
673
+ if (this.initialOptionsEmpty) {
674
+ this.setDefaultValue();
675
+ this.initialOptionsEmpty = false;
676
+ }
677
+ }
678
+ }
679
+ else {
680
+ if (!this.searchable)
681
+ this.options = this.noOptions;
682
+ }
683
+ }
684
+ debounceChangedHandler(newValue) {
685
+ this.updateOnChangeDebounce(newValue);
686
+ }
687
+ valueChangedHandler() {
688
+ if (this.value !== this.currValue) {
689
+ if (this.value && this.multiple) {
690
+ this.currValue = this.getValueSortedByOptions(this.value);
691
+ this.updateMultiSelectedCountAriaLive();
692
+ }
693
+ else {
694
+ this.currValue = this.value;
695
+ }
696
+ }
697
+ if (this.searchable) {
698
+ this.searchableSelectInputValue =
699
+ this.getLabelFromValue(this.currValue) ||
700
+ this.currValue;
701
+ }
702
+ }
703
+ disconnectedCallback() {
704
+ helpers.removeFormResetListener(this.el, this.handleFormReset);
705
+ }
706
+ componentWillLoad() {
707
+ this.inheritedAttributes = helpers.inheritAttributes(this.el, [
708
+ ...IC_INHERITED_ARIA,
709
+ "tabindex",
710
+ "title",
711
+ ]);
712
+ helpers.removeDisabledFalse(this.disabled, this.el);
713
+ this.setOptionsValuesFromLabels();
714
+ helpers.addFormResetListener(this.el, this.handleFormReset);
715
+ if (!this.options.length) {
716
+ this.initialOptionsEmpty = true;
717
+ this.noOptions = [{ label: this.emptyOptionListText, value: "" }];
718
+ this.uniqueOptions = this.noOptions;
719
+ this.filteredOptions = this.noOptions;
720
+ }
721
+ else {
722
+ this.setDefaultValue();
723
+ this.uniqueOptions = this.deduplicateOptions(this.options);
724
+ }
725
+ }
726
+ componentDidLoad() {
727
+ helpers.onComponentRequiredPropUndefined([{ prop: this.label, propName: "label" }], "Select");
728
+ if (this.loading) {
729
+ this.triggerLoading();
730
+ }
731
+ this.hiddenInputValue = this.searchable && this.currValue;
732
+ }
733
+ componentDidRender() {
734
+ if (this.nativeSelectElement && !this.disabled) {
735
+ this.setTextColor();
736
+ }
737
+ }
738
+ /**
739
+ * Sets focus on the input box.
740
+ */
741
+ async setFocus() {
742
+ if (this.nativeSelectElement) {
743
+ this.nativeSelectElement.focus();
744
+ }
745
+ else if (this.customSelectElement) {
746
+ this.customSelectElement.focus();
747
+ }
748
+ else if (this.searchableSelectElement) {
749
+ this.searchableSelectElement.focus();
750
+ }
751
+ }
752
+ updateOnChangeDebounce(newValue) {
753
+ if (this.currDebounce !== newValue) {
754
+ this.currDebounce = newValue;
755
+ }
756
+ }
757
+ debounceAriaLiveUpdate() {
758
+ clearTimeout(this.debounceAria);
759
+ window.setTimeout(() => {
760
+ this.updateSearchableSelectResultAriaLive();
761
+ }, 800);
762
+ }
763
+ render() {
764
+ const { size, small, disabled, fullWidth, helperText, hideLabel, label, menuId, multiple, name, options, placeholder, readonly, required, searchable, showClearButton, validationStatus, validationText, currValue, } = this;
765
+ // HTML inputs only accept 'string' for their value
766
+ // Does not cause errors when it is a multi-select - sets value correctly, to a comma-separated string
767
+ helpers.renderHiddenInput(true, this.el, name, this.searchable ? this.hiddenInputValue : currValue, disabled);
768
+ const invalid = validationStatus === IcInformationStatus.Error ? "true" : "false";
769
+ const describedBy = helpers.getInputDescribedByText(this.inputId, helperText !== "", helpers.hasValidationStatus(this.validationStatus, this.disabled)).trim();
770
+ const optionsSelectedCount = `${currValue === null || currValue === void 0 ? void 0 : currValue.length} of ${helpers.getOptionsWithoutGroupTitlesCount(this.options)} selected`;
771
+ return (index.h(index.Host, { class: {
772
+ disabled: disabled,
773
+ searchable: searchable,
774
+ small: small,
775
+ [size]: size !== "default",
776
+ "full-width": fullWidth,
777
+ }, onBlur: this.onBlur }, index.h("ic-input-container", { readonly: readonly }, !hideLabel && (index.h("ic-input-label", { for: this.inputId, label: label, helperText: helperText, required: required, disabled: disabled, readonly: readonly })), index.h("ic-input-component-container", { ref: (el) => (this.anchorEl = el), class: { "menu-open": this.open }, small: small, size: size, fullWidth: fullWidth, disabled: disabled, readonly: readonly, validationStatus: validationStatus }, readonly ? (index.h("ic-typography", null, index.h("p", null, multiple
778
+ ? this.getMultipleOptionsString(currValue)
779
+ : this.getLabelFromValue(currValue)))) : helpers.isMobileOrTablet() && !multiple ? (index.h("select", Object.assign({ ref: (el) => (this.nativeSelectElement = el), disabled: disabled, onChange: this.handleNativeSelectChange, required: required, id: this.inputId, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.handleNativeSelectKeyDown, form: this.form }, this.inheritedAttributes), index.h("option", { value: "", selected: true, disabled: !showClearButton }, placeholder), options.map((option) => {
780
+ if (option.children) {
781
+ return (index.h("optgroup", { label: option.label }, option.children.map((option) => (index.h("option", { value: option.value, disabled: option.disabled, selected: option.value === currValue }, option.label)))));
782
+ }
783
+ else {
784
+ return (index.h("option", { value: option.value, disabled: option.disabled, selected: option.value === currValue }, option.label));
785
+ }
786
+ }))) : searchable ? (index.h("div", { class: "searchable-select-container" }, index.h("input", { class: {
787
+ "select-input": true,
788
+ "with-clear-button": !!this.searchableSelectInputValue,
789
+ }, role: "combobox", autocomplete: "off", "aria-label": label, "aria-describedby": describedBy, "aria-activedescendant": this.ariaActiveDescendant, "aria-autocomplete": "list", "aria-expanded": this.open ? "true" : "false", "aria-invalid": invalid, "aria-required": required ? "true" : "false", "aria-controls": menuId, ref: (el) => (this.searchableSelectElement = el), id: this.inputId, value: this.searchableSelectInputValue, placeholder: placeholder, disabled: disabled, onInput: this.handleSearchableSelectInput, onClick: this.handleClick, onKeyDown: this.handleKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, form: this.form, formaction: this.formaction, formenctype: this.formenctype, formmethod: this.formmethod, formnovalidate: this.formnovalidate, formtarget: this.formtarget }), this.searchableSelectInputValue &&
790
+ (showClearButton || searchable) && (index.h("div", { class: "clear-button-container" }, index.h("ic-button", { id: "clear-button", ref: (el) => (this.clearButton = el), "aria-label": this.searchableSelectInputValue && currValue === null
791
+ ? "Clear input"
792
+ : "Clear selection", class: "clear-button", innerHTML: Clear, onClick: this.handleClear, onFocus: this.handleClearButtonFocus, onBlur: this.handleClearButtonBlur, size: size, variant: "icon", appearance: this.clearButtonFocused
793
+ ? IcThemeForegroundEnum.Light
794
+ : IcThemeForegroundEnum.Dark }), index.h("div", { class: "divider" }))), index.h("span", { onMouseDown: this.handleExpandIconMouseDown, class: {
795
+ "expand-icon": true,
796
+ "expand-icon-open": this.open,
797
+ }, innerHTML: Expand, "aria-hidden": "true" }), index.h("div", { "aria-live": "polite", role: "status", class: "searchable-select-results-status" }))) : (index.h("div", { class: "select-container" }, index.h("button", { class: "select-input", ref: (el) => (this.customSelectElement = el), id: this.inputId, "aria-label": `${label}, ${(multiple && currValue
798
+ ? `${optionsSelectedCount}, ${this.getMultipleOptionsString(currValue)}`
799
+ : this.getLabelFromValue(currValue)) ||
800
+ placeholder}${required ? ", required" : ""}`, "aria-describedby": describedBy, "aria-invalid": invalid, "aria-haspopup": "listbox", "aria-expanded": this.open ? "true" : "false", "aria-owns": menuId, "aria-controls": menuId, disabled: disabled, onBlur: this.onBlur, onFocus: this.onFocus, onClick: this.handleClick, onMouseDown: this.handleMouseDown, onKeyDown: this.handleKeyDown }, index.h("ic-typography", { variant: "body", class: {
801
+ "value-text": true,
802
+ "with-clear-button": currValue && showClearButton,
803
+ placeholder: !this.value || (multiple && this.value.length < 1),
804
+ } }, index.h("p", null, (multiple
805
+ ? this.getMultipleOptionsString(currValue)
806
+ : this.getLabelFromValue(currValue)) ||
807
+ placeholder)), index.h("div", { class: "select-input-end" }, currValue && showClearButton && (index.h("div", { class: "divider" })), index.h("span", { class: {
808
+ "expand-icon": true,
809
+ "expand-icon-open": this.open,
810
+ }, innerHTML: Expand, "aria-hidden": "true" }))), currValue && showClearButton && (index.h("ic-button", { id: "clear-button", "aria-label": "Clear selection", class: "clear-button", innerHTML: Clear, onClick: this.handleClear, onFocus: this.handleClearButtonFocus, onBlur: this.handleClearButtonBlur, size: size, variant: "icon", appearance: this.clearButtonFocused
811
+ ? IcThemeForegroundEnum.Light
812
+ : IcThemeForegroundEnum.Dark }))))), (!helpers.isMobileOrTablet() || multiple) && (index.h("ic-menu-with-multi", { class: {
813
+ "no-results": this.loading ||
814
+ this.hasTimedOut ||
815
+ (this.noOptions !== null &&
816
+ this.noOptions[0] &&
817
+ this.noOptions[0].label === this.emptyOptionListText),
818
+ }, ref: (el) => (this.menu = el), inputEl: searchable
819
+ ? this.searchableSelectElement
820
+ : this.customSelectElement, inputLabel: label, anchorEl: this.anchorEl, small: small, size: size, menuId: menuId, open: this.open, options: searchable ? this.filteredOptions : this.uniqueOptions, value: multiple ? currValue : currValue, fullWidth: fullWidth, 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 || multiple || this.selectOnEnter
821
+ ? "manual"
822
+ : "automatic", closeOnSelect: !multiple })), this.multiple && (index.h("div", { "aria-live": "polite", role: "status", class: "multi-select-selected-count" })), helpers.hasValidationStatus(this.validationStatus, this.disabled) && (index.h("ic-input-validation", { class: { "menu-open": this.open }, ariaLiveMode: "polite", status: validationStatus, message: validationText, for: this.inputId })))));
823
+ }
824
+ static get delegatesFocus() { return true; }
825
+ get el() { return index.getElement(this); }
826
+ static get watchers() { return {
827
+ "loading": ["loadingHandler"],
828
+ "options": ["watchOptionsHandler"],
829
+ "debounce": ["debounceChangedHandler"],
830
+ "value": ["valueChangedHandler"]
831
+ }; }
832
+ };
833
+ Select.style = icSelectCss;
834
+
835
+ exports.ic_select_with_multi = Select;
836
+
837
+ //# sourceMappingURL=ic-select-with-multi.cjs.entry.js.map