@ukic/canary-web-components 2.0.0-canary.4 → 2.0.0-canary.41

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 (832) hide show
  1. package/README.md +7 -2
  2. package/dist/cjs/core.cjs.js +1 -1
  3. package/dist/cjs/date-helpers-c9551119.js +150 -0
  4. package/dist/cjs/date-helpers-c9551119.js.map +1 -0
  5. package/dist/cjs/helpers-951fb33a.js +433 -0
  6. package/dist/cjs/helpers-951fb33a.js.map +1 -0
  7. package/dist/cjs/{helpers-bbe55215.js → helpers-eabe59b6.js} +147 -100
  8. package/dist/cjs/helpers-eabe59b6.js.map +1 -0
  9. package/dist/cjs/ic-accordion-group.cjs.entry.js +31 -4
  10. package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
  11. package/dist/cjs/ic-accordion.cjs.entry.js +11 -4
  12. package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
  13. package/dist/cjs/ic-alert.cjs.entry.js +20 -6
  14. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-back-to-top.cjs.entry.js +26 -17
  16. package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
  17. package/dist/cjs/ic-badge.cjs.entry.js +86 -83
  18. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +62 -25
  20. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
  21. package/dist/cjs/ic-breadcrumb.cjs.entry.js +2 -2
  22. package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ic-button_3.cjs.entry.js +145 -103
  24. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  25. package/dist/cjs/ic-card-horizontal.cjs.entry.js +130 -0
  26. package/dist/cjs/ic-card-horizontal.cjs.entry.js.map +1 -0
  27. package/dist/cjs/ic-card.cjs.entry.js +30 -7
  28. package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ic-checkbox-group.cjs.entry.js +28 -17
  30. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  31. package/dist/cjs/ic-checkbox.cjs.entry.js +50 -31
  32. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  33. package/dist/cjs/ic-chip.cjs.entry.js +45 -21
  34. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  35. package/dist/cjs/ic-classification-banner.cjs.entry.js +14 -5
  36. package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
  37. package/dist/cjs/ic-data-entity.cjs.entry.js +3 -6
  38. package/dist/cjs/ic-data-entity.cjs.entry.js.map +1 -1
  39. package/dist/cjs/ic-data-row.cjs.entry.js +21 -35
  40. package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
  41. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +57 -0
  42. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js.map +1 -0
  43. package/dist/cjs/ic-data-table.cjs.entry.js +1079 -84
  44. package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
  45. package/dist/cjs/ic-date-input.cjs.entry.js +1123 -0
  46. package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -0
  47. package/dist/cjs/ic-date-picker.cjs.entry.js +1129 -0
  48. package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -0
  49. package/dist/cjs/ic-dialog.cjs.entry.js +54 -12
  50. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  51. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  52. package/dist/cjs/ic-empty-state_2.cjs.entry.js +388 -0
  53. package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -0
  54. package/dist/cjs/ic-footer-link-group.cjs.entry.js +4 -4
  55. package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
  56. package/dist/cjs/ic-footer-link.cjs.entry.js +3 -3
  57. package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
  58. package/dist/cjs/ic-footer.cjs.entry.js +18 -7
  59. package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
  60. package/dist/cjs/ic-hero.cjs.entry.js +12 -2
  61. package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
  62. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +5 -5
  63. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
  64. package/dist/cjs/ic-input-component-container_4.cjs.entry.js +164 -0
  65. package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +1 -0
  66. package/dist/cjs/ic-link.cjs.entry.js +34 -16
  67. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  68. package/dist/cjs/ic-menu-group.cjs.entry.js +2 -2
  69. package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -1
  70. package/dist/cjs/ic-menu-item.cjs.entry.js +21 -20
  71. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  72. package/dist/cjs/ic-menu-with-multi.cjs.entry.js +2740 -0
  73. package/dist/cjs/ic-menu-with-multi.cjs.entry.js.map +1 -0
  74. package/dist/cjs/{ic-input-component-container_3.cjs.entry.js → ic-menu.cjs.entry.js} +17 -80
  75. package/dist/cjs/ic-menu.cjs.entry.js.map +1 -0
  76. package/dist/cjs/ic-navigation-button.cjs.entry.js +28 -7
  77. package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
  78. package/dist/cjs/ic-navigation-group.cjs.entry.js +32 -22
  79. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  80. package/dist/cjs/ic-navigation-item.cjs.entry.js +82 -36
  81. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  82. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  83. package/dist/cjs/ic-page-header.cjs.entry.js +10 -10
  84. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  85. package/dist/cjs/ic-pagination_4.cjs.entry.js +231 -116
  86. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  87. package/dist/cjs/ic-popover-menu.cjs.entry.js +40 -36
  88. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  89. package/dist/cjs/ic-radio-group.cjs.entry.js +100 -59
  90. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  91. package/dist/cjs/ic-radio-option.cjs.entry.js +59 -42
  92. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  93. package/dist/cjs/ic-search-bar.cjs.entry.js +22 -30
  94. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  95. package/dist/cjs/ic-section-container.cjs.entry.js +1 -1
  96. package/dist/cjs/ic-section-container.cjs.entry.js.map +1 -1
  97. package/dist/cjs/ic-select-with-multi.cjs.entry.js +796 -0
  98. package/dist/cjs/ic-select-with-multi.cjs.entry.js.map +1 -0
  99. package/dist/cjs/ic-side-navigation.cjs.entry.js +53 -73
  100. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  101. package/dist/cjs/ic-skeleton.cjs.entry.js +16 -35
  102. package/dist/cjs/ic-skeleton.cjs.entry.js.map +1 -1
  103. package/dist/cjs/ic-status-tag.cjs.entry.js +4 -2
  104. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  105. package/dist/cjs/ic-step.cjs.entry.js +5 -2
  106. package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
  107. package/dist/cjs/ic-stepper.cjs.entry.js +31 -9
  108. package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
  109. package/dist/cjs/ic-switch.cjs.entry.js +7 -3
  110. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  111. package/dist/cjs/ic-tab-context.cjs.entry.js +78 -130
  112. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  113. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  114. package/dist/cjs/ic-tab-panel.cjs.entry.js +5 -13
  115. package/dist/cjs/ic-tab-panel.cjs.entry.js.map +1 -1
  116. package/dist/cjs/ic-tab.cjs.entry.js +16 -14
  117. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  118. package/dist/cjs/ic-theme.cjs.entry.js +13 -22
  119. package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
  120. package/dist/cjs/ic-toast-region.cjs.entry.js +6 -0
  121. package/dist/cjs/ic-toast-region.cjs.entry.js.map +1 -1
  122. package/dist/cjs/ic-toast.cjs.entry.js +21 -18
  123. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  124. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +201 -0
  125. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -0
  126. package/dist/cjs/ic-toggle-button.cjs.entry.js +97 -0
  127. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -0
  128. package/dist/cjs/ic-top-navigation.cjs.entry.js +60 -82
  129. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  130. package/dist/cjs/ic-tree-item.cjs.entry.js +253 -0
  131. package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -0
  132. package/dist/cjs/ic-tree-view.cjs.entry.js +215 -0
  133. package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -0
  134. package/dist/cjs/ic-typography.cjs.entry.js +51 -14
  135. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  136. package/dist/cjs/index-4cf27b16.js +48 -12
  137. package/dist/cjs/loader.cjs.js +1 -1
  138. package/dist/collection/assets/arrow-dropdown.svg +3 -0
  139. package/dist/collection/assets/calendar.svg +3 -0
  140. package/dist/collection/collection-manifest.json +11 -1
  141. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.css +658 -0
  142. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js +375 -0
  143. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js.map +1 -0
  144. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.stories.js +605 -0
  145. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.stories.js.map +1 -0
  146. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.types.js +2 -0
  147. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.types.js.map +1 -0
  148. package/dist/collection/components/ic-card-horizontal/test/basic/ic-card-horizontal.spec.js +140 -0
  149. package/dist/collection/components/ic-card-horizontal/test/basic/ic-card-horizontal.spec.js.map +1 -0
  150. package/dist/collection/components/ic-data-table/ic-data-table.css +286 -10
  151. package/dist/collection/components/ic-data-table/ic-data-table.js +1533 -123
  152. package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
  153. package/dist/collection/components/ic-data-table/ic-data-table.stories.js +414 -0
  154. package/dist/collection/components/ic-data-table/ic-data-table.stories.js.map +1 -0
  155. package/dist/collection/components/ic-data-table/ic-data-table.types.js.map +1 -1
  156. package/dist/collection/components/ic-data-table/story-data.js +1326 -43
  157. package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
  158. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +460 -3
  159. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
  160. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.css +91 -0
  161. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js +160 -0
  162. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js.map +1 -0
  163. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.stories.js +98 -0
  164. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.stories.js.map +1 -0
  165. package/dist/collection/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.js +11 -0
  166. package/dist/collection/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.js.map +1 -0
  167. package/dist/collection/components/ic-data-table-title-bar/test/basic/ic-data-table-title-bar.spec.js +70 -0
  168. package/dist/collection/components/ic-data-table-title-bar/test/basic/ic-data-table-title-bar.spec.js.map +1 -0
  169. package/dist/collection/components/ic-date-input/ic-date-input.css +564 -0
  170. package/dist/collection/components/ic-date-input/ic-date-input.js +1808 -0
  171. package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -0
  172. package/dist/collection/components/ic-date-input/ic-date-input.stories.js +341 -0
  173. package/dist/collection/components/ic-date-input/ic-date-input.stories.js.map +1 -0
  174. package/dist/collection/components/ic-date-input/story-data.js +28 -0
  175. package/dist/collection/components/ic-date-input/story-data.js.map +1 -0
  176. package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js +1158 -0
  177. package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js.map +1 -0
  178. package/dist/collection/components/ic-date-input/test/helpers/ic-date-input.js +42 -0
  179. package/dist/collection/components/ic-date-input/test/helpers/ic-date-input.js.map +1 -0
  180. package/dist/collection/components/ic-date-picker/ic-date-picker.css +885 -0
  181. package/dist/collection/components/ic-date-picker/ic-date-picker.js +1688 -0
  182. package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -0
  183. package/dist/collection/components/ic-date-picker/ic-date-picker.stories.js +167 -0
  184. package/dist/collection/components/ic-date-picker/ic-date-picker.stories.js.map +1 -0
  185. package/dist/collection/components/ic-date-picker/ic-day-button.js +36 -0
  186. package/dist/collection/components/ic-date-picker/ic-day-button.js.map +1 -0
  187. package/dist/collection/components/ic-date-picker/ic-month-picker.js +29 -0
  188. package/dist/collection/components/ic-date-picker/ic-month-picker.js.map +1 -0
  189. package/dist/collection/components/ic-date-picker/ic-year-picker.js +39 -0
  190. package/dist/collection/components/ic-date-picker/ic-year-picker.js.map +1 -0
  191. package/dist/collection/components/ic-date-picker/story-data.js +179 -0
  192. package/dist/collection/components/ic-date-picker/story-data.js.map +1 -0
  193. package/dist/collection/components/ic-date-picker/test/a11y/ic-date-picker.test.a11y.js +13 -0
  194. package/dist/collection/components/ic-date-picker/test/a11y/ic-date-picker.test.a11y.js.map +1 -0
  195. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker-utils.spec.js +207 -0
  196. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker-utils.spec.js.map +1 -0
  197. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js +1030 -0
  198. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js.map +1 -0
  199. package/dist/collection/components/ic-menu-with-multi/ic-menu.css +701 -0
  200. package/dist/collection/components/ic-menu-with-multi/ic-menu.js +1599 -0
  201. package/dist/collection/components/ic-menu-with-multi/ic-menu.js.map +1 -0
  202. package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js +1057 -0
  203. package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js.map +1 -0
  204. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +346 -166
  205. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
  206. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.stories.js +260 -0
  207. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.stories.js.map +1 -0
  208. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js +2 -0
  209. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js.map +1 -0
  210. package/dist/collection/components/ic-pagination-bar/test/a11y/ic-pagination-bar.test.a11y.js +8 -1
  211. package/dist/collection/components/ic-pagination-bar/test/a11y/ic-pagination-bar.test.a11y.js.map +1 -1
  212. package/dist/collection/components/ic-pagination-bar/test/basic/ic-pagination-bar.spec.js +75 -12
  213. package/dist/collection/components/ic-pagination-bar/test/basic/ic-pagination-bar.spec.js.map +1 -1
  214. package/dist/collection/components/ic-select-with-multi/assets/Check.svg +3 -0
  215. package/dist/collection/components/ic-select-with-multi/assets/Clear.svg +3 -0
  216. package/dist/collection/components/ic-select-with-multi/assets/Expand.svg +3 -0
  217. package/dist/collection/components/ic-select-with-multi/ic-select-multi.stories.js +144 -0
  218. package/dist/collection/components/ic-select-with-multi/ic-select-multi.stories.js.map +1 -0
  219. package/dist/collection/components/ic-select-with-multi/ic-select.css +693 -0
  220. package/dist/collection/components/ic-select-with-multi/ic-select.js +1649 -0
  221. package/dist/collection/components/ic-select-with-multi/ic-select.js.map +1 -0
  222. package/dist/collection/components/ic-select-with-multi/story-data.js +216 -0
  223. package/dist/collection/components/ic-select-with-multi/story-data.js.map +1 -0
  224. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js +1518 -0
  225. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js.map +1 -0
  226. package/dist/collection/components/ic-tree-item/ic-tree-item.css +186 -0
  227. package/dist/collection/components/ic-tree-item/ic-tree-item.js +620 -0
  228. package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -0
  229. package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js +117 -0
  230. package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js.map +1 -0
  231. package/dist/collection/components/ic-tree-view/ic-tree-view.css +74 -0
  232. package/dist/collection/components/ic-tree-view/ic-tree-view.js +346 -0
  233. package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -0
  234. package/dist/collection/components/ic-tree-view/ic-tree-view.stories.js +456 -0
  235. package/dist/collection/components/ic-tree-view/ic-tree-view.stories.js.map +1 -0
  236. package/dist/collection/components/ic-tree-view/test/basic/ic-tree-view.spec.js +85 -0
  237. package/dist/collection/components/ic-tree-view/test/basic/ic-tree-view.spec.js.map +1 -0
  238. package/dist/collection/utils/constants.js +83 -0
  239. package/dist/collection/utils/constants.js.map +1 -0
  240. package/dist/collection/utils/date-helpers.js +133 -0
  241. package/dist/collection/utils/date-helpers.js.map +1 -0
  242. package/dist/collection/utils/helpers.js +473 -5
  243. package/dist/collection/utils/helpers.js.map +1 -1
  244. package/dist/collection/utils/types.js +58 -0
  245. package/dist/collection/utils/types.js.map +1 -0
  246. package/dist/components/helpers.js +141 -98
  247. package/dist/components/helpers.js.map +1 -1
  248. package/dist/components/helpers2.js +403 -0
  249. package/dist/components/helpers2.js.map +1 -0
  250. package/dist/components/ic-accordion-group.js +38 -7
  251. package/dist/components/ic-accordion-group.js.map +1 -1
  252. package/dist/components/ic-accordion.js +12 -4
  253. package/dist/components/ic-accordion.js.map +1 -1
  254. package/dist/components/ic-alert2.js +21 -6
  255. package/dist/components/ic-alert2.js.map +1 -1
  256. package/dist/components/ic-back-to-top.js +34 -18
  257. package/dist/components/ic-back-to-top.js.map +1 -1
  258. package/dist/components/ic-badge.js +91 -84
  259. package/dist/components/ic-badge.js.map +1 -1
  260. package/dist/components/ic-breadcrumb-group.js +66 -25
  261. package/dist/components/ic-breadcrumb-group.js.map +1 -1
  262. package/dist/components/ic-breadcrumb2.js +2 -2
  263. package/dist/components/ic-breadcrumb2.js.map +1 -1
  264. package/dist/components/ic-button2.js +104 -74
  265. package/dist/components/ic-button2.js.map +1 -1
  266. package/dist/components/ic-card-horizontal.d.ts +11 -0
  267. package/dist/components/ic-card-horizontal.js +168 -0
  268. package/dist/components/ic-card-horizontal.js.map +1 -0
  269. package/dist/components/ic-card.js +34 -21
  270. package/dist/components/ic-card.js.map +1 -1
  271. package/dist/components/ic-checkbox-group.js +33 -18
  272. package/dist/components/ic-checkbox-group.js.map +1 -1
  273. package/dist/components/ic-checkbox.js +58 -33
  274. package/dist/components/ic-checkbox.js.map +1 -1
  275. package/dist/components/ic-chip.js +52 -23
  276. package/dist/components/ic-chip.js.map +1 -1
  277. package/dist/components/ic-classification-banner.js +14 -5
  278. package/dist/components/ic-classification-banner.js.map +1 -1
  279. package/dist/components/ic-data-entity.js +3 -6
  280. package/dist/components/ic-data-entity.js.map +1 -1
  281. package/dist/components/ic-data-row.js +21 -35
  282. package/dist/components/ic-data-row.js.map +1 -1
  283. package/dist/components/ic-data-table-title-bar.d.ts +11 -0
  284. package/dist/components/ic-data-table-title-bar.js +136 -0
  285. package/dist/components/ic-data-table-title-bar.js.map +1 -0
  286. package/dist/components/ic-data-table.js +1119 -91
  287. package/dist/components/ic-data-table.js.map +1 -1
  288. package/dist/components/ic-date-input.d.ts +11 -0
  289. package/dist/components/ic-date-input.js +8 -0
  290. package/dist/components/ic-date-input.js.map +1 -0
  291. package/dist/components/ic-date-input2.js +1359 -0
  292. package/dist/components/ic-date-input2.js.map +1 -0
  293. package/dist/components/ic-date-picker.d.ts +11 -0
  294. package/dist/components/ic-date-picker.js +1258 -0
  295. package/dist/components/ic-date-picker.js.map +1 -0
  296. package/dist/components/ic-dialog.js +55 -12
  297. package/dist/components/ic-dialog.js.map +1 -1
  298. package/dist/components/ic-divider2.js +1 -1
  299. package/dist/components/ic-empty-state.js +1 -57
  300. package/dist/components/ic-empty-state.js.map +1 -1
  301. package/dist/{esm/ic-empty-state.entry.js → components/ic-empty-state2.js} +47 -11
  302. package/dist/components/ic-empty-state2.js.map +1 -0
  303. package/dist/components/ic-footer-link-group.js +4 -4
  304. package/dist/components/ic-footer-link-group.js.map +1 -1
  305. package/dist/components/ic-footer-link.js +3 -3
  306. package/dist/components/ic-footer-link.js.map +1 -1
  307. package/dist/components/ic-footer.js +18 -7
  308. package/dist/components/ic-footer.js.map +1 -1
  309. package/dist/components/ic-hero.js +12 -2
  310. package/dist/components/ic-hero.js.map +1 -1
  311. package/dist/components/ic-horizontal-scroll2.js +5 -5
  312. package/dist/components/ic-horizontal-scroll2.js.map +1 -1
  313. package/dist/components/ic-input-component-container2.js +24 -8
  314. package/dist/components/ic-input-component-container2.js.map +1 -1
  315. package/dist/components/ic-input-label2.js +7 -5
  316. package/dist/components/ic-input-label2.js.map +1 -1
  317. package/dist/components/ic-input-validation2.js +1 -1
  318. package/dist/components/ic-link2.js +35 -17
  319. package/dist/components/ic-link2.js.map +1 -1
  320. package/dist/components/ic-loading-indicator2.js +2 -2
  321. package/dist/components/ic-loading-indicator2.js.map +1 -1
  322. package/dist/components/ic-menu-group.js +2 -2
  323. package/dist/components/ic-menu-group.js.map +1 -1
  324. package/dist/components/ic-menu-item2.js +26 -23
  325. package/dist/components/ic-menu-item2.js.map +1 -1
  326. package/dist/components/ic-menu-with-multi.d.ts +11 -0
  327. package/dist/components/ic-menu-with-multi.js +8 -0
  328. package/dist/components/ic-menu-with-multi.js.map +1 -0
  329. package/dist/components/ic-menu2.js +14 -14
  330. package/dist/components/ic-menu2.js.map +1 -1
  331. package/dist/components/ic-menu3.js +2806 -0
  332. package/dist/components/ic-menu3.js.map +1 -0
  333. package/dist/components/ic-navigation-button.js +29 -8
  334. package/dist/components/ic-navigation-button.js.map +1 -1
  335. package/dist/components/ic-navigation-group.js +34 -24
  336. package/dist/components/ic-navigation-group.js.map +1 -1
  337. package/dist/components/ic-navigation-item.js +84 -37
  338. package/dist/components/ic-navigation-item.js.map +1 -1
  339. package/dist/components/ic-navigation-menu2.js +1 -1
  340. package/dist/components/ic-page-header.js +10 -10
  341. package/dist/components/ic-page-header.js.map +1 -1
  342. package/dist/components/ic-pagination-bar2.js +244 -161
  343. package/dist/components/ic-pagination-bar2.js.map +1 -1
  344. package/dist/components/ic-pagination-item2.js +27 -12
  345. package/dist/components/ic-pagination-item2.js.map +1 -1
  346. package/dist/components/ic-pagination2.js +30 -10
  347. package/dist/components/ic-pagination2.js.map +1 -1
  348. package/dist/components/ic-popover-menu.js +43 -38
  349. package/dist/components/ic-popover-menu.js.map +1 -1
  350. package/dist/components/ic-radio-group.js +101 -59
  351. package/dist/components/ic-radio-group.js.map +1 -1
  352. package/dist/components/ic-radio-option.js +63 -44
  353. package/dist/components/ic-radio-option.js.map +1 -1
  354. package/dist/components/ic-search-bar.js +23 -30
  355. package/dist/components/ic-search-bar.js.map +1 -1
  356. package/dist/components/ic-section-container2.js +1 -1
  357. package/dist/components/ic-section-container2.js.map +1 -1
  358. package/dist/components/ic-select-with-multi.d.ts +11 -0
  359. package/dist/components/ic-select-with-multi.js +921 -0
  360. package/dist/components/ic-select-with-multi.js.map +1 -0
  361. package/dist/components/ic-select2.js +77 -30
  362. package/dist/components/ic-select2.js.map +1 -1
  363. package/dist/components/ic-side-navigation.js +56 -74
  364. package/dist/components/ic-side-navigation.js.map +1 -1
  365. package/dist/components/ic-skeleton.js +17 -40
  366. package/dist/components/ic-skeleton.js.map +1 -1
  367. package/dist/components/ic-status-tag.js +3 -1
  368. package/dist/components/ic-status-tag.js.map +1 -1
  369. package/dist/components/ic-step.js +5 -2
  370. package/dist/components/ic-step.js.map +1 -1
  371. package/dist/components/ic-stepper.js +35 -9
  372. package/dist/components/ic-stepper.js.map +1 -1
  373. package/dist/components/ic-switch.js +9 -4
  374. package/dist/components/ic-switch.js.map +1 -1
  375. package/dist/components/ic-tab-context.js +79 -130
  376. package/dist/components/ic-tab-context.js.map +1 -1
  377. package/dist/components/ic-tab-panel.js +6 -17
  378. package/dist/components/ic-tab-panel.js.map +1 -1
  379. package/dist/components/ic-tab.js +16 -14
  380. package/dist/components/ic-tab.js.map +1 -1
  381. package/dist/components/ic-text-field2.js +120 -72
  382. package/dist/components/ic-text-field2.js.map +1 -1
  383. package/dist/components/ic-theme.js +13 -22
  384. package/dist/components/ic-theme.js.map +1 -1
  385. package/dist/components/ic-toast-region.js +6 -0
  386. package/dist/components/ic-toast-region.js.map +1 -1
  387. package/dist/components/ic-toast.js +24 -19
  388. package/dist/components/ic-toast.js.map +1 -1
  389. package/dist/components/ic-toggle-button-group.js +230 -0
  390. package/dist/components/ic-toggle-button-group.js.map +1 -0
  391. package/dist/components/ic-toggle-button.js +148 -0
  392. package/dist/components/ic-toggle-button.js.map +1 -0
  393. package/dist/components/ic-tooltip2.js +52 -30
  394. package/dist/components/ic-tooltip2.js.map +1 -1
  395. package/dist/components/ic-top-navigation.js +61 -83
  396. package/dist/components/ic-top-navigation.js.map +1 -1
  397. package/dist/components/ic-tree-item.d.ts +11 -0
  398. package/dist/components/ic-tree-item.js +300 -0
  399. package/dist/components/ic-tree-item.js.map +1 -0
  400. package/dist/components/ic-tree-view.d.ts +11 -0
  401. package/dist/components/ic-tree-view.js +252 -0
  402. package/dist/components/ic-tree-view.js.map +1 -0
  403. package/dist/components/ic-typography2.js +57 -17
  404. package/dist/components/ic-typography2.js.map +1 -1
  405. package/dist/core/core.css +8 -5
  406. package/dist/core/core.esm.js +1 -1
  407. package/dist/core/core.esm.js.map +1 -1
  408. package/dist/core/p-0229eb46.entry.js +2 -0
  409. package/dist/core/p-0229eb46.entry.js.map +1 -0
  410. package/dist/core/p-04fe848d.entry.js +2 -0
  411. package/dist/core/p-04fe848d.entry.js.map +1 -0
  412. package/dist/core/p-05ae9a59.entry.js +2 -0
  413. package/dist/core/p-05ae9a59.entry.js.map +1 -0
  414. package/dist/core/p-074e64d0.entry.js +2 -0
  415. package/dist/core/p-074e64d0.entry.js.map +1 -0
  416. package/dist/core/p-0f1706e8.entry.js +2 -0
  417. package/dist/core/p-0f1706e8.entry.js.map +1 -0
  418. package/dist/core/p-11877d23.entry.js +2 -0
  419. package/dist/core/p-11877d23.entry.js.map +1 -0
  420. package/dist/core/p-1e450833.entry.js +2 -0
  421. package/dist/core/p-1e450833.entry.js.map +1 -0
  422. package/dist/core/{p-4409f656.entry.js → p-23408776.entry.js} +2 -2
  423. package/dist/core/p-23408776.entry.js.map +1 -0
  424. package/dist/core/p-26fa17fb.entry.js +2 -0
  425. package/dist/core/p-26fa17fb.entry.js.map +1 -0
  426. package/dist/core/p-2b15ea77.entry.js +2 -0
  427. package/dist/core/p-2b15ea77.entry.js.map +1 -0
  428. package/dist/core/p-2d44b81a.entry.js +2 -0
  429. package/dist/core/p-2d44b81a.entry.js.map +1 -0
  430. package/dist/core/p-2ea7af8b.entry.js +2 -0
  431. package/dist/core/p-2ea7af8b.entry.js.map +1 -0
  432. package/dist/core/p-33dd24eb.js +2 -0
  433. package/dist/core/p-33dd24eb.js.map +1 -0
  434. package/dist/core/p-38f329ab.entry.js +2 -0
  435. package/dist/core/p-38f329ab.entry.js.map +1 -0
  436. package/dist/core/p-3cd2056f.entry.js +2 -0
  437. package/dist/core/p-3cd2056f.entry.js.map +1 -0
  438. package/dist/core/p-3d00ad9e.entry.js +2 -0
  439. package/dist/core/p-3d00ad9e.entry.js.map +1 -0
  440. package/dist/core/p-3ebd4703.entry.js +2 -0
  441. package/dist/core/p-3ebd4703.entry.js.map +1 -0
  442. package/dist/core/p-44036532.entry.js +2 -0
  443. package/dist/core/p-44036532.entry.js.map +1 -0
  444. package/dist/core/p-44680720.entry.js +2 -0
  445. package/dist/core/p-44680720.entry.js.map +1 -0
  446. package/dist/core/{p-24945ee5.entry.js → p-452985d9.entry.js} +2 -2
  447. package/dist/core/p-452985d9.entry.js.map +1 -0
  448. package/dist/core/{p-b97dc365.entry.js → p-487fd924.entry.js} +2 -2
  449. package/dist/core/p-56db5123.entry.js +2 -0
  450. package/dist/core/p-56db5123.entry.js.map +1 -0
  451. package/dist/core/p-5a90eaa8.entry.js +2 -0
  452. package/dist/core/p-5a90eaa8.entry.js.map +1 -0
  453. package/dist/core/p-5dd6381a.entry.js +2 -0
  454. package/dist/core/p-5dd6381a.entry.js.map +1 -0
  455. package/dist/core/p-5f149106.entry.js +2 -0
  456. package/dist/core/p-5f149106.entry.js.map +1 -0
  457. package/dist/core/p-61848e6b.entry.js +2 -0
  458. package/dist/core/p-61848e6b.entry.js.map +1 -0
  459. package/dist/core/{p-d77960f6.entry.js → p-656378ba.entry.js} +2 -2
  460. package/dist/core/p-6a920114.entry.js +2 -0
  461. package/dist/core/p-6a920114.entry.js.map +1 -0
  462. package/dist/core/p-6cdf5de2.entry.js +2 -0
  463. package/dist/core/p-6cdf5de2.entry.js.map +1 -0
  464. package/dist/core/p-70ad364c.entry.js +2 -0
  465. package/dist/core/p-70ad364c.entry.js.map +1 -0
  466. package/dist/core/p-70c659ec.entry.js +2 -0
  467. package/dist/core/p-70c659ec.entry.js.map +1 -0
  468. package/dist/core/p-74b42302.entry.js +2 -0
  469. package/dist/core/p-74b42302.entry.js.map +1 -0
  470. package/dist/core/p-75bd12f8.entry.js +2 -0
  471. package/dist/core/p-75bd12f8.entry.js.map +1 -0
  472. package/dist/core/p-780294b8.entry.js +2 -0
  473. package/dist/core/p-780294b8.entry.js.map +1 -0
  474. package/dist/core/{p-baf81f30.entry.js → p-787ffd96.entry.js} +2 -2
  475. package/dist/core/p-787ffd96.entry.js.map +1 -0
  476. package/dist/core/p-7edc19be.entry.js +2 -0
  477. package/dist/core/p-7edc19be.entry.js.map +1 -0
  478. package/dist/core/p-8ab58daa.js +2 -0
  479. package/dist/core/p-8ab58daa.js.map +1 -0
  480. package/dist/core/p-8ced1495.entry.js +2 -0
  481. package/dist/core/p-8ced1495.entry.js.map +1 -0
  482. package/dist/core/{p-939baa93.entry.js → p-95545b4c.entry.js} +2 -2
  483. package/dist/core/p-95545b4c.entry.js.map +1 -0
  484. package/dist/core/p-95d057b8.entry.js +2 -0
  485. package/dist/core/p-95d057b8.entry.js.map +1 -0
  486. package/dist/core/p-987cd821.entry.js +2 -0
  487. package/dist/core/p-987cd821.entry.js.map +1 -0
  488. package/dist/core/{p-41aa0ed3.entry.js → p-9b386822.entry.js} +2 -2
  489. package/dist/core/p-9b386822.entry.js.map +1 -0
  490. package/dist/core/{p-39e20b87.entry.js → p-9bbe221f.entry.js} +2 -2
  491. package/dist/core/{p-39e20b87.entry.js.map → p-9bbe221f.entry.js.map} +1 -1
  492. package/dist/core/p-9f157649.entry.js +2 -0
  493. package/dist/core/p-9f157649.entry.js.map +1 -0
  494. package/dist/core/{p-356b8a4c.entry.js → p-9f3cf053.entry.js} +2 -2
  495. package/dist/core/{p-356b8a4c.entry.js.map → p-9f3cf053.entry.js.map} +1 -1
  496. package/dist/core/p-9f58998d.entry.js +2 -0
  497. package/dist/core/p-9f58998d.entry.js.map +1 -0
  498. package/dist/core/p-a4f28ef1.entry.js +2 -0
  499. package/dist/core/p-a4f28ef1.entry.js.map +1 -0
  500. package/dist/core/p-ac8090a5.entry.js +2 -0
  501. package/dist/core/p-ac8090a5.entry.js.map +1 -0
  502. package/dist/core/p-b1f89f44.entry.js +2 -0
  503. package/dist/core/p-b1f89f44.entry.js.map +1 -0
  504. package/dist/core/p-bc350ec5.entry.js +2 -0
  505. package/dist/core/p-bc350ec5.entry.js.map +1 -0
  506. package/dist/core/p-bd0328f3.entry.js +2 -0
  507. package/dist/core/p-bd0328f3.entry.js.map +1 -0
  508. package/dist/core/p-bf06977d.js +2 -0
  509. package/dist/core/p-bf06977d.js.map +1 -0
  510. package/dist/core/p-c0a2a040.entry.js +2 -0
  511. package/dist/core/p-c0a2a040.entry.js.map +1 -0
  512. package/dist/core/p-cc0e0b46.entry.js +2 -0
  513. package/dist/core/p-cc0e0b46.entry.js.map +1 -0
  514. package/dist/core/p-d0020f6f.entry.js +2 -0
  515. package/dist/core/p-d0020f6f.entry.js.map +1 -0
  516. package/dist/core/{p-3d618bc2.entry.js → p-d1045cd5.entry.js} +2 -2
  517. package/dist/core/p-d56248df.entry.js +2 -0
  518. package/dist/core/p-d56248df.entry.js.map +1 -0
  519. package/dist/core/p-d921dc2c.entry.js +2 -0
  520. package/dist/core/p-d921dc2c.entry.js.map +1 -0
  521. package/dist/core/p-da398a5d.entry.js +2 -0
  522. package/dist/core/p-da398a5d.entry.js.map +1 -0
  523. package/dist/core/{p-2e9e8e7c.entry.js → p-db5af9f7.entry.js} +2 -2
  524. package/dist/core/p-db5af9f7.entry.js.map +1 -0
  525. package/dist/core/p-dd4c83ad.entry.js +2 -0
  526. package/dist/core/p-dd4c83ad.entry.js.map +1 -0
  527. package/dist/core/p-e362b5f3.entry.js +2 -0
  528. package/dist/core/p-e362b5f3.entry.js.map +1 -0
  529. package/dist/core/p-e89c2feb.entry.js +2 -0
  530. package/dist/core/p-e89c2feb.entry.js.map +1 -0
  531. package/dist/core/p-eaeaa096.entry.js +2 -0
  532. package/dist/core/p-eaeaa096.entry.js.map +1 -0
  533. package/dist/core/{p-c2b5e7b1.entry.js → p-eb87b43b.entry.js} +2 -2
  534. package/dist/core/{p-c2b5e7b1.entry.js.map → p-eb87b43b.entry.js.map} +1 -1
  535. package/dist/core/p-f5dfcf4f.entry.js +2 -0
  536. package/dist/core/p-f5dfcf4f.entry.js.map +1 -0
  537. package/dist/core/p-f5fbfbc9.entry.js +2 -0
  538. package/dist/core/p-f5fbfbc9.entry.js.map +1 -0
  539. package/dist/core/p-fac387e8.entry.js +2 -0
  540. package/dist/core/p-fac387e8.entry.js.map +1 -0
  541. package/dist/esm/core.js +1 -1
  542. package/dist/esm/date-helpers-0e5e32a7.js +136 -0
  543. package/dist/esm/date-helpers-0e5e32a7.js.map +1 -0
  544. package/dist/esm/helpers-948df101.js +403 -0
  545. package/dist/esm/helpers-948df101.js.map +1 -0
  546. package/dist/esm/{helpers-268c2b7f.js → helpers-cd64688a.js} +142 -99
  547. package/dist/esm/helpers-cd64688a.js.map +1 -0
  548. package/dist/esm/ic-accordion-group.entry.js +31 -4
  549. package/dist/esm/ic-accordion-group.entry.js.map +1 -1
  550. package/dist/esm/ic-accordion.entry.js +11 -4
  551. package/dist/esm/ic-accordion.entry.js.map +1 -1
  552. package/dist/esm/ic-alert.entry.js +20 -6
  553. package/dist/esm/ic-alert.entry.js.map +1 -1
  554. package/dist/esm/ic-back-to-top.entry.js +26 -17
  555. package/dist/esm/ic-back-to-top.entry.js.map +1 -1
  556. package/dist/esm/ic-badge.entry.js +86 -83
  557. package/dist/esm/ic-badge.entry.js.map +1 -1
  558. package/dist/esm/ic-breadcrumb-group.entry.js +62 -25
  559. package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
  560. package/dist/esm/ic-breadcrumb.entry.js +2 -2
  561. package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
  562. package/dist/esm/ic-button_3.entry.js +145 -103
  563. package/dist/esm/ic-button_3.entry.js.map +1 -1
  564. package/dist/esm/ic-card-horizontal.entry.js +126 -0
  565. package/dist/esm/ic-card-horizontal.entry.js.map +1 -0
  566. package/dist/esm/ic-card.entry.js +30 -7
  567. package/dist/esm/ic-card.entry.js.map +1 -1
  568. package/dist/esm/ic-checkbox-group.entry.js +28 -17
  569. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  570. package/dist/esm/ic-checkbox.entry.js +50 -31
  571. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  572. package/dist/esm/ic-chip.entry.js +45 -21
  573. package/dist/esm/ic-chip.entry.js.map +1 -1
  574. package/dist/esm/ic-classification-banner.entry.js +14 -5
  575. package/dist/esm/ic-classification-banner.entry.js.map +1 -1
  576. package/dist/esm/ic-data-entity.entry.js +3 -6
  577. package/dist/esm/ic-data-entity.entry.js.map +1 -1
  578. package/dist/esm/ic-data-row.entry.js +21 -35
  579. package/dist/esm/ic-data-row.entry.js.map +1 -1
  580. package/dist/esm/ic-data-table-title-bar.entry.js +53 -0
  581. package/dist/esm/ic-data-table-title-bar.entry.js.map +1 -0
  582. package/dist/esm/ic-data-table.entry.js +1080 -85
  583. package/dist/esm/ic-data-table.entry.js.map +1 -1
  584. package/dist/esm/ic-date-input.entry.js +1119 -0
  585. package/dist/esm/ic-date-input.entry.js.map +1 -0
  586. package/dist/esm/ic-date-picker.entry.js +1125 -0
  587. package/dist/esm/ic-date-picker.entry.js.map +1 -0
  588. package/dist/esm/ic-dialog.entry.js +54 -12
  589. package/dist/esm/ic-dialog.entry.js.map +1 -1
  590. package/dist/esm/ic-divider.entry.js +1 -1
  591. package/dist/esm/ic-empty-state_2.entry.js +383 -0
  592. package/dist/esm/ic-empty-state_2.entry.js.map +1 -0
  593. package/dist/esm/ic-footer-link-group.entry.js +4 -4
  594. package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
  595. package/dist/esm/ic-footer-link.entry.js +3 -3
  596. package/dist/esm/ic-footer-link.entry.js.map +1 -1
  597. package/dist/esm/ic-footer.entry.js +18 -7
  598. package/dist/esm/ic-footer.entry.js.map +1 -1
  599. package/dist/esm/ic-hero.entry.js +12 -2
  600. package/dist/esm/ic-hero.entry.js.map +1 -1
  601. package/dist/esm/ic-horizontal-scroll.entry.js +5 -5
  602. package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
  603. package/dist/esm/ic-input-component-container_4.entry.js +157 -0
  604. package/dist/esm/ic-input-component-container_4.entry.js.map +1 -0
  605. package/dist/esm/ic-link.entry.js +35 -17
  606. package/dist/esm/ic-link.entry.js.map +1 -1
  607. package/dist/esm/ic-menu-group.entry.js +2 -2
  608. package/dist/esm/ic-menu-group.entry.js.map +1 -1
  609. package/dist/esm/ic-menu-item.entry.js +21 -20
  610. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  611. package/dist/esm/ic-menu-with-multi.entry.js +2736 -0
  612. package/dist/esm/ic-menu-with-multi.entry.js.map +1 -0
  613. package/dist/esm/{ic-input-component-container_3.entry.js → ic-menu.entry.js} +19 -80
  614. package/dist/esm/ic-menu.entry.js.map +1 -0
  615. package/dist/esm/ic-navigation-button.entry.js +29 -8
  616. package/dist/esm/ic-navigation-button.entry.js.map +1 -1
  617. package/dist/esm/ic-navigation-group.entry.js +33 -23
  618. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  619. package/dist/esm/ic-navigation-item.entry.js +83 -37
  620. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  621. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  622. package/dist/esm/ic-page-header.entry.js +10 -10
  623. package/dist/esm/ic-page-header.entry.js.map +1 -1
  624. package/dist/esm/ic-pagination_4.entry.js +232 -117
  625. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  626. package/dist/esm/ic-popover-menu.entry.js +40 -36
  627. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  628. package/dist/esm/ic-radio-group.entry.js +100 -59
  629. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  630. package/dist/esm/ic-radio-option.entry.js +59 -42
  631. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  632. package/dist/esm/ic-search-bar.entry.js +22 -30
  633. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  634. package/dist/esm/ic-section-container.entry.js +1 -1
  635. package/dist/esm/ic-section-container.entry.js.map +1 -1
  636. package/dist/esm/ic-select-with-multi.entry.js +792 -0
  637. package/dist/esm/ic-select-with-multi.entry.js.map +1 -0
  638. package/dist/esm/ic-side-navigation.entry.js +53 -73
  639. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  640. package/dist/esm/ic-skeleton.entry.js +16 -35
  641. package/dist/esm/ic-skeleton.entry.js.map +1 -1
  642. package/dist/esm/ic-status-tag.entry.js +4 -2
  643. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  644. package/dist/esm/ic-step.entry.js +5 -2
  645. package/dist/esm/ic-step.entry.js.map +1 -1
  646. package/dist/esm/ic-stepper.entry.js +31 -9
  647. package/dist/esm/ic-stepper.entry.js.map +1 -1
  648. package/dist/esm/ic-switch.entry.js +7 -3
  649. package/dist/esm/ic-switch.entry.js.map +1 -1
  650. package/dist/esm/ic-tab-context.entry.js +78 -130
  651. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  652. package/dist/esm/ic-tab-group.entry.js +1 -1
  653. package/dist/esm/ic-tab-panel.entry.js +5 -13
  654. package/dist/esm/ic-tab-panel.entry.js.map +1 -1
  655. package/dist/esm/ic-tab.entry.js +16 -14
  656. package/dist/esm/ic-tab.entry.js.map +1 -1
  657. package/dist/esm/ic-theme.entry.js +13 -22
  658. package/dist/esm/ic-theme.entry.js.map +1 -1
  659. package/dist/esm/ic-toast-region.entry.js +6 -0
  660. package/dist/esm/ic-toast-region.entry.js.map +1 -1
  661. package/dist/esm/ic-toast.entry.js +21 -18
  662. package/dist/esm/ic-toast.entry.js.map +1 -1
  663. package/dist/esm/ic-toggle-button-group.entry.js +197 -0
  664. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -0
  665. package/dist/esm/ic-toggle-button.entry.js +93 -0
  666. package/dist/esm/ic-toggle-button.entry.js.map +1 -0
  667. package/dist/esm/ic-top-navigation.entry.js +60 -82
  668. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  669. package/dist/esm/ic-tree-item.entry.js +249 -0
  670. package/dist/esm/ic-tree-item.entry.js.map +1 -0
  671. package/dist/esm/ic-tree-view.entry.js +211 -0
  672. package/dist/esm/ic-tree-view.entry.js.map +1 -0
  673. package/dist/esm/ic-typography.entry.js +52 -15
  674. package/dist/esm/ic-typography.entry.js.map +1 -1
  675. package/dist/esm/index-93509377.js +48 -12
  676. package/dist/esm/loader.js +1 -1
  677. package/dist/types/components/ic-card-horizontal/ic-card-horizontal.d.ts +71 -0
  678. package/dist/types/components/ic-card-horizontal/ic-card-horizontal.stories.d.ts +82 -0
  679. package/dist/types/components/ic-card-horizontal/ic-card-horizontal.types.d.ts +1 -0
  680. package/dist/types/components/ic-data-table/ic-data-table.d.ts +218 -19
  681. package/dist/types/components/ic-data-table/ic-data-table.stories.d.ts +239 -0
  682. package/dist/types/components/ic-data-table/ic-data-table.types.d.ts +43 -0
  683. package/dist/types/components/ic-data-table/story-data.d.ts +492 -2
  684. package/dist/types/components/ic-data-table-title-bar/ic-data-table-title-bar.d.ts +36 -0
  685. package/dist/types/components/ic-data-table-title-bar/ic-data-table-title-bar.stories.d.ts +47 -0
  686. package/dist/types/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.d.ts +1 -0
  687. package/dist/types/components/ic-date-input/ic-date-input.d.ts +264 -0
  688. package/dist/types/components/ic-date-input/ic-date-input.stories.d.ts +124 -0
  689. package/dist/types/components/ic-date-input/story-data.d.ts +1 -0
  690. package/dist/types/components/ic-date-input/test/helpers/ic-date-input.d.ts +23 -0
  691. package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +262 -0
  692. package/dist/types/components/ic-date-picker/ic-date-picker.stories.d.ts +153 -0
  693. package/dist/types/components/ic-date-picker/ic-day-button.d.ts +16 -0
  694. package/dist/types/components/ic-date-picker/ic-month-picker.d.ts +14 -0
  695. package/dist/types/components/ic-date-picker/ic-year-picker.d.ts +16 -0
  696. package/dist/types/components/ic-date-picker/story-data.d.ts +24 -0
  697. package/dist/types/components/ic-date-picker/test/a11y/ic-date-picker.test.a11y.d.ts +1 -0
  698. package/dist/types/components/ic-menu-with-multi/ic-menu.d.ts +218 -0
  699. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +65 -23
  700. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.stories.d.ts +106 -0
  701. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.types.d.ts +4 -0
  702. package/dist/types/components/ic-select-with-multi/ic-select-multi.stories.d.ts +106 -0
  703. package/dist/types/components/ic-select-with-multi/ic-select.d.ts +289 -0
  704. package/dist/types/components/ic-select-with-multi/story-data.d.ts +32 -0
  705. package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +101 -0
  706. package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +51 -0
  707. package/dist/types/components/ic-tree-view/ic-tree-view.stories.d.ts +99 -0
  708. package/dist/types/components.d.ts +1711 -127
  709. package/dist/types/interface.d.ts +1 -0
  710. package/dist/types/utils/constants.d.ts +38 -0
  711. package/dist/types/utils/date-helpers.d.ts +22 -0
  712. package/dist/types/utils/helpers.d.ts +144 -2
  713. package/dist/types/utils/types.d.ts +126 -0
  714. package/hydrate/index.js +18298 -9132
  715. package/package.json +27 -17
  716. package/dist/cjs/helpers-bbe55215.js.map +0 -1
  717. package/dist/cjs/ic-empty-state.cjs.entry.js +0 -38
  718. package/dist/cjs/ic-empty-state.cjs.entry.js.map +0 -1
  719. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +0 -1
  720. package/dist/cjs/ic-input-label_2.cjs.entry.js +0 -86
  721. package/dist/cjs/ic-input-label_2.cjs.entry.js.map +0 -1
  722. package/dist/cjs/ic-pagination-bar.cjs.entry.js +0 -285
  723. package/dist/cjs/ic-pagination-bar.cjs.entry.js.map +0 -1
  724. package/dist/collection/components/ic-pagination/ic-pagination.types.js +0 -2
  725. package/dist/collection/components/ic-pagination/ic-pagination.types.js.map +0 -1
  726. package/dist/core/p-0083465b.entry.js +0 -2
  727. package/dist/core/p-0083465b.entry.js.map +0 -1
  728. package/dist/core/p-03487f12.entry.js +0 -2
  729. package/dist/core/p-03487f12.entry.js.map +0 -1
  730. package/dist/core/p-03f8fa1a.entry.js +0 -2
  731. package/dist/core/p-03f8fa1a.entry.js.map +0 -1
  732. package/dist/core/p-0c18b6a0.entry.js +0 -2
  733. package/dist/core/p-0c18b6a0.entry.js.map +0 -1
  734. package/dist/core/p-1bc034aa.entry.js +0 -2
  735. package/dist/core/p-1bc034aa.entry.js.map +0 -1
  736. package/dist/core/p-20a76d1d.entry.js +0 -2
  737. package/dist/core/p-20a76d1d.entry.js.map +0 -1
  738. package/dist/core/p-24945ee5.entry.js.map +0 -1
  739. package/dist/core/p-2dc35696.entry.js +0 -2
  740. package/dist/core/p-2dc35696.entry.js.map +0 -1
  741. package/dist/core/p-2e9e8e7c.entry.js.map +0 -1
  742. package/dist/core/p-3ee25a6d.entry.js +0 -2
  743. package/dist/core/p-3ee25a6d.entry.js.map +0 -1
  744. package/dist/core/p-41aa0ed3.entry.js.map +0 -1
  745. package/dist/core/p-4314aa0e.entry.js +0 -2
  746. package/dist/core/p-4314aa0e.entry.js.map +0 -1
  747. package/dist/core/p-4409f656.entry.js.map +0 -1
  748. package/dist/core/p-47abbd06.entry.js +0 -2
  749. package/dist/core/p-47abbd06.entry.js.map +0 -1
  750. package/dist/core/p-485823b6.entry.js +0 -2
  751. package/dist/core/p-485823b6.entry.js.map +0 -1
  752. package/dist/core/p-4ee59448.entry.js +0 -2
  753. package/dist/core/p-4ee59448.entry.js.map +0 -1
  754. package/dist/core/p-5157cfab.entry.js +0 -2
  755. package/dist/core/p-5157cfab.entry.js.map +0 -1
  756. package/dist/core/p-53083575.entry.js +0 -2
  757. package/dist/core/p-53083575.entry.js.map +0 -1
  758. package/dist/core/p-55d5541f.entry.js +0 -2
  759. package/dist/core/p-55d5541f.entry.js.map +0 -1
  760. package/dist/core/p-5bb32ee6.entry.js +0 -2
  761. package/dist/core/p-5bb32ee6.entry.js.map +0 -1
  762. package/dist/core/p-67eea079.entry.js +0 -2
  763. package/dist/core/p-67eea079.entry.js.map +0 -1
  764. package/dist/core/p-6bd0e984.entry.js +0 -2
  765. package/dist/core/p-6bd0e984.entry.js.map +0 -1
  766. package/dist/core/p-75bf6162.entry.js +0 -2
  767. package/dist/core/p-75bf6162.entry.js.map +0 -1
  768. package/dist/core/p-76959313.entry.js +0 -2
  769. package/dist/core/p-76959313.entry.js.map +0 -1
  770. package/dist/core/p-7de813a3.entry.js +0 -2
  771. package/dist/core/p-7de813a3.entry.js.map +0 -1
  772. package/dist/core/p-7eae5f70.entry.js +0 -2
  773. package/dist/core/p-7eae5f70.entry.js.map +0 -1
  774. package/dist/core/p-85508347.entry.js +0 -2
  775. package/dist/core/p-85508347.entry.js.map +0 -1
  776. package/dist/core/p-8da152c4.entry.js +0 -2
  777. package/dist/core/p-8da152c4.entry.js.map +0 -1
  778. package/dist/core/p-8fd4ca0a.js +0 -2
  779. package/dist/core/p-8fd4ca0a.js.map +0 -1
  780. package/dist/core/p-939baa93.entry.js.map +0 -1
  781. package/dist/core/p-9777ebb1.entry.js +0 -2
  782. package/dist/core/p-9777ebb1.entry.js.map +0 -1
  783. package/dist/core/p-9c27b73e.entry.js +0 -2
  784. package/dist/core/p-9c27b73e.entry.js.map +0 -1
  785. package/dist/core/p-9fa6844f.entry.js +0 -2
  786. package/dist/core/p-9fa6844f.entry.js.map +0 -1
  787. package/dist/core/p-9fdd7d73.entry.js +0 -2
  788. package/dist/core/p-9fdd7d73.entry.js.map +0 -1
  789. package/dist/core/p-a3ab9f4c.entry.js +0 -2
  790. package/dist/core/p-a3ab9f4c.entry.js.map +0 -1
  791. package/dist/core/p-a51e5c7c.entry.js +0 -2
  792. package/dist/core/p-a51e5c7c.entry.js.map +0 -1
  793. package/dist/core/p-a7481232.entry.js +0 -2
  794. package/dist/core/p-a7481232.entry.js.map +0 -1
  795. package/dist/core/p-ab9f8a3f.entry.js +0 -2
  796. package/dist/core/p-ab9f8a3f.entry.js.map +0 -1
  797. package/dist/core/p-b2aa3d7c.entry.js +0 -2
  798. package/dist/core/p-b2aa3d7c.entry.js.map +0 -1
  799. package/dist/core/p-b5cf6d65.entry.js +0 -2
  800. package/dist/core/p-b5cf6d65.entry.js.map +0 -1
  801. package/dist/core/p-baf81f30.entry.js.map +0 -1
  802. package/dist/core/p-bc187bb5.entry.js +0 -2
  803. package/dist/core/p-bc187bb5.entry.js.map +0 -1
  804. package/dist/core/p-bd9cecce.entry.js +0 -2
  805. package/dist/core/p-bd9cecce.entry.js.map +0 -1
  806. package/dist/core/p-be980606.entry.js +0 -2
  807. package/dist/core/p-be980606.entry.js.map +0 -1
  808. package/dist/core/p-c1256810.entry.js +0 -2
  809. package/dist/core/p-c1256810.entry.js.map +0 -1
  810. package/dist/core/p-d76cfa5a.entry.js +0 -2
  811. package/dist/core/p-d76cfa5a.entry.js.map +0 -1
  812. package/dist/core/p-e189f1d0.entry.js +0 -2
  813. package/dist/core/p-e189f1d0.entry.js.map +0 -1
  814. package/dist/core/p-e9e145aa.entry.js +0 -2
  815. package/dist/core/p-e9e145aa.entry.js.map +0 -1
  816. package/dist/core/p-f0e9a83f.entry.js +0 -2
  817. package/dist/core/p-f0e9a83f.entry.js.map +0 -1
  818. package/dist/core/p-f23d2102.entry.js +0 -2
  819. package/dist/core/p-f23d2102.entry.js.map +0 -1
  820. package/dist/core/p-f87e8411.entry.js +0 -2
  821. package/dist/core/p-f87e8411.entry.js.map +0 -1
  822. package/dist/esm/helpers-268c2b7f.js.map +0 -1
  823. package/dist/esm/ic-empty-state.entry.js.map +0 -1
  824. package/dist/esm/ic-input-component-container_3.entry.js.map +0 -1
  825. package/dist/esm/ic-input-label_2.entry.js +0 -81
  826. package/dist/esm/ic-input-label_2.entry.js.map +0 -1
  827. package/dist/esm/ic-pagination-bar.entry.js +0 -281
  828. package/dist/esm/ic-pagination-bar.entry.js.map +0 -1
  829. package/dist/types/components/ic-pagination/ic-pagination.types.d.ts +0 -6
  830. /package/dist/core/{p-b97dc365.entry.js.map → p-487fd924.entry.js.map} +0 -0
  831. /package/dist/core/{p-d77960f6.entry.js.map → p-656378ba.entry.js.map} +0 -0
  832. /package/dist/core/{p-3d618bc2.entry.js.map → p-d1045cd5.entry.js.map} +0 -0
@@ -0,0 +1,1599 @@
1
+ import { h, Host, Fragment, } from "@stencil/core";
2
+ import { createPopper } from "@popperjs/core";
3
+ import Check from "../../assets/check-icon.svg";
4
+ import { getOptionsWithoutGroupTitlesCount, isMacDevice, onComponentRequiredPropUndefined, } from "../../utils/helpers";
5
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
6
+ export class Menu {
7
+ constructor() {
8
+ this.activeDescendantAttr = "aria-activedescendant"; // Prevent duplicate literal string lint error
9
+ this.clearButtonId = "clear-button"; // Prevent duplicate literal string lint error
10
+ this.disabledOptionSelected = false;
11
+ this.hasPreviouslyBlurred = false;
12
+ this.hasTimedOut = false;
13
+ this.isLoading = false;
14
+ this.isMultiSelect = false;
15
+ this.isSearchBar = false;
16
+ this.isSearchableSelect = false;
17
+ this.lastOptionSelected = null; // Index of last option selected
18
+ this.lastOptionFocused = null; // Index of last option focused
19
+ this.multiOptionClicked = null;
20
+ this.preventClickOpen = false; // Prevents menu re-opening immediately after it is closed on blur when clicking input.
21
+ this.preventMenuFocus = false; // (When multiple) ensures focus moves straight to select all button from menu.
22
+ this.shiftPressed = false;
23
+ this.ungroupedOptions = [];
24
+ this.handleClearListener = () => {
25
+ this.optionHighlighted = "";
26
+ };
27
+ this.handleSubmitSearch = () => {
28
+ const highlightedOptionIndex = this.options.findIndex((option) => option[this.valueField] === this.optionHighlighted);
29
+ this.setInputValue(highlightedOptionIndex);
30
+ };
31
+ this.handleMenuChange = (open, focusInput) => {
32
+ this.menuStateChange.emit({ open, focusInput });
33
+ if (!open) {
34
+ if (focusInput !== false) {
35
+ this.inputEl.focus();
36
+ this.preventClickOpen = false;
37
+ }
38
+ // Reset optionHighlighted so previously highlighted option doesn't get reselected when Enter pressed
39
+ if (this.isMultiSelect) {
40
+ this.optionHighlighted = undefined;
41
+ this.multiOptionClicked = null;
42
+ }
43
+ }
44
+ };
45
+ this.setNextOptionValue = (selectedOptionIndex) => {
46
+ if (this.ungroupedOptions[selectedOptionIndex + 1]) {
47
+ this.menuOptionSelect.emit({
48
+ value: this.ungroupedOptions[selectedOptionIndex + 1][this.valueField],
49
+ optionId: this.getOptionId(this.ungroupedOptions[selectedOptionIndex + 1][this.valueField]),
50
+ });
51
+ }
52
+ else {
53
+ this.menuOptionSelect.emit({
54
+ value: this.ungroupedOptions[0][this.valueField],
55
+ optionId: this.getOptionId(this.ungroupedOptions[0][this.valueField]),
56
+ });
57
+ }
58
+ };
59
+ this.setPreviousOptionValue = (selectedOptionIndex) => {
60
+ if (this.ungroupedOptions[selectedOptionIndex - 1]) {
61
+ this.menuOptionSelect.emit({
62
+ value: this.ungroupedOptions[selectedOptionIndex - 1][this.valueField],
63
+ optionId: this.getOptionId(this.ungroupedOptions[selectedOptionIndex - 1][this.valueField]),
64
+ });
65
+ }
66
+ else {
67
+ this.menuOptionSelect.emit({
68
+ value: this.ungroupedOptions[this.ungroupedOptions.length - 1][this.valueField],
69
+ optionId: this.getOptionId(this.ungroupedOptions[this.ungroupedOptions.length - 1][this.valueField]),
70
+ });
71
+ }
72
+ };
73
+ this.getParentEl = (parent) => {
74
+ if (parent.tagName === "IC-SEARCH-BAR") {
75
+ this.isSearchBar = true;
76
+ }
77
+ else if (parent.tagName === "IC-SELECT" ||
78
+ parent.tagName === "IC-SELECT-WITH-MULTI") {
79
+ if (parent.getAttribute("searchable") !== null &&
80
+ parent.getAttribute("searchable") !== undefined) {
81
+ this.isSearchableSelect = true;
82
+ }
83
+ else if (parent.getAttribute("multiple") !== null &&
84
+ parent.getAttribute("multiple") !== undefined) {
85
+ this.isMultiSelect = true;
86
+ }
87
+ }
88
+ };
89
+ // Open menu when up or down arrow keys are pressed
90
+ this.arrowBehaviour = (event) => {
91
+ event.preventDefault();
92
+ this.handleMenuChange(true);
93
+ };
94
+ this.getMenuOptions = () => this.isSearchBar ? this.options : this.ungroupedOptions;
95
+ // Set option that is focused and so should show focus state
96
+ this.setHighlightedOption = (highlightedIndex) => {
97
+ const menuOptions = this.getMenuOptions();
98
+ menuOptions[highlightedIndex] &&
99
+ !menuOptions[highlightedIndex].timedOut &&
100
+ (this.optionHighlighted =
101
+ menuOptions[highlightedIndex][this.valueField] || undefined);
102
+ };
103
+ // Determines keyboard behaviour when selection is automatic
104
+ // (i.e. you don't have to press Enter select an option - just focus on it)
105
+ // and menu is closed
106
+ this.autoSetInputValueKeyboardOpen = (event) => {
107
+ const selectedOptionIndex = this.ungroupedOptions.findIndex((option) => option[this.valueField] === this.value);
108
+ this.keyboardNav = false;
109
+ switch (event.key) {
110
+ case "ArrowDown":
111
+ this.keyboardNav = true;
112
+ this.arrowBehaviour(event);
113
+ this.setNextOptionValue(selectedOptionIndex);
114
+ break;
115
+ case "ArrowUp":
116
+ this.keyboardNav = true;
117
+ this.arrowBehaviour(event);
118
+ this.setPreviousOptionValue(selectedOptionIndex);
119
+ break;
120
+ case " ":
121
+ case "Enter":
122
+ if (event.target.id !== this.clearButtonId) {
123
+ this.handleMenuChange(true);
124
+ }
125
+ break;
126
+ }
127
+ };
128
+ this.selectHighlightedOption = (target, options, highlightedOptionIndex) => {
129
+ if (!this.isLoading && !this.hasTimedOut) {
130
+ this.keyboardNav = true;
131
+ }
132
+ const isOpen = this.isSearchBar || this.isSearchableSelect || this.open;
133
+ if (isOpen) {
134
+ if (highlightedOptionIndex >= 0) {
135
+ if (options[highlightedOptionIndex] !== undefined) {
136
+ if (this.isSearchBar &&
137
+ options[highlightedOptionIndex].disabled === true) {
138
+ this.disabledOptionSelected = true;
139
+ }
140
+ else {
141
+ this.setInputValue(highlightedOptionIndex);
142
+ }
143
+ }
144
+ }
145
+ else {
146
+ this.setInputValue(highlightedOptionIndex);
147
+ }
148
+ }
149
+ else if (target.id !== this.clearButtonId &&
150
+ this.isMultiSelect) {
151
+ this.handleMenuChange(true);
152
+ }
153
+ };
154
+ // Check if option is selected based on the index of the option
155
+ this.isOptionSelected = (index) => {
156
+ const menuOptions = this.getMenuOptions();
157
+ return this.value
158
+ ? this.value.includes(menuOptions[index][this.valueField])
159
+ : false;
160
+ };
161
+ // Deselect currently selected options when shift pressed, but keep certain options selected
162
+ this.deselectSelectedOptions = (optionsToKeepSelected) => {
163
+ const menuOptions = this.getMenuOptions();
164
+ if (this.value) {
165
+ const selectedOptionIndexes = this.value.map((value) => {
166
+ return menuOptions.findIndex((option) => option[this.valueField] === value);
167
+ });
168
+ // Call setInputValue (which toggles the selected state) on options that need to be deselected
169
+ selectedOptionIndexes.forEach((index) => !optionsToKeepSelected.includes(index) && this.setInputValue(index));
170
+ }
171
+ };
172
+ // Determines keyboard behaviour when selection is manual (i.e. when you have to press Enter to select an option)
173
+ this.manualSetInputValueKeyboardOpen = (event) => {
174
+ const menuOptions = this.getMenuOptions();
175
+ // Prevent focus disappearing on currently focused option when Shift / Cmd / Ctrl pressed
176
+ // (i.e. when user is likely in the middle of executing a keyboard combination to select options)
177
+ if (!(event.shiftKey || event.metaKey || event.ctrlKey)) {
178
+ this.keyboardNav = false;
179
+ }
180
+ const highlightedOptionIndex = this.getOptionHighlightedIndex();
181
+ const clickedMultiOptionIndex = menuOptions.findIndex((option) => option[this.valueField] === this.multiOptionClicked);
182
+ const getOptionId = (index) => { var _a; return (_a = Array.from(this.el.querySelectorAll("li"))[index]) === null || _a === void 0 ? void 0 : _a.id; };
183
+ // Space press should be equivalent to Enter when multi-select
184
+ if (event.key === " " && this.isMultiSelect) {
185
+ this.handleOptionSelect(event, highlightedOptionIndex);
186
+ }
187
+ else {
188
+ switch (event.key) {
189
+ case "ArrowDown":
190
+ this.keyboardNav = true;
191
+ this.arrowBehaviour(event);
192
+ if (this.multiOptionClicked) {
193
+ // Set focus to option last clicked
194
+ // Prevents it resetting to the top of the menu when user switches to using keyboard
195
+ this.setHighlightedOption(clickedMultiOptionIndex);
196
+ this.multiOptionClicked = null;
197
+ }
198
+ else {
199
+ this.handleSingleShiftSelect(event, highlightedOptionIndex, menuOptions);
200
+ if (highlightedOptionIndex < menuOptions.length - 1) {
201
+ this.setHighlightedOption(highlightedOptionIndex + 1);
202
+ this.menuOptionId.emit({
203
+ optionId: getOptionId(highlightedOptionIndex + 1),
204
+ });
205
+ this.handleSingleShiftSelect(event, highlightedOptionIndex + 1, menuOptions);
206
+ }
207
+ else {
208
+ this.setHighlightedOption(0);
209
+ this.menuOptionId.emit({
210
+ optionId: getOptionId(0),
211
+ });
212
+ this.handleSingleShiftSelect(event, 0, menuOptions);
213
+ }
214
+ // Deselect currently selected options if arrow was pressed for first time after shift is held
215
+ if (this.isMultiSelect && this.shiftPressed) {
216
+ this.deselectSelectedOptions([
217
+ highlightedOptionIndex,
218
+ this.getOptionHighlightedIndex(),
219
+ ]);
220
+ this.shiftPressed = false;
221
+ }
222
+ }
223
+ this.lastOptionFocused = this.getOptionHighlightedIndex();
224
+ this.preventIncorrectTabOrder = false;
225
+ this.focusFromSearchKeypress = false;
226
+ break;
227
+ case "ArrowUp":
228
+ this.keyboardNav = true;
229
+ this.arrowBehaviour(event);
230
+ if (this.multiOptionClicked) {
231
+ // Set focus to option last clicked
232
+ // Prevents it resetting to the bottom of the menu when user switches to using keyboard
233
+ this.setHighlightedOption(clickedMultiOptionIndex);
234
+ this.multiOptionClicked = null;
235
+ }
236
+ else {
237
+ this.handleSingleShiftSelect(event, highlightedOptionIndex, menuOptions);
238
+ if (highlightedOptionIndex <= 0 ||
239
+ highlightedOptionIndex > menuOptions.length + 1) {
240
+ this.setHighlightedOption(menuOptions.length - 1);
241
+ this.menuOptionId.emit({
242
+ optionId: getOptionId(menuOptions.length - 1),
243
+ });
244
+ this.handleSingleShiftSelect(event, menuOptions.length - 1, menuOptions);
245
+ }
246
+ else {
247
+ this.setHighlightedOption(highlightedOptionIndex - 1);
248
+ this.menuOptionId.emit({
249
+ optionId: getOptionId(highlightedOptionIndex - 1),
250
+ });
251
+ this.handleSingleShiftSelect(event, highlightedOptionIndex - 1, menuOptions);
252
+ }
253
+ // Deselect currently selected options if arrow was pressed for first time after shift is held
254
+ if (this.isMultiSelect && this.shiftPressed) {
255
+ this.deselectSelectedOptions([
256
+ highlightedOptionIndex,
257
+ this.getOptionHighlightedIndex(),
258
+ ]);
259
+ this.shiftPressed = false;
260
+ }
261
+ }
262
+ this.lastOptionFocused = this.getOptionHighlightedIndex();
263
+ this.preventIncorrectTabOrder = false;
264
+ this.focusFromSearchKeypress = false;
265
+ break;
266
+ case "Home": {
267
+ const startOptionIndex = 0;
268
+ this.keyboardNav = true;
269
+ event.preventDefault();
270
+ this.arrowBehaviour(event);
271
+ this.setHighlightedOption(startOptionIndex);
272
+ this.menuOptionId.emit({
273
+ optionId: getOptionId(startOptionIndex),
274
+ });
275
+ if (event.shiftKey && event.ctrlKey) {
276
+ this.handleMultipleShiftSelect(startOptionIndex);
277
+ }
278
+ this.lastOptionFocused = startOptionIndex;
279
+ this.lastOptionSelected = startOptionIndex;
280
+ break;
281
+ }
282
+ case "End": {
283
+ const endOptionIndex = menuOptions.length - 1;
284
+ this.keyboardNav = true;
285
+ event.preventDefault();
286
+ this.arrowBehaviour(event);
287
+ this.setHighlightedOption(endOptionIndex);
288
+ this.menuOptionId.emit({
289
+ optionId: getOptionId(endOptionIndex),
290
+ });
291
+ if (event.shiftKey && event.ctrlKey) {
292
+ this.handleMultipleShiftSelect(endOptionIndex);
293
+ }
294
+ this.lastOptionFocused = endOptionIndex;
295
+ this.lastOptionSelected = endOptionIndex;
296
+ break;
297
+ }
298
+ case " ":
299
+ if (this.isSearchBar || this.isSearchableSelect) {
300
+ break;
301
+ }
302
+ else {
303
+ if (event.target.id !== this.clearButtonId) {
304
+ this.handleMenuChange(true);
305
+ }
306
+ }
307
+ break;
308
+ case "Enter":
309
+ event.preventDefault();
310
+ this.handleOptionSelect(event, highlightedOptionIndex);
311
+ break;
312
+ case "Escape":
313
+ if (this.open) {
314
+ event.stopImmediatePropagation();
315
+ }
316
+ this.handleMenuChange(false);
317
+ this.menuOptionId.emit({ optionId: undefined });
318
+ break;
319
+ case "a":
320
+ // Checks if Cmd (meta) key is pressed if Mac device (while excluding meta key on Windows)
321
+ // Otherwise, if a different OS, checks Ctrl key
322
+ if ((isMacDevice() && event.metaKey) ||
323
+ (!isMacDevice() && event.ctrlKey)) {
324
+ this.emitSelectAll();
325
+ this.lastOptionFocused = null;
326
+ this.lastOptionSelected = null;
327
+ }
328
+ break;
329
+ case "Shift":
330
+ case "Tab":
331
+ if (event.key === "Shift") {
332
+ this.shiftPressed = true;
333
+ }
334
+ if (this.isSearchBar) {
335
+ this.keyboardNav = true;
336
+ }
337
+ if (this.isMultiSelect) {
338
+ if (this.open && !event.shiftKey && this.selectAllButton) {
339
+ event.preventDefault();
340
+ this.selectAllButton.focus(); // Move focus to select all button instead of focused option
341
+ this.preventMenuFocus = true;
342
+ this.preventClickOpen = true;
343
+ this.optionHighlighted = undefined; // Stop any option focus states showing when focus moved to select all button
344
+ }
345
+ }
346
+ else {
347
+ this.preventIncorrectTabOrder = true;
348
+ }
349
+ break;
350
+ case "Backspace":
351
+ if (this.isSearchBar) {
352
+ this.parentEl.setFocus();
353
+ if (this.searchMode === "navigation")
354
+ this.setHighlightedOption(0);
355
+ }
356
+ else if (this.isSearchableSelect) {
357
+ this.parentEl.setFocus();
358
+ }
359
+ this.focusFromSearchKeypress = true;
360
+ break;
361
+ default:
362
+ if (event.key !== "Tab") {
363
+ if (this.isSearchBar) {
364
+ this.parentEl.setFocus();
365
+ if (this.searchMode === "navigation")
366
+ this.setHighlightedOption(0);
367
+ }
368
+ else if (this.isSearchableSelect) {
369
+ this.parentEl.setFocus();
370
+ }
371
+ this.focusFromSearchKeypress = true;
372
+ break;
373
+ }
374
+ }
375
+ }
376
+ };
377
+ this.setInputValue = (highlightedOptionIndex) => {
378
+ const menuOptions = this.getMenuOptions();
379
+ if (menuOptions[highlightedOptionIndex] !== undefined) {
380
+ this.menuOptionSelect.emit({
381
+ value: menuOptions[highlightedOptionIndex][this.valueField],
382
+ });
383
+ if (this.closeOnSelect) {
384
+ this.optionHighlighted = undefined;
385
+ this.menuOptionId.emit({ optionId: undefined });
386
+ }
387
+ }
388
+ if (this.closeOnSelect) {
389
+ if (!this.hasTimedOut) {
390
+ this.handleMenuChange(false);
391
+ }
392
+ else {
393
+ this.parentEl.setFocus();
394
+ }
395
+ }
396
+ };
397
+ this.handleOptionClick = (event) => {
398
+ const { value, label } = event.target.dataset;
399
+ if (this.isMultiSelect) {
400
+ const menuOptions = this.getMenuOptions();
401
+ const selectedOptionIndex = menuOptions.findIndex((option) => option.value === value);
402
+ this.handleOptionSelect(event, selectedOptionIndex, true);
403
+ this.multiOptionClicked = value;
404
+ }
405
+ else {
406
+ this.menuOptionSelect.emit({ value, label });
407
+ this.handleMenuChange(false);
408
+ }
409
+ this.optionHighlighted = undefined;
410
+ };
411
+ this.handleRetry = () => {
412
+ this.retryButtonClicked.emit({ value: this.value });
413
+ };
414
+ this.handleRetryKeyDown = (ev) => {
415
+ if (ev.key === "Enter" || ev.key === " ") {
416
+ ev.preventDefault();
417
+ this.retryButtonClicked.emit({ value: this.value, keyPressed: ev.key });
418
+ }
419
+ };
420
+ this.handleBlur = (event) => {
421
+ if (event.relatedTarget !== this.inputEl) {
422
+ if (event.relatedTarget === this.selectAllButton) {
423
+ this.menu.removeAttribute(this.activeDescendantAttr);
424
+ }
425
+ if (!(this.menu.contains(event.relatedTarget) ||
426
+ event.relatedTarget === this.selectAllButton)) {
427
+ this.handleMenuChange(false, this.hasPreviouslyBlurred);
428
+ this.menu.removeAttribute(this.activeDescendantAttr);
429
+ this.lastOptionFocused = null;
430
+ this.lastOptionSelected = null;
431
+ }
432
+ }
433
+ else {
434
+ this.handleMenuChange(false);
435
+ this.preventClickOpen = true;
436
+ this.menu.removeAttribute(this.activeDescendantAttr);
437
+ this.lastOptionFocused = null;
438
+ this.lastOptionSelected = null;
439
+ }
440
+ if (!this.isSearchBar)
441
+ this.hasPreviouslyBlurred = !!event.relatedTarget;
442
+ };
443
+ this.handleMouseDown = (event) => {
444
+ event.preventDefault();
445
+ };
446
+ this.handleMenuKeyDown = (event) => {
447
+ if (this.activationType === "automatic") {
448
+ this.autoSetValueOnMenuKeyDown(event);
449
+ }
450
+ else if (this.activationType === "manual" && !this.isSearchBar) {
451
+ this.manualSetInputValueKeyboardOpen(event);
452
+ }
453
+ };
454
+ this.handleMenuKeyUp = (event) => {
455
+ if (event.key === "Tab" && event.shiftKey) {
456
+ this.preventClickOpen = false;
457
+ }
458
+ if (event.key === "Enter" && this.disabledOptionSelected) {
459
+ this.disabledOptionSelected = false;
460
+ event.stopImmediatePropagation();
461
+ }
462
+ if (event.key === "Shift") {
463
+ this.shiftPressed = false;
464
+ }
465
+ };
466
+ this.handleSelectAllClick = () => {
467
+ this.keyboardNav = false;
468
+ this.menu.focus();
469
+ this.emitSelectAll();
470
+ this.lastOptionFocused = null;
471
+ this.lastOptionSelected = null;
472
+ };
473
+ this.handleSelectAllBlur = (event) => {
474
+ this.el.classList.remove("select-all-focused");
475
+ if (!this.menu.contains(event.relatedTarget)) {
476
+ this.handleMenuChange(false, false);
477
+ }
478
+ };
479
+ this.handleSelectAllFocus = () => {
480
+ this.el.classList.add("select-all-focused");
481
+ this.lastOptionFocused = null;
482
+ this.lastOptionSelected = null;
483
+ };
484
+ // Fix for Safari - select all button click was causing menu to close
485
+ this.handleSelectAllMouseDown = (event) => {
486
+ event.preventDefault();
487
+ };
488
+ // When shift key is being used to select contiguous options one by one on a multi-select
489
+ // I.e. holding shift and pressing up and down arrow keys
490
+ this.handleSingleShiftSelect = (event, optionToSelectIndex, options) => {
491
+ if (this.isMultiSelect &&
492
+ event.shiftKey &&
493
+ !this.isOptionSelected(optionToSelectIndex)) {
494
+ this.selectHighlightedOption(event.target, options, optionToSelectIndex);
495
+ this.lastOptionSelected = optionToSelectIndex;
496
+ }
497
+ };
498
+ // When shift key is being used to select multiple options at once on a multi-select
499
+ // I.e. holding shift when selecting another option
500
+ this.handleMultipleShiftSelect = (lastOptionInSelection, useFocusForSelection = false, firstOptionSelected = null) => {
501
+ this.shiftPressed = false;
502
+ const firstOptionInSelection = firstOptionSelected === null
503
+ ? this.getFirstOptionInSelection(useFocusForSelection)
504
+ : firstOptionSelected;
505
+ if (firstOptionInSelection !== null) {
506
+ const optionsToSelect = [];
507
+ if (firstOptionInSelection < lastOptionInSelection) {
508
+ for (let i = firstOptionInSelection; i < lastOptionInSelection + 1; i++) {
509
+ optionsToSelect.push(i);
510
+ }
511
+ }
512
+ else {
513
+ for (let i = firstOptionInSelection; i > lastOptionInSelection - 1; i--) {
514
+ optionsToSelect.push(i);
515
+ }
516
+ }
517
+ optionsToSelect.forEach((optionIndex) => !this.isOptionSelected(optionIndex) && this.setInputValue(optionIndex));
518
+ this.deselectSelectedOptions(optionsToSelect);
519
+ }
520
+ };
521
+ this.handleOptionSelect = (event, optionIndex, useFocusForSelection = false) => {
522
+ const menuOptions = this.getMenuOptions();
523
+ const firstOptionInSelection = this.getFirstOptionInSelection(useFocusForSelection);
524
+ if (event.shiftKey && firstOptionInSelection !== null) {
525
+ this.handleMultipleShiftSelect(optionIndex, useFocusForSelection, firstOptionInSelection);
526
+ }
527
+ else {
528
+ this.selectHighlightedOption(event.target, menuOptions, optionIndex);
529
+ }
530
+ this.lastOptionFocused = optionIndex;
531
+ this.lastOptionSelected = optionIndex;
532
+ };
533
+ this.getFirstOptionInSelection = (useFocusForSelection) => {
534
+ return useFocusForSelection && this.lastOptionFocused !== null
535
+ ? this.lastOptionFocused
536
+ : this.lastOptionSelected !== null
537
+ ? this.lastOptionSelected
538
+ : null;
539
+ };
540
+ this.emitSelectAll = () => {
541
+ var _a;
542
+ // Select all if there is either no value or not all options are selected
543
+ // 'true' means select all, 'false' means clear all
544
+ this.menuOptionSelectAll.emit({
545
+ select: !this.value || !(((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) === this.ungroupedOptions.length),
546
+ });
547
+ };
548
+ this.emitMenuKeyPress = (isNavKey, key) => {
549
+ this.menuKeyPress.emit({ isNavKey: isNavKey, key: key });
550
+ };
551
+ // Determines keyboard behaviour when selection is automatic
552
+ // (i.e. you don't have to press Enter select an option - just focus on it)
553
+ // and menu is focused
554
+ this.autoSetValueOnMenuKeyDown = (event) => {
555
+ event.cancelBubble = true;
556
+ const selectedOptionIndex = this.ungroupedOptions.findIndex((option) => option[this.valueField] === this.value);
557
+ const isSearchableSelect = this.inputEl.tagName === "INPUT";
558
+ this.keyboardNav = false;
559
+ switch (event.key) {
560
+ case " ":
561
+ event.preventDefault();
562
+ break;
563
+ case "ArrowUp":
564
+ if (!this.hasTimedOut) {
565
+ event.preventDefault();
566
+ this.setPreviousOptionValue(selectedOptionIndex);
567
+ this.keyboardNav = true;
568
+ }
569
+ break;
570
+ case "ArrowDown":
571
+ if (!this.hasTimedOut) {
572
+ event.preventDefault();
573
+ this.setNextOptionValue(selectedOptionIndex);
574
+ this.keyboardNav = true;
575
+ }
576
+ break;
577
+ case "Home":
578
+ this.menuOptionSelect.emit({
579
+ value: this.ungroupedOptions[0][this.valueField],
580
+ });
581
+ this.keyboardNav = true;
582
+ break;
583
+ case "End":
584
+ this.menuOptionSelect.emit({
585
+ value: this.ungroupedOptions[this.ungroupedOptions.length - 1][this.valueField],
586
+ });
587
+ this.keyboardNav = true;
588
+ break;
589
+ case "Enter":
590
+ !this.hasTimedOut && this.handleMenuChange(false);
591
+ break;
592
+ case "Escape":
593
+ this.handleMenuChange(false);
594
+ break;
595
+ case "Backspace":
596
+ if (isSearchableSelect) {
597
+ this.inputEl.focus();
598
+ }
599
+ break;
600
+ case "Shift":
601
+ break;
602
+ default:
603
+ if (isSearchableSelect && event.key !== "Tab" && !this.hasTimedOut) {
604
+ this.inputEl.focus();
605
+ }
606
+ if (event.key.length === 1) {
607
+ this.keyboardNav = true;
608
+ }
609
+ break;
610
+ }
611
+ this.emitMenuKeyPress(this.keyboardNav, event.key);
612
+ };
613
+ this.getOptionId = (value) => {
614
+ return `${this.menuId}-${value}`;
615
+ };
616
+ this.getOptionAriaLabel = (option, parentOption) => {
617
+ let ariaLabel = option[this.labelField];
618
+ if (option.description) {
619
+ ariaLabel = `${ariaLabel}, ${option.description}`;
620
+ }
621
+ if (option.element) {
622
+ ariaLabel = `${ariaLabel}, ${option.element.ariaLabel}`;
623
+ }
624
+ if (parentOption) {
625
+ return `${ariaLabel}, ${parentOption[this.labelField]} group`;
626
+ }
627
+ else {
628
+ return ariaLabel;
629
+ }
630
+ };
631
+ this.getSortedOptions = (options) => {
632
+ let sorted = [];
633
+ if (options.sort) {
634
+ sorted = options.sort((optionA, optionB) => optionA.recommended && !optionB.recommended ? -1 : 0);
635
+ }
636
+ return sorted;
637
+ };
638
+ this.getOptionHighlightedIndex = () => {
639
+ const menuOptions = this.getMenuOptions();
640
+ return menuOptions.findIndex((option) => option[this.valueField] === this.optionHighlighted);
641
+ };
642
+ this.isManualMode = this.activationType === "manual";
643
+ this.scrollToSelected = (menu) => {
644
+ const selectedOption = this.selectOnEnter
645
+ ? this.el.querySelector(`li[data-value="${this.optionHighlighted}"]`)
646
+ : menu.querySelector(".option[aria-selected='true']");
647
+ if (selectedOption) {
648
+ const elTop = selectedOption.offsetTop + selectedOption.offsetHeight;
649
+ if (elTop > menu.scrollTop + menu.offsetHeight ||
650
+ elTop < menu.scrollTop + menu.offsetHeight) {
651
+ menu.scrollTop = selectedOption.offsetTop;
652
+ }
653
+ // 'aria-activedescendant' affects screen reader focus
654
+ // https://www.w3.org/TR/2017/WD-wai-aria-practices-1.1-20170628/#kbd_focus_activedescendant
655
+ this.menu.setAttribute(this.activeDescendantAttr, selectedOption.id);
656
+ selectedOption.focus();
657
+ }
658
+ };
659
+ // Set 'ungroupedOptions' variable and emit its value
660
+ // - this is all the options with disabled options and group titles removed
661
+ this.loadUngroupedOptions = () => {
662
+ if (this.options.length > 0 && this.options.map) {
663
+ this.options.map((option) => {
664
+ if (option.children) {
665
+ option.children.map((option) => !option.disabled && this.ungroupedOptions.push(option));
666
+ }
667
+ else if (!option.disabled) {
668
+ this.ungroupedOptions.push(option);
669
+ }
670
+ });
671
+ }
672
+ this.ungroupedOptions = this.getSortedOptions(this.ungroupedOptions);
673
+ this.ungroupedOptionsSet.emit({ options: this.ungroupedOptions });
674
+ };
675
+ this.setMenuScrollbar = () => {
676
+ let optionsHeight = 0;
677
+ this.el
678
+ .querySelectorAll(".option")
679
+ .forEach((option) => (optionsHeight += option.clientHeight));
680
+ if (optionsHeight >= 320) {
681
+ this.menu.classList.add("menu-scroll");
682
+ }
683
+ };
684
+ this.handleTimeoutBlur = (ev) => {
685
+ this.timeoutBlur.emit({ ev });
686
+ };
687
+ this.optionContent = (option, selected) => {
688
+ return (h(Fragment, null, option.loading && h("ic-loading-indicator", { size: "icon" }), h("div", { class: "option-text-container" }, h("div", { class: "option-label" }, option.icon && (h("div", { class: "option-icon", innerHTML: option.icon, "aria-hidden": "true" })), h("ic-typography", { variant: "body", "aria-hidden": "true" }, h("p", null, option[this.labelField]))), option.description && (h("ic-typography", { id: `${this.getOptionId(option[this.valueField])}-description`, class: "option-description", variant: "caption", "aria-hidden": "true" }, h("p", null, option.description))), option.element && (h("div", { class: "option-element", innerHTML: option.element.component, "aria-hidden": "true" }))), !!option[this.valueField] &&
689
+ !!this.value &&
690
+ selected &&
691
+ this.parentEl.tagName !== "IC-SEARCH-BAR" && (h("span", { class: "check-icon", innerHTML: Check }))));
692
+ };
693
+ this.displayOption = (option, selected, index, parentOption) => {
694
+ const { open, keyboardNav, isManualMode, initialOptionsListRender, optionHighlighted, options, } = this;
695
+ return (h("li", { id: this.getOptionId(option[this.valueField]), class: {
696
+ option: true,
697
+ "focused-option": isManualMode
698
+ ? (keyboardNav || initialOptionsListRender) &&
699
+ option[this.valueField] === optionHighlighted
700
+ : keyboardNav && selected,
701
+ "last-recommended-option": option.recommended &&
702
+ options[index + 1] &&
703
+ !options[index + 1].recommended,
704
+ "disabled-option": option.disabled,
705
+ "loading-option": option.loading,
706
+ timeout: option.timedOut,
707
+ }, role: "option", tabindex: open &&
708
+ (selected || option[this.valueField] === optionHighlighted) &&
709
+ keyboardNav
710
+ ? "0"
711
+ : "-1", "aria-label": this.getOptionAriaLabel(option, parentOption), "aria-selected": selected ? "true" : "false", "aria-disabled": option.disabled ? "true" : "false", onClick: !option.timedOut && !option.loading && this.handleOptionClick, onBlur: this.handleBlur, onMouseDown: this.handleMouseDown, "data-value": option[this.valueField], "data-label": option[this.labelField] }, option.timedOut ? (h(Fragment, null, h("div", { class: "loading-error-info" }, h("svg", { class: "error-icon-svg", "aria-labelledby": "error-title", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "#000000" }, h("title", { id: "error-title" }, "Error"), h("g", { id: "close-octagon" }, h("path", { id: "Vector", d: "M8.77 3L3.5 8.27V15.73L8.77 21H16.23L21.5 15.73V8.27L16.23 3M8.91 7L12.5 10.59L16.09 7L17.5 8.41L13.91 12L17.5 15.59L16.09 17L12.5 13.41L8.91 17L7.5 15.59L11.09 12L7.5 8.41" }))), h("ic-typography", { variant: "label" }, option[this.labelField])), h("ic-button", { size: "small", variant: "tertiary", onClick: this.handleRetry, onKeyDown: this.handleRetryKeyDown, onBlur: this.handleTimeoutBlur, id: "retry-button" }, "Retry"))) : (this.optionContent(option, selected))));
712
+ };
713
+ this.focusFromSearchKeypress = false;
714
+ this.initialOptionsListRender = false;
715
+ this.keyboardNav = false;
716
+ this.optionHighlighted = undefined;
717
+ this.preventIncorrectTabOrder = false;
718
+ this.menuOptions = undefined;
719
+ this.activationType = "automatic";
720
+ this.anchorEl = undefined;
721
+ this.autoFocusOnSelected = true;
722
+ this.closeOnSelect = true;
723
+ this.fullWidth = false;
724
+ this.inputEl = undefined;
725
+ this.inputLabel = undefined;
726
+ this.labelField = "label";
727
+ this.menuId = undefined;
728
+ this.open = undefined;
729
+ this.parentEl = undefined;
730
+ this.searchMode = "navigation";
731
+ this.selectOnEnter = false;
732
+ this.size = "default";
733
+ this.small = false;
734
+ this.options = undefined;
735
+ this.value = undefined;
736
+ this.valueField = "value";
737
+ }
738
+ watchOpenHandler() {
739
+ if (!this.open && this.popperInstance) {
740
+ this.popperInstance.destroy();
741
+ this.popperInstance = null;
742
+ }
743
+ }
744
+ watchOptionsHandler(newOptions) {
745
+ this.hasTimedOut = newOptions.some((opt) => opt.timedOut);
746
+ this.isLoading = newOptions.some((opt) => opt.loading);
747
+ this.ungroupedOptions = [];
748
+ this.loadUngroupedOptions();
749
+ }
750
+ connectedCallback() {
751
+ this.getParentEl(this.parentEl);
752
+ if (this.isSearchBar) {
753
+ if (this.searchMode === "navigation")
754
+ this.setHighlightedOption(0);
755
+ this.initialOptionsListRender = true;
756
+ }
757
+ }
758
+ disconnectedCallback() {
759
+ if (this.popperInstance) {
760
+ this.popperInstance.destroy();
761
+ }
762
+ this.parentEl.removeEventListener("icClear", this.handleClearListener);
763
+ this.parentEl.removeEventListener("icSubmitSearch", this.handleSubmitSearch);
764
+ }
765
+ componentWillLoad() {
766
+ var _a, _b;
767
+ this.loadUngroupedOptions();
768
+ this.parentEl.addEventListener("icClear", this.handleClearListener);
769
+ this.parentEl.addEventListener("icSubmitSearch", this.handleSubmitSearch);
770
+ this.hasTimedOut = (_a = this.options) === null || _a === void 0 ? void 0 : _a.some((opt) => opt.timedOut);
771
+ this.isLoading = (_b = this.options) === null || _b === void 0 ? void 0 : _b.some((opt) => opt.loading);
772
+ }
773
+ componentDidLoad() {
774
+ if (this.isSearchBar &&
775
+ this.parentEl.disableFilter) {
776
+ this.focusFromSearchKeypress = true;
777
+ }
778
+ onComponentRequiredPropUndefined([
779
+ { prop: this.open, propName: "open" },
780
+ { prop: this.options, propName: "options" },
781
+ { prop: this.menuId, propName: "menu-id" },
782
+ { prop: this.inputLabel, propName: "input-label" },
783
+ //NOTE: no check for value, input-el or anchor-el as otherwise get console errors on first load of select component
784
+ ], "Menu");
785
+ }
786
+ componentDidUpdate() {
787
+ const inputValueInOptions = this.options.some((option) => option[this.valueField] === this.value);
788
+ const optionHighlightedIsSet = this.optionHighlighted !== null &&
789
+ this.optionHighlighted !== undefined &&
790
+ this.optionHighlighted !== "";
791
+ if (this.open && this.options.length !== 0 && !this.preventMenuFocus) {
792
+ if (this.value &&
793
+ this.keyboardNav &&
794
+ inputValueInOptions &&
795
+ this.autoFocusOnSelected &&
796
+ !this.isSearchableSelect) {
797
+ this.scrollToSelected(this.menu);
798
+ }
799
+ else if (optionHighlightedIsSet &&
800
+ !this.focusFromSearchKeypress &&
801
+ !this.preventIncorrectTabOrder) {
802
+ const highlightedEl = this.el.querySelector(`li[data-value="${this.optionHighlighted}"]`);
803
+ if (highlightedEl) {
804
+ this.menu.setAttribute(this.activeDescendantAttr, highlightedEl.id);
805
+ highlightedEl.focus();
806
+ }
807
+ }
808
+ else if (this.inputEl.tagName !== "IC-TEXT-FIELD" &&
809
+ this.inputEl.tagName !== "INPUT") {
810
+ this.menu.focus();
811
+ }
812
+ }
813
+ if (this.open && !this.value && this.selectOnEnter) {
814
+ this.scrollToSelected(this.menu);
815
+ }
816
+ this.preventMenuFocus = false;
817
+ }
818
+ componentDidRender() {
819
+ if (this.open && !this.popperInstance && this.anchorEl) {
820
+ this.initPopperJs(this.anchorEl);
821
+ }
822
+ if (this.open && !!this.options.length) {
823
+ this.setMenuScrollbar();
824
+ }
825
+ }
826
+ /**
827
+ * @internal If menu is opened with the mouse, emit menuStateChange custom event.
828
+ */
829
+ async handleClickOpen() {
830
+ if (!this.preventClickOpen) {
831
+ this.menuStateChange.emit({ open: !this.open });
832
+ this.keyboardNav = false;
833
+ }
834
+ this.preventClickOpen = false;
835
+ }
836
+ /**
837
+ * Used alongside activationType
838
+ * If menu is opened via keyboard navigation (i.e. Enter, ArrowUp or ArrowDown), emit optionSelect custom event.
839
+ * @param {KeyboardEvent} event - keyboard event
840
+ */
841
+ async handleKeyboardOpen(event) {
842
+ this.keyboardNav = false;
843
+ if (this.activationType === "automatic") {
844
+ this.autoSetInputValueKeyboardOpen(event);
845
+ }
846
+ else {
847
+ this.manualSetInputValueKeyboardOpen(event);
848
+ }
849
+ }
850
+ /**
851
+ * @internal Used to highlight the first option in the menu.
852
+ */
853
+ async handleSetFirstOption() {
854
+ this.setHighlightedOption(0);
855
+ }
856
+ /**
857
+ * @internal Used to initialize popperJS with an anchor element.
858
+ * 5/12/2023: Tested with Floating UI, however, discovered inconsistent
859
+ * boundary behaviour so sticking with PopperJS.
860
+ */
861
+ async initPopperJs(anchor) {
862
+ // Placements set to "-start" to accommodate for custom menu width - menu should always be aligned to the left
863
+ this.popperInstance = createPopper(anchor, this.el, {
864
+ placement: "bottom-start",
865
+ modifiers: [
866
+ {
867
+ name: "offset",
868
+ options: {
869
+ offset: [0, 7],
870
+ },
871
+ },
872
+ {
873
+ name: "flip",
874
+ options: {
875
+ fallbackPlacements: ["top-start"],
876
+ rootBoundary: "viewport",
877
+ },
878
+ },
879
+ ],
880
+ });
881
+ }
882
+ render() {
883
+ const { inputLabel, options, menuId, value, fullWidth, hasTimedOut, isLoading, size, small, open, inputEl, keyboardNav, } = this;
884
+ const selectAllButtonText = `${(value === null || value === void 0 ? void 0 : value.length) === this.ungroupedOptions.length ? "Clear" : "Select"} all`;
885
+ const hasNoResults = this.el.classList.contains("no-results");
886
+ return (h(Host, { class: {
887
+ "full-width": fullWidth,
888
+ "no-focus": (inputEl === null || inputEl === void 0 ? void 0 : inputEl.tagName) === "INPUT" ||
889
+ hasTimedOut ||
890
+ isLoading ||
891
+ hasNoResults,
892
+ small: small,
893
+ [size]: true,
894
+ open: open && options.length !== 0,
895
+ multiple: this.isMultiSelect,
896
+ } }, options.length !== 0 && (h("ul", { id: menuId, class: "menu", role: "listbox", "aria-label": `${inputLabel} pop-up`, "aria-multiselectable": this.isMultiSelect ? "true" : "false", tabindex: open && !keyboardNav && (inputEl === null || inputEl === void 0 ? void 0 : inputEl.tagName) !== "INPUT" ? "0" : "-1", ref: (el) => (this.menu = el), onKeyDown: this.handleMenuKeyDown, onKeyUp: this.handleMenuKeyUp, onBlur: this.handleBlur }, this.getSortedOptions(options).map((option, index) => {
897
+ if (option.children) {
898
+ if (option.children.length > 0) {
899
+ return (h("div", null, h("ic-typography", { class: "option-group-title", role: "presentation", variant: "subtitle-small" }, h("p", null, option[this.labelField])), option.children.map((childOption) => childOption.label &&
900
+ this.displayOption(childOption, this.isMultiSelect
901
+ ? value === null || value === void 0 ? void 0 : value.includes(childOption[this.valueField])
902
+ : childOption[this.valueField] === value, index, option))));
903
+ }
904
+ else {
905
+ return null;
906
+ }
907
+ }
908
+ else {
909
+ // Display option only if it has a label (rather than displaying an empty space)
910
+ return (option.label &&
911
+ this.displayOption(option, this.isMultiSelect
912
+ ? value === null || value === void 0 ? void 0 : value.includes(option[this.valueField])
913
+ : option[this.valueField] === value, index));
914
+ }
915
+ }))), options.length !== 0 &&
916
+ this.isMultiSelect &&
917
+ !isLoading &&
918
+ !hasTimedOut &&
919
+ !hasNoResults && (h("div", { class: "option-bar" }, h("ic-typography", null, h("p", null, `${value ? value.length : 0}/${getOptionsWithoutGroupTitlesCount(this.options)} selected`)), h("ic-button", { class: "select-all-button", "aria-label": `${selectAllButtonText} options for ${inputLabel}`, ref: (el) => (this.selectAllButton = el), variant: "tertiary", onClick: this.handleSelectAllClick, onMouseDown: this.handleSelectAllMouseDown, onBlur: this.handleSelectAllBlur, onFocus: this.handleSelectAllFocus, size: size === "small" ? "small" : "default" }, selectAllButtonText)))));
920
+ }
921
+ static get is() { return "ic-menu-with-multi"; }
922
+ static get encapsulation() { return "scoped"; }
923
+ static get originalStyleUrls() {
924
+ return {
925
+ "$": ["ic-menu.css"]
926
+ };
927
+ }
928
+ static get styleUrls() {
929
+ return {
930
+ "$": ["ic-menu.css"]
931
+ };
932
+ }
933
+ static get properties() {
934
+ return {
935
+ "activationType": {
936
+ "type": "string",
937
+ "mutable": false,
938
+ "complexType": {
939
+ "original": "IcActivationTypes",
940
+ "resolved": "\"automatic\" | \"manual\"",
941
+ "references": {
942
+ "IcActivationTypes": {
943
+ "location": "import",
944
+ "path": "@ukic/web-components/dist/types/utils/types",
945
+ "id": "../web-components/dist/types/utils/types.d.ts::IcActivationTypes"
946
+ }
947
+ }
948
+ },
949
+ "required": false,
950
+ "optional": true,
951
+ "docs": {
952
+ "tags": [],
953
+ "text": "Determines whether options manually set as values (by pressing 'Enter') when they receive focus using keyboard navigation."
954
+ },
955
+ "attribute": "activation-type",
956
+ "reflect": false,
957
+ "defaultValue": "\"automatic\""
958
+ },
959
+ "anchorEl": {
960
+ "type": "unknown",
961
+ "mutable": false,
962
+ "complexType": {
963
+ "original": "HTMLElement",
964
+ "resolved": "HTMLElement",
965
+ "references": {
966
+ "HTMLElement": {
967
+ "location": "global",
968
+ "id": "global::HTMLElement"
969
+ }
970
+ }
971
+ },
972
+ "required": true,
973
+ "optional": false,
974
+ "docs": {
975
+ "tags": [],
976
+ "text": "The reference to an anchor element the menu will position itself from when rendered."
977
+ }
978
+ },
979
+ "autoFocusOnSelected": {
980
+ "type": "boolean",
981
+ "mutable": false,
982
+ "complexType": {
983
+ "original": "boolean",
984
+ "resolved": "boolean",
985
+ "references": {}
986
+ },
987
+ "required": false,
988
+ "optional": false,
989
+ "docs": {
990
+ "tags": [{
991
+ "name": "internal",
992
+ "text": "If `true`, autofocus will be applied on selected item when menu is open."
993
+ }],
994
+ "text": ""
995
+ },
996
+ "attribute": "auto-focus-on-selected",
997
+ "reflect": false,
998
+ "defaultValue": "true"
999
+ },
1000
+ "closeOnSelect": {
1001
+ "type": "boolean",
1002
+ "mutable": false,
1003
+ "complexType": {
1004
+ "original": "boolean",
1005
+ "resolved": "boolean",
1006
+ "references": {}
1007
+ },
1008
+ "required": false,
1009
+ "optional": false,
1010
+ "docs": {
1011
+ "tags": [],
1012
+ "text": "If `true`, the menu will close when an option is selected."
1013
+ },
1014
+ "attribute": "close-on-select",
1015
+ "reflect": false,
1016
+ "defaultValue": "true"
1017
+ },
1018
+ "fullWidth": {
1019
+ "type": "boolean",
1020
+ "mutable": false,
1021
+ "complexType": {
1022
+ "original": "boolean",
1023
+ "resolved": "boolean",
1024
+ "references": {}
1025
+ },
1026
+ "required": false,
1027
+ "optional": false,
1028
+ "docs": {
1029
+ "tags": [],
1030
+ "text": "If `true`, the menu will fill the width of the container."
1031
+ },
1032
+ "attribute": "full-width",
1033
+ "reflect": false,
1034
+ "defaultValue": "false"
1035
+ },
1036
+ "inputEl": {
1037
+ "type": "unknown",
1038
+ "mutable": false,
1039
+ "complexType": {
1040
+ "original": "HTMLElement",
1041
+ "resolved": "HTMLElement",
1042
+ "references": {
1043
+ "HTMLElement": {
1044
+ "location": "global",
1045
+ "id": "global::HTMLElement"
1046
+ }
1047
+ }
1048
+ },
1049
+ "required": true,
1050
+ "optional": false,
1051
+ "docs": {
1052
+ "tags": [],
1053
+ "text": "The reference to the input element."
1054
+ }
1055
+ },
1056
+ "inputLabel": {
1057
+ "type": "string",
1058
+ "mutable": false,
1059
+ "complexType": {
1060
+ "original": "string",
1061
+ "resolved": "string",
1062
+ "references": {}
1063
+ },
1064
+ "required": true,
1065
+ "optional": false,
1066
+ "docs": {
1067
+ "tags": [],
1068
+ "text": "The label for the input element."
1069
+ },
1070
+ "attribute": "input-label",
1071
+ "reflect": false
1072
+ },
1073
+ "labelField": {
1074
+ "type": "string",
1075
+ "mutable": false,
1076
+ "complexType": {
1077
+ "original": "string",
1078
+ "resolved": "string",
1079
+ "references": {}
1080
+ },
1081
+ "required": false,
1082
+ "optional": false,
1083
+ "docs": {
1084
+ "tags": [],
1085
+ "text": "The custom name for the label field for IcMenuOption."
1086
+ },
1087
+ "attribute": "label-field",
1088
+ "reflect": false,
1089
+ "defaultValue": "\"label\""
1090
+ },
1091
+ "menuId": {
1092
+ "type": "string",
1093
+ "mutable": false,
1094
+ "complexType": {
1095
+ "original": "string",
1096
+ "resolved": "string",
1097
+ "references": {}
1098
+ },
1099
+ "required": true,
1100
+ "optional": false,
1101
+ "docs": {
1102
+ "tags": [],
1103
+ "text": "The ID of the menu."
1104
+ },
1105
+ "attribute": "menu-id",
1106
+ "reflect": false
1107
+ },
1108
+ "open": {
1109
+ "type": "boolean",
1110
+ "mutable": false,
1111
+ "complexType": {
1112
+ "original": "boolean",
1113
+ "resolved": "boolean",
1114
+ "references": {}
1115
+ },
1116
+ "required": true,
1117
+ "optional": false,
1118
+ "docs": {
1119
+ "tags": [],
1120
+ "text": "If `true`, the menu will be displayed open."
1121
+ },
1122
+ "attribute": "open",
1123
+ "reflect": true
1124
+ },
1125
+ "parentEl": {
1126
+ "type": "unknown",
1127
+ "mutable": false,
1128
+ "complexType": {
1129
+ "original": "HTMLElement",
1130
+ "resolved": "HTMLElement",
1131
+ "references": {
1132
+ "HTMLElement": {
1133
+ "location": "global",
1134
+ "id": "global::HTMLElement"
1135
+ }
1136
+ }
1137
+ },
1138
+ "required": false,
1139
+ "optional": true,
1140
+ "docs": {
1141
+ "tags": [{
1142
+ "name": "internal",
1143
+ "text": "- The parent element if ic-menu is nested inside another component."
1144
+ }],
1145
+ "text": ""
1146
+ }
1147
+ },
1148
+ "searchMode": {
1149
+ "type": "string",
1150
+ "mutable": false,
1151
+ "complexType": {
1152
+ "original": "IcSearchBarSearchModes",
1153
+ "resolved": "\"navigation\" | \"query\"",
1154
+ "references": {
1155
+ "IcSearchBarSearchModes": {
1156
+ "location": "import",
1157
+ "path": "@ukic/web-components/dist/types/components",
1158
+ "id": "../web-components/dist/types/components.d.ts::IcSearchBarSearchModes"
1159
+ }
1160
+ }
1161
+ },
1162
+ "required": false,
1163
+ "optional": true,
1164
+ "docs": {
1165
+ "tags": [],
1166
+ "text": "Specify the mode search bar uses to search. `navigation` allows for quick lookups of a set of values, `query` allows for more general searches."
1167
+ },
1168
+ "attribute": "search-mode",
1169
+ "reflect": false,
1170
+ "defaultValue": "\"navigation\""
1171
+ },
1172
+ "selectOnEnter": {
1173
+ "type": "boolean",
1174
+ "mutable": false,
1175
+ "complexType": {
1176
+ "original": "boolean",
1177
+ "resolved": "boolean",
1178
+ "references": {}
1179
+ },
1180
+ "required": false,
1181
+ "optional": true,
1182
+ "docs": {
1183
+ "tags": [{
1184
+ "name": "internal",
1185
+ "text": "If `true`, the icOptionSelect event will be fired on enter instead of ArrowUp and ArrowDown."
1186
+ }],
1187
+ "text": ""
1188
+ },
1189
+ "attribute": "select-on-enter",
1190
+ "reflect": false,
1191
+ "defaultValue": "false"
1192
+ },
1193
+ "size": {
1194
+ "type": "string",
1195
+ "mutable": false,
1196
+ "complexType": {
1197
+ "original": "IcSizes",
1198
+ "resolved": "\"default\" | \"large\" | \"small\"",
1199
+ "references": {
1200
+ "IcSizes": {
1201
+ "location": "import",
1202
+ "path": "../../utils/types",
1203
+ "id": "src/utils/types.ts::IcSizes"
1204
+ }
1205
+ }
1206
+ },
1207
+ "required": false,
1208
+ "optional": true,
1209
+ "docs": {
1210
+ "tags": [],
1211
+ "text": "The size of the menu."
1212
+ },
1213
+ "attribute": "size",
1214
+ "reflect": false,
1215
+ "defaultValue": "\"default\""
1216
+ },
1217
+ "small": {
1218
+ "type": "boolean",
1219
+ "mutable": false,
1220
+ "complexType": {
1221
+ "original": "boolean",
1222
+ "resolved": "boolean",
1223
+ "references": {}
1224
+ },
1225
+ "required": false,
1226
+ "optional": true,
1227
+ "docs": {
1228
+ "tags": [{
1229
+ "name": "deprecated",
1230
+ "text": "This prop should not be used anymore. Set prop `size` to \"small\" instead."
1231
+ }],
1232
+ "text": ""
1233
+ },
1234
+ "attribute": "small",
1235
+ "reflect": false,
1236
+ "defaultValue": "false"
1237
+ },
1238
+ "options": {
1239
+ "type": "unknown",
1240
+ "mutable": false,
1241
+ "complexType": {
1242
+ "original": "IcMenuOption[]",
1243
+ "resolved": "IcMenuOption[]",
1244
+ "references": {
1245
+ "IcMenuOption": {
1246
+ "location": "import",
1247
+ "path": "@ukic/web-components/dist/types/utils/types",
1248
+ "id": "../web-components/dist/types/utils/types.d.ts::IcMenuOption"
1249
+ }
1250
+ }
1251
+ },
1252
+ "required": true,
1253
+ "optional": false,
1254
+ "docs": {
1255
+ "tags": [],
1256
+ "text": "The possible menu selection options."
1257
+ }
1258
+ },
1259
+ "value": {
1260
+ "type": "string",
1261
+ "mutable": false,
1262
+ "complexType": {
1263
+ "original": "string | string[]",
1264
+ "resolved": "string | string[]",
1265
+ "references": {}
1266
+ },
1267
+ "required": true,
1268
+ "optional": false,
1269
+ "docs": {
1270
+ "tags": [],
1271
+ "text": "The value of the currently selected option - or array of values (if multiple options allowed)."
1272
+ },
1273
+ "attribute": "value",
1274
+ "reflect": false
1275
+ },
1276
+ "valueField": {
1277
+ "type": "string",
1278
+ "mutable": false,
1279
+ "complexType": {
1280
+ "original": "string",
1281
+ "resolved": "string",
1282
+ "references": {}
1283
+ },
1284
+ "required": false,
1285
+ "optional": false,
1286
+ "docs": {
1287
+ "tags": [],
1288
+ "text": "The custom name for the value field for IcMenuOption."
1289
+ },
1290
+ "attribute": "value-field",
1291
+ "reflect": false,
1292
+ "defaultValue": "\"value\""
1293
+ }
1294
+ };
1295
+ }
1296
+ static get states() {
1297
+ return {
1298
+ "focusFromSearchKeypress": {},
1299
+ "initialOptionsListRender": {},
1300
+ "keyboardNav": {},
1301
+ "optionHighlighted": {},
1302
+ "preventIncorrectTabOrder": {},
1303
+ "menuOptions": {}
1304
+ };
1305
+ }
1306
+ static get events() {
1307
+ return [{
1308
+ "method": "menuKeyPress",
1309
+ "name": "menuKeyPress",
1310
+ "bubbles": true,
1311
+ "cancelable": true,
1312
+ "composed": true,
1313
+ "docs": {
1314
+ "tags": [{
1315
+ "name": "internal",
1316
+ "text": "Emitted when key is pressed while menu is open."
1317
+ }],
1318
+ "text": ""
1319
+ },
1320
+ "complexType": {
1321
+ "original": "{ isNavKey: boolean; key: string }",
1322
+ "resolved": "{ isNavKey: boolean; key: string; }",
1323
+ "references": {}
1324
+ }
1325
+ }, {
1326
+ "method": "menuOptionId",
1327
+ "name": "menuOptionId",
1328
+ "bubbles": true,
1329
+ "cancelable": true,
1330
+ "composed": true,
1331
+ "docs": {
1332
+ "tags": [{
1333
+ "name": "internal",
1334
+ "text": "Emitted when an option has been highlighted."
1335
+ }],
1336
+ "text": ""
1337
+ },
1338
+ "complexType": {
1339
+ "original": "IcMenuOptionIdEventDetail",
1340
+ "resolved": "IcMenuOptionIdEventDetail",
1341
+ "references": {
1342
+ "IcMenuOptionIdEventDetail": {
1343
+ "location": "import",
1344
+ "path": "@ukic/web-components/dist/types/components",
1345
+ "id": "../web-components/dist/types/components.d.ts::IcMenuOptionIdEventDetail"
1346
+ }
1347
+ }
1348
+ }
1349
+ }, {
1350
+ "method": "menuOptionSelect",
1351
+ "name": "menuOptionSelect",
1352
+ "bubbles": true,
1353
+ "cancelable": true,
1354
+ "composed": true,
1355
+ "docs": {
1356
+ "tags": [{
1357
+ "name": "internal",
1358
+ "text": "Emitted when an option is selected."
1359
+ }],
1360
+ "text": ""
1361
+ },
1362
+ "complexType": {
1363
+ "original": "IcOptionSelectEventDetail",
1364
+ "resolved": "IcOptionSelectEventDetail",
1365
+ "references": {
1366
+ "IcOptionSelectEventDetail": {
1367
+ "location": "import",
1368
+ "path": "@ukic/web-components/dist/types/components",
1369
+ "id": "../web-components/dist/types/components.d.ts::IcOptionSelectEventDetail"
1370
+ }
1371
+ }
1372
+ }
1373
+ }, {
1374
+ "method": "menuOptionSelectAll",
1375
+ "name": "menuOptionSelectAll",
1376
+ "bubbles": true,
1377
+ "cancelable": true,
1378
+ "composed": true,
1379
+ "docs": {
1380
+ "tags": [{
1381
+ "name": "internal",
1382
+ "text": "Emitted when all options are selected or deselected."
1383
+ }],
1384
+ "text": ""
1385
+ },
1386
+ "complexType": {
1387
+ "original": "{ select: boolean }",
1388
+ "resolved": "{ select: boolean; }",
1389
+ "references": {}
1390
+ }
1391
+ }, {
1392
+ "method": "menuStateChange",
1393
+ "name": "menuStateChange",
1394
+ "bubbles": true,
1395
+ "cancelable": true,
1396
+ "composed": true,
1397
+ "docs": {
1398
+ "tags": [{
1399
+ "name": "internal",
1400
+ "text": "Emitted when state of menu changes (i.e. open or close)."
1401
+ }],
1402
+ "text": ""
1403
+ },
1404
+ "complexType": {
1405
+ "original": "IcMenuChangeEventDetail",
1406
+ "resolved": "IcMenuChangeEventDetail",
1407
+ "references": {
1408
+ "IcMenuChangeEventDetail": {
1409
+ "location": "import",
1410
+ "path": "@ukic/web-components/dist/types/components",
1411
+ "id": "../web-components/dist/types/components.d.ts::IcMenuChangeEventDetail"
1412
+ }
1413
+ }
1414
+ }
1415
+ }, {
1416
+ "method": "retryButtonClicked",
1417
+ "name": "retryButtonClicked",
1418
+ "bubbles": true,
1419
+ "cancelable": true,
1420
+ "composed": true,
1421
+ "docs": {
1422
+ "tags": [{
1423
+ "name": "internal",
1424
+ "text": "Emitted when the retry button is clicked."
1425
+ }],
1426
+ "text": ""
1427
+ },
1428
+ "complexType": {
1429
+ "original": "IcValueEventDetail",
1430
+ "resolved": "IcValueEventDetail",
1431
+ "references": {
1432
+ "IcValueEventDetail": {
1433
+ "location": "import",
1434
+ "path": "../../utils/types",
1435
+ "id": "src/utils/types.ts::IcValueEventDetail"
1436
+ }
1437
+ }
1438
+ }
1439
+ }, {
1440
+ "method": "timeoutBlur",
1441
+ "name": "timeoutBlur",
1442
+ "bubbles": true,
1443
+ "cancelable": true,
1444
+ "composed": true,
1445
+ "docs": {
1446
+ "tags": [{
1447
+ "name": "internal",
1448
+ "text": "Emitted when the timeout menu loses focus."
1449
+ }],
1450
+ "text": ""
1451
+ },
1452
+ "complexType": {
1453
+ "original": "{ ev: FocusEvent }",
1454
+ "resolved": "{ ev: FocusEvent; }",
1455
+ "references": {
1456
+ "FocusEvent": {
1457
+ "location": "global",
1458
+ "id": "global::FocusEvent"
1459
+ }
1460
+ }
1461
+ }
1462
+ }, {
1463
+ "method": "ungroupedOptionsSet",
1464
+ "name": "ungroupedOptionsSet",
1465
+ "bubbles": true,
1466
+ "cancelable": true,
1467
+ "composed": true,
1468
+ "docs": {
1469
+ "tags": [{
1470
+ "name": "internal",
1471
+ "text": "Emitted when the ungrouped options have been set."
1472
+ }],
1473
+ "text": ""
1474
+ },
1475
+ "complexType": {
1476
+ "original": "{ options: IcMenuOption[] }",
1477
+ "resolved": "{ options: IcMenuOption[]; }",
1478
+ "references": {
1479
+ "IcMenuOption": {
1480
+ "location": "import",
1481
+ "path": "@ukic/web-components/dist/types/utils/types",
1482
+ "id": "../web-components/dist/types/utils/types.d.ts::IcMenuOption"
1483
+ }
1484
+ }
1485
+ }
1486
+ }];
1487
+ }
1488
+ static get methods() {
1489
+ return {
1490
+ "handleClickOpen": {
1491
+ "complexType": {
1492
+ "signature": "() => Promise<void>",
1493
+ "parameters": [],
1494
+ "references": {
1495
+ "Promise": {
1496
+ "location": "global",
1497
+ "id": "global::Promise"
1498
+ }
1499
+ },
1500
+ "return": "Promise<void>"
1501
+ },
1502
+ "docs": {
1503
+ "text": "",
1504
+ "tags": [{
1505
+ "name": "internal",
1506
+ "text": "If menu is opened with the mouse, emit menuStateChange custom event."
1507
+ }]
1508
+ }
1509
+ },
1510
+ "handleKeyboardOpen": {
1511
+ "complexType": {
1512
+ "signature": "(event: KeyboardEvent) => Promise<void>",
1513
+ "parameters": [{
1514
+ "name": "event",
1515
+ "type": "KeyboardEvent",
1516
+ "docs": "- keyboard event"
1517
+ }],
1518
+ "references": {
1519
+ "Promise": {
1520
+ "location": "global",
1521
+ "id": "global::Promise"
1522
+ },
1523
+ "KeyboardEvent": {
1524
+ "location": "global",
1525
+ "id": "global::KeyboardEvent"
1526
+ }
1527
+ },
1528
+ "return": "Promise<void>"
1529
+ },
1530
+ "docs": {
1531
+ "text": "Used alongside activationType\nIf menu is opened via keyboard navigation (i.e. Enter, ArrowUp or ArrowDown), emit optionSelect custom event.",
1532
+ "tags": [{
1533
+ "name": "param",
1534
+ "text": "event - keyboard event"
1535
+ }]
1536
+ }
1537
+ },
1538
+ "handleSetFirstOption": {
1539
+ "complexType": {
1540
+ "signature": "() => Promise<void>",
1541
+ "parameters": [],
1542
+ "references": {
1543
+ "Promise": {
1544
+ "location": "global",
1545
+ "id": "global::Promise"
1546
+ }
1547
+ },
1548
+ "return": "Promise<void>"
1549
+ },
1550
+ "docs": {
1551
+ "text": "",
1552
+ "tags": [{
1553
+ "name": "internal",
1554
+ "text": "Used to highlight the first option in the menu."
1555
+ }]
1556
+ }
1557
+ },
1558
+ "initPopperJs": {
1559
+ "complexType": {
1560
+ "signature": "(anchor: HTMLElement) => Promise<void>",
1561
+ "parameters": [{
1562
+ "name": "anchor",
1563
+ "type": "HTMLElement",
1564
+ "docs": ""
1565
+ }],
1566
+ "references": {
1567
+ "Promise": {
1568
+ "location": "global",
1569
+ "id": "global::Promise"
1570
+ },
1571
+ "HTMLElement": {
1572
+ "location": "global",
1573
+ "id": "global::HTMLElement"
1574
+ }
1575
+ },
1576
+ "return": "Promise<void>"
1577
+ },
1578
+ "docs": {
1579
+ "text": "",
1580
+ "tags": [{
1581
+ "name": "internal",
1582
+ "text": "Used to initialize popperJS with an anchor element.\n5/12/2023: Tested with Floating UI, however, discovered inconsistent\nboundary behaviour so sticking with PopperJS."
1583
+ }]
1584
+ }
1585
+ }
1586
+ };
1587
+ }
1588
+ static get elementRef() { return "el"; }
1589
+ static get watchers() {
1590
+ return [{
1591
+ "propName": "open",
1592
+ "methodName": "watchOpenHandler"
1593
+ }, {
1594
+ "propName": "options",
1595
+ "methodName": "watchOptionsHandler"
1596
+ }];
1597
+ }
1598
+ }
1599
+ //# sourceMappingURL=ic-menu.js.map