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

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