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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (465) 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 +1 -1
  7. package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
  8. package/dist/cjs/ic-alert.cjs.entry.js +2 -2
  9. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  10. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  11. package/dist/cjs/ic-badge.cjs.entry.js +1 -1
  12. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  13. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  14. package/dist/cjs/ic-button_3.cjs.entry.js +2 -2
  15. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ic-card-horizontal.cjs.entry.js +1 -1
  17. package/dist/cjs/ic-card-vertical.cjs.entry.js +1 -1
  18. package/dist/cjs/ic-checkbox-group.cjs.entry.js +2 -2
  19. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ic-checkbox.cjs.entry.js +3 -3
  21. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  22. package/dist/cjs/ic-chip.cjs.entry.js +1 -1
  23. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  24. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +1 -1
  25. package/dist/cjs/ic-data-table.cjs.entry.js +23 -2
  26. package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
  27. package/dist/cjs/ic-date-input.cjs.entry.js +10 -9
  28. package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ic-date-picker.cjs.entry.js +3 -1
  30. package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
  31. package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
  32. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  33. package/dist/cjs/ic-empty-state_2.cjs.entry.js +9 -8
  34. package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -1
  35. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  36. package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
  37. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  38. package/dist/cjs/ic-hero.cjs.entry.js +1 -1
  39. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
  40. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +1012 -0
  41. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -0
  42. package/dist/cjs/ic-input-label_2.cjs.entry.js +86 -0
  43. package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -0
  44. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  45. package/dist/cjs/ic-menu-group.cjs.entry.js +2 -2
  46. package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -1
  47. package/dist/cjs/ic-menu-item.cjs.entry.js +2 -2
  48. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  49. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  50. package/dist/cjs/ic-navigation-group.cjs.entry.js +2 -2
  51. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  52. package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
  53. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  54. package/dist/cjs/ic-page-header.cjs.entry.js +5 -5
  55. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  56. package/dist/cjs/ic-pagination_4.cjs.entry.js +148 -38
  57. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  58. package/dist/cjs/ic-popover-menu.cjs.entry.js +9 -9
  59. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  60. package/dist/cjs/ic-radio-group.cjs.entry.js +2 -2
  61. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  62. package/dist/cjs/ic-radio-option.cjs.entry.js +27 -22
  63. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  64. package/dist/cjs/ic-search-bar.cjs.entry.js +2 -2
  65. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  66. package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
  67. package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
  68. package/dist/cjs/ic-step.cjs.entry.js +1 -1
  69. package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
  70. package/dist/cjs/ic-switch.cjs.entry.js +7 -4
  71. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  72. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  73. package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
  74. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  75. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  76. package/dist/cjs/ic-toast.cjs.entry.js +1 -1
  77. package/dist/cjs/ic-toggle-button.cjs.entry.js +1 -1
  78. package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
  79. package/dist/cjs/ic-tree-item.cjs.entry.js +5 -3
  80. package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -1
  81. package/dist/cjs/ic-tree-view.cjs.entry.js +10 -2
  82. package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -1
  83. package/dist/cjs/ic-typography.cjs.entry.js +1 -1
  84. package/dist/cjs/index-4cf27b16.js +4 -12
  85. package/dist/cjs/loader.cjs.js +1 -1
  86. package/dist/collection/collection-manifest.json +0 -2
  87. package/dist/collection/components/ic-data-table/ic-data-table.js +24 -3
  88. package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
  89. package/dist/collection/components/ic-date-input/ic-date-input.js +27 -8
  90. package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
  91. package/dist/collection/components/ic-date-picker/ic-date-picker.js +20 -0
  92. package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
  93. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +26 -7
  94. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
  95. package/dist/collection/components/ic-tree-item/ic-tree-item.css +11 -0
  96. package/dist/collection/components/ic-tree-item/ic-tree-item.js +23 -3
  97. package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -1
  98. package/dist/collection/components/ic-tree-view/ic-tree-view.js +29 -1
  99. package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -1
  100. package/dist/collection/utils/helpers.js +1 -1
  101. package/dist/collection/utils/helpers.js.map +1 -1
  102. package/dist/collection/utils/types.js.map +1 -1
  103. package/dist/components/helpers.js +22 -1
  104. package/dist/components/helpers.js.map +1 -1
  105. package/dist/components/helpers2.js +14 -121
  106. package/dist/components/helpers2.js.map +1 -1
  107. package/dist/components/ic-alert.js +1 -1
  108. package/dist/components/ic-alert.js.map +1 -1
  109. package/dist/components/ic-checkbox-group.js +1 -1
  110. package/dist/components/ic-checkbox-group.js.map +1 -1
  111. package/dist/components/ic-checkbox.js +2 -2
  112. package/dist/components/ic-checkbox.js.map +1 -1
  113. package/dist/components/ic-data-table.js +23 -2
  114. package/dist/components/ic-data-table.js.map +1 -1
  115. package/dist/components/ic-date-input2.js +11 -9
  116. package/dist/components/ic-date-input2.js.map +1 -1
  117. package/dist/components/ic-date-picker.js +4 -1
  118. package/dist/components/ic-date-picker.js.map +1 -1
  119. package/dist/components/ic-footer.js +1 -1
  120. package/dist/components/ic-horizontal-scroll2.js +1 -1
  121. package/dist/components/ic-input-label2.js +10 -6
  122. package/dist/components/ic-input-label2.js.map +1 -1
  123. package/dist/components/ic-loading-indicator2.js +1 -1
  124. package/dist/components/ic-loading-indicator2.js.map +1 -1
  125. package/dist/components/ic-menu-group.js +1 -1
  126. package/dist/components/ic-menu-group.js.map +1 -1
  127. package/dist/components/ic-menu-item2.js +1 -1
  128. package/dist/components/ic-menu-item2.js.map +1 -1
  129. package/dist/components/ic-menu2.js +450 -167
  130. package/dist/components/ic-menu2.js.map +1 -1
  131. package/dist/components/ic-navigation-group.js +2 -2
  132. package/dist/components/ic-navigation-group.js.map +1 -1
  133. package/dist/components/ic-navigation-item.js +1 -1
  134. package/dist/components/ic-navigation-menu2.js +1 -1
  135. package/dist/components/ic-page-header.js +4 -4
  136. package/dist/components/ic-page-header.js.map +1 -1
  137. package/dist/components/ic-pagination-bar2.js +9 -7
  138. package/dist/components/ic-pagination-bar2.js.map +1 -1
  139. package/dist/components/ic-pagination-item2.js +1 -1
  140. package/dist/components/ic-popover-menu.js +10 -9
  141. package/dist/components/ic-popover-menu.js.map +1 -1
  142. package/dist/components/ic-radio-group.js +1 -1
  143. package/dist/components/ic-radio-group.js.map +1 -1
  144. package/dist/components/ic-radio-option.js +27 -22
  145. package/dist/components/ic-radio-option.js.map +1 -1
  146. package/dist/components/ic-search-bar.js +2 -2
  147. package/dist/components/ic-search-bar.js.map +1 -1
  148. package/dist/components/ic-select2.js +148 -37
  149. package/dist/components/ic-select2.js.map +1 -1
  150. package/dist/components/ic-side-navigation.js +1 -1
  151. package/dist/components/ic-stepper.js +1 -1
  152. package/dist/components/ic-switch.js +7 -3
  153. package/dist/components/ic-switch.js.map +1 -1
  154. package/dist/components/ic-text-field2.js +2 -2
  155. package/dist/components/ic-text-field2.js.map +1 -1
  156. package/dist/components/ic-theme.js +1 -1
  157. package/dist/components/ic-toast.js +1 -1
  158. package/dist/components/ic-top-navigation.js +1 -1
  159. package/dist/components/ic-tree-item.js +5 -2
  160. package/dist/components/ic-tree-item.js.map +1 -1
  161. package/dist/components/ic-tree-view.js +12 -2
  162. package/dist/components/ic-tree-view.js.map +1 -1
  163. package/dist/core/core.css +580 -10
  164. package/dist/core/core.esm.js +1 -1
  165. package/dist/core/core.esm.js.map +1 -1
  166. package/dist/core/{p-c033e7d6.entry.js → p-036d251b.entry.js} +2 -2
  167. package/dist/core/{p-9397b15b.js → p-043cf5de.js} +2 -2
  168. package/dist/core/p-043cf5de.js.map +1 -0
  169. package/dist/core/p-044689ef.entry.js +2 -0
  170. package/dist/core/p-044689ef.entry.js.map +1 -0
  171. package/dist/core/p-095da817.entry.js +2 -0
  172. package/dist/core/p-095da817.entry.js.map +1 -0
  173. package/dist/core/{p-d2e7a256.entry.js → p-13d2db9b.entry.js} +2 -2
  174. package/dist/core/p-13e01a1e.entry.js +2 -0
  175. package/dist/core/p-13e01a1e.entry.js.map +1 -0
  176. package/dist/core/p-1ae71507.entry.js +2 -0
  177. package/dist/core/p-1ae71507.entry.js.map +1 -0
  178. package/dist/core/p-2200ca85.entry.js +2 -0
  179. package/dist/core/p-2200ca85.entry.js.map +1 -0
  180. package/dist/core/{p-42e0f3bd.entry.js → p-2257f5e8.entry.js} +2 -2
  181. package/dist/core/{p-897b8d16.entry.js → p-24d03bbd.entry.js} +2 -2
  182. package/dist/core/{p-a78cf2cb.entry.js → p-266098ee.entry.js} +2 -2
  183. package/dist/core/{p-bb1252fa.entry.js → p-26613dbd.entry.js} +2 -2
  184. package/dist/core/p-283a2274.entry.js +2 -0
  185. package/dist/core/p-283a2274.entry.js.map +1 -0
  186. package/dist/core/{p-77a32de5.entry.js → p-2a3bd99a.entry.js} +2 -2
  187. package/dist/core/p-42f88966.entry.js +2 -0
  188. package/dist/core/p-42f88966.entry.js.map +1 -0
  189. package/dist/core/{p-7c268030.entry.js → p-48a78218.entry.js} +2 -2
  190. package/dist/core/p-4e316ae5.entry.js +2 -0
  191. package/dist/core/p-4e316ae5.entry.js.map +1 -0
  192. package/dist/core/p-50dd2744.entry.js +2 -0
  193. package/dist/core/p-50dd2744.entry.js.map +1 -0
  194. package/dist/core/{p-4e28ef60.entry.js → p-51ea45cb.entry.js} +2 -2
  195. package/dist/core/{p-4e28ef60.entry.js.map → p-51ea45cb.entry.js.map} +1 -1
  196. package/dist/core/p-5458d818.entry.js +2 -0
  197. package/dist/core/p-5458d818.entry.js.map +1 -0
  198. package/dist/core/{p-202bc922.entry.js → p-5ad1a7fb.entry.js} +2 -2
  199. package/dist/core/{p-f9810621.entry.js → p-5b061abc.entry.js} +2 -2
  200. package/dist/core/{p-6beffd0e.entry.js → p-6727166b.entry.js} +2 -2
  201. package/dist/core/{p-8ca2e329.entry.js → p-6dc00a8f.entry.js} +2 -2
  202. package/dist/core/{p-aeb6016c.entry.js → p-6dffaac0.entry.js} +2 -2
  203. package/dist/core/{p-aeb6016c.entry.js.map → p-6dffaac0.entry.js.map} +1 -1
  204. package/dist/core/p-6fd89ed5.entry.js +2 -0
  205. package/dist/core/p-6fd89ed5.entry.js.map +1 -0
  206. package/dist/core/{p-d5ca3bcb.entry.js → p-7aa6b76e.entry.js} +2 -2
  207. package/dist/core/{p-e5d99316.entry.js → p-7b90f0ae.entry.js} +2 -2
  208. package/dist/core/{p-30b046b2.entry.js → p-7e5b0fff.entry.js} +2 -2
  209. package/dist/core/{p-50019ede.entry.js → p-80b296cd.entry.js} +2 -2
  210. package/dist/core/{p-eb65e556.entry.js → p-82aa8136.entry.js} +2 -2
  211. package/dist/core/{p-2e49fb22.entry.js → p-83b4efe2.entry.js} +2 -2
  212. package/dist/core/p-83e4d955.entry.js +2 -0
  213. package/dist/core/p-83e4d955.entry.js.map +1 -0
  214. package/dist/core/{p-d3c0bffb.entry.js → p-86b608b5.entry.js} +2 -2
  215. package/dist/core/p-86b608b5.entry.js.map +1 -0
  216. package/dist/core/{p-5accf0bb.entry.js → p-878df16f.entry.js} +2 -2
  217. package/dist/core/p-89be0a21.js +2 -0
  218. package/dist/core/p-89be0a21.js.map +1 -0
  219. package/dist/core/{p-1fe35de1.entry.js → p-8bec76d1.entry.js} +2 -2
  220. package/dist/core/p-94141606.entry.js +2 -0
  221. package/dist/core/p-94141606.entry.js.map +1 -0
  222. package/dist/core/{p-1109636a.entry.js → p-94416b6b.entry.js} +2 -2
  223. package/dist/core/{p-4dcc37e7.entry.js → p-a4439688.entry.js} +2 -2
  224. package/dist/core/{p-8f12659d.entry.js → p-a8106c56.entry.js} +2 -2
  225. package/dist/core/p-a8106c56.entry.js.map +1 -0
  226. package/dist/core/{p-130a05cf.entry.js → p-affd7f55.entry.js} +2 -2
  227. package/dist/core/{p-486d8d43.entry.js → p-b3d93bc1.entry.js} +2 -2
  228. package/dist/core/{p-c1698936.entry.js → p-bac2beeb.entry.js} +2 -2
  229. package/dist/core/{p-53e00a8a.entry.js → p-c29b2b48.entry.js} +2 -2
  230. package/dist/core/{p-ed4cde5a.entry.js → p-c40c57ee.entry.js} +2 -2
  231. package/dist/core/{p-b0751bd9.entry.js → p-c6a62d1b.entry.js} +2 -2
  232. package/dist/core/{p-0ab10600.entry.js → p-cc22644d.entry.js} +2 -2
  233. package/dist/core/p-cfd81370.entry.js +2 -0
  234. package/dist/core/p-cfd81370.entry.js.map +1 -0
  235. package/dist/core/p-d53fb899.entry.js +2 -0
  236. package/dist/core/p-d53fb899.entry.js.map +1 -0
  237. package/dist/core/{p-28323849.entry.js → p-d5e9cf81.entry.js} +2 -2
  238. package/dist/core/{p-505250cf.entry.js → p-d7632baf.entry.js} +2 -2
  239. package/dist/core/{p-7c80d79c.entry.js → p-dcccd9c1.entry.js} +2 -2
  240. package/dist/core/{p-42883e4c.entry.js → p-edfd0946.entry.js} +2 -2
  241. package/dist/core/p-edfd0946.entry.js.map +1 -0
  242. package/dist/core/{p-7c78f6c6.entry.js → p-f1842a68.entry.js} +2 -2
  243. package/dist/core/p-f1842a68.entry.js.map +1 -0
  244. package/dist/core/p-f8c1d7e8.entry.js +2 -0
  245. package/dist/core/p-f8c1d7e8.entry.js.map +1 -0
  246. package/dist/core/{p-d03374fc.entry.js → p-fbb5c8f2.entry.js} +2 -2
  247. package/dist/core/{p-a9151d0b.entry.js → p-fc2f336d.entry.js} +2 -2
  248. package/dist/esm/core.js +1 -1
  249. package/dist/esm/{helpers-5bd2012a.js → helpers-a7b13f5a.js} +15 -122
  250. package/dist/esm/helpers-a7b13f5a.js.map +1 -0
  251. package/dist/esm/{helpers-dab8ddfe.js → helpers-c326255f.js} +23 -2
  252. package/dist/esm/helpers-c326255f.js.map +1 -0
  253. package/dist/esm/ic-accordion-group.entry.js +1 -1
  254. package/dist/esm/ic-accordion.entry.js +1 -1
  255. package/dist/esm/ic-alert.entry.js +2 -2
  256. package/dist/esm/ic-alert.entry.js.map +1 -1
  257. package/dist/esm/ic-back-to-top.entry.js +1 -1
  258. package/dist/esm/ic-badge.entry.js +1 -1
  259. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  260. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  261. package/dist/esm/ic-button_3.entry.js +2 -2
  262. package/dist/esm/ic-button_3.entry.js.map +1 -1
  263. package/dist/esm/ic-card-horizontal.entry.js +1 -1
  264. package/dist/esm/ic-card-vertical.entry.js +1 -1
  265. package/dist/esm/ic-checkbox-group.entry.js +2 -2
  266. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  267. package/dist/esm/ic-checkbox.entry.js +3 -3
  268. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  269. package/dist/esm/ic-chip.entry.js +1 -1
  270. package/dist/esm/ic-data-row.entry.js +1 -1
  271. package/dist/esm/ic-data-table-title-bar.entry.js +1 -1
  272. package/dist/esm/ic-data-table.entry.js +23 -2
  273. package/dist/esm/ic-data-table.entry.js.map +1 -1
  274. package/dist/esm/ic-date-input.entry.js +10 -9
  275. package/dist/esm/ic-date-input.entry.js.map +1 -1
  276. package/dist/esm/ic-date-picker.entry.js +3 -1
  277. package/dist/esm/ic-date-picker.entry.js.map +1 -1
  278. package/dist/esm/ic-dialog.entry.js +1 -1
  279. package/dist/esm/ic-divider.entry.js +1 -1
  280. package/dist/esm/ic-empty-state_2.entry.js +9 -8
  281. package/dist/esm/ic-empty-state_2.entry.js.map +1 -1
  282. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  283. package/dist/esm/ic-footer-link.entry.js +1 -1
  284. package/dist/esm/ic-footer.entry.js +1 -1
  285. package/dist/esm/ic-hero.entry.js +1 -1
  286. package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
  287. package/dist/{collection/components/ic-menu-with-multi/ic-menu.js → esm/ic-input-component-container_3.entry.js} +157 -727
  288. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -0
  289. package/dist/esm/ic-input-label_2.entry.js +81 -0
  290. package/dist/esm/ic-input-label_2.entry.js.map +1 -0
  291. package/dist/esm/ic-link.entry.js +1 -1
  292. package/dist/esm/ic-menu-group.entry.js +2 -2
  293. package/dist/esm/ic-menu-group.entry.js.map +1 -1
  294. package/dist/esm/ic-menu-item.entry.js +2 -2
  295. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  296. package/dist/esm/ic-navigation-button.entry.js +1 -1
  297. package/dist/esm/ic-navigation-group.entry.js +2 -2
  298. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  299. package/dist/esm/ic-navigation-item.entry.js +1 -1
  300. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  301. package/dist/esm/ic-page-header.entry.js +5 -5
  302. package/dist/esm/ic-page-header.entry.js.map +1 -1
  303. package/dist/esm/ic-pagination_4.entry.js +148 -38
  304. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  305. package/dist/esm/ic-popover-menu.entry.js +9 -9
  306. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  307. package/dist/esm/ic-radio-group.entry.js +2 -2
  308. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  309. package/dist/esm/ic-radio-option.entry.js +27 -22
  310. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  311. package/dist/esm/ic-search-bar.entry.js +2 -2
  312. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  313. package/dist/esm/ic-side-navigation.entry.js +1 -1
  314. package/dist/esm/ic-status-tag.entry.js +1 -1
  315. package/dist/esm/ic-step.entry.js +1 -1
  316. package/dist/esm/ic-stepper.entry.js +1 -1
  317. package/dist/esm/ic-switch.entry.js +7 -4
  318. package/dist/esm/ic-switch.entry.js.map +1 -1
  319. package/dist/esm/ic-tab-group.entry.js +1 -1
  320. package/dist/esm/ic-tab-panel.entry.js +1 -1
  321. package/dist/esm/ic-tab.entry.js +1 -1
  322. package/dist/esm/ic-theme.entry.js +1 -1
  323. package/dist/esm/ic-toast.entry.js +1 -1
  324. package/dist/esm/ic-toggle-button.entry.js +1 -1
  325. package/dist/esm/ic-top-navigation.entry.js +1 -1
  326. package/dist/esm/ic-tree-item.entry.js +5 -3
  327. package/dist/esm/ic-tree-item.entry.js.map +1 -1
  328. package/dist/esm/ic-tree-view.entry.js +10 -2
  329. package/dist/esm/ic-tree-view.entry.js.map +1 -1
  330. package/dist/esm/ic-typography.entry.js +1 -1
  331. package/dist/esm/index-93509377.js +4 -12
  332. package/dist/esm/loader.js +1 -1
  333. package/dist/types/components/ic-data-table/ic-data-table.d.ts +2 -0
  334. package/dist/types/components/ic-date-input/ic-date-input.d.ts +4 -0
  335. package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +4 -0
  336. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +5 -1
  337. package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +5 -1
  338. package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +5 -0
  339. package/dist/types/components.d.ts +46 -469
  340. package/dist/types/utils/helpers.d.ts +1 -1
  341. package/dist/types/utils/types.d.ts +1 -0
  342. package/hydrate/index.js +3612 -6848
  343. package/package.json +3 -3
  344. package/dist/cjs/helpers-33b42cd6.js.map +0 -1
  345. package/dist/cjs/helpers-6817cfbb.js.map +0 -1
  346. package/dist/cjs/ic-input-component-container_4.cjs.entry.js +0 -156
  347. package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +0 -1
  348. package/dist/cjs/ic-menu-with-multi.cjs.entry.js +0 -2738
  349. package/dist/cjs/ic-menu-with-multi.cjs.entry.js.map +0 -1
  350. package/dist/cjs/ic-menu.cjs.entry.js +0 -658
  351. package/dist/cjs/ic-menu.cjs.entry.js.map +0 -1
  352. package/dist/cjs/ic-select-with-multi.cjs.entry.js +0 -788
  353. package/dist/cjs/ic-select-with-multi.cjs.entry.js.map +0 -1
  354. package/dist/collection/components/ic-menu-with-multi/ic-menu.css +0 -712
  355. package/dist/collection/components/ic-menu-with-multi/ic-menu.js.map +0 -1
  356. package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js +0 -1057
  357. package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js.map +0 -1
  358. package/dist/collection/components/ic-select-with-multi/assets/Check.svg +0 -3
  359. package/dist/collection/components/ic-select-with-multi/assets/Clear.svg +0 -3
  360. package/dist/collection/components/ic-select-with-multi/assets/Expand.svg +0 -3
  361. package/dist/collection/components/ic-select-with-multi/ic-select.css +0 -695
  362. package/dist/collection/components/ic-select-with-multi/ic-select.js +0 -1520
  363. package/dist/collection/components/ic-select-with-multi/ic-select.js.map +0 -1
  364. package/dist/collection/components/ic-select-with-multi/story-data.js +0 -216
  365. package/dist/collection/components/ic-select-with-multi/story-data.js.map +0 -1
  366. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js +0 -1518
  367. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js.map +0 -1
  368. package/dist/components/ic-menu-with-multi.d.ts +0 -11
  369. package/dist/components/ic-menu-with-multi.js +0 -8
  370. package/dist/components/ic-menu-with-multi.js.map +0 -1
  371. package/dist/components/ic-menu3.js +0 -2803
  372. package/dist/components/ic-menu3.js.map +0 -1
  373. package/dist/components/ic-select-with-multi.d.ts +0 -11
  374. package/dist/components/ic-select-with-multi.js +0 -906
  375. package/dist/components/ic-select-with-multi.js.map +0 -1
  376. package/dist/core/p-0894cab1.entry.js +0 -2
  377. package/dist/core/p-0894cab1.entry.js.map +0 -1
  378. package/dist/core/p-1e2aa8a6.entry.js +0 -2
  379. package/dist/core/p-1e2aa8a6.entry.js.map +0 -1
  380. package/dist/core/p-297e99cf.js +0 -2
  381. package/dist/core/p-297e99cf.js.map +0 -1
  382. package/dist/core/p-2ff4e283.entry.js +0 -2
  383. package/dist/core/p-2ff4e283.entry.js.map +0 -1
  384. package/dist/core/p-3db785f0.entry.js +0 -2
  385. package/dist/core/p-3db785f0.entry.js.map +0 -1
  386. package/dist/core/p-42883e4c.entry.js.map +0 -1
  387. package/dist/core/p-59028160.entry.js +0 -2
  388. package/dist/core/p-59028160.entry.js.map +0 -1
  389. package/dist/core/p-5b7dfe57.entry.js +0 -2
  390. package/dist/core/p-5b7dfe57.entry.js.map +0 -1
  391. package/dist/core/p-603fea14.entry.js +0 -2
  392. package/dist/core/p-603fea14.entry.js.map +0 -1
  393. package/dist/core/p-64933069.entry.js +0 -2
  394. package/dist/core/p-64933069.entry.js.map +0 -1
  395. package/dist/core/p-7c78f6c6.entry.js.map +0 -1
  396. package/dist/core/p-8df49808.entry.js +0 -2
  397. package/dist/core/p-8df49808.entry.js.map +0 -1
  398. package/dist/core/p-8f12659d.entry.js.map +0 -1
  399. package/dist/core/p-903ee57e.entry.js +0 -2
  400. package/dist/core/p-903ee57e.entry.js.map +0 -1
  401. package/dist/core/p-92e3ccb9.entry.js +0 -2
  402. package/dist/core/p-92e3ccb9.entry.js.map +0 -1
  403. package/dist/core/p-9397b15b.js.map +0 -1
  404. package/dist/core/p-9b54feca.entry.js +0 -2
  405. package/dist/core/p-9b54feca.entry.js.map +0 -1
  406. package/dist/core/p-acc76b80.entry.js +0 -2
  407. package/dist/core/p-acc76b80.entry.js.map +0 -1
  408. package/dist/core/p-c1e90c85.entry.js +0 -2
  409. package/dist/core/p-c1e90c85.entry.js.map +0 -1
  410. package/dist/core/p-cb63e656.entry.js +0 -2
  411. package/dist/core/p-cb63e656.entry.js.map +0 -1
  412. package/dist/core/p-d3c0bffb.entry.js.map +0 -1
  413. package/dist/core/p-da3e8c54.entry.js +0 -2
  414. package/dist/core/p-da3e8c54.entry.js.map +0 -1
  415. package/dist/core/p-ec53b435.entry.js +0 -2
  416. package/dist/core/p-ec53b435.entry.js.map +0 -1
  417. package/dist/core/p-fb7b99dd.entry.js +0 -2
  418. package/dist/core/p-fb7b99dd.entry.js.map +0 -1
  419. package/dist/esm/helpers-5bd2012a.js.map +0 -1
  420. package/dist/esm/helpers-dab8ddfe.js.map +0 -1
  421. package/dist/esm/ic-input-component-container_4.entry.js +0 -149
  422. package/dist/esm/ic-input-component-container_4.entry.js.map +0 -1
  423. package/dist/esm/ic-menu-with-multi.entry.js +0 -2734
  424. package/dist/esm/ic-menu-with-multi.entry.js.map +0 -1
  425. package/dist/esm/ic-menu.entry.js +0 -654
  426. package/dist/esm/ic-menu.entry.js.map +0 -1
  427. package/dist/esm/ic-select-with-multi.entry.js +0 -784
  428. package/dist/esm/ic-select-with-multi.entry.js.map +0 -1
  429. package/dist/types/components/ic-menu-with-multi/ic-menu.d.ts +0 -214
  430. package/dist/types/components/ic-select-with-multi/ic-select.d.ts +0 -259
  431. package/dist/types/components/ic-select-with-multi/story-data.d.ts +0 -32
  432. /package/dist/core/{p-c033e7d6.entry.js.map → p-036d251b.entry.js.map} +0 -0
  433. /package/dist/core/{p-d2e7a256.entry.js.map → p-13d2db9b.entry.js.map} +0 -0
  434. /package/dist/core/{p-42e0f3bd.entry.js.map → p-2257f5e8.entry.js.map} +0 -0
  435. /package/dist/core/{p-897b8d16.entry.js.map → p-24d03bbd.entry.js.map} +0 -0
  436. /package/dist/core/{p-a78cf2cb.entry.js.map → p-266098ee.entry.js.map} +0 -0
  437. /package/dist/core/{p-bb1252fa.entry.js.map → p-26613dbd.entry.js.map} +0 -0
  438. /package/dist/core/{p-77a32de5.entry.js.map → p-2a3bd99a.entry.js.map} +0 -0
  439. /package/dist/core/{p-7c268030.entry.js.map → p-48a78218.entry.js.map} +0 -0
  440. /package/dist/core/{p-202bc922.entry.js.map → p-5ad1a7fb.entry.js.map} +0 -0
  441. /package/dist/core/{p-f9810621.entry.js.map → p-5b061abc.entry.js.map} +0 -0
  442. /package/dist/core/{p-6beffd0e.entry.js.map → p-6727166b.entry.js.map} +0 -0
  443. /package/dist/core/{p-8ca2e329.entry.js.map → p-6dc00a8f.entry.js.map} +0 -0
  444. /package/dist/core/{p-d5ca3bcb.entry.js.map → p-7aa6b76e.entry.js.map} +0 -0
  445. /package/dist/core/{p-e5d99316.entry.js.map → p-7b90f0ae.entry.js.map} +0 -0
  446. /package/dist/core/{p-30b046b2.entry.js.map → p-7e5b0fff.entry.js.map} +0 -0
  447. /package/dist/core/{p-50019ede.entry.js.map → p-80b296cd.entry.js.map} +0 -0
  448. /package/dist/core/{p-eb65e556.entry.js.map → p-82aa8136.entry.js.map} +0 -0
  449. /package/dist/core/{p-2e49fb22.entry.js.map → p-83b4efe2.entry.js.map} +0 -0
  450. /package/dist/core/{p-5accf0bb.entry.js.map → p-878df16f.entry.js.map} +0 -0
  451. /package/dist/core/{p-1fe35de1.entry.js.map → p-8bec76d1.entry.js.map} +0 -0
  452. /package/dist/core/{p-1109636a.entry.js.map → p-94416b6b.entry.js.map} +0 -0
  453. /package/dist/core/{p-4dcc37e7.entry.js.map → p-a4439688.entry.js.map} +0 -0
  454. /package/dist/core/{p-130a05cf.entry.js.map → p-affd7f55.entry.js.map} +0 -0
  455. /package/dist/core/{p-486d8d43.entry.js.map → p-b3d93bc1.entry.js.map} +0 -0
  456. /package/dist/core/{p-c1698936.entry.js.map → p-bac2beeb.entry.js.map} +0 -0
  457. /package/dist/core/{p-53e00a8a.entry.js.map → p-c29b2b48.entry.js.map} +0 -0
  458. /package/dist/core/{p-ed4cde5a.entry.js.map → p-c40c57ee.entry.js.map} +0 -0
  459. /package/dist/core/{p-b0751bd9.entry.js.map → p-c6a62d1b.entry.js.map} +0 -0
  460. /package/dist/core/{p-0ab10600.entry.js.map → p-cc22644d.entry.js.map} +0 -0
  461. /package/dist/core/{p-28323849.entry.js.map → p-d5e9cf81.entry.js.map} +0 -0
  462. /package/dist/core/{p-505250cf.entry.js.map → p-d7632baf.entry.js.map} +0 -0
  463. /package/dist/core/{p-7c80d79c.entry.js.map → p-dcccd9c1.entry.js.map} +0 -0
  464. /package/dist/core/{p-d03374fc.entry.js.map → p-fbb5c8f2.entry.js.map} +0 -0
  465. /package/dist/core/{p-a9151d0b.entry.js.map → p-fc2f336d.entry.js.map} +0 -0
