@ukic/web-components 3.21.0 → 3.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (447) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-3a796e7a.js → helpers-81cd6930.js} +3 -16
  3. package/dist/cjs/helpers-81cd6930.js.map +1 -0
  4. package/dist/cjs/ic-accordion-group.cjs.entry.js +1 -1
  5. package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
  6. package/dist/cjs/ic-action-chip.cjs.entry.js +7 -3
  7. package/dist/cjs/ic-action-chip.cjs.entry.js.map +1 -1
  8. package/dist/cjs/ic-alert.cjs.entry.js +1 -1
  9. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  10. package/dist/cjs/ic-badge.cjs.entry.js +1 -1
  11. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  12. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  13. package/dist/cjs/ic-button_3.cjs.entry.js +5 -3
  14. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-card-horizontal.cjs.entry.js +1 -1
  16. package/dist/cjs/ic-card-vertical.cjs.entry.js +1 -1
  17. package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
  18. package/dist/cjs/ic-checkbox.cjs.entry.js +5 -5
  19. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ic-chip.cjs.entry.js +7 -3
  21. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  22. package/dist/cjs/ic-classification-banner.cjs.entry.js +13 -5
  23. package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
  24. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  25. package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
  26. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  27. package/dist/cjs/ic-empty-state.cjs.entry.js +1 -1
  28. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  29. package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
  30. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  31. package/dist/cjs/ic-hero.cjs.entry.js +1 -1
  32. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
  33. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
  34. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +212 -80
  35. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  36. package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
  37. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  38. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  39. package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
  40. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  41. package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
  42. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  43. package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
  44. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  45. package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
  46. package/dist/cjs/ic-pagination-bar.cjs.entry.js +389 -0
  47. package/dist/cjs/ic-pagination-bar.cjs.entry.js.map +1 -0
  48. package/dist/cjs/ic-pagination-item.cjs.entry.js +1 -1
  49. package/dist/cjs/ic-pagination_3.cjs.entry.js +1412 -0
  50. package/dist/cjs/ic-pagination_3.cjs.entry.js.map +1 -0
  51. package/dist/cjs/ic-popover-menu.cjs.entry.js +5 -5
  52. package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
  53. package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
  54. package/dist/cjs/ic-search-bar.cjs.entry.js +11 -11
  55. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  56. package/dist/cjs/ic-section-container.cjs.entry.js +2 -2
  57. package/dist/cjs/ic-side-navigation.cjs.entry.js +18 -9
  58. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  59. package/dist/cjs/ic-skeleton.cjs.entry.js +2 -2
  60. package/dist/cjs/ic-skip-link.cjs.entry.js +2 -2
  61. package/dist/cjs/ic-status-tag.cjs.entry.js +3 -3
  62. package/dist/cjs/ic-step.cjs.entry.js +14 -14
  63. package/dist/cjs/ic-stepper.cjs.entry.js +3 -3
  64. package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
  65. package/dist/cjs/ic-switch.cjs.entry.js +5 -5
  66. package/dist/cjs/ic-tab-context.cjs.entry.js +1 -2
  67. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  68. package/dist/cjs/ic-tab-group.cjs.entry.js +3 -3
  69. package/dist/cjs/ic-tab-panel.cjs.entry.js +2 -2
  70. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  71. package/dist/cjs/ic-theme.cjs.entry.js +2 -2
  72. package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
  73. package/dist/cjs/ic-toast.cjs.entry.js +8 -7
  74. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  75. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +3 -3
  76. package/dist/cjs/ic-toggle-button.cjs.entry.js +3 -3
  77. package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
  78. package/dist/cjs/ic-typography.cjs.entry.js +1 -1
  79. package/dist/cjs/index-d337cd8a.js +12 -16
  80. package/dist/cjs/loader.cjs.js +1 -1
  81. package/dist/collection/collection-manifest.json +2 -1
  82. package/dist/collection/components/ic-action-chip/ic-action-chip.css +15 -2
  83. package/dist/collection/components/ic-action-chip/ic-action-chip.js +5 -1
  84. package/dist/collection/components/ic-action-chip/ic-action-chip.js.map +1 -1
  85. package/dist/collection/components/ic-checkbox/ic-checkbox.js +4 -5
  86. package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
  87. package/dist/collection/components/ic-chip/ic-chip.css +15 -3
  88. package/dist/collection/components/ic-chip/ic-chip.js +5 -1
  89. package/dist/collection/components/ic-chip/ic-chip.js.map +1 -1
  90. package/dist/collection/components/ic-classification-banner/ic-classification-banner.js +33 -5
  91. package/dist/collection/components/ic-classification-banner/ic-classification-banner.js.map +1 -1
  92. package/dist/collection/components/ic-classification-banner/ic-classification-banner.stories.js +32 -0
  93. package/dist/collection/components/ic-menu/ic-menu.css +6 -1
  94. package/dist/collection/components/ic-menu/ic-menu.js +184 -53
  95. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  96. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.css +104 -0
  97. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +895 -0
  98. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -0
  99. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.stories.js +215 -0
  100. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js +2 -0
  101. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js.map +1 -0
  102. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +4 -4
  103. package/dist/collection/components/ic-search-bar/ic-search-bar.js +10 -11
  104. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  105. package/dist/collection/components/ic-section-container/ic-section-container.js +2 -2
  106. package/dist/collection/components/ic-select/ic-select.css +1 -2
  107. package/dist/collection/components/ic-select/ic-select.js +414 -589
  108. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  109. package/dist/collection/components/ic-select/ic-select.types.js +2 -0
  110. package/dist/collection/components/ic-select/ic-select.types.js.map +1 -0
  111. package/dist/collection/components/ic-select/ic-select_(searchable).stories.js +26 -21
  112. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +18 -9
  113. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
  114. package/dist/collection/components/ic-skeleton/ic-skeleton.js +2 -2
  115. package/dist/collection/components/ic-skip-link/ic-skip-link.js +2 -2
  116. package/dist/collection/components/ic-status-tag/ic-status-tag.js +2 -2
  117. package/dist/collection/components/ic-step/ic-step.js +13 -13
  118. package/dist/collection/components/ic-stepper/ic-stepper.js +2 -2
  119. package/dist/collection/components/ic-stepper/ic-stepper.js.map +1 -1
  120. package/dist/collection/components/ic-switch/ic-switch.js +4 -4
  121. package/dist/collection/components/ic-tab-context/ic-tab-context.js +1 -2
  122. package/dist/collection/components/ic-tab-context/ic-tab-context.js.map +1 -1
  123. package/dist/collection/components/ic-tab-group/ic-tab-group.js +2 -2
  124. package/dist/collection/components/ic-tab-panel/ic-tab-panel.js +2 -2
  125. package/dist/collection/components/ic-theme/ic-theme.js +1 -1
  126. package/dist/collection/components/ic-toast/ic-toast.js +7 -6
  127. package/dist/collection/components/ic-toast/ic-toast.js.map +1 -1
  128. package/dist/collection/components/ic-toast-region/ic-toast-region.js +1 -1
  129. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +2 -2
  130. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +2 -2
  131. package/dist/collection/components/ic-tooltip/ic-tooltip.js +21 -2
  132. package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
  133. package/dist/collection/components/ic-tooltip/ic-tooltip.stories.js +32 -0
  134. package/dist/collection/utils/helpers.js +2 -15
  135. package/dist/collection/utils/helpers.js.map +1 -1
  136. package/dist/components/helpers.js +3 -16
  137. package/dist/components/helpers.js.map +1 -1
  138. package/dist/components/ic-action-chip.js +6 -2
  139. package/dist/components/ic-action-chip.js.map +1 -1
  140. package/dist/components/ic-card-vertical.js.map +1 -1
  141. package/dist/components/ic-checkbox.js +4 -4
  142. package/dist/components/ic-checkbox.js.map +1 -1
  143. package/dist/components/ic-chip.js +6 -2
  144. package/dist/components/ic-chip.js.map +1 -1
  145. package/dist/components/ic-classification-banner.js +14 -5
  146. package/dist/components/ic-classification-banner.js.map +1 -1
  147. package/dist/components/ic-menu2.js +213 -79
  148. package/dist/components/ic-menu2.js.map +1 -1
  149. package/dist/components/ic-page-header.js.map +1 -1
  150. package/dist/components/ic-pagination-bar.d.ts +11 -0
  151. package/dist/components/ic-pagination-bar.js +523 -0
  152. package/dist/components/ic-pagination-bar.js.map +1 -0
  153. package/dist/components/ic-pagination.js +1 -375
  154. package/dist/components/ic-pagination.js.map +1 -1
  155. package/dist/{esm/ic-pagination.entry.js → components/ic-pagination2.js} +82 -11
  156. package/dist/components/ic-pagination2.js.map +1 -0
  157. package/dist/components/ic-popover-menu.js +4 -4
  158. package/dist/components/ic-popover-menu.js.map +1 -1
  159. package/dist/components/ic-radio-group.js.map +1 -1
  160. package/dist/components/ic-radio-option.js.map +1 -1
  161. package/dist/components/ic-search-bar.js +11 -11
  162. package/dist/components/ic-search-bar.js.map +1 -1
  163. package/dist/components/ic-section-container2.js +2 -2
  164. package/dist/components/ic-select.js +1 -994
  165. package/dist/components/ic-select.js.map +1 -1
  166. package/dist/components/ic-select2.js +804 -0
  167. package/dist/components/ic-select2.js.map +1 -0
  168. package/dist/components/ic-side-navigation.js +18 -9
  169. package/dist/components/ic-side-navigation.js.map +1 -1
  170. package/dist/components/ic-skeleton.js +2 -2
  171. package/dist/components/ic-skip-link.js +2 -2
  172. package/dist/components/ic-status-tag.js +2 -2
  173. package/dist/components/ic-step.js +13 -13
  174. package/dist/components/ic-stepper.js +2 -2
  175. package/dist/components/ic-stepper.js.map +1 -1
  176. package/dist/components/ic-switch.js +4 -4
  177. package/dist/components/ic-switch.js.map +1 -1
  178. package/dist/components/ic-tab-context.js +1 -2
  179. package/dist/components/ic-tab-context.js.map +1 -1
  180. package/dist/components/ic-tab-group.js +2 -2
  181. package/dist/components/ic-tab-panel.js +2 -2
  182. package/dist/components/ic-text-field.js +1 -528
  183. package/dist/components/ic-text-field.js.map +1 -1
  184. package/dist/{esm/ic-text-field.entry.js → components/ic-text-field2.js} +114 -11
  185. package/dist/components/ic-text-field2.js.map +1 -0
  186. package/dist/components/ic-theme.js +1 -1
  187. package/dist/components/ic-toast-region.js +1 -1
  188. package/dist/components/ic-toast.js +7 -6
  189. package/dist/components/ic-toast.js.map +1 -1
  190. package/dist/components/ic-toggle-button-group.js +2 -2
  191. package/dist/components/ic-toggle-button.js +2 -2
  192. package/dist/components/ic-tooltip2.js +5 -3
  193. package/dist/components/ic-tooltip2.js.map +1 -1
  194. package/dist/core/core.esm.js +1 -1
  195. package/dist/core/core.esm.js.map +1 -1
  196. package/dist/core/{p-0a24c536.entry.js → p-05fd2707.entry.js} +2 -2
  197. package/dist/core/{p-85e15d01.entry.js → p-09505807.entry.js} +2 -2
  198. package/dist/core/{p-96bc7d24.entry.js → p-09caf7ed.entry.js} +2 -2
  199. package/dist/core/p-09caf7ed.entry.js.map +1 -0
  200. package/dist/core/p-0fb7f915.entry.js +2 -0
  201. package/dist/core/p-0fb7f915.entry.js.map +1 -0
  202. package/dist/core/{p-41a5da12.entry.js → p-1b81ec88.entry.js} +2 -2
  203. package/dist/core/p-1b81ec88.entry.js.map +1 -0
  204. package/dist/core/{p-99951365.entry.js → p-2691cc80.entry.js} +2 -2
  205. package/dist/core/{p-94916588.entry.js → p-2a124daf.entry.js} +2 -2
  206. package/dist/core/{p-04c77b2d.entry.js → p-2b87c592.entry.js} +2 -2
  207. package/dist/core/{p-4aa56990.entry.js → p-2bd80913.entry.js} +2 -2
  208. package/dist/core/{p-aed1c7e7.entry.js → p-347cc084.entry.js} +2 -2
  209. package/dist/core/p-393af2bc.entry.js +2 -0
  210. package/dist/core/p-393af2bc.entry.js.map +1 -0
  211. package/dist/core/{p-a3dea729.entry.js → p-3aed13ba.entry.js} +2 -2
  212. package/dist/core/{p-8da90b72.entry.js → p-46fd555f.entry.js} +2 -2
  213. package/dist/core/{p-43cc0f1d.entry.js → p-48a628f0.entry.js} +2 -2
  214. package/dist/core/{p-9a4e067f.entry.js → p-4f56acff.entry.js} +2 -2
  215. package/dist/core/{p-3021290f.entry.js → p-506d428a.entry.js} +2 -2
  216. package/dist/core/{p-a1b2f483.entry.js → p-50dca790.entry.js} +2 -2
  217. package/dist/core/p-53ab3c0f.entry.js +2 -0
  218. package/dist/core/p-53ab3c0f.entry.js.map +1 -0
  219. package/dist/core/{p-feef7c2c.entry.js → p-56de4f4b.entry.js} +2 -2
  220. package/dist/core/{p-b4e322fe.entry.js → p-5900cb65.entry.js} +2 -2
  221. package/dist/core/{p-78a54069.entry.js → p-5976de6e.entry.js} +2 -2
  222. package/dist/core/{p-2af89564.entry.js → p-61d79fc6.entry.js} +2 -2
  223. package/dist/core/{p-2af89564.entry.js.map → p-61d79fc6.entry.js.map} +1 -1
  224. package/dist/core/p-659d048d.entry.js +2 -0
  225. package/dist/core/{p-1edf2689.entry.js → p-67de1290.entry.js} +2 -2
  226. package/dist/core/p-6b4ec95f.entry.js +3 -0
  227. package/dist/core/p-6b4ec95f.entry.js.map +1 -0
  228. package/dist/core/{p-f700b759.entry.js → p-73043f57.entry.js} +2 -2
  229. package/dist/core/{p-7b8e5926.entry.js → p-735d3096.entry.js} +2 -2
  230. package/dist/core/{p-07075461.entry.js → p-7b538fd1.entry.js} +2 -2
  231. package/dist/core/{p-cfd43558.entry.js → p-80d85403.entry.js} +2 -2
  232. package/dist/core/{p-7f279c8a.entry.js → p-83578f1d.entry.js} +2 -2
  233. package/dist/core/{p-7f279c8a.entry.js.map → p-83578f1d.entry.js.map} +1 -1
  234. package/dist/core/{p-b8c0c142.entry.js → p-880f7548.entry.js} +2 -2
  235. package/dist/core/p-880f7548.entry.js.map +1 -0
  236. package/dist/core/{p-79949920.entry.js → p-8a833e82.entry.js} +2 -2
  237. package/dist/core/{p-0aba9e31.entry.js → p-90678e67.entry.js} +2 -2
  238. package/dist/core/{p-a851eb65.entry.js → p-9502fb86.entry.js} +2 -2
  239. package/dist/core/{p-2ca7f050.entry.js → p-99433296.entry.js} +2 -2
  240. package/dist/core/p-99433296.entry.js.map +1 -0
  241. package/dist/core/{p-f6de08fb.entry.js → p-9c2b2cb9.entry.js} +2 -2
  242. package/dist/core/{p-949d08d3.entry.js → p-9cb83a2e.entry.js} +2 -2
  243. package/dist/core/{p-f0ecb80b.entry.js → p-a08d6b46.entry.js} +2 -2
  244. package/dist/core/{p-9057a186.entry.js → p-a2953aad.entry.js} +2 -2
  245. package/dist/core/p-a2953aad.entry.js.map +1 -0
  246. package/dist/core/p-a321feee.entry.js +2 -0
  247. package/dist/core/p-a321feee.entry.js.map +1 -0
  248. package/dist/core/{p-208f470f.entry.js → p-a780a34b.entry.js} +2 -2
  249. package/dist/core/{p-387b7bca.entry.js → p-aad03a3c.entry.js} +2 -2
  250. package/dist/core/{p-ec14c783.entry.js → p-aaf4e367.entry.js} +2 -2
  251. package/dist/core/{p-707ae6e9.entry.js → p-b52c44eb.entry.js} +2 -2
  252. package/dist/core/{p-716e7eaf.entry.js → p-b777f0a1.entry.js} +2 -2
  253. package/dist/core/p-b777f0a1.entry.js.map +1 -0
  254. package/dist/core/p-b77b1e1f.js +2 -0
  255. package/dist/core/p-b77b1e1f.js.map +1 -0
  256. package/dist/core/{p-780babc0.entry.js → p-b997ad5e.entry.js} +2 -2
  257. package/dist/core/{p-a0af1b0a.entry.js → p-bb7652cd.entry.js} +2 -2
  258. package/dist/core/{p-ded4cd76.entry.js → p-cbca04bb.entry.js} +2 -2
  259. package/dist/core/{p-99687bce.entry.js → p-cc64e5ef.entry.js} +2 -2
  260. package/dist/core/{p-812c5e61.entry.js → p-cfbacca1.entry.js} +2 -2
  261. package/dist/core/{p-0da2caa2.entry.js → p-daec7e69.entry.js} +2 -2
  262. package/dist/core/{p-1590fd69.entry.js → p-e7767c0d.entry.js} +2 -2
  263. package/dist/core/p-e938eb31.entry.js +2 -0
  264. package/dist/core/p-e938eb31.entry.js.map +1 -0
  265. package/dist/core/{p-dce11b9d.entry.js → p-ea7a3d30.entry.js} +2 -2
  266. package/dist/core/{p-880afd4b.entry.js → p-ebd688b9.entry.js} +2 -2
  267. package/dist/core/p-ebd688b9.entry.js.map +1 -0
  268. package/dist/core/{p-a674b13b.entry.js → p-ef70ea50.entry.js} +2 -2
  269. package/dist/core/{p-d25d0aad.entry.js → p-f64996f1.entry.js} +2 -2
  270. package/dist/core/{p-db17a793.entry.js → p-f661ba76.entry.js} +2 -2
  271. package/dist/core/{p-a03bb31c.entry.js → p-f84ac9c6.entry.js} +2 -2
  272. package/dist/core/{p-f3406b42.entry.js → p-fb9376f0.entry.js} +2 -2
  273. package/dist/esm/core.js +1 -1
  274. package/dist/esm/{helpers-0f85537f.js → helpers-66681c73.js} +4 -17
  275. package/dist/esm/helpers-66681c73.js.map +1 -0
  276. package/dist/esm/ic-accordion-group.entry.js +1 -1
  277. package/dist/esm/ic-accordion.entry.js +1 -1
  278. package/dist/esm/ic-action-chip.entry.js +7 -3
  279. package/dist/esm/ic-action-chip.entry.js.map +1 -1
  280. package/dist/esm/ic-alert.entry.js +1 -1
  281. package/dist/esm/ic-back-to-top.entry.js +1 -1
  282. package/dist/esm/ic-badge.entry.js +1 -1
  283. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  284. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  285. package/dist/esm/ic-button_3.entry.js +5 -3
  286. package/dist/esm/ic-button_3.entry.js.map +1 -1
  287. package/dist/esm/ic-card-horizontal.entry.js +1 -1
  288. package/dist/esm/ic-card-vertical.entry.js +1 -1
  289. package/dist/esm/ic-checkbox-group.entry.js +1 -1
  290. package/dist/esm/ic-checkbox.entry.js +5 -5
  291. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  292. package/dist/esm/ic-chip.entry.js +7 -3
  293. package/dist/esm/ic-chip.entry.js.map +1 -1
  294. package/dist/esm/ic-classification-banner.entry.js +13 -5
  295. package/dist/esm/ic-classification-banner.entry.js.map +1 -1
  296. package/dist/esm/ic-data-row.entry.js +1 -1
  297. package/dist/esm/ic-dialog.entry.js +1 -1
  298. package/dist/esm/ic-divider.entry.js +1 -1
  299. package/dist/esm/ic-empty-state.entry.js +1 -1
  300. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  301. package/dist/esm/ic-footer-link.entry.js +1 -1
  302. package/dist/esm/ic-footer.entry.js +1 -1
  303. package/dist/esm/ic-hero.entry.js +1 -1
  304. package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
  305. package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
  306. package/dist/esm/ic-input-component-container_3.entry.js +212 -80
  307. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  308. package/dist/esm/ic-input-label_2.entry.js +1 -1
  309. package/dist/esm/ic-link.entry.js +1 -1
  310. package/dist/esm/ic-menu-group.entry.js +1 -1
  311. package/dist/esm/ic-menu-item.entry.js +1 -1
  312. package/dist/esm/ic-navigation-button.entry.js +1 -1
  313. package/dist/esm/ic-navigation-group.entry.js +1 -1
  314. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  315. package/dist/esm/ic-navigation-item.entry.js +1 -1
  316. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  317. package/dist/esm/ic-page-header.entry.js +1 -1
  318. package/dist/esm/ic-pagination-bar.entry.js +385 -0
  319. package/dist/esm/ic-pagination-bar.entry.js.map +1 -0
  320. package/dist/esm/ic-pagination-item.entry.js +1 -1
  321. package/dist/esm/ic-pagination_3.entry.js +1406 -0
  322. package/dist/esm/ic-pagination_3.entry.js.map +1 -0
  323. package/dist/esm/ic-popover-menu.entry.js +5 -5
  324. package/dist/esm/ic-radio-group.entry.js +1 -1
  325. package/dist/esm/ic-radio-option.entry.js +1 -1
  326. package/dist/esm/ic-search-bar.entry.js +11 -11
  327. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  328. package/dist/esm/ic-section-container.entry.js +2 -2
  329. package/dist/esm/ic-side-navigation.entry.js +18 -9
  330. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  331. package/dist/esm/ic-skeleton.entry.js +2 -2
  332. package/dist/esm/ic-skip-link.entry.js +2 -2
  333. package/dist/esm/ic-status-tag.entry.js +3 -3
  334. package/dist/esm/ic-step.entry.js +14 -14
  335. package/dist/esm/ic-stepper.entry.js +3 -3
  336. package/dist/esm/ic-stepper.entry.js.map +1 -1
  337. package/dist/esm/ic-switch.entry.js +5 -5
  338. package/dist/esm/ic-tab-context.entry.js +1 -2
  339. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  340. package/dist/esm/ic-tab-group.entry.js +3 -3
  341. package/dist/esm/ic-tab-panel.entry.js +2 -2
  342. package/dist/esm/ic-tab.entry.js +1 -1
  343. package/dist/esm/ic-theme.entry.js +2 -2
  344. package/dist/esm/ic-toast-region.entry.js +1 -1
  345. package/dist/esm/ic-toast.entry.js +8 -7
  346. package/dist/esm/ic-toast.entry.js.map +1 -1
  347. package/dist/esm/ic-toggle-button-group.entry.js +3 -3
  348. package/dist/esm/ic-toggle-button.entry.js +3 -3
  349. package/dist/esm/ic-top-navigation.entry.js +1 -1
  350. package/dist/esm/ic-typography.entry.js +1 -1
  351. package/dist/esm/index-a7a720e7.js +12 -16
  352. package/dist/esm/loader.js +1 -1
  353. package/dist/types/components/ic-classification-banner/ic-classification-banner.d.ts +4 -0
  354. package/dist/types/components/ic-menu/ic-menu.d.ts +11 -1
  355. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +162 -0
  356. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.types.d.ts +8 -0
  357. package/dist/types/components/ic-select/ic-select.d.ts +53 -80
  358. package/dist/types/components/ic-select/ic-select.types.d.ts +43 -0
  359. package/dist/types/components/ic-side-navigation/ic-side-navigation.d.ts +3 -2
  360. package/dist/types/components/ic-tooltip/ic-tooltip.d.ts +5 -0
  361. package/dist/types/components.d.ts +253 -5
  362. package/dist/types/utils/helpers.d.ts +2 -4
  363. package/hydrate/index.js +1145 -773
  364. package/hydrate/index.mjs +1145 -773
  365. package/package.json +2 -2
  366. package/vscode-data.json +131 -0
  367. package/dist/cjs/helpers-3a796e7a.js.map +0 -1
  368. package/dist/cjs/ic-pagination.cjs.entry.js +0 -312
  369. package/dist/cjs/ic-pagination.cjs.entry.js.map +0 -1
  370. package/dist/cjs/ic-select.cjs.entry.js +0 -879
  371. package/dist/cjs/ic-select.cjs.entry.js.map +0 -1
  372. package/dist/cjs/ic-text-field.cjs.entry.js +0 -433
  373. package/dist/cjs/ic-text-field.cjs.entry.js.map +0 -1
  374. package/dist/core/p-0d7fd892.entry.js +0 -2
  375. package/dist/core/p-29b61bb5.entry.js +0 -3
  376. package/dist/core/p-29b61bb5.entry.js.map +0 -1
  377. package/dist/core/p-2ca7f050.entry.js.map +0 -1
  378. package/dist/core/p-41a5da12.entry.js.map +0 -1
  379. package/dist/core/p-4aadabc8.entry.js +0 -2
  380. package/dist/core/p-4aadabc8.entry.js.map +0 -1
  381. package/dist/core/p-716e7eaf.entry.js.map +0 -1
  382. package/dist/core/p-808e1ef5.entry.js +0 -2
  383. package/dist/core/p-808e1ef5.entry.js.map +0 -1
  384. package/dist/core/p-880afd4b.entry.js.map +0 -1
  385. package/dist/core/p-8fe4e0ad.entry.js +0 -2
  386. package/dist/core/p-8fe4e0ad.entry.js.map +0 -1
  387. package/dist/core/p-9057a186.entry.js.map +0 -1
  388. package/dist/core/p-96bc7d24.entry.js.map +0 -1
  389. package/dist/core/p-b8c0c142.entry.js.map +0 -1
  390. package/dist/core/p-c5b9519d.entry.js +0 -2
  391. package/dist/core/p-c5b9519d.entry.js.map +0 -1
  392. package/dist/core/p-d1730d4d.entry.js +0 -2
  393. package/dist/core/p-d1730d4d.entry.js.map +0 -1
  394. package/dist/core/p-dbc8bf0c.js +0 -2
  395. package/dist/core/p-dbc8bf0c.js.map +0 -1
  396. package/dist/core/p-fdb587ab.entry.js +0 -2
  397. package/dist/core/p-fdb587ab.entry.js.map +0 -1
  398. package/dist/esm/helpers-0f85537f.js.map +0 -1
  399. package/dist/esm/ic-pagination.entry.js.map +0 -1
  400. package/dist/esm/ic-select.entry.js +0 -875
  401. package/dist/esm/ic-select.entry.js.map +0 -1
  402. package/dist/esm/ic-text-field.entry.js.map +0 -1
  403. /package/dist/core/{p-0a24c536.entry.js.map → p-05fd2707.entry.js.map} +0 -0
  404. /package/dist/core/{p-85e15d01.entry.js.map → p-09505807.entry.js.map} +0 -0
  405. /package/dist/core/{p-99951365.entry.js.map → p-2691cc80.entry.js.map} +0 -0
  406. /package/dist/core/{p-94916588.entry.js.map → p-2a124daf.entry.js.map} +0 -0
  407. /package/dist/core/{p-04c77b2d.entry.js.map → p-2b87c592.entry.js.map} +0 -0
  408. /package/dist/core/{p-4aa56990.entry.js.map → p-2bd80913.entry.js.map} +0 -0
  409. /package/dist/core/{p-aed1c7e7.entry.js.map → p-347cc084.entry.js.map} +0 -0
  410. /package/dist/core/{p-a3dea729.entry.js.map → p-3aed13ba.entry.js.map} +0 -0
  411. /package/dist/core/{p-8da90b72.entry.js.map → p-46fd555f.entry.js.map} +0 -0
  412. /package/dist/core/{p-43cc0f1d.entry.js.map → p-48a628f0.entry.js.map} +0 -0
  413. /package/dist/core/{p-9a4e067f.entry.js.map → p-4f56acff.entry.js.map} +0 -0
  414. /package/dist/core/{p-3021290f.entry.js.map → p-506d428a.entry.js.map} +0 -0
  415. /package/dist/core/{p-a1b2f483.entry.js.map → p-50dca790.entry.js.map} +0 -0
  416. /package/dist/core/{p-feef7c2c.entry.js.map → p-56de4f4b.entry.js.map} +0 -0
  417. /package/dist/core/{p-b4e322fe.entry.js.map → p-5900cb65.entry.js.map} +0 -0
  418. /package/dist/core/{p-78a54069.entry.js.map → p-5976de6e.entry.js.map} +0 -0
  419. /package/dist/core/{p-0d7fd892.entry.js.map → p-659d048d.entry.js.map} +0 -0
  420. /package/dist/core/{p-1edf2689.entry.js.map → p-67de1290.entry.js.map} +0 -0
  421. /package/dist/core/{p-f700b759.entry.js.map → p-73043f57.entry.js.map} +0 -0
  422. /package/dist/core/{p-7b8e5926.entry.js.map → p-735d3096.entry.js.map} +0 -0
  423. /package/dist/core/{p-07075461.entry.js.map → p-7b538fd1.entry.js.map} +0 -0
  424. /package/dist/core/{p-cfd43558.entry.js.map → p-80d85403.entry.js.map} +0 -0
  425. /package/dist/core/{p-79949920.entry.js.map → p-8a833e82.entry.js.map} +0 -0
  426. /package/dist/core/{p-0aba9e31.entry.js.map → p-90678e67.entry.js.map} +0 -0
  427. /package/dist/core/{p-a851eb65.entry.js.map → p-9502fb86.entry.js.map} +0 -0
  428. /package/dist/core/{p-f6de08fb.entry.js.map → p-9c2b2cb9.entry.js.map} +0 -0
  429. /package/dist/core/{p-949d08d3.entry.js.map → p-9cb83a2e.entry.js.map} +0 -0
  430. /package/dist/core/{p-f0ecb80b.entry.js.map → p-a08d6b46.entry.js.map} +0 -0
  431. /package/dist/core/{p-208f470f.entry.js.map → p-a780a34b.entry.js.map} +0 -0
  432. /package/dist/core/{p-387b7bca.entry.js.map → p-aad03a3c.entry.js.map} +0 -0
  433. /package/dist/core/{p-ec14c783.entry.js.map → p-aaf4e367.entry.js.map} +0 -0
  434. /package/dist/core/{p-707ae6e9.entry.js.map → p-b52c44eb.entry.js.map} +0 -0
  435. /package/dist/core/{p-780babc0.entry.js.map → p-b997ad5e.entry.js.map} +0 -0
  436. /package/dist/core/{p-a0af1b0a.entry.js.map → p-bb7652cd.entry.js.map} +0 -0
  437. /package/dist/core/{p-ded4cd76.entry.js.map → p-cbca04bb.entry.js.map} +0 -0
  438. /package/dist/core/{p-99687bce.entry.js.map → p-cc64e5ef.entry.js.map} +0 -0
  439. /package/dist/core/{p-812c5e61.entry.js.map → p-cfbacca1.entry.js.map} +0 -0
  440. /package/dist/core/{p-0da2caa2.entry.js.map → p-daec7e69.entry.js.map} +0 -0
  441. /package/dist/core/{p-1590fd69.entry.js.map → p-e7767c0d.entry.js.map} +0 -0
  442. /package/dist/core/{p-dce11b9d.entry.js.map → p-ea7a3d30.entry.js.map} +0 -0
  443. /package/dist/core/{p-a674b13b.entry.js.map → p-ef70ea50.entry.js.map} +0 -0
  444. /package/dist/core/{p-d25d0aad.entry.js.map → p-f64996f1.entry.js.map} +0 -0
  445. /package/dist/core/{p-db17a793.entry.js.map → p-f661ba76.entry.js.map} +0 -0
  446. /package/dist/core/{p-a03bb31c.entry.js.map → p-f84ac9c6.entry.js.map} +0 -0
  447. /package/dist/core/{p-f3406b42.entry.js.map → p-fb9376f0.entry.js.map} +0 -0
@@ -1,875 +0,0 @@
1
- import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement } from './index-a7a720e7.js';
2
- import { K as checkSlotInChildMutations, G as getLabelFromValue, F as getFilteredMenuOptions, L as isMacDevice, M as getOptionsWithoutGroupTitlesCount, r as removeDisabledFalse, l as removeFormResetListener, z as inheritAttributes, k as addFormResetListener, o as onComponentRequiredPropUndefined, m as renderHiddenInput, q as getInputDescribedByText, i as isSlotUsed, N as isMobileOrTablet, O as IcInformationStatus, s as hasValidationStatus } from './helpers-0f85537f.js';
3
- import { I as IC_INHERITED_ARIA } from './constants-ab12fdcf.js';
4
-
5
- const Expand = `<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
6
- <path d="M7 9.5L12 14.5L17 9.5H7Z" fill="currentColor" />
7
- </svg>
8
- `;
9
-
10
- const Clear = `<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
11
- <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" />
12
- </svg>
13
- `;
14
-
15
- 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;--ic-input-label-helpertext-padding:var(--ic-space-xs);--menu-max-height:100px;--border-color:var(--ic-select-field-border);--border-color-hover:var(--ic-select-field-border-hover);--border-color-pressed:var(--ic-select-field-border-pressed);--border-color-disabled:var(--ic-select-field-border-disabled);--border-color-error:var(--ic-select-field-border-error);--border-color-error-hover:var(--ic-select-field-border-error-hover);--border-color-error-pressed:var(--ic-select-field-border-error-pressed);--border-color-success:var(--ic-select-field-border-success);--border-color-success-hover:var(--ic-select-field-border-success-hover);--border-color-success-pressed:var(--ic-select-field-border-success-pressed);--border-color-warning:var(--ic-select-field-border-warning);--border-color-warning-hover:var(--ic-select-field-border-warning-hover);--border-color-warning-pressed:var(--ic-select-field-border-warning-pressed);--ic-input-label-text-color:var(--ic-select-field-label);--ic-input-label-helper-text-color:var(\n --ic-select-input-field-label-subtitle\n );--ic-input-validation-status-text-color:var(--ic-select-state-text);--ic-input-validation-error:var(--ic-select-state-icon-error);--ic-input-validation-warning-icon-color:var(--ic-select-state-icon-warning);--ic-input-validation-success-icon-color:var(--ic-select-state-icon-success);--menu-item-text-color:var(--ic-select-list-option-text);--menu-bg-color:var(--ic-select-list-option-background);--menu-border-color:var(--ic-select-dropdown-list-border)}:host(.ic-select-disabled){--ic-input-label-text-color:var(--ic-select-field-label-disabled);--ic-input-label-helper-text-color:var(\n --ic-select-input-field-label-subtitle-disabled\n )}:host(.ic-select-full-width){width:100%}ic-input-component-container.menu-open{--border-color:var(--ic-select-field-border-pressed)}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)}select{border:0;border-radius:var(--ic-border-radius);background-color:var(--ic-select-field-background);color:var(--ic-select-content-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:var(--ic-select-mobile-dropdown-icon);caret-color:var(--ic-select-input-field-text-cursor)}select option,.select-option-selected{color:var(--ic-select-list-option-text)}select:disabled{color:var(--ic-select-content-text-disabled);background-image:var(--ic-select-mobile-dropdown-icon-disabled)}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;background-color:var(--ic-select-field-background);color:var(--ic-select-content-text)}.select-input:focus{outline:none}.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;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin-bottom:0 !important}.value-text.with-clear-button{padding-right:calc(var(--ic-space-xl) + var(--ic-space-xs))}.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-select-expand-icon-color)}.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-select-disabled-expand-icon-color)}:host(.ic-select-searchable) .expand-icon{padding-left:0;height:2.25rem}:host(.ic-select-searchable) .expand-icon>svg{height:2.25rem;padding:0 calc(var(--ic-space-xxxs) + var(--ic-space-xxs)) 0\n var(--ic-space-xxs)}:host(.ic-select-searchable:not(.ic-select-disabled)) .expand-icon>svg{cursor:pointer}.expand-icon-open{color:var(--ic-select-expand-icon-color)}.expand-icon-open,:host(.ic-select-searchable) .expand-icon-open{transform:rotateX(180deg)}.placeholder{color:var(--ic-select-content-placeholder-text)}:host(.ic-select-disabled.ic-select-searchable) .select-input::-moz-placeholder{color:var(--ic-select-content-text-disabled)}:host(.ic-select-disabled) .value-text,:host(.ic-select-disabled) .select-input,:host(.ic-select-disabled) .placeholder,:host(.ic-select-disabled.ic-select-searchable) .select-input::placeholder{color:var(--ic-select-content-text-disabled)}.select-input-end{display:flex;align-items:center}.clear-button-container{display:flex;align-items:center}.divider{width:var(--ic-space-1px);background-color:var(--ic-select-content-divider);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{color:var(--ic-select-clear-button);position:absolute;right:calc(var(--ic-space-xl) + var(--ic-space-xxs) - var(--ic-space-1px));border-radius:var(--ic-border-radius);transition:box-shadow var(--ic-easing-transition),\n border-radius var(--ic-easing-transition)}.clear-button:focus,.clear-button:active{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,.clear-button:active *{fill:var(--ic-atoms-input-clear-button-focus)}.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)}::slotted([slot=\"icon\"]){fill:var(--ic-select-content-placeholder-text)}.has-value ::slotted([slot=\"icon\"]){fill:var(--ic-select-content-text)}.readonly ::slotted([slot=\"icon\"]){padding:0.375rem;margin-bottom:0.75rem}@media (forced-colors: active){.has-value ::slotted([slot=\"icon\"]){fill:currentcolor}}@media (prefers-reduced-motion: reduce){.clear-button,ic-input-validation.menu-open .status-icon,ic-input-validation.menu-open .statustext{transition:none}}";
16
- const IcSelectStyle0 = icSelectCss;
17
-
18
- let inputIds = 0;
19
- const MUTABLE_ATTRIBUTES = [...IC_INHERITED_ARIA, "tabindex", "title"];
20
- const Select = class {
21
- constructor(hostRef) {
22
- registerInstance(this, hostRef);
23
- this.icBlur = createEvent(this, "icBlur", 7);
24
- this.icChange = createEvent(this, "icChange", 7);
25
- this.icClear = createEvent(this, "icClear", 7);
26
- this.icClose = createEvent(this, "icClose", 7);
27
- this.icFocus = createEvent(this, "icFocus", 7);
28
- this.icInput = createEvent(this, "icInput", 7);
29
- this.icOpen = createEvent(this, "icOpen", 7);
30
- this.icOptionSelect = createEvent(this, "icOptionSelect", 7);
31
- this.icOptionDeselect = createEvent(this, "icOptionDeselect", 7);
32
- this.icRetryLoad = createEvent(this, "icRetryLoad", 7);
33
- this.blurredBecauseButtonPressed = false;
34
- this.hasSetDefaultValue = false;
35
- this.hasTimedOut = false;
36
- this.inheritedAttributes = {};
37
- this.initialOptionsEmpty = false;
38
- this.inputId = `ic-select-input-${inputIds++}`;
39
- this.menuId = `${this.inputId}-menu`;
40
- this.retryButtonClick = false;
41
- this.searchableMenuItemSelected = false;
42
- this.ungroupedOptions = [];
43
- this.hostMutationObserver = null;
44
- this.clearButtonFocused = false;
45
- this.noOptions = null;
46
- this.open = false;
47
- this.pressedCharacters = "";
48
- this.searchableSelectInputValue = null;
49
- /**
50
- * If `true`, the disabled state will be set.
51
- */
52
- this.disabled = false;
53
- /**
54
- * If `true`, the built in filtering will be disabled for a searchable variant. For example, if options will already be filtered from external source.
55
- */
56
- this.disableAutoFiltering = false;
57
- /**
58
- * The text displayed when there are no options in the option list.
59
- */
60
- this.emptyOptionListText = "No results found";
61
- /**
62
- * If `true`, the select will fill the width of the container.
63
- */
64
- this.fullWidth = false;
65
- /**
66
- * The helper text that will be displayed for additional field guidance.
67
- */
68
- this.helperText = "";
69
- /**
70
- * If `true`, the label will be hidden and the required label value will be applied as an aria-label.
71
- */
72
- this.hideLabel = false;
73
- /**
74
- * If `true`, descriptions of options will be included when filtering options in a searchable select. Only applies to built in filtering.
75
- */
76
- this.includeDescriptionsInSearch = false;
77
- /**
78
- * If `true`, group titles of grouped options will be included when filtering options in a searchable select. Only applies to built in filtering.
79
- */
80
- this.includeGroupTitlesInSearch = false;
81
- /**
82
- * The message displayed when external loading times out.
83
- */
84
- this.loadingErrorLabel = "Loading Error";
85
- /**
86
- * The message displayed whilst the options are being loaded externally.
87
- */
88
- this.loadingLabel = "Loading...";
89
- /**
90
- * If `true`, multiple options can be selected.
91
- */
92
- this.multiple = false;
93
- /**
94
- * The name of the control, which is submitted with the form data.
95
- */
96
- this.name = this.inputId;
97
- /**
98
- * The placeholder value to be displayed.
99
- */
100
- this.placeholder = "Select an option";
101
- /**
102
- * If `true`, the readonly state will be set.
103
- */
104
- this.readonly = false;
105
- /**
106
- * If `true`, the select will require a value.
107
- */
108
- this.required = false;
109
- /**
110
- * If `true`, a searchable variant of the select will be displayed which can be typed in to filter options. This functionality is only available on the single-select variant of the select component.
111
- */
112
- this.searchable = false;
113
- /**
114
- * Whether the search string of the searchable select should match the start of or anywhere in the options. Only applies to built in filtering.
115
- */
116
- this.searchMatchPosition = "anywhere";
117
- /**
118
- * If `true`, the icOptionSelect event will be fired on enter instead of ArrowUp and ArrowDown on the single select.
119
- */
120
- this.selectOnEnter = false;
121
- /**
122
- * If `true`, a button which clears the select input when clicked will be displayed. The button will always appear on the searchable select.
123
- */
124
- this.showClearButton = false;
125
- /**
126
- * The size of the select.
127
- */
128
- this.size = "medium";
129
- /**
130
- * Sets the theme color to the dark or light theme color. "inherit" will set the color based on the system settings or ic-theme component.
131
- */
132
- this.theme = "inherit";
133
- /**
134
- * The value of the `aria-live` attribute on the validation message.
135
- */
136
- this.validationAriaLive = "polite";
137
- /**
138
- * The validation status - e.g. 'error' | 'warning' | 'success'.
139
- */
140
- this.validationStatus = "";
141
- /**
142
- * The text to display as the validation message.
143
- */
144
- this.validationText = "";
145
- /**
146
- * If `true`, the loading state will be triggered when fetching options asynchronously.
147
- */
148
- this.loading = false;
149
- /**
150
- * The possible selection options.
151
- */
152
- this.options = [];
153
- this.filteredOptions = this.options;
154
- this.uniqueOptions = this.options;
155
- /**
156
- * The amount of time, in milliseconds, to wait to trigger the `icInput` event after each keystroke.
157
- */
158
- this.debounce = 0;
159
- this.currDebounce = this.debounce;
160
- /**
161
- * The value of the select, reflected by the value of the currently selected option.
162
- * For the searchable variant, the value is also reflected by the user input.
163
- * For the multi-select variant, the value must be an array of option values.
164
- */
165
- this.value = null;
166
- this.initialValue = this.value;
167
- this.inputValueToFilter = this.value;
168
- // triggered when attributes of host element change
169
- this.hostMutationCallback = (mutationList) => {
170
- let forceComponentUpdate = false;
171
- mutationList.forEach(({ attributeName, type, addedNodes, removedNodes }) => {
172
- if (attributeName) {
173
- const attribute = this.el.getAttribute(attributeName);
174
- if (attribute && MUTABLE_ATTRIBUTES.includes(attributeName)) {
175
- this.inheritedAttributes[attributeName] = attribute;
176
- forceComponentUpdate = true;
177
- }
178
- }
179
- else if (type === "childList") {
180
- forceComponentUpdate = checkSlotInChildMutations(addedNodes, removedNodes, "icon");
181
- }
182
- });
183
- if (forceComponentUpdate) {
184
- forceUpdate(this);
185
- }
186
- };
187
- this.handleRetry = (ev) => {
188
- var _a;
189
- if (ev.detail.keyPressed)
190
- (_a = this.searchableSelectElement) === null || _a === void 0 ? void 0 : _a.focus();
191
- this.blurredBecauseButtonPressed = true;
192
- this.retryButtonClick = true;
193
- this.hasSetDefaultValue = true;
194
- this.icRetryLoad.emit({
195
- value: this.searchable
196
- ? this.searchableSelectInputValue
197
- : this.hiddenInputValue,
198
- });
199
- };
200
- this.emitIcChange = (value) => {
201
- // If "Select all" button clicked, replace value with new value (array of all option values)
202
- if (this.multiple && !Array.isArray(value) && value !== null) {
203
- // Update selected options - adds / removes them, in order of option list
204
- // Create new array if value prop is undefined
205
- if (this.value) {
206
- let valueArray = this.value.slice();
207
- if (this.value.includes(value)) {
208
- valueArray.splice(valueArray.indexOf(value), 1);
209
- }
210
- else {
211
- valueArray.push(value);
212
- valueArray = this.getValueSortedByOptions(valueArray);
213
- }
214
- this.value = valueArray.length === 0 ? null : valueArray;
215
- }
216
- else {
217
- this.value = [value];
218
- }
219
- }
220
- else {
221
- this.value = value;
222
- }
223
- this.icChange.emit({ value: this.multiple ? this.value : value });
224
- };
225
- this.emitIcInput = (value) => {
226
- clearTimeout(this.debounceIcInput);
227
- this.debounceIcInput = window.setTimeout(() => this.icInput.emit({ value }), this.currDebounce);
228
- };
229
- this.setOptions = () => {
230
- if (!this.hasTimedOut && this.options !== this.noOptions) {
231
- this.loading = false;
232
- clearTimeout(this.timeoutTimer);
233
- if (this.options.length > 0) {
234
- this.setOptionsValuesFromLabels();
235
- this.uniqueOptions = this.deduplicateOptions(this.options);
236
- }
237
- else {
238
- this.noOptions = [{ label: this.emptyOptionListText, value: "" }];
239
- this.uniqueOptions = this.noOptions;
240
- }
241
- this.filteredOptions = this.uniqueOptions;
242
- if (this.isExternalFiltering()) {
243
- // When searchable select
244
- this.noOptions = null;
245
- this.updateSearchableSelectResultAriaLive();
246
- this.setDefaultValue();
247
- }
248
- else if (this.initialOptionsEmpty) {
249
- this.setDefaultValue();
250
- this.initialOptionsEmpty = false;
251
- }
252
- }
253
- else if (!this.searchable) {
254
- this.options = this.noOptions || [];
255
- }
256
- };
257
- /**
258
- * Processes the provided array of IcMenuOptions, removing duplicates and reporting them with a console.warn
259
- * @param options array of IcMenuOptions
260
- * @returns a new options object, with all entries possessing a duplicate 'value' field removed
261
- */
262
- this.deduplicateOptions = (options) => {
263
- const uniqueValues = [];
264
- const dedupedOptions = [];
265
- options.forEach((option) => {
266
- if (option.children) {
267
- //If an option has children, we will loop through them
268
- const dedupedChildren = [];
269
- option.children.forEach((child) => {
270
- if (uniqueValues.includes(child.value)) {
271
- console.warn(`ic-select with label ${this.label} was populated with duplicate option (value: ${child.value}) which has been removed.`);
272
- }
273
- else {
274
- uniqueValues.push(child.value);
275
- dedupedChildren.push(child);
276
- }
277
- });
278
- // construct a modified option, inserting the deduplicated children alongside the original information
279
- dedupedOptions.push(Object.assign(Object.assign({}, option), { children: dedupedChildren }));
280
- }
281
- else {
282
- // If an option does not have children, assess to see if it's value has been included already
283
- if (uniqueValues.includes(option.value)) {
284
- console.warn(`ic-select with label ${this.label} was populated with duplicate option (value: ${option.value}) which has been removed.`);
285
- }
286
- else {
287
- uniqueValues.push(option.value);
288
- dedupedOptions.push(option);
289
- }
290
- }
291
- });
292
- return dedupedOptions;
293
- };
294
- /**
295
- * Loop through options array and for all options with no value, infer it from the label
296
- */
297
- this.setOptionsValuesFromLabels = () => {
298
- if (this.options.length > 0) {
299
- this.options.map((option) => {
300
- if (!option.value) {
301
- option.value = option.label;
302
- }
303
- });
304
- }
305
- };
306
- this.setUngroupedOptions = (event) => {
307
- this.ungroupedOptions = event.detail.options;
308
- };
309
- this.setTextColor = () => {
310
- if (this.nativeSelectElement) {
311
- this.nativeSelectElement.className =
312
- this.nativeSelectElement.selectedIndex === 0
313
- ? "placeholder"
314
- : "select-option-selected";
315
- }
316
- };
317
- this.setMenuChange = (open) => {
318
- if (this.open !== open) {
319
- this.open = open;
320
- }
321
- };
322
- this.getLabelFromValue = (value) => getLabelFromValue(value, this.uniqueOptions);
323
- this.getMultipleOptionsString = (selectedValues) => selectedValues === null || selectedValues === void 0 ? void 0 : selectedValues.map((value) => this.getLabelFromValue(value)).filter((label) => !!label).join(", ");
324
- this.getFilteredChildMenuOptions = (option) => (Object.assign(Object.assign({}, option), { children: option.children &&
325
- getFilteredMenuOptions(option.children, this.searchable && !!this.includeDescriptionsInSearch, this.searchable
326
- ? this.searchableSelectInputValue || ""
327
- : this.pressedCharacters, this.searchable ? this.searchMatchPosition : "start") }));
328
- // (For multi-select) get value array, i.e. selected option values, in order they appear in option list
329
- this.getValueSortedByOptions = (value) => {
330
- const valueArray = value;
331
- const valuesFromAllOptions = this.ungroupedOptions.map((option) => option.value);
332
- valueArray.sort((a, b) => valuesFromAllOptions.indexOf(a) - valuesFromAllOptions.indexOf(b));
333
- return valueArray;
334
- };
335
- this.handleNativeSelectChange = () => {
336
- if (this.nativeSelectElement) {
337
- this.icOptionSelect.emit({ value: this.nativeSelectElement.value });
338
- this.emitIcChange(this.nativeSelectElement.value);
339
- }
340
- this.setTextColor();
341
- };
342
- // Handle option select for when a custom input box and menu is rendered
343
- // (rather than native <select> - rendered when viewed on a mobile / tablet screen)
344
- this.handleCustomSelectChange = (event) => {
345
- var _a, _b;
346
- const { value, label, optionId } = event.detail;
347
- if (label === this.emptyOptionListText) {
348
- (_a = this.searchableSelectElement) === null || _a === void 0 ? void 0 : _a.focus();
349
- return;
350
- }
351
- if (this.searchable) {
352
- this.value = value || null;
353
- this.searchableMenuItemSelected = true;
354
- // After editing the input, if selecting the same option as before, set the input value to label again
355
- if (this.value === this.currValue) {
356
- this.searchableSelectInputValue =
357
- this.getLabelFromValue(this.value) || null;
358
- }
359
- this.inputValueToFilter = null;
360
- this.hiddenInputValue =
361
- this.getValueFromLabel(this.searchableSelectInputValue) || null;
362
- }
363
- if (value) {
364
- if (this.multiple && ((_b = this.value) === null || _b === void 0 ? void 0 : _b.includes(value))) {
365
- this.icOptionDeselect.emit({ value });
366
- }
367
- else {
368
- this.icOptionSelect.emit({ value });
369
- }
370
- }
371
- this.ariaActiveDescendant = optionId;
372
- this.emitIcChange(value || null);
373
- };
374
- this.handleSelectAllChange = ({ detail, }) => {
375
- const allValues = this.ungroupedOptions
376
- .filter((option) => !option.disabled)
377
- .map((option) => option.value);
378
- if (detail.select) {
379
- // Only emit icOptionSelect for all values that are newly selected
380
- const unselectedValues = this.value
381
- ? allValues.filter((value) => this.value && !this.value.includes(value))
382
- : allValues;
383
- unselectedValues.forEach((value) => this.icOptionSelect.emit({ value }));
384
- }
385
- else {
386
- // Only emit icOptionDeselect for values that were selected
387
- this.value.forEach((value) => this.icOptionDeselect.emit({ value }));
388
- }
389
- this.emitIcChange(detail.select ? allValues : null);
390
- };
391
- this.handleMenuChange = (event) => {
392
- this.open = event.detail.open;
393
- this.pressedCharacters = "";
394
- if (this.searchable)
395
- this.handleFocusIndicatorDisplay();
396
- };
397
- // clears the debounce delay when navigating the menu with arrow keys etc
398
- // to prevent delay in change event, which should only occur when typing in input
399
- this.handleMenuKeyPress = (ev) => {
400
- ev.cancelBubble = true;
401
- if (!this.multiple) {
402
- this.handleCharacterKeyDown(ev.detail.key);
403
- }
404
- };
405
- this.handleFocusIndicatorDisplay = () => {
406
- var _a;
407
- const focusIndicator = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".focus-indicator");
408
- if (focusIndicator) {
409
- if (this.open) {
410
- focusIndicator.classList.add("focus-indicator-enabled");
411
- }
412
- else {
413
- focusIndicator.classList.remove("focus-indicator-enabled");
414
- }
415
- }
416
- };
417
- this.handleMouseDown = (event) => {
418
- if (!this.open) {
419
- event.preventDefault();
420
- }
421
- };
422
- this.isExternalFiltering = () => this.searchable && !!this.disableAutoFiltering;
423
- this.handleClick = (event) => {
424
- var _a, _b;
425
- if (!this.open && this.menu) {
426
- if (this.isExternalFiltering()) {
427
- this.menu.options = this.filteredOptions;
428
- }
429
- else if (!this.hasTimedOut &&
430
- !this.loading &&
431
- !((_a = this.noOptions) === null || _a === void 0 ? void 0 : _a.length) &&
432
- (!this.searchable || this.searchableMenuItemSelected)) {
433
- this.noOptions = null;
434
- this.menu.options = this.uniqueOptions;
435
- }
436
- }
437
- if (event.detail !== 0) {
438
- (_b = this.menu) === null || _b === void 0 ? void 0 : _b.handleClickOpen();
439
- }
440
- };
441
- this.handleExpandIconMouseDown = (event) => {
442
- var _a;
443
- if (!this.disabled) {
444
- event.preventDefault();
445
- (_a = this.searchableSelectElement) === null || _a === void 0 ? void 0 : _a.focus();
446
- this.handleClick(event);
447
- }
448
- };
449
- this.handleClear = (event) => {
450
- var _a, _b;
451
- event.stopPropagation();
452
- this.hasTimedOut = false;
453
- clearTimeout(this.timeoutTimer);
454
- this.clearInput();
455
- this.emitIcChange(null);
456
- this.icClear.emit();
457
- if (this.searchable) {
458
- this.hiddenInputValue = null;
459
- (_a = this.searchableSelectElement) === null || _a === void 0 ? void 0 : _a.focus();
460
- }
461
- else {
462
- (_b = this.customSelectElement) === null || _b === void 0 ? void 0 : _b.focus();
463
- }
464
- };
465
- this.handleCharacterKeyDown = (key) => {
466
- // Only close menu when space is pressed if not being used alongside character keys to quickly select options
467
- if (this.open && key === " " && this.pressedCharacters.length === 0) {
468
- this.setMenuChange(false);
469
- }
470
- if (key.length !== 1 || this.searchable) {
471
- this.pressedCharacters = "";
472
- return;
473
- }
474
- window.clearTimeout(this.characterKeyPressTimer);
475
- this.characterKeyPressTimer = window.setTimeout(() => (this.pressedCharacters = ""), 1000);
476
- if (key !== " " || !!this.pressedCharacters) {
477
- this.pressedCharacters += key;
478
- this.handleFilter();
479
- if (!this.noOptions) {
480
- this.emitIcChange(this.filteredOptions[0].value);
481
- }
482
- }
483
- };
484
- this.handleNativeSelectKeyDown = (event) => {
485
- if ((event.key !== "Escape" && event.key !== "Tab") || this.open) {
486
- event.cancelBubble = true;
487
- }
488
- this.handleCharacterKeyDown(event.key);
489
- };
490
- this.handleKeyDown = (event) => {
491
- var _a;
492
- if ((event.key !== "Escape" && event.key !== "Tab") || this.open) {
493
- event.cancelBubble = true;
494
- }
495
- const isArrowKey = event.key === "ArrowDown" || event.key === "ArrowUp";
496
- if (this.menu && !this.open) {
497
- if (this.isExternalFiltering() && (event.key === "Enter" || isArrowKey)) {
498
- this.menu.options = this.filteredOptions;
499
- }
500
- else if (!this.hasTimedOut) {
501
- this.noOptions = null;
502
- this.menu.options = this.uniqueOptions;
503
- }
504
- }
505
- if (this.open && event.key === "Enter") {
506
- this.setMenuChange(false);
507
- }
508
- else {
509
- if (!isArrowKey || this.noOptions === null) {
510
- if (event.key !== " " || this.pressedCharacters.length <= 0) {
511
- // Keyboard events get passed onto ic-menu except in the case of ctrl-a on a searchable select
512
- const isCtrlA = event.key === "a" &&
513
- ((isMacDevice() && event.metaKey) ||
514
- (!isMacDevice() && event.ctrlKey));
515
- if (!(this.searchable && isCtrlA)) {
516
- (_a = this.menu) === null || _a === void 0 ? void 0 : _a.handleKeyboardOpen(event);
517
- }
518
- }
519
- if (!this.multiple) {
520
- this.handleCharacterKeyDown(event.key);
521
- }
522
- }
523
- }
524
- };
525
- this.handleClearButtonFocus = () => {
526
- this.clearButtonFocused = true;
527
- };
528
- this.handleClearButtonBlur = (ev) => {
529
- var _a;
530
- const retryButton = (_a = this.menu) === null || _a === void 0 ? void 0 : _a.querySelector("#retry-button");
531
- if ((!this.searchableSelectElement ||
532
- ev.relatedTarget !== this.searchableSelectElement) &&
533
- (!retryButton || ev.relatedTarget !== retryButton)) {
534
- this.setMenuChange(false);
535
- this.handleFocusIndicatorDisplay();
536
- }
537
- this.clearButtonFocused = false;
538
- };
539
- this.handleFilter = () => {
540
- var _a;
541
- const options = this.deduplicateOptions(this.searchable ? [...this.uniqueOptions] : this.ungroupedOptions);
542
- const isGrouped = options.some((option) => !!option.children);
543
- let newFilteredOptions = [];
544
- let menuOptionsFiltered;
545
- if (this.searchable) {
546
- menuOptionsFiltered = getFilteredMenuOptions(options, !!this.includeDescriptionsInSearch, this.inputValueToFilter || "", this.searchMatchPosition);
547
- this.searchableMenuItemSelected = false;
548
- }
549
- else {
550
- menuOptionsFiltered = getFilteredMenuOptions(options, false, this.pressedCharacters, "start");
551
- }
552
- if (!isGrouped &&
553
- ((_a = menuOptionsFiltered[0]) === null || _a === void 0 ? void 0 : _a.label) !== this.emptyOptionListText) {
554
- newFilteredOptions = menuOptionsFiltered;
555
- }
556
- else if (isGrouped) {
557
- newFilteredOptions = options.map((option) => this.includeGroupTitlesInSearch &&
558
- menuOptionsFiltered.indexOf(option) !== -1
559
- ? option
560
- : this.getFilteredChildMenuOptions(option));
561
- }
562
- if (newFilteredOptions.length > 0 &&
563
- (!isGrouped ||
564
- newFilteredOptions.some(({ children }) => children && children.length > 0))) {
565
- this.noOptions = null;
566
- this.filteredOptions = newFilteredOptions;
567
- }
568
- else {
569
- this.noOptions = [{ label: this.emptyOptionListText, value: "" }];
570
- this.filteredOptions = this.noOptions;
571
- }
572
- };
573
- /**
574
- * Put the select component into loading state.
575
- * Replace options with the loading message. If timeout is enabled, set the timeout and once passed, replace options with the loading error message
576
- */
577
- this.triggerLoading = () => {
578
- this.hasTimedOut = false;
579
- this.noOptions = [{ label: this.loadingLabel, value: "", loading: true }];
580
- if (this.filteredOptions !== this.noOptions && this.searchable) {
581
- this.filteredOptions = this.noOptions;
582
- }
583
- else if (this.uniqueOptions !== this.noOptions && !this.searchable) {
584
- this.uniqueOptions = this.noOptions;
585
- }
586
- if (this.timeout) {
587
- this.timeoutTimer = window.setTimeout(() => {
588
- this.loading = false;
589
- this.hasTimedOut = true;
590
- this.noOptions = [
591
- { label: this.loadingErrorLabel, value: "", timedOut: true },
592
- ];
593
- this.filteredOptions = this.noOptions;
594
- if (!this.searchable)
595
- this.uniqueOptions = this.noOptions;
596
- }, this.timeout);
597
- }
598
- };
599
- this.getValueFromLabel = (label) => { var _a; return label && ((_a = this.uniqueOptions.find((option) => option.label === label)) === null || _a === void 0 ? void 0 : _a.value); };
600
- this.handleSearchableSelectInput = (event) => {
601
- this.searchableSelectInputValue = event.target.value;
602
- this.emitIcInput(this.searchableSelectInputValue);
603
- // De-select previous selection when input is edited
604
- // Only emit icChange once when editing input
605
- if (this.value != null) {
606
- this.emitIcChange(null);
607
- }
608
- this.hiddenInputValue = null;
609
- this.inputValueToFilter = this.searchableSelectInputValue;
610
- this.setMenuChange(true);
611
- if (!this.disableAutoFiltering) {
612
- this.handleFilter();
613
- clearTimeout(this.debounceAria);
614
- window.setTimeout(() => {
615
- this.updateSearchableSelectResultAriaLive();
616
- }, 800);
617
- }
618
- };
619
- this.updateSearchableSelectResultAriaLive = () => {
620
- var _a;
621
- const searchableSelectResultsStatusEl = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".searchable-select-results-status");
622
- if (searchableSelectResultsStatusEl) {
623
- searchableSelectResultsStatusEl.innerText =
624
- this.noOptions !== null ? this.emptyOptionListText : "";
625
- }
626
- };
627
- this.updateMultiSelectedCountAriaLive = () => {
628
- var _a, _b;
629
- const multiSelectSelectedCountEl = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".multi-select-selected-count");
630
- const selectedCount = `${(_b = this.currValue) === null || _b === void 0 ? void 0 : _b.length} of ${getOptionsWithoutGroupTitlesCount(this.options)} selected`;
631
- if (multiSelectSelectedCountEl &&
632
- multiSelectSelectedCountEl.innerText !== selectedCount) {
633
- multiSelectSelectedCountEl.innerText = selectedCount;
634
- }
635
- };
636
- this.getDefaultValue = (value) => this.getLabelFromValue(value) || null;
637
- this.setDefaultValue = () => {
638
- if (!this.hasSetDefaultValue && this.currValue) {
639
- this.searchableSelectInputValue = this.searchable
640
- ? this.getDefaultValue(this.currValue)
641
- : null;
642
- this.initialValue = this.currValue;
643
- this.hasSetDefaultValue = true;
644
- }
645
- };
646
- this.onFocus = () => {
647
- this.icFocus.emit();
648
- };
649
- this.onBlur = ({ relatedTarget }) => {
650
- var _a;
651
- const target = relatedTarget;
652
- if (target !== null &&
653
- ((target.tagName === "UL" && target.className.includes("menu")) ||
654
- (target.tagName === "LI" && target.className.includes("option")))) {
655
- return;
656
- }
657
- const retryButton = (_a = this.menu) === null || _a === void 0 ? void 0 : _a.querySelector("#retry-button");
658
- if (this.searchable &&
659
- !!this.menu &&
660
- target !== this.menu &&
661
- !Array.from(this.menu.querySelectorAll("[role='option']")).includes(target) &&
662
- (!this.clearButton || target !== this.clearButton) &&
663
- (!retryButton || target !== retryButton)) {
664
- if (!this.retryButtonClick) {
665
- this.setMenuChange(false);
666
- // Clear input field on blur when searchable if no option is selected
667
- if (!this.value) {
668
- this.clearInput();
669
- }
670
- }
671
- this.handleFocusIndicatorDisplay();
672
- }
673
- this.retryButtonClick = false;
674
- this.icBlur.emit();
675
- };
676
- this.onTimeoutBlur = (ev) => {
677
- if (ev.detail.ev.relatedTarget !==
678
- this.searchableSelectElement &&
679
- !this.blurredBecauseButtonPressed) {
680
- this.setMenuChange(false);
681
- this.handleFocusIndicatorDisplay();
682
- this.icBlur.emit();
683
- }
684
- this.blurredBecauseButtonPressed = false;
685
- };
686
- this.handleFormReset = () => {
687
- this.value = this.initialValue;
688
- if (this.searchable) {
689
- this.searchableSelectInputValue = this.getDefaultValue(this.value);
690
- this.hiddenInputValue = this.value;
691
- }
692
- };
693
- this.clearInput = () => {
694
- var _a;
695
- this.noOptions = null;
696
- if (this.searchable) {
697
- (_a = this.searchableSelectElement) === null || _a === void 0 ? void 0 : _a.setAttribute("value", "");
698
- this.searchableSelectInputValue = null;
699
- this.filteredOptions = this.uniqueOptions;
700
- }
701
- };
702
- this.renderNativeOption = (option) => (h("option", { value: option.value, disabled: option.disabled, selected: option.value === this.currValue }, option.label));
703
- }
704
- watchDisabledHandler() {
705
- removeDisabledFalse(this.disabled, this.el);
706
- }
707
- loadingHandler(newValue) {
708
- newValue ? this.triggerLoading() : this.setOptions();
709
- }
710
- watchOptionsHandler() {
711
- this.setOptions();
712
- }
713
- debounceChangedHandler(newValue) {
714
- if (this.currDebounce !== newValue) {
715
- this.currDebounce = newValue;
716
- }
717
- }
718
- valueChangedHandler() {
719
- if (this.value !== this.currValue) {
720
- if (this.value && this.multiple) {
721
- this.currValue = this.getMultipleOptionsString(this.value)
722
- ? this.getValueSortedByOptions(this.value)
723
- : null;
724
- this.updateMultiSelectedCountAriaLive();
725
- }
726
- else {
727
- this.currValue = this.getLabelFromValue(this.value)
728
- ? this.value
729
- : null;
730
- }
731
- }
732
- if (this.searchable && this.value) {
733
- // Only set if value not null - prevents whole input value being cleared when edited
734
- this.searchableSelectInputValue =
735
- this.getLabelFromValue(String(this.currValue)) || null;
736
- }
737
- }
738
- openChangedHandler() {
739
- this.open ? this.icOpen.emit() : this.icClose.emit();
740
- }
741
- disconnectedCallback() {
742
- var _a;
743
- removeFormResetListener(this.el, this.handleFormReset);
744
- (_a = this.hostMutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
745
- }
746
- componentWillLoad() {
747
- const valueInOptions = this.multiple
748
- ? this.getMultipleOptionsString(this.value)
749
- : this.getLabelFromValue(this.value);
750
- this.currValue = valueInOptions ? this.value : null;
751
- this.inheritedAttributes = inheritAttributes(this.el, MUTABLE_ATTRIBUTES);
752
- removeDisabledFalse(this.disabled, this.el);
753
- this.setOptionsValuesFromLabels();
754
- addFormResetListener(this.el, this.handleFormReset);
755
- if (!this.options.length) {
756
- this.initialOptionsEmpty = true;
757
- this.noOptions = [{ label: this.emptyOptionListText, value: "" }];
758
- this.uniqueOptions = this.noOptions;
759
- this.filteredOptions = this.noOptions;
760
- }
761
- else {
762
- this.setDefaultValue();
763
- this.uniqueOptions = this.deduplicateOptions(this.options);
764
- }
765
- }
766
- componentDidLoad() {
767
- onComponentRequiredPropUndefined([{ prop: this.label, propName: "label" }], "Select");
768
- if (this.loading) {
769
- this.triggerLoading();
770
- }
771
- if (this.searchable) {
772
- this.hiddenInputValue = this.currValue;
773
- }
774
- this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);
775
- this.hostMutationObserver.observe(this.el, {
776
- attributes: true,
777
- childList: true,
778
- });
779
- }
780
- componentDidRender() {
781
- if (this.nativeSelectElement && !this.disabled) {
782
- this.setTextColor();
783
- }
784
- }
785
- /**
786
- * Sets focus on the input box.
787
- */
788
- async setFocus() {
789
- if (this.nativeSelectElement) {
790
- this.nativeSelectElement.focus();
791
- }
792
- else if (this.customSelectElement) {
793
- this.customSelectElement.focus();
794
- }
795
- else if (this.searchableSelectElement) {
796
- this.searchableSelectElement.focus();
797
- }
798
- }
799
- render() {
800
- var _a, _b, _c, _d;
801
- const { size, disabled, fullWidth, helperText, hideLabel, label, menuId, multiple, name, options, placeholder, readonly, required, searchable, showClearButton, validationAriaLive, validationStatus, validationText, currValue, theme, hiddenInputValue, open, inputId, searchableSelectInputValue, loading, value, emptyOptionListText, uniqueOptions, selectOnEnter, form, inheritedAttributes, ariaActiveDescendant, hasTimedOut, filteredOptions, clearButtonFocused, } = this;
802
- // HTML inputs only accept 'string' for their value
803
- // Does not cause errors when it is a multi-select - sets value correctly, to a comma-separated string
804
- renderHiddenInput(this.el, searchable ? hiddenInputValue : currValue, name || inputId, disabled);
805
- const invalid = `${validationStatus === IcInformationStatus.Error}`;
806
- const showValidation = hasValidationStatus(validationStatus, !!disabled);
807
- const describedBy = getInputDescribedByText(this.el, inputId, helperText !== "", showValidation).trim();
808
- const valueLabelString = multiple
809
- ? this.getMultipleOptionsString(currValue)
810
- : this.getLabelFromValue(currValue);
811
- const isClearable = !disabled &&
812
- (searchable
813
- ? !!searchableSelectInputValue
814
- : !!currValue && !loading && showClearButton);
815
- return (h(Host, { key: '9c3955b4ba942dd962018252d50aad7bbb1f1744', class: {
816
- "ic-select-disabled": disabled,
817
- "ic-select-searchable": searchable,
818
- [`ic-select-${size}`]: size !== "medium",
819
- "ic-select-full-width": fullWidth,
820
- [`ic-theme-${theme}`]: theme !== "inherit",
821
- }, onBlur: this.onBlur }, h("ic-input-container", { key: 'c67e465c4a39b81ef2f9f861a02a9d9d89e5c3de', readonly: readonly }, !hideLabel && (h("ic-input-label", { key: '9554f5a63ea338139b1cf1be426ef97d829694a5', for: inputId, label: label, helperText: helperText, required: required, disabled: disabled, readonly: readonly }, h("slot", { key: '3749b881b972bf1143f67587e2d70bce773eb597', name: "helper-text", slot: "helper-text" }))), h("ic-input-component-container", { key: '61c1d6fc5c5bd6535e502e9e15ca013612ab009b', ref: (el) => (this.anchorEl = el), class: { "menu-open": open }, size: size, fullWidth: fullWidth, disabled: disabled, readonly: readonly, validationStatus: validationStatus }, isSlotUsed(this.el, "icon") &&
822
- !disabled &&
823
- (!readonly || !!value) && (h("span", { key: 'f81e4bd0e7548bfe8206928808475083b2b641ee', slot: "left-icon", class: {
824
- readonly,
825
- "has-value": !!value,
826
- } }, h("slot", { key: '792566ca482c7ebca0804ac0a18a5beeb3e6f15a', name: "icon" }))), readonly ? (h("ic-typography", null, h("p", null, valueLabelString))) : isMobileOrTablet() && !multiple ? (h("select", Object.assign({ ref: (el) => (this.nativeSelectElement = el), disabled: disabled, onChange: this.handleNativeSelectChange, required: required, id: inputId, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.handleNativeSelectKeyDown, form: form }, inheritedAttributes), h("option", { value: "", selected: true, disabled: !showClearButton }, placeholder), options.map((option) => option.children ? (h("optgroup", { label: option.label }, option.children.map((child) => this.renderNativeOption(child)))) : (this.renderNativeOption(option))))) : searchable ? (h("div", { class: "searchable-select-container" }, h("input", { class: {
827
- "value-text": true,
828
- "select-input": true,
829
- "with-clear-button": !!searchableSelectInputValue,
830
- }, role: "combobox", autocomplete: "off", "aria-label": label, "aria-describedby": describedBy, "aria-activedescendant": ariaActiveDescendant, "aria-autocomplete": "list", "aria-expanded": `${open}`, "aria-invalid": invalid, "aria-required": `${required}`, "aria-controls": menuId, ref: (el) => (this.searchableSelectElement = el), id: inputId, value: searchableSelectInputValue || undefined, placeholder: placeholder, disabled: disabled, onInput: this.handleSearchableSelectInput, onClick: this.handleClick, onKeyDown: this.handleKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, form: form }), isClearable && (h("div", { class: "clear-button-container" }, h("ic-button", { id: "clear-button", ref: (el) => (this.clearButton = el), "aria-label": searchableSelectInputValue &&
831
- (currValue === null || loading)
832
- ? "Clear input"
833
- : "Clear selection", class: "clear-button", innerHTML: Clear, onClick: this.handleClear, onFocus: this.handleClearButtonFocus, onBlur: this.handleClearButtonBlur, size: size, variant: "icon-tertiary", theme: clearButtonFocused ? "light" : "dark" }), h("div", { class: "divider" }))), h("span", { onMouseDown: this.handleExpandIconMouseDown, class: {
834
- "expand-icon": true,
835
- "expand-icon-open": open,
836
- }, innerHTML: Expand, "aria-hidden": "true" }), h("div", { "aria-live": "polite", role: "status", class: "searchable-select-results-status" }))) : (h("div", { class: "select-container" }, h("button", { role: "combobox", class: "select-input", ref: (el) => (this.customSelectElement = el), id: inputId, "aria-label": `${label}, ${(multiple && currValue
837
- ? `${currValue.length} of ${getOptionsWithoutGroupTitlesCount(options)} selected, ${valueLabelString}`
838
- : valueLabelString) || placeholder}`, "aria-describedby": describedBy, "aria-invalid": invalid, "aria-haspopup": "listbox", "aria-expanded": `${open}`, "aria-owns": menuId, "aria-controls": menuId, "aria-required": `${required}`, disabled: disabled, onBlur: this.onBlur, onFocus: this.onFocus, onClick: this.handleClick, onMouseDown: this.handleMouseDown, onKeyDown: this.handleKeyDown }, h("ic-typography", { variant: "body", class: {
839
- "value-text": true,
840
- "with-clear-button": isClearable,
841
- placeholder: !loading && multiple
842
- ? !value || value.length < 1
843
- : !this.getLabelFromValue(currValue),
844
- } }, valueLabelString || placeholder), h("div", { class: "select-input-end" }, isClearable && h("div", { class: "divider" }), h("span", { class: {
845
- "expand-icon": true,
846
- "expand-icon-open": open,
847
- }, innerHTML: Expand, "aria-hidden": "true" }))), isClearable && (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-tertiary", theme: clearButtonFocused ? "light" : "dark" }))))), (!isMobileOrTablet() || multiple) && (h("ic-menu", { key: 'bb2e95961d8685349e46edf1c93a2dce9792657b', class: {
848
- "no-results": loading ||
849
- hasTimedOut ||
850
- (searchable &&
851
- ((_b = (_a = this.filteredOptions) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.label) === emptyOptionListText) ||
852
- (!searchable &&
853
- ((_d = (_c = this.uniqueOptions) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.label) === emptyOptionListText),
854
- }, ref: (el) => (this.menu = el), inputEl: searchable
855
- ? this.searchableSelectElement
856
- : this.customSelectElement, inputLabel: label, anchorEl: this.anchorEl, size: size, menuId: menuId, open: open, options: searchable ? filteredOptions : uniqueOptions, value: multiple ? currValue : currValue, fullWidth: fullWidth, selectOnEnter: 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: searchable || multiple || selectOnEnter ? "manual" : "automatic", closeOnSelect: !multiple, multiSelect: multiple ? true : false, searchableSelect: searchable ? true : false })), multiple && (h("div", { key: '5d6db7b55942499db04a942c7980ad09e5db65f8', "aria-live": "polite", role: "status", class: "multi-select-selected-count" })), h("ic-input-validation", { key: '5133bf75be8a86fe3134491d659b934dac271e57', class: {
857
- "menu-open": open,
858
- }, ariaLiveMode: validationAriaLive, status: showValidation ? validationStatus : "", message: showValidation ? validationText : "", for: inputId }))));
859
- }
860
- static get delegatesFocus() { return true; }
861
- get el() { return getElement(this); }
862
- static get watchers() { return {
863
- "disabled": ["watchDisabledHandler"],
864
- "loading": ["loadingHandler"],
865
- "options": ["watchOptionsHandler"],
866
- "debounce": ["debounceChangedHandler"],
867
- "value": ["valueChangedHandler"],
868
- "open": ["openChangedHandler"]
869
- }; }
870
- };
871
- Select.style = IcSelectStyle0;
872
-
873
- export { Select as ic_select };
874
-
875
- //# sourceMappingURL=ic-select.entry.js.map