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