@ukic/web-components 3.21.0 → 3.22.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 (437) 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 +1 -1
  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-input-component-container_3.cjs.entry.js +212 -80
  34. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  35. package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
  36. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  37. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  38. package/dist/cjs/ic-menu-item.cjs.entry.js +1 -1
  39. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  40. package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
  41. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  42. package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
  43. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  44. package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
  45. package/dist/cjs/ic-pagination-bar.cjs.entry.js +389 -0
  46. package/dist/cjs/ic-pagination-bar.cjs.entry.js.map +1 -0
  47. package/dist/cjs/ic-pagination-item.cjs.entry.js +1 -1
  48. package/dist/cjs/ic-pagination_3.cjs.entry.js +1412 -0
  49. package/dist/cjs/ic-pagination_3.cjs.entry.js.map +1 -0
  50. package/dist/cjs/ic-popover-menu.cjs.entry.js +5 -5
  51. package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
  52. package/dist/cjs/ic-radio-option.cjs.entry.js +1 -1
  53. package/dist/cjs/ic-search-bar.cjs.entry.js +11 -11
  54. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  55. package/dist/cjs/ic-section-container.cjs.entry.js +2 -2
  56. package/dist/cjs/ic-side-navigation.cjs.entry.js +18 -9
  57. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  58. package/dist/cjs/ic-skeleton.cjs.entry.js +2 -2
  59. package/dist/cjs/ic-skip-link.cjs.entry.js +2 -2
  60. package/dist/cjs/ic-status-tag.cjs.entry.js +3 -3
  61. package/dist/cjs/ic-step.cjs.entry.js +14 -14
  62. package/dist/cjs/ic-stepper.cjs.entry.js +3 -3
  63. package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
  64. package/dist/cjs/ic-switch.cjs.entry.js +5 -5
  65. package/dist/cjs/ic-tab-context.cjs.entry.js +1 -2
  66. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  67. package/dist/cjs/ic-tab-group.cjs.entry.js +3 -3
  68. package/dist/cjs/ic-tab-panel.cjs.entry.js +2 -2
  69. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  70. package/dist/cjs/ic-theme.cjs.entry.js +2 -2
  71. package/dist/cjs/ic-toast-region.cjs.entry.js +1 -1
  72. package/dist/cjs/ic-toast.cjs.entry.js +8 -7
  73. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  74. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +3 -3
  75. package/dist/cjs/ic-toggle-button.cjs.entry.js +3 -3
  76. package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
  77. package/dist/cjs/ic-typography.cjs.entry.js +1 -1
  78. package/dist/cjs/index-d337cd8a.js +12 -16
  79. package/dist/cjs/loader.cjs.js +1 -1
  80. package/dist/collection/collection-manifest.json +2 -1
  81. package/dist/collection/components/ic-action-chip/ic-action-chip.css +15 -2
  82. package/dist/collection/components/ic-action-chip/ic-action-chip.js +5 -1
  83. package/dist/collection/components/ic-action-chip/ic-action-chip.js.map +1 -1
  84. package/dist/collection/components/ic-checkbox/ic-checkbox.js +4 -5
  85. package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
  86. package/dist/collection/components/ic-chip/ic-chip.css +15 -3
  87. package/dist/collection/components/ic-chip/ic-chip.js +5 -1
  88. package/dist/collection/components/ic-chip/ic-chip.js.map +1 -1
  89. package/dist/collection/components/ic-classification-banner/ic-classification-banner.js +33 -5
  90. package/dist/collection/components/ic-classification-banner/ic-classification-banner.js.map +1 -1
  91. package/dist/collection/components/ic-classification-banner/ic-classification-banner.stories.js +32 -0
  92. package/dist/collection/components/ic-menu/ic-menu.css +6 -1
  93. package/dist/collection/components/ic-menu/ic-menu.js +184 -53
  94. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  95. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.css +104 -0
  96. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +895 -0
  97. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -0
  98. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.stories.js +215 -0
  99. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js +2 -0
  100. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js.map +1 -0
  101. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +4 -4
  102. package/dist/collection/components/ic-search-bar/ic-search-bar.js +10 -11
  103. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  104. package/dist/collection/components/ic-section-container/ic-section-container.js +2 -2
  105. package/dist/collection/components/ic-select/ic-select.css +1 -2
  106. package/dist/collection/components/ic-select/ic-select.js +414 -589
  107. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  108. package/dist/collection/components/ic-select/ic-select.types.js +2 -0
  109. package/dist/collection/components/ic-select/ic-select.types.js.map +1 -0
  110. package/dist/collection/components/ic-select/ic-select_(searchable).stories.js +26 -21
  111. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +18 -9
  112. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
  113. package/dist/collection/components/ic-skeleton/ic-skeleton.js +2 -2
  114. package/dist/collection/components/ic-skip-link/ic-skip-link.js +2 -2
  115. package/dist/collection/components/ic-status-tag/ic-status-tag.js +2 -2
  116. package/dist/collection/components/ic-step/ic-step.js +13 -13
  117. package/dist/collection/components/ic-stepper/ic-stepper.js +2 -2
  118. package/dist/collection/components/ic-stepper/ic-stepper.js.map +1 -1
  119. package/dist/collection/components/ic-switch/ic-switch.js +4 -4
  120. package/dist/collection/components/ic-tab-context/ic-tab-context.js +1 -2
  121. package/dist/collection/components/ic-tab-context/ic-tab-context.js.map +1 -1
  122. package/dist/collection/components/ic-tab-group/ic-tab-group.js +2 -2
  123. package/dist/collection/components/ic-tab-panel/ic-tab-panel.js +2 -2
  124. package/dist/collection/components/ic-theme/ic-theme.js +1 -1
  125. package/dist/collection/components/ic-toast/ic-toast.js +7 -6
  126. package/dist/collection/components/ic-toast/ic-toast.js.map +1 -1
  127. package/dist/collection/components/ic-toast-region/ic-toast-region.js +1 -1
  128. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +2 -2
  129. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +2 -2
  130. package/dist/collection/utils/helpers.js +2 -15
  131. package/dist/collection/utils/helpers.js.map +1 -1
  132. package/dist/components/helpers.js +3 -16
  133. package/dist/components/helpers.js.map +1 -1
  134. package/dist/components/ic-action-chip.js +6 -2
  135. package/dist/components/ic-action-chip.js.map +1 -1
  136. package/dist/components/ic-card-vertical.js.map +1 -1
  137. package/dist/components/ic-checkbox.js +4 -4
  138. package/dist/components/ic-checkbox.js.map +1 -1
  139. package/dist/components/ic-chip.js +6 -2
  140. package/dist/components/ic-chip.js.map +1 -1
  141. package/dist/components/ic-classification-banner.js +14 -5
  142. package/dist/components/ic-classification-banner.js.map +1 -1
  143. package/dist/components/ic-menu2.js +213 -79
  144. package/dist/components/ic-menu2.js.map +1 -1
  145. package/dist/components/ic-pagination-bar.d.ts +11 -0
  146. package/dist/components/ic-pagination-bar.js +523 -0
  147. package/dist/components/ic-pagination-bar.js.map +1 -0
  148. package/dist/components/ic-pagination.js +1 -375
  149. package/dist/components/ic-pagination.js.map +1 -1
  150. package/dist/{esm/ic-pagination.entry.js → components/ic-pagination2.js} +82 -11
  151. package/dist/components/ic-pagination2.js.map +1 -0
  152. package/dist/components/ic-popover-menu.js +4 -4
  153. package/dist/components/ic-popover-menu.js.map +1 -1
  154. package/dist/components/ic-radio-group.js.map +1 -1
  155. package/dist/components/ic-radio-option.js.map +1 -1
  156. package/dist/components/ic-search-bar.js +11 -11
  157. package/dist/components/ic-search-bar.js.map +1 -1
  158. package/dist/components/ic-section-container2.js +2 -2
  159. package/dist/components/ic-select.js +1 -994
  160. package/dist/components/ic-select.js.map +1 -1
  161. package/dist/components/ic-select2.js +804 -0
  162. package/dist/components/ic-select2.js.map +1 -0
  163. package/dist/components/ic-side-navigation.js +18 -9
  164. package/dist/components/ic-side-navigation.js.map +1 -1
  165. package/dist/components/ic-skeleton.js +2 -2
  166. package/dist/components/ic-skip-link.js +2 -2
  167. package/dist/components/ic-status-tag.js +2 -2
  168. package/dist/components/ic-step.js +13 -13
  169. package/dist/components/ic-stepper.js +2 -2
  170. package/dist/components/ic-stepper.js.map +1 -1
  171. package/dist/components/ic-switch.js +4 -4
  172. package/dist/components/ic-switch.js.map +1 -1
  173. package/dist/components/ic-tab-context.js +1 -2
  174. package/dist/components/ic-tab-context.js.map +1 -1
  175. package/dist/components/ic-tab-group.js +2 -2
  176. package/dist/components/ic-tab-panel.js +2 -2
  177. package/dist/components/ic-tab-panel.js.map +1 -1
  178. package/dist/components/ic-text-field.js +1 -528
  179. package/dist/components/ic-text-field.js.map +1 -1
  180. package/dist/{esm/ic-text-field.entry.js → components/ic-text-field2.js} +114 -11
  181. package/dist/components/ic-text-field2.js.map +1 -0
  182. package/dist/components/ic-theme.js +1 -1
  183. package/dist/components/ic-toast-region.js +1 -1
  184. package/dist/components/ic-toast.js +7 -6
  185. package/dist/components/ic-toast.js.map +1 -1
  186. package/dist/components/ic-toggle-button-group.js +2 -2
  187. package/dist/components/ic-toggle-button.js +2 -2
  188. package/dist/core/core.esm.js +1 -1
  189. package/dist/core/core.esm.js.map +1 -1
  190. package/dist/core/{p-0a24c536.entry.js → p-05fd2707.entry.js} +2 -2
  191. package/dist/core/{p-85e15d01.entry.js → p-09505807.entry.js} +2 -2
  192. package/dist/core/{p-96bc7d24.entry.js → p-09caf7ed.entry.js} +2 -2
  193. package/dist/core/p-09caf7ed.entry.js.map +1 -0
  194. package/dist/core/{p-9057a186.entry.js → p-0b728f50.entry.js} +2 -2
  195. package/dist/core/{p-9057a186.entry.js.map → p-0b728f50.entry.js.map} +1 -1
  196. package/dist/core/p-0fb7f915.entry.js +2 -0
  197. package/dist/core/p-0fb7f915.entry.js.map +1 -0
  198. package/dist/core/{p-41a5da12.entry.js → p-1b81ec88.entry.js} +2 -2
  199. package/dist/core/{p-99951365.entry.js → p-2691cc80.entry.js} +2 -2
  200. package/dist/core/{p-94916588.entry.js → p-2a124daf.entry.js} +2 -2
  201. package/dist/core/{p-04c77b2d.entry.js → p-2b87c592.entry.js} +2 -2
  202. package/dist/core/{p-4aa56990.entry.js → p-2bd80913.entry.js} +2 -2
  203. package/dist/core/{p-aed1c7e7.entry.js → p-347cc084.entry.js} +2 -2
  204. package/dist/core/p-393af2bc.entry.js +2 -0
  205. package/dist/core/p-393af2bc.entry.js.map +1 -0
  206. package/dist/core/{p-a3dea729.entry.js → p-3aed13ba.entry.js} +2 -2
  207. package/dist/core/{p-8da90b72.entry.js → p-46fd555f.entry.js} +2 -2
  208. package/dist/core/{p-43cc0f1d.entry.js → p-48a628f0.entry.js} +2 -2
  209. package/dist/core/{p-9a4e067f.entry.js → p-4f56acff.entry.js} +2 -2
  210. package/dist/core/{p-3021290f.entry.js → p-506d428a.entry.js} +2 -2
  211. package/dist/core/{p-a1b2f483.entry.js → p-50dca790.entry.js} +2 -2
  212. package/dist/core/p-53ab3c0f.entry.js +2 -0
  213. package/dist/core/p-53ab3c0f.entry.js.map +1 -0
  214. package/dist/core/{p-feef7c2c.entry.js → p-56de4f4b.entry.js} +2 -2
  215. package/dist/core/{p-b4e322fe.entry.js → p-5900cb65.entry.js} +2 -2
  216. package/dist/core/{p-78a54069.entry.js → p-5976de6e.entry.js} +2 -2
  217. package/dist/core/{p-2af89564.entry.js → p-61d79fc6.entry.js} +2 -2
  218. package/dist/core/{p-2af89564.entry.js.map → p-61d79fc6.entry.js.map} +1 -1
  219. package/dist/core/p-659d048d.entry.js +2 -0
  220. package/dist/core/{p-1edf2689.entry.js → p-67de1290.entry.js} +2 -2
  221. package/dist/core/p-6b4ec95f.entry.js +3 -0
  222. package/dist/core/p-6b4ec95f.entry.js.map +1 -0
  223. package/dist/core/{p-f700b759.entry.js → p-73043f57.entry.js} +2 -2
  224. package/dist/core/{p-7b8e5926.entry.js → p-735d3096.entry.js} +2 -2
  225. package/dist/core/{p-07075461.entry.js → p-7b538fd1.entry.js} +2 -2
  226. package/dist/core/{p-cfd43558.entry.js → p-80d85403.entry.js} +2 -2
  227. package/dist/core/{p-7f279c8a.entry.js → p-83578f1d.entry.js} +2 -2
  228. package/dist/core/{p-7f279c8a.entry.js.map → p-83578f1d.entry.js.map} +1 -1
  229. package/dist/core/{p-b8c0c142.entry.js → p-880f7548.entry.js} +2 -2
  230. package/dist/core/p-880f7548.entry.js.map +1 -0
  231. package/dist/core/{p-79949920.entry.js → p-8a833e82.entry.js} +2 -2
  232. package/dist/core/{p-0aba9e31.entry.js → p-90678e67.entry.js} +2 -2
  233. package/dist/core/{p-a851eb65.entry.js → p-9502fb86.entry.js} +2 -2
  234. package/dist/core/{p-2ca7f050.entry.js → p-99433296.entry.js} +2 -2
  235. package/dist/core/p-99433296.entry.js.map +1 -0
  236. package/dist/core/{p-f6de08fb.entry.js → p-9c2b2cb9.entry.js} +2 -2
  237. package/dist/core/{p-949d08d3.entry.js → p-9cb83a2e.entry.js} +2 -2
  238. package/dist/core/{p-f0ecb80b.entry.js → p-a08d6b46.entry.js} +2 -2
  239. package/dist/core/p-a321feee.entry.js +2 -0
  240. package/dist/core/p-a321feee.entry.js.map +1 -0
  241. package/dist/core/{p-208f470f.entry.js → p-a780a34b.entry.js} +2 -2
  242. package/dist/core/{p-387b7bca.entry.js → p-aad03a3c.entry.js} +2 -2
  243. package/dist/core/{p-ec14c783.entry.js → p-aaf4e367.entry.js} +2 -2
  244. package/dist/core/{p-707ae6e9.entry.js → p-b52c44eb.entry.js} +2 -2
  245. package/dist/core/{p-716e7eaf.entry.js → p-b777f0a1.entry.js} +2 -2
  246. package/dist/core/p-b777f0a1.entry.js.map +1 -0
  247. package/dist/core/p-b77b1e1f.js +2 -0
  248. package/dist/core/p-b77b1e1f.js.map +1 -0
  249. package/dist/core/{p-780babc0.entry.js → p-b997ad5e.entry.js} +2 -2
  250. package/dist/core/{p-a0af1b0a.entry.js → p-bb7652cd.entry.js} +2 -2
  251. package/dist/core/{p-ded4cd76.entry.js → p-cbca04bb.entry.js} +2 -2
  252. package/dist/core/{p-99687bce.entry.js → p-cc64e5ef.entry.js} +2 -2
  253. package/dist/core/{p-812c5e61.entry.js → p-cfbacca1.entry.js} +2 -2
  254. package/dist/core/{p-0da2caa2.entry.js → p-daec7e69.entry.js} +2 -2
  255. package/dist/core/{p-1590fd69.entry.js → p-e7767c0d.entry.js} +2 -2
  256. package/dist/core/p-e938eb31.entry.js +2 -0
  257. package/dist/core/p-e938eb31.entry.js.map +1 -0
  258. package/dist/core/{p-dce11b9d.entry.js → p-ea7a3d30.entry.js} +2 -2
  259. package/dist/core/{p-880afd4b.entry.js → p-ebd688b9.entry.js} +2 -2
  260. package/dist/core/p-ebd688b9.entry.js.map +1 -0
  261. package/dist/core/{p-a674b13b.entry.js → p-ef70ea50.entry.js} +2 -2
  262. package/dist/core/{p-d25d0aad.entry.js → p-f64996f1.entry.js} +2 -2
  263. package/dist/core/{p-db17a793.entry.js → p-f661ba76.entry.js} +2 -2
  264. package/dist/core/{p-a03bb31c.entry.js → p-f84ac9c6.entry.js} +2 -2
  265. package/dist/core/{p-f3406b42.entry.js → p-fb9376f0.entry.js} +2 -2
  266. package/dist/esm/core.js +1 -1
  267. package/dist/esm/{helpers-0f85537f.js → helpers-66681c73.js} +4 -17
  268. package/dist/esm/helpers-66681c73.js.map +1 -0
  269. package/dist/esm/ic-accordion-group.entry.js +1 -1
  270. package/dist/esm/ic-accordion.entry.js +1 -1
  271. package/dist/esm/ic-action-chip.entry.js +7 -3
  272. package/dist/esm/ic-action-chip.entry.js.map +1 -1
  273. package/dist/esm/ic-alert.entry.js +1 -1
  274. package/dist/esm/ic-back-to-top.entry.js +1 -1
  275. package/dist/esm/ic-badge.entry.js +1 -1
  276. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  277. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  278. package/dist/esm/ic-button_3.entry.js +1 -1
  279. package/dist/esm/ic-button_3.entry.js.map +1 -1
  280. package/dist/esm/ic-card-horizontal.entry.js +1 -1
  281. package/dist/esm/ic-card-vertical.entry.js +1 -1
  282. package/dist/esm/ic-checkbox-group.entry.js +1 -1
  283. package/dist/esm/ic-checkbox.entry.js +5 -5
  284. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  285. package/dist/esm/ic-chip.entry.js +7 -3
  286. package/dist/esm/ic-chip.entry.js.map +1 -1
  287. package/dist/esm/ic-classification-banner.entry.js +13 -5
  288. package/dist/esm/ic-classification-banner.entry.js.map +1 -1
  289. package/dist/esm/ic-data-row.entry.js +1 -1
  290. package/dist/esm/ic-dialog.entry.js +1 -1
  291. package/dist/esm/ic-divider.entry.js +1 -1
  292. package/dist/esm/ic-empty-state.entry.js +1 -1
  293. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  294. package/dist/esm/ic-footer-link.entry.js +1 -1
  295. package/dist/esm/ic-footer.entry.js +1 -1
  296. package/dist/esm/ic-hero.entry.js +1 -1
  297. package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
  298. package/dist/esm/ic-input-component-container_3.entry.js +212 -80
  299. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  300. package/dist/esm/ic-input-label_2.entry.js +1 -1
  301. package/dist/esm/ic-link.entry.js +1 -1
  302. package/dist/esm/ic-menu-group.entry.js +1 -1
  303. package/dist/esm/ic-menu-item.entry.js +1 -1
  304. package/dist/esm/ic-navigation-button.entry.js +1 -1
  305. package/dist/esm/ic-navigation-group.entry.js +1 -1
  306. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  307. package/dist/esm/ic-navigation-item.entry.js +1 -1
  308. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  309. package/dist/esm/ic-page-header.entry.js +1 -1
  310. package/dist/esm/ic-pagination-bar.entry.js +385 -0
  311. package/dist/esm/ic-pagination-bar.entry.js.map +1 -0
  312. package/dist/esm/ic-pagination-item.entry.js +1 -1
  313. package/dist/esm/ic-pagination_3.entry.js +1406 -0
  314. package/dist/esm/ic-pagination_3.entry.js.map +1 -0
  315. package/dist/esm/ic-popover-menu.entry.js +5 -5
  316. package/dist/esm/ic-radio-group.entry.js +1 -1
  317. package/dist/esm/ic-radio-option.entry.js +1 -1
  318. package/dist/esm/ic-search-bar.entry.js +11 -11
  319. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  320. package/dist/esm/ic-section-container.entry.js +2 -2
  321. package/dist/esm/ic-side-navigation.entry.js +18 -9
  322. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  323. package/dist/esm/ic-skeleton.entry.js +2 -2
  324. package/dist/esm/ic-skip-link.entry.js +2 -2
  325. package/dist/esm/ic-status-tag.entry.js +3 -3
  326. package/dist/esm/ic-step.entry.js +14 -14
  327. package/dist/esm/ic-stepper.entry.js +3 -3
  328. package/dist/esm/ic-stepper.entry.js.map +1 -1
  329. package/dist/esm/ic-switch.entry.js +5 -5
  330. package/dist/esm/ic-tab-context.entry.js +1 -2
  331. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  332. package/dist/esm/ic-tab-group.entry.js +3 -3
  333. package/dist/esm/ic-tab-panel.entry.js +2 -2
  334. package/dist/esm/ic-tab.entry.js +1 -1
  335. package/dist/esm/ic-theme.entry.js +2 -2
  336. package/dist/esm/ic-toast-region.entry.js +1 -1
  337. package/dist/esm/ic-toast.entry.js +8 -7
  338. package/dist/esm/ic-toast.entry.js.map +1 -1
  339. package/dist/esm/ic-toggle-button-group.entry.js +3 -3
  340. package/dist/esm/ic-toggle-button.entry.js +3 -3
  341. package/dist/esm/ic-top-navigation.entry.js +1 -1
  342. package/dist/esm/ic-typography.entry.js +1 -1
  343. package/dist/esm/index-a7a720e7.js +12 -16
  344. package/dist/esm/loader.js +1 -1
  345. package/dist/types/components/ic-classification-banner/ic-classification-banner.d.ts +4 -0
  346. package/dist/types/components/ic-menu/ic-menu.d.ts +11 -1
  347. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +162 -0
  348. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.types.d.ts +8 -0
  349. package/dist/types/components/ic-select/ic-select.d.ts +53 -80
  350. package/dist/types/components/ic-select/ic-select.types.d.ts +43 -0
  351. package/dist/types/components/ic-side-navigation/ic-side-navigation.d.ts +3 -2
  352. package/dist/types/components.d.ts +234 -5
  353. package/dist/types/utils/helpers.d.ts +2 -4
  354. package/hydrate/index.js +1141 -771
  355. package/hydrate/index.mjs +1141 -771
  356. package/package.json +2 -2
  357. package/vscode-data.json +131 -0
  358. package/dist/cjs/helpers-3a796e7a.js.map +0 -1
  359. package/dist/cjs/ic-pagination.cjs.entry.js +0 -312
  360. package/dist/cjs/ic-pagination.cjs.entry.js.map +0 -1
  361. package/dist/cjs/ic-select.cjs.entry.js +0 -879
  362. package/dist/cjs/ic-select.cjs.entry.js.map +0 -1
  363. package/dist/cjs/ic-text-field.cjs.entry.js +0 -433
  364. package/dist/cjs/ic-text-field.cjs.entry.js.map +0 -1
  365. package/dist/core/p-0d7fd892.entry.js +0 -2
  366. package/dist/core/p-29b61bb5.entry.js +0 -3
  367. package/dist/core/p-29b61bb5.entry.js.map +0 -1
  368. package/dist/core/p-2ca7f050.entry.js.map +0 -1
  369. package/dist/core/p-4aadabc8.entry.js +0 -2
  370. package/dist/core/p-4aadabc8.entry.js.map +0 -1
  371. package/dist/core/p-716e7eaf.entry.js.map +0 -1
  372. package/dist/core/p-808e1ef5.entry.js +0 -2
  373. package/dist/core/p-808e1ef5.entry.js.map +0 -1
  374. package/dist/core/p-880afd4b.entry.js.map +0 -1
  375. package/dist/core/p-8fe4e0ad.entry.js +0 -2
  376. package/dist/core/p-8fe4e0ad.entry.js.map +0 -1
  377. package/dist/core/p-96bc7d24.entry.js.map +0 -1
  378. package/dist/core/p-b8c0c142.entry.js.map +0 -1
  379. package/dist/core/p-c5b9519d.entry.js +0 -2
  380. package/dist/core/p-c5b9519d.entry.js.map +0 -1
  381. package/dist/core/p-d1730d4d.entry.js +0 -2
  382. package/dist/core/p-d1730d4d.entry.js.map +0 -1
  383. package/dist/core/p-dbc8bf0c.js +0 -2
  384. package/dist/core/p-dbc8bf0c.js.map +0 -1
  385. package/dist/core/p-fdb587ab.entry.js +0 -2
  386. package/dist/core/p-fdb587ab.entry.js.map +0 -1
  387. package/dist/esm/helpers-0f85537f.js.map +0 -1
  388. package/dist/esm/ic-pagination.entry.js.map +0 -1
  389. package/dist/esm/ic-select.entry.js +0 -875
  390. package/dist/esm/ic-select.entry.js.map +0 -1
  391. package/dist/esm/ic-text-field.entry.js.map +0 -1
  392. /package/dist/core/{p-0a24c536.entry.js.map → p-05fd2707.entry.js.map} +0 -0
  393. /package/dist/core/{p-85e15d01.entry.js.map → p-09505807.entry.js.map} +0 -0
  394. /package/dist/core/{p-41a5da12.entry.js.map → p-1b81ec88.entry.js.map} +0 -0
  395. /package/dist/core/{p-99951365.entry.js.map → p-2691cc80.entry.js.map} +0 -0
  396. /package/dist/core/{p-94916588.entry.js.map → p-2a124daf.entry.js.map} +0 -0
  397. /package/dist/core/{p-04c77b2d.entry.js.map → p-2b87c592.entry.js.map} +0 -0
  398. /package/dist/core/{p-4aa56990.entry.js.map → p-2bd80913.entry.js.map} +0 -0
  399. /package/dist/core/{p-aed1c7e7.entry.js.map → p-347cc084.entry.js.map} +0 -0
  400. /package/dist/core/{p-a3dea729.entry.js.map → p-3aed13ba.entry.js.map} +0 -0
  401. /package/dist/core/{p-8da90b72.entry.js.map → p-46fd555f.entry.js.map} +0 -0
  402. /package/dist/core/{p-43cc0f1d.entry.js.map → p-48a628f0.entry.js.map} +0 -0
  403. /package/dist/core/{p-9a4e067f.entry.js.map → p-4f56acff.entry.js.map} +0 -0
  404. /package/dist/core/{p-3021290f.entry.js.map → p-506d428a.entry.js.map} +0 -0
  405. /package/dist/core/{p-a1b2f483.entry.js.map → p-50dca790.entry.js.map} +0 -0
  406. /package/dist/core/{p-feef7c2c.entry.js.map → p-56de4f4b.entry.js.map} +0 -0
  407. /package/dist/core/{p-b4e322fe.entry.js.map → p-5900cb65.entry.js.map} +0 -0
  408. /package/dist/core/{p-78a54069.entry.js.map → p-5976de6e.entry.js.map} +0 -0
  409. /package/dist/core/{p-0d7fd892.entry.js.map → p-659d048d.entry.js.map} +0 -0
  410. /package/dist/core/{p-1edf2689.entry.js.map → p-67de1290.entry.js.map} +0 -0
  411. /package/dist/core/{p-f700b759.entry.js.map → p-73043f57.entry.js.map} +0 -0
  412. /package/dist/core/{p-7b8e5926.entry.js.map → p-735d3096.entry.js.map} +0 -0
  413. /package/dist/core/{p-07075461.entry.js.map → p-7b538fd1.entry.js.map} +0 -0
  414. /package/dist/core/{p-cfd43558.entry.js.map → p-80d85403.entry.js.map} +0 -0
  415. /package/dist/core/{p-79949920.entry.js.map → p-8a833e82.entry.js.map} +0 -0
  416. /package/dist/core/{p-0aba9e31.entry.js.map → p-90678e67.entry.js.map} +0 -0
  417. /package/dist/core/{p-a851eb65.entry.js.map → p-9502fb86.entry.js.map} +0 -0
  418. /package/dist/core/{p-f6de08fb.entry.js.map → p-9c2b2cb9.entry.js.map} +0 -0
  419. /package/dist/core/{p-949d08d3.entry.js.map → p-9cb83a2e.entry.js.map} +0 -0
  420. /package/dist/core/{p-f0ecb80b.entry.js.map → p-a08d6b46.entry.js.map} +0 -0
  421. /package/dist/core/{p-208f470f.entry.js.map → p-a780a34b.entry.js.map} +0 -0
  422. /package/dist/core/{p-387b7bca.entry.js.map → p-aad03a3c.entry.js.map} +0 -0
  423. /package/dist/core/{p-ec14c783.entry.js.map → p-aaf4e367.entry.js.map} +0 -0
  424. /package/dist/core/{p-707ae6e9.entry.js.map → p-b52c44eb.entry.js.map} +0 -0
  425. /package/dist/core/{p-780babc0.entry.js.map → p-b997ad5e.entry.js.map} +0 -0
  426. /package/dist/core/{p-a0af1b0a.entry.js.map → p-bb7652cd.entry.js.map} +0 -0
  427. /package/dist/core/{p-ded4cd76.entry.js.map → p-cbca04bb.entry.js.map} +0 -0
  428. /package/dist/core/{p-99687bce.entry.js.map → p-cc64e5ef.entry.js.map} +0 -0
  429. /package/dist/core/{p-812c5e61.entry.js.map → p-cfbacca1.entry.js.map} +0 -0
  430. /package/dist/core/{p-0da2caa2.entry.js.map → p-daec7e69.entry.js.map} +0 -0
  431. /package/dist/core/{p-1590fd69.entry.js.map → p-e7767c0d.entry.js.map} +0 -0
  432. /package/dist/core/{p-dce11b9d.entry.js.map → p-ea7a3d30.entry.js.map} +0 -0
  433. /package/dist/core/{p-a674b13b.entry.js.map → p-ef70ea50.entry.js.map} +0 -0
  434. /package/dist/core/{p-d25d0aad.entry.js.map → p-f64996f1.entry.js.map} +0 -0
  435. /package/dist/core/{p-db17a793.entry.js.map → p-f661ba76.entry.js.map} +0 -0
  436. /package/dist/core/{p-a03bb31c.entry.js.map → p-f84ac9c6.entry.js.map} +0 -0
  437. /package/dist/core/{p-f3406b42.entry.js.map → p-fb9376f0.entry.js.map} +0 -0
@@ -0,0 +1,1412 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-d337cd8a.js');
6
+ const helpers = require('./helpers-81cd6930.js');
7
+ const constants = require('./constants-4d389abc.js');
8
+
9
+ const paginationNextPrevious = `<svg width="8" height="10" viewBox="0 0 8 10" fill="none" xmlns="http://www.w3.org/2000/svg">
10
+ <path d="M2.08748 0L0.912476 1.175L4.72914 5L0.912476 8.825L2.08748 10L7.08748 5L2.08748 0Z" fill="currentColor"/>
11
+ </svg>
12
+ `;
13
+
14
+ const paginationFirstLast = `<svg width="12" height="10" viewBox="0 0 12 10" fill="none" xmlns="http://www.w3.org/2000/svg">
15
+ <path d="M11.1709 8.825L7.34589 5L11.1709 1.175L9.99589 0L4.99589 5L9.99589 10L11.1709 8.825ZM0.829224 0H2.49589V10H0.829224V0Z" fill="currentColour"/>
16
+ </svg>`;
17
+
18
+ const icPaginationCss = "/*! 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{box-sizing:border-box;width:100%;display:flex;justify-content:center}nav{width:100%;display:flex;flex-flow:row wrap;justify-content:flex-start;align-items:center}ic-button{cursor:pointer}ic-button.next-previous{--icon-width:var(--ic-space-xs);--icon-height:calc(var(--ic-space-xs) + var(--ic-space-xxxs));padding:0 var(--ic-space-xxs) 0 var(--ic-space-xxxs)}ic-button.first-last{--icon-width:calc(var(--ic-space-sm) + var(--ic-space-xxxs));--icon-height:calc(var(--ic-space-xs) + var(--ic-space-xxxs))}ic-button.first-last::part(button),ic-button.next-previous::part(button){color:var(--ic-pagination-chevron)}:host(.ic-pagination-monochrome) ic-button.first-last::part(button),:host(.ic-pagination-monochrome) ic-button.next-previous::part(button){color:var(--ic-pagination-chevron-monochrome)}ic-button.ic-button-disabled.first-last::part(button),ic-button.ic-button-disabled.next-previous::part(button),:host(.ic-pagination-monochrome) ic-button.ic-button-disabled.first-last::part(button),:host(.ic-pagination-monochrome) ic-button.ic-button-disabled.next-previous::part(button){color:var(--ic-pagination-chevron-disabled)}.disabled{color:var(--ic-color-text-disabled-mid);pointer-events:none;cursor:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.hide-current-page{display:none}.sr-only{position:absolute;left:-9999px}.sr-only:dir(rtl){right:-9999px}";
19
+ const IcPaginationStyle0 = icPaginationCss;
20
+
21
+ const Pagination = class {
22
+ constructor(hostRef) {
23
+ index.registerInstance(this, hostRef);
24
+ this.icPageChange = index.createEvent(this, "icPageChange", 7);
25
+ this.endEllipsis = false;
26
+ this.endItems = [];
27
+ this.midItems = [];
28
+ this.startEllipsis = false;
29
+ this.startItems = [];
30
+ /**
31
+ * The accessible label of the pagination component to provide context for screen reader users.
32
+ */
33
+ this.accessibleLabel = "Pagination Navigation";
34
+ /**
35
+ * The number of pages displayed adjacent to the current page when using 'complex' type pagination. Accepted values are 0, 1 & 2.
36
+ */
37
+ this.adjacentPageCount = 1;
38
+ /**
39
+ * The number of pages displayed as boundary items to the current page when using 'complex' type pagination. Accepted values are 0, 1 & 2.
40
+ */
41
+ this.boundaryPageCount = 1;
42
+ /**
43
+ * The default page to display.
44
+ */
45
+ this.defaultPage = 1;
46
+ /**
47
+ * If `true`, the pagination will not allow interaction.
48
+ */
49
+ this.disabled = false;
50
+ /**
51
+ * If `true`, the current page of the simple pagination will not be displayed.
52
+ */
53
+ this.hideCurrentPage = false;
54
+ /**
55
+ * If `true`, the first and last page buttons will not be displayed.
56
+ */
57
+ this.hideFirstAndLastPageButton = false;
58
+ /**
59
+ * The label for the pagination item (applicable when simple pagination is being used).
60
+ */
61
+ this.label = "Page";
62
+ /**
63
+ * If `true`, the pagination will display as black in the light theme, and white in dark theme.
64
+ */
65
+ this.monochrome = false;
66
+ /**
67
+ * 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.
68
+ */
69
+ this.theme = "inherit";
70
+ /**
71
+ * The type of pagination to be used.
72
+ */
73
+ this.type = "simple";
74
+ /**
75
+ * The current page displayed by the pagination.
76
+ */
77
+ this.currentPage = this.defaultPage;
78
+ this.handleClickFirst = () => {
79
+ this.currentPage = 1;
80
+ this.icPageChange.emit({ value: this.currentPage });
81
+ };
82
+ this.handleClickPrevious = () => {
83
+ this.currentPage--;
84
+ this.icPageChange.emit({ value: this.currentPage });
85
+ };
86
+ this.handleClickNext = () => {
87
+ this.currentPage++;
88
+ this.icPageChange.emit({ value: this.currentPage });
89
+ };
90
+ this.handleClickLast = () => {
91
+ this.currentPage = this.pages;
92
+ this.icPageChange.emit({ value: this.currentPage });
93
+ };
94
+ // button rendering abstracted from component render methods for clarity
95
+ this.firstButton = () => {
96
+ return (index.h("ic-button", { id: "first-page-button", "aria-label": "Go to first page", theme: this.theme, onClick: this.handleClickFirst, class: "page-button first-last", disabled: this.currentPage === 1 || this.disabled, variant: "icon-tertiary", monochrome: this.theme == "light" || this.theme == "dark", innerHTML: paginationFirstLast }));
97
+ };
98
+ this.previousButton = () => {
99
+ return (index.h("ic-button", { id: "previous-page-button", "aria-label": "Go to previous page", theme: this.theme, onClick: this.handleClickPrevious, class: "page-button next-previous flip", disabled: this.currentPage === 1 || this.disabled, variant: "icon-tertiary", monochrome: this.theme == "light" || this.theme == "dark", innerHTML: paginationNextPrevious }));
100
+ };
101
+ this.nextButton = () => {
102
+ return (index.h("ic-button", { id: "next-page-button", "aria-label": "Go to next page", theme: this.theme, onClick: this.handleClickNext, class: "page-button next-previous", disabled: this.currentPage === this.pages || this.disabled, variant: "icon-tertiary", monochrome: this.theme == "light" || this.theme == "dark", innerHTML: paginationNextPrevious }));
103
+ };
104
+ this.lastButton = () => {
105
+ return (index.h("ic-button", { id: "last-page-button", "aria-label": "Go to last page", theme: this.theme, onClick: this.handleClickLast, class: "page-button first-last flip", disabled: this.currentPage === this.pages || this.disabled, variant: "icon-tertiary", monochrome: this.theme == "light" || this.theme == "dark", innerHTML: paginationFirstLast }));
106
+ };
107
+ this.renderStartEllipsis = () => {
108
+ return (index.h("ic-pagination-item", { theme: this.theme, monochrome: this.monochrome, type: "ellipsis", id: "start-ellipsis", disabled: this.disabled }));
109
+ };
110
+ this.renderEndEllipsis = () => {
111
+ return (index.h("ic-pagination-item", { theme: this.theme, monochrome: this.monochrome, type: "ellipsis", id: "end-ellipsis", disabled: this.disabled }));
112
+ };
113
+ this.renderStartItems = () => {
114
+ return this.startItems.map((page) => {
115
+ return (index.h("ic-pagination-item", { theme: this.theme, monochrome: this.monochrome, selected: page === this.currentPage, id: `pagination-item-${page}`, type: "page", page: page, disabled: this.disabled }));
116
+ });
117
+ };
118
+ this.renderEndItems = () => {
119
+ return this.endItems.map((page) => {
120
+ return (index.h("ic-pagination-item", { theme: this.theme, monochrome: this.monochrome, selected: page === this.currentPage, id: `pagination-item-${page}`, type: "page", page: page, disabled: this.disabled }));
121
+ });
122
+ };
123
+ this.renderMiddleItems = () => {
124
+ return this.midItems.map((page) => {
125
+ return (index.h("ic-pagination-item", { theme: this.theme, monochrome: this.monochrome, selected: page === this.currentPage, id: `pagination-item-${page}`, type: "page", page: page, disabled: this.disabled }));
126
+ });
127
+ };
128
+ }
129
+ watchAdjacentPageCountHandler() {
130
+ if (this.adjacentPageCount > 2) {
131
+ this.adjacentPageCount = 2;
132
+ }
133
+ }
134
+ watchBoundaryPageCountHandler() {
135
+ if (this.boundaryPageCount > 2) {
136
+ this.boundaryPageCount = 2;
137
+ }
138
+ }
139
+ watchDisabledHandler() {
140
+ helpers.removeDisabledFalse(this.disabled, this.el);
141
+ }
142
+ watchNumberPagesHandler() {
143
+ this.watchPageChangeHandler();
144
+ }
145
+ watchTypeHandler() {
146
+ this.watchPageChangeHandler();
147
+ }
148
+ watchPageChangeHandler() {
149
+ if (this.type === "simple") {
150
+ return;
151
+ }
152
+ this.startEllipsis = false;
153
+ this.endEllipsis = false;
154
+ this.startItems = [];
155
+ this.endItems = [];
156
+ this.midItems = [];
157
+ const startItems = [];
158
+ let startItemCount = 0;
159
+ const endItems = [];
160
+ let endStart = this.pages;
161
+ const midItems = [];
162
+ let midStart;
163
+ let midEnd;
164
+ let startEllipsis = false;
165
+ let endEllipsis = false;
166
+ if (this.pages <=
167
+ this.boundaryPageCount * 2 + this.adjacentPageCount * 2 + 3) {
168
+ this.startEllipsis = false;
169
+ this.endEllipsis = false;
170
+ for (let i = 1; i <= this.pages; i++) {
171
+ startItems.push(i);
172
+ }
173
+ this.startItems = startItems;
174
+ return;
175
+ }
176
+ startItemCount = this.boundaryPageCount === 0 ? 1 : this.boundaryPageCount;
177
+ endStart =
178
+ this.boundaryPageCount === 0
179
+ ? this.pages
180
+ : this.pages - this.boundaryPageCount + 1;
181
+ if (this.currentPage <=
182
+ this.adjacentPageCount + this.boundaryPageCount + 2) {
183
+ startEllipsis = false;
184
+ endEllipsis = true;
185
+ let numItems = 2 * this.adjacentPageCount + 1;
186
+ if (this.boundaryPageCount === 0) {
187
+ numItems--;
188
+ }
189
+ midStart = startItemCount + 1;
190
+ midEnd = midStart + numItems;
191
+ }
192
+ else {
193
+ startEllipsis = true;
194
+ if (this.currentPage >
195
+ this.pages - (this.adjacentPageCount + this.boundaryPageCount + 2)) {
196
+ let numItems = 2 * this.adjacentPageCount + 1;
197
+ if (this.boundaryPageCount === 0) {
198
+ numItems--;
199
+ }
200
+ midEnd =
201
+ this.boundaryPageCount === 0
202
+ ? this.pages - 1
203
+ : this.pages - this.boundaryPageCount;
204
+ midStart = midEnd - numItems;
205
+ }
206
+ else {
207
+ endEllipsis = true;
208
+ midStart = this.currentPage - this.adjacentPageCount;
209
+ midEnd = this.currentPage + this.adjacentPageCount;
210
+ }
211
+ }
212
+ //create array of start items
213
+ if (this.boundaryPageCount > 0 ||
214
+ (this.boundaryPageCount === 0 && startEllipsis === false)) {
215
+ for (let i = 1; i <= startItemCount; i++) {
216
+ startItems.push(i);
217
+ }
218
+ }
219
+ //create array of end items
220
+ if (this.boundaryPageCount > 0 ||
221
+ (this.boundaryPageCount === 0 && endEllipsis === false)) {
222
+ for (let i = endStart; i <= this.pages; i++) {
223
+ endItems.push(i);
224
+ }
225
+ }
226
+ //create array of mid items
227
+ for (let i = midStart; i <= midEnd; i++) {
228
+ midItems.push(i);
229
+ }
230
+ this.startEllipsis = startEllipsis;
231
+ this.endEllipsis = endEllipsis;
232
+ this.startItems = startItems;
233
+ this.endItems = endItems;
234
+ this.midItems = midItems;
235
+ }
236
+ componentWillLoad() {
237
+ this.watchPageChangeHandler();
238
+ this.watchBoundaryPageCountHandler();
239
+ this.watchAdjacentPageCountHandler();
240
+ helpers.removeDisabledFalse(this.disabled, this.el);
241
+ }
242
+ componentDidLoad() {
243
+ helpers.onComponentRequiredPropUndefined([{ prop: this.pages, propName: "pages" }], "Pagination");
244
+ }
245
+ /**
246
+ * Prevents focus lingering on a disabled element. If the currently
247
+ * focused element is one of the back buttons (and we reach the first page),
248
+ * move focus to "next" button, and vice versa.
249
+ * @param ev
250
+ */
251
+ icPageChangeHandler(ev) {
252
+ var _a, _b, _c;
253
+ const shadow = (_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.shadowRoot;
254
+ const activeEl = shadow ? shadow.activeElement : document.activeElement;
255
+ if (!shadow || !activeEl) {
256
+ return;
257
+ }
258
+ if (ev.detail.value === 1 &&
259
+ ["first-page-button", "previous-page-button"].some((id) => id === (activeEl === null || activeEl === void 0 ? void 0 : activeEl.id))) {
260
+ const btn = (_b = shadow.querySelector("#next-page-button").shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector("button");
261
+ // When navigating from firstPage->lastPage or vice versa, the to-be-selected element will be disabled. wait a tick so that it can receive focus.
262
+ setTimeout(() => btn === null || btn === void 0 ? void 0 : btn.focus(), 10);
263
+ }
264
+ else if (ev.detail.value === this.pages &&
265
+ ["last-page-button", "next-page-button"].some((id) => id === (activeEl === null || activeEl === void 0 ? void 0 : activeEl.id))) {
266
+ const btn = (_c = shadow.querySelector("#previous-page-button").shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector("button");
267
+ setTimeout(() => btn === null || btn === void 0 ? void 0 : btn.focus(), 10);
268
+ }
269
+ }
270
+ paginationItemClickHandler(ev) {
271
+ const page = ev.detail.page;
272
+ this.currentPage = page;
273
+ this.icPageChange.emit({ value: this.currentPage });
274
+ }
275
+ /**
276
+ * Sets the currently displayed page.
277
+ * @param {number} page The page number to set as the current page
278
+ */
279
+ async setCurrentPage(page) {
280
+ if (typeof page === "number" && page > 0 && page <= this.pages) {
281
+ this.currentPage = page;
282
+ }
283
+ else {
284
+ console.error("Current page must be a number greater than zero but less than or equal to the total number of pages");
285
+ }
286
+ }
287
+ render() {
288
+ const { type, currentPage, hideCurrentPage, disabled, hideFirstAndLastPageButton, label, theme, monochrome, } = this;
289
+ return (index.h(index.Host, { key: 'cefb3137892be2304c041ca32ca118268f8ccb07', class: {
290
+ [`ic-theme-${theme}`]: theme !== "inherit",
291
+ ["ic-pagination-monochrome"]: !!monochrome,
292
+ } }, type === "simple" && (index.h("nav", { key: '9a1d8230be41cb26b31bb8af066a32e9b64e0d89', class: {
293
+ ["disabled"]: !!disabled,
294
+ }, role: "navigation", "aria-label": this.accessibleLabel }, hideFirstAndLastPageButton ? null : this.firstButton(), this.previousButton(), index.h("ic-pagination-item", { key: '577b9b9894ce6ddc2cf02381729600e4284e8912', theme: this.theme, monochrome: this.monochrome, type: "simple-current", page: currentPage, label: label, class: { ["hide-current-page"]: !!hideCurrentPage }, disabled: disabled }), this.nextButton(), hideFirstAndLastPageButton ? null : this.lastButton())), type === "complex" && (index.h("nav", { key: '317d507ca76549e3c980ced7d01332504738a102', class: {
295
+ ["disabled"]: !!disabled,
296
+ }, role: "navigation", "aria-label": this.accessibleLabel }, hideFirstAndLastPageButton ? null : this.firstButton(), this.previousButton(), this.renderStartItems(), this.startEllipsis && this.renderStartEllipsis(), this.renderMiddleItems(), this.endEllipsis && this.renderEndEllipsis(), this.renderEndItems(), this.nextButton(), hideFirstAndLastPageButton ? null : this.lastButton())), type === "complex" && (index.h("span", { key: '6d3a5778f4704dd5ec1e74bf2cf236143c5f7e7c', class: "sr-only", "aria-live": "polite" }, "Page ", this.currentPage))));
297
+ }
298
+ get el() { return index.getElement(this); }
299
+ static get watchers() { return {
300
+ "adjacentPageCount": ["watchAdjacentPageCountHandler"],
301
+ "boundaryPageCount": ["watchBoundaryPageCountHandler"],
302
+ "disabled": ["watchDisabledHandler"],
303
+ "pages": ["watchNumberPagesHandler"],
304
+ "type": ["watchTypeHandler"],
305
+ "currentPage": ["watchPageChangeHandler"]
306
+ }; }
307
+ };
308
+ Pagination.style = IcPaginationStyle0;
309
+
310
+ const Expand = `<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
311
+ <path d="M7 9.5L12 14.5L17 9.5H7Z" fill="currentColor" />
312
+ </svg>
313
+ `;
314
+
315
+ const Clear = `<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
316
+ <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" />
317
+ </svg>
318
+ `;
319
+
320
+ 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}.aria-live-hidden-text{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}}";
321
+ const IcSelectStyle0 = icSelectCss;
322
+
323
+ var __rest = (undefined && undefined.__rest) || function (s, e) {
324
+ var t = {};
325
+ for (var p in s)
326
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
327
+ t[p] = s[p];
328
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
329
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
330
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
331
+ t[p[i]] = s[p[i]];
332
+ }
333
+ return t;
334
+ };
335
+ let inputIds$1 = 0;
336
+ const MUTABLE_ATTRIBUTES$1 = [...constants.IC_INHERITED_ARIA, "tabindex", "title"];
337
+ const Select = class {
338
+ constructor(hostRef) {
339
+ index.registerInstance(this, hostRef);
340
+ this.icBlur = index.createEvent(this, "icBlur", 7);
341
+ this.icChange = index.createEvent(this, "icChange", 7);
342
+ this.icClear = index.createEvent(this, "icClear", 7);
343
+ this.icClose = index.createEvent(this, "icClose", 7);
344
+ this.icFocus = index.createEvent(this, "icFocus", 7);
345
+ this.icInput = index.createEvent(this, "icInput", 7);
346
+ this.icOpen = index.createEvent(this, "icOpen", 7);
347
+ this.icOptionSelect = index.createEvent(this, "icOptionSelect", 7);
348
+ this.icOptionDeselect = index.createEvent(this, "icOptionDeselect", 7);
349
+ this.icRetryLoad = index.createEvent(this, "icRetryLoad", 7);
350
+ this.inputId = `ic-select-input-${inputIds$1++}`;
351
+ this.menuId = `${this.inputId}-menu`;
352
+ this.inheritedAttributes = {};
353
+ this.hostMutationObserver = null;
354
+ this.timeoutTimer = null;
355
+ this.hasTimedOut = false;
356
+ this.initialRender = true;
357
+ this.pressedCharacters = "";
358
+ this.hasError = false;
359
+ this.searchableSelectInputValue = "";
360
+ this.selectButtonAriaLiveText = "";
361
+ this.selectInputAriaLiveText = "";
362
+ /**
363
+ * If `true`, the disabled state will be set.
364
+ */
365
+ this.disabled = false;
366
+ /**
367
+ * If `true`, the built in filtering will be disabled for a searchable variant. For example, if options will already be filtered from external source.
368
+ */
369
+ this.disableAutoFiltering = false;
370
+ /**
371
+ * The text displayed when there are no options in the option list.
372
+ */
373
+ this.emptyOptionListText = "No results found";
374
+ /**
375
+ * If `true`, the select will fill the width of the container.
376
+ */
377
+ this.fullWidth = false;
378
+ /**
379
+ * The helper text that will be displayed for additional field guidance.
380
+ */
381
+ this.helperText = "";
382
+ /**
383
+ * If `true`, the label will be hidden and the required label value will be applied as an aria-label.
384
+ */
385
+ this.hideLabel = false;
386
+ /**
387
+ * If `true`, descriptions of options will be included when filtering options in a searchable select. Only applies to built in filtering.
388
+ */
389
+ this.includeDescriptionsInSearch = false;
390
+ /**
391
+ * If `true`, group titles of grouped options will be included when filtering options in a searchable select. Only applies to built in filtering.
392
+ */
393
+ this.includeGroupTitlesInSearch = false;
394
+ /**
395
+ * The message displayed when external loading times out.
396
+ */
397
+ this.loadingErrorLabel = "Loading Error";
398
+ /**
399
+ * The message displayed whilst the options are being loaded externally.
400
+ */
401
+ this.loadingLabel = "Loading...";
402
+ /**
403
+ * If `true`, multiple options can be selected.
404
+ */
405
+ this.multiple = false;
406
+ /**
407
+ * The name of the control, which is submitted with the form data.
408
+ */
409
+ this.name = this.inputId;
410
+ /**
411
+ * The placeholder value to be displayed.
412
+ */
413
+ this.placeholder = "Select an option";
414
+ /**
415
+ * If `true`, the readonly state will be set.
416
+ */
417
+ this.readonly = false;
418
+ /**
419
+ * If `true`, the select will require a value.
420
+ */
421
+ this.required = false;
422
+ /**
423
+ * 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.
424
+ */
425
+ this.searchable = false;
426
+ /**
427
+ * Whether the search string of the searchable select should match the start of or anywhere in the options. Only applies to built in filtering.
428
+ */
429
+ this.searchMatchPosition = "anywhere";
430
+ /**
431
+ * If `true`, the icOptionSelect event will be fired on enter instead of ArrowUp and ArrowDown on the single select.
432
+ */
433
+ this.selectOnEnter = false;
434
+ /**
435
+ * If `true`, a button which clears the select input when clicked will be displayed. The button will always appear on the searchable select.
436
+ */
437
+ this.showClearButton = false;
438
+ /**
439
+ * The size of the select.
440
+ */
441
+ this.size = "medium";
442
+ /**
443
+ * 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.
444
+ */
445
+ this.theme = "inherit";
446
+ /**
447
+ * The value of the `aria-live` attribute on the validation message.
448
+ */
449
+ this.validationAriaLive = "polite";
450
+ /**
451
+ * The validation status - e.g. 'error' | 'warning' | 'success'.
452
+ */
453
+ this.validationStatus = "";
454
+ /**
455
+ * The text to display as the validation message.
456
+ */
457
+ this.validationText = "";
458
+ /**
459
+ * If `true` and on a mobile or tablet device, the native select element will be used instead of the custom select component for better usability.
460
+ */
461
+ this.useNativeSelectOnMobile = true;
462
+ /**
463
+ * If `true`, the loading state will be triggered when fetching options asynchronously.
464
+ */
465
+ this.loading = false;
466
+ /**
467
+ * The possible selection options.
468
+ */
469
+ this.options = [];
470
+ this.flatOptions = [];
471
+ /**
472
+ * The amount of time, in milliseconds, to wait to trigger the `icInput` event after each keystroke.
473
+ */
474
+ this.debounce = 0;
475
+ this.currDebounce = this.debounce;
476
+ /**
477
+ * The value of the select, reflected by the value of the currently selected option.
478
+ * For the searchable variant, the value is also reflected by the user input.
479
+ * For the multi-select variant, the value must be an array of option values.
480
+ */
481
+ this.value = null;
482
+ this.initialValue = this.value;
483
+ this.open = false;
484
+ this.getValidatedValue = (value) => {
485
+ const validValues = this.flatOptions.map((opt) => opt.value);
486
+ if (validValues.length === 0)
487
+ return value;
488
+ if (this.multiple) {
489
+ if (!value)
490
+ return null;
491
+ const arr = Array.isArray(value) ? value : [value]; // Ensure value is an array
492
+ const filtered = validValues.filter((v) => arr.includes(v)); // Keep only valid values
493
+ return filtered.length > 0 ? filtered : null;
494
+ }
495
+ else {
496
+ return validValues.includes(value) ? value : null;
497
+ }
498
+ };
499
+ this.getFilteredOptions = (searchString, searchMatchPosition, includeDescriptionsInSearch, includeGroupTitlesInSearch) => {
500
+ const search = searchString.toLowerCase();
501
+ const match = (text, method) => method === "anywhere" ? text.includes(search) : text.startsWith(search);
502
+ return this.unflattenOptions(this.flatOptions.filter((option) => {
503
+ var _a, _b, _c, _d;
504
+ const label = option.label.toLowerCase();
505
+ const group = (_b = (_a = option.group) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== null && _b !== void 0 ? _b : "";
506
+ const description = (_d = (_c = option.description) === null || _c === void 0 ? void 0 : _c.toLowerCase()) !== null && _d !== void 0 ? _d : "";
507
+ return (match(label, searchMatchPosition) ||
508
+ (includeDescriptionsInSearch &&
509
+ match(description, searchMatchPosition)) ||
510
+ (includeGroupTitlesInSearch && match(group, searchMatchPosition)));
511
+ }));
512
+ };
513
+ this.getOptions = () => {
514
+ const options = this.searchable &&
515
+ !this.disableAutoFiltering &&
516
+ this.searchableSelectInputValue
517
+ ? this.getFilteredOptions(this.searchableSelectInputValue, this.searchMatchPosition, this.includeDescriptionsInSearch, this.includeGroupTitlesInSearch)
518
+ : this.unflattenOptions(this.flatOptions);
519
+ if (this.hasTimedOut)
520
+ return [{ label: this.loadingErrorLabel, value: "", timedOut: true }];
521
+ if (this.loading)
522
+ return [{ label: this.loadingLabel, value: "", loading: true }];
523
+ if (options.length > 0)
524
+ return options;
525
+ return [{ label: this.emptyOptionListText, value: "" }];
526
+ };
527
+ this.getFlatOptions = (options) => options.flatMap((item) => ("children" in item && item.children
528
+ ? [...item.children.map((child) => (Object.assign({ group: item.label }, child)))]
529
+ : [item]));
530
+ this.unflattenOptions = (flatOptions) => {
531
+ const groupMap = new Map();
532
+ const result = [];
533
+ for (const option of flatOptions) {
534
+ if (option.group) {
535
+ let group = groupMap.get(option.group);
536
+ if (!group) {
537
+ group = { label: option.group, children: [] };
538
+ groupMap.set(option.group, group);
539
+ result.push(group);
540
+ }
541
+ const rest = __rest(option, ["group"]);
542
+ group.children.push(rest);
543
+ }
544
+ else {
545
+ result.push(option);
546
+ }
547
+ }
548
+ return result;
549
+ };
550
+ this.getLabelFromValue = (value) => { var _a, _b; return (_b = (_a = this.flatOptions.find((option) => option.value === value)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : ""; };
551
+ // Construct the string that will be shown in the select input or button
552
+ this.getLabelString = () => {
553
+ if (Array.isArray(this.value)) {
554
+ return this.value.map(this.getLabelFromValue).filter(Boolean).join(", ");
555
+ }
556
+ return (this.getLabelFromValue(this.value) ||
557
+ (this.searchable ? "" : this.placeholder));
558
+ };
559
+ this.handleClick = (event) => {
560
+ var _a;
561
+ if (event.detail !== 0) {
562
+ (_a = this.menu) === null || _a === void 0 ? void 0 : _a.handleClickOpen();
563
+ }
564
+ };
565
+ this.handleExpandIconMouseDown = (event) => {
566
+ var _a;
567
+ if (!this.disabled) {
568
+ event.preventDefault();
569
+ (_a = this.searchableSelectElement) === null || _a === void 0 ? void 0 : _a.focus();
570
+ this.handleClick(event);
571
+ }
572
+ };
573
+ this.handleBlur = ({ relatedTarget }) => {
574
+ var _a, _b;
575
+ const target = relatedTarget;
576
+ if (this.el.contains(target) ||
577
+ ((_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.contains(target)) ||
578
+ ((_b = this.menu) === null || _b === void 0 ? void 0 : _b.contains(target)) ||
579
+ target === this.clearButton) {
580
+ return;
581
+ }
582
+ this.open = false;
583
+ this.handleFocusIndicatorDisplay();
584
+ if (this.searchable) {
585
+ this.searchableSelectInputValue = "";
586
+ }
587
+ this.icBlur.emit();
588
+ };
589
+ this.handleTimeoutBlur = (event) => {
590
+ this.handleBlur(event.detail.ev);
591
+ };
592
+ this.handleFocus = () => {
593
+ this.icFocus.emit();
594
+ };
595
+ this.handleClear = () => {
596
+ this.clearTimer();
597
+ this.loading = false;
598
+ this.value = null;
599
+ this.searchableSelectInputValue = "";
600
+ this.icClear.emit();
601
+ this.setFocus();
602
+ };
603
+ this.setTextColor = () => {
604
+ if (this.nativeSelectElement) {
605
+ this.nativeSelectElement.className =
606
+ this.nativeSelectElement.selectedIndex === 0
607
+ ? "placeholder"
608
+ : "select-option-selected";
609
+ }
610
+ };
611
+ this.handleNativeSelectChange = () => {
612
+ if (this.nativeSelectElement) {
613
+ this.icOptionSelect.emit({ value: this.nativeSelectElement.value });
614
+ this.icChange.emit({ value: this.nativeSelectElement.value });
615
+ }
616
+ this.setTextColor();
617
+ };
618
+ this.handleFocusIndicatorDisplay = () => {
619
+ var _a;
620
+ const focusIndicator = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".focus-indicator");
621
+ if (focusIndicator) {
622
+ if (this.open) {
623
+ focusIndicator.classList.add("focus-indicator-enabled");
624
+ }
625
+ else {
626
+ focusIndicator.classList.remove("focus-indicator-enabled");
627
+ }
628
+ }
629
+ };
630
+ this.handleKeyDown = (event) => {
631
+ var _a, _b;
632
+ if (!(event.key === " " && this.pressedCharacters.length > 0)) {
633
+ if (this.open) {
634
+ (_a = this.menu) === null || _a === void 0 ? void 0 : _a.handleMenuKeyDown(event);
635
+ }
636
+ else {
637
+ (_b = this.menu) === null || _b === void 0 ? void 0 : _b.handleKeyboardOpen(event);
638
+ }
639
+ }
640
+ if (!this.multiple &&
641
+ !this.searchable &&
642
+ !this.selectOnEnter &&
643
+ /^[a-zA-Z0-9 ]$/.test(event.key)) {
644
+ this.handleCharacterKeyDown(event.key);
645
+ }
646
+ };
647
+ this.handleCharacterKeyDown = (key) => {
648
+ // Only close menu when space is pressed if not being used alongside character keys to quickly select options
649
+ if (this.open && key === " " && this.pressedCharacters.length === 0) {
650
+ this.open = false;
651
+ }
652
+ if (key.length !== 1 || this.searchable) {
653
+ this.pressedCharacters = "";
654
+ return;
655
+ }
656
+ window.clearTimeout(this.characterKeyPressTimer);
657
+ this.characterKeyPressTimer = window.setTimeout(() => (this.pressedCharacters = ""), 1000);
658
+ if (key !== " " || !!this.pressedCharacters) {
659
+ this.pressedCharacters += key;
660
+ const filteredOptions = this.getFilteredOptions(this.pressedCharacters, "start", false, false);
661
+ if (filteredOptions.length > 0) {
662
+ const firstOption = filteredOptions[0];
663
+ if ("children" in firstOption) {
664
+ this.value = firstOption.children[0].value;
665
+ }
666
+ else {
667
+ this.value = firstOption.value;
668
+ }
669
+ }
670
+ }
671
+ };
672
+ this.handleNativeSelectKeyDown = (event) => {
673
+ this.handleKeyDown(event);
674
+ };
675
+ this.handleSelectChange = (event) => {
676
+ const { value } = event.detail;
677
+ if (!value || this.getLabelFromValue(value) === this.emptyOptionListText) {
678
+ this.value = null;
679
+ return;
680
+ }
681
+ if (this.multiple) {
682
+ let valueArray = Array.isArray(this.value) ? [...this.value] : [];
683
+ const index = valueArray.indexOf(value);
684
+ if (index > -1) {
685
+ valueArray.splice(index, 1);
686
+ this.icOptionDeselect.emit({ value });
687
+ }
688
+ else {
689
+ this.icOptionSelect.emit({ value });
690
+ valueArray.push(value);
691
+ valueArray = this.getValidatedValue(valueArray);
692
+ }
693
+ this.value = valueArray.length ? valueArray : null;
694
+ }
695
+ else {
696
+ this.icOptionSelect.emit({ value });
697
+ this.value = value;
698
+ if (this.searchable)
699
+ this.searchableSelectInputValue = "";
700
+ }
701
+ };
702
+ this.handleSelectAllChange = ({ detail, }) => {
703
+ const allSelectableValues = this.flatOptions
704
+ .filter((option) => !option.disabled)
705
+ .map((option) => option.value);
706
+ if (detail.select) {
707
+ allSelectableValues
708
+ .filter((value) => { var _a; return !((_a = this.value) !== null && _a !== void 0 ? _a : []).includes(value); })
709
+ .forEach((value) => {
710
+ this.icOptionSelect.emit({ value });
711
+ });
712
+ this.value = allSelectableValues;
713
+ }
714
+ else {
715
+ this.value.forEach((value) => this.icOptionDeselect.emit({ value }));
716
+ this.value = null;
717
+ }
718
+ };
719
+ this.handleFormReset = () => {
720
+ this.value = this.initialValue;
721
+ this.searchableSelectInputValue = "";
722
+ if (this.searchable) {
723
+ this.hiddenInputValue = this.initialValue;
724
+ }
725
+ };
726
+ this.handleRetry = () => {
727
+ this.clearTimer();
728
+ this.hasTimedOut = false;
729
+ this.hasError = false;
730
+ this.loading = true;
731
+ this.icRetryLoad.emit({
732
+ value: this.searchable
733
+ ? this.searchableSelectInputValue
734
+ : this.hiddenInputValue,
735
+ });
736
+ this.setFocus();
737
+ };
738
+ this.handleSearchableSelectInput = (event) => {
739
+ var _a;
740
+ this.updateSearchableSelectResultAriaLive();
741
+ if (!this.multiple) {
742
+ this.value = null;
743
+ }
744
+ this.searchableSelectInputValue =
745
+ (_a = event.target.value) !== null && _a !== void 0 ? _a : "";
746
+ this.open = true;
747
+ clearTimeout(this.debounceIcInput);
748
+ this.debounceIcInput = window.setTimeout(() => this.icInput.emit({ value: this.searchableSelectInputValue }), this.currDebounce);
749
+ };
750
+ this.hostMutationCallback = (mutationList) => {
751
+ let forceComponentUpdate = false;
752
+ mutationList.forEach(({ attributeName, type, addedNodes, removedNodes }) => {
753
+ if (attributeName) {
754
+ const attribute = this.el.getAttribute(attributeName);
755
+ if (attribute && MUTABLE_ATTRIBUTES$1.includes(attributeName)) {
756
+ this.inheritedAttributes[attributeName] = attribute;
757
+ forceComponentUpdate = true;
758
+ }
759
+ }
760
+ else if (type === "childList") {
761
+ forceComponentUpdate = helpers.checkSlotInChildMutations(addedNodes, removedNodes, "icon");
762
+ }
763
+ });
764
+ if (forceComponentUpdate) {
765
+ index.forceUpdate(this);
766
+ }
767
+ };
768
+ this.updateSelectButtonAriaLive = () => {
769
+ const value_label = this.getLabelFromValue(this.value);
770
+ this.selectButtonAriaLiveText = this.multiple
771
+ ? `${this.value ? this.value.length : 0} of ${this.flatOptions.length} selected`
772
+ : this.value
773
+ ? value_label !== null && value_label !== void 0 ? value_label : `${value_label} selected`
774
+ : "";
775
+ };
776
+ this.updateSearchableSelectResultAriaLive = () => {
777
+ var _a, _b;
778
+ this.selectInputAriaLiveText =
779
+ ((_b = (_a = this.getOptions()) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.label) == this.emptyOptionListText
780
+ ? this.emptyOptionListText
781
+ : "";
782
+ };
783
+ this.updateAriaActiveDescendant = (event) => {
784
+ this.ariaActiveDescendant = event.detail.optionId;
785
+ };
786
+ this.handleMenuChange = (event) => {
787
+ this.open = event.detail.open;
788
+ this.pressedCharacters = "";
789
+ };
790
+ this.getDeduplicatedOptions = (flatOptions) => {
791
+ const seen = new Set();
792
+ return flatOptions.filter((option) => {
793
+ if (option.value && seen.has(option.value)) {
794
+ console.warn(`ic-select with label ${this.label} was populated with duplicate option (value: ${option.value}) which has been removed.`);
795
+ return false;
796
+ }
797
+ if (option.value)
798
+ seen.add(option.value);
799
+ return true;
800
+ });
801
+ };
802
+ this.renderNativeOption = (option) => (index.h("option", { value: option.value, disabled: option.disabled, selected: option.value === this.value }, option.label));
803
+ }
804
+ watchDisabledHandler() {
805
+ helpers.removeDisabledFalse(this.disabled, this.el);
806
+ }
807
+ loadingHandler(newValue) {
808
+ this.hasTimedOut = false;
809
+ if (newValue) {
810
+ this.hasError = false;
811
+ if (this.timeout) {
812
+ if (this.timeoutTimer) {
813
+ this.clearTimer();
814
+ }
815
+ this.timeoutTimer = window.setTimeout(() => {
816
+ this.loading = false;
817
+ this.hasTimedOut = true;
818
+ index.forceUpdate(this);
819
+ }, this.timeout);
820
+ }
821
+ }
822
+ else {
823
+ if (this.timeoutTimer) {
824
+ this.clearTimer();
825
+ }
826
+ }
827
+ }
828
+ clearTimer() {
829
+ if (this.timeoutTimer) {
830
+ clearTimeout(this.timeoutTimer);
831
+ this.timeoutTimer = null;
832
+ }
833
+ }
834
+ optionsChangedHandler() {
835
+ const flat = this.getFlatOptions(this.options)
836
+ .filter((option) => option.value != null || option.label != null) // filter out options missing both value and label
837
+ .map((option) => {
838
+ var _a, _b;
839
+ return (Object.assign(Object.assign({}, option), { value: (_a = option.value) !== null && _a !== void 0 ? _a : option.label, label: (_b = option.label) !== null && _b !== void 0 ? _b : option.value }));
840
+ });
841
+ this.flatOptions = this.getDeduplicatedOptions(flat);
842
+ if (!this.initialRender)
843
+ this.loading = false;
844
+ this.clearTimer();
845
+ this.updateSelectButtonAriaLive();
846
+ }
847
+ debounceChangedHandler(newValue) {
848
+ if (this.currDebounce !== newValue) {
849
+ this.currDebounce = newValue;
850
+ }
851
+ }
852
+ valueChangedHandler(newValue) {
853
+ const validated = this.getValidatedValue(newValue);
854
+ const isEqual = Array.isArray(validated) && Array.isArray(this.value)
855
+ ? validated.length === this.value.length &&
856
+ validated.every((v, i) => v === this.value[i])
857
+ : validated === this.value;
858
+ if (!isEqual) {
859
+ this.value = validated;
860
+ return;
861
+ }
862
+ this.updateSelectButtonAriaLive();
863
+ this.icChange.emit({ value: this.value });
864
+ }
865
+ openChangedHandler() {
866
+ this.open ? this.icOpen.emit() : this.icClose.emit();
867
+ if (!this.open) {
868
+ this.ariaActiveDescendant = undefined;
869
+ }
870
+ this.handleFocusIndicatorDisplay();
871
+ }
872
+ /**
873
+ * Sets focus on the select component.
874
+ */
875
+ async setFocus() {
876
+ if (this.nativeSelectElement) {
877
+ this.nativeSelectElement.focus();
878
+ }
879
+ else if (this.selectElement) {
880
+ this.selectElement.focus();
881
+ }
882
+ else if (this.searchableSelectElement) {
883
+ this.searchableSelectElement.focus();
884
+ }
885
+ }
886
+ componentDidRender() {
887
+ if (this.nativeSelectElement && !this.disabled) {
888
+ this.setTextColor();
889
+ }
890
+ this.initialRender = false;
891
+ }
892
+ disconnectedCallback() {
893
+ var _a;
894
+ helpers.removeFormResetListener(this.el, this.handleFormReset);
895
+ (_a = this.hostMutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
896
+ this.clearTimer();
897
+ }
898
+ componentDidLoad() {
899
+ index.forceUpdate(this);
900
+ this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);
901
+ this.hostMutationObserver.observe(this.el, {
902
+ attributes: true,
903
+ childList: true,
904
+ });
905
+ }
906
+ componentWillLoad() {
907
+ this.optionsChangedHandler();
908
+ this.value = this.getValidatedValue(this.value);
909
+ this.initialValue = this.value;
910
+ if (this.loading)
911
+ this.loadingHandler(true);
912
+ helpers.addFormResetListener(this.el, this.handleFormReset);
913
+ }
914
+ render() {
915
+ const { disabled, searchable, size, fullWidth, theme, readonly, hideLabel, inputId, label, helperText, required, value, options, menuId, multiple, validationStatus, open, showClearButton, selectOnEnter, loading, searchableSelectInputValue, validationText, validationAriaLive, form, ariaActiveDescendant, placeholder, name, inheritedAttributes, selectInputAriaLiveText, selectButtonAriaLiveText, } = this;
916
+ const hasValue = !!value;
917
+ const hasInput = !!searchableSelectInputValue;
918
+ const isClearable = !disabled &&
919
+ ((searchable && (hasInput || hasValue)) ||
920
+ (!searchable && hasValue && !loading && showClearButton));
921
+ const showValidation = !!validationStatus && !disabled;
922
+ const invalid = validationStatus === helpers.IcInformationStatus.Error;
923
+ const describedBy = helpers.getInputDescribedByText(this.el, inputId, helperText !== "", showValidation).trim();
924
+ const menuOptions = this.getOptions();
925
+ const noOptions = disabled ||
926
+ (menuOptions.length === 1 &&
927
+ (menuOptions[0].label === this.emptyOptionListText ||
928
+ "loading" in menuOptions[0] ||
929
+ "timedOut" in menuOptions[0]));
930
+ helpers.renderHiddenInput(this.el, value, name || inputId, disabled);
931
+ const ClearButton = () => (index.h("ic-button", { key: '983b6bfae4f3a9d439f23fe022652605d91f0a1e', ref: (el) => (this.clearButton = el), id: "clear-button", "aria-label": this.searchable ? "Clear input" : "Clear selection", class: "clear-button", innerHTML: Clear, onClick: this.handleClear, onBlur: this.handleBlur, size: size, variant: "icon-tertiary" }));
932
+ const NativeSelect = () => (index.h("select", Object.assign({ key: '2fb628398e722cff8c3759229af969600e553485', ref: (el) => (this.nativeSelectElement = el), disabled: disabled, onChange: this.handleNativeSelectChange, required: required, id: inputId, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid ? "true" : "false", onBlur: this.handleBlur, onFocus: this.handleFocus, onKeyDown: this.handleNativeSelectKeyDown, form: form }, inheritedAttributes), index.h("option", { key: '5fb827fef7ab7c597a2361ac4d019f9e07adb55f', value: "", selected: true, disabled: !showClearButton }, placeholder), options.map((option) => "children" in option ? (index.h("optgroup", { label: option.label }, option.children.map((child) => this.renderNativeOption(child)))) : (this.renderNativeOption(option)))));
933
+ const SelectButton = () => (index.h("div", { key: '47ad04d6da391fcb88a8b6a6a841dec93f53cd74', class: "select-container" }, index.h("button", { key: '7ee23a4f16c4aca4b287391ac5bf5f6ee4441b07', class: "select-input", role: "combobox", ref: (el) => (this.selectElement = el), id: inputId, "aria-label": `${label}, ${(multiple && value
934
+ ? `${value.length} of ${this.flatOptions.length} selected, ${this.getLabelString()}`
935
+ : this.getLabelString()) || placeholder}`, onClick: this.handleClick, "aria-describedby": describedBy, "aria-invalid": invalid ? "true" : "false", "aria-haspopup": "listbox", "aria-expanded": `${open}`, "aria-controls": menuId, "aria-required": `${required}`, disabled: disabled, onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur, "aria-activedescendant": ariaActiveDescendant }, index.h("ic-typography", { key: '438cce7c257e37d0a0aef5247d28d31586725a1e', variant: "body", class: {
936
+ "value-text": true,
937
+ "with-clear-button": !!isClearable,
938
+ placeholder: !value,
939
+ } }, this.getLabelString()), index.h("div", { key: '8926d05851401339717c159651b802fb41e53096', class: "select-input-end" }, isClearable && index.h("div", { key: '5c94e4ba98ad972001890d639b00c82887e0fb5d', class: "divider" }), index.h("span", { key: '23569f5196d66f2b4a834d44006f6a05446598cd', class: {
940
+ "expand-icon": true,
941
+ "expand-icon-open": open,
942
+ }, innerHTML: Expand, "aria-hidden": "true" }))), isClearable && index.h(ClearButton, { key: 'e4165cb01b0bdc1681e3d9490007182b934f40ea' }), index.h("div", { key: '6208229358ee8ba7a007a08f5e551d494015a347', "aria-live": "polite", "aria-atomic": "true", class: "aria-live-hidden-text" }, selectButtonAriaLiveText)));
943
+ const SelectInput = () => (index.h("div", { key: 'af39791c29e8d792c16fed1fffe08db8f621fcac', class: "searchable-select-container" }, index.h("input", { key: '366bd3c57ad76f130d73ab2390c557b9e8fe98c8', class: {
944
+ "value-text": true,
945
+ "select-input": true,
946
+ "with-clear-button": !!searchableSelectInputValue,
947
+ }, role: "combobox", autocomplete: "off", "aria-label": label, "aria-describedby": describedBy, "aria-activedescendant": ariaActiveDescendant, "aria-autocomplete": "list", "aria-expanded": `${open}`, "aria-invalid": invalid ? "true" : "false", "aria-required": `${required}`, "aria-controls": menuId, ref: (el) => (this.searchableSelectElement = el), id: inputId, value: multiple
948
+ ? ""
949
+ : value
950
+ ? this.getLabelString()
951
+ : searchableSelectInputValue || undefined, disabled: disabled, placeholder: placeholder, onInput: this.handleSearchableSelectInput, onClick: this.handleClick, onBlur: this.handleBlur, onFocus: this.handleFocus, onKeyDown: this.handleKeyDown, form: form }), isClearable && (index.h("div", { key: 'e9260358a6c8ac3683d1de3015064665d32d907f', class: "clear-button-container" }, index.h(ClearButton, { key: '0c05ed1cf92ac8fde61ba55192a8a1511338239e' }), index.h("div", { key: 'e44933edcc7c79459f1ecd551eec43a86fd53b11', class: "divider" }))), index.h("span", { key: '36e7fe34e7d438caab2967fae27bfe4fb2e49041', onMouseDown: this.handleExpandIconMouseDown, class: {
952
+ "expand-icon": true,
953
+ "expand-icon-open": open,
954
+ }, innerHTML: Expand, "aria-hidden": "true" }), index.h("div", { key: 'c3e06f04e62b273b8a7a6f9df0aa27bf71060ed4', "aria-live": "polite", role: "status", class: "aria-live-hidden-text" }, selectInputAriaLiveText)));
955
+ const ReadOnly = () => (index.h("ic-typography", { key: '979d342f453fdb2ed79a6cf231d9a40275662a44' }, index.h("p", { key: '221530958da8731657b5ad4d455041dc3934718f' }, this.getLabelString() === placeholder ? "" : this.getLabelString())));
956
+ return (index.h(index.Host, { key: 'efbdccb0f0b7e86142cd530d52a86f7ce95d6c1c', class: {
957
+ "ic-select-disabled": disabled,
958
+ "ic-select-searchable": searchable,
959
+ [`ic-select-${size}`]: size !== "medium",
960
+ "ic-select-full-width": fullWidth,
961
+ [`ic-theme-${theme}`]: theme !== "inherit",
962
+ } }, index.h("ic-input-container", { key: '48fe83c1c79ec578f94a2d8af4b8b452570a421f', readonly: readonly }, !hideLabel && (index.h("ic-input-label", { key: '8410dabe6d0d62c7c1459991631807cfa6546735', for: inputId, label: label, helperText: helperText, required: required, disabled: disabled, readonly: readonly }, index.h("slot", { key: '77ce0ab9ca879ecf515de633ff27ba8e2320cf2c', name: "helper-text", slot: "helper-text" }))), index.h("ic-input-component-container", { key: '699375a82eb49f5eb351cf95b4822b4cad7bcc1a', ref: (el) => (this.anchorEl = el), class: { "menu-open": open }, size: size, fullWidth: fullWidth, disabled: disabled, readonly: readonly, validationStatus: validationStatus }, helpers.isSlotUsed(this.el, "icon") &&
963
+ !disabled &&
964
+ (!readonly || !!value) && (index.h("span", { key: 'fcfec6b75fdb0eb41950460af3c6d7dc5ad43657', slot: "left-icon", class: {
965
+ readonly,
966
+ "has-value": !!value,
967
+ } }, index.h("slot", { key: '08d321011ba86b6d50bf3c8c85bf16595c8df657', name: "icon" }))), helpers.isMobileOrTablet() && this.useNativeSelectOnMobile && !multiple ? (index.h(NativeSelect, null)) : readonly ? (index.h(ReadOnly, null)) : !searchable ? (index.h(SelectButton, null)) : (index.h(SelectInput, null))), !(helpers.isMobileOrTablet() &&
968
+ this.useNativeSelectOnMobile &&
969
+ !multiple) && (index.h("ic-menu", { key: '3fc0ee9172a93e744174e2f2b7a16c4f327a82c9', ref: (el) => (this.menu = el), class: { "no-results": noOptions }, inputEl: searchable ? this.searchableSelectElement : this.selectElement, allowMenuFocus: false, inputLabel: label, anchorEl: this.anchorEl, size: size, menuId: menuId, open: open, options: this.getOptions(), value: multiple ? value : value, fullWidth: fullWidth, selectOnEnter: selectOnEnter, onMenuStateChange: this.handleMenuChange, onMenuOptionSelect: this.handleSelectChange, onMenuOptionSelectAll: this.handleSelectAllChange, onTimeoutBlur: this.handleTimeoutBlur, onMenuOptionId: this.updateAriaActiveDescendant, onClick: this.setFocus, parentEl: this.el, activationType: searchable || multiple || selectOnEnter ? "manual" : "automatic", onRetryButtonClicked: this.handleRetry, closeOnSelect: !multiple, multiSelect: multiple, searchableSelect: searchable })), index.h("ic-input-validation", { key: '6b8bd66f22d67776d418e0aac1b41d2f03f3c9cd', class: {
970
+ "menu-open": open,
971
+ }, ariaLiveMode: validationAriaLive, status: showValidation ? validationStatus : "", message: showValidation ? validationText : "", for: inputId }))));
972
+ }
973
+ static get delegatesFocus() { return true; }
974
+ get el() { return index.getElement(this); }
975
+ static get watchers() { return {
976
+ "disabled": ["watchDisabledHandler"],
977
+ "loading": ["loadingHandler"],
978
+ "options": ["optionsChangedHandler"],
979
+ "debounce": ["debounceChangedHandler"],
980
+ "value": ["valueChangedHandler"],
981
+ "open": ["openChangedHandler"]
982
+ }; }
983
+ };
984
+ Select.style = IcSelectStyle0;
985
+
986
+ const icTextFieldCss = "/*! 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;--ic-input-label-helpertext-padding:var(--ic-space-xs);--border-color:var(--ic-text-field-border-neutral);--border-color-hover:var(--ic-text-field-border-neutral-hover);--border-color-pressed:var(--ic-text-field-border-neutral-pressed);--border-color-disabled:var(--ic-text-field-border-disabled);--border-color-error:var(--ic-text-field-border-error);--border-color-error-hover:var(--ic-text-field-border-error-hover);--border-color-error-pressed:var(--ic-text-field-border-error-pressed);--border-color-success:var(--ic-text-field-border-success);--border-color-success-hover:var(--ic-text-field-border-success-hover);--border-color-success-pressed:var(--ic-text-field-border-success-pressed);--border-color-warning:var(--ic-text-field-border-warning);--border-color-warning-hover:var(--ic-text-field-border-warning-hover);--border-color-warning-pressed:var(--ic-text-field-border-warning-pressed);--ic-input-label-text-color:var(--ic-text-field-label);--ic-input-label-helper-text-color:var(--ic-text-field-subtitle);--ic-input-validation-status-text-color:var(--ic-text-field-state-text);--ic-input-validation-error:var(--ic-text-field-state-icon-error);--ic-input-validation-warning-icon-color:var(\n --ic-text-field-state-icon-warning\n );--ic-input-validation-success-icon-color:var(\n --ic-text-field-state-icon-success\n );--ic-input-component-container-success-icon-inline-color:var(\n --ic-text-field-state-icon-success\n )}:host(.ic-text-field-disabled){--ic-input-label-text-color:var(--ic-text-field-label-disabled);--ic-input-label-helper-text-color:var(--ic-text-field-subtitle-disabled);--text-field-placeholder-color:var(\n --ic-text-field-text-area-placeholder-text-disabled\n )}:host(.ic-text-field-full-width){width:100%}::-moz-placeholder{color:var(\n --text-field-placeholder-color,\n var(--ic-text-field-placeholder-text)\n );opacity:1}::placeholder{color:var(\n --text-field-placeholder-color,\n var(--ic-text-field-placeholder-text)\n );opacity:1}input,textarea{border:0;border-radius:var(--ic-border-radius);color:var(--text-field-text-color, var(--ic-text-field-text));background-color:var(--input-bg-color, var(--ic-text-field-background));line-height:1.5rem;letter-spacing:0.005rem;width:100%;padding-right:var(--ic-space-xs);padding-left:var(--ic-space-xs);caret-color:var(\n --text-field-typing-cursor,\n var(--ic-text-field-typing-cursor)\n )}textarea{min-height:var(--ic-space-lg);resize:vertical;padding-top:0.375rem}input:focus,textarea:focus{border:0;outline:0}input:disabled,textarea:disabled{color:var(\n --text-field-disabled-text-color,\n var(--ic-text-field-text-disabled)\n )}input.readonly,textarea.readonly{color:var(--ic-text-field-read-only-input-text-internal);background:transparent}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=\"number\"]{-moz-appearance:textfield}textarea.no-resize{resize:none}.char-count-text{--ic-typography-color:var(--ic-text-field-character-limit);padding-right:var(--ic-space-xxxs)}:host(.ic-text-field-disabled) .char-count-text{--ic-typography-color:var(--ic-text-field-character-limit-disabled)}.no-left-pad{padding-left:0}::slotted([slot=\"icon\"]){fill:var(--ic-text-field-text-disabled)}.has-value ::slotted([slot=\"icon\"]){fill:var(--ic-text-field-input-internal-icon)}.char-count{margin-right:calc(-1 * var(--ic-space-xxxs))}.remaining-char-count-desc{position:absolute;left:-9999px}.show-validation{margin-top:var(--ic-space-xs)}input[type=\"search\"]::-webkit-search-cancel-button,input[type=\"search\"]::-webkit-search-decoration,input[type=\"search\"]::-webkit-search-results-button,input[type=\"search\"]::-webkit-search-results-decoration{display:none}input[type=\"search\"].truncate-value{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@media (forced-colors: active){input.readonly,textarea.readonly{color:canvastext}.has-value ::slotted([slot=\"icon\"]){fill:currentcolor}}";
987
+ const IcTextFieldStyle0 = icTextFieldCss;
988
+
989
+ let inputIds = 0;
990
+ const MUTABLE_ATTRIBUTES = [...constants.IC_INHERITED_ARIA, "title"];
991
+ const TextField = class {
992
+ constructor(hostRef) {
993
+ index.registerInstance(this, hostRef);
994
+ this.getValidationText = index.createEvent(this, "getValidationText", 7);
995
+ this.icBlur = index.createEvent(this, "icBlur", 7);
996
+ this.icChange = index.createEvent(this, "icChange", 7);
997
+ this.icFocus = index.createEvent(this, "icFocus", 7);
998
+ this.icInput = index.createEvent(this, "icInput", 7);
999
+ this.icKeydown = index.createEvent(this, "icKeydown", 7);
1000
+ this.icScroll = index.createEvent(this, "icScroll", 7);
1001
+ this.inheritedAttributes = {};
1002
+ this.hostMutationObserver = null;
1003
+ this.numChars = 0;
1004
+ this.maxCharactersReached = false;
1005
+ this.maxCharactersWarning = false;
1006
+ this.minCharactersUnattained = false;
1007
+ this.maxValueExceeded = false;
1008
+ this.minValueUnattained = false;
1009
+ this.isFocussed = false;
1010
+ /**
1011
+ * The automatic capitalisation of the text value as it is entered/edited by the user.
1012
+ * Available options: "off", "none", "on", "sentences", "words", "characters".
1013
+ */
1014
+ this.autocapitalize = "off";
1015
+ /**
1016
+ * The state of autocompletion the browser can apply on the text value.
1017
+ */
1018
+ this.autocomplete = "off";
1019
+ /**
1020
+ * The state of autocorrection the browser can apply when the user is entering/editing the text value.
1021
+ */
1022
+ this.autocorrect = "off";
1023
+ /**
1024
+ * If `true`, the form control will have input focus when the page loads.
1025
+ */
1026
+ this.autofocus = false;
1027
+ /**
1028
+ * If `true`, the disabled state will be set.
1029
+ */
1030
+ this.disabled = false;
1031
+ /**
1032
+ * Specify whether the text field fills the full width of the container.
1033
+ * If `true`, this overrides the --input-width CSS variable.
1034
+ */
1035
+ this.fullWidth = false;
1036
+ /**
1037
+ * The helper text that will be displayed for additional field guidance.
1038
+ */
1039
+ this.helperText = "";
1040
+ /**
1041
+ * If `true`, the character count which is displayed when `maxCharacters` is set will be visually hidden.
1042
+ */
1043
+ this.hideCharCount = false;
1044
+ /**
1045
+ * If `true`, the label will be hidden and the required label value will be applied as an aria-label.
1046
+ */
1047
+ this.hideLabel = false;
1048
+ /**
1049
+ * @internal If `true`, the hidden form input will stop rendering for form submission.
1050
+ */
1051
+ this.hiddenInput = true;
1052
+ /**
1053
+ * The ID for the input.
1054
+ */
1055
+ this.inputId = `ic-text-field-input-${inputIds++}`;
1056
+ /**
1057
+ * A hint to the browser for which keyboard to display.
1058
+ * Possible values: `"none"`, `"text"`, `"tel"`, `"url"`,
1059
+ * `"email"`, `"numeric"`, `"decimal"`, and `"search"`.
1060
+ */
1061
+ this.inputmode = "text";
1062
+ /**
1063
+ * The count of characters in the field. Will display a warning if the bound is reached. (NOTE: If the value of the text field has been set using the `value` prop, it will be truncated to this number of characters)
1064
+ */
1065
+ this.maxCharacters = 0;
1066
+ /**
1067
+ * The text to display as the warning message when the maximum number of characters (the `maxCharacters` prop value) is reached.
1068
+ */
1069
+ // prettier-ignore
1070
+ this.maxCharactersMessage = `Maximum input is ${this.maxCharacters} characters`;
1071
+ /**
1072
+ * The text to display as the error message when the maximum value (the `max` prop value) has been exceeded.
1073
+ */
1074
+ this.maxMessage = `Maximum value of ${this.max} exceeded`;
1075
+ /**
1076
+ * The minimum number of characters that can be entered in the field.
1077
+ */
1078
+ this.minCharacters = 0;
1079
+ /**
1080
+ * The text to display as the error message when the minimum number of characters (the `minCharacters` prop value) has not been met.
1081
+ */
1082
+ // prettier-ignore
1083
+ this.minCharactersMessage = `Minimum input is ${this.minCharacters} characters`;
1084
+ /**
1085
+ * The text to display as the error message when the minimum value (the `min` prop value) has not been met.
1086
+ */
1087
+ this.minMessage = `Minimum value of ${this.min} not met`;
1088
+ /**
1089
+ * The name of the control, which is submitted with the form data.
1090
+ */
1091
+ this.name = this.inputId;
1092
+ /**
1093
+ * The placeholder value to be displayed.
1094
+ */
1095
+ this.placeholder = "";
1096
+ /**
1097
+ * If `true`, the read only state will be set.
1098
+ */
1099
+ this.readonly = false;
1100
+ /**
1101
+ * If `true`, the input will require a value.
1102
+ */
1103
+ this.required = false;
1104
+ /**
1105
+ * If `true`, the multiline text area will be resizeable.
1106
+ */
1107
+ this.resize = false;
1108
+ /**
1109
+ * The number of rows to transform the text field into a text area with a specific height.
1110
+ */
1111
+ this.rows = 1;
1112
+ /**
1113
+ * The size of the text field component.
1114
+ */
1115
+ this.size = "medium";
1116
+ /**
1117
+ * If `true`, the value of the text field will have its spelling and grammar checked.
1118
+ */
1119
+ this.spellcheck = false;
1120
+ /**
1121
+ * 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.
1122
+ */
1123
+ this.theme = "inherit";
1124
+ /**
1125
+ * @internal If `true`, an ellipsis will be displayed at the end of the value if the value is longer than the container.
1126
+ */
1127
+ this.truncateValue = false;
1128
+ /**
1129
+ * The type of control to display. The default type is text.
1130
+ */
1131
+ this.type = "text";
1132
+ /**
1133
+ * The value of the `aria-live` attribute on the validation message. When set to "default", the `aria-live` value will be handled automatically, e.g. "assertive" for `validation-status="error"`.
1134
+ */
1135
+ this.validationAriaLive = "default";
1136
+ /**
1137
+ * If `true`, the icon in input control will be displayed - only applies when validationStatus ='success'.
1138
+ */
1139
+ this.validationInline = false;
1140
+ /**
1141
+ * @internal If `true`, the validation will display inline.
1142
+ */
1143
+ this.validationInlineInternal = false;
1144
+ /**
1145
+ * The validation state - e.g. 'error' | 'warning' | 'success'.
1146
+ */
1147
+ this.validationStatus = "";
1148
+ /**
1149
+ * The text to display as the validation message.
1150
+ */
1151
+ this.validationText = "";
1152
+ /**
1153
+ * The amount of time, in milliseconds, to wait to trigger the `icChange` event after each keystroke.
1154
+ */
1155
+ this.debounce = 0;
1156
+ /**
1157
+ * The value of the text field.
1158
+ */
1159
+ this.value = "";
1160
+ this.initialValue = this.value;
1161
+ this.checkChildHydration = () => {
1162
+ var _a, _b;
1163
+ if (this.hideLabel ||
1164
+ ((_b = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("ic-typography")) === null || _b === void 0 ? void 0 : _b.classList.contains("hydrated"))) {
1165
+ this.setFocus();
1166
+ clearInterval(this.interval);
1167
+ }
1168
+ };
1169
+ this.getNumberOfCharacters = (value) => value !== null && value !== undefined ? value.length : 0;
1170
+ this.getMaxValueExceeded = (value) => {
1171
+ this.numChars = this.getNumberOfCharacters(value);
1172
+ if (this.type === "number") {
1173
+ this.minValueUnattained = !!value && Number(value) < Number(this.min);
1174
+ this.maxValueExceeded = Number(value) > Number(this.max);
1175
+ }
1176
+ };
1177
+ this.getMaxCharactersReached = (value) => {
1178
+ this.numChars = this.getNumberOfCharacters(value);
1179
+ this.maxCharactersReached =
1180
+ this.maxCharacters > 0 && this.numChars >= this.maxCharacters;
1181
+ if (this.maxCharactersWarning && !this.maxCharactersReached) {
1182
+ this.maxCharactersWarning = false;
1183
+ }
1184
+ };
1185
+ this.onInput = (ev) => {
1186
+ this.value = ev.target.value;
1187
+ this.icInput.emit({ value: this.value });
1188
+ };
1189
+ this.onBlur = (ev) => {
1190
+ const target = ev.target;
1191
+ target.removeEventListener("wheel", this.onWheel);
1192
+ const { value } = target;
1193
+ this.numChars = value.length;
1194
+ this.minCharactersUnattained =
1195
+ this.minCharacters > 0 && this.numChars < this.minCharacters;
1196
+ this.icBlur.emit({ value });
1197
+ this.isFocussed = false;
1198
+ };
1199
+ this.onFocus = (ev) => {
1200
+ const target = ev.target;
1201
+ target.addEventListener("wheel", this.onWheel);
1202
+ this.icFocus.emit({ value: target.value });
1203
+ this.isFocussed = true;
1204
+ };
1205
+ this.onTextAreaScroll = () => {
1206
+ this.icScroll.emit();
1207
+ };
1208
+ this.onWheel = (ev) => {
1209
+ const target = ev.target;
1210
+ if (target.type === "number") {
1211
+ target.blur();
1212
+ setTimeout(() => {
1213
+ target.focus();
1214
+ }, 0);
1215
+ }
1216
+ };
1217
+ this.hasStatus = (status) => status !== "" && !this.disabled;
1218
+ this.handleFormReset = () => {
1219
+ this.value = this.initialValue;
1220
+ };
1221
+ this.showValidationMargin = () => {
1222
+ const maxNumChars = this.readonly ? 0 : this.maxCharacters;
1223
+ const emptyString = helpers.isEmptyString(this.validationStatus) ||
1224
+ helpers.isEmptyString(this.validationText);
1225
+ const valueOutsideRange = this.minValueUnattained || this.maxValueExceeded;
1226
+ const charsOutsideRange = maxNumChars > 0 || this.minCharactersUnattained;
1227
+ return ((!emptyString || valueOutsideRange || charsOutsideRange) &&
1228
+ !this.validationInlineInternal);
1229
+ };
1230
+ // triggered when attributes of host element change
1231
+ this.hostMutationCallback = (mutationList) => {
1232
+ let forceComponentUpdate = false;
1233
+ mutationList.forEach(({ attributeName, type, addedNodes, removedNodes }) => {
1234
+ if (attributeName && MUTABLE_ATTRIBUTES.includes(attributeName)) {
1235
+ const attribute = this.el.getAttribute(attributeName);
1236
+ if (attribute) {
1237
+ this.inheritedAttributes[attributeName] = attribute;
1238
+ }
1239
+ forceComponentUpdate = true;
1240
+ }
1241
+ else if (type === "childList") {
1242
+ forceComponentUpdate = helpers.checkSlotInChildMutations(addedNodes, removedNodes, "icon");
1243
+ }
1244
+ });
1245
+ if (forceComponentUpdate) {
1246
+ index.forceUpdate(this);
1247
+ }
1248
+ };
1249
+ }
1250
+ watchDisabledHandler() {
1251
+ helpers.removeDisabledFalse(this.disabled, this.el);
1252
+ }
1253
+ debounceChanged() {
1254
+ this.icChange = helpers.debounceEvent(this.icChange, this.debounce);
1255
+ }
1256
+ watchValueHandler(newValue) {
1257
+ let value;
1258
+ if (this.maxCharacters > 0) {
1259
+ value = newValue.substring(0, this.maxCharacters);
1260
+ if (value.length < newValue.length) {
1261
+ this.maxCharactersWarning = true;
1262
+ }
1263
+ this.value = value;
1264
+ }
1265
+ else {
1266
+ value = newValue;
1267
+ }
1268
+ if (this.inputEl && this.inputEl.value !== value) {
1269
+ this.inputEl.value = value;
1270
+ }
1271
+ this.getMaxValueExceeded(value);
1272
+ this.getMaxCharactersReached(value);
1273
+ this.icChange.emit({ value });
1274
+ }
1275
+ connectedCallback() {
1276
+ this.debounceChanged();
1277
+ }
1278
+ disconnectedCallback() {
1279
+ var _a;
1280
+ helpers.removeFormResetListener(this.el, this.handleFormReset);
1281
+ (_a = this.hostMutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
1282
+ }
1283
+ componentWillLoad() {
1284
+ if (this.value !== this.initialValue) {
1285
+ this.watchValueHandler(this.value);
1286
+ }
1287
+ else if (this.maxCharacters > 0) {
1288
+ this.value = this.value.substring(0, this.maxCharacters);
1289
+ }
1290
+ this.getMaxValueExceeded(this.value);
1291
+ this.getMaxCharactersReached(this.value);
1292
+ this.inheritedAttributes = helpers.inheritAttributes(this.el, MUTABLE_ATTRIBUTES);
1293
+ if (this.readonly) {
1294
+ this.maxValueExceeded = false;
1295
+ this.minValueUnattained = false;
1296
+ }
1297
+ helpers.addFormResetListener(this.el, this.handleFormReset);
1298
+ helpers.removeDisabledFalse(this.disabled, this.el);
1299
+ }
1300
+ componentDidLoad() {
1301
+ helpers.onComponentRequiredPropUndefined([{ prop: this.label, propName: "label" }], "Text Field");
1302
+ if (this.validationInlineInternal) {
1303
+ this.getValidationText.emit({ value: this.validationText });
1304
+ }
1305
+ this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);
1306
+ this.hostMutationObserver.observe(this.el, {
1307
+ attributes: true,
1308
+ childList: true,
1309
+ });
1310
+ if (this.autofocus && !this.disabled && !this.readonly) {
1311
+ this.interval = setInterval(this.checkChildHydration, 50);
1312
+ }
1313
+ }
1314
+ handleKeyDown(ev) {
1315
+ var _a, _b;
1316
+ this.icKeydown.emit({
1317
+ event: ev,
1318
+ cursorPosition: (_a = this.inputEl.selectionStart) !== null && _a !== void 0 ? _a : 0,
1319
+ selectionEnd: (_b = this.inputEl.selectionEnd) !== null && _b !== void 0 ? _b : 0,
1320
+ });
1321
+ if (!ev.ctrlKey && !constants.IGNORED_KEYBOARD_CHARACTERS.includes(ev.key)) {
1322
+ this.maxCharactersWarning = this.maxCharactersReached;
1323
+ }
1324
+ }
1325
+ /**
1326
+ * Sets focus on the native `input`.
1327
+ */
1328
+ async setFocus() {
1329
+ var _a;
1330
+ (_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.focus();
1331
+ }
1332
+ render() {
1333
+ const { inputId, name, label, required, size, placeholder, helperText, hideCharCount, rows, resize, disabled, value, min, max, numChars, readonly, maxCharacters, maxCharactersMessage, maxCharactersWarning, maxCharactersReached, maxMessage, minCharacters, minCharactersMessage, minCharactersUnattained, minMessage, minValueUnattained, maxValueExceeded, validationAriaLive, validationStatus, validationText, validationInline, validationInlineInternal, spellcheck, inputmode, fullWidth, truncateValue, hiddenInput, theme, hideLabel, type, autocapitalize, ariaActiveDescendant, inheritedAttributes, ariaExpanded, ariaOwns, autocomplete, role, isFocussed, } = this;
1334
+ const el = this.el;
1335
+ const disabledMode = readonly || disabled;
1336
+ const currentStatus = maxValueExceeded ||
1337
+ minValueUnattained ||
1338
+ minCharactersUnattained ||
1339
+ maxCharactersWarning
1340
+ ? maxCharactersWarning
1341
+ ? helpers.IcInformationStatus.Warning
1342
+ : helpers.IcInformationStatus.Error
1343
+ : validationStatus;
1344
+ const currentValidationText = maxCharactersWarning
1345
+ ? maxCharactersMessage
1346
+ : maxValueExceeded
1347
+ ? maxMessage
1348
+ : minValueUnattained
1349
+ ? minMessage
1350
+ : minCharactersUnattained
1351
+ ? minCharactersMessage
1352
+ : validationText;
1353
+ const maxNumChars = readonly ? 0 : maxCharacters;
1354
+ const messageAriaLive = validationAriaLive === "default"
1355
+ ? maxCharactersWarning ||
1356
+ maxValueExceeded ||
1357
+ minValueUnattained ||
1358
+ currentStatus === helpers.IcInformationStatus.Error
1359
+ ? "assertive"
1360
+ : "polite"
1361
+ : validationAriaLive;
1362
+ const showStatusText = this.hasStatus(currentStatus) &&
1363
+ !(currentStatus == helpers.IcInformationStatus.Success && validationInline) &&
1364
+ !validationInlineInternal;
1365
+ const multiline = rows > 1;
1366
+ const hiddenCharCountDescId = maxCharacters > 0 ? `${inputId}-char-count-desc` : "";
1367
+ const charsRemaining = maxNumChars - numChars;
1368
+ const remainingCharCountDescId = maxCharacters > 0 ? `${inputId}-remaining-char-count-desc` : "";
1369
+ const remainingCharCountDesc = `${charsRemaining} character${charsRemaining === 1 ? "" : "s"} remaining.`;
1370
+ const describedBy = `${helpers.getInputDescribedByText(this.el, inputId, helperText !== "", showStatusText)} ${hiddenCharCountDescId} ${numChars > 0 ? remainingCharCountDescId : ""}`.trim();
1371
+ const disabledText = disabledMode && !readonly;
1372
+ const showLeftIcon = !!this.el.querySelector(`[slot="icon"]`) && !disabledText;
1373
+ const invalid = `${currentStatus === helpers.IcInformationStatus.Error}`;
1374
+ hiddenInput
1375
+ ? helpers.renderHiddenInput(this.el, value, name, disabledMode)
1376
+ : helpers.removeHiddenInput(this.el);
1377
+ return (index.h(index.Host, { key: '6300558c65d21c3cf9fcb2af66774cbdf274cf89', class: {
1378
+ "ic-text-field-full-width": fullWidth,
1379
+ "ic-text-field-disabled": disabledMode,
1380
+ [`ic-theme-${theme}`]: theme !== "inherit",
1381
+ } }, index.h("ic-input-container", { key: '6f0d1a6cf4ed01bd98c3b69d37f6ffb473e1201e', readonly: readonly, disabled: disabledMode }, !hideLabel && (index.h("ic-input-label", { key: '71cc64b0733fbe16b21f389000c8a6813ad9f07f', for: inputId, label: label, helperText: helperText, required: required, disabled: disabledText, readonly: readonly }, index.h("slot", { key: '985b82195b09acc991bbed6c0be5210cba70f59e', name: "helper-text", slot: "helper-text" }))), index.h("ic-input-component-container", { key: '95df2f453e06c5dec6788e98db94e5e4ce129d04', size: size, validationStatus: currentStatus, multiLine: multiline, disabled: disabledMode, readonly: readonly, validationInline: validationInline, fullWidth: fullWidth }, showLeftIcon && (index.h("span", { key: '62a052203a6b9e35858e7103f505bdf38eda7349', class: {
1382
+ readonly,
1383
+ "has-value": this.getNumberOfCharacters(value) > 0,
1384
+ }, slot: "left-icon" }, index.h("slot", { key: '12ee0976840d954f7f855740db4098983ccf73a5', name: "icon" }))), !multiline ? (index.h("input", Object.assign({ id: inputId, name: name, ref: (el) => (this.inputEl = el), type: type, min: min, max: max, value: value, class: {
1385
+ "no-left-pad": !showLeftIcon && readonly,
1386
+ readonly,
1387
+ "truncate-value": truncateValue,
1388
+ }, placeholder: placeholder ? placeholder : "", required: required, disabled: disabledMode, readonly: readonly, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, "aria-activedescendant": ariaActiveDescendant, "aria-expanded": ariaExpanded, "aria-owns": ariaOwns, autocomplete: autocomplete, autocapitalize: autocapitalize, spellcheck: spellcheck, inputmode: inputmode, role: role || undefined, maxlength: maxCharactersReached ? maxCharacters : undefined, minlength: minCharactersUnattained ? minCharacters : undefined }, inheritedAttributes))) : (index.h("textarea", Object.assign({ id: inputId, class: {
1389
+ "no-resize": resize === false || !!readonly,
1390
+ "no-left-pad": !showLeftIcon && !!readonly,
1391
+ readonly: !!readonly,
1392
+ }, name: name, ref: (el) => (this.inputEl = el), value: value, rows: rows, required: required, disabled: disabledMode, placeholder: placeholder, readonly: readonly, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onScroll: this.onTextAreaScroll, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, autocomplete: autocomplete, autocapitalize: autocapitalize, spellcheck: spellcheck, inputmode: inputmode, maxlength: maxCharactersReached ? maxCharacters : undefined, minlength: minCharactersUnattained ? minCharacters : undefined }, inheritedAttributes))), helpers.isSlotUsed(el, "clear-button") && (index.h("slot", { key: '4bd5b1b44a9fded9be98c35d3e49f357b99adf26', name: "clear-button" })), helpers.isSlotUsed(el, "search-submit-button") && (index.h("slot", { key: 'fccd3ae4e454d661540f45b748440aa8c9c28baf', name: "search-submit-button" }))), helpers.isSlotUsed(el, "menu") && index.h("slot", { key: 'aca9fabb2b029547a713e75be81c179e3c1e3b52', name: "menu" }), index.h("ic-input-validation", { key: '1d2443ab140751bd21f247f5136254498ffc8004', class: { "show-validation": this.showValidationMargin() }, status: this.hasStatus(currentStatus) === false ||
1393
+ (currentStatus === helpers.IcInformationStatus.Success &&
1394
+ validationInline) ||
1395
+ validationInlineInternal
1396
+ ? ""
1397
+ : currentStatus, message: showStatusText ? currentValidationText : "", ariaLiveMode: messageAriaLive, for: inputId, fullWidth: fullWidth }, helpers.isSlotUsed(el, "validation-text") && (index.h("slot", { key: 'e8f5abdc72b047998c5164ec7bef70eab2d7af81', name: "validation-text", slot: "validation-message" })), !readonly && maxNumChars > 0 && (index.h("div", { key: '9458320139c6c17b4db3f40ef91ed8f35667e612', slot: "validation-message-adornment" }, !hideCharCount && (index.h("ic-typography", { key: '26663bbc0dbc1e5183cfb4af5b2f9a244fa303c5', variant: "caption", class: "char-count-text" }, index.h("span", { key: '84a9de3338f2fee09b3712fcc56dd509bbc672e2', class: "char-count" }, numChars, "/", maxNumChars))), index.h("span", { key: 'cb1d19f9755ea5b393e03ab19da262c67ce6e19e', class: "remaining-char-count-desc", "aria-live": "polite", hidden: !isFocussed, id: remainingCharCountDescId }, remainingCharCountDesc), index.h("span", { key: '87cfdac09956c5e749ff4c06bb58228d2d40feb5', hidden: true, id: hiddenCharCountDescId }, "Field can contain a maximum of ", maxNumChars, " characters.")))))));
1398
+ }
1399
+ get el() { return index.getElement(this); }
1400
+ static get watchers() { return {
1401
+ "disabled": ["watchDisabledHandler"],
1402
+ "debounce": ["debounceChanged"],
1403
+ "value": ["watchValueHandler"]
1404
+ }; }
1405
+ };
1406
+ TextField.style = IcTextFieldStyle0;
1407
+
1408
+ exports.ic_pagination = Pagination;
1409
+ exports.ic_select = Select;
1410
+ exports.ic_text_field = TextField;
1411
+
1412
+ //# sourceMappingURL=ic-pagination_3.cjs.entry.js.map