@@ -1,784 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-93509377.js';
2
- import { k as getLabelFromValue, l as getFilteredMenuOptions, m as getOptionsWithoutGroupTitlesCount, n as removeFormResetListener, q as inheritAttributes, r as removeDisabledFalse, t as addFormResetListener, o as onComponentRequiredPropUndefined, u as renderHiddenInput, v as getInputDescribedByText, w as isMobileOrTablet, I as IcThemeForegroundEnum, x as hasValidationStatus, y as IC_INHERITED_ARIA, z as IcInformationStatus } from './helpers-5bd2012a.js';
3
-
4
- const Expand = `<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
5
- <path d="M7 9.5L12 14.5L17 9.5H7Z" fill="currentColor" />
6
- </svg>
7
- `;
8
-
9
- const Clear = `<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
10
- <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" />
11
- </svg>
12
- `;
13
-
14
- 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(.ic-select-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-pressed);color:var(--ic-action-dark-pressed)}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-text-primary);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-text-primary)}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(.ic-select-disabled)) ic-input-component-container:hover .select-input{background-color:var(--ic-architectural-white)}.select-input[disabled]{pointer-events:none}:host(.ic-select-searchable) .select-input{cursor:auto}.select-input.with-clear-button{padding-right:0}.value-text{max-width:calc(100% - (var(--ic-space-lg) + var(--ic-space-xxs)));box-sizing:border-box}.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(.ic-select-disabled) .expand-icon,:host(.ic-select-disabled) .expand-icon>svg>path{color:var(--ic-architectural-200)}:host(.ic-select-searchable) .expand-icon{padding-left:0;height:2.25rem}:host(.ic-select-searchable) .expand-icon>svg{height:2.25rem;padding:0 0.375rem}:host(.ic-select-searchable:not(.ic-select-disabled)) .expand-icon>svg{cursor:pointer}.expand-icon-open{color:var(--ic-action-dark)}.expand-icon-open,:host(.ic-select-searchable) .expand-icon-open{transform:rotateX(180deg)}:host(.ic-select-disabled) .value-text,.placeholder{color:var(--ic-color-text-tertiary)}.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(.ic-select-small) .divider{height:var(--ic-space-md)}:host(.ic-select-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-color-focus-inner);box-shadow:inset 0 0 0 0.125rem var(--ic-color-focus-outer);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)}";
15
-
16
- let inputIds = 0;
17
- const Select = class {
18
- constructor(hostRef) {
19
- registerInstance(this, hostRef);
20
- this.icBlur = createEvent(this, "icBlur", 7);
21
- this.icChange = createEvent(this, "icChange", 7);
22
- this.icClear = createEvent(this, "icClear", 7);
23
- this.icFocus = createEvent(this, "icFocus", 7);
24
- this.icInput = createEvent(this, "icInput", 7);
25
- this.icOptionSelect = createEvent(this, "icOptionSelect", 7);
26
- this.icOptionDeselect = createEvent(this, "icOptionDeselect", 7);
27
- this.icRetryLoad = createEvent(this, "icRetryLoad", 7);
28
- this.hasSetDefaultValue = false;
29
- this.inheritedAttributes = {};
30
- this.initialOptionsEmpty = false;
31
- this.inputId = `ic-select-input-${inputIds++}`;
32
- this.menuId = `${this.inputId}-menu`;
33
- this.searchableMenuItemSelected = false;
34
- this.ungroupedOptions = [];
35
- this.handleRetry = (ev) => {
36
- var _a;
37
- if (ev.detail.keyPressed)
38
- (_a = this.searchableSelectElement) === null || _a === void 0 ? void 0 : _a.focus();
39
- this.blurredBecauseButtonPressed = true;
40
- this.retryButtonClick = true;
41
- this.hasSetDefaultValue = true;
42
- this.icRetryLoad.emit({ value: this.hiddenInputValue });
43
- };
44
- this.emitIcChange = (value) => {
45
- if (!this.searchable) {
46
- // If "Select all" button clicked, replace value with new value (array of all option values)
47
- if (this.multiple && !Array.isArray(value) && value !== null) {
48
- this.handleMultipleSelectChange(value);
49
- }
50
- else {
51
- this.value = value;
52
- }
53
- }
54
- clearTimeout(this.debounceIcChange);
55
- this.debounceIcChange = window.setTimeout(() => {
56
- const valueToEmit = this.multiple ? this.value : value;
57
- this.icChange.emit({ value: valueToEmit });
58
- }, this.currDebounce);
59
- };
60
- this.emitImmediateIcChange = (value) => {
61
- this.value = value;
62
- clearTimeout(this.debounceIcChange);
63
- this.icChange.emit({ value });
64
- };
65
- /**
66
- * Processes the provided array of IcMenuOptions, removing duplicates and reporting them with a console.warn
67
- * @param options array of IcMenuOptions
68
- * @returns a new options object, with all entries possessing a duplicate 'value' field removed
69
- */
70
- this.deduplicateOptions = (options) => {
71
- const uniqueValues = [];
72
- const dedupedOptions = [];
73
- let dedupedChildren;
74
- options.forEach((option) => {
75
- if (option.children) {
76
- //If an option has children, we will loop through them
77
- dedupedChildren = [];
78
- option.children.forEach((child) => {
79
- if (uniqueValues.includes(child.value)) {
80
- console.warn(`ic-select with label ${this.label} was populated with duplicate option (value: ${child.value}) which has been removed.`);
81
- }
82
- else {
83
- uniqueValues.push(child.value);
84
- dedupedChildren.push(child);
85
- }
86
- });
87
- // construct a modified option, inserting the deduplicated children alongside the original information
88
- const modifiedParent = Object.assign(Object.assign({}, option), { children: dedupedChildren });
89
- dedupedOptions.push(modifiedParent);
90
- }
91
- else {
92
- // If an option does not have children, assess to see if it's value has been included already
93
- if (uniqueValues.includes(option.value)) {
94
- console.warn(`ic-select with label ${this.label} was populated with duplicate option (value: ${option.value}) which has been removed.`);
95
- }
96
- else {
97
- uniqueValues.push(option.value);
98
- dedupedOptions.push(option);
99
- }
100
- }
101
- });
102
- return dedupedOptions;
103
- };
104
- /**
105
- * Loop through options array and for all options with no value, infer it from the label
106
- */
107
- this.setOptionsValuesFromLabels = () => {
108
- if (this.options.length > 0 && this.options.map) {
109
- this.options.map((option) => {
110
- if (!option.value) {
111
- option.value = option.label;
112
- }
113
- });
114
- }
115
- };
116
- this.setUngroupedOptions = (event) => {
117
- this.ungroupedOptions = event.detail.options;
118
- };
119
- this.setTextColor = () => {
120
- if (this.nativeSelectElement.selectedIndex === 0) {
121
- this.nativeSelectElement.className = "placeholder";
122
- }
123
- else {
124
- this.nativeSelectElement.className = "select-option-selected";
125
- }
126
- };
127
- this.setMenuChange = (open) => {
128
- if (this.open !== open) {
129
- this.open = open;
130
- }
131
- };
132
- this.getLabelFromValue = (value) => {
133
- return getLabelFromValue(value, this.uniqueOptions);
134
- };
135
- this.getMultipleOptionsString = (selectedValues) => {
136
- const selectedLabels = selectedValues === null || selectedValues === void 0 ? void 0 : selectedValues.map((value) => this.getLabelFromValue(value));
137
- return selectedLabels === null || selectedLabels === void 0 ? void 0 : selectedLabels.join(", ");
138
- };
139
- this.getFilteredChildMenuOptions = (option) => {
140
- let children = option.children;
141
- if (this.searchable) {
142
- children = getFilteredMenuOptions(option.children, this.includeDescriptionsInSearch, this.searchableSelectInputValue, this.searchMatchPosition);
143
- }
144
- else {
145
- children = getFilteredMenuOptions(option.children, false, this.pressedCharacters, "start");
146
- }
147
- const newOption = Object.assign({}, option);
148
- newOption.children = children;
149
- return newOption;
150
- };
151
- // (For multi-select) get value array, i.e. selected option values, in order they appear in option list
152
- this.getValueSortedByOptions = (value) => {
153
- const valueArray = value;
154
- const valuesFromAllOptions = this.ungroupedOptions.map((option) => option.value);
155
- valueArray.sort((a, b) => valuesFromAllOptions.indexOf(a) - valuesFromAllOptions.indexOf(b));
156
- return valueArray;
157
- };
158
- this.handleNativeSelectChange = () => {
159
- this.icOptionSelect.emit({ value: this.nativeSelectElement.value });
160
- this.emitImmediateIcChange(this.nativeSelectElement.value);
161
- this.setTextColor();
162
- };
163
- // Handle option select for when a custom input box and menu is rendered
164
- // (rather than native <select> - rendered when viewed on a mobile / tablet screen)
165
- this.handleCustomSelectChange = (event) => {
166
- var _a;
167
- const value = event.detail.value;
168
- if (this.searchable && event.detail.label === this.emptyOptionListText) {
169
- this.searchableSelectElement.focus();
170
- return;
171
- }
172
- if (this.searchable) {
173
- this.value = value;
174
- this.searchableMenuItemSelected = true;
175
- // After editing the input, if selecting the same option as before, set the input value to label again
176
- if (this.value === this.currValue) {
177
- this.searchableSelectInputValue = this.getLabelFromValue(this.value);
178
- }
179
- this.inputValueToFilter = null;
180
- this.hiddenInputValue = this.getValueFromLabel(this.searchableSelectInputValue);
181
- }
182
- if (this.multiple && ((_a = this.value) === null || _a === void 0 ? void 0 : _a.includes(value))) {
183
- this.icOptionDeselect.emit({ value });
184
- }
185
- else {
186
- this.icOptionSelect.emit({ value });
187
- }
188
- this.ariaActiveDescendant = event.detail.optionId;
189
- this.emitIcChange(value);
190
- };
191
- // Update selected options - adds / removes them, in order of option list
192
- // Create new array if value prop is undefined
193
- this.handleMultipleSelectChange = (value) => {
194
- if (this.value) {
195
- let valueArray = this.value.slice();
196
- if (this.value.includes(value)) {
197
- const valueIndex = valueArray.indexOf(value);
198
- valueArray.splice(valueIndex, 1);
199
- }
200
- else {
201
- valueArray.push(value);
202
- valueArray = this.getValueSortedByOptions(valueArray);
203
- }
204
- this.value = valueArray.length === 0 ? null : valueArray;
205
- }
206
- else {
207
- const valueArray = [];
208
- valueArray.push(value);
209
- this.value = valueArray;
210
- }
211
- };
212
- this.handleSelectAllChange = (event) => {
213
- const selectAllOptions = event.detail.select;
214
- const allEnabledOptions = this.ungroupedOptions.filter((option) => !option.disabled);
215
- const allValues = allEnabledOptions.map((option) => option.value);
216
- let newValue;
217
- if (selectAllOptions) {
218
- let unselectedValues;
219
- // Only emit icOptionSelect for all values that are newly selected
220
- if (this.value) {
221
- unselectedValues = allValues.filter((value) => this.value && !this.value.includes(value));
222
- }
223
- else {
224
- unselectedValues = allValues;
225
- }
226
- unselectedValues.forEach((value) => this.icOptionSelect.emit({ value }));
227
- newValue = allValues;
228
- }
229
- else {
230
- // Only emit icOptionDeselect for values that were selected
231
- this.value.forEach((value) => this.icOptionDeselect.emit({ value }));
232
- newValue = null;
233
- }
234
- this.emitIcChange(newValue);
235
- };
236
- this.handleMenuChange = (event) => {
237
- this.open = event.detail.open;
238
- this.pressedCharacters = "";
239
- this.searchable && this.handleFocusIndicatorDisplay();
240
- };
241
- // clears the debounce delay when navigating the menu with arrow keys etc
242
- // to prevent delay in change event, which should only occur when typing in input
243
- this.handleMenuKeyPress = (ev) => {
244
- ev.cancelBubble = true;
245
- if (!this.multiple) {
246
- this.handleCharacterKeyDown(ev.detail.key);
247
- }
248
- };
249
- this.handleFocusIndicatorDisplay = () => {
250
- const focusIndicator = this.el.shadowRoot.querySelector(".focus-indicator");
251
- if (this.open) {
252
- focusIndicator.classList.add("focus-indicator-enabled");
253
- }
254
- else {
255
- focusIndicator.classList.remove("focus-indicator-enabled");
256
- }
257
- };
258
- this.handleMouseDown = (event) => {
259
- if (!this.open) {
260
- event.preventDefault();
261
- }
262
- };
263
- this.isExternalFiltering = () => this.searchable && this.disableAutoFiltering;
264
- this.handleClick = (event) => {
265
- var _a;
266
- if (!this.open) {
267
- if (this.isExternalFiltering()) {
268
- this.menu.options = this.filteredOptions;
269
- }
270
- else if (!this.hasTimedOut &&
271
- !this.loading &&
272
- !((_a = this.noOptions) === null || _a === void 0 ? void 0 : _a.length) &&
273
- (!this.searchable || this.searchableMenuItemSelected)) {
274
- this.noOptions = null;
275
- this.menu.options = this.uniqueOptions;
276
- }
277
- }
278
- if (event.detail !== 0) {
279
- this.menu.handleClickOpen();
280
- }
281
- };
282
- this.handleExpandIconMouseDown = (event) => {
283
- if (!this.disabled) {
284
- event.preventDefault();
285
- this.searchableSelectElement.focus();
286
- this.handleClick(event);
287
- }
288
- };
289
- this.handleClear = (event) => {
290
- event.stopPropagation();
291
- this.hasTimedOut = false;
292
- clearTimeout(this.timeoutTimer);
293
- this.noOptions = null;
294
- this.emitImmediateIcChange(null);
295
- this.icClear.emit();
296
- if (this.searchable) {
297
- this.searchableSelectElement.value = null;
298
- this.searchableSelectInputValue = null;
299
- this.filteredOptions = this.uniqueOptions;
300
- this.hiddenInputValue = null;
301
- this.searchableSelectElement.focus();
302
- }
303
- else {
304
- this.customSelectElement.focus();
305
- }
306
- };
307
- this.handleCharacterKeyDown = (key) => {
308
- // Only close menu when space is pressed if not being used alongside character keys to quickly select options
309
- if (this.open &&
310
- key === " " &&
311
- this.pressedCharacters.length === 0 &&
312
- !this.hasTimedOut &&
313
- !this.loading) {
314
- this.setMenuChange(false);
315
- }
316
- if (key.length === 1 && !this.searchable) {
317
- window.clearTimeout(this.characterKeyPressTimer);
318
- this.characterKeyPressTimer = window.setTimeout(() => (this.pressedCharacters = ""), 1000);
319
- if (!(key === " " && !this.pressedCharacters)) {
320
- this.pressedCharacters += key;
321
- this.handleFilter();
322
- if (!this.noOptions) {
323
- this.emitImmediateIcChange(this.filteredOptions[0].value);
324
- }
325
- }
326
- }
327
- else {
328
- this.pressedCharacters = "";
329
- }
330
- };
331
- this.handleNativeSelectKeyDown = (event) => {
332
- if ((event.key !== "Escape" && event.key !== "Tab") || this.open) {
333
- event.cancelBubble = true;
334
- }
335
- this.handleCharacterKeyDown(event.key);
336
- };
337
- this.handleKeyDown = (event) => {
338
- if ((event.key !== "Escape" && event.key !== "Tab") || this.open) {
339
- event.cancelBubble = true;
340
- }
341
- const isArrowKey = event.key === "ArrowDown" || event.key === "ArrowUp";
342
- if (!this.open) {
343
- if (this.isExternalFiltering() && (event.key === "Enter" || isArrowKey)) {
344
- this.menu.options = this.filteredOptions;
345
- }
346
- else {
347
- if (!this.hasTimedOut) {
348
- this.noOptions = null;
349
- this.menu.options = this.uniqueOptions;
350
- }
351
- }
352
- }
353
- if (this.open && event.key === "Enter") {
354
- this.setMenuChange(false);
355
- }
356
- else {
357
- if (!(isArrowKey && this.noOptions !== null)) {
358
- if (!(event.key === " " && this.pressedCharacters.length > 0)) {
359
- // Keyboard events get passed onto ic-menu
360
- this.menu.handleKeyboardOpen(event);
361
- }
362
- if (!this.multiple) {
363
- this.handleCharacterKeyDown(event.key);
364
- }
365
- }
366
- }
367
- };
368
- this.handleClearButtonFocus = () => {
369
- this.clearButtonFocused = true;
370
- };
371
- this.handleClearButtonBlur = (ev) => {
372
- var _a;
373
- const retryButton = (_a = this.menu) === null || _a === void 0 ? void 0 : _a.querySelector("#retry-button");
374
- if (!(this.searchableSelectElement &&
375
- ev.relatedTarget === this.searchableSelectElement) &&
376
- !(retryButton && ev.relatedTarget === retryButton)) {
377
- this.setMenuChange(false);
378
- this.handleFocusIndicatorDisplay();
379
- }
380
- this.clearButtonFocused = false;
381
- };
382
- this.handleFilter = () => {
383
- var _a;
384
- const options = this.deduplicateOptions(this.searchable ? [...this.uniqueOptions] : this.ungroupedOptions);
385
- let isGrouped = false;
386
- let newFilteredOptions = [];
387
- options.map((option) => {
388
- if (option.children)
389
- isGrouped = true;
390
- });
391
- let menuOptionsFiltered;
392
- if (this.searchable) {
393
- menuOptionsFiltered = getFilteredMenuOptions(options, this.includeDescriptionsInSearch, this.inputValueToFilter, this.searchMatchPosition);
394
- this.searchableMenuItemSelected = false;
395
- }
396
- else {
397
- menuOptionsFiltered = getFilteredMenuOptions(options, false, this.pressedCharacters, "start");
398
- }
399
- if (!isGrouped &&
400
- ((_a = menuOptionsFiltered[0]) === null || _a === void 0 ? void 0 : _a.label) !== this.emptyOptionListText) {
401
- newFilteredOptions = menuOptionsFiltered;
402
- }
403
- else if (isGrouped) {
404
- options.map((option) => {
405
- if (this.includeGroupTitlesInSearch) {
406
- if (menuOptionsFiltered.indexOf(option) !== -1) {
407
- newFilteredOptions.push(option);
408
- }
409
- else {
410
- newFilteredOptions.push(this.getFilteredChildMenuOptions(option));
411
- }
412
- }
413
- else {
414
- newFilteredOptions.push(this.getFilteredChildMenuOptions(option));
415
- }
416
- });
417
- }
418
- let noChildOptionsWhenFiltered = false;
419
- if (isGrouped) {
420
- noChildOptionsWhenFiltered = true;
421
- newFilteredOptions.map((option) => {
422
- if (option.children.length > 0) {
423
- noChildOptionsWhenFiltered = false;
424
- }
425
- });
426
- }
427
- if (newFilteredOptions.length > 0 && !noChildOptionsWhenFiltered) {
428
- this.noOptions = null;
429
- this.filteredOptions = newFilteredOptions;
430
- }
431
- else {
432
- this.noOptions = [{ label: this.emptyOptionListText, value: "" }];
433
- this.filteredOptions = this.noOptions;
434
- }
435
- };
436
- /**
437
- * Put the select component into loading state.
438
- * Replace options with the loading message. If timeout is enabled, set the timeout and once passed, replace options with the loading error message
439
- */
440
- this.triggerLoading = () => {
441
- this.hasTimedOut = false;
442
- this.noOptions = [{ label: this.loadingLabel, value: "", loading: true }];
443
- if (this.filteredOptions !== this.noOptions && this.searchable) {
444
- this.filteredOptions = this.noOptions;
445
- }
446
- else if (this.uniqueOptions !== this.noOptions && !this.searchable) {
447
- this.uniqueOptions = this.noOptions;
448
- }
449
- if (this.timeout) {
450
- this.timeoutTimer = window.setTimeout(() => {
451
- this.loading = false;
452
- this.hasTimedOut = true;
453
- this.noOptions = [
454
- { label: this.loadingErrorLabel, value: "", timedOut: true },
455
- ];
456
- this.filteredOptions = this.noOptions;
457
- if (!this.searchable)
458
- this.uniqueOptions = this.noOptions;
459
- }, this.timeout);
460
- }
461
- };
462
- this.getValueFromLabel = (label) => {
463
- var _a;
464
- return (_a = this.uniqueOptions.find((option) => option.label === label)) === null || _a === void 0 ? void 0 : _a.value;
465
- };
466
- this.handleSearchableSelectInput = (event) => {
467
- this.searchableSelectInputValue = event.target.value;
468
- this.icInput.emit({ value: this.searchableSelectInputValue });
469
- this.emitIcChange(this.searchableSelectInputValue);
470
- this.hiddenInputValue = this.searchableSelectInputValue;
471
- this.inputValueToFilter = this.searchableSelectInputValue;
472
- this.setMenuChange(true);
473
- if (!this.disableAutoFiltering) {
474
- this.handleFilter();
475
- this.debounceAriaLiveUpdate();
476
- }
477
- };
478
- this.updateSearchableSelectResultAriaLive = () => {
479
- const searchableSelectResultsStatusEl = this.el.shadowRoot.querySelector(".searchable-select-results-status");
480
- if (searchableSelectResultsStatusEl) {
481
- if (this.noOptions !== null) {
482
- searchableSelectResultsStatusEl.innerText = this.emptyOptionListText;
483
- }
484
- else {
485
- searchableSelectResultsStatusEl.innerText = "";
486
- }
487
- }
488
- };
489
- this.updateMultiSelectedCountAriaLive = () => {
490
- var _a;
491
- const multiSelectSelectedCountEl = this.el.shadowRoot.querySelector(".multi-select-selected-count");
492
- const selectedCount = `${(_a = this.currValue) === null || _a === void 0 ? void 0 : _a.length} of ${getOptionsWithoutGroupTitlesCount(this.options)} selected`;
493
- if (multiSelectSelectedCountEl &&
494
- multiSelectSelectedCountEl.innerText !== selectedCount) {
495
- multiSelectSelectedCountEl.innerText = selectedCount;
496
- }
497
- };
498
- this.getDefaultValue = (value) => this.getLabelFromValue(value) || value || null;
499
- this.setDefaultValue = () => {
500
- if (!this.hasSetDefaultValue && this.currValue) {
501
- this.searchableSelectInputValue =
502
- this.searchable && this.getDefaultValue(this.currValue);
503
- this.initialValue = this.currValue;
504
- this.hasSetDefaultValue = true;
505
- }
506
- };
507
- this.onFocus = () => {
508
- this.icFocus.emit();
509
- };
510
- this.onBlur = (event) => {
511
- var _a;
512
- const target = event.relatedTarget;
513
- if (target !== null &&
514
- target.tagName === "UL" &&
515
- target.className.includes("menu")) {
516
- return;
517
- }
518
- const retryButton = (_a = this.menu) === null || _a === void 0 ? void 0 : _a.querySelector("#retry-button");
519
- const isSearchableAndNoFocusedInternalElements = this.searchable &&
520
- event.relatedTarget !== this.menu &&
521
- !Array.from(this.menu.querySelectorAll("[role='option']")).includes(event.relatedTarget) &&
522
- !(this.clearButton && event.relatedTarget === this.clearButton) &&
523
- !(retryButton && event.relatedTarget === retryButton);
524
- if (isSearchableAndNoFocusedInternalElements) {
525
- if (!this.retryButtonClick) {
526
- this.setMenuChange(false);
527
- }
528
- this.handleFocusIndicatorDisplay();
529
- }
530
- this.retryButtonClick = false;
531
- this.icBlur.emit();
532
- };
533
- this.onTimeoutBlur = (ev) => {
534
- if (ev.detail.ev.relatedTarget !==
535
- this.searchableSelectElement &&
536
- !this.blurredBecauseButtonPressed) {
537
- this.setMenuChange(false);
538
- this.handleFocusIndicatorDisplay();
539
- this.icBlur.emit();
540
- }
541
- this.blurredBecauseButtonPressed = false;
542
- };
543
- this.handleFormReset = () => {
544
- this.value = this.initialValue;
545
- if (this.searchable) {
546
- this.searchableSelectInputValue = this.getDefaultValue(this.value);
547
- this.hiddenInputValue = this.value;
548
- }
549
- };
550
- this.ariaActiveDescendant = undefined;
551
- this.clearButtonFocused = false;
552
- this.debounceIcChange = undefined;
553
- this.hiddenInputValue = undefined;
554
- this.noOptions = null;
555
- this.open = false;
556
- this.pressedCharacters = "";
557
- this.searchableSelectInputValue = null;
558
- this.disabled = false;
559
- this.disableAutoFiltering = false;
560
- this.emptyOptionListText = "No results found";
561
- this.form = undefined;
562
- this.fullWidth = false;
563
- this.helperText = "";
564
- this.hideLabel = false;
565
- this.includeDescriptionsInSearch = false;
566
- this.includeGroupTitlesInSearch = false;
567
- this.label = undefined;
568
- this.loadingErrorLabel = "Loading Error";
569
- this.loadingLabel = "Loading...";
570
- this.multiple = false;
571
- this.name = this.inputId;
572
- this.placeholder = "Select an option";
573
- this.readonly = false;
574
- this.required = false;
575
- this.searchable = false;
576
- this.searchMatchPosition = "anywhere";
577
- this.selectOnEnter = false;
578
- this.showClearButton = false;
579
- this.size = "medium";
580
- this.timeout = undefined;
581
- this.validationStatus = "";
582
- this.validationText = "";
583
- this.loading = false;
584
- this.options = [];
585
- this.filteredOptions = this.options;
586
- this.uniqueOptions = this.options;
587
- this.debounce = 0;
588
- this.currDebounce = this.debounce;
589
- this.value = undefined;
590
- this.initialValue = this.value;
591
- this.inputValueToFilter = this.value;
592
- this.currValue = this.value;
593
- }
594
- loadingHandler(newValue) {
595
- newValue && this.triggerLoading();
596
- }
597
- watchOptionsHandler() {
598
- if (!this.hasTimedOut && this.options !== this.noOptions) {
599
- this.loading = false;
600
- clearTimeout(this.timeoutTimer);
601
- if (this.isExternalFiltering()) {
602
- // When searchable select
603
- if (this.options.length > 0) {
604
- this.setOptionsValuesFromLabels();
605
- this.noOptions = null;
606
- this.uniqueOptions = this.deduplicateOptions(this.options);
607
- this.filteredOptions = this.uniqueOptions;
608
- }
609
- else {
610
- this.noOptions = [{ label: this.emptyOptionListText, value: "" }];
611
- this.uniqueOptions = this.noOptions;
612
- this.filteredOptions = this.noOptions;
613
- }
614
- this.updateSearchableSelectResultAriaLive();
615
- this.setDefaultValue();
616
- }
617
- else {
618
- this.setOptionsValuesFromLabels();
619
- this.uniqueOptions = this.deduplicateOptions(this.options);
620
- this.filteredOptions = this.uniqueOptions;
621
- if (this.initialOptionsEmpty) {
622
- this.setDefaultValue();
623
- this.initialOptionsEmpty = false;
624
- }
625
- }
626
- }
627
- else {
628
- if (!this.searchable)
629
- this.options = this.noOptions;
630
- }
631
- }
632
- debounceChangedHandler(newValue) {
633
- this.updateOnChangeDebounce(newValue);
634
- }
635
- valueChangedHandler() {
636
- if (this.value !== this.currValue) {
637
- if (this.value && this.multiple) {
638
- this.currValue = this.getValueSortedByOptions(this.value);
639
- this.updateMultiSelectedCountAriaLive();
640
- }
641
- else {
642
- this.currValue = this.value;
643
- }
644
- }
645
- if (this.searchable) {
646
- this.searchableSelectInputValue =
647
- this.getLabelFromValue(this.currValue) ||
648
- this.currValue;
649
- }
650
- }
651
- disconnectedCallback() {
652
- removeFormResetListener(this.el, this.handleFormReset);
653
- }
654
- componentWillLoad() {
655
- this.inheritedAttributes = inheritAttributes(this.el, [
656
- ...IC_INHERITED_ARIA,
657
- "tabindex",
658
- "title",
659
- ]);
660
- removeDisabledFalse(this.disabled, this.el);
661
- this.setOptionsValuesFromLabels();
662
- addFormResetListener(this.el, this.handleFormReset);
663
- if (!this.options.length) {
664
- this.initialOptionsEmpty = true;
665
- this.noOptions = [{ label: this.emptyOptionListText, value: "" }];
666
- this.uniqueOptions = this.noOptions;
667
- this.filteredOptions = this.noOptions;
668
- }
669
- else {
670
- this.setDefaultValue();
671
- this.uniqueOptions = this.deduplicateOptions(this.options);
672
- }
673
- }
674
- componentDidLoad() {
675
- onComponentRequiredPropUndefined([{ prop: this.label, propName: "label" }], "Select");
676
- if (this.loading) {
677
- this.triggerLoading();
678
- }
679
- this.hiddenInputValue = this.searchable && this.currValue;
680
- }
681
- componentDidRender() {
682
- if (this.nativeSelectElement && !this.disabled) {
683
- this.setTextColor();
684
- }
685
- }
686
- /**
687
- * Sets focus on the input box.
688
- */
689
- async setFocus() {
690
- if (this.nativeSelectElement) {
691
- this.nativeSelectElement.focus();
692
- }
693
- else if (this.customSelectElement) {
694
- this.customSelectElement.focus();
695
- }
696
- else if (this.searchableSelectElement) {
697
- this.searchableSelectElement.focus();
698
- }
699
- }
700
- updateOnChangeDebounce(newValue) {
701
- if (this.currDebounce !== newValue) {
702
- this.currDebounce = newValue;
703
- }
704
- }
705
- debounceAriaLiveUpdate() {
706
- clearTimeout(this.debounceAria);
707
- window.setTimeout(() => {
708
- this.updateSearchableSelectResultAriaLive();
709
- }, 800);
710
- }
711
- render() {
712
- const { size, disabled, fullWidth, helperText, hideLabel, label, menuId, multiple, name, options, placeholder, readonly, required, searchable, showClearButton, validationStatus, validationText, currValue, } = this;
713
- // HTML inputs only accept 'string' for their value
714
- // Does not cause errors when it is a multi-select - sets value correctly, to a comma-separated string
715
- renderHiddenInput(true, this.el, name, this.searchable ? this.hiddenInputValue : currValue, disabled);
716
- const invalid = validationStatus === IcInformationStatus.Error ? "true" : "false";
717
- const describedBy = getInputDescribedByText(this.inputId, helperText !== "", hasValidationStatus(this.validationStatus, this.disabled)).trim();
718
- const optionsSelectedCount = `${currValue === null || currValue === void 0 ? void 0 : currValue.length} of ${getOptionsWithoutGroupTitlesCount(this.options)} selected`;
719
- return (h(Host, { class: {
720
- ["ic-select-disabled"]: disabled,
721
- ["ic-select-searchable"]: searchable,
722
- [`ic-select-${size}`]: size !== "medium",
723
- ["ic-select-full-width"]: fullWidth,
724
- }, 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 }, size: size, fullWidth: fullWidth, disabled: disabled, readonly: readonly, validationStatus: validationStatus }, readonly ? (h("ic-typography", null, h("p", null, multiple
725
- ? this.getMultipleOptionsString(currValue)
726
- : 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) => {
727
- if (option.children) {
728
- return (h("optgroup", { label: option.label }, option.children.map((option) => (h("option", { value: option.value, disabled: option.disabled, selected: option.value === currValue }, option.label)))));
729
- }
730
- else {
731
- return (h("option", { value: option.value, disabled: option.disabled, selected: option.value === currValue }, option.label));
732
- }
733
- }))) : searchable ? (h("div", { class: "searchable-select-container" }, h("input", { class: {
734
- "select-input": true,
735
- "with-clear-button": !!this.searchableSelectInputValue,
736
- }, 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 }), this.searchableSelectInputValue &&
737
- (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
738
- ? "Clear input"
739
- : "Clear selection", class: "clear-button", innerHTML: Clear, onClick: this.handleClear, onFocus: this.handleClearButtonFocus, onBlur: this.handleClearButtonBlur, size: size, variant: "icon", appearance: this.clearButtonFocused
740
- ? IcThemeForegroundEnum.Light
741
- : IcThemeForegroundEnum.Dark }), h("div", { class: "divider" }))), h("span", { onMouseDown: this.handleExpandIconMouseDown, class: {
742
- "expand-icon": true,
743
- "expand-icon-open": this.open,
744
- }, 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
745
- ? `${optionsSelectedCount}, ${this.getMultipleOptionsString(currValue)}`
746
- : this.getLabelFromValue(currValue)) ||
747
- 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: {
748
- "value-text": true,
749
- "with-clear-button": currValue && showClearButton,
750
- placeholder: !this.value || (multiple && this.value.length < 1),
751
- } }, h("p", null, (multiple
752
- ? this.getMultipleOptionsString(currValue)
753
- : this.getLabelFromValue(currValue)) ||
754
- placeholder)), h("div", { class: "select-input-end" }, currValue && showClearButton && (h("div", { class: "divider" })), h("span", { class: {
755
- "expand-icon": true,
756
- "expand-icon-open": this.open,
757
- }, 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
758
- ? IcThemeForegroundEnum.Light
759
- : IcThemeForegroundEnum.Dark }))))), (!isMobileOrTablet() || multiple) && (h("ic-menu-with-multi", { class: {
760
- "no-results": this.loading ||
761
- this.hasTimedOut ||
762
- (this.noOptions !== null &&
763
- this.noOptions[0] &&
764
- this.noOptions[0].label === this.emptyOptionListText),
765
- }, ref: (el) => (this.menu = el), inputEl: searchable
766
- ? this.searchableSelectElement
767
- : this.customSelectElement, inputLabel: label, anchorEl: this.anchorEl, 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
768
- ? "manual"
769
- : "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 })))));
770
- }
771
- static get delegatesFocus() { return true; }
772
- get el() { return getElement(this); }
773
- static get watchers() { return {
774
- "loading": ["loadingHandler"],
775
- "options": ["watchOptionsHandler"],
776
- "debounce": ["debounceChangedHandler"],
777
- "value": ["valueChangedHandler"]
778
- }; }
779
- };
780
- Select.style = icSelectCss;
781
-
782
- export { Select as ic_select_with_multi };
783
-
784
- //# sourceMappingURL=ic-select-with-multi.entry.js.map