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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (449) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/date-helpers-c9551119.js +150 -0
  3. package/dist/cjs/date-helpers-c9551119.js.map +1 -0
  4. package/dist/cjs/{helpers-00b08718.js → helpers-7a069459.js} +8 -3
  5. package/dist/cjs/helpers-7a069459.js.map +1 -0
  6. package/dist/cjs/helpers-f75cf7cf.js +280 -0
  7. package/dist/cjs/helpers-f75cf7cf.js.map +1 -0
  8. package/dist/cjs/ic-accordion-group.cjs.entry.js +6 -2
  9. package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
  10. package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
  11. package/dist/cjs/ic-alert.cjs.entry.js +1 -1
  12. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  13. package/dist/cjs/ic-badge.cjs.entry.js +4 -3
  14. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  16. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  17. package/dist/cjs/ic-button_3.cjs.entry.js +29 -12
  18. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ic-card.cjs.entry.js +5 -6
  20. package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
  21. package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
  22. package/dist/cjs/ic-checkbox.cjs.entry.js +1 -1
  23. package/dist/cjs/ic-chip.cjs.entry.js +1 -1
  24. package/dist/cjs/ic-data-entity.cjs.entry.js +3 -6
  25. package/dist/cjs/ic-data-entity.cjs.entry.js.map +1 -1
  26. package/dist/cjs/ic-data-row.cjs.entry.js +21 -35
  27. package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
  28. package/dist/cjs/ic-date-input.cjs.entry.js +1073 -0
  29. package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -0
  30. package/dist/cjs/ic-date-picker.cjs.entry.js +1043 -0
  31. package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -0
  32. package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
  33. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  34. package/dist/cjs/ic-empty-state.cjs.entry.js +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_4.cjs.entry.js +150 -0
  41. package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +1 -0
  42. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  43. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  44. package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
  45. package/dist/cjs/ic-menu-with-multi.cjs.entry.js +2599 -0
  46. package/dist/cjs/ic-menu-with-multi.cjs.entry.js.map +1 -0
  47. package/dist/cjs/{ic-input-component-container_3.cjs.entry.js → ic-menu.cjs.entry.js} +8 -70
  48. package/dist/cjs/ic-menu.cjs.entry.js.map +1 -0
  49. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  50. package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
  51. package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
  52. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  53. package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
  54. package/dist/cjs/ic-pagination-bar.cjs.entry.js +2 -18
  55. package/dist/cjs/ic-pagination-bar.cjs.entry.js.map +1 -1
  56. package/dist/cjs/ic-pagination_4.cjs.entry.js +21 -13
  57. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  58. package/dist/cjs/ic-popover-menu.cjs.entry.js +1 -1
  59. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  60. package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
  61. package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
  62. package/dist/cjs/ic-search-bar.cjs.entry.js +1 -1
  63. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  64. package/dist/cjs/ic-select-with-multi.cjs.entry.js +824 -0
  65. package/dist/cjs/ic-select-with-multi.cjs.entry.js.map +1 -0
  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 +1 -1
  71. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  72. package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
  73. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  74. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  75. package/dist/cjs/ic-toast.cjs.entry.js +1 -1
  76. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +184 -0
  77. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -0
  78. package/dist/cjs/ic-toggle-button.cjs.entry.js +6 -3
  79. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  80. package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
  81. package/dist/cjs/ic-typography.cjs.entry.js +1 -1
  82. package/dist/cjs/index-4cf27b16.js +24 -4
  83. package/dist/cjs/loader.cjs.js +1 -1
  84. package/dist/collection/assets/calendar.svg +3 -0
  85. package/dist/collection/collection-manifest.json +6 -1
  86. package/dist/collection/components/ic-date-input/ic-date-input.css +560 -0
  87. package/dist/collection/components/ic-date-input/ic-date-input.js +1668 -0
  88. package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -0
  89. package/dist/collection/components/ic-date-input/story-data.js +28 -0
  90. package/dist/collection/components/ic-date-input/story-data.js.map +1 -0
  91. package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js +1156 -0
  92. package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js.map +1 -0
  93. package/dist/collection/components/ic-date-input/test/helpers/ic-date-input.js +42 -0
  94. package/dist/collection/components/ic-date-input/test/helpers/ic-date-input.js.map +1 -0
  95. package/dist/collection/components/ic-date-picker/ic-date-picker.css +878 -0
  96. package/dist/collection/components/ic-date-picker/ic-date-picker.js +1499 -0
  97. package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -0
  98. package/dist/collection/components/ic-date-picker/ic-day-button.js +36 -0
  99. package/dist/collection/components/ic-date-picker/ic-day-button.js.map +1 -0
  100. package/dist/collection/components/ic-date-picker/ic-month-picker.js +29 -0
  101. package/dist/collection/components/ic-date-picker/ic-month-picker.js.map +1 -0
  102. package/dist/collection/components/ic-date-picker/ic-year-picker.js +39 -0
  103. package/dist/collection/components/ic-date-picker/ic-year-picker.js.map +1 -0
  104. package/dist/collection/components/ic-date-picker/story-data.js +143 -0
  105. package/dist/collection/components/ic-date-picker/story-data.js.map +1 -0
  106. package/dist/collection/components/ic-date-picker/test/a11y/ic-date-picker.test.a11y.js +13 -0
  107. package/dist/collection/components/ic-date-picker/test/a11y/ic-date-picker.test.a11y.js.map +1 -0
  108. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker-utils.spec.js +207 -0
  109. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker-utils.spec.js.map +1 -0
  110. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js +962 -0
  111. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js.map +1 -0
  112. package/dist/collection/components/ic-menu-with-multi/ic-menu.css +701 -0
  113. package/dist/collection/components/ic-menu-with-multi/ic-menu.js +1458 -0
  114. package/dist/collection/components/ic-menu-with-multi/ic-menu.js.map +1 -0
  115. package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js +880 -0
  116. package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js.map +1 -0
  117. package/dist/collection/components/ic-select-with-multi/assets/Check.svg +3 -0
  118. package/dist/collection/components/ic-select-with-multi/assets/Clear.svg +3 -0
  119. package/dist/collection/components/ic-select-with-multi/assets/Expand.svg +3 -0
  120. package/dist/collection/components/ic-select-with-multi/ic-select.css +693 -0
  121. package/dist/collection/components/ic-select-with-multi/ic-select.js +1649 -0
  122. package/dist/collection/components/ic-select-with-multi/ic-select.js.map +1 -0
  123. package/dist/collection/components/ic-select-with-multi/story-data.js +216 -0
  124. package/dist/collection/components/ic-select-with-multi/story-data.js.map +1 -0
  125. package/dist/collection/components/ic-select-with-multi/test/a11y/ic-select.test.a11y.js +146 -0
  126. package/dist/collection/components/ic-select-with-multi/test/a11y/ic-select.test.a11y.js.map +1 -0
  127. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.e2e.js +2040 -0
  128. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.e2e.js.map +1 -0
  129. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js +1518 -0
  130. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js.map +1 -0
  131. package/dist/collection/utils/constants.js +83 -0
  132. package/dist/collection/utils/constants.js.map +1 -0
  133. package/dist/collection/utils/date-helpers.js +133 -0
  134. package/dist/collection/utils/date-helpers.js.map +1 -0
  135. package/dist/collection/utils/helpers.js +417 -5
  136. package/dist/collection/utils/helpers.js.map +1 -1
  137. package/dist/collection/utils/types.js +58 -0
  138. package/dist/collection/utils/types.js.map +1 -0
  139. package/dist/components/helpers.js +8 -3
  140. package/dist/components/helpers.js.map +1 -1
  141. package/dist/components/helpers2.js +262 -0
  142. package/dist/components/helpers2.js.map +1 -0
  143. package/dist/components/ic-accordion-group.js +7 -2
  144. package/dist/components/ic-accordion-group.js.map +1 -1
  145. package/dist/components/ic-badge.js +3 -2
  146. package/dist/components/ic-badge.js.map +1 -1
  147. package/dist/components/ic-button2.js +32 -13
  148. package/dist/components/ic-button2.js.map +1 -1
  149. package/dist/components/ic-card.js +6 -19
  150. package/dist/components/ic-card.js.map +1 -1
  151. package/dist/components/ic-checkbox-group.js +1 -1
  152. package/dist/components/ic-checkbox.js +1 -1
  153. package/dist/components/ic-chip.js +1 -1
  154. package/dist/components/ic-data-entity.js +3 -6
  155. package/dist/components/ic-data-entity.js.map +1 -1
  156. package/dist/components/ic-data-row.js +20 -34
  157. package/dist/components/ic-data-row.js.map +1 -1
  158. package/dist/components/ic-date-input.d.ts +11 -0
  159. package/dist/components/ic-date-input.js +8 -0
  160. package/dist/components/ic-date-input.js.map +1 -0
  161. package/dist/components/ic-date-input2.js +1301 -0
  162. package/dist/components/ic-date-input2.js.map +1 -0
  163. package/dist/components/ic-date-picker.d.ts +11 -0
  164. package/dist/components/ic-date-picker.js +1164 -0
  165. package/dist/components/ic-date-picker.js.map +1 -0
  166. package/dist/components/ic-input-component-container2.js +7 -6
  167. package/dist/components/ic-input-component-container2.js.map +1 -1
  168. package/dist/components/ic-link2.js +1 -1
  169. package/dist/components/ic-menu-item2.js +1 -1
  170. package/dist/components/ic-menu-with-multi.d.ts +11 -0
  171. package/dist/components/ic-menu-with-multi.js +8 -0
  172. package/dist/components/ic-menu-with-multi.js.map +1 -0
  173. package/dist/components/ic-menu2.js +5 -4
  174. package/dist/components/ic-menu2.js.map +1 -1
  175. package/dist/components/ic-menu3.js +2665 -0
  176. package/dist/components/ic-menu3.js.map +1 -0
  177. package/dist/components/ic-navigation-button.js +1 -1
  178. package/dist/components/ic-pagination-bar2.js +1 -17
  179. package/dist/components/ic-pagination-bar2.js.map +1 -1
  180. package/dist/components/ic-pagination-item2.js +1 -1
  181. package/dist/components/ic-pagination2.js +1 -1
  182. package/dist/components/ic-popover-menu.js +1 -1
  183. package/dist/components/ic-popover-menu.js.map +1 -1
  184. package/dist/components/ic-radio-group.js +1 -1
  185. package/dist/components/ic-radio-option.js +1 -1
  186. package/dist/components/ic-search-bar.js +1 -1
  187. package/dist/components/ic-search-bar.js.map +1 -1
  188. package/dist/components/ic-select-with-multi.d.ts +11 -0
  189. package/dist/components/ic-select-with-multi.js +949 -0
  190. package/dist/components/ic-select-with-multi.js.map +1 -0
  191. package/dist/components/ic-select2.js +23 -14
  192. package/dist/components/ic-select2.js.map +1 -1
  193. package/dist/components/ic-switch.js +1 -1
  194. package/dist/components/ic-tab.js +1 -1
  195. package/dist/components/ic-text-field2.js +1 -1
  196. package/dist/components/ic-toggle-button-group.js +210 -0
  197. package/dist/components/ic-toggle-button-group.js.map +1 -0
  198. package/dist/components/ic-toggle-button.js +6 -3
  199. package/dist/components/ic-toggle-button.js.map +1 -1
  200. package/dist/core/core.css +8 -5
  201. package/dist/core/core.esm.js +1 -1
  202. package/dist/core/core.esm.js.map +1 -1
  203. package/dist/core/{p-5e94fae8.entry.js → p-06ae5bec.entry.js} +2 -2
  204. package/dist/core/p-06ae5bec.entry.js.map +1 -0
  205. package/dist/core/{p-d5cc084b.entry.js → p-0939ce92.entry.js} +2 -2
  206. package/dist/core/{p-d5cc084b.entry.js.map → p-0939ce92.entry.js.map} +1 -1
  207. package/dist/core/{p-6de46cb7.entry.js → p-16f67397.entry.js} +2 -2
  208. package/dist/core/p-16f67397.entry.js.map +1 -0
  209. package/dist/core/{p-a2f366c7.entry.js → p-1832f4b5.entry.js} +2 -2
  210. package/dist/core/{p-28fb7cca.entry.js → p-1b7d426b.entry.js} +2 -2
  211. package/dist/core/p-1b7d426b.entry.js.map +1 -0
  212. package/dist/core/{p-ff1d23cd.entry.js → p-1ce75941.entry.js} +2 -2
  213. package/dist/core/{p-5746577f.entry.js → p-2e2e0099.entry.js} +2 -2
  214. package/dist/core/p-33679c06.entry.js +2 -0
  215. package/dist/core/p-33679c06.entry.js.map +1 -0
  216. package/dist/core/{p-ca262cdc.entry.js → p-36508aad.entry.js} +2 -2
  217. package/dist/core/{p-7276339a.entry.js → p-3745da83.entry.js} +2 -2
  218. package/dist/core/{p-b43bd4f3.entry.js → p-3f2e77c3.entry.js} +2 -2
  219. package/dist/core/{p-24945ee5.entry.js → p-452985d9.entry.js} +2 -2
  220. package/dist/core/p-452985d9.entry.js.map +1 -0
  221. package/dist/core/{p-3c859b9e.entry.js → p-47ac6838.entry.js} +2 -2
  222. package/dist/core/{p-3d2fcf84.entry.js → p-4f1ffa39.entry.js} +2 -2
  223. package/dist/core/{p-4df42c76.entry.js → p-5759d771.entry.js} +2 -2
  224. package/dist/core/{p-32f18701.entry.js → p-5e2e6c3b.entry.js} +2 -2
  225. package/dist/core/{p-f436630b.entry.js → p-5fe96107.entry.js} +2 -2
  226. package/dist/core/{p-7dfd61bb.entry.js → p-62e22508.entry.js} +2 -2
  227. package/dist/core/{p-d49660e0.entry.js → p-6690bc04.entry.js} +2 -2
  228. package/dist/core/{p-f827e4c0.entry.js → p-6c0e2ceb.entry.js} +2 -2
  229. package/dist/core/{p-a3ab9f4c.entry.js → p-76915584.entry.js} +2 -2
  230. package/dist/core/p-76915584.entry.js.map +1 -0
  231. package/dist/core/{p-966ab920.entry.js → p-76d26018.entry.js} +2 -2
  232. package/dist/core/{p-79b71c18.entry.js → p-776671cf.entry.js} +2 -2
  233. package/dist/core/{p-434780c8.entry.js → p-7cecf5d5.entry.js} +2 -2
  234. package/dist/core/{p-88971cea.entry.js → p-85609bdd.entry.js} +2 -2
  235. package/dist/core/{p-95d3cd52.entry.js → p-86012178.entry.js} +2 -2
  236. package/dist/core/{p-2094c844.entry.js → p-8a7e7d23.entry.js} +2 -2
  237. package/dist/core/{p-aafb2c79.entry.js → p-8c90110a.entry.js} +2 -2
  238. package/dist/core/{p-9ce5f082.entry.js → p-8ea47d42.entry.js} +2 -2
  239. package/dist/core/{p-0d181ac8.entry.js → p-982a6e88.entry.js} +2 -2
  240. package/dist/core/{p-3b9f3a07.entry.js → p-98448bdb.entry.js} +2 -2
  241. package/dist/core/{p-c263542a.entry.js → p-9d01a7ad.entry.js} +2 -2
  242. package/dist/core/{p-051b8266.entry.js → p-9d540656.entry.js} +2 -2
  243. package/dist/core/p-9e3178e8.entry.js +2 -0
  244. package/dist/core/p-9e3178e8.entry.js.map +1 -0
  245. package/dist/core/{p-9fd84c69.entry.js → p-a0f9b259.entry.js} +2 -2
  246. package/dist/core/{p-7632acc6.entry.js → p-a42c2f37.entry.js} +2 -2
  247. package/dist/core/{p-fbb1fba0.entry.js → p-a6447b13.entry.js} +2 -2
  248. package/dist/core/p-aabab75f.entry.js +2 -0
  249. package/dist/core/p-aabab75f.entry.js.map +1 -0
  250. package/dist/core/{p-116b18fe.entry.js → p-ae422058.entry.js} +2 -2
  251. package/dist/core/{p-a7d52bd1.entry.js → p-b306cbc8.entry.js} +2 -2
  252. package/dist/core/p-c7590421.entry.js +2 -0
  253. package/dist/core/p-c7590421.entry.js.map +1 -0
  254. package/dist/core/{p-a162744e.entry.js → p-c7820c23.entry.js} +2 -2
  255. package/dist/core/{p-a162744e.entry.js.map → p-c7820c23.entry.js.map} +1 -1
  256. package/dist/core/{p-d78fd9f3.entry.js → p-ca8cbd6a.entry.js} +2 -2
  257. package/dist/core/{p-da4f0a58.entry.js → p-caf857de.entry.js} +2 -2
  258. package/dist/core/p-cc7bc438.entry.js +2 -0
  259. package/dist/core/p-cc7bc438.entry.js.map +1 -0
  260. package/dist/core/p-cd799087.js +2 -0
  261. package/dist/core/p-cd799087.js.map +1 -0
  262. package/dist/core/p-d32692e2.entry.js +2 -0
  263. package/dist/core/p-d32692e2.entry.js.map +1 -0
  264. package/dist/core/p-d35c7c18.js +2 -0
  265. package/dist/core/p-d35c7c18.js.map +1 -0
  266. package/dist/core/{p-27aa95e7.entry.js → p-d3856ed3.entry.js} +2 -2
  267. package/dist/core/{p-c345a874.entry.js → p-d4fdd8c1.entry.js} +2 -2
  268. package/dist/core/{p-337b6e05.entry.js → p-d5c99ec3.entry.js} +2 -2
  269. package/dist/core/p-e473bbf8.entry.js +2 -0
  270. package/dist/core/p-e473bbf8.entry.js.map +1 -0
  271. package/dist/core/p-e74f1d09.entry.js +2 -0
  272. package/dist/core/p-e74f1d09.entry.js.map +1 -0
  273. package/dist/core/p-e79e0292.entry.js +2 -0
  274. package/dist/core/p-e79e0292.entry.js.map +1 -0
  275. package/dist/core/{p-0f0509ee.entry.js → p-e84b0310.entry.js} +2 -2
  276. package/dist/core/p-e84b0310.entry.js.map +1 -0
  277. package/dist/core/{p-93c5b849.entry.js → p-f55ad6ae.entry.js} +2 -2
  278. package/dist/core/p-f8cf2978.js +2 -0
  279. package/dist/core/p-f8cf2978.js.map +1 -0
  280. package/dist/core/p-f91527a0.entry.js +2 -0
  281. package/dist/core/p-f91527a0.entry.js.map +1 -0
  282. package/dist/core/{p-d9342548.entry.js → p-fbf4e9b7.entry.js} +2 -2
  283. package/dist/esm/core.js +1 -1
  284. package/dist/esm/date-helpers-4f432e92.js +136 -0
  285. package/dist/esm/date-helpers-4f432e92.js.map +1 -0
  286. package/dist/esm/{helpers-d06dc4ed.js → helpers-7aa21b0a.js} +8 -3
  287. package/dist/esm/helpers-7aa21b0a.js.map +1 -0
  288. package/dist/esm/helpers-f328a7b6.js +262 -0
  289. package/dist/esm/helpers-f328a7b6.js.map +1 -0
  290. package/dist/esm/ic-accordion-group.entry.js +6 -2
  291. package/dist/esm/ic-accordion-group.entry.js.map +1 -1
  292. package/dist/esm/ic-accordion.entry.js +1 -1
  293. package/dist/esm/ic-alert.entry.js +1 -1
  294. package/dist/esm/ic-back-to-top.entry.js +1 -1
  295. package/dist/esm/ic-badge.entry.js +4 -3
  296. package/dist/esm/ic-badge.entry.js.map +1 -1
  297. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  298. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  299. package/dist/esm/ic-button_3.entry.js +29 -12
  300. package/dist/esm/ic-button_3.entry.js.map +1 -1
  301. package/dist/esm/ic-card.entry.js +5 -6
  302. package/dist/esm/ic-card.entry.js.map +1 -1
  303. package/dist/esm/ic-checkbox-group.entry.js +1 -1
  304. package/dist/esm/ic-checkbox.entry.js +1 -1
  305. package/dist/esm/ic-chip.entry.js +1 -1
  306. package/dist/esm/ic-data-entity.entry.js +3 -6
  307. package/dist/esm/ic-data-entity.entry.js.map +1 -1
  308. package/dist/esm/ic-data-row.entry.js +21 -35
  309. package/dist/esm/ic-data-row.entry.js.map +1 -1
  310. package/dist/esm/ic-date-input.entry.js +1069 -0
  311. package/dist/esm/ic-date-input.entry.js.map +1 -0
  312. package/dist/esm/ic-date-picker.entry.js +1039 -0
  313. package/dist/esm/ic-date-picker.entry.js.map +1 -0
  314. package/dist/esm/ic-dialog.entry.js +1 -1
  315. package/dist/esm/ic-divider.entry.js +1 -1
  316. package/dist/esm/ic-empty-state.entry.js +1 -1
  317. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  318. package/dist/esm/ic-footer-link.entry.js +1 -1
  319. package/dist/esm/ic-footer.entry.js +1 -1
  320. package/dist/esm/ic-hero.entry.js +1 -1
  321. package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
  322. package/dist/esm/ic-input-component-container_4.entry.js +143 -0
  323. package/dist/esm/ic-input-component-container_4.entry.js.map +1 -0
  324. package/dist/esm/ic-link.entry.js +1 -1
  325. package/dist/esm/ic-menu-group.entry.js +1 -1
  326. package/dist/esm/ic-menu-item.entry.js +1 -1
  327. package/dist/esm/ic-menu-with-multi.entry.js +2595 -0
  328. package/dist/esm/ic-menu-with-multi.entry.js.map +1 -0
  329. package/dist/esm/{ic-input-component-container_3.entry.js → ic-menu.entry.js} +10 -70
  330. package/dist/esm/ic-menu.entry.js.map +1 -0
  331. package/dist/esm/ic-navigation-button.entry.js +1 -1
  332. package/dist/esm/ic-navigation-group.entry.js +1 -1
  333. package/dist/esm/ic-navigation-item.entry.js +1 -1
  334. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  335. package/dist/esm/ic-page-header.entry.js +1 -1
  336. package/dist/esm/ic-pagination-bar.entry.js +1 -17
  337. package/dist/esm/ic-pagination-bar.entry.js.map +1 -1
  338. package/dist/esm/ic-pagination_4.entry.js +21 -13
  339. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  340. package/dist/esm/ic-popover-menu.entry.js +1 -1
  341. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  342. package/dist/esm/ic-radio-group.entry.js +1 -1
  343. package/dist/esm/ic-radio-option.entry.js +1 -1
  344. package/dist/esm/ic-search-bar.entry.js +1 -1
  345. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  346. package/dist/esm/ic-select-with-multi.entry.js +820 -0
  347. package/dist/esm/ic-select-with-multi.entry.js.map +1 -0
  348. package/dist/esm/ic-side-navigation.entry.js +1 -1
  349. package/dist/esm/ic-status-tag.entry.js +1 -1
  350. package/dist/esm/ic-step.entry.js +1 -1
  351. package/dist/esm/ic-stepper.entry.js +1 -1
  352. package/dist/esm/ic-switch.entry.js +1 -1
  353. package/dist/esm/ic-tab-group.entry.js +1 -1
  354. package/dist/esm/ic-tab-panel.entry.js +1 -1
  355. package/dist/esm/ic-tab.entry.js +1 -1
  356. package/dist/esm/ic-theme.entry.js +1 -1
  357. package/dist/esm/ic-toast.entry.js +1 -1
  358. package/dist/esm/ic-toggle-button-group.entry.js +180 -0
  359. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -0
  360. package/dist/esm/ic-toggle-button.entry.js +6 -3
  361. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  362. package/dist/esm/ic-top-navigation.entry.js +1 -1
  363. package/dist/esm/ic-typography.entry.js +1 -1
  364. package/dist/esm/index-93509377.js +24 -4
  365. package/dist/esm/loader.js +1 -1
  366. package/dist/types/components/ic-date-input/ic-date-input.d.ts +242 -0
  367. package/dist/types/components/ic-date-input/story-data.d.ts +1 -0
  368. package/dist/types/components/ic-date-input/test/helpers/ic-date-input.d.ts +23 -0
  369. package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +251 -0
  370. package/dist/types/components/ic-date-picker/ic-day-button.d.ts +16 -0
  371. package/dist/types/components/ic-date-picker/ic-month-picker.d.ts +14 -0
  372. package/dist/types/components/ic-date-picker/ic-year-picker.d.ts +16 -0
  373. package/dist/types/components/ic-date-picker/story-data.d.ts +22 -0
  374. package/dist/types/components/ic-date-picker/test/a11y/ic-date-picker.test.a11y.d.ts +1 -0
  375. package/dist/types/components/ic-menu-with-multi/ic-menu.d.ts +208 -0
  376. package/dist/types/components/ic-select-with-multi/ic-select.d.ts +289 -0
  377. package/dist/types/components/ic-select-with-multi/story-data.d.ts +32 -0
  378. package/dist/types/components/ic-select-with-multi/test/a11y/ic-select.test.a11y.d.ts +1 -0
  379. package/dist/types/components.d.ts +966 -0
  380. package/dist/types/utils/constants.d.ts +38 -0
  381. package/dist/types/utils/date-helpers.d.ts +22 -0
  382. package/dist/types/utils/helpers.d.ts +133 -2
  383. package/dist/types/utils/types.d.ts +107 -0
  384. package/hydrate/index.js +12358 -6070
  385. package/package.json +3 -3
  386. package/dist/cjs/helpers-00b08718.js.map +0 -1
  387. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +0 -1
  388. package/dist/cjs/ic-input-label_2.cjs.entry.js +0 -86
  389. package/dist/cjs/ic-input-label_2.cjs.entry.js.map +0 -1
  390. package/dist/core/p-0f0509ee.entry.js.map +0 -1
  391. package/dist/core/p-24945ee5.entry.js.map +0 -1
  392. package/dist/core/p-28fb7cca.entry.js.map +0 -1
  393. package/dist/core/p-2aad58b6.js +0 -2
  394. package/dist/core/p-2aad58b6.js.map +0 -1
  395. package/dist/core/p-38314d45.entry.js +0 -2
  396. package/dist/core/p-38314d45.entry.js.map +0 -1
  397. package/dist/core/p-5e94fae8.entry.js.map +0 -1
  398. package/dist/core/p-6de46cb7.entry.js.map +0 -1
  399. package/dist/core/p-7b849cb5.entry.js +0 -2
  400. package/dist/core/p-7b849cb5.entry.js.map +0 -1
  401. package/dist/core/p-9fdd7d73.entry.js +0 -2
  402. package/dist/core/p-9fdd7d73.entry.js.map +0 -1
  403. package/dist/core/p-a3ab9f4c.entry.js.map +0 -1
  404. package/dist/core/p-c9b11488.entry.js +0 -2
  405. package/dist/core/p-c9b11488.entry.js.map +0 -1
  406. package/dist/core/p-f163a406.entry.js +0 -2
  407. package/dist/core/p-f163a406.entry.js.map +0 -1
  408. package/dist/esm/helpers-d06dc4ed.js.map +0 -1
  409. package/dist/esm/ic-input-component-container_3.entry.js.map +0 -1
  410. package/dist/esm/ic-input-label_2.entry.js +0 -81
  411. package/dist/esm/ic-input-label_2.entry.js.map +0 -1
  412. /package/dist/core/{p-a2f366c7.entry.js.map → p-1832f4b5.entry.js.map} +0 -0
  413. /package/dist/core/{p-ff1d23cd.entry.js.map → p-1ce75941.entry.js.map} +0 -0
  414. /package/dist/core/{p-5746577f.entry.js.map → p-2e2e0099.entry.js.map} +0 -0
  415. /package/dist/core/{p-ca262cdc.entry.js.map → p-36508aad.entry.js.map} +0 -0
  416. /package/dist/core/{p-7276339a.entry.js.map → p-3745da83.entry.js.map} +0 -0
  417. /package/dist/core/{p-b43bd4f3.entry.js.map → p-3f2e77c3.entry.js.map} +0 -0
  418. /package/dist/core/{p-3c859b9e.entry.js.map → p-47ac6838.entry.js.map} +0 -0
  419. /package/dist/core/{p-3d2fcf84.entry.js.map → p-4f1ffa39.entry.js.map} +0 -0
  420. /package/dist/core/{p-4df42c76.entry.js.map → p-5759d771.entry.js.map} +0 -0
  421. /package/dist/core/{p-32f18701.entry.js.map → p-5e2e6c3b.entry.js.map} +0 -0
  422. /package/dist/core/{p-f436630b.entry.js.map → p-5fe96107.entry.js.map} +0 -0
  423. /package/dist/core/{p-7dfd61bb.entry.js.map → p-62e22508.entry.js.map} +0 -0
  424. /package/dist/core/{p-d49660e0.entry.js.map → p-6690bc04.entry.js.map} +0 -0
  425. /package/dist/core/{p-f827e4c0.entry.js.map → p-6c0e2ceb.entry.js.map} +0 -0
  426. /package/dist/core/{p-966ab920.entry.js.map → p-76d26018.entry.js.map} +0 -0
  427. /package/dist/core/{p-79b71c18.entry.js.map → p-776671cf.entry.js.map} +0 -0
  428. /package/dist/core/{p-434780c8.entry.js.map → p-7cecf5d5.entry.js.map} +0 -0
  429. /package/dist/core/{p-88971cea.entry.js.map → p-85609bdd.entry.js.map} +0 -0
  430. /package/dist/core/{p-95d3cd52.entry.js.map → p-86012178.entry.js.map} +0 -0
  431. /package/dist/core/{p-2094c844.entry.js.map → p-8a7e7d23.entry.js.map} +0 -0
  432. /package/dist/core/{p-aafb2c79.entry.js.map → p-8c90110a.entry.js.map} +0 -0
  433. /package/dist/core/{p-9ce5f082.entry.js.map → p-8ea47d42.entry.js.map} +0 -0
  434. /package/dist/core/{p-0d181ac8.entry.js.map → p-982a6e88.entry.js.map} +0 -0
  435. /package/dist/core/{p-3b9f3a07.entry.js.map → p-98448bdb.entry.js.map} +0 -0
  436. /package/dist/core/{p-c263542a.entry.js.map → p-9d01a7ad.entry.js.map} +0 -0
  437. /package/dist/core/{p-051b8266.entry.js.map → p-9d540656.entry.js.map} +0 -0
  438. /package/dist/core/{p-9fd84c69.entry.js.map → p-a0f9b259.entry.js.map} +0 -0
  439. /package/dist/core/{p-7632acc6.entry.js.map → p-a42c2f37.entry.js.map} +0 -0
  440. /package/dist/core/{p-fbb1fba0.entry.js.map → p-a6447b13.entry.js.map} +0 -0
  441. /package/dist/core/{p-116b18fe.entry.js.map → p-ae422058.entry.js.map} +0 -0
  442. /package/dist/core/{p-a7d52bd1.entry.js.map → p-b306cbc8.entry.js.map} +0 -0
  443. /package/dist/core/{p-d78fd9f3.entry.js.map → p-ca8cbd6a.entry.js.map} +0 -0
  444. /package/dist/core/{p-da4f0a58.entry.js.map → p-caf857de.entry.js.map} +0 -0
  445. /package/dist/core/{p-27aa95e7.entry.js.map → p-d3856ed3.entry.js.map} +0 -0
  446. /package/dist/core/{p-c345a874.entry.js.map → p-d4fdd8c1.entry.js.map} +0 -0
  447. /package/dist/core/{p-337b6e05.entry.js.map → p-d5c99ec3.entry.js.map} +0 -0
  448. /package/dist/core/{p-93c5b849.entry.js.map → p-f55ad6ae.entry.js.map} +0 -0
  449. /package/dist/core/{p-d9342548.entry.js.map → p-fbf4e9b7.entry.js.map} +0 -0
@@ -0,0 +1,949 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+ import { n as getLabelFromValue, p as getFilteredMenuOptions, m as getOptionsWithoutGroupTitlesCount, r as removeFormResetListener, q as inheritAttributes, t as removeDisabledFalse, a as addFormResetListener, o as onComponentRequiredPropUndefined, d as renderHiddenInput, g as getInputDescribedByText, u as hasValidationStatus, v as isMobileOrTablet, e as IcThemeForegroundEnum, I as IcInformationStatus } from './helpers2.js';
3
+ import { d as defineCustomElement$a } from './ic-button2.js';
4
+ import { d as defineCustomElement$9 } from './ic-input-component-container2.js';
5
+ import { d as defineCustomElement$8 } from './ic-input-container2.js';
6
+ import { d as defineCustomElement$7 } from './ic-input-label2.js';
7
+ import { d as defineCustomElement$6 } from './ic-input-validation2.js';
8
+ import { d as defineCustomElement$5 } from './ic-loading-indicator2.js';
9
+ import { d as defineCustomElement$4 } from './ic-menu3.js';
10
+ import { d as defineCustomElement$3 } from './ic-tooltip2.js';
11
+ import { d as defineCustomElement$2 } from './ic-typography2.js';
12
+
13
+ // Global ARIA attributes
14
+ const IC_INHERITED_ARIA = [
15
+ "aria-atomic",
16
+ "aria-autocomplete",
17
+ "aria-busy",
18
+ "aria-controls",
19
+ "aria-current",
20
+ "aria-describedby",
21
+ "aria-description",
22
+ "aria-details",
23
+ "aria-disabled",
24
+ "aria-dropeffect",
25
+ "aria-errormessage",
26
+ "aria-expanded",
27
+ "aria-flowto",
28
+ "aria-grabbed",
29
+ "aria-haspopup",
30
+ "aria-hidden",
31
+ "aria-invalid",
32
+ "aria-keyshortcuts",
33
+ "aria-label",
34
+ "aria-labelledby",
35
+ "aria-live",
36
+ "aria-owns",
37
+ "aria-relevant",
38
+ "aria-roledescription",
39
+ ];
40
+
41
+ const Expand = `<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
42
+ <path d="M7 9.5L12 14.5L17 9.5H7Z" fill="currentColor" />
43
+ </svg>
44
+ `;
45
+
46
+ const Clear = `<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
47
+ <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" />
48
+ </svg>
49
+ `;
50
+
51
+ const icSelectCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;position:relative;--menu-max-height:100px}:host(.full-width){width:100%}ic-input-component-container:hover{--border-color:var(--ic-action-dark-hover)}ic-input-component-container:active{--border-color:var(--ic-action-dark-active);color:var(--ic-action-dark-active)}ic-input-component-container.menu-open{--border-color:var(--ic-architectural-400);color:var(--ic-action-dark)}ic-input-validation .status-icon,ic-input-validation .statustext{visibility:visible}ic-input-validation.menu-open .status-icon,ic-input-validation.menu-open .statustext{visibility:hidden;transition:visibility 0s}ic-input-label{margin-bottom:var(--ic-space-xs) !important}select{border:0;border-radius:var(--ic-border-radius);background-color:var(--ic-architectural-white);color:var(--ic-color-primary-text);line-height:1.5rem;letter-spacing:0.005rem;width:100%;height:100%;padding-left:0.375rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-repeat:no-repeat;background-position:right 0.375rem center;background-image:url(\"data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>\")}select option,.select-option-selected{color:var(--ic-color-primary-text)}select:disabled{color:var(--ic-architectural-200);background-image:url(\"data:image/svg+xml;utf8,<svg fill='grey' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>\")}select:focus{border:0;outline:0}select:not([disabled]){cursor:pointer}.select-container{width:100%;display:flex;align-items:center;position:relative}.select-input{width:100%;height:100%;padding:0 0.375rem;display:flex;cursor:pointer;align-items:center;justify-content:space-between;background:none;border:none}.select-input:focus{outline:var(--ic-hc-focus-outline)}:host(:not(.disabled)) ic-input-component-container:hover .select-input{background-color:var(--ic-architectural-white)}.select-input[disabled]{pointer-events:none}:host(.searchable) .select-input{cursor:auto}.select-input.with-clear-button{padding-right:0}.value-text{max-width:calc(100% - (var(--ic-space-lg) + var(--ic-space-xxs)));box-sizing:border-box}.value-text.with-clear-button{padding-right:calc(var(--ic-space-xl) + var(--ic-space-xs))}.value-text p{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin-bottom:0 !important}.searchable-select-container{align-items:center;display:flex;width:100%;position:relative}.expand-icon{height:var(--ic-space-lg);padding-left:var(--ic-space-xxs);color:var(--ic-action-dark)}.expand-icon>svg{display:inline-block;width:var(--ic-space-lg);height:var(--ic-space-lg)}:host(.disabled) .expand-icon,:host(.disabled) .expand-icon>svg>path{color:var(--ic-architectural-200)}:host(.searchable) .expand-icon{padding-left:0;height:2.25rem}:host(.searchable) .expand-icon>svg{height:2.25rem;padding:0 0.375rem}:host(.searchable:not(.disabled)) .expand-icon>svg{cursor:pointer}.expand-icon-open{color:var(--ic-action-dark)}.expand-icon-open,:host(.searchable) .expand-icon-open{transform:rotateX(180deg)}:host(.disabled) .value-text,.placeholder{color:var(--ic-color-tertiary-text)}.select-input-end{display:flex;align-items:center}.clear-button-container{display:flex}.divider{width:var(--ic-space-1px);background-color:var(--ic-architectural-400);margin:var(--ic-space-xxs) 0;border-radius:var(--ic-space-1px);height:var(--ic-space-lg)}:host(.small) .divider{height:var(--ic-space-md)}:host(.large) .divider{height:var(--ic-space-xl)}.clear-button{position:absolute;right:calc(var(--ic-space-xl) + var(--ic-space-xxs));border-radius:var(--ic-border-radius);transition:box-shadow var(--ic-easing-transition),\n border-radius var(--ic-easing-transition)}.clear-button:focus{background-color:var(--ic-focus-blue);box-shadow:inset 0 0 0 0.125rem var(--ic-focus-glow);border-radius:0.25rem}.clear-button:focus *{fill:white}.clear-button.searchable{position:static}.searchable-select-results-status,.multi-select-selected-count{border:0;clip:rect(0, 0, 0, 0, 0);height:var(--ic-space-1px);overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:var(--ic-space-1px)}";
52
+
53
+ let inputIds = 0;
54
+ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement {
55
+ constructor() {
56
+ super();
57
+ this.__registerHost();
58
+ this.__attachShadow();
59
+ this.icBlur = createEvent(this, "icBlur", 7);
60
+ this.icChange = createEvent(this, "icChange", 7);
61
+ this.icClear = createEvent(this, "icClear", 7);
62
+ this.icFocus = createEvent(this, "icFocus", 7);
63
+ this.icInput = createEvent(this, "icInput", 7);
64
+ this.icOptionSelect = createEvent(this, "icOptionSelect", 7);
65
+ this.icOptionDeselect = createEvent(this, "icOptionDeselect", 7);
66
+ this.icRetryLoad = createEvent(this, "icRetryLoad", 7);
67
+ this.hasSetDefaultValue = false;
68
+ this.inheritedAttributes = {};
69
+ this.initialOptionsEmpty = false;
70
+ this.inputId = `ic-select-input-${inputIds++}`;
71
+ this.menuId = `${this.inputId}-menu`;
72
+ this.searchableMenuItemSelected = false;
73
+ this.ungroupedOptions = [];
74
+ this.handleRetry = (ev) => {
75
+ var _a;
76
+ if (ev.detail.keyPressed)
77
+ (_a = this.searchableSelectElement) === null || _a === void 0 ? void 0 : _a.focus();
78
+ this.blurredBecauseButtonPressed = true;
79
+ this.retryButtonClick = true;
80
+ this.hasSetDefaultValue = true;
81
+ this.icRetryLoad.emit({ value: this.hiddenInputValue });
82
+ };
83
+ this.emitIcChange = (value) => {
84
+ if (!this.searchable) {
85
+ // If "Select all" button clicked, replace value with new value (array of all option values)
86
+ if (this.multiple && !Array.isArray(value) && value !== null) {
87
+ this.handleMultipleSelectChange(value);
88
+ }
89
+ else {
90
+ this.value = value;
91
+ }
92
+ }
93
+ clearTimeout(this.debounceIcChange);
94
+ this.debounceIcChange = window.setTimeout(() => {
95
+ const valueToEmit = this.multiple ? this.value : value;
96
+ this.icChange.emit({ value: valueToEmit });
97
+ }, this.currDebounce);
98
+ };
99
+ this.emitImmediateIcChange = (value) => {
100
+ this.value = value;
101
+ clearTimeout(this.debounceIcChange);
102
+ this.icChange.emit({ value });
103
+ };
104
+ /**
105
+ * Processes the provided array of IcMenuOptions, removing duplicates and reporting them with a console.warn
106
+ * @param options array of IcMenuOptions
107
+ * @returns a new options object, with all entries possessing a duplicate 'value' field removed
108
+ */
109
+ this.deduplicateOptions = (options) => {
110
+ const uniqueValues = [];
111
+ const dedupedOptions = [];
112
+ let dedupedChildren;
113
+ options.forEach((option) => {
114
+ if (option.children) {
115
+ //If an option has children, we will loop through them
116
+ dedupedChildren = [];
117
+ option.children.forEach((child) => {
118
+ if (uniqueValues.includes(child.value)) {
119
+ console.warn(`ic-select with label ${this.label} was populated with duplicate option (value: ${child.value}) which has been removed.`);
120
+ }
121
+ else {
122
+ uniqueValues.push(child.value);
123
+ dedupedChildren.push(child);
124
+ }
125
+ });
126
+ // construct a modified option, inserting the deduplicated children alongside the original information
127
+ const modifiedParent = Object.assign(Object.assign({}, option), { children: dedupedChildren });
128
+ dedupedOptions.push(modifiedParent);
129
+ }
130
+ else {
131
+ // If an option does not have children, assess to see if it's value has been included already
132
+ if (uniqueValues.includes(option.value)) {
133
+ console.warn(`ic-select with label ${this.label} was populated with duplicate option (value: ${option.value}) which has been removed.`);
134
+ }
135
+ else {
136
+ uniqueValues.push(option.value);
137
+ dedupedOptions.push(option);
138
+ }
139
+ }
140
+ });
141
+ return dedupedOptions;
142
+ };
143
+ /**
144
+ * Loop through options array and for all options with no value, infer it from the label
145
+ */
146
+ this.setOptionsValuesFromLabels = () => {
147
+ if (this.options.length > 0 && this.options.map) {
148
+ this.options.map((option) => {
149
+ if (!option.value) {
150
+ option.value = option.label;
151
+ }
152
+ });
153
+ }
154
+ };
155
+ this.setUngroupedOptions = (event) => {
156
+ this.ungroupedOptions = event.detail.options;
157
+ };
158
+ this.setTextColor = () => {
159
+ if (this.nativeSelectElement.selectedIndex === 0) {
160
+ this.nativeSelectElement.className = "placeholder";
161
+ }
162
+ else {
163
+ this.nativeSelectElement.className = "select-option-selected";
164
+ }
165
+ };
166
+ this.setMenuChange = (open) => {
167
+ if (this.open !== open) {
168
+ this.open = open;
169
+ }
170
+ };
171
+ this.getLabelFromValue = (value) => {
172
+ return getLabelFromValue(value, this.uniqueOptions);
173
+ };
174
+ this.getMultipleOptionsString = (selectedValues) => {
175
+ const selectedLabels = selectedValues === null || selectedValues === void 0 ? void 0 : selectedValues.map((value) => this.getLabelFromValue(value));
176
+ return selectedLabels === null || selectedLabels === void 0 ? void 0 : selectedLabels.join(", ");
177
+ };
178
+ this.getFilteredChildMenuOptions = (option) => {
179
+ let children = option.children;
180
+ if (this.searchable) {
181
+ children = getFilteredMenuOptions(option.children, this.includeDescriptionsInSearch, this.searchableSelectInputValue, this.searchMatchPosition);
182
+ }
183
+ else {
184
+ children = getFilteredMenuOptions(option.children, false, this.pressedCharacters, "start");
185
+ }
186
+ const newOption = Object.assign({}, option);
187
+ newOption.children = children;
188
+ return newOption;
189
+ };
190
+ // (For multi-select) get value array, i.e. selected option values, in order they appear in option list
191
+ this.getValueSortedByOptions = (value) => {
192
+ const valueArray = value;
193
+ const valuesFromAllOptions = this.ungroupedOptions.map((option) => option.value);
194
+ valueArray.sort((a, b) => valuesFromAllOptions.indexOf(a) - valuesFromAllOptions.indexOf(b));
195
+ return valueArray;
196
+ };
197
+ this.handleNativeSelectChange = () => {
198
+ this.icOptionSelect.emit({ value: this.nativeSelectElement.value });
199
+ this.emitImmediateIcChange(this.nativeSelectElement.value);
200
+ this.setTextColor();
201
+ };
202
+ // Handle option select for when a custom input box and menu is rendered
203
+ // (rather than native <select> - rendered when viewed on a mobile / tablet screen)
204
+ this.handleCustomSelectChange = (event) => {
205
+ var _a;
206
+ const value = event.detail.value;
207
+ if (this.searchable && event.detail.label === this.emptyOptionListText) {
208
+ this.searchableSelectElement.focus();
209
+ return;
210
+ }
211
+ if (this.searchable) {
212
+ this.value = value;
213
+ this.searchableMenuItemSelected = true;
214
+ // After editing the input, if selecting the same option as before, set the input value to label again
215
+ if (this.value === this.currValue) {
216
+ this.searchableSelectInputValue = this.getLabelFromValue(this.value);
217
+ }
218
+ this.inputValueToFilter = null;
219
+ this.hiddenInputValue = this.getValueFromLabel(this.searchableSelectInputValue);
220
+ }
221
+ if (this.multiple && ((_a = this.value) === null || _a === void 0 ? void 0 : _a.includes(value))) {
222
+ this.icOptionDeselect.emit({ value });
223
+ }
224
+ else {
225
+ this.icOptionSelect.emit({ value });
226
+ }
227
+ this.ariaActiveDescendant = event.detail.optionId;
228
+ this.emitIcChange(value);
229
+ };
230
+ // Update selected options - adds / removes them, in order of option list
231
+ // Create new array if value prop is undefined
232
+ this.handleMultipleSelectChange = (value) => {
233
+ if (this.value) {
234
+ let valueArray = this.value.slice();
235
+ if (this.value.includes(value)) {
236
+ const valueIndex = valueArray.indexOf(value);
237
+ valueArray.splice(valueIndex, 1);
238
+ }
239
+ else {
240
+ valueArray.push(value);
241
+ valueArray = this.getValueSortedByOptions(valueArray);
242
+ }
243
+ this.value = valueArray.length === 0 ? null : valueArray;
244
+ }
245
+ else {
246
+ const valueArray = [];
247
+ valueArray.push(value);
248
+ this.value = valueArray;
249
+ }
250
+ };
251
+ this.handleSelectAllChange = (event) => {
252
+ const selectAllOptions = event.detail.select;
253
+ const allEnabledOptions = this.ungroupedOptions.filter((option) => !option.disabled);
254
+ const allValues = allEnabledOptions.map((option) => option.value);
255
+ let newValue;
256
+ if (selectAllOptions) {
257
+ let unselectedValues;
258
+ // Only emit icOptionSelect for all values that are newly selected
259
+ if (this.value) {
260
+ unselectedValues = allValues.filter((value) => this.value && !this.value.includes(value));
261
+ }
262
+ else {
263
+ unselectedValues = allValues;
264
+ }
265
+ unselectedValues.forEach((value) => this.icOptionSelect.emit({ value }));
266
+ newValue = allValues;
267
+ }
268
+ else {
269
+ // Only emit icOptionDeselect for values that were selected
270
+ this.value.forEach((value) => this.icOptionDeselect.emit({ value }));
271
+ newValue = null;
272
+ }
273
+ this.emitIcChange(newValue);
274
+ };
275
+ this.handleMenuChange = (event) => {
276
+ this.open = event.detail.open;
277
+ this.pressedCharacters = "";
278
+ this.searchable && this.handleFocusIndicatorDisplay();
279
+ };
280
+ // clears the debounce delay when navigating the menu with arrow keys etc
281
+ // to prevent delay in change event, which should only occur when typing in input
282
+ this.handleMenuKeyPress = (ev) => {
283
+ ev.cancelBubble = true;
284
+ if (!this.multiple) {
285
+ this.handleCharacterKeyDown(ev.detail.key);
286
+ }
287
+ };
288
+ this.handleFocusIndicatorDisplay = () => {
289
+ const focusIndicator = this.el.shadowRoot.querySelector(".focus-indicator");
290
+ if (this.open) {
291
+ focusIndicator.classList.add("focus-indicator-enabled");
292
+ }
293
+ else {
294
+ focusIndicator.classList.remove("focus-indicator-enabled");
295
+ }
296
+ };
297
+ this.handleMouseDown = (event) => {
298
+ if (!this.open) {
299
+ event.preventDefault();
300
+ }
301
+ };
302
+ this.isExternalFiltering = () => this.searchable && this.disableFilter;
303
+ this.handleClick = (event) => {
304
+ var _a;
305
+ if (!this.open) {
306
+ if (this.isExternalFiltering()) {
307
+ this.menu.options = this.filteredOptions;
308
+ }
309
+ else if (!this.hasTimedOut &&
310
+ !this.loading &&
311
+ !((_a = this.noOptions) === null || _a === void 0 ? void 0 : _a.length) &&
312
+ (!this.searchable || this.searchableMenuItemSelected)) {
313
+ this.noOptions = null;
314
+ this.menu.options = this.uniqueOptions;
315
+ }
316
+ }
317
+ if (event.detail !== 0) {
318
+ this.menu.handleClickOpen();
319
+ }
320
+ };
321
+ this.handleExpandIconMouseDown = (event) => {
322
+ if (!this.disabled) {
323
+ event.preventDefault();
324
+ this.searchableSelectElement.focus();
325
+ this.handleClick(event);
326
+ }
327
+ };
328
+ this.handleClear = (event) => {
329
+ event.stopPropagation();
330
+ this.hasTimedOut = false;
331
+ clearTimeout(this.timeoutTimer);
332
+ this.noOptions = null;
333
+ this.emitImmediateIcChange(null);
334
+ this.icClear.emit();
335
+ if (this.searchable) {
336
+ this.searchableSelectElement.value = null;
337
+ this.searchableSelectInputValue = null;
338
+ this.filteredOptions = this.uniqueOptions;
339
+ this.hiddenInputValue = null;
340
+ this.searchableSelectElement.focus();
341
+ }
342
+ else {
343
+ this.customSelectElement.focus();
344
+ }
345
+ };
346
+ this.handleCharacterKeyDown = (key) => {
347
+ // Only close menu when space is pressed if not being used alongside character keys to quickly select options
348
+ if (this.open &&
349
+ key === " " &&
350
+ this.pressedCharacters.length === 0 &&
351
+ !this.hasTimedOut &&
352
+ !this.loading) {
353
+ this.setMenuChange(false);
354
+ }
355
+ if (key.length === 1 && !this.searchable) {
356
+ window.clearTimeout(this.characterKeyPressTimer);
357
+ this.characterKeyPressTimer = window.setTimeout(() => (this.pressedCharacters = ""), 1000);
358
+ if (!(key === " " && !this.pressedCharacters)) {
359
+ this.pressedCharacters += key;
360
+ this.handleFilter();
361
+ if (!this.noOptions) {
362
+ this.emitImmediateIcChange(this.filteredOptions[0].value);
363
+ }
364
+ }
365
+ }
366
+ else {
367
+ this.pressedCharacters = "";
368
+ }
369
+ };
370
+ this.handleNativeSelectKeyDown = (event) => {
371
+ if ((event.key !== "Escape" && event.key !== "Tab") || this.open) {
372
+ event.cancelBubble = true;
373
+ }
374
+ this.handleCharacterKeyDown(event.key);
375
+ };
376
+ this.handleKeyDown = (event) => {
377
+ if ((event.key !== "Escape" && event.key !== "Tab") || this.open) {
378
+ event.cancelBubble = true;
379
+ }
380
+ const isArrowKey = event.key === "ArrowDown" || event.key === "ArrowUp";
381
+ if (!this.open) {
382
+ if (this.isExternalFiltering() && (event.key === "Enter" || isArrowKey)) {
383
+ this.menu.options = this.filteredOptions;
384
+ }
385
+ else {
386
+ if (!this.hasTimedOut) {
387
+ this.noOptions = null;
388
+ this.menu.options = this.uniqueOptions;
389
+ }
390
+ }
391
+ }
392
+ if (this.open && event.key === "Enter") {
393
+ this.setMenuChange(false);
394
+ }
395
+ else {
396
+ if (!(isArrowKey && this.noOptions !== null)) {
397
+ if (!(event.key === " " && this.pressedCharacters.length > 0)) {
398
+ // Keyboard events get passed onto ic-menu
399
+ this.menu.handleKeyboardOpen(event);
400
+ }
401
+ if (!this.multiple) {
402
+ this.handleCharacterKeyDown(event.key);
403
+ }
404
+ }
405
+ }
406
+ };
407
+ this.handleClearButtonFocus = () => {
408
+ this.clearButtonFocused = true;
409
+ };
410
+ this.handleClearButtonBlur = (ev) => {
411
+ var _a;
412
+ const retryButton = (_a = this.menu) === null || _a === void 0 ? void 0 : _a.querySelector("#retry-button");
413
+ if (!(this.searchableSelectElement &&
414
+ ev.relatedTarget === this.searchableSelectElement) &&
415
+ !(retryButton && ev.relatedTarget === retryButton)) {
416
+ this.setMenuChange(false);
417
+ this.handleFocusIndicatorDisplay();
418
+ }
419
+ this.clearButtonFocused = false;
420
+ };
421
+ this.handleFilter = () => {
422
+ var _a;
423
+ const options = this.deduplicateOptions(this.searchable ? [...this.uniqueOptions] : this.ungroupedOptions);
424
+ let isGrouped = false;
425
+ let newFilteredOptions = [];
426
+ options.map((option) => {
427
+ if (option.children)
428
+ isGrouped = true;
429
+ });
430
+ let menuOptionsFiltered;
431
+ if (this.searchable) {
432
+ menuOptionsFiltered = getFilteredMenuOptions(options, this.includeDescriptionsInSearch, this.inputValueToFilter, this.searchMatchPosition);
433
+ this.searchableMenuItemSelected = false;
434
+ }
435
+ else {
436
+ menuOptionsFiltered = getFilteredMenuOptions(options, false, this.pressedCharacters, "start");
437
+ }
438
+ if (!isGrouped &&
439
+ ((_a = menuOptionsFiltered[0]) === null || _a === void 0 ? void 0 : _a.label) !== this.emptyOptionListText) {
440
+ newFilteredOptions = menuOptionsFiltered;
441
+ }
442
+ else if (isGrouped) {
443
+ options.map((option) => {
444
+ if (this.includeGroupTitlesInSearch) {
445
+ if (menuOptionsFiltered.indexOf(option) !== -1) {
446
+ newFilteredOptions.push(option);
447
+ }
448
+ else {
449
+ newFilteredOptions.push(this.getFilteredChildMenuOptions(option));
450
+ }
451
+ }
452
+ else {
453
+ newFilteredOptions.push(this.getFilteredChildMenuOptions(option));
454
+ }
455
+ });
456
+ }
457
+ let noChildOptionsWhenFiltered = false;
458
+ if (isGrouped) {
459
+ noChildOptionsWhenFiltered = true;
460
+ newFilteredOptions.map((option) => {
461
+ if (option.children.length > 0) {
462
+ noChildOptionsWhenFiltered = false;
463
+ }
464
+ });
465
+ }
466
+ if (newFilteredOptions.length > 0 && !noChildOptionsWhenFiltered) {
467
+ this.noOptions = null;
468
+ this.filteredOptions = newFilteredOptions;
469
+ }
470
+ else {
471
+ this.noOptions = [{ label: this.emptyOptionListText, value: "" }];
472
+ this.filteredOptions = this.noOptions;
473
+ }
474
+ };
475
+ /**
476
+ * Put the select component into loading state.
477
+ * Replace options with the loading message. If timeout is enabled, set the timeout and once passed, replace options with the loading error message
478
+ */
479
+ this.triggerLoading = () => {
480
+ this.hasTimedOut = false;
481
+ this.noOptions = [{ label: this.loadingLabel, value: "", loading: true }];
482
+ if (this.filteredOptions !== this.noOptions && this.searchable) {
483
+ this.filteredOptions = this.noOptions;
484
+ }
485
+ else if (this.uniqueOptions !== this.noOptions && !this.searchable) {
486
+ this.uniqueOptions = this.noOptions;
487
+ }
488
+ if (this.timeout) {
489
+ this.timeoutTimer = window.setTimeout(() => {
490
+ this.loading = false;
491
+ this.hasTimedOut = true;
492
+ this.noOptions = [
493
+ { label: this.loadingErrorLabel, value: "", timedOut: true },
494
+ ];
495
+ this.filteredOptions = this.noOptions;
496
+ if (!this.searchable)
497
+ this.uniqueOptions = this.noOptions;
498
+ }, this.timeout);
499
+ }
500
+ };
501
+ this.getValueFromLabel = (label) => {
502
+ var _a;
503
+ return (_a = this.uniqueOptions.find((option) => option.label === label)) === null || _a === void 0 ? void 0 : _a.value;
504
+ };
505
+ this.handleSearchableSelectInput = (event) => {
506
+ this.searchableSelectInputValue = event.target.value;
507
+ this.icInput.emit({ value: this.searchableSelectInputValue });
508
+ this.emitIcChange(this.searchableSelectInputValue);
509
+ this.hiddenInputValue = this.searchableSelectInputValue;
510
+ this.inputValueToFilter = this.searchableSelectInputValue;
511
+ this.setMenuChange(true);
512
+ if (!this.disableFilter) {
513
+ this.handleFilter();
514
+ this.debounceAriaLiveUpdate();
515
+ }
516
+ };
517
+ this.updateSearchableSelectResultAriaLive = () => {
518
+ const searchableSelectResultsStatusEl = this.el.shadowRoot.querySelector(".searchable-select-results-status");
519
+ if (searchableSelectResultsStatusEl) {
520
+ if (this.noOptions !== null) {
521
+ searchableSelectResultsStatusEl.innerText = this.emptyOptionListText;
522
+ }
523
+ else {
524
+ searchableSelectResultsStatusEl.innerText = "";
525
+ }
526
+ }
527
+ };
528
+ this.updateMultiSelectedCountAriaLive = () => {
529
+ var _a;
530
+ const multiSelectSelectedCountEl = this.el.shadowRoot.querySelector(".multi-select-selected-count");
531
+ const selectedCount = `${(_a = this.currValue) === null || _a === void 0 ? void 0 : _a.length} of ${getOptionsWithoutGroupTitlesCount(this.options)} selected`;
532
+ if (multiSelectSelectedCountEl &&
533
+ multiSelectSelectedCountEl.innerText !== selectedCount) {
534
+ multiSelectSelectedCountEl.innerText = selectedCount;
535
+ }
536
+ };
537
+ this.getDefaultValue = (value) => this.getLabelFromValue(value) || value || null;
538
+ this.setDefaultValue = () => {
539
+ if (!this.hasSetDefaultValue && this.currValue) {
540
+ this.searchableSelectInputValue =
541
+ this.searchable && this.getDefaultValue(this.currValue);
542
+ this.initialValue = this.currValue;
543
+ this.hasSetDefaultValue = true;
544
+ }
545
+ };
546
+ this.onFocus = () => {
547
+ this.icFocus.emit();
548
+ };
549
+ this.onBlur = (event) => {
550
+ var _a;
551
+ const target = event.relatedTarget;
552
+ if (target !== null &&
553
+ target.tagName === "UL" &&
554
+ target.className.includes("menu")) {
555
+ return;
556
+ }
557
+ const retryButton = (_a = this.menu) === null || _a === void 0 ? void 0 : _a.querySelector("#retry-button");
558
+ const isSearchableAndNoFocusedInternalElements = this.searchable &&
559
+ event.relatedTarget !== this.menu &&
560
+ !Array.from(this.menu.querySelectorAll("[role='option']")).includes(event.relatedTarget) &&
561
+ !(this.clearButton && event.relatedTarget === this.clearButton) &&
562
+ !(retryButton && event.relatedTarget === retryButton);
563
+ if (isSearchableAndNoFocusedInternalElements) {
564
+ if (!this.retryButtonClick) {
565
+ this.setMenuChange(false);
566
+ }
567
+ this.handleFocusIndicatorDisplay();
568
+ }
569
+ this.retryButtonClick = false;
570
+ this.icBlur.emit();
571
+ };
572
+ this.onTimeoutBlur = (ev) => {
573
+ if (ev.detail.ev.relatedTarget !==
574
+ this.searchableSelectElement &&
575
+ !this.blurredBecauseButtonPressed) {
576
+ this.setMenuChange(false);
577
+ this.handleFocusIndicatorDisplay();
578
+ this.icBlur.emit();
579
+ }
580
+ this.blurredBecauseButtonPressed = false;
581
+ };
582
+ this.handleFormReset = () => {
583
+ this.value = this.initialValue;
584
+ if (this.searchable) {
585
+ this.searchableSelectInputValue = this.getDefaultValue(this.value);
586
+ this.hiddenInputValue = this.value;
587
+ }
588
+ };
589
+ this.ariaActiveDescendant = undefined;
590
+ this.clearButtonFocused = false;
591
+ this.debounceIcChange = undefined;
592
+ this.hiddenInputValue = undefined;
593
+ this.noOptions = null;
594
+ this.open = false;
595
+ this.pressedCharacters = "";
596
+ this.searchableSelectInputValue = null;
597
+ this.charactersUntilSuggestions = 0;
598
+ this.disabled = false;
599
+ this.disableFilter = false;
600
+ this.emptyOptionListText = "No results found";
601
+ this.form = undefined;
602
+ this.formaction = undefined;
603
+ this.formenctype = undefined;
604
+ this.formmethod = undefined;
605
+ this.formnovalidate = undefined;
606
+ this.formtarget = undefined;
607
+ this.fullWidth = false;
608
+ this.helperText = "";
609
+ this.hideLabel = false;
610
+ this.includeDescriptionsInSearch = false;
611
+ this.includeGroupTitlesInSearch = false;
612
+ this.label = undefined;
613
+ this.loadingErrorLabel = "Loading Error";
614
+ this.loadingLabel = "Loading...";
615
+ this.multiple = false;
616
+ this.name = this.inputId;
617
+ this.placeholder = "Select an option";
618
+ this.readonly = false;
619
+ this.required = false;
620
+ this.searchable = false;
621
+ this.searchMatchPosition = "anywhere";
622
+ this.selectOnEnter = false;
623
+ this.showClearButton = false;
624
+ this.size = "default";
625
+ this.small = false;
626
+ this.timeout = undefined;
627
+ this.validationStatus = "";
628
+ this.validationText = "";
629
+ this.loading = false;
630
+ this.options = [];
631
+ this.filteredOptions = this.options;
632
+ this.uniqueOptions = this.options;
633
+ this.debounce = 0;
634
+ this.currDebounce = this.debounce;
635
+ this.value = undefined;
636
+ this.initialValue = this.value;
637
+ this.inputValueToFilter = this.value;
638
+ this.currValue = this.value;
639
+ }
640
+ loadingHandler(newValue) {
641
+ newValue && this.triggerLoading();
642
+ }
643
+ watchOptionsHandler() {
644
+ if (!this.hasTimedOut && this.options !== this.noOptions) {
645
+ this.loading = false;
646
+ clearTimeout(this.timeoutTimer);
647
+ if (this.isExternalFiltering()) {
648
+ // When searchable select
649
+ if (this.options.length > 0) {
650
+ this.setOptionsValuesFromLabels();
651
+ this.noOptions = null;
652
+ this.uniqueOptions = this.deduplicateOptions(this.options);
653
+ this.filteredOptions = this.uniqueOptions;
654
+ }
655
+ else {
656
+ this.noOptions = [{ label: this.emptyOptionListText, value: "" }];
657
+ this.uniqueOptions = this.noOptions;
658
+ this.filteredOptions = this.noOptions;
659
+ }
660
+ this.updateSearchableSelectResultAriaLive();
661
+ this.setDefaultValue();
662
+ }
663
+ else {
664
+ this.setOptionsValuesFromLabels();
665
+ this.uniqueOptions = this.deduplicateOptions(this.options);
666
+ this.filteredOptions = this.uniqueOptions;
667
+ if (this.initialOptionsEmpty) {
668
+ this.setDefaultValue();
669
+ this.initialOptionsEmpty = false;
670
+ }
671
+ }
672
+ }
673
+ else {
674
+ if (!this.searchable)
675
+ this.options = this.noOptions;
676
+ }
677
+ }
678
+ debounceChangedHandler(newValue) {
679
+ this.updateOnChangeDebounce(newValue);
680
+ }
681
+ valueChangedHandler() {
682
+ if (this.value !== this.currValue) {
683
+ if (this.value && this.multiple) {
684
+ this.currValue = this.getValueSortedByOptions(this.value);
685
+ this.updateMultiSelectedCountAriaLive();
686
+ }
687
+ else {
688
+ this.currValue = this.value;
689
+ }
690
+ }
691
+ if (this.searchable) {
692
+ this.searchableSelectInputValue =
693
+ this.getLabelFromValue(this.currValue) ||
694
+ this.currValue;
695
+ }
696
+ }
697
+ disconnectedCallback() {
698
+ removeFormResetListener(this.el, this.handleFormReset);
699
+ }
700
+ componentWillLoad() {
701
+ this.inheritedAttributes = inheritAttributes(this.el, [
702
+ ...IC_INHERITED_ARIA,
703
+ "tabindex",
704
+ "title",
705
+ ]);
706
+ removeDisabledFalse(this.disabled, this.el);
707
+ this.setOptionsValuesFromLabels();
708
+ addFormResetListener(this.el, this.handleFormReset);
709
+ if (!this.options.length) {
710
+ this.initialOptionsEmpty = true;
711
+ this.noOptions = [{ label: this.emptyOptionListText, value: "" }];
712
+ this.uniqueOptions = this.noOptions;
713
+ this.filteredOptions = this.noOptions;
714
+ }
715
+ else {
716
+ this.setDefaultValue();
717
+ this.uniqueOptions = this.deduplicateOptions(this.options);
718
+ }
719
+ }
720
+ componentDidLoad() {
721
+ onComponentRequiredPropUndefined([{ prop: this.label, propName: "label" }], "Select");
722
+ if (this.loading) {
723
+ this.triggerLoading();
724
+ }
725
+ this.hiddenInputValue = this.searchable && this.currValue;
726
+ }
727
+ componentDidRender() {
728
+ if (this.nativeSelectElement && !this.disabled) {
729
+ this.setTextColor();
730
+ }
731
+ }
732
+ /**
733
+ * Sets focus on the input box.
734
+ */
735
+ async setFocus() {
736
+ if (this.nativeSelectElement) {
737
+ this.nativeSelectElement.focus();
738
+ }
739
+ else if (this.customSelectElement) {
740
+ this.customSelectElement.focus();
741
+ }
742
+ else if (this.searchableSelectElement) {
743
+ this.searchableSelectElement.focus();
744
+ }
745
+ }
746
+ updateOnChangeDebounce(newValue) {
747
+ if (this.currDebounce !== newValue) {
748
+ this.currDebounce = newValue;
749
+ }
750
+ }
751
+ debounceAriaLiveUpdate() {
752
+ clearTimeout(this.debounceAria);
753
+ window.setTimeout(() => {
754
+ this.updateSearchableSelectResultAriaLive();
755
+ }, 800);
756
+ }
757
+ render() {
758
+ const { size, small, disabled, fullWidth, helperText, hideLabel, label, menuId, multiple, name, options, placeholder, readonly, required, searchable, showClearButton, validationStatus, validationText, currValue, } = this;
759
+ // HTML inputs only accept 'string' for their value
760
+ // Does not cause errors when it is a multi-select - sets value correctly, to a comma-separated string
761
+ renderHiddenInput(true, this.el, name, this.searchable ? this.hiddenInputValue : currValue, disabled);
762
+ const invalid = validationStatus === IcInformationStatus.Error ? "true" : "false";
763
+ const describedBy = getInputDescribedByText(this.inputId, helperText !== "", hasValidationStatus(this.validationStatus, this.disabled)).trim();
764
+ const optionsSelectedCount = `${currValue === null || currValue === void 0 ? void 0 : currValue.length} of ${getOptionsWithoutGroupTitlesCount(this.options)} selected`;
765
+ return (h(Host, { class: {
766
+ disabled: disabled,
767
+ searchable: searchable,
768
+ small: small,
769
+ [size]: size !== "default",
770
+ "full-width": fullWidth,
771
+ }, onBlur: this.onBlur }, h("ic-input-container", { readonly: readonly }, !hideLabel && (h("ic-input-label", { for: this.inputId, label: label, helperText: helperText, required: required, disabled: disabled, readonly: readonly })), h("ic-input-component-container", { ref: (el) => (this.anchorEl = el), class: { "menu-open": this.open }, small: small, size: size, fullWidth: fullWidth, disabled: disabled, readonly: readonly, validationStatus: validationStatus }, readonly ? (h("ic-typography", null, h("p", null, multiple
772
+ ? this.getMultipleOptionsString(currValue)
773
+ : 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) => {
774
+ if (option.children) {
775
+ return (h("optgroup", { label: option.label }, option.children.map((option) => (h("option", { value: option.value, disabled: option.disabled, selected: option.value === currValue }, option.label)))));
776
+ }
777
+ else {
778
+ return (h("option", { value: option.value, disabled: option.disabled, selected: option.value === currValue }, option.label));
779
+ }
780
+ }))) : searchable ? (h("div", { class: "searchable-select-container" }, h("input", { class: {
781
+ "select-input": true,
782
+ "with-clear-button": !!this.searchableSelectInputValue,
783
+ }, role: "combobox", autocomplete: "off", "aria-label": label, "aria-describedby": describedBy, "aria-activedescendant": this.ariaActiveDescendant, "aria-autocomplete": "list", "aria-expanded": this.open ? "true" : "false", "aria-invalid": invalid, "aria-required": required ? "true" : "false", "aria-controls": menuId, ref: (el) => (this.searchableSelectElement = el), id: this.inputId, value: this.searchableSelectInputValue, placeholder: placeholder, disabled: disabled, onInput: this.handleSearchableSelectInput, onClick: this.handleClick, onKeyDown: this.handleKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, form: this.form, formaction: this.formaction, formenctype: this.formenctype, formmethod: this.formmethod, formnovalidate: this.formnovalidate, formtarget: this.formtarget }), this.searchableSelectInputValue &&
784
+ (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
785
+ ? "Clear input"
786
+ : "Clear selection", class: "clear-button", innerHTML: Clear, onClick: this.handleClear, onFocus: this.handleClearButtonFocus, onBlur: this.handleClearButtonBlur, size: size, variant: "icon", appearance: this.clearButtonFocused
787
+ ? IcThemeForegroundEnum.Light
788
+ : IcThemeForegroundEnum.Dark }), h("div", { class: "divider" }))), h("span", { onMouseDown: this.handleExpandIconMouseDown, class: {
789
+ "expand-icon": true,
790
+ "expand-icon-open": this.open,
791
+ }, 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
792
+ ? `${optionsSelectedCount}, ${this.getMultipleOptionsString(currValue)}`
793
+ : this.getLabelFromValue(currValue)) ||
794
+ 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: {
795
+ "value-text": true,
796
+ "with-clear-button": currValue && showClearButton,
797
+ placeholder: !this.value || (multiple && this.value.length < 1),
798
+ } }, h("p", null, (multiple
799
+ ? this.getMultipleOptionsString(currValue)
800
+ : this.getLabelFromValue(currValue)) ||
801
+ placeholder)), h("div", { class: "select-input-end" }, currValue && showClearButton && (h("div", { class: "divider" })), h("span", { class: {
802
+ "expand-icon": true,
803
+ "expand-icon-open": this.open,
804
+ }, 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
805
+ ? IcThemeForegroundEnum.Light
806
+ : IcThemeForegroundEnum.Dark }))))), (!isMobileOrTablet() || multiple) && (h("ic-menu-with-multi", { class: {
807
+ "no-results": this.loading ||
808
+ this.hasTimedOut ||
809
+ (this.noOptions !== null &&
810
+ this.noOptions[0] &&
811
+ this.noOptions[0].label === this.emptyOptionListText),
812
+ }, ref: (el) => (this.menu = el), inputEl: searchable
813
+ ? this.searchableSelectElement
814
+ : this.customSelectElement, inputLabel: label, anchorEl: this.anchorEl, small: small, size: size, menuId: menuId, open: this.open, options: searchable ? this.filteredOptions : this.uniqueOptions, value: multiple ? currValue : currValue, fullWidth: fullWidth, selectOnEnter: this.selectOnEnter, onMenuStateChange: this.handleMenuChange, onMenuOptionSelect: this.handleCustomSelectChange, onMenuOptionSelectAll: this.handleSelectAllChange, onMenuKeyPress: this.handleMenuKeyPress, onUngroupedOptionsSet: this.setUngroupedOptions, onRetryButtonClicked: this.handleRetry, parentEl: this.el, onTimeoutBlur: this.onTimeoutBlur, activationType: this.searchable || multiple || this.selectOnEnter
815
+ ? "manual"
816
+ : "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 })))));
817
+ }
818
+ static get delegatesFocus() { return true; }
819
+ get el() { return this; }
820
+ static get watchers() { return {
821
+ "loading": ["loadingHandler"],
822
+ "options": ["watchOptionsHandler"],
823
+ "debounce": ["debounceChangedHandler"],
824
+ "value": ["valueChangedHandler"]
825
+ }; }
826
+ static get style() { return icSelectCss; }
827
+ }, [17, "ic-select-with-multi", {
828
+ "charactersUntilSuggestions": [2, "characters-until-suggestions"],
829
+ "disabled": [516],
830
+ "disableFilter": [4, "disable-filter"],
831
+ "emptyOptionListText": [1, "empty-option-list-text"],
832
+ "form": [1],
833
+ "formaction": [1],
834
+ "formenctype": [1],
835
+ "formmethod": [1],
836
+ "formnovalidate": [4],
837
+ "formtarget": [1],
838
+ "fullWidth": [4, "full-width"],
839
+ "helperText": [1, "helper-text"],
840
+ "hideLabel": [4, "hide-label"],
841
+ "includeDescriptionsInSearch": [4, "include-descriptions-in-search"],
842
+ "includeGroupTitlesInSearch": [4, "include-group-titles-in-search"],
843
+ "label": [1],
844
+ "loadingErrorLabel": [1, "loading-error-label"],
845
+ "loadingLabel": [1, "loading-label"],
846
+ "multiple": [4],
847
+ "name": [1],
848
+ "placeholder": [1],
849
+ "readonly": [4],
850
+ "required": [4],
851
+ "searchable": [4],
852
+ "searchMatchPosition": [1, "search-match-position"],
853
+ "selectOnEnter": [4, "select-on-enter"],
854
+ "showClearButton": [4, "show-clear-button"],
855
+ "size": [1],
856
+ "small": [4],
857
+ "timeout": [2],
858
+ "validationStatus": [1, "validation-status"],
859
+ "validationText": [1, "validation-text"],
860
+ "loading": [1028],
861
+ "options": [16],
862
+ "debounce": [2],
863
+ "value": [1025],
864
+ "ariaActiveDescendant": [32],
865
+ "clearButtonFocused": [32],
866
+ "debounceIcChange": [32],
867
+ "hiddenInputValue": [32],
868
+ "noOptions": [32],
869
+ "open": [32],
870
+ "pressedCharacters": [32],
871
+ "searchableSelectInputValue": [32],
872
+ "filteredOptions": [32],
873
+ "uniqueOptions": [32],
874
+ "currDebounce": [32],
875
+ "initialValue": [32],
876
+ "inputValueToFilter": [32],
877
+ "currValue": [32],
878
+ "setFocus": [64]
879
+ }, undefined, {
880
+ "loading": ["loadingHandler"],
881
+ "options": ["watchOptionsHandler"],
882
+ "debounce": ["debounceChangedHandler"],
883
+ "value": ["valueChangedHandler"]
884
+ }]);
885
+ function defineCustomElement$1() {
886
+ if (typeof customElements === "undefined") {
887
+ return;
888
+ }
889
+ const components = ["ic-select-with-multi", "ic-button", "ic-input-component-container", "ic-input-container", "ic-input-label", "ic-input-validation", "ic-loading-indicator", "ic-menu-with-multi", "ic-tooltip", "ic-typography"];
890
+ components.forEach(tagName => { switch (tagName) {
891
+ case "ic-select-with-multi":
892
+ if (!customElements.get(tagName)) {
893
+ customElements.define(tagName, Select);
894
+ }
895
+ break;
896
+ case "ic-button":
897
+ if (!customElements.get(tagName)) {
898
+ defineCustomElement$a();
899
+ }
900
+ break;
901
+ case "ic-input-component-container":
902
+ if (!customElements.get(tagName)) {
903
+ defineCustomElement$9();
904
+ }
905
+ break;
906
+ case "ic-input-container":
907
+ if (!customElements.get(tagName)) {
908
+ defineCustomElement$8();
909
+ }
910
+ break;
911
+ case "ic-input-label":
912
+ if (!customElements.get(tagName)) {
913
+ defineCustomElement$7();
914
+ }
915
+ break;
916
+ case "ic-input-validation":
917
+ if (!customElements.get(tagName)) {
918
+ defineCustomElement$6();
919
+ }
920
+ break;
921
+ case "ic-loading-indicator":
922
+ if (!customElements.get(tagName)) {
923
+ defineCustomElement$5();
924
+ }
925
+ break;
926
+ case "ic-menu-with-multi":
927
+ if (!customElements.get(tagName)) {
928
+ defineCustomElement$4();
929
+ }
930
+ break;
931
+ case "ic-tooltip":
932
+ if (!customElements.get(tagName)) {
933
+ defineCustomElement$3();
934
+ }
935
+ break;
936
+ case "ic-typography":
937
+ if (!customElements.get(tagName)) {
938
+ defineCustomElement$2();
939
+ }
940
+ break;
941
+ } });
942
+ }
943
+
944
+ const IcSelectWithMulti = Select;
945
+ const defineCustomElement = defineCustomElement$1;
946
+
947
+ export { IcSelectWithMulti, defineCustomElement };
948
+
949
+ //# sourceMappingURL=ic-select-with-multi.js.map