@ukic/canary-web-components 3.0.0-canary.2 → 3.0.0-canary.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (592) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-33b42cd6.js → helpers-36cdc6cb.js} +24 -1
  3. package/dist/cjs/helpers-36cdc6cb.js.map +1 -0
  4. package/dist/cjs/{helpers-6817cfbb.js → helpers-a67ad3a4.js} +15 -129
  5. package/dist/cjs/helpers-a67ad3a4.js.map +1 -0
  6. package/dist/cjs/ic-accordion-group.cjs.entry.js +10 -10
  7. package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
  8. package/dist/cjs/ic-accordion.cjs.entry.js +5 -5
  9. package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
  10. package/dist/cjs/ic-alert.cjs.entry.js +7 -5
  11. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  13. package/dist/cjs/ic-badge.cjs.entry.js +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 +2 -2
  17. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  18. package/dist/cjs/ic-card-horizontal.cjs.entry.js +21 -26
  19. package/dist/cjs/ic-card-horizontal.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ic-card-vertical.cjs.entry.js +22 -24
  21. package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
  22. package/dist/cjs/ic-checkbox-group.cjs.entry.js +17 -6
  23. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  24. package/dist/cjs/ic-checkbox.cjs.entry.js +6 -4
  25. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  26. package/dist/cjs/ic-chip.cjs.entry.js +1 -1
  27. package/dist/cjs/ic-classification-banner.cjs.entry.js +1 -1
  28. package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  30. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +1 -1
  31. package/dist/cjs/ic-data-table.cjs.entry.js +86 -10
  32. package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
  33. package/dist/cjs/ic-date-input.cjs.entry.js +13 -11
  34. package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
  35. package/dist/cjs/ic-date-picker.cjs.entry.js +4 -2
  36. package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
  37. package/dist/cjs/ic-dialog.cjs.entry.js +4 -2
  38. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  39. package/dist/cjs/ic-divider.cjs.entry.js +71 -7
  40. package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
  41. package/dist/cjs/ic-empty-state_2.cjs.entry.js +31 -16
  42. package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -1
  43. package/dist/cjs/ic-footer-link-group.cjs.entry.js +2 -2
  44. package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
  45. package/dist/cjs/ic-footer-link.cjs.entry.js +2 -2
  46. package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
  47. package/dist/cjs/ic-footer.cjs.entry.js +2 -2
  48. package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
  49. package/dist/cjs/ic-hero.cjs.entry.js +2 -2
  50. package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
  51. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +4 -3
  52. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
  53. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +1013 -0
  54. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -0
  55. package/dist/cjs/ic-input-label_2.cjs.entry.js +86 -0
  56. package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -0
  57. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  58. package/dist/cjs/ic-menu-group.cjs.entry.js +3 -3
  59. package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -1
  60. package/dist/cjs/ic-menu-item.cjs.entry.js +11 -11
  61. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  62. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  63. package/dist/cjs/ic-navigation-group.cjs.entry.js +5 -4
  64. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  65. package/dist/cjs/ic-navigation-item.cjs.entry.js +29 -2
  66. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  67. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  68. package/dist/cjs/ic-page-header.cjs.entry.js +5 -5
  69. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  70. package/dist/cjs/ic-pagination_4.cjs.entry.js +191 -62
  71. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  72. package/dist/cjs/ic-popover-menu.cjs.entry.js +11 -11
  73. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  74. package/dist/cjs/ic-radio-group.cjs.entry.js +15 -6
  75. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  76. package/dist/cjs/ic-radio-option.cjs.entry.js +31 -22
  77. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  78. package/dist/cjs/ic-search-bar.cjs.entry.js +12 -9
  79. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  80. package/dist/cjs/ic-side-navigation.cjs.entry.js +4 -3
  81. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  82. package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
  83. package/dist/cjs/ic-step.cjs.entry.js +1 -1
  84. package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
  85. package/dist/cjs/ic-switch.cjs.entry.js +7 -4
  86. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  87. package/dist/cjs/ic-tab-context.cjs.entry.js +2 -1
  88. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  89. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  90. package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
  91. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  92. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  93. package/dist/cjs/ic-toast.cjs.entry.js +3 -3
  94. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  95. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +1 -1
  96. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
  97. package/dist/cjs/ic-toggle-button.cjs.entry.js +1 -1
  98. package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
  99. package/dist/cjs/ic-tree-item.cjs.entry.js +10 -6
  100. package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -1
  101. package/dist/cjs/ic-tree-view.cjs.entry.js +19 -11
  102. package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -1
  103. package/dist/cjs/ic-typography.cjs.entry.js +1 -1
  104. package/dist/cjs/index-4cf27b16.js +4 -12
  105. package/dist/cjs/loader.cjs.js +1 -1
  106. package/dist/collection/collection-manifest.json +0 -2
  107. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.css +18 -21
  108. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js +44 -25
  109. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js.map +1 -1
  110. package/dist/collection/components/ic-data-table/ic-data-table.css +20 -0
  111. package/dist/collection/components/ic-data-table/ic-data-table.js +106 -10
  112. package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
  113. package/dist/collection/components/ic-data-table/story-data.js +7 -0
  114. package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
  115. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +17 -0
  116. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
  117. package/dist/collection/components/ic-date-input/ic-date-input.css +8 -0
  118. package/dist/collection/components/ic-date-input/ic-date-input.js +29 -9
  119. package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
  120. package/dist/collection/components/ic-date-picker/ic-date-picker.css +1 -0
  121. package/dist/collection/components/ic-date-picker/ic-date-picker.js +20 -0
  122. package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
  123. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.css +8 -7
  124. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +87 -36
  125. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
  126. package/dist/collection/components/ic-tree-item/ic-tree-item.css +25 -21
  127. package/dist/collection/components/ic-tree-item/ic-tree-item.js +51 -32
  128. package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -1
  129. package/dist/collection/components/ic-tree-view/ic-tree-view.css +8 -9
  130. package/dist/collection/components/ic-tree-view/ic-tree-view.js +51 -23
  131. package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -1
  132. package/dist/collection/utils/helpers.js +1 -1
  133. package/dist/collection/utils/helpers.js.map +1 -1
  134. package/dist/collection/utils/types.js.map +1 -1
  135. package/dist/components/helpers.js +22 -1
  136. package/dist/components/helpers.js.map +1 -1
  137. package/dist/components/helpers2.js +14 -121
  138. package/dist/components/helpers2.js.map +1 -1
  139. package/dist/components/ic-accordion-group.js +11 -11
  140. package/dist/components/ic-accordion-group.js.map +1 -1
  141. package/dist/components/ic-accordion.js +5 -5
  142. package/dist/components/ic-accordion.js.map +1 -1
  143. package/dist/components/ic-alert.js +8 -5
  144. package/dist/components/ic-alert.js.map +1 -1
  145. package/dist/components/ic-card-horizontal.js +22 -26
  146. package/dist/components/ic-card-horizontal.js.map +1 -1
  147. package/dist/components/ic-card-vertical.js +23 -24
  148. package/dist/components/ic-card-vertical.js.map +1 -1
  149. package/dist/components/ic-checkbox-group.js +19 -6
  150. package/dist/components/ic-checkbox-group.js.map +1 -1
  151. package/dist/components/ic-checkbox.js +6 -3
  152. package/dist/components/ic-checkbox.js.map +1 -1
  153. package/dist/components/ic-classification-banner.js +1 -1
  154. package/dist/components/ic-classification-banner.js.map +1 -1
  155. package/dist/components/ic-data-table.js +88 -10
  156. package/dist/components/ic-data-table.js.map +1 -1
  157. package/dist/components/ic-date-input2.js +14 -11
  158. package/dist/components/ic-date-input2.js.map +1 -1
  159. package/dist/components/ic-date-picker.js +5 -2
  160. package/dist/components/ic-date-picker.js.map +1 -1
  161. package/dist/components/ic-dialog.js +4 -1
  162. package/dist/components/ic-dialog.js.map +1 -1
  163. package/dist/components/ic-divider2.js +86 -9
  164. package/dist/components/ic-divider2.js.map +1 -1
  165. package/dist/components/ic-footer-link-group.js +1 -1
  166. package/dist/components/ic-footer-link-group.js.map +1 -1
  167. package/dist/components/ic-footer-link.js +1 -1
  168. package/dist/components/ic-footer-link.js.map +1 -1
  169. package/dist/components/ic-footer.js +2 -2
  170. package/dist/components/ic-footer.js.map +1 -1
  171. package/dist/components/ic-hero.js +1 -1
  172. package/dist/components/ic-hero.js.map +1 -1
  173. package/dist/components/ic-horizontal-scroll2.js +4 -3
  174. package/dist/components/ic-horizontal-scroll2.js.map +1 -1
  175. package/dist/components/ic-input-component-container2.js +1 -1
  176. package/dist/components/ic-input-component-container2.js.map +1 -1
  177. package/dist/components/ic-input-label2.js +10 -6
  178. package/dist/components/ic-input-label2.js.map +1 -1
  179. package/dist/components/ic-input-validation2.js +1 -1
  180. package/dist/components/ic-input-validation2.js.map +1 -1
  181. package/dist/components/ic-loading-indicator2.js +1 -1
  182. package/dist/components/ic-loading-indicator2.js.map +1 -1
  183. package/dist/components/ic-menu-group.js +2 -2
  184. package/dist/components/ic-menu-group.js.map +1 -1
  185. package/dist/components/ic-menu-item2.js +11 -11
  186. package/dist/components/ic-menu-item2.js.map +1 -1
  187. package/dist/components/ic-menu2.js +453 -169
  188. package/dist/components/ic-menu2.js.map +1 -1
  189. package/dist/components/ic-navigation-group.js +5 -4
  190. package/dist/components/ic-navigation-group.js.map +1 -1
  191. package/dist/components/ic-navigation-item.js +31 -3
  192. package/dist/components/ic-navigation-item.js.map +1 -1
  193. package/dist/components/ic-navigation-menu2.js +1 -1
  194. package/dist/components/ic-page-header.js +4 -4
  195. package/dist/components/ic-page-header.js.map +1 -1
  196. package/dist/components/ic-pagination-bar2.js +34 -17
  197. package/dist/components/ic-pagination-bar2.js.map +1 -1
  198. package/dist/components/ic-pagination-item2.js +10 -12
  199. package/dist/components/ic-pagination-item2.js.map +1 -1
  200. package/dist/components/ic-pagination2.js +38 -15
  201. package/dist/components/ic-pagination2.js.map +1 -1
  202. package/dist/components/ic-popover-menu.js +12 -11
  203. package/dist/components/ic-popover-menu.js.map +1 -1
  204. package/dist/components/ic-radio-group.js +17 -6
  205. package/dist/components/ic-radio-group.js.map +1 -1
  206. package/dist/components/ic-radio-option.js +32 -22
  207. package/dist/components/ic-radio-option.js.map +1 -1
  208. package/dist/components/ic-search-bar.js +13 -9
  209. package/dist/components/ic-search-bar.js.map +1 -1
  210. package/dist/components/ic-select2.js +148 -37
  211. package/dist/components/ic-select2.js.map +1 -1
  212. package/dist/components/ic-side-navigation.js +4 -3
  213. package/dist/components/ic-side-navigation.js.map +1 -1
  214. package/dist/components/ic-stepper.js +1 -1
  215. package/dist/components/ic-switch.js +7 -3
  216. package/dist/components/ic-switch.js.map +1 -1
  217. package/dist/components/ic-tab-context.js +2 -1
  218. package/dist/components/ic-tab-context.js.map +1 -1
  219. package/dist/components/ic-text-field2.js +2 -2
  220. package/dist/components/ic-text-field2.js.map +1 -1
  221. package/dist/components/ic-theme.js +1 -1
  222. package/dist/components/ic-toast.js +3 -3
  223. package/dist/components/ic-toast.js.map +1 -1
  224. package/dist/components/ic-toggle-button-group.js +1 -1
  225. package/dist/components/ic-toggle-button-group.js.map +1 -1
  226. package/dist/components/ic-top-navigation.js +1 -1
  227. package/dist/components/ic-tree-item.js +11 -6
  228. package/dist/components/ic-tree-item.js.map +1 -1
  229. package/dist/components/ic-tree-view.js +24 -14
  230. package/dist/components/ic-tree-view.js.map +1 -1
  231. package/dist/core/core.css +692 -10
  232. package/dist/core/core.esm.js +1 -1
  233. package/dist/core/core.esm.js.map +1 -1
  234. package/dist/core/p-00ff3a06.entry.js +2 -0
  235. package/dist/core/p-00ff3a06.entry.js.map +1 -0
  236. package/dist/core/{p-7e1603cc.entry.js → p-01ab3a15.entry.js} +2 -2
  237. package/dist/core/p-01ab3a15.entry.js.map +1 -0
  238. package/dist/core/{p-c033e7d6.entry.js → p-036d251b.entry.js} +2 -2
  239. package/dist/core/{p-9397b15b.js → p-043cf5de.js} +2 -2
  240. package/dist/core/p-043cf5de.js.map +1 -0
  241. package/dist/core/{p-d2e7a256.entry.js → p-13d2db9b.entry.js} +2 -2
  242. package/dist/core/p-1d24a02a.entry.js +2 -0
  243. package/dist/core/{p-7c80d79c.entry.js.map → p-1d24a02a.entry.js.map} +1 -1
  244. package/dist/core/p-235b461f.entry.js +2 -0
  245. package/dist/core/p-235b461f.entry.js.map +1 -0
  246. package/dist/core/{p-897b8d16.entry.js → p-24d03bbd.entry.js} +2 -2
  247. package/dist/core/{p-bb1252fa.entry.js → p-26613dbd.entry.js} +2 -2
  248. package/dist/core/p-2873f871.entry.js +2 -0
  249. package/dist/core/p-2873f871.entry.js.map +1 -0
  250. package/dist/core/{p-77a32de5.entry.js → p-2a3bd99a.entry.js} +2 -2
  251. package/dist/core/p-2f4bec06.entry.js +2 -0
  252. package/dist/core/p-2f4bec06.entry.js.map +1 -0
  253. package/dist/core/p-350074d4.entry.js +2 -0
  254. package/dist/core/p-350074d4.entry.js.map +1 -0
  255. package/dist/core/{p-5cfb5821.entry.js → p-39101ffc.entry.js} +2 -2
  256. package/dist/core/{p-5cfb5821.entry.js.map → p-39101ffc.entry.js.map} +1 -1
  257. package/dist/core/p-3b0fae40.entry.js +2 -0
  258. package/dist/core/p-3b0fae40.entry.js.map +1 -0
  259. package/dist/core/p-42f1b9cc.entry.js +2 -0
  260. package/dist/core/p-42f1b9cc.entry.js.map +1 -0
  261. package/dist/core/p-50dd2744.entry.js +2 -0
  262. package/dist/core/p-50dd2744.entry.js.map +1 -0
  263. package/dist/core/p-53228014.entry.js +2 -0
  264. package/dist/core/p-53228014.entry.js.map +1 -0
  265. package/dist/core/p-574355c9.entry.js +2 -0
  266. package/dist/core/p-574355c9.entry.js.map +1 -0
  267. package/dist/core/p-5af1273f.entry.js +2 -0
  268. package/dist/core/p-5af1273f.entry.js.map +1 -0
  269. package/dist/core/p-5eecd3fc.entry.js +2 -0
  270. package/dist/core/p-5eecd3fc.entry.js.map +1 -0
  271. package/dist/core/{p-4e28ef60.entry.js → p-606ad46f.entry.js} +2 -2
  272. package/dist/core/p-606ad46f.entry.js.map +1 -0
  273. package/dist/core/{p-4dcc37e7.entry.js → p-620b758c.entry.js} +2 -2
  274. package/dist/core/p-637035c3.entry.js +2 -0
  275. package/dist/core/p-637035c3.entry.js.map +1 -0
  276. package/dist/core/{p-6beffd0e.entry.js → p-6727166b.entry.js} +2 -2
  277. package/dist/core/{p-8ca2e329.entry.js → p-6dc00a8f.entry.js} +2 -2
  278. package/dist/core/{p-aeb6016c.entry.js → p-6dffaac0.entry.js} +2 -2
  279. package/dist/core/{p-aeb6016c.entry.js.map → p-6dffaac0.entry.js.map} +1 -1
  280. package/dist/core/p-72210cd4.entry.js +2 -0
  281. package/dist/core/p-72210cd4.entry.js.map +1 -0
  282. package/dist/core/{p-d5ca3bcb.entry.js → p-7aa6b76e.entry.js} +2 -2
  283. package/dist/core/{p-e5d99316.entry.js → p-7b90f0ae.entry.js} +2 -2
  284. package/dist/core/p-7c3c080a.entry.js +2 -0
  285. package/dist/core/p-7c3c080a.entry.js.map +1 -0
  286. package/dist/core/p-7c663d4a.entry.js +2 -0
  287. package/dist/core/p-7c663d4a.entry.js.map +1 -0
  288. package/dist/core/p-7c6710f8.entry.js +2 -0
  289. package/dist/core/p-7c6710f8.entry.js.map +1 -0
  290. package/dist/core/{p-50019ede.entry.js → p-80b296cd.entry.js} +2 -2
  291. package/dist/core/{p-b0751bd9.entry.js → p-80dee118.entry.js} +2 -2
  292. package/dist/core/p-80dee118.entry.js.map +1 -0
  293. package/dist/core/{p-eb65e556.entry.js → p-82aa8136.entry.js} +2 -2
  294. package/dist/core/{p-2e49fb22.entry.js → p-83b4efe2.entry.js} +2 -2
  295. package/dist/core/p-83e4d955.entry.js +2 -0
  296. package/dist/core/p-83e4d955.entry.js.map +1 -0
  297. package/dist/core/p-85d51975.entry.js +2 -0
  298. package/dist/core/p-85d51975.entry.js.map +1 -0
  299. package/dist/core/{p-5accf0bb.entry.js → p-878df16f.entry.js} +2 -2
  300. package/dist/core/{p-1fe35de1.entry.js → p-8bec76d1.entry.js} +2 -2
  301. package/dist/core/p-8ffdd236.entry.js +2 -0
  302. package/dist/core/p-8ffdd236.entry.js.map +1 -0
  303. package/dist/core/p-97953d8b.entry.js +2 -0
  304. package/dist/core/p-97953d8b.entry.js.map +1 -0
  305. package/dist/core/p-9a62c3b8.entry.js +2 -0
  306. package/dist/core/p-9a62c3b8.entry.js.map +1 -0
  307. package/dist/core/p-a22d335b.entry.js +2 -0
  308. package/dist/core/p-a22d335b.entry.js.map +1 -0
  309. package/dist/core/p-a22e5356.entry.js +2 -0
  310. package/dist/core/p-a22e5356.entry.js.map +1 -0
  311. package/dist/core/p-b03218df.entry.js +2 -0
  312. package/dist/core/p-b03218df.entry.js.map +1 -0
  313. package/dist/core/{p-486d8d43.entry.js → p-b3d93bc1.entry.js} +2 -2
  314. package/dist/core/p-c1feb2b2.entry.js +2 -0
  315. package/dist/core/p-c1feb2b2.entry.js.map +1 -0
  316. package/dist/core/{p-ed4cde5a.entry.js → p-c40c57ee.entry.js} +2 -2
  317. package/dist/core/p-c883b5c1.entry.js +2 -0
  318. package/dist/core/p-c883b5c1.entry.js.map +1 -0
  319. package/dist/core/{p-0ab10600.entry.js → p-cc22644d.entry.js} +2 -2
  320. package/dist/core/{p-505250cf.entry.js → p-d7632baf.entry.js} +2 -2
  321. package/dist/core/p-dcbfc485.entry.js +2 -0
  322. package/dist/core/p-dcbfc485.entry.js.map +1 -0
  323. package/dist/core/{p-44ee5375.entry.js → p-e3e0cf46.entry.js} +2 -2
  324. package/dist/core/p-e3e0cf46.entry.js.map +1 -0
  325. package/dist/core/p-e6a330e4.js +2 -0
  326. package/dist/core/p-e6a330e4.js.map +1 -0
  327. package/dist/core/{p-1109636a.entry.js → p-e7b6d9c5.entry.js} +2 -2
  328. package/dist/core/{p-1109636a.entry.js.map → p-e7b6d9c5.entry.js.map} +1 -1
  329. package/dist/core/p-ea3e2419.entry.js +2 -0
  330. package/dist/core/p-ea3e2419.entry.js.map +1 -0
  331. package/dist/core/p-f32ab3de.entry.js +2 -0
  332. package/dist/core/p-f32ab3de.entry.js.map +1 -0
  333. package/dist/core/p-f3f9acbb.entry.js +2 -0
  334. package/dist/core/p-f3f9acbb.entry.js.map +1 -0
  335. package/dist/core/{p-d03374fc.entry.js → p-fbb5c8f2.entry.js} +2 -2
  336. package/dist/esm/core.js +1 -1
  337. package/dist/esm/{helpers-5bd2012a.js → helpers-1e2516ae.js} +15 -122
  338. package/dist/esm/helpers-1e2516ae.js.map +1 -0
  339. package/dist/esm/{helpers-dab8ddfe.js → helpers-c326255f.js} +23 -2
  340. package/dist/esm/helpers-c326255f.js.map +1 -0
  341. package/dist/esm/ic-accordion-group.entry.js +10 -10
  342. package/dist/esm/ic-accordion-group.entry.js.map +1 -1
  343. package/dist/esm/ic-accordion.entry.js +5 -5
  344. package/dist/esm/ic-accordion.entry.js.map +1 -1
  345. package/dist/esm/ic-alert.entry.js +7 -5
  346. package/dist/esm/ic-alert.entry.js.map +1 -1
  347. package/dist/esm/ic-back-to-top.entry.js +1 -1
  348. package/dist/esm/ic-badge.entry.js +1 -1
  349. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  350. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  351. package/dist/esm/ic-button_3.entry.js +2 -2
  352. package/dist/esm/ic-button_3.entry.js.map +1 -1
  353. package/dist/esm/ic-card-horizontal.entry.js +22 -27
  354. package/dist/esm/ic-card-horizontal.entry.js.map +1 -1
  355. package/dist/esm/ic-card-vertical.entry.js +23 -25
  356. package/dist/esm/ic-card-vertical.entry.js.map +1 -1
  357. package/dist/esm/ic-checkbox-group.entry.js +17 -6
  358. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  359. package/dist/esm/ic-checkbox.entry.js +6 -4
  360. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  361. package/dist/esm/ic-chip.entry.js +1 -1
  362. package/dist/esm/ic-classification-banner.entry.js +1 -1
  363. package/dist/esm/ic-classification-banner.entry.js.map +1 -1
  364. package/dist/esm/ic-data-row.entry.js +1 -1
  365. package/dist/esm/ic-data-table-title-bar.entry.js +1 -1
  366. package/dist/esm/ic-data-table.entry.js +86 -10
  367. package/dist/esm/ic-data-table.entry.js.map +1 -1
  368. package/dist/esm/ic-date-input.entry.js +13 -11
  369. package/dist/esm/ic-date-input.entry.js.map +1 -1
  370. package/dist/esm/ic-date-picker.entry.js +4 -2
  371. package/dist/esm/ic-date-picker.entry.js.map +1 -1
  372. package/dist/esm/ic-dialog.entry.js +4 -2
  373. package/dist/esm/ic-dialog.entry.js.map +1 -1
  374. package/dist/esm/ic-divider.entry.js +72 -8
  375. package/dist/esm/ic-divider.entry.js.map +1 -1
  376. package/dist/esm/ic-empty-state_2.entry.js +31 -16
  377. package/dist/esm/ic-empty-state_2.entry.js.map +1 -1
  378. package/dist/esm/ic-footer-link-group.entry.js +2 -2
  379. package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
  380. package/dist/esm/ic-footer-link.entry.js +2 -2
  381. package/dist/esm/ic-footer-link.entry.js.map +1 -1
  382. package/dist/esm/ic-footer.entry.js +2 -2
  383. package/dist/esm/ic-footer.entry.js.map +1 -1
  384. package/dist/esm/ic-hero.entry.js +2 -2
  385. package/dist/esm/ic-hero.entry.js.map +1 -1
  386. package/dist/esm/ic-horizontal-scroll.entry.js +4 -3
  387. package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
  388. package/dist/{collection/components/ic-menu-with-multi/ic-menu.js → esm/ic-input-component-container_3.entry.js} +160 -729
  389. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -0
  390. package/dist/esm/ic-input-label_2.entry.js +81 -0
  391. package/dist/esm/ic-input-label_2.entry.js.map +1 -0
  392. package/dist/esm/ic-link.entry.js +1 -1
  393. package/dist/esm/ic-menu-group.entry.js +3 -3
  394. package/dist/esm/ic-menu-group.entry.js.map +1 -1
  395. package/dist/esm/ic-menu-item.entry.js +11 -11
  396. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  397. package/dist/esm/ic-navigation-button.entry.js +1 -1
  398. package/dist/esm/ic-navigation-group.entry.js +5 -4
  399. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  400. package/dist/esm/ic-navigation-item.entry.js +30 -3
  401. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  402. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  403. package/dist/esm/ic-page-header.entry.js +5 -5
  404. package/dist/esm/ic-page-header.entry.js.map +1 -1
  405. package/dist/esm/ic-pagination_4.entry.js +191 -62
  406. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  407. package/dist/esm/ic-popover-menu.entry.js +11 -11
  408. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  409. package/dist/esm/ic-radio-group.entry.js +15 -6
  410. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  411. package/dist/esm/ic-radio-option.entry.js +31 -22
  412. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  413. package/dist/esm/ic-search-bar.entry.js +12 -9
  414. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  415. package/dist/esm/ic-side-navigation.entry.js +4 -3
  416. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  417. package/dist/esm/ic-status-tag.entry.js +1 -1
  418. package/dist/esm/ic-step.entry.js +1 -1
  419. package/dist/esm/ic-stepper.entry.js +1 -1
  420. package/dist/esm/ic-switch.entry.js +7 -4
  421. package/dist/esm/ic-switch.entry.js.map +1 -1
  422. package/dist/esm/ic-tab-context.entry.js +2 -1
  423. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  424. package/dist/esm/ic-tab-group.entry.js +1 -1
  425. package/dist/esm/ic-tab-panel.entry.js +1 -1
  426. package/dist/esm/ic-tab.entry.js +1 -1
  427. package/dist/esm/ic-theme.entry.js +1 -1
  428. package/dist/esm/ic-toast.entry.js +3 -3
  429. package/dist/esm/ic-toast.entry.js.map +1 -1
  430. package/dist/esm/ic-toggle-button-group.entry.js +1 -1
  431. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
  432. package/dist/esm/ic-toggle-button.entry.js +1 -1
  433. package/dist/esm/ic-top-navigation.entry.js +1 -1
  434. package/dist/esm/ic-tree-item.entry.js +10 -6
  435. package/dist/esm/ic-tree-item.entry.js.map +1 -1
  436. package/dist/esm/ic-tree-view.entry.js +19 -11
  437. package/dist/esm/ic-tree-view.entry.js.map +1 -1
  438. package/dist/esm/ic-typography.entry.js +1 -1
  439. package/dist/esm/index-93509377.js +4 -12
  440. package/dist/esm/loader.js +1 -1
  441. package/dist/types/components/ic-card-horizontal/ic-card-horizontal.d.ts +6 -2
  442. package/dist/types/components/ic-data-table/ic-data-table.d.ts +13 -0
  443. package/dist/types/components/ic-data-table/story-data.d.ts +1 -0
  444. package/dist/types/components/ic-date-input/ic-date-input.d.ts +4 -0
  445. package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +4 -0
  446. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +15 -6
  447. package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +11 -6
  448. package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +10 -4
  449. package/dist/types/components.d.ts +94 -484
  450. package/dist/types/utils/helpers.d.ts +1 -1
  451. package/dist/types/utils/types.d.ts +4 -1
  452. package/hydrate/index.js +3373 -6380
  453. package/package.json +3 -3
  454. package/dist/cjs/helpers-33b42cd6.js.map +0 -1
  455. package/dist/cjs/helpers-6817cfbb.js.map +0 -1
  456. package/dist/cjs/ic-input-component-container_4.cjs.entry.js +0 -156
  457. package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +0 -1
  458. package/dist/cjs/ic-menu-with-multi.cjs.entry.js +0 -2738
  459. package/dist/cjs/ic-menu-with-multi.cjs.entry.js.map +0 -1
  460. package/dist/cjs/ic-menu.cjs.entry.js +0 -658
  461. package/dist/cjs/ic-menu.cjs.entry.js.map +0 -1
  462. package/dist/cjs/ic-select-with-multi.cjs.entry.js +0 -788
  463. package/dist/cjs/ic-select-with-multi.cjs.entry.js.map +0 -1
  464. package/dist/collection/components/ic-menu-with-multi/ic-menu.css +0 -712
  465. package/dist/collection/components/ic-menu-with-multi/ic-menu.js.map +0 -1
  466. package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js +0 -1057
  467. package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js.map +0 -1
  468. package/dist/collection/components/ic-select-with-multi/assets/Check.svg +0 -3
  469. package/dist/collection/components/ic-select-with-multi/assets/Clear.svg +0 -3
  470. package/dist/collection/components/ic-select-with-multi/assets/Expand.svg +0 -3
  471. package/dist/collection/components/ic-select-with-multi/ic-select.css +0 -695
  472. package/dist/collection/components/ic-select-with-multi/ic-select.js +0 -1520
  473. package/dist/collection/components/ic-select-with-multi/ic-select.js.map +0 -1
  474. package/dist/collection/components/ic-select-with-multi/story-data.js +0 -216
  475. package/dist/collection/components/ic-select-with-multi/story-data.js.map +0 -1
  476. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js +0 -1518
  477. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js.map +0 -1
  478. package/dist/components/ic-menu-with-multi.d.ts +0 -11
  479. package/dist/components/ic-menu-with-multi.js +0 -8
  480. package/dist/components/ic-menu-with-multi.js.map +0 -1
  481. package/dist/components/ic-menu3.js +0 -2803
  482. package/dist/components/ic-menu3.js.map +0 -1
  483. package/dist/components/ic-select-with-multi.d.ts +0 -11
  484. package/dist/components/ic-select-with-multi.js +0 -906
  485. package/dist/components/ic-select-with-multi.js.map +0 -1
  486. package/dist/core/p-0894cab1.entry.js +0 -2
  487. package/dist/core/p-0894cab1.entry.js.map +0 -1
  488. package/dist/core/p-130a05cf.entry.js +0 -2
  489. package/dist/core/p-130a05cf.entry.js.map +0 -1
  490. package/dist/core/p-1e2aa8a6.entry.js +0 -2
  491. package/dist/core/p-1e2aa8a6.entry.js.map +0 -1
  492. package/dist/core/p-202bc922.entry.js +0 -2
  493. package/dist/core/p-202bc922.entry.js.map +0 -1
  494. package/dist/core/p-28323849.entry.js +0 -2
  495. package/dist/core/p-28323849.entry.js.map +0 -1
  496. package/dist/core/p-297e99cf.js +0 -2
  497. package/dist/core/p-297e99cf.js.map +0 -1
  498. package/dist/core/p-2ff4e283.entry.js +0 -2
  499. package/dist/core/p-2ff4e283.entry.js.map +0 -1
  500. package/dist/core/p-30b046b2.entry.js +0 -2
  501. package/dist/core/p-30b046b2.entry.js.map +0 -1
  502. package/dist/core/p-3db785f0.entry.js +0 -2
  503. package/dist/core/p-3db785f0.entry.js.map +0 -1
  504. package/dist/core/p-42883e4c.entry.js +0 -2
  505. package/dist/core/p-42883e4c.entry.js.map +0 -1
  506. package/dist/core/p-42e0f3bd.entry.js +0 -2
  507. package/dist/core/p-42e0f3bd.entry.js.map +0 -1
  508. package/dist/core/p-44ee5375.entry.js.map +0 -1
  509. package/dist/core/p-4e28ef60.entry.js.map +0 -1
  510. package/dist/core/p-53e00a8a.entry.js +0 -2
  511. package/dist/core/p-53e00a8a.entry.js.map +0 -1
  512. package/dist/core/p-59028160.entry.js +0 -2
  513. package/dist/core/p-59028160.entry.js.map +0 -1
  514. package/dist/core/p-5b7dfe57.entry.js +0 -2
  515. package/dist/core/p-5b7dfe57.entry.js.map +0 -1
  516. package/dist/core/p-603fea14.entry.js +0 -2
  517. package/dist/core/p-603fea14.entry.js.map +0 -1
  518. package/dist/core/p-64933069.entry.js +0 -2
  519. package/dist/core/p-64933069.entry.js.map +0 -1
  520. package/dist/core/p-7c268030.entry.js +0 -2
  521. package/dist/core/p-7c268030.entry.js.map +0 -1
  522. package/dist/core/p-7c78f6c6.entry.js +0 -2
  523. package/dist/core/p-7c78f6c6.entry.js.map +0 -1
  524. package/dist/core/p-7c80d79c.entry.js +0 -2
  525. package/dist/core/p-7e1603cc.entry.js.map +0 -1
  526. package/dist/core/p-8df49808.entry.js +0 -2
  527. package/dist/core/p-8df49808.entry.js.map +0 -1
  528. package/dist/core/p-8f12659d.entry.js +0 -2
  529. package/dist/core/p-8f12659d.entry.js.map +0 -1
  530. package/dist/core/p-903ee57e.entry.js +0 -2
  531. package/dist/core/p-903ee57e.entry.js.map +0 -1
  532. package/dist/core/p-92e3ccb9.entry.js +0 -2
  533. package/dist/core/p-92e3ccb9.entry.js.map +0 -1
  534. package/dist/core/p-9397b15b.js.map +0 -1
  535. package/dist/core/p-9b54feca.entry.js +0 -2
  536. package/dist/core/p-9b54feca.entry.js.map +0 -1
  537. package/dist/core/p-a78cf2cb.entry.js +0 -2
  538. package/dist/core/p-a78cf2cb.entry.js.map +0 -1
  539. package/dist/core/p-a9151d0b.entry.js +0 -2
  540. package/dist/core/p-a9151d0b.entry.js.map +0 -1
  541. package/dist/core/p-acc76b80.entry.js +0 -2
  542. package/dist/core/p-acc76b80.entry.js.map +0 -1
  543. package/dist/core/p-b0751bd9.entry.js.map +0 -1
  544. package/dist/core/p-c1698936.entry.js +0 -2
  545. package/dist/core/p-c1698936.entry.js.map +0 -1
  546. package/dist/core/p-c1e90c85.entry.js +0 -2
  547. package/dist/core/p-c1e90c85.entry.js.map +0 -1
  548. package/dist/core/p-cb63e656.entry.js +0 -2
  549. package/dist/core/p-cb63e656.entry.js.map +0 -1
  550. package/dist/core/p-d3c0bffb.entry.js +0 -2
  551. package/dist/core/p-d3c0bffb.entry.js.map +0 -1
  552. package/dist/core/p-da3e8c54.entry.js +0 -2
  553. package/dist/core/p-da3e8c54.entry.js.map +0 -1
  554. package/dist/core/p-ec53b435.entry.js +0 -2
  555. package/dist/core/p-ec53b435.entry.js.map +0 -1
  556. package/dist/core/p-f9810621.entry.js +0 -2
  557. package/dist/core/p-f9810621.entry.js.map +0 -1
  558. package/dist/core/p-fb7b99dd.entry.js +0 -2
  559. package/dist/core/p-fb7b99dd.entry.js.map +0 -1
  560. package/dist/esm/helpers-5bd2012a.js.map +0 -1
  561. package/dist/esm/helpers-dab8ddfe.js.map +0 -1
  562. package/dist/esm/ic-input-component-container_4.entry.js +0 -149
  563. package/dist/esm/ic-input-component-container_4.entry.js.map +0 -1
  564. package/dist/esm/ic-menu-with-multi.entry.js +0 -2734
  565. package/dist/esm/ic-menu-with-multi.entry.js.map +0 -1
  566. package/dist/esm/ic-menu.entry.js +0 -654
  567. package/dist/esm/ic-menu.entry.js.map +0 -1
  568. package/dist/esm/ic-select-with-multi.entry.js +0 -784
  569. package/dist/esm/ic-select-with-multi.entry.js.map +0 -1
  570. package/dist/types/components/ic-menu-with-multi/ic-menu.d.ts +0 -214
  571. package/dist/types/components/ic-select-with-multi/ic-select.d.ts +0 -259
  572. package/dist/types/components/ic-select-with-multi/story-data.d.ts +0 -32
  573. /package/dist/core/{p-c033e7d6.entry.js.map → p-036d251b.entry.js.map} +0 -0
  574. /package/dist/core/{p-d2e7a256.entry.js.map → p-13d2db9b.entry.js.map} +0 -0
  575. /package/dist/core/{p-897b8d16.entry.js.map → p-24d03bbd.entry.js.map} +0 -0
  576. /package/dist/core/{p-bb1252fa.entry.js.map → p-26613dbd.entry.js.map} +0 -0
  577. /package/dist/core/{p-77a32de5.entry.js.map → p-2a3bd99a.entry.js.map} +0 -0
  578. /package/dist/core/{p-4dcc37e7.entry.js.map → p-620b758c.entry.js.map} +0 -0
  579. /package/dist/core/{p-6beffd0e.entry.js.map → p-6727166b.entry.js.map} +0 -0
  580. /package/dist/core/{p-8ca2e329.entry.js.map → p-6dc00a8f.entry.js.map} +0 -0
  581. /package/dist/core/{p-d5ca3bcb.entry.js.map → p-7aa6b76e.entry.js.map} +0 -0
  582. /package/dist/core/{p-e5d99316.entry.js.map → p-7b90f0ae.entry.js.map} +0 -0
  583. /package/dist/core/{p-50019ede.entry.js.map → p-80b296cd.entry.js.map} +0 -0
  584. /package/dist/core/{p-eb65e556.entry.js.map → p-82aa8136.entry.js.map} +0 -0
  585. /package/dist/core/{p-2e49fb22.entry.js.map → p-83b4efe2.entry.js.map} +0 -0
  586. /package/dist/core/{p-5accf0bb.entry.js.map → p-878df16f.entry.js.map} +0 -0
  587. /package/dist/core/{p-1fe35de1.entry.js.map → p-8bec76d1.entry.js.map} +0 -0
  588. /package/dist/core/{p-486d8d43.entry.js.map → p-b3d93bc1.entry.js.map} +0 -0
  589. /package/dist/core/{p-ed4cde5a.entry.js.map → p-c40c57ee.entry.js.map} +0 -0
  590. /package/dist/core/{p-0ab10600.entry.js.map → p-cc22644d.entry.js.map} +0 -0
  591. /package/dist/core/{p-505250cf.entry.js.map → p-d7632baf.entry.js.map} +0 -0
  592. /package/dist/core/{p-d03374fc.entry.js.map → p-fbb5c8f2.entry.js.map} +0 -0
@@ -0,0 +1,1013 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-4cf27b16.js');
6
+ const helpers = require('./helpers-36cdc6cb.js');
7
+ const checkIcon = require('./check-icon-dd563898.js');
8
+ const popper = require('./popper-16968c2e.js');
9
+
10
+ const icInputComponentContainerCss = "ic-input-component-container{display:flex;border:var(--ic-border-width) solid\n var(--border-color, var(--ic-architectural-400));border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-slow);height:2.5rem;width:var(--input-width, 20rem);padding:var(--ic-space-1px);background-color:var(--input-bg-color, var(--ic-architectural-white));box-sizing:border-box;fill:var(--ic-architectural-400);outline:none}ic-input-component-container.ic-input-component-container-full-width{width:100%}ic-input-component-container.ic-input-component-container-disabled,ic-input-component-container.ic-input-component-container-disabled:hover{border:var(--ic-border-width) dashed\n var(--border-color-disabled, var(--ic-architectural-200))}ic-input-component-container.ic-input-component-container-readonly,ic-input-component-container.ic-input-component-container-readonly:hover{border:none;padding:0}ic-input-component-container.ic-input-component-container-error{border:var(--ic-border-error);padding:0}ic-input-component-container.ic-input-component-container-error:hover{border:var(--ic-border-error-hover)}ic-input-component-container.ic-input-component-container-error:focus-within{border:var(--ic-border-error-pressed)}ic-input-component-container.ic-input-component-container-warning{border:var(--ic-border-warning);padding:0}ic-input-component-container.ic-input-component-container-warning:hover{border:var(--ic-border-warning-hover)}ic-input-component-container.ic-input-component-container-warning:focus-within{border:var(--ic-border-warning-pressed)}ic-input-component-container.ic-input-component-container-success{border:var(--ic-border-success);padding:0}ic-input-component-container.ic-input-component-container-success:hover{border:var(--ic-border-success-hover)}ic-input-component-container.ic-input-component-container-success:focus-within{border:var(--ic-success-border-pressed)}ic-input-component-container.ic-input-component-container-small{height:var(--ic-space-xl)}ic-input-component-container.ic-input-component-container-large{height:var(--ic-space-xxl)}ic-input-component-container.ic-input-component-container-multiline{height:auto}ic-input-component-container .icon-container{margin-top:var(--ic-space-xxs);margin-left:0.438rem;display:flex;align-items:center}ic-input-component-container.ic-input-component-container-multiline .icon-container,ic-input-component-container.ic-input-component-container-multiline.ic-input-component-container-small .icon-container{margin-top:0.375rem;display:block}ic-input-component-container.ic-input-component-container-readonly .icon-container{margin-left:-0.313rem}ic-input-component-container.ic-input-component-container-disabled ::-moz-placeholder{display:none}ic-input-component-container.ic-input-component-container-disabled ::placeholder{display:none}ic-input-component-container .inline-success{margin:var(--ic-space-xs) 0.375rem;display:flex;align-items:center}ic-input-component-container.ic-input-component-container-dark:hover{--border-color:var(--ic-architectural-400)}ic-input-component-container .inline-success>svg{fill:var(--ic-status-success-default);height:1.25rem;width:1.25rem}ic-input-component-container:hover{border:var(--ic-border-hover);color:var(--ic-action-dark-hover)}ic-input-component-container:focus{border:var(--ic-border-pressed)}.focus-indicator{display:flex;width:100%;margin:-0.125rem;padding:0.125rem;border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-fast)}.focus-indicator:focus-within,.focus-indicator-enabled{box-shadow:var(--ic-border-focus)}.focus-indicator.ic-input-component-container-dark:focus-within{box-shadow:var(--ic-border-focus)}@media (forced-colors: active){ic-input-component-container,.focus-indicator{transition:none}ic-input-component-container:focus-within{border:var(--ic-border-width) solid Highlight;outline:0.125rem solid Highlight}ic-input-component-container.ic-input-component-container-disabled,ic-input-component-container.ic-input-component-container-disabled:hover{border:var(--ic-border-width) dashed GrayText}}";
11
+
12
+ const InputComponentContainer = class {
13
+ constructor(hostRef) {
14
+ index.registerInstance(this, hostRef);
15
+ this.hostMutationCallback = (mutationList) => {
16
+ if (mutationList.some(({ type, addedNodes, removedNodes }) => type === "childList"
17
+ ? helpers.checkSlotInChildMutations(addedNodes, removedNodes, "left-icon")
18
+ : false)) {
19
+ index.forceUpdate(this);
20
+ }
21
+ };
22
+ this.appearance = "default";
23
+ this.disabled = false;
24
+ this.fullWidth = false;
25
+ this.multiLine = false;
26
+ this.readonly = false;
27
+ this.size = "medium";
28
+ this.validationInline = false;
29
+ this.validationStatus = "";
30
+ }
31
+ componentDidLoad() {
32
+ this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);
33
+ this.hostMutationObserver.observe(this.el, { childList: true });
34
+ }
35
+ render() {
36
+ const { size, validationStatus, disabled, readonly, multiLine, fullWidth, appearance, validationInline, } = this;
37
+ const hasValidationStatus = this.validationStatus !== "" && !this.disabled && !this.readonly
38
+ ? true
39
+ : false;
40
+ return (index.h(index.Host, { class: {
41
+ [`ic-input-component-container-${size}`]: true,
42
+ [`ic-input-component-container-${validationStatus}`]: hasValidationStatus,
43
+ [`ic-input-component-container-disabled`]: disabled,
44
+ [`ic-input-component-container-readonly`]: readonly,
45
+ ["ic-input-component-container-multiline"]: multiLine,
46
+ ["ic-input-component-container-full-width"]: fullWidth,
47
+ ["ic-input-component-container-dark"]: appearance === "dark",
48
+ }, "aria-disabled": disabled && `${disabled}` }, index.h("div", { class: {
49
+ "focus-indicator": true,
50
+ dark: appearance === "dark",
51
+ } }, helpers.slotHasContent(this.el, "left-icon") && (index.h("div", { class: {
52
+ ["icon-container"]: true,
53
+ } }, index.h("slot", { name: "left-icon" }))), index.h("slot", null), validationInline &&
54
+ validationStatus === helpers.IcInformationStatus.Success && (index.h("span", { class: {
55
+ ["inline-success"]: true,
56
+ }, innerHTML: helpers.successIcon })))));
57
+ }
58
+ get el() { return index.getElement(this); }
59
+ };
60
+ InputComponentContainer.style = icInputComponentContainerCss;
61
+
62
+ const icInputContainerCss = "ic-input-container .component-container{display:flex;flex-direction:column}";
63
+
64
+ const InputContainer = class {
65
+ constructor(hostRef) {
66
+ index.registerInstance(this, hostRef);
67
+ this.disabled = false;
68
+ this.readonly = false;
69
+ }
70
+ render() {
71
+ return (index.h(index.Host, null, index.h("div", { class: {
72
+ ["component-container"]: true,
73
+ ["disabled"]: this.disabled,
74
+ ["readonly"]: this.readonly,
75
+ } }, index.h("slot", null))));
76
+ }
77
+ };
78
+ InputContainer.style = icInputContainerCss;
79
+
80
+ const icMenuCss = "html.sc-ic-menu{line-height:1.15;-webkit-text-size-adjust:100%}body.sc-ic-menu{margin:0}main.sc-ic-menu{display:block}h1.sc-ic-menu{font-size:2em;margin:0.67em 0}hr.sc-ic-menu{box-sizing:content-box;height:0;overflow:visible}pre.sc-ic-menu{font-family:monospace, monospace;font-size:1em}a.sc-ic-menu{background-color:transparent}abbr[title].sc-ic-menu{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b.sc-ic-menu,strong.sc-ic-menu{font-weight:bolder}code.sc-ic-menu,kbd.sc-ic-menu,samp.sc-ic-menu{font-family:monospace, monospace;font-size:1em}small.sc-ic-menu{font-size:80%}sub.sc-ic-menu,sup.sc-ic-menu{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub.sc-ic-menu{bottom:-0.25em}sup.sc-ic-menu{top:-0.5em}img.sc-ic-menu{border-style:none}button.sc-ic-menu,input.sc-ic-menu,optgroup.sc-ic-menu,select.sc-ic-menu,textarea.sc-ic-menu{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button.sc-ic-menu,input.sc-ic-menu{overflow:visible}button.sc-ic-menu,select.sc-ic-menu{text-transform:none}button.sc-ic-menu,[type=\"button\"].sc-ic-menu,[type=\"reset\"].sc-ic-menu,[type=\"submit\"].sc-ic-menu{-webkit-appearance:button}button.sc-ic-menu::-moz-focus-inner,[type=\"button\"].sc-ic-menu::-moz-focus-inner,[type=\"reset\"].sc-ic-menu::-moz-focus-inner,[type=\"submit\"].sc-ic-menu::-moz-focus-inner{border-style:none;padding:0}button.sc-ic-menu:-moz-focusring,[type=\"button\"].sc-ic-menu:-moz-focusring,[type=\"reset\"].sc-ic-menu:-moz-focusring,[type=\"submit\"].sc-ic-menu:-moz-focusring{outline:1px dotted ButtonText}fieldset.sc-ic-menu{padding:0.35em 0.75em 0.625em}legend.sc-ic-menu{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress.sc-ic-menu{vertical-align:baseline}textarea.sc-ic-menu{overflow:auto}[type=\"checkbox\"].sc-ic-menu,[type=\"radio\"].sc-ic-menu{box-sizing:border-box;padding:0}[type=\"number\"].sc-ic-menu::-webkit-inner-spin-button,[type=\"number\"].sc-ic-menu::-webkit-outer-spin-button{height:auto}[type=\"search\"].sc-ic-menu{-webkit-appearance:textfield;outline-offset:-2px}[type=\"search\"].sc-ic-menu::-webkit-search-decoration{-webkit-appearance:none}.sc-ic-menu::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details.sc-ic-menu{display:block}summary.sc-ic-menu{display:list-item}template.sc-ic-menu{display:none}[hidden].sc-ic-menu{display:none}html.sc-ic-menu,body.sc-ic-menu,div.sc-ic-menu,span.sc-ic-menu,applet.sc-ic-menu,object.sc-ic-menu,iframe.sc-ic-menu,h1.sc-ic-menu,h2.sc-ic-menu,h3.sc-ic-menu,h4.sc-ic-menu,h5.sc-ic-menu,h6.sc-ic-menu,p.sc-ic-menu,blockquote.sc-ic-menu,pre.sc-ic-menu,a.sc-ic-menu,abbr.sc-ic-menu,acronym.sc-ic-menu,address.sc-ic-menu,big.sc-ic-menu,cite.sc-ic-menu,code.sc-ic-menu,del.sc-ic-menu,dfn.sc-ic-menu,em.sc-ic-menu,img.sc-ic-menu,ins.sc-ic-menu,kbd.sc-ic-menu,q.sc-ic-menu,s.sc-ic-menu,samp.sc-ic-menu,small.sc-ic-menu,strike.sc-ic-menu,strong.sc-ic-menu,sub.sc-ic-menu,sup.sc-ic-menu,tt.sc-ic-menu,var.sc-ic-menu,b.sc-ic-menu,u.sc-ic-menu,i.sc-ic-menu,center.sc-ic-menu,dl.sc-ic-menu,dt.sc-ic-menu,dd.sc-ic-menu,ol.sc-ic-menu,ul.sc-ic-menu,li.sc-ic-menu,fieldset.sc-ic-menu,form.sc-ic-menu,label.sc-ic-menu,legend.sc-ic-menu,table.sc-ic-menu,caption.sc-ic-menu,tbody.sc-ic-menu,tfoot.sc-ic-menu,thead.sc-ic-menu,tr.sc-ic-menu,th.sc-ic-menu,td.sc-ic-menu,article.sc-ic-menu,aside.sc-ic-menu,canvas.sc-ic-menu,details.sc-ic-menu,embed.sc-ic-menu,figure.sc-ic-menu,figcaption.sc-ic-menu,footer.sc-ic-menu,header.sc-ic-menu,hgroup.sc-ic-menu,menu.sc-ic-menu,nav.sc-ic-menu,output.sc-ic-menu,ruby.sc-ic-menu,section.sc-ic-menu,summary.sc-ic-menu,time.sc-ic-menu,mark.sc-ic-menu,audio.sc-ic-menu,video.sc-ic-menu{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}@media (prefers-reduced-motion: no-preference){.ic-menu-open.sc-ic-menu-h .menu.sc-ic-menu{transition:max-height var(--ic-transition-duration-slow)}}.sc-ic-menu-h{max-height:0;width:var(--menu-width, var(--input-width, 20rem));color:var(--menu-item-text-color, var(--ic-color-text-primary));--ic-typography-color:var(\n --menu-item-text-color,\n var(--ic-color-text-primary)\n );background-color:var(--menu-bg-color, var(--ic-architectural-white));position:relative;z-index:var(--ic-z-index-menu);box-sizing:border-box;box-shadow:var(--ic-elevation-overlay);border-radius:var(--ic-border-radius)}.ic-menu-open.sc-ic-menu-h:not(.ic-menu-no-focus):focus-within{box-shadow:var(--ic-border-focus);outline:var(--ic-hc-focus-outline)}.ic-select-select-all-focused.sc-ic-menu-h{box-shadow:var(--ic-elevation-overlay) !important}#retry-button.sc-ic-menu::part(button){height:var(--ic-space-lg)}.small.sc-ic-menu #retry-button.sc-ic-menu::part(button){height:var(--ic-space-md)}.on-dialog.sc-ic-menu-h{inset:auto !important}.menu.sc-ic-menu{text-decoration:none;list-style-type:none;border-radius:1px;background-color:var(--menu-bg-color, var(--ic-architectural-white));visibility:hidden;max-height:0;overflow-y:hidden}.menu.sc-ic-menu:has(+.option-bar).sc-ic-menu{border-radius:0 0 1px 1px}.menu-scroll.sc-ic-menu{overflow-y:auto}.menu.sc-ic-menu:focus-visible{outline:none}.ic-menu-open.sc-ic-menu-h{max-height:none;display:flex;flex-direction:column-reverse;border:var(--ic-border-width) solid\n var(--menu-border-color, var(--ic-architectural-400));transition:box-shadow var(--ic-easing-transition-fast)}.ic-menu-open.sc-ic-menu-h .menu.sc-ic-menu{visibility:visible;max-height:calc(var(--ic-space-xl) * 10 + var(--ic-space-xxxs))}.ic-menu-open.sc-ic-menu-h .option-bar.sc-ic-menu{visibility:visible}.ic-menu-open.sc-ic-menu-h .select-all-button.sc-ic-menu{display:block}.ic-menu-full-width.sc-ic-menu-h{width:100%}.option.sc-ic-menu{padding:var(--ic-space-xs) calc(var(--ic-space-xs) - var(--ic-space-1px));cursor:pointer;display:flex;align-items:center}.loading-option.sc-ic-menu p.sc-ic-menu{margin-bottom:0 !important}.option.sc-ic-menu:not(.loading-option){justify-content:space-between}.ic-menu-small.sc-ic-menu-h .option.sc-ic-menu{padding:var(--ic-space-xxs) calc(var(--ic-space-xs) - var(--ic-space-1px))}.ic-menu-large.sc-ic-menu-h .option.sc-ic-menu{padding:var(--ic-space-sm) calc(var(--ic-space-xs) - var(--ic-space-1px))}.option.sc-ic-menu:last-child{border-radius:0 0 1px 1px}.sc-ic-menu:not(.menu:has(+.option-bar)).sc-ic-menu .option.sc-ic-menu:first-child{border-radius:1px 1px 0 0}.option.sc-ic-menu:not(.disabled-option):hover{background-color:var(--ic-action-dark-bg-hover)}.option.sc-ic-menu:not(.disabled-option):active{background-color:var(--ic-action-dark-bg-pressed)}.option.sc-ic-menu:focus-visible{outline:var(--ic-hc-focus-outline)}.option.sc-ic-menu:not(.disabled-option) .option-description.sc-ic-menu{--ic-typography-color:var(--ic-color-text-secondary)}.option.sc-ic-menu .option-label.sc-ic-menu{display:flex;flex-direction:row;align-items:top}.option.sc-ic-menu .option-label.sc-ic-menu ic-typography.sc-ic-menu{max-width:100%;word-wrap:break-word}.option.sc-ic-menu .option-element.sc-ic-menu{margin-top:var(--ic-space-xxs)}.option.sc-ic-menu .option-icon.sc-ic-menu{height:var(--ic-space-md);width:var(--ic-space-md);margin-top:var(--ic-space-xxs);margin-right:var(--ic-space-xxxs)}.option-text-container.sc-ic-menu{pointer-events:none;width:100%}.option-text-container.show-check-icon.sc-ic-menu{width:calc(var(--ic-space-lg) * 10 + var(--ic-space-xl))}.option.loading-option.sc-ic-menu .option-text-container.sc-ic-menu{margin-left:calc(var(--ic-space-xs) + var(--ic-space-xxxs));color:var(--ic-color-text-secondary);--ic-typography-color:var(--ic-color-text-secondary)}.error-icon-svg.sc-ic-menu{height:var(--ic-space-md);width:var(--ic-space-md);fill:var(--ic-status-error-default);align-self:center;display:flex;margin-right:calc(var(--ic-space-xxs) * 1.2)}.loading-error-info.sc-ic-menu{display:flex}.check-icon.sc-ic-menu{height:var(--ic-space-lg);min-width:var(--ic-space-lg);width:var(--ic-space-lg);margin-left:var(--ic-space-xs);pointer-events:none}.focused-option.sc-ic-menu .check-icon.sc-ic-menu *.sc-ic-menu{fill:currentcolor}.option-group-title.sc-ic-menu{padding:var(--ic-space-lg) calc(var(--ic-space-xs) - var(--ic-space-1px))\n var(--ic-space-xs);--ic-typography-color:var(--ic-color-text-tertiary)}.ic-menu-small.sc-ic-menu-h .option-group-title.sc-ic-menu{padding:var(--ic-space-sm) calc(var(--ic-space-xs) - var(--ic-space-1px))\n var(--ic-space-xxs)}.last-recommended-option.sc-ic-menu{border-bottom:var(--ic-border-default)}.disabled-option.sc-ic-menu{color:var(--ic-architectural-200);--ic-typography-color:var(--ic-architectural-200);cursor:default;pointer-events:none}.focused-option.sc-ic-menu,.focused-option.sc-ic-menu .option-description.sc-ic-menu{background-color:var(--ic-color-focus-inner) !important;color:var(--ic-architectural-white) !important;--ic-typography-color:var(--ic-architectural-white) !important}.no-results.sc-ic-menu-h li.sc-ic-menu{cursor:no-drop}.no-results.sc-ic-menu-h li.sc-ic-menu:hover{background-color:transparent}.option-bar.sc-ic-menu{padding:var(--ic-space-xxs) var(--ic-space-xs);display:flex;align-items:center;justify-content:space-between;background-color:var(--ic-architectural-40);visibility:hidden;border-bottom:var(--ic-border-width) solid var(--ic-architectural-400);border-radius:1px 1px 0 0}.option-bar.sc-ic-menu p.sc-ic-menu{margin-bottom:0 !important}.ic-menu-large.sc-ic-menu-h .option-bar.sc-ic-menu{padding:var(--ic-space-xs)}.select-all-button.sc-ic-menu{display:none}.select-all-button.sc-ic-menu:focus{z-index:calc(var(--ic-z-index-menu) + 1)}@media (forced-colors: active){.focused-option.sc-ic-menu:focus{outline:none;border:0.125rem solid transparent}}";
81
+
82
+ const Menu = class {
83
+ constructor(hostRef) {
84
+ index.registerInstance(this, hostRef);
85
+ this.menuKeyPress = index.createEvent(this, "menuKeyPress", 7);
86
+ this.menuOptionId = index.createEvent(this, "menuOptionId", 7);
87
+ this.menuOptionSelect = index.createEvent(this, "menuOptionSelect", 7);
88
+ this.menuOptionSelectAll = index.createEvent(this, "menuOptionSelectAll", 7);
89
+ this.menuStateChange = index.createEvent(this, "menuStateChange", 7);
90
+ this.retryButtonClicked = index.createEvent(this, "retryButtonClicked", 7);
91
+ this.timeoutBlur = index.createEvent(this, "timeoutBlur", 7);
92
+ this.ungroupedOptionsSet = index.createEvent(this, "ungroupedOptionsSet", 7);
93
+ this.ACTIVE_DESCENDANT = "aria-activedescendant";
94
+ this.CLEAR_BUTTON_ID = "clear-button";
95
+ this.disabledOptionSelected = false;
96
+ this.hasPreviouslyBlurred = false;
97
+ this.hasTimedOut = false;
98
+ this.isLoading = false;
99
+ this.isMultiSelect = false;
100
+ this.isSearchBar = false;
101
+ this.isSearchableSelect = false;
102
+ this.lastOptionSelected = null; // Index of last option selected
103
+ this.lastOptionFocused = null; // Index of last option focused
104
+ this.multiOptionClicked = null;
105
+ this.preventClickOpen = false; // Prevents menu re-opening immediately after it is closed on blur when clicking input.
106
+ this.preventMenuFocus = false; // (When multiple) ensures focus moves straight to select all button from menu.
107
+ this.shiftPressed = false;
108
+ this.ungroupedOptions = [];
109
+ this.handleClearListener = () => {
110
+ this.optionHighlighted = "";
111
+ };
112
+ this.handleSubmitSearch = () => {
113
+ const highlightedOptionIndex = this.options.findIndex((option) => option[this.valueField] === this.optionHighlighted);
114
+ this.setInputValue(highlightedOptionIndex);
115
+ };
116
+ this.handleMenuChange = (open, focusInput) => {
117
+ this.menuStateChange.emit({ open, focusInput });
118
+ if (!open) {
119
+ if (focusInput !== false) {
120
+ this.inputEl.focus();
121
+ this.preventClickOpen = false;
122
+ }
123
+ // Reset optionHighlighted so previously highlighted option doesn't get reselected when Enter pressed
124
+ if (this.isMultiSelect) {
125
+ this.optionHighlighted = undefined;
126
+ this.multiOptionClicked = null;
127
+ }
128
+ }
129
+ };
130
+ this.setNextOptionValue = (selectedOptionIndex) => {
131
+ if (this.ungroupedOptions[selectedOptionIndex + 1]) {
132
+ this.menuOptionSelect.emit({
133
+ value: this.ungroupedOptions[selectedOptionIndex + 1][this.valueField],
134
+ optionId: this.getOptionId(this.ungroupedOptions[selectedOptionIndex + 1][this.valueField]),
135
+ });
136
+ }
137
+ else {
138
+ this.menuOptionSelect.emit({
139
+ value: this.ungroupedOptions[0][this.valueField],
140
+ optionId: this.getOptionId(this.ungroupedOptions[0][this.valueField]),
141
+ });
142
+ }
143
+ };
144
+ this.setPreviousOptionValue = (selectedOptionIndex) => {
145
+ if (this.ungroupedOptions[selectedOptionIndex - 1]) {
146
+ this.menuOptionSelect.emit({
147
+ value: this.ungroupedOptions[selectedOptionIndex - 1][this.valueField],
148
+ optionId: this.getOptionId(this.ungroupedOptions[selectedOptionIndex - 1][this.valueField]),
149
+ });
150
+ }
151
+ else {
152
+ this.menuOptionSelect.emit({
153
+ value: this.ungroupedOptions[this.ungroupedOptions.length - 1][this.valueField],
154
+ optionId: this.getOptionId(this.ungroupedOptions[this.ungroupedOptions.length - 1][this.valueField]),
155
+ });
156
+ }
157
+ };
158
+ this.getParentEl = (parent) => {
159
+ if (parent.tagName === "IC-SEARCH-BAR") {
160
+ this.isSearchBar = true;
161
+ }
162
+ else if (parent.tagName === "IC-SELECT") {
163
+ if (parent.getAttribute("searchable") !== null &&
164
+ parent.getAttribute("searchable") !== undefined) {
165
+ this.isSearchableSelect = true;
166
+ }
167
+ else if (parent.getAttribute("multiple") !== null &&
168
+ parent.getAttribute("multiple") !== undefined) {
169
+ this.isMultiSelect = true;
170
+ }
171
+ }
172
+ };
173
+ // Open menu when up or down arrow keys are pressed
174
+ this.arrowBehaviour = (event) => {
175
+ event.preventDefault();
176
+ this.handleMenuChange(true);
177
+ };
178
+ this.getMenuOptions = () => this.isSearchBar ? this.options : this.ungroupedOptions;
179
+ // Set option that is focused and so should show focus state
180
+ this.setHighlightedOption = (highlightedIndex) => {
181
+ const menuOptions = this.getMenuOptions();
182
+ menuOptions[highlightedIndex] &&
183
+ !menuOptions[highlightedIndex].timedOut &&
184
+ (this.optionHighlighted =
185
+ menuOptions[highlightedIndex][this.valueField] || undefined);
186
+ };
187
+ // Determines keyboard behaviour when selection is automatic
188
+ // (i.e. you don't have to press Enter select an option - just focus on it)
189
+ // and menu is closed
190
+ this.autoSetInputValueKeyboardOpen = (event) => {
191
+ const selectedOptionIndex = this.ungroupedOptions.findIndex((option) => option[this.valueField] === this.value);
192
+ this.keyboardNav = false;
193
+ switch (event.key) {
194
+ case "ArrowDown":
195
+ this.keyboardNav = true;
196
+ this.arrowBehaviour(event);
197
+ this.setNextOptionValue(selectedOptionIndex);
198
+ break;
199
+ case "ArrowUp":
200
+ this.keyboardNav = true;
201
+ this.arrowBehaviour(event);
202
+ this.setPreviousOptionValue(selectedOptionIndex);
203
+ break;
204
+ case " ":
205
+ case "Enter":
206
+ if (event.target.id !== this.CLEAR_BUTTON_ID) {
207
+ this.handleMenuChange(true);
208
+ }
209
+ break;
210
+ }
211
+ };
212
+ this.selectHighlightedOption = (options, highlightedOptionIndex) => {
213
+ if (!this.isLoading && !this.hasTimedOut) {
214
+ this.keyboardNav = true;
215
+ }
216
+ const isOpen = this.isSearchBar || this.isSearchableSelect || this.open;
217
+ if (isOpen) {
218
+ if (highlightedOptionIndex >= 0) {
219
+ if (options[highlightedOptionIndex] !== undefined) {
220
+ if (this.isSearchBar &&
221
+ options[highlightedOptionIndex].disabled === true) {
222
+ this.disabledOptionSelected = true;
223
+ }
224
+ else {
225
+ this.setInputValue(highlightedOptionIndex);
226
+ }
227
+ }
228
+ }
229
+ else {
230
+ this.setInputValue(highlightedOptionIndex);
231
+ }
232
+ }
233
+ else {
234
+ this.handleMenuChange(true);
235
+ }
236
+ };
237
+ // Check if option is selected based on the index of the option
238
+ this.isOptionSelected = (index) => {
239
+ const menuOptions = this.getMenuOptions();
240
+ return this.value
241
+ ? this.value.includes(menuOptions[index][this.valueField])
242
+ : false;
243
+ };
244
+ // Deselect currently selected options when shift pressed, but keep certain options selected
245
+ this.deselectSelectedOptions = (optionsToKeepSelected) => {
246
+ const menuOptions = this.getMenuOptions();
247
+ if (this.value) {
248
+ const selectedOptionIndexes = this.value.map((value) => {
249
+ return menuOptions.findIndex((option) => option[this.valueField] === value);
250
+ });
251
+ // Call setInputValue (which toggles the selected state) on options that need to be deselected
252
+ selectedOptionIndexes.forEach((index) => !optionsToKeepSelected.includes(index) && this.setInputValue(index));
253
+ }
254
+ };
255
+ // Determines keyboard behaviour when selection is manual (i.e. when you have to press Enter to select an option)
256
+ this.manualSetInputValueKeyboardOpen = (event) => {
257
+ const menuOptions = this.getMenuOptions();
258
+ // For preventing focus disappearing on currently focused option when Shift / Cmd / Ctrl pressed
259
+ // (i.e. when user is likely in the middle of executing a keyboard combination to select options)
260
+ const isKeyboardCombination = event.shiftKey || event.metaKey || event.ctrlKey;
261
+ const highlightedOptionIndex = this.getOptionHighlightedIndex();
262
+ const clickedMultiOptionIndex = menuOptions.findIndex((option) => option[this.valueField] === this.multiOptionClicked);
263
+ const getOptionId = (index) => { var _a; return (_a = Array.from(this.host.querySelectorAll("li"))[index]) === null || _a === void 0 ? void 0 : _a.id; };
264
+ // Space press should be equivalent to Enter when multi-select
265
+ if (event.key === " " && this.isMultiSelect) {
266
+ this.handleOptionSelect(event, highlightedOptionIndex);
267
+ }
268
+ else {
269
+ switch (event.key) {
270
+ case "ArrowDown":
271
+ this.keyboardNav = true;
272
+ this.arrowBehaviour(event);
273
+ if (this.multiOptionClicked) {
274
+ // Set focus to option last clicked
275
+ // Prevents it resetting to the top of the menu when user switches to using keyboard
276
+ this.setHighlightedOption(clickedMultiOptionIndex);
277
+ this.multiOptionClicked = null;
278
+ }
279
+ else {
280
+ this.handleSingleShiftSelect(event, highlightedOptionIndex, menuOptions);
281
+ if (highlightedOptionIndex < menuOptions.length - 1) {
282
+ this.setHighlightedOption(highlightedOptionIndex + 1);
283
+ this.menuOptionId.emit({
284
+ optionId: getOptionId(highlightedOptionIndex + 1),
285
+ });
286
+ this.handleSingleShiftSelect(event, highlightedOptionIndex + 1, menuOptions);
287
+ }
288
+ else {
289
+ this.setHighlightedOption(0);
290
+ this.menuOptionId.emit({
291
+ optionId: getOptionId(0),
292
+ });
293
+ this.handleSingleShiftSelect(event, 0, menuOptions);
294
+ }
295
+ // Deselect currently selected options if arrow was pressed for first time after shift is held
296
+ if (this.isMultiSelect && this.shiftPressed) {
297
+ this.deselectSelectedOptions([
298
+ highlightedOptionIndex,
299
+ this.getOptionHighlightedIndex(),
300
+ ]);
301
+ this.shiftPressed = false;
302
+ }
303
+ }
304
+ this.lastOptionFocused = this.getOptionHighlightedIndex();
305
+ this.preventIncorrectTabOrder = false;
306
+ this.focusFromSearchKeypress = false;
307
+ break;
308
+ case "ArrowUp":
309
+ this.keyboardNav = true;
310
+ this.arrowBehaviour(event);
311
+ if (this.multiOptionClicked) {
312
+ // Set focus to option last clicked
313
+ // Prevents it resetting to the bottom of the menu when user switches to using keyboard
314
+ this.setHighlightedOption(clickedMultiOptionIndex);
315
+ this.multiOptionClicked = null;
316
+ }
317
+ else {
318
+ this.handleSingleShiftSelect(event, highlightedOptionIndex, menuOptions);
319
+ if (highlightedOptionIndex <= 0 ||
320
+ highlightedOptionIndex > menuOptions.length + 1) {
321
+ this.setHighlightedOption(menuOptions.length - 1);
322
+ this.menuOptionId.emit({
323
+ optionId: getOptionId(menuOptions.length - 1),
324
+ });
325
+ this.handleSingleShiftSelect(event, menuOptions.length - 1, menuOptions);
326
+ }
327
+ else {
328
+ this.setHighlightedOption(highlightedOptionIndex - 1);
329
+ this.menuOptionId.emit({
330
+ optionId: getOptionId(highlightedOptionIndex - 1),
331
+ });
332
+ this.handleSingleShiftSelect(event, highlightedOptionIndex - 1, menuOptions);
333
+ }
334
+ // Deselect currently selected options if arrow was pressed for first time after shift is held
335
+ if (this.isMultiSelect && this.shiftPressed) {
336
+ this.deselectSelectedOptions([
337
+ highlightedOptionIndex,
338
+ this.getOptionHighlightedIndex(),
339
+ ]);
340
+ this.shiftPressed = false;
341
+ }
342
+ }
343
+ this.lastOptionFocused = this.getOptionHighlightedIndex();
344
+ this.preventIncorrectTabOrder = false;
345
+ this.focusFromSearchKeypress = false;
346
+ break;
347
+ case "Home": {
348
+ const startOptionIndex = 0;
349
+ this.keyboardNav = true;
350
+ event.preventDefault();
351
+ this.arrowBehaviour(event);
352
+ this.setHighlightedOption(startOptionIndex);
353
+ this.menuOptionId.emit({
354
+ optionId: getOptionId(startOptionIndex),
355
+ });
356
+ if (event.shiftKey && event.ctrlKey) {
357
+ this.handleMultipleShiftSelect(startOptionIndex);
358
+ }
359
+ this.lastOptionFocused = startOptionIndex;
360
+ this.lastOptionSelected = startOptionIndex;
361
+ break;
362
+ }
363
+ case "End": {
364
+ const endOptionIndex = menuOptions.length - 1;
365
+ this.keyboardNav = true;
366
+ event.preventDefault();
367
+ this.arrowBehaviour(event);
368
+ this.setHighlightedOption(endOptionIndex);
369
+ this.menuOptionId.emit({
370
+ optionId: getOptionId(endOptionIndex),
371
+ });
372
+ if (event.shiftKey && event.ctrlKey) {
373
+ this.handleMultipleShiftSelect(endOptionIndex);
374
+ }
375
+ this.lastOptionFocused = endOptionIndex;
376
+ this.lastOptionSelected = endOptionIndex;
377
+ break;
378
+ }
379
+ case " ":
380
+ if (!isKeyboardCombination) {
381
+ this.keyboardNav = false;
382
+ }
383
+ if (this.isSearchBar || this.isSearchableSelect) {
384
+ break;
385
+ }
386
+ else {
387
+ if (event.target.id !== this.CLEAR_BUTTON_ID) {
388
+ this.handleMenuChange(true);
389
+ }
390
+ }
391
+ break;
392
+ case "Enter":
393
+ event.preventDefault();
394
+ if (!isKeyboardCombination) {
395
+ this.keyboardNav = false;
396
+ }
397
+ this.handleOptionSelect(event, highlightedOptionIndex);
398
+ break;
399
+ case "Escape":
400
+ if (this.open) {
401
+ event.stopImmediatePropagation();
402
+ }
403
+ this.handleMenuChange(false);
404
+ this.menuOptionId.emit({ optionId: undefined });
405
+ break;
406
+ case "a":
407
+ // Checks if Cmd (meta) key is pressed if Mac device (while excluding meta key on Windows)
408
+ // Otherwise, if a different OS, checks Ctrl key
409
+ if ((helpers.isMacDevice() && event.metaKey) ||
410
+ (!helpers.isMacDevice() && event.ctrlKey)) {
411
+ this.emitSelectAll();
412
+ this.lastOptionFocused = null;
413
+ this.lastOptionSelected = null;
414
+ }
415
+ break;
416
+ case "Shift":
417
+ case "Tab":
418
+ if (event.key === "Shift") {
419
+ this.shiftPressed = true;
420
+ }
421
+ if (this.isSearchBar) {
422
+ this.keyboardNav = true;
423
+ }
424
+ if (this.isMultiSelect) {
425
+ if (this.open && !event.shiftKey && this.selectAllButton) {
426
+ event.preventDefault();
427
+ this.selectAllButton.focus(); // Move focus to select all button instead of focused option
428
+ this.preventMenuFocus = true;
429
+ this.preventClickOpen = true;
430
+ this.optionHighlighted = undefined; // Stop any option focus states showing when focus moved to select all button
431
+ }
432
+ }
433
+ else {
434
+ this.preventIncorrectTabOrder = true;
435
+ }
436
+ break;
437
+ default:
438
+ if (!isKeyboardCombination) {
439
+ this.keyboardNav = false;
440
+ }
441
+ this.focusOnSearchOrSelectInput(menuOptions, highlightedOptionIndex);
442
+ }
443
+ }
444
+ };
445
+ this.setInputValue = (highlightedOptionIndex) => {
446
+ const menuOptions = this.getMenuOptions();
447
+ if (menuOptions[highlightedOptionIndex] !== undefined) {
448
+ this.menuOptionSelect.emit({
449
+ value: menuOptions[highlightedOptionIndex][this.valueField],
450
+ });
451
+ if (this.closeOnSelect) {
452
+ this.optionHighlighted = undefined;
453
+ this.menuOptionId.emit({ optionId: undefined });
454
+ }
455
+ }
456
+ if (this.closeOnSelect) {
457
+ if (!this.hasTimedOut) {
458
+ this.handleMenuChange(false);
459
+ }
460
+ else {
461
+ this.parentEl.setFocus();
462
+ }
463
+ }
464
+ };
465
+ this.handleOptionClick = (event) => {
466
+ const { value, label } = event.target.dataset;
467
+ if (this.isMultiSelect) {
468
+ const menuOptions = this.getMenuOptions();
469
+ const selectedOptionIndex = menuOptions.findIndex((option) => option.value === value);
470
+ this.handleOptionSelect(event, selectedOptionIndex, true);
471
+ this.multiOptionClicked = value;
472
+ }
473
+ else {
474
+ this.menuOptionSelect.emit({ value, label });
475
+ this.handleMenuChange(false);
476
+ }
477
+ this.optionHighlighted = undefined;
478
+ };
479
+ this.handleRetry = () => {
480
+ this.retryButtonClicked.emit({ value: this.value });
481
+ };
482
+ this.handleRetryKeyDown = (ev) => {
483
+ if (ev.key === "Enter" || ev.key === " ") {
484
+ ev.preventDefault();
485
+ this.retryButtonClicked.emit({ value: this.value, keyPressed: ev.key });
486
+ }
487
+ };
488
+ this.handleBlur = (event) => {
489
+ if (event.relatedTarget !== this.inputEl) {
490
+ if (event.relatedTarget === this.selectAllButton) {
491
+ this.menu.removeAttribute(this.ACTIVE_DESCENDANT);
492
+ }
493
+ if (!(this.menu.contains(event.relatedTarget) ||
494
+ event.relatedTarget === this.selectAllButton)) {
495
+ this.handleMenuChange(false, this.hasPreviouslyBlurred);
496
+ this.menu.removeAttribute(this.ACTIVE_DESCENDANT);
497
+ this.lastOptionFocused = null;
498
+ this.lastOptionSelected = null;
499
+ }
500
+ }
501
+ else {
502
+ this.handleMenuChange(false);
503
+ this.preventClickOpen = true;
504
+ this.menu.removeAttribute(this.ACTIVE_DESCENDANT);
505
+ this.lastOptionFocused = null;
506
+ this.lastOptionSelected = null;
507
+ }
508
+ if (!this.isSearchBar)
509
+ this.hasPreviouslyBlurred = !!event.relatedTarget;
510
+ };
511
+ this.handleMouseDown = (event) => {
512
+ event.preventDefault();
513
+ };
514
+ this.handleMenuKeyDown = (event) => {
515
+ if (this.activationType === "automatic") {
516
+ this.autoSetValueOnMenuKeyDown(event);
517
+ }
518
+ else if (this.activationType === "manual" && !this.isSearchBar) {
519
+ this.manualSetInputValueKeyboardOpen(event);
520
+ }
521
+ };
522
+ this.handleMenuKeyUp = (event) => {
523
+ if (event.key === "Tab" && event.shiftKey) {
524
+ this.preventClickOpen = false;
525
+ }
526
+ if (event.key === "Enter" && this.disabledOptionSelected) {
527
+ this.disabledOptionSelected = false;
528
+ event.stopImmediatePropagation();
529
+ }
530
+ if (event.key === "Shift") {
531
+ this.shiftPressed = false;
532
+ }
533
+ };
534
+ this.handleSelectAllClick = () => {
535
+ this.keyboardNav = false;
536
+ this.menu.focus();
537
+ this.emitSelectAll();
538
+ this.lastOptionFocused = null;
539
+ this.lastOptionSelected = null;
540
+ };
541
+ this.handleSelectAllBlur = (event) => {
542
+ this.host.classList.remove("ic-select-select-all-focused");
543
+ if (!this.menu.contains(event.relatedTarget)) {
544
+ this.handleMenuChange(false, false);
545
+ }
546
+ };
547
+ this.handleSelectAllFocus = () => {
548
+ this.host.classList.add("ic-select-select-all-focused");
549
+ this.lastOptionFocused = null;
550
+ this.lastOptionSelected = null;
551
+ };
552
+ // Fix for Safari - select all button click was causing menu to close
553
+ this.handleSelectAllMouseDown = (event) => {
554
+ event.preventDefault();
555
+ };
556
+ // When shift key is being used to select contiguous options one by one on a multi-select
557
+ // I.e. holding shift and pressing up and down arrow keys
558
+ this.handleSingleShiftSelect = (event, optionToSelectIndex, options) => {
559
+ if (this.isMultiSelect &&
560
+ event.shiftKey &&
561
+ !this.isOptionSelected(optionToSelectIndex)) {
562
+ this.selectHighlightedOption(options, optionToSelectIndex);
563
+ this.lastOptionSelected = optionToSelectIndex;
564
+ }
565
+ };
566
+ // When shift key is being used to select multiple options at once on a multi-select
567
+ // I.e. holding shift when selecting another option
568
+ this.handleMultipleShiftSelect = (lastOptionInSelection, useFocusForSelection = false, firstOptionSelected = null) => {
569
+ this.shiftPressed = false;
570
+ const firstOptionInSelection = firstOptionSelected === null
571
+ ? this.getFirstOptionInSelection(useFocusForSelection)
572
+ : firstOptionSelected;
573
+ if (firstOptionInSelection !== null) {
574
+ const optionsToSelect = [];
575
+ if (firstOptionInSelection < lastOptionInSelection) {
576
+ for (let i = firstOptionInSelection; i < lastOptionInSelection + 1; i++) {
577
+ optionsToSelect.push(i);
578
+ }
579
+ }
580
+ else {
581
+ for (let i = firstOptionInSelection; i > lastOptionInSelection - 1; i--) {
582
+ optionsToSelect.push(i);
583
+ }
584
+ }
585
+ optionsToSelect.forEach((optionIndex) => !this.isOptionSelected(optionIndex) && this.setInputValue(optionIndex));
586
+ this.deselectSelectedOptions(optionsToSelect);
587
+ }
588
+ };
589
+ this.handleOptionSelect = (event, optionIndex, useFocusForSelection = false) => {
590
+ const menuOptions = this.getMenuOptions();
591
+ const firstOptionInSelection = this.getFirstOptionInSelection(useFocusForSelection);
592
+ if (event.shiftKey && firstOptionInSelection !== null) {
593
+ this.handleMultipleShiftSelect(optionIndex, useFocusForSelection, firstOptionInSelection);
594
+ }
595
+ else {
596
+ this.selectHighlightedOption(menuOptions, optionIndex);
597
+ }
598
+ this.lastOptionFocused = optionIndex;
599
+ this.lastOptionSelected = optionIndex;
600
+ };
601
+ this.getFirstOptionInSelection = (useFocusForSelection) => {
602
+ return useFocusForSelection && this.lastOptionFocused !== null
603
+ ? this.lastOptionFocused
604
+ : this.lastOptionSelected !== null
605
+ ? this.lastOptionSelected
606
+ : null;
607
+ };
608
+ this.emitSelectAll = () => {
609
+ var _a;
610
+ // Select all if there is either no value or not all options are selected
611
+ // 'true' means select all, 'false' means clear all
612
+ this.menuOptionSelectAll.emit({
613
+ select: !this.value || !(((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) === this.ungroupedOptions.length),
614
+ });
615
+ };
616
+ this.emitMenuKeyPress = (isNavKey, key) => {
617
+ this.menuKeyPress.emit({ isNavKey: isNavKey, key: key });
618
+ };
619
+ // Determines keyboard behaviour when selection is automatic
620
+ // (i.e. you don't have to press Enter select an option - just focus on it)
621
+ // and menu is focused
622
+ this.autoSetValueOnMenuKeyDown = (event) => {
623
+ event.cancelBubble = true;
624
+ const selectedOptionIndex = this.ungroupedOptions.findIndex((option) => option[this.valueField] === this.value);
625
+ const isSearchableSelect = this.inputEl.tagName === "INPUT";
626
+ this.keyboardNav = false;
627
+ switch (event.key) {
628
+ case " ":
629
+ event.preventDefault();
630
+ break;
631
+ case "ArrowUp":
632
+ if (!this.hasTimedOut) {
633
+ event.preventDefault();
634
+ this.setPreviousOptionValue(selectedOptionIndex);
635
+ this.keyboardNav = true;
636
+ }
637
+ break;
638
+ case "ArrowDown":
639
+ if (!this.hasTimedOut) {
640
+ event.preventDefault();
641
+ this.setNextOptionValue(selectedOptionIndex);
642
+ this.keyboardNav = true;
643
+ }
644
+ break;
645
+ case "Home":
646
+ this.menuOptionSelect.emit({
647
+ value: this.ungroupedOptions[0][this.valueField],
648
+ });
649
+ this.keyboardNav = true;
650
+ break;
651
+ case "End":
652
+ this.menuOptionSelect.emit({
653
+ value: this.ungroupedOptions[this.ungroupedOptions.length - 1][this.valueField],
654
+ });
655
+ this.keyboardNav = true;
656
+ break;
657
+ case "Enter":
658
+ !this.hasTimedOut && this.handleMenuChange(false);
659
+ break;
660
+ case "Escape":
661
+ this.handleMenuChange(false);
662
+ break;
663
+ case "Backspace":
664
+ if (isSearchableSelect) {
665
+ this.inputEl.focus();
666
+ }
667
+ break;
668
+ case "Shift":
669
+ break;
670
+ default:
671
+ if (isSearchableSelect && event.key !== "Tab" && !this.hasTimedOut) {
672
+ this.inputEl.focus();
673
+ }
674
+ if (event.key.length === 1) {
675
+ this.keyboardNav = true;
676
+ }
677
+ break;
678
+ }
679
+ this.emitMenuKeyPress(this.keyboardNav, event.key);
680
+ };
681
+ this.getOptionId = (value) => {
682
+ return `${this.menuId}-${value}`;
683
+ };
684
+ this.getOptionAriaLabel = (option, parentOption) => {
685
+ let ariaLabel = option[this.labelField];
686
+ if (option.description) {
687
+ ariaLabel = `${ariaLabel}, ${option.description}`;
688
+ }
689
+ if (option.element) {
690
+ ariaLabel = `${ariaLabel}, ${option.element.ariaLabel}`;
691
+ }
692
+ if (parentOption) {
693
+ return `${ariaLabel}, ${parentOption[this.labelField]} group`;
694
+ }
695
+ else {
696
+ return ariaLabel;
697
+ }
698
+ };
699
+ this.getSortedOptions = (options) => {
700
+ let sorted = [];
701
+ if (options.sort) {
702
+ sorted = options.sort((optionA, optionB) => optionA.recommended && !optionB.recommended ? -1 : 0);
703
+ }
704
+ return sorted;
705
+ };
706
+ this.getOptionHighlightedIndex = () => {
707
+ const menuOptions = this.getMenuOptions();
708
+ return menuOptions.findIndex((option) => option[this.valueField] === this.optionHighlighted);
709
+ };
710
+ this.isManualMode = this.activationType === "manual";
711
+ this.scrollToSelected = (menu) => {
712
+ const selectedOption = this.selectOnEnter
713
+ ? this.host.querySelector(`li[data-value="${this.optionHighlighted}"]`)
714
+ : menu.querySelector(".option[aria-selected='true']");
715
+ if (selectedOption) {
716
+ const elTop = selectedOption.offsetTop + selectedOption.offsetHeight;
717
+ if (elTop > menu.scrollTop + menu.offsetHeight ||
718
+ elTop < menu.scrollTop + menu.offsetHeight) {
719
+ menu.scrollTop = selectedOption.offsetTop;
720
+ }
721
+ // 'aria-activedescendant' affects screen reader focus
722
+ // https://www.w3.org/TR/2017/WD-wai-aria-practices-1.1-20170628/#kbd_focus_activedescendant
723
+ this.menu.setAttribute(this.ACTIVE_DESCENDANT, selectedOption.id);
724
+ selectedOption.focus();
725
+ }
726
+ };
727
+ // Set 'ungroupedOptions' variable and emit its value
728
+ // - this is all the options with disabled options and group titles removed
729
+ this.loadUngroupedOptions = () => {
730
+ if (this.options.length > 0 && this.options.map) {
731
+ this.options.map((option) => {
732
+ if (option.children) {
733
+ option.children.map((option) => !option.disabled && this.ungroupedOptions.push(option));
734
+ }
735
+ else if (!option.disabled) {
736
+ this.ungroupedOptions.push(option);
737
+ }
738
+ });
739
+ }
740
+ this.ungroupedOptions = this.getSortedOptions(this.ungroupedOptions);
741
+ this.ungroupedOptionsSet.emit({ options: this.ungroupedOptions });
742
+ };
743
+ this.setMenuScrollbar = () => {
744
+ let optionsHeight = 0;
745
+ this.host
746
+ .querySelectorAll(".option")
747
+ .forEach((option) => (optionsHeight += option.clientHeight));
748
+ if (optionsHeight >= 320) {
749
+ this.menu.classList.add("menu-scroll");
750
+ }
751
+ };
752
+ this.handleTimeoutBlur = (ev) => {
753
+ this.timeoutBlur.emit({ ev });
754
+ };
755
+ this.optionContent = (option, selected) => {
756
+ const showCheckIcon = !!option[this.valueField] &&
757
+ !!this.value &&
758
+ selected &&
759
+ this.parentEl.tagName !== "IC-SEARCH-BAR";
760
+ return (index.h(index.Fragment, null, option.loading && index.h("ic-loading-indicator", { size: "icon" }), index.h("div", { class: {
761
+ "option-text-container": true,
762
+ "show-check-icon": showCheckIcon,
763
+ } }, index.h("div", { class: "option-label" }, option.icon && (index.h("div", { class: "option-icon", innerHTML: option.icon, "aria-hidden": "true" })), index.h("ic-typography", { variant: "body", "aria-hidden": "true" }, option[this.labelField])), option.description && (index.h("ic-typography", { id: `${this.getOptionId(option[this.valueField])}-description`, class: "option-description", variant: "caption", "aria-hidden": "true" }, index.h("p", null, option.description))), option.element && (index.h("div", { class: "option-element", innerHTML: option.element.component, "aria-hidden": "true" }))), showCheckIcon && index.h("span", { class: "check-icon", innerHTML: checkIcon.Check })));
764
+ };
765
+ this.displayOption = (option, selected, index$1, parentOption) => {
766
+ const { open, keyboardNav, isManualMode, initialOptionsListRender, optionHighlighted, options, } = this;
767
+ return (index.h("li", { id: this.getOptionId(option[this.valueField]), class: {
768
+ option: true,
769
+ "focused-option": isManualMode
770
+ ? (keyboardNav || initialOptionsListRender) &&
771
+ option[this.valueField] === optionHighlighted
772
+ : keyboardNav && selected,
773
+ "last-recommended-option": option.recommended &&
774
+ options[index$1 + 1] &&
775
+ !options[index$1 + 1].recommended,
776
+ "disabled-option": option.disabled,
777
+ "loading-option": option.loading,
778
+ timeout: option.timedOut,
779
+ }, role: "option", tabindex: open &&
780
+ (selected || option[this.valueField] === optionHighlighted) &&
781
+ keyboardNav
782
+ ? "0"
783
+ : "-1", "aria-label": this.getOptionAriaLabel(option, parentOption), "aria-selected": selected ? "true" : "false", "aria-disabled": option.disabled ? "true" : "false", onClick: !option.timedOut && !option.loading && this.handleOptionClick, onBlur: this.handleBlur, onMouseDown: this.handleMouseDown, "data-value": option[this.valueField], "data-label": option[this.labelField] }, option.timedOut ? (index.h(index.Fragment, null, index.h("div", { class: "loading-error-info" }, index.h("svg", { class: "error-icon-svg", "aria-labelledby": "error-title", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "#000000" }, index.h("title", { id: "error-title" }, "Error"), index.h("g", { id: "close-octagon" }, index.h("path", { id: "Vector", d: "M8.77 3L3.5 8.27V15.73L8.77 21H16.23L21.5 15.73V8.27L16.23 3M8.91 7L12.5 10.59L16.09 7L17.5 8.41L13.91 12L17.5 15.59L16.09 17L12.5 13.41L8.91 17L7.5 15.59L11.09 12L7.5 8.41" }))), index.h("ic-typography", { variant: "label" }, option[this.labelField])), index.h("ic-button", { size: "small", variant: "tertiary", onClick: this.handleRetry, onKeyDown: this.handleRetryKeyDown, onBlur: this.handleTimeoutBlur, id: "retry-button" }, "Retry"))) : (this.optionContent(option, selected))));
784
+ };
785
+ this.focusFromSearchKeypress = false;
786
+ this.initialOptionsListRender = false;
787
+ this.keyboardNav = false;
788
+ this.optionHighlighted = undefined;
789
+ this.preventIncorrectTabOrder = false;
790
+ this.menuOptions = undefined;
791
+ this.activationType = "automatic";
792
+ this.anchorEl = undefined;
793
+ this.autoFocusOnSelected = true;
794
+ this.closeOnSelect = true;
795
+ this.fullWidth = false;
796
+ this.inputEl = undefined;
797
+ this.inputLabel = undefined;
798
+ this.labelField = "label";
799
+ this.menuId = undefined;
800
+ this.open = undefined;
801
+ this.parentEl = undefined;
802
+ this.searchMode = "navigation";
803
+ this.selectOnEnter = false;
804
+ this.size = "medium";
805
+ this.options = undefined;
806
+ this.value = undefined;
807
+ this.valueField = "value";
808
+ }
809
+ watchOpenHandler() {
810
+ if (!this.open && this.popperInstance) {
811
+ this.popperInstance.destroy();
812
+ this.popperInstance = null;
813
+ }
814
+ }
815
+ watchOptionsHandler(newOptions) {
816
+ this.hasTimedOut = newOptions.some((opt) => opt.timedOut);
817
+ this.isLoading = newOptions.some((opt) => opt.loading);
818
+ this.ungroupedOptions = [];
819
+ this.loadUngroupedOptions();
820
+ }
821
+ connectedCallback() {
822
+ this.getParentEl(this.parentEl);
823
+ if (this.isSearchBar) {
824
+ if (this.searchMode === "navigation")
825
+ this.setHighlightedOption(0);
826
+ this.initialOptionsListRender = true;
827
+ }
828
+ }
829
+ disconnectedCallback() {
830
+ var _a, _b;
831
+ if (this.popperInstance) {
832
+ this.popperInstance.destroy();
833
+ }
834
+ (_a = this.parentEl) === null || _a === void 0 ? void 0 : _a.removeEventListener("icClear", this.handleClearListener);
835
+ (_b = this.parentEl) === null || _b === void 0 ? void 0 : _b.removeEventListener("icSubmitSearch", this.handleSubmitSearch);
836
+ }
837
+ componentWillLoad() {
838
+ var _a, _b;
839
+ this.loadUngroupedOptions();
840
+ this.parentEl.addEventListener("icClear", this.handleClearListener);
841
+ this.parentEl.addEventListener("icSubmitSearch", this.handleSubmitSearch);
842
+ this.hasTimedOut = (_a = this.options) === null || _a === void 0 ? void 0 : _a.some((opt) => opt.timedOut);
843
+ this.isLoading = (_b = this.options) === null || _b === void 0 ? void 0 : _b.some((opt) => opt.loading);
844
+ }
845
+ componentDidLoad() {
846
+ if (this.isSearchBar &&
847
+ this.parentEl.disableAutoFiltering) {
848
+ this.focusFromSearchKeypress = true;
849
+ }
850
+ helpers.onComponentRequiredPropUndefined([
851
+ { prop: this.open, propName: "open" },
852
+ { prop: this.options, propName: "options" },
853
+ { prop: this.menuId, propName: "menu-id" },
854
+ { prop: this.inputLabel, propName: "input-label" },
855
+ //NOTE: no check for value, input-el or anchor-el as otherwise get console errors on first load of select component
856
+ ], "Menu");
857
+ }
858
+ componentDidUpdate() {
859
+ const inputValueInOptions = this.options.some((option) => option[this.valueField] === this.value);
860
+ if (this.open && this.options.length !== 0 && !this.preventMenuFocus) {
861
+ if (this.value &&
862
+ this.keyboardNav &&
863
+ inputValueInOptions &&
864
+ this.autoFocusOnSelected &&
865
+ !this.isSearchableSelect) {
866
+ this.scrollToSelected(this.menu);
867
+ }
868
+ else if (this.selectOnEnter) {
869
+ this.menu.focus();
870
+ }
871
+ else if (!!this.optionHighlighted &&
872
+ !this.focusFromSearchKeypress &&
873
+ !this.preventIncorrectTabOrder) {
874
+ const highlightedEl = this.host.querySelector(`li[data-value="${this.optionHighlighted}"]`);
875
+ if (highlightedEl) {
876
+ this.menu.setAttribute(this.ACTIVE_DESCENDANT, highlightedEl.id);
877
+ highlightedEl.focus();
878
+ }
879
+ }
880
+ else if (this.inputEl.tagName !== "IC-TEXT-FIELD" &&
881
+ this.inputEl.tagName !== "INPUT") {
882
+ this.menu.focus();
883
+ }
884
+ }
885
+ if (this.open && !this.value && this.selectOnEnter) {
886
+ this.scrollToSelected(this.menu);
887
+ }
888
+ this.preventMenuFocus = false;
889
+ }
890
+ componentDidRender() {
891
+ if (this.open && !this.popperInstance && this.anchorEl) {
892
+ this.initPopperJs(this.anchorEl);
893
+ }
894
+ if (this.open && !!this.options.length) {
895
+ this.setMenuScrollbar();
896
+ }
897
+ }
898
+ /**
899
+ * @internal If menu is opened with the mouse, emit menuStateChange custom event.
900
+ */
901
+ async handleClickOpen() {
902
+ if (!this.preventClickOpen) {
903
+ this.menuStateChange.emit({ open: !this.open });
904
+ this.keyboardNav = false;
905
+ }
906
+ this.preventClickOpen = false;
907
+ }
908
+ /**
909
+ * Used alongside activationType
910
+ * If menu is opened via keyboard navigation (i.e. Enter, ArrowUp or ArrowDown), emit optionSelect custom event.
911
+ * @param {KeyboardEvent} event The keyboard event which is available when handleKeyboardOpen is invoked.
912
+ */
913
+ async handleKeyboardOpen(event) {
914
+ if (this.activationType === "automatic") {
915
+ this.autoSetInputValueKeyboardOpen(event);
916
+ }
917
+ else {
918
+ this.manualSetInputValueKeyboardOpen(event);
919
+ }
920
+ }
921
+ /**
922
+ * @internal Used to highlight the first option in the menu.
923
+ */
924
+ async handleSetFirstOption() {
925
+ this.setHighlightedOption(0);
926
+ }
927
+ /**
928
+ * @internal Used to initialize popperJS with an anchor element.
929
+ * 5/12/2023: Tested with Floating UI, however, discovered inconsistent
930
+ * boundary behaviour so sticking with PopperJS.
931
+ */
932
+ async initPopperJs(anchor) {
933
+ // Placements set to "-start" to accommodate for custom menu width - menu should always be aligned to the left
934
+ this.popperInstance = popper.createPopper(anchor, this.host, {
935
+ placement: "bottom-start",
936
+ modifiers: [
937
+ {
938
+ name: "offset",
939
+ options: {
940
+ offset: [0, 7],
941
+ },
942
+ },
943
+ {
944
+ name: "flip",
945
+ options: {
946
+ fallbackPlacements: ["top-start"],
947
+ rootBoundary: "viewport",
948
+ },
949
+ },
950
+ ],
951
+ });
952
+ }
953
+ focusOnSearchOrSelectInput(menuOptions, highlightedOptionIndex) {
954
+ if (!menuOptions[highlightedOptionIndex])
955
+ return;
956
+ if (this.isSearchBar) {
957
+ this.parentEl.setFocus();
958
+ if (this.searchMode === "navigation")
959
+ this.setHighlightedOption(0);
960
+ }
961
+ if (this.isSearchableSelect) {
962
+ this.parentEl.setFocus();
963
+ }
964
+ this.focusFromSearchKeypress = true;
965
+ }
966
+ render() {
967
+ const { inputLabel, options, menuId, value, fullWidth, hasTimedOut, isLoading, size, open, inputEl, keyboardNav, } = this;
968
+ const selectAllButtonText = `${(value === null || value === void 0 ? void 0 : value.length) === this.ungroupedOptions.length ? "Clear" : "Select"} all`;
969
+ const hasNoResults = this.host.classList.contains("no-results");
970
+ return (index.h(index.Host, { class: {
971
+ "ic-menu-full-width": fullWidth,
972
+ "ic-menu-no-focus": (inputEl === null || inputEl === void 0 ? void 0 : inputEl.tagName) === "INPUT" || hasTimedOut || isLoading,
973
+ [`ic-menu-${size}`]: true,
974
+ "ic-menu-open": open && options.length !== 0,
975
+ "ic-menu-multiple": this.isMultiSelect,
976
+ } }, options.length !== 0 && (index.h("ul", { id: menuId, class: "menu", role: "listbox", "aria-label": `${inputLabel} pop-up`, "aria-multiselectable": this.isMultiSelect ? "true" : "false", tabindex: open && !keyboardNav && (inputEl === null || inputEl === void 0 ? void 0 : inputEl.tagName) !== "INPUT" ? "0" : "-1", ref: (el) => (this.menu = el), onKeyDown: this.handleMenuKeyDown, onKeyUp: this.handleMenuKeyUp, onBlur: this.handleBlur }, this.getSortedOptions(options).map((option, index$1) => {
977
+ if (option.children) {
978
+ if (option.children.length > 0) {
979
+ return (index.h("div", null, index.h("ic-typography", { class: "option-group-title", role: "presentation", variant: "subtitle-small" }, index.h("p", null, option[this.labelField])), option.children.map((childOption) => childOption.label &&
980
+ this.displayOption(childOption, this.isMultiSelect
981
+ ? value === null || value === void 0 ? void 0 : value.includes(childOption[this.valueField])
982
+ : childOption[this.valueField] === value, index$1, option))));
983
+ }
984
+ else {
985
+ return null;
986
+ }
987
+ }
988
+ else {
989
+ // Display option only if it has a label (rather than displaying an empty space)
990
+ return (option.label &&
991
+ this.displayOption(option, this.isMultiSelect
992
+ ? value === null || value === void 0 ? void 0 : value.includes(option[this.valueField])
993
+ : option[this.valueField] === value, index$1));
994
+ }
995
+ }))), options.length !== 0 &&
996
+ this.isMultiSelect &&
997
+ !isLoading &&
998
+ !hasTimedOut &&
999
+ !hasNoResults && (index.h("div", { class: "option-bar" }, index.h("ic-typography", null, index.h("p", null, `${value ? value.length : 0}/${helpers.getOptionsWithoutGroupTitlesCount(this.options)} selected`)), index.h("ic-button", { class: "select-all-button", "aria-label": `${selectAllButtonText} options for ${inputLabel}`, ref: (el) => (this.selectAllButton = el), variant: "tertiary", onClick: this.handleSelectAllClick, onMouseDown: this.handleSelectAllMouseDown, onBlur: this.handleSelectAllBlur, onFocus: this.handleSelectAllFocus, size: size === "small" ? "small" : "medium" }, selectAllButtonText)))));
1000
+ }
1001
+ get host() { return index.getElement(this); }
1002
+ static get watchers() { return {
1003
+ "open": ["watchOpenHandler"],
1004
+ "options": ["watchOptionsHandler"]
1005
+ }; }
1006
+ };
1007
+ Menu.style = icMenuCss;
1008
+
1009
+ exports.ic_input_component_container = InputComponentContainer;
1010
+ exports.ic_input_container = InputContainer;
1011
+ exports.ic_menu = Menu;
1012
+
1013
+ //# sourceMappingURL=ic-input-component-container_3.cjs.entry.js.map