@ukic/canary-web-components 2.0.0-canary.9 → 3.0.0-canary.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (821) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-7a069459.js → helpers-33b42cd6.js} +95 -101
  3. package/dist/cjs/helpers-33b42cd6.js.map +1 -0
  4. package/dist/cjs/{helpers-f75cf7cf.js → helpers-6817cfbb.js} +116 -1
  5. package/dist/cjs/helpers-6817cfbb.js.map +1 -0
  6. package/dist/cjs/ic-accordion-group.cjs.entry.js +31 -9
  7. package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
  8. package/dist/cjs/ic-accordion.cjs.entry.js +7 -8
  9. package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
  10. package/dist/cjs/ic-alert.cjs.entry.js +28 -10
  11. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ic-back-to-top.cjs.entry.js +17 -8
  13. package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
  14. package/dist/cjs/ic-badge.cjs.entry.js +67 -117
  15. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +37 -11
  17. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
  18. package/dist/cjs/ic-breadcrumb.cjs.entry.js +8 -7
  19. package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ic-button_3.cjs.entry.js +122 -134
  21. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  22. package/dist/cjs/ic-card-horizontal.cjs.entry.js +131 -0
  23. package/dist/cjs/ic-card-horizontal.cjs.entry.js.map +1 -0
  24. package/dist/cjs/ic-card-vertical.cjs.entry.js +149 -0
  25. package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -0
  26. package/dist/cjs/ic-checkbox-group.cjs.entry.js +27 -20
  27. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  28. package/dist/cjs/ic-checkbox.cjs.entry.js +45 -40
  29. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  30. package/dist/cjs/ic-chip.cjs.entry.js +48 -30
  31. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  32. package/dist/cjs/ic-classification-banner.cjs.entry.js +14 -5
  33. package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
  34. package/dist/cjs/ic-data-list.cjs.entry.js +32 -0
  35. package/dist/cjs/ic-data-list.cjs.entry.js.map +1 -0
  36. package/dist/cjs/ic-data-row.cjs.entry.js +12 -12
  37. package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
  38. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +57 -0
  39. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js.map +1 -0
  40. package/dist/cjs/ic-data-table.cjs.entry.js +807 -65
  41. package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
  42. package/dist/cjs/ic-date-input.cjs.entry.js +70 -33
  43. package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
  44. package/dist/cjs/ic-date-picker.cjs.entry.js +81 -55
  45. package/dist/cjs/ic-date-picker.cjs.entry.js.map +1 -1
  46. package/dist/cjs/ic-dialog.cjs.entry.js +27 -101
  47. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  48. package/dist/cjs/ic-divider.cjs.entry.js +3 -4
  49. package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
  50. package/dist/cjs/ic-empty-state_2.cjs.entry.js +323 -0
  51. package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -0
  52. package/dist/cjs/ic-footer-link-group.cjs.entry.js +9 -10
  53. package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
  54. package/dist/cjs/ic-footer-link.cjs.entry.js +6 -8
  55. package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
  56. package/dist/cjs/ic-footer.cjs.entry.js +9 -10
  57. package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
  58. package/dist/cjs/ic-hero.cjs.entry.js +27 -12
  59. package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
  60. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +6 -8
  61. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
  62. package/dist/cjs/ic-input-component-container_4.cjs.entry.js +38 -32
  63. package/dist/cjs/ic-input-component-container_4.cjs.entry.js.map +1 -1
  64. package/dist/cjs/ic-link.cjs.entry.js +51 -24
  65. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  66. package/dist/cjs/ic-menu-group.cjs.entry.js +2 -3
  67. package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -1
  68. package/dist/cjs/ic-menu-item.cjs.entry.js +6 -13
  69. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  70. package/dist/cjs/ic-menu-with-multi.cjs.entry.js +186 -47
  71. package/dist/cjs/ic-menu-with-multi.cjs.entry.js.map +1 -1
  72. package/dist/cjs/ic-menu.cjs.entry.js +16 -21
  73. package/dist/cjs/ic-menu.cjs.entry.js.map +1 -1
  74. package/dist/cjs/ic-navigation-button.cjs.entry.js +28 -8
  75. package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
  76. package/dist/cjs/ic-navigation-group.cjs.entry.js +23 -21
  77. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  78. package/dist/cjs/ic-navigation-item.cjs.entry.js +33 -38
  79. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  80. package/dist/cjs/ic-navigation-menu.cjs.entry.js +3 -4
  81. package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
  82. package/dist/cjs/ic-page-header.cjs.entry.js +10 -12
  83. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  84. package/dist/cjs/ic-pagination_4.cjs.entry.js +227 -186
  85. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  86. package/dist/cjs/ic-popover-menu.cjs.entry.js +33 -33
  87. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  88. package/dist/cjs/ic-radio-group.cjs.entry.js +87 -53
  89. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  90. package/dist/cjs/ic-radio-option.cjs.entry.js +44 -53
  91. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  92. package/dist/cjs/ic-search-bar.cjs.entry.js +33 -53
  93. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  94. package/dist/cjs/ic-section-container.cjs.entry.js +1 -1
  95. package/dist/cjs/ic-section-container.cjs.entry.js.map +1 -1
  96. package/dist/cjs/ic-select-with-multi.cjs.entry.js +15 -51
  97. package/dist/cjs/ic-select-with-multi.cjs.entry.js.map +1 -1
  98. package/dist/cjs/ic-side-navigation.cjs.entry.js +8 -9
  99. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  100. package/dist/cjs/ic-skeleton.cjs.entry.js +18 -38
  101. package/dist/cjs/ic-skeleton.cjs.entry.js.map +1 -1
  102. package/dist/cjs/ic-status-tag.cjs.entry.js +7 -15
  103. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  104. package/dist/cjs/ic-step.cjs.entry.js +41 -43
  105. package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
  106. package/dist/cjs/ic-stepper.cjs.entry.js +55 -24
  107. package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
  108. package/dist/cjs/ic-switch.cjs.entry.js +7 -9
  109. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  110. package/dist/cjs/ic-tab-context.cjs.entry.js +90 -137
  111. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  112. package/dist/cjs/ic-tab-group.cjs.entry.js +25 -11
  113. package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
  114. package/dist/cjs/ic-tab-panel.cjs.entry.js +6 -13
  115. package/dist/cjs/ic-tab-panel.cjs.entry.js.map +1 -1
  116. package/dist/cjs/ic-tab.cjs.entry.js +14 -14
  117. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  118. package/dist/cjs/ic-theme.cjs.entry.js +39 -25
  119. package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
  120. package/dist/cjs/ic-toast-region.cjs.entry.js +6 -7
  121. package/dist/cjs/ic-toast-region.cjs.entry.js.map +1 -1
  122. package/dist/cjs/ic-toast.cjs.entry.js +88 -35
  123. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  124. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +17 -17
  125. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
  126. package/dist/cjs/ic-toggle-button.cjs.entry.js +15 -14
  127. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  128. package/dist/cjs/ic-top-navigation.cjs.entry.js +62 -86
  129. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  130. package/dist/cjs/ic-tree-item.cjs.entry.js +241 -0
  131. package/dist/cjs/ic-tree-item.cjs.entry.js.map +1 -0
  132. package/dist/cjs/ic-tree-view.cjs.entry.js +203 -0
  133. package/dist/cjs/ic-tree-view.cjs.entry.js.map +1 -0
  134. package/dist/cjs/ic-typography.cjs.entry.js +58 -20
  135. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  136. package/dist/cjs/index-4cf27b16.js +26 -14
  137. package/dist/cjs/loader.cjs.js +1 -1
  138. package/dist/collection/assets/arrow-dropdown.svg +3 -0
  139. package/dist/collection/collection-manifest.json +7 -3
  140. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.css +661 -0
  141. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js +373 -0
  142. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.js.map +1 -0
  143. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.types.js +2 -0
  144. package/dist/collection/components/ic-card-horizontal/ic-card-horizontal.types.js.map +1 -0
  145. package/dist/collection/components/ic-card-horizontal/test/basic/ic-card-horizontal.spec.js +130 -0
  146. package/dist/collection/components/ic-card-horizontal/test/basic/ic-card-horizontal.spec.js.map +1 -0
  147. package/dist/collection/components/ic-data-table/ic-data-table.css +174 -13
  148. package/dist/collection/components/ic-data-table/ic-data-table.js +1176 -90
  149. package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
  150. package/dist/collection/components/ic-data-table/ic-data-table.types.js.map +1 -1
  151. package/dist/collection/components/ic-data-table/story-data.js +798 -39
  152. package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
  153. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +339 -3
  154. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
  155. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.css +93 -0
  156. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js +160 -0
  157. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js.map +1 -0
  158. package/dist/collection/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.js +11 -0
  159. package/dist/collection/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.js.map +1 -0
  160. package/dist/collection/components/ic-data-table-title-bar/test/basic/ic-data-table-title-bar.spec.js +70 -0
  161. package/dist/collection/components/ic-data-table-title-bar/test/basic/ic-data-table-title-bar.spec.js.map +1 -0
  162. package/dist/collection/components/ic-date-input/ic-date-input.css +5 -5
  163. package/dist/collection/components/ic-date-input/ic-date-input.js +140 -33
  164. package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
  165. package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js +23 -21
  166. package/dist/collection/components/ic-date-input/test/basic/ic-date-input.spec.js.map +1 -1
  167. package/dist/collection/components/ic-date-picker/ic-date-picker.css +34 -32
  168. package/dist/collection/components/ic-date-picker/ic-date-picker.js +123 -56
  169. package/dist/collection/components/ic-date-picker/ic-date-picker.js.map +1 -1
  170. package/dist/collection/components/ic-date-picker/story-data.js +6 -1
  171. package/dist/collection/components/ic-date-picker/story-data.js.map +1 -1
  172. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js +73 -5
  173. package/dist/collection/components/ic-date-picker/test/basic/ic-date-picker.spec.js.map +1 -1
  174. package/dist/collection/components/ic-menu-with-multi/ic-menu.css +30 -19
  175. package/dist/collection/components/ic-menu-with-multi/ic-menu.js +187 -69
  176. package/dist/collection/components/ic-menu-with-multi/ic-menu.js.map +1 -1
  177. package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js +229 -52
  178. package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js.map +1 -1
  179. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.css +1 -1
  180. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +213 -166
  181. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
  182. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js +2 -0
  183. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.types.js.map +1 -0
  184. package/dist/collection/components/ic-pagination-bar/test/basic/ic-pagination-bar.spec.js +75 -12
  185. package/dist/collection/components/ic-pagination-bar/test/basic/ic-pagination-bar.spec.js.map +1 -1
  186. package/dist/collection/components/ic-select-with-multi/ic-select.css +21 -19
  187. package/dist/collection/components/ic-select-with-multi/ic-select.js +16 -145
  188. package/dist/collection/components/ic-select-with-multi/ic-select.js.map +1 -1
  189. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js +7 -7
  190. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.spec.js.map +1 -1
  191. package/dist/collection/components/ic-tree-item/ic-tree-item.css +172 -0
  192. package/dist/collection/components/ic-tree-item/ic-tree-item.js +592 -0
  193. package/dist/collection/components/ic-tree-item/ic-tree-item.js.map +1 -0
  194. package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js +114 -0
  195. package/dist/collection/components/ic-tree-item/test/basic/ic-tree-item.spec.js.map +1 -0
  196. package/dist/collection/components/ic-tree-view/ic-tree-view.css +59 -0
  197. package/dist/collection/components/ic-tree-view/ic-tree-view.js +296 -0
  198. package/dist/collection/components/ic-tree-view/ic-tree-view.js.map +1 -0
  199. package/dist/collection/components/ic-tree-view/test/basic/ic-tree-view.spec.js +85 -0
  200. package/dist/collection/components/ic-tree-view/test/basic/ic-tree-view.spec.js.map +1 -0
  201. package/dist/collection/utils/helpers.js +44 -1
  202. package/dist/collection/utils/helpers.js.map +1 -1
  203. package/dist/collection/utils/types.js.map +1 -1
  204. package/dist/components/helpers.js +84 -90
  205. package/dist/components/helpers.js.map +1 -1
  206. package/dist/components/helpers2.js +107 -1
  207. package/dist/components/helpers2.js.map +1 -1
  208. package/dist/components/ic-accordion-group.js +39 -13
  209. package/dist/components/ic-accordion-group.js.map +1 -1
  210. package/dist/components/ic-accordion.js +6 -6
  211. package/dist/components/ic-accordion.js.map +1 -1
  212. package/dist/components/ic-alert.js +132 -1
  213. package/dist/components/ic-alert.js.map +1 -1
  214. package/dist/components/ic-back-to-top.js +37 -8
  215. package/dist/components/ic-back-to-top.js.map +1 -1
  216. package/dist/components/ic-badge.js +75 -121
  217. package/dist/components/ic-badge.js.map +1 -1
  218. package/dist/components/ic-breadcrumb-group.js +42 -10
  219. package/dist/components/ic-breadcrumb-group.js.map +1 -1
  220. package/dist/components/ic-breadcrumb2.js +10 -7
  221. package/dist/components/ic-breadcrumb2.js.map +1 -1
  222. package/dist/components/ic-button2.js +69 -106
  223. package/dist/components/ic-button2.js.map +1 -1
  224. package/dist/components/ic-card-horizontal.d.ts +11 -0
  225. package/dist/components/ic-card-horizontal.js +167 -0
  226. package/dist/components/ic-card-horizontal.js.map +1 -0
  227. package/dist/components/ic-card-vertical.js +194 -0
  228. package/dist/components/ic-card-vertical.js.map +1 -0
  229. package/dist/components/ic-checkbox-group.js +31 -21
  230. package/dist/components/ic-checkbox-group.js.map +1 -1
  231. package/dist/components/ic-checkbox.js +52 -47
  232. package/dist/components/ic-checkbox.js.map +1 -1
  233. package/dist/components/ic-chip.js +56 -33
  234. package/dist/components/ic-chip.js.map +1 -1
  235. package/dist/components/ic-classification-banner.js +14 -5
  236. package/dist/components/ic-classification-banner.js.map +1 -1
  237. package/dist/components/ic-data-list.js +56 -0
  238. package/dist/components/ic-data-list.js.map +1 -0
  239. package/dist/components/ic-data-row.js +14 -13
  240. package/dist/components/ic-data-row.js.map +1 -1
  241. package/dist/components/ic-data-table-title-bar.d.ts +11 -0
  242. package/dist/components/ic-data-table-title-bar.js +136 -0
  243. package/dist/components/ic-data-table-title-bar.js.map +1 -0
  244. package/dist/components/ic-data-table.js +843 -72
  245. package/dist/components/ic-data-table.js.map +1 -1
  246. package/dist/components/ic-date-input2.js +79 -36
  247. package/dist/components/ic-date-input2.js.map +1 -1
  248. package/dist/components/ic-date-picker.js +87 -57
  249. package/dist/components/ic-date-picker.js.map +1 -1
  250. package/dist/components/ic-dialog.js +29 -115
  251. package/dist/components/ic-dialog.js.map +1 -1
  252. package/dist/components/ic-divider2.js +2 -3
  253. package/dist/components/ic-divider2.js.map +1 -1
  254. package/dist/components/ic-empty-state.js +1 -57
  255. package/dist/components/ic-empty-state.js.map +1 -1
  256. package/dist/components/ic-empty-state2.js +80 -0
  257. package/dist/components/ic-empty-state2.js.map +1 -0
  258. package/dist/components/ic-footer-link-group.js +10 -10
  259. package/dist/components/ic-footer-link-group.js.map +1 -1
  260. package/dist/components/ic-footer-link.js +13 -8
  261. package/dist/components/ic-footer-link.js.map +1 -1
  262. package/dist/components/ic-footer.js +9 -10
  263. package/dist/components/ic-footer.js.map +1 -1
  264. package/dist/components/ic-hero.js +28 -14
  265. package/dist/components/ic-hero.js.map +1 -1
  266. package/dist/components/ic-horizontal-scroll2.js +6 -8
  267. package/dist/components/ic-horizontal-scroll2.js.map +1 -1
  268. package/dist/components/ic-input-component-container2.js +25 -20
  269. package/dist/components/ic-input-component-container2.js.map +1 -1
  270. package/dist/components/ic-input-label2.js +9 -11
  271. package/dist/components/ic-input-label2.js.map +1 -1
  272. package/dist/components/ic-input-validation2.js +4 -5
  273. package/dist/components/ic-input-validation2.js.map +1 -1
  274. package/dist/components/ic-link2.js +54 -27
  275. package/dist/components/ic-link2.js.map +1 -1
  276. package/dist/components/ic-loading-indicator2.js +29 -23
  277. package/dist/components/ic-loading-indicator2.js.map +1 -1
  278. package/dist/components/ic-menu-group.js +2 -2
  279. package/dist/components/ic-menu-group.js.map +1 -1
  280. package/dist/components/ic-menu-item2.js +6 -12
  281. package/dist/components/ic-menu-item2.js.map +1 -1
  282. package/dist/components/ic-menu2.js +15 -20
  283. package/dist/components/ic-menu2.js.map +1 -1
  284. package/dist/components/ic-menu3.js +187 -49
  285. package/dist/components/ic-menu3.js.map +1 -1
  286. package/dist/components/ic-navigation-button.js +28 -8
  287. package/dist/components/ic-navigation-button.js.map +1 -1
  288. package/dist/components/ic-navigation-group.js +23 -20
  289. package/dist/components/ic-navigation-group.js.map +1 -1
  290. package/dist/components/ic-navigation-item.js +33 -37
  291. package/dist/components/ic-navigation-item.js.map +1 -1
  292. package/dist/components/ic-navigation-menu2.js +3 -3
  293. package/dist/components/ic-navigation-menu2.js.map +1 -1
  294. package/dist/components/ic-page-header.js +9 -11
  295. package/dist/components/ic-page-header.js.map +1 -1
  296. package/dist/components/ic-pagination-bar2.js +166 -147
  297. package/dist/components/ic-pagination-bar2.js.map +1 -1
  298. package/dist/components/ic-pagination-item2.js +22 -12
  299. package/dist/components/ic-pagination-item2.js.map +1 -1
  300. package/dist/components/ic-pagination2.js +50 -33
  301. package/dist/components/ic-pagination2.js.map +1 -1
  302. package/dist/components/ic-popover-menu.js +35 -33
  303. package/dist/components/ic-popover-menu.js.map +1 -1
  304. package/dist/components/ic-radio-group.js +88 -53
  305. package/dist/components/ic-radio-group.js.map +1 -1
  306. package/dist/components/ic-radio-option.js +47 -60
  307. package/dist/components/ic-radio-option.js.map +1 -1
  308. package/dist/components/ic-search-bar.js +31 -52
  309. package/dist/components/ic-search-bar.js.map +1 -1
  310. package/dist/components/ic-section-container2.js +1 -1
  311. package/dist/components/ic-section-container2.js.map +1 -1
  312. package/dist/components/ic-select-with-multi.js +15 -58
  313. package/dist/components/ic-select-with-multi.js.map +1 -1
  314. package/dist/components/ic-select2.js +60 -43
  315. package/dist/components/ic-select2.js.map +1 -1
  316. package/dist/components/ic-side-navigation.js +8 -9
  317. package/dist/components/ic-side-navigation.js.map +1 -1
  318. package/dist/components/ic-skeleton.js +20 -45
  319. package/dist/components/ic-skeleton.js.map +1 -1
  320. package/dist/components/ic-status-tag.js +7 -15
  321. package/dist/components/ic-status-tag.js.map +1 -1
  322. package/dist/components/ic-step.js +48 -48
  323. package/dist/components/ic-step.js.map +1 -1
  324. package/dist/components/ic-stepper.js +60 -23
  325. package/dist/components/ic-stepper.js.map +1 -1
  326. package/dist/components/ic-switch.js +7 -9
  327. package/dist/components/ic-switch.js.map +1 -1
  328. package/dist/components/ic-tab-context.js +95 -139
  329. package/dist/components/ic-tab-context.js.map +1 -1
  330. package/dist/components/ic-tab-group.js +27 -13
  331. package/dist/components/ic-tab-group.js.map +1 -1
  332. package/dist/components/ic-tab-panel.js +9 -16
  333. package/dist/components/ic-tab-panel.js.map +1 -1
  334. package/dist/components/ic-tab.js +16 -15
  335. package/dist/components/ic-tab.js.map +1 -1
  336. package/dist/components/ic-text-field2.js +105 -114
  337. package/dist/components/ic-text-field2.js.map +1 -1
  338. package/dist/components/ic-theme.js +45 -28
  339. package/dist/components/ic-theme.js.map +1 -1
  340. package/dist/components/ic-toast-region.js +7 -9
  341. package/dist/components/ic-toast-region.js.map +1 -1
  342. package/dist/components/ic-toast.js +93 -36
  343. package/dist/components/ic-toast.js.map +1 -1
  344. package/dist/components/ic-toggle-button-group.js +17 -17
  345. package/dist/components/ic-toggle-button-group.js.map +1 -1
  346. package/dist/components/ic-toggle-button.js +16 -14
  347. package/dist/components/ic-toggle-button.js.map +1 -1
  348. package/dist/components/ic-tooltip2.js +31 -9
  349. package/dist/components/ic-tooltip2.js.map +1 -1
  350. package/dist/components/ic-top-navigation.js +63 -87
  351. package/dist/components/ic-top-navigation.js.map +1 -1
  352. package/dist/components/ic-tree-item.d.ts +11 -0
  353. package/dist/components/ic-tree-item.js +286 -0
  354. package/dist/components/ic-tree-item.js.map +1 -0
  355. package/dist/components/ic-tree-view.d.ts +11 -0
  356. package/dist/components/ic-tree-view.js +237 -0
  357. package/dist/components/ic-tree-view.js.map +1 -0
  358. package/dist/components/ic-typography2.js +65 -22
  359. package/dist/components/ic-typography2.js.map +1 -1
  360. package/dist/core/core.css +101 -29
  361. package/dist/core/core.esm.js +1 -1
  362. package/dist/core/core.esm.js.map +1 -1
  363. package/dist/core/p-0894cab1.entry.js +2 -0
  364. package/dist/core/p-0894cab1.entry.js.map +1 -0
  365. package/dist/core/p-0ab10600.entry.js +2 -0
  366. package/dist/core/p-0ab10600.entry.js.map +1 -0
  367. package/dist/core/p-1109636a.entry.js +2 -0
  368. package/dist/core/p-1109636a.entry.js.map +1 -0
  369. package/dist/core/p-130a05cf.entry.js +2 -0
  370. package/dist/core/p-130a05cf.entry.js.map +1 -0
  371. package/dist/core/p-1e2aa8a6.entry.js +2 -0
  372. package/dist/core/p-1e2aa8a6.entry.js.map +1 -0
  373. package/dist/core/p-1fe35de1.entry.js +2 -0
  374. package/dist/core/p-1fe35de1.entry.js.map +1 -0
  375. package/dist/core/p-202bc922.entry.js +2 -0
  376. package/dist/core/p-202bc922.entry.js.map +1 -0
  377. package/dist/core/p-28323849.entry.js +2 -0
  378. package/dist/core/p-28323849.entry.js.map +1 -0
  379. package/dist/core/p-297e99cf.js +2 -0
  380. package/dist/core/p-297e99cf.js.map +1 -0
  381. package/dist/core/p-2e49fb22.entry.js +2 -0
  382. package/dist/core/p-2e49fb22.entry.js.map +1 -0
  383. package/dist/core/p-2ff4e283.entry.js +2 -0
  384. package/dist/core/p-2ff4e283.entry.js.map +1 -0
  385. package/dist/core/p-30b046b2.entry.js +2 -0
  386. package/dist/core/p-30b046b2.entry.js.map +1 -0
  387. package/dist/core/{p-f8cf2978.js → p-33dd24eb.js} +2 -2
  388. package/dist/core/p-3db785f0.entry.js +2 -0
  389. package/dist/core/p-3db785f0.entry.js.map +1 -0
  390. package/dist/core/p-3ef28704.entry.js +2 -0
  391. package/dist/core/p-3ef28704.entry.js.map +1 -0
  392. package/dist/core/p-42883e4c.entry.js +2 -0
  393. package/dist/core/p-42883e4c.entry.js.map +1 -0
  394. package/dist/core/p-42e0f3bd.entry.js +2 -0
  395. package/dist/core/p-42e0f3bd.entry.js.map +1 -0
  396. package/dist/core/p-44ee5375.entry.js +2 -0
  397. package/dist/core/p-44ee5375.entry.js.map +1 -0
  398. package/dist/core/p-486d8d43.entry.js +2 -0
  399. package/dist/core/p-486d8d43.entry.js.map +1 -0
  400. package/dist/core/p-4dcc37e7.entry.js +2 -0
  401. package/dist/core/p-4dcc37e7.entry.js.map +1 -0
  402. package/dist/core/p-4e28ef60.entry.js +2 -0
  403. package/dist/core/{p-b306cbc8.entry.js.map → p-4e28ef60.entry.js.map} +1 -1
  404. package/dist/core/p-50019ede.entry.js +2 -0
  405. package/dist/core/p-50019ede.entry.js.map +1 -0
  406. package/dist/core/p-505250cf.entry.js +2 -0
  407. package/dist/core/p-505250cf.entry.js.map +1 -0
  408. package/dist/core/p-53e00a8a.entry.js +2 -0
  409. package/dist/core/p-53e00a8a.entry.js.map +1 -0
  410. package/dist/core/p-59028160.entry.js +2 -0
  411. package/dist/core/p-59028160.entry.js.map +1 -0
  412. package/dist/core/p-5accf0bb.entry.js +2 -0
  413. package/dist/core/p-5accf0bb.entry.js.map +1 -0
  414. package/dist/core/p-5b7dfe57.entry.js +2 -0
  415. package/dist/core/p-5b7dfe57.entry.js.map +1 -0
  416. package/dist/core/p-5cfb5821.entry.js +2 -0
  417. package/dist/core/p-5cfb5821.entry.js.map +1 -0
  418. package/dist/core/p-603fea14.entry.js +2 -0
  419. package/dist/core/p-603fea14.entry.js.map +1 -0
  420. package/dist/core/p-64933069.entry.js +2 -0
  421. package/dist/core/p-64933069.entry.js.map +1 -0
  422. package/dist/core/p-6beffd0e.entry.js +2 -0
  423. package/dist/core/p-6beffd0e.entry.js.map +1 -0
  424. package/dist/core/p-77a32de5.entry.js +2 -0
  425. package/dist/core/p-77a32de5.entry.js.map +1 -0
  426. package/dist/core/p-7c268030.entry.js +2 -0
  427. package/dist/core/p-7c268030.entry.js.map +1 -0
  428. package/dist/core/p-7c78f6c6.entry.js +2 -0
  429. package/dist/core/p-7c78f6c6.entry.js.map +1 -0
  430. package/dist/core/p-7c80d79c.entry.js +2 -0
  431. package/dist/core/p-7c80d79c.entry.js.map +1 -0
  432. package/dist/core/{p-c2b5e7b1.entry.js → p-7e1603cc.entry.js} +2 -2
  433. package/dist/core/p-7e1603cc.entry.js.map +1 -0
  434. package/dist/core/p-897b8d16.entry.js +2 -0
  435. package/dist/core/p-897b8d16.entry.js.map +1 -0
  436. package/dist/core/p-8ca2e329.entry.js +2 -0
  437. package/dist/core/p-8ca2e329.entry.js.map +1 -0
  438. package/dist/core/p-8df49808.entry.js +2 -0
  439. package/dist/core/p-8df49808.entry.js.map +1 -0
  440. package/dist/core/p-8f12659d.entry.js +2 -0
  441. package/dist/core/p-8f12659d.entry.js.map +1 -0
  442. package/dist/core/p-903ee57e.entry.js +2 -0
  443. package/dist/core/p-903ee57e.entry.js.map +1 -0
  444. package/dist/core/p-92e3ccb9.entry.js +2 -0
  445. package/dist/core/p-92e3ccb9.entry.js.map +1 -0
  446. package/dist/core/p-9397b15b.js +2 -0
  447. package/dist/core/p-9397b15b.js.map +1 -0
  448. package/dist/core/p-9b54feca.entry.js +2 -0
  449. package/dist/core/p-9b54feca.entry.js.map +1 -0
  450. package/dist/core/{p-356b8a4c.entry.js → p-9f3cf053.entry.js} +2 -2
  451. package/dist/core/{p-356b8a4c.entry.js.map → p-9f3cf053.entry.js.map} +1 -1
  452. package/dist/core/p-a78cf2cb.entry.js +2 -0
  453. package/dist/core/p-a78cf2cb.entry.js.map +1 -0
  454. package/dist/core/p-a9151d0b.entry.js +2 -0
  455. package/dist/core/p-a9151d0b.entry.js.map +1 -0
  456. package/dist/core/p-acc76b80.entry.js +2 -0
  457. package/dist/core/p-acc76b80.entry.js.map +1 -0
  458. package/dist/core/p-aeb6016c.entry.js +2 -0
  459. package/dist/core/p-aeb6016c.entry.js.map +1 -0
  460. package/dist/core/p-b0751bd9.entry.js +2 -0
  461. package/dist/core/p-b0751bd9.entry.js.map +1 -0
  462. package/dist/core/{p-452985d9.entry.js → p-b40ecaef.entry.js} +2 -2
  463. package/dist/core/p-b40ecaef.entry.js.map +1 -0
  464. package/dist/core/p-bb1252fa.entry.js +2 -0
  465. package/dist/core/p-bb1252fa.entry.js.map +1 -0
  466. package/dist/core/p-c033e7d6.entry.js +2 -0
  467. package/dist/core/p-c033e7d6.entry.js.map +1 -0
  468. package/dist/core/p-c1698936.entry.js +2 -0
  469. package/dist/core/p-c1698936.entry.js.map +1 -0
  470. package/dist/core/p-c1e90c85.entry.js +2 -0
  471. package/dist/core/p-c1e90c85.entry.js.map +1 -0
  472. package/dist/core/p-cb63e656.entry.js +2 -0
  473. package/dist/core/p-cb63e656.entry.js.map +1 -0
  474. package/dist/core/p-d03374fc.entry.js +2 -0
  475. package/dist/core/p-d03374fc.entry.js.map +1 -0
  476. package/dist/core/p-d2e7a256.entry.js +2 -0
  477. package/dist/core/p-d2e7a256.entry.js.map +1 -0
  478. package/dist/core/p-d3c0bffb.entry.js +2 -0
  479. package/dist/core/p-d3c0bffb.entry.js.map +1 -0
  480. package/dist/core/p-d5ca3bcb.entry.js +2 -0
  481. package/dist/core/p-d5ca3bcb.entry.js.map +1 -0
  482. package/dist/core/p-da3e8c54.entry.js +2 -0
  483. package/dist/core/p-da3e8c54.entry.js.map +1 -0
  484. package/dist/core/p-e5d99316.entry.js +2 -0
  485. package/dist/core/p-e5d99316.entry.js.map +1 -0
  486. package/dist/core/p-eb65e556.entry.js +2 -0
  487. package/dist/core/p-eb65e556.entry.js.map +1 -0
  488. package/dist/core/p-ec53b435.entry.js +2 -0
  489. package/dist/core/p-ec53b435.entry.js.map +1 -0
  490. package/dist/core/p-ed4cde5a.entry.js +2 -0
  491. package/dist/core/p-ed4cde5a.entry.js.map +1 -0
  492. package/dist/core/{p-baf81f30.entry.js → p-f64abdff.entry.js} +2 -2
  493. package/dist/core/p-f64abdff.entry.js.map +1 -0
  494. package/dist/core/p-f9810621.entry.js +2 -0
  495. package/dist/core/p-f9810621.entry.js.map +1 -0
  496. package/dist/core/p-fb7b99dd.entry.js +2 -0
  497. package/dist/core/p-fb7b99dd.entry.js.map +1 -0
  498. package/dist/esm/core.js +1 -1
  499. package/dist/esm/{date-helpers-4f432e92.js → date-helpers-0e5e32a7.js} +2 -2
  500. package/dist/esm/{date-helpers-4f432e92.js.map → date-helpers-0e5e32a7.js.map} +1 -1
  501. package/dist/esm/{helpers-f328a7b6.js → helpers-5bd2012a.js} +108 -2
  502. package/dist/esm/helpers-5bd2012a.js.map +1 -0
  503. package/dist/esm/{helpers-7aa21b0a.js → helpers-dab8ddfe.js} +85 -91
  504. package/dist/esm/helpers-dab8ddfe.js.map +1 -0
  505. package/dist/esm/ic-accordion-group.entry.js +31 -9
  506. package/dist/esm/ic-accordion-group.entry.js.map +1 -1
  507. package/dist/esm/ic-accordion.entry.js +7 -8
  508. package/dist/esm/ic-accordion.entry.js.map +1 -1
  509. package/dist/esm/ic-alert.entry.js +27 -9
  510. package/dist/esm/ic-alert.entry.js.map +1 -1
  511. package/dist/esm/ic-back-to-top.entry.js +17 -8
  512. package/dist/esm/ic-back-to-top.entry.js.map +1 -1
  513. package/dist/esm/ic-badge.entry.js +67 -117
  514. package/dist/esm/ic-badge.entry.js.map +1 -1
  515. package/dist/esm/ic-breadcrumb-group.entry.js +37 -11
  516. package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
  517. package/dist/esm/ic-breadcrumb.entry.js +8 -7
  518. package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
  519. package/dist/esm/ic-button_3.entry.js +121 -133
  520. package/dist/esm/ic-button_3.entry.js.map +1 -1
  521. package/dist/esm/ic-card-horizontal.entry.js +127 -0
  522. package/dist/esm/ic-card-horizontal.entry.js.map +1 -0
  523. package/dist/esm/ic-card-vertical.entry.js +145 -0
  524. package/dist/esm/ic-card-vertical.entry.js.map +1 -0
  525. package/dist/esm/ic-checkbox-group.entry.js +27 -20
  526. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  527. package/dist/esm/ic-checkbox.entry.js +45 -40
  528. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  529. package/dist/esm/ic-chip.entry.js +49 -31
  530. package/dist/esm/ic-chip.entry.js.map +1 -1
  531. package/dist/esm/ic-classification-banner.entry.js +14 -5
  532. package/dist/esm/ic-classification-banner.entry.js.map +1 -1
  533. package/dist/esm/ic-data-list.entry.js +28 -0
  534. package/dist/esm/ic-data-list.entry.js.map +1 -0
  535. package/dist/esm/ic-data-row.entry.js +12 -12
  536. package/dist/esm/ic-data-row.entry.js.map +1 -1
  537. package/dist/esm/ic-data-table-title-bar.entry.js +53 -0
  538. package/dist/esm/ic-data-table-title-bar.entry.js.map +1 -0
  539. package/dist/esm/ic-data-table.entry.js +808 -66
  540. package/dist/esm/ic-data-table.entry.js.map +1 -1
  541. package/dist/esm/ic-date-input.entry.js +71 -34
  542. package/dist/esm/ic-date-input.entry.js.map +1 -1
  543. package/dist/esm/ic-date-picker.entry.js +82 -56
  544. package/dist/esm/ic-date-picker.entry.js.map +1 -1
  545. package/dist/esm/ic-dialog.entry.js +27 -101
  546. package/dist/esm/ic-dialog.entry.js.map +1 -1
  547. package/dist/esm/ic-divider.entry.js +2 -3
  548. package/dist/esm/ic-divider.entry.js.map +1 -1
  549. package/dist/esm/ic-empty-state_2.entry.js +318 -0
  550. package/dist/esm/ic-empty-state_2.entry.js.map +1 -0
  551. package/dist/esm/ic-footer-link-group.entry.js +9 -10
  552. package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
  553. package/dist/esm/ic-footer-link.entry.js +6 -8
  554. package/dist/esm/ic-footer-link.entry.js.map +1 -1
  555. package/dist/esm/ic-footer.entry.js +9 -10
  556. package/dist/esm/ic-footer.entry.js.map +1 -1
  557. package/dist/esm/ic-hero.entry.js +28 -13
  558. package/dist/esm/ic-hero.entry.js.map +1 -1
  559. package/dist/esm/ic-horizontal-scroll.entry.js +6 -8
  560. package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
  561. package/dist/esm/ic-input-component-container_4.entry.js +35 -29
  562. package/dist/esm/ic-input-component-container_4.entry.js.map +1 -1
  563. package/dist/esm/ic-link.entry.js +52 -25
  564. package/dist/esm/ic-link.entry.js.map +1 -1
  565. package/dist/esm/ic-menu-group.entry.js +2 -3
  566. package/dist/esm/ic-menu-group.entry.js.map +1 -1
  567. package/dist/esm/ic-menu-item.entry.js +6 -13
  568. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  569. package/dist/esm/ic-menu-with-multi.entry.js +186 -47
  570. package/dist/esm/ic-menu-with-multi.entry.js.map +1 -1
  571. package/dist/esm/ic-menu.entry.js +16 -21
  572. package/dist/esm/ic-menu.entry.js.map +1 -1
  573. package/dist/esm/ic-navigation-button.entry.js +28 -8
  574. package/dist/esm/ic-navigation-button.entry.js.map +1 -1
  575. package/dist/esm/ic-navigation-group.entry.js +23 -21
  576. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  577. package/dist/esm/ic-navigation-item.entry.js +33 -38
  578. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  579. package/dist/esm/ic-navigation-menu.entry.js +3 -4
  580. package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
  581. package/dist/esm/ic-page-header.entry.js +10 -12
  582. package/dist/esm/ic-page-header.entry.js.map +1 -1
  583. package/dist/esm/ic-pagination_4.entry.js +221 -180
  584. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  585. package/dist/esm/ic-popover-menu.entry.js +33 -33
  586. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  587. package/dist/esm/ic-radio-group.entry.js +87 -53
  588. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  589. package/dist/esm/ic-radio-option.entry.js +44 -53
  590. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  591. package/dist/esm/ic-search-bar.entry.js +29 -49
  592. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  593. package/dist/esm/ic-section-container.entry.js +1 -1
  594. package/dist/esm/ic-section-container.entry.js.map +1 -1
  595. package/dist/esm/ic-select-with-multi.entry.js +14 -50
  596. package/dist/esm/ic-select-with-multi.entry.js.map +1 -1
  597. package/dist/esm/ic-side-navigation.entry.js +8 -9
  598. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  599. package/dist/esm/ic-skeleton.entry.js +18 -38
  600. package/dist/esm/ic-skeleton.entry.js.map +1 -1
  601. package/dist/esm/ic-status-tag.entry.js +7 -15
  602. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  603. package/dist/esm/ic-step.entry.js +41 -43
  604. package/dist/esm/ic-step.entry.js.map +1 -1
  605. package/dist/esm/ic-stepper.entry.js +55 -24
  606. package/dist/esm/ic-stepper.entry.js.map +1 -1
  607. package/dist/esm/ic-switch.entry.js +7 -9
  608. package/dist/esm/ic-switch.entry.js.map +1 -1
  609. package/dist/esm/ic-tab-context.entry.js +90 -137
  610. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  611. package/dist/esm/ic-tab-group.entry.js +25 -11
  612. package/dist/esm/ic-tab-group.entry.js.map +1 -1
  613. package/dist/esm/ic-tab-panel.entry.js +6 -13
  614. package/dist/esm/ic-tab-panel.entry.js.map +1 -1
  615. package/dist/esm/ic-tab.entry.js +14 -14
  616. package/dist/esm/ic-tab.entry.js.map +1 -1
  617. package/dist/esm/ic-theme.entry.js +39 -25
  618. package/dist/esm/ic-theme.entry.js.map +1 -1
  619. package/dist/esm/ic-toast-region.entry.js +6 -7
  620. package/dist/esm/ic-toast-region.entry.js.map +1 -1
  621. package/dist/esm/ic-toast.entry.js +88 -35
  622. package/dist/esm/ic-toast.entry.js.map +1 -1
  623. package/dist/esm/ic-toggle-button-group.entry.js +17 -17
  624. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
  625. package/dist/esm/ic-toggle-button.entry.js +15 -14
  626. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  627. package/dist/esm/ic-top-navigation.entry.js +62 -86
  628. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  629. package/dist/esm/ic-tree-item.entry.js +237 -0
  630. package/dist/esm/ic-tree-item.entry.js.map +1 -0
  631. package/dist/esm/ic-tree-view.entry.js +199 -0
  632. package/dist/esm/ic-tree-view.entry.js.map +1 -0
  633. package/dist/esm/ic-typography.entry.js +59 -21
  634. package/dist/esm/ic-typography.entry.js.map +1 -1
  635. package/dist/esm/index-93509377.js +26 -14
  636. package/dist/esm/loader.js +1 -1
  637. package/dist/types/components/ic-card-horizontal/ic-card-horizontal.d.ts +71 -0
  638. package/dist/types/components/ic-card-horizontal/ic-card-horizontal.types.d.ts +1 -0
  639. package/dist/types/components/ic-data-table/ic-data-table.d.ts +178 -19
  640. package/dist/types/components/ic-data-table/ic-data-table.types.d.ts +30 -0
  641. package/dist/types/components/ic-data-table/story-data.d.ts +251 -3
  642. package/dist/types/components/ic-data-table-title-bar/ic-data-table-title-bar.d.ts +36 -0
  643. package/dist/types/components/ic-date-input/ic-date-input.d.ts +17 -0
  644. package/dist/types/components/ic-date-picker/ic-date-picker.d.ts +14 -25
  645. package/dist/types/components/ic-menu-with-multi/ic-menu.d.ts +10 -4
  646. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +46 -22
  647. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.types.d.ts +4 -0
  648. package/dist/types/components/ic-select-with-multi/ic-select.d.ts +1 -31
  649. package/dist/types/components/ic-tree-item/ic-tree-item.d.ts +95 -0
  650. package/dist/types/components/ic-tree-view/ic-tree-view.d.ts +40 -0
  651. package/dist/types/components.d.ts +560 -117
  652. package/dist/types/interface.d.ts +1 -0
  653. package/dist/types/utils/helpers.d.ts +9 -0
  654. package/dist/types/utils/types.d.ts +24 -8
  655. package/hydrate/index.js +4461 -2588
  656. package/package.json +6 -6
  657. package/dist/cjs/helpers-7a069459.js.map +0 -1
  658. package/dist/cjs/helpers-f75cf7cf.js.map +0 -1
  659. package/dist/cjs/ic-card.cjs.entry.js +0 -126
  660. package/dist/cjs/ic-card.cjs.entry.js.map +0 -1
  661. package/dist/cjs/ic-data-entity.cjs.entry.js +0 -29
  662. package/dist/cjs/ic-data-entity.cjs.entry.js.map +0 -1
  663. package/dist/cjs/ic-empty-state.cjs.entry.js +0 -38
  664. package/dist/cjs/ic-empty-state.cjs.entry.js.map +0 -1
  665. package/dist/cjs/ic-pagination-bar.cjs.entry.js +0 -269
  666. package/dist/cjs/ic-pagination-bar.cjs.entry.js.map +0 -1
  667. package/dist/cjs/types-17dba796.js +0 -16
  668. package/dist/cjs/types-17dba796.js.map +0 -1
  669. package/dist/collection/components/ic-pagination/ic-pagination.types.js +0 -2
  670. package/dist/collection/components/ic-pagination/ic-pagination.types.js.map +0 -1
  671. package/dist/collection/components/ic-select-with-multi/test/a11y/ic-select.test.a11y.js +0 -146
  672. package/dist/collection/components/ic-select-with-multi/test/a11y/ic-select.test.a11y.js.map +0 -1
  673. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.e2e.js +0 -2040
  674. package/dist/collection/components/ic-select-with-multi/test/basic/ic-select.e2e.js.map +0 -1
  675. package/dist/components/ic-alert2.js +0 -117
  676. package/dist/components/ic-alert2.js.map +0 -1
  677. package/dist/components/ic-card.js +0 -171
  678. package/dist/components/ic-card.js.map +0 -1
  679. package/dist/components/ic-data-entity.js +0 -53
  680. package/dist/components/ic-data-entity.js.map +0 -1
  681. package/dist/components/types.js +0 -16
  682. package/dist/components/types.js.map +0 -1
  683. package/dist/core/p-06ae5bec.entry.js +0 -2
  684. package/dist/core/p-06ae5bec.entry.js.map +0 -1
  685. package/dist/core/p-0939ce92.entry.js +0 -2
  686. package/dist/core/p-0939ce92.entry.js.map +0 -1
  687. package/dist/core/p-16f67397.entry.js +0 -2
  688. package/dist/core/p-16f67397.entry.js.map +0 -1
  689. package/dist/core/p-1832f4b5.entry.js +0 -2
  690. package/dist/core/p-1832f4b5.entry.js.map +0 -1
  691. package/dist/core/p-1b7d426b.entry.js +0 -2
  692. package/dist/core/p-1b7d426b.entry.js.map +0 -1
  693. package/dist/core/p-1ce75941.entry.js +0 -2
  694. package/dist/core/p-1ce75941.entry.js.map +0 -1
  695. package/dist/core/p-2e2e0099.entry.js +0 -2
  696. package/dist/core/p-2e2e0099.entry.js.map +0 -1
  697. package/dist/core/p-33679c06.entry.js +0 -2
  698. package/dist/core/p-33679c06.entry.js.map +0 -1
  699. package/dist/core/p-36508aad.entry.js +0 -2
  700. package/dist/core/p-36508aad.entry.js.map +0 -1
  701. package/dist/core/p-3745da83.entry.js +0 -2
  702. package/dist/core/p-3745da83.entry.js.map +0 -1
  703. package/dist/core/p-3f2e77c3.entry.js +0 -2
  704. package/dist/core/p-3f2e77c3.entry.js.map +0 -1
  705. package/dist/core/p-452985d9.entry.js.map +0 -1
  706. package/dist/core/p-47ac6838.entry.js +0 -2
  707. package/dist/core/p-47ac6838.entry.js.map +0 -1
  708. package/dist/core/p-4f1ffa39.entry.js +0 -2
  709. package/dist/core/p-4f1ffa39.entry.js.map +0 -1
  710. package/dist/core/p-5759d771.entry.js +0 -2
  711. package/dist/core/p-5759d771.entry.js.map +0 -1
  712. package/dist/core/p-5e2e6c3b.entry.js +0 -2
  713. package/dist/core/p-5e2e6c3b.entry.js.map +0 -1
  714. package/dist/core/p-5fe96107.entry.js +0 -2
  715. package/dist/core/p-5fe96107.entry.js.map +0 -1
  716. package/dist/core/p-62e22508.entry.js +0 -2
  717. package/dist/core/p-62e22508.entry.js.map +0 -1
  718. package/dist/core/p-6690bc04.entry.js +0 -2
  719. package/dist/core/p-6690bc04.entry.js.map +0 -1
  720. package/dist/core/p-6c0e2ceb.entry.js +0 -2
  721. package/dist/core/p-6c0e2ceb.entry.js.map +0 -1
  722. package/dist/core/p-76915584.entry.js +0 -2
  723. package/dist/core/p-76915584.entry.js.map +0 -1
  724. package/dist/core/p-76d26018.entry.js +0 -2
  725. package/dist/core/p-76d26018.entry.js.map +0 -1
  726. package/dist/core/p-776671cf.entry.js +0 -2
  727. package/dist/core/p-776671cf.entry.js.map +0 -1
  728. package/dist/core/p-7cecf5d5.entry.js +0 -2
  729. package/dist/core/p-7cecf5d5.entry.js.map +0 -1
  730. package/dist/core/p-85609bdd.entry.js +0 -2
  731. package/dist/core/p-85609bdd.entry.js.map +0 -1
  732. package/dist/core/p-86012178.entry.js +0 -2
  733. package/dist/core/p-86012178.entry.js.map +0 -1
  734. package/dist/core/p-8a7e7d23.entry.js +0 -2
  735. package/dist/core/p-8a7e7d23.entry.js.map +0 -1
  736. package/dist/core/p-8c90110a.entry.js +0 -2
  737. package/dist/core/p-8c90110a.entry.js.map +0 -1
  738. package/dist/core/p-8ea47d42.entry.js +0 -2
  739. package/dist/core/p-8ea47d42.entry.js.map +0 -1
  740. package/dist/core/p-9777ebb1.entry.js +0 -2
  741. package/dist/core/p-9777ebb1.entry.js.map +0 -1
  742. package/dist/core/p-982a6e88.entry.js +0 -2
  743. package/dist/core/p-982a6e88.entry.js.map +0 -1
  744. package/dist/core/p-98448bdb.entry.js +0 -2
  745. package/dist/core/p-98448bdb.entry.js.map +0 -1
  746. package/dist/core/p-9d01a7ad.entry.js +0 -2
  747. package/dist/core/p-9d01a7ad.entry.js.map +0 -1
  748. package/dist/core/p-9d540656.entry.js +0 -2
  749. package/dist/core/p-9d540656.entry.js.map +0 -1
  750. package/dist/core/p-9e3178e8.entry.js +0 -2
  751. package/dist/core/p-9e3178e8.entry.js.map +0 -1
  752. package/dist/core/p-a0f9b259.entry.js +0 -2
  753. package/dist/core/p-a0f9b259.entry.js.map +0 -1
  754. package/dist/core/p-a42c2f37.entry.js +0 -2
  755. package/dist/core/p-a42c2f37.entry.js.map +0 -1
  756. package/dist/core/p-a6447b13.entry.js +0 -2
  757. package/dist/core/p-a6447b13.entry.js.map +0 -1
  758. package/dist/core/p-aabab75f.entry.js +0 -2
  759. package/dist/core/p-aabab75f.entry.js.map +0 -1
  760. package/dist/core/p-ae422058.entry.js +0 -2
  761. package/dist/core/p-ae422058.entry.js.map +0 -1
  762. package/dist/core/p-b2aa3d7c.entry.js +0 -2
  763. package/dist/core/p-b2aa3d7c.entry.js.map +0 -1
  764. package/dist/core/p-b306cbc8.entry.js +0 -2
  765. package/dist/core/p-baf81f30.entry.js.map +0 -1
  766. package/dist/core/p-c2b5e7b1.entry.js.map +0 -1
  767. package/dist/core/p-c7590421.entry.js +0 -2
  768. package/dist/core/p-c7590421.entry.js.map +0 -1
  769. package/dist/core/p-c7820c23.entry.js +0 -2
  770. package/dist/core/p-c7820c23.entry.js.map +0 -1
  771. package/dist/core/p-ca8cbd6a.entry.js +0 -2
  772. package/dist/core/p-ca8cbd6a.entry.js.map +0 -1
  773. package/dist/core/p-caf857de.entry.js +0 -2
  774. package/dist/core/p-caf857de.entry.js.map +0 -1
  775. package/dist/core/p-cc7bc438.entry.js +0 -2
  776. package/dist/core/p-cc7bc438.entry.js.map +0 -1
  777. package/dist/core/p-cd799087.js +0 -2
  778. package/dist/core/p-cd799087.js.map +0 -1
  779. package/dist/core/p-d32692e2.entry.js +0 -2
  780. package/dist/core/p-d32692e2.entry.js.map +0 -1
  781. package/dist/core/p-d35c7c18.js +0 -2
  782. package/dist/core/p-d35c7c18.js.map +0 -1
  783. package/dist/core/p-d3856ed3.entry.js +0 -2
  784. package/dist/core/p-d3856ed3.entry.js.map +0 -1
  785. package/dist/core/p-d4fdd8c1.entry.js +0 -2
  786. package/dist/core/p-d4fdd8c1.entry.js.map +0 -1
  787. package/dist/core/p-d5c99ec3.entry.js +0 -2
  788. package/dist/core/p-d5c99ec3.entry.js.map +0 -1
  789. package/dist/core/p-e189f1d0.entry.js +0 -2
  790. package/dist/core/p-e189f1d0.entry.js.map +0 -1
  791. package/dist/core/p-e473bbf8.entry.js +0 -2
  792. package/dist/core/p-e473bbf8.entry.js.map +0 -1
  793. package/dist/core/p-e74f1d09.entry.js +0 -2
  794. package/dist/core/p-e74f1d09.entry.js.map +0 -1
  795. package/dist/core/p-e79e0292.entry.js +0 -2
  796. package/dist/core/p-e79e0292.entry.js.map +0 -1
  797. package/dist/core/p-e84b0310.entry.js +0 -2
  798. package/dist/core/p-e84b0310.entry.js.map +0 -1
  799. package/dist/core/p-f55ad6ae.entry.js +0 -2
  800. package/dist/core/p-f55ad6ae.entry.js.map +0 -1
  801. package/dist/core/p-f91527a0.entry.js +0 -2
  802. package/dist/core/p-f91527a0.entry.js.map +0 -1
  803. package/dist/core/p-fbf4e9b7.entry.js +0 -2
  804. package/dist/core/p-fbf4e9b7.entry.js.map +0 -1
  805. package/dist/core/p-fd186591.js +0 -2
  806. package/dist/core/p-fd186591.js.map +0 -1
  807. package/dist/esm/helpers-7aa21b0a.js.map +0 -1
  808. package/dist/esm/helpers-f328a7b6.js.map +0 -1
  809. package/dist/esm/ic-card.entry.js +0 -122
  810. package/dist/esm/ic-card.entry.js.map +0 -1
  811. package/dist/esm/ic-data-entity.entry.js +0 -25
  812. package/dist/esm/ic-data-entity.entry.js.map +0 -1
  813. package/dist/esm/ic-empty-state.entry.js +0 -34
  814. package/dist/esm/ic-empty-state.entry.js.map +0 -1
  815. package/dist/esm/ic-pagination-bar.entry.js +0 -265
  816. package/dist/esm/ic-pagination-bar.entry.js.map +0 -1
  817. package/dist/esm/types-f605c21c.js +0 -16
  818. package/dist/esm/types-f605c21c.js.map +0 -1
  819. package/dist/types/components/ic-pagination/ic-pagination.types.d.ts +0 -6
  820. /package/dist/core/{p-f8cf2978.js.map → p-33dd24eb.js.map} +0 -0
  821. /package/dist/types/components/{ic-select-with-multi/test/a11y/ic-select.test.a11y.d.ts → ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.d.ts} +0 -0
@@ -1,4 +1,5 @@
1
- import { r as registerInstance, h, g as getElement } from './index-93509377.js';
1
+ import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host, g as getElement } from './index-93509377.js';
2
+ import { d as dynamicDebounce, a as isEmptyString, p as pxToRem, i as isSlotUsed, b as addDataToPosition } from './helpers-5bd2012a.js';
2
3
 
3
4
  const unsortedIcon = `<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24">
4
5
  <path d="M9 3 5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3z"></path>
@@ -12,16 +13,180 @@ const descendingIcon = `<svg focusable="false" aria-hidden="true" viewBox="0 0 2
12
13
  <path d="M16.01 11H4v2h12.01v3L20 12l-3.99-4z"></path>
13
14
  </svg>`;
14
15
 
15
- const icDataTableCss = ":host{position:relative;display:block;height:100%;max-height:100%}.table-container{position:relative;height:calc(100% - var(--ic-space-xxxs))}.table-row-container{position:relative;height:100%;overflow:auto;transition:var(--ic-easing-transition-fast);overflow-anchor:none}:host([show-pagination=\"true\"]) .table-row-container{height:calc(100% - 3.5625rem)}table{table-layout:fixed;border-spacing:0;width:100%}.table-row-container:focus{outline:none;box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-fast);z-index:1}:host([embedded=\"true\"]) .table-container{border:var(--ic-border-light)}.column-header-sticky{position:sticky;top:0;z-index:1}.column-header-overlay{position:sticky;top:0;z-index:1;box-shadow:0 0.375rem var(--ic-space-xs) calc(var(--ic-space-xxs * -1))\n rgb(0 0 0 / 20%)}.row-header-sticky{position:sticky;left:0}.column-header,.table-row{box-sizing:border-box}.table-row-selected{background-color:var(--ic-table-row-selected) !important}.sort-button{margin-left:auto}.sort-button:hover{background-color:var(--ic-action-dark-bg-hover)}.sort-button:active{background-color:var(--ic-action-dark-bg-active)}.sort-button svg{color:var(--ic-architectural-black)}.sort-button-unsorted svg{color:var(--ic-color-tertiary-text)}.table-density-dense{padding:var(--ic-space-xxs) var(--ic-space-xs) !important}.text-dense{font-size:var(--ic-font-size-label)}.table-density-spacious{padding:0.625rem var(--ic-space-xs) !important}.text-spacious{font-size:1.125rem}.column-header-text{font-weight:var(--ic-font-weight-bold)}.column-header,.row-header{text-align:left;padding:var(--ic-space-xs);background-color:var(--ic-architectural-40);border-right:var(--ic-border-light);border-bottom:var(--ic-border-light)}.column-header:last-child{border-right:none}.scrollable .column-header:last-child{border-right:var(--ic-border-light) !important}:host([embedded=\"true\"]) tr:last-child .table-cell,:host([embedded=\"true\"]) tr:last-child .row-header{border-bottom:none}.column-header-alignment-left,.row-header-alignment-left,.cell-alignment-left{text-align:left !important}.column-header-alignment-right,.row-header-alignment-right,.cell-alignment-right{text-align:right !important}.column-header-alignment-center,.row-header-alignment-center,.cell-alignment-center{text-align:center !important}.table-row:nth-child(even){background-color:var(--ic-architectural-20)}.table-cell{padding:var(--ic-space-xs);border-bottom:solid var(--ic-architectural-100) var(--ic-space-1px)}.data-type-string{text-align:left;vertical-align:top}.data-type-number,.data-type-date{text-align:right;vertical-align:top}.cell-alignment-top{vertical-align:top}.cell-alignment-middle{vertical-align:middle}.cell-alignment-bottom{vertical-align:bottom}.cell-emphasis-low{color:var(--ic-color-secondary-text)}.cell-emphasis-high{font-weight:var(--ic-font-weight-bold)}.pagination-container{background-color:var(--ic-architectural-40);border-top:var(--ic-border-light)}.screen-reader-sort-text,.table-caption{position:absolute;left:-100rem}.table-cell,.column-header,.row-header{word-wrap:break-word;white-space:pre-wrap}@media screen and (min-width: 576px){.column-header-inner-container{display:flex;align-items:center}}";
16
+ const icDataTableCss = ":host{position:relative;display:inline-flex;max-height:100%;width:var(--table-width, 100%);height:100%;min-width:var(--table-min-width);max-width:var(--table-max-width)}tbody{vertical-align:top}.table-container{position:relative;height:calc(100% - var(--ic-space-xxxs));display:flex;flex-direction:column;width:100%}.cell-container{display:flex;min-height:1.5rem;overflow-y:hidden;height:var(--row-height)}.truncation-show-hide{overflow:visible;display:block}.cell-icon.truncation-show-hide{display:flex}.cell-container:not(.data-type-element,.truncation-show-hide){overflow-x:hidden}ic-loading-indicator{position:sticky;top:20px}ic-loading-indicator.ic-theme-dark{--inner-color:var(--ic-action-default-dark);--outer-color:var(--ic-action-neutral-light);--label-color:var(--ic-color-text-primary-dark)}ic-loading-indicator.ic-theme-dark.ic-loading-indicator-monochrome{--inner-color:var(--ic-action-light);--outer-color:var(--ic-action-neutral-dark);--label-color:var(--ic-color-text-inverse-dark)}.table-row-container{position:relative;height:100%;overflow:auto;transition:var(--ic-easing-transition-fast);overflow-anchor:none}:host([show-pagination=\"true\"]) .table-row-container{height:calc(100% - 3.5625rem)}table{table-layout:var(--table-layout, \"fixed\");border-spacing:0;width:100%;height:var(--table-height, auto)}.table-row-container:focus{outline:none;box-shadow:var(--ic-border-focus);border-radius:var(--ic-border-radius);transition:var(--ic-easing-transition-fast);z-index:1}:host([embedded=\"true\"]) .table-row-container{border:var(--ic-border-light)}.column-header-inner-container{padding:var(--ic-space-xs);box-sizing:border-box}.column-header-sticky{position:sticky;top:0;z-index:1}.column-header-overlay{position:sticky;top:0;z-index:1;box-shadow:0 0.375rem var(--ic-space-xs) calc(var(--ic-space-xxs * -1))\n rgb(0 0 0 / 20%)}.row-header-sticky{position:sticky;left:0}.column-header,.table-row{box-sizing:border-box}.table-row-selected{background-color:var(--ic-table-row-selected) !important}.sort-button{margin-left:auto}.sort-button:hover{background-color:var(--ic-action-dark-bg-hover)}.sort-button:active{background-color:var(--ic-action-dark-bg-pressed)}.sort-button svg{color:var(--ic-architectural-black)}.sort-button-unsorted svg{color:var(--ic-color-text-tertiary)}.table-density-dense .column-header-inner-container,td.table-density-dense{padding:var(--ic-space-xxs) var(--ic-space-xs) !important}.text-dense{font-size:var(--ic-font-size-label)}.table-density-spacious .column-header-inner-container,td.table-density-spacious{padding:0.625rem var(--ic-space-xs) !important}.text-spacious{font-size:1.125rem}.column-header-text{font-weight:var(--ic-font-weight-bold)}.row-header,.column-header{text-align:left;padding:var(--ic-space-xs);background-color:var(--ic-architectural-40);border-right:var(--ic-border-light);border-bottom:var(--ic-border-light)}.column-header{padding:0;width:var(--column-width);min-width:var(--column-min-width, 4rem);max-width:var(--column-max-width)}.column-header:last-child{border-right:none}.scrollable .column-header:last-child{border-right:var(--ic-border-light) !important}:host([embedded=\"true\"]) tr:last-child .table-cell,:host([embedded=\"true\"]) tr:last-child .row-header{border-bottom:none}.column-header-alignment-left,.row-header-alignment-left,.cell-alignment-left{text-align:left !important;justify-content:start !important}.column-header-alignment-right,.row-header-alignment-right,.cell-alignment-right{text-align:right !important;justify-content:end !important}.cell-alignment-right.truncation-tooltip ic-tooltip ic-typography{padding-right:calc(var(--ic-space-xxs) + var(--ic-space-xs))}.cell-alignment-right.truncation-show-hide ic-typography{--ellipsis-padding-right:calc(var(--ic-space-xxs) + var(--ic-space-xs))}.column-header-alignment-center,.row-header-alignment-center,.cell-alignment-center{text-align:center !important;justify-content:center !important}.table-row:nth-child(even){background-color:var(--ic-architectural-20)}.table-cell{padding:var(--ic-space-xs);border-bottom:solid var(--ic-architectural-100) var(--ic-space-1px);overflow:hidden;box-sizing:border-box;max-width:var(--column-max-width);min-width:var(--column-min-width)}.table-cell.with-overflow{overflow:visible}.data-type-string,.data-type-address{text-align:left;vertical-align:top}.data-type-number,.data-type-date{text-align:right;justify-content:end;vertical-align:top}.cell-alignment-top{vertical-align:top;align-items:flex-start}.cell-alignment-middle{vertical-align:middle;align-items:center}.cell-alignment-bottom{vertical-align:bottom;align-items:flex-end}.cell-emphasis-low{--ic-typography-color:var(--ic-color-text-secondary)}.cell-emphasis-high{font-weight:var(--ic-font-weight-bold)}.pagination-container{background-color:var(--ic-architectural-40);border-top:var(--ic-border-light)}.screen-reader-sort-text,.table-caption{position:absolute;left:-100rem}.table-cell,.column-header,.row-header{word-wrap:break-word;white-space:pre-wrap}.loading-empty{padding:var(--ic-space-xl) var(--ic-space-xxl);margin-top:var(--ic-space-xl)}.updating-state{padding:0;border-bottom:var(--ic-border-light)}.updating-state-headers{border-bottom:none}.loading{position:absolute;left:calc(50% - 5.9741rem);opacity:0;transition:opacity var(--ic-transition-duration-slow)}.loading.show-background{background-color:var(--ic-architectural-white);border:var(--ic-border-light)}.loading.show{opacity:1}.icon,::slotted(svg){height:var(--ic-space-lg);width:var(--ic-space-lg);margin-right:var(--ic-space-xxs)}.column-header-alignment-right>.icon,.row-header-alignment-right>.icon,.cell-alignment-right>.icon,.column-header-alignment-right>::slotted(svg),.row-header-alignment-right>::slotted(svg),.cell-alignment-right>::slotted(svg){margin-right:auto}.column-header-alignment-center>ic-typography,.row-header-alignment-right>ic-typography,.cell-alignment-center>ic-typography{flex:1}.icon>svg{height:var(--ic-space-lg);width:var(--ic-space-lg);display:inline-block}.truncation-tooltip ic-typography{display:-webkit-box;-webkit-line-clamp:var(--ic-line-clamp, 0);-webkit-box-orient:vertical;overflow:hidden}.truncation-tooltip ic-typography,.truncation-show-hide ic-typography{white-space:normal}.ic-tooltip-overflow{overflow:hidden;width:100%}@media screen and (min-width: 577px){.column-header-inner-container{display:flex;align-items:center}}";
16
17
 
17
18
  const DataTable = class {
18
19
  constructor(hostRef) {
19
20
  registerInstance(this, hostRef);
21
+ this.icRowHeightChange = createEvent(this, "icRowHeightChange", 7);
22
+ this.icSortChange = createEvent(this, "icSortChange", 7);
23
+ this.DENSITY_HEIGHT_MULTIPLIER = {
24
+ dense: 0.8,
25
+ default: 1,
26
+ spacious: 1.2,
27
+ };
28
+ this.DENSITY_PADDING_HEIGHT_DIFF = {
29
+ dense: 8,
30
+ default: 16,
31
+ spacious: 20,
32
+ };
20
33
  this.SORT_ICONS = {
21
34
  unsorted: unsortedIcon,
22
35
  ascending: ascendingIcon,
23
36
  descending: descendingIcon,
24
37
  };
38
+ this.hasLoadedForOneSecond = true;
39
+ this.resizeObserver = null;
40
+ this.SHOW_HIDE_STRING = "show-hide";
41
+ this.SHOW_HIDE_CSS_CLASS = `${this.SHOW_HIDE_STRING}-wrap`;
42
+ this.TOOLTIP_STRING = "tooltip";
43
+ this.TOOLTIP = `ic-${this.TOOLTIP_STRING}`;
44
+ this.TEXT_WRAP_STRING = "text-wrap";
45
+ this.TEXT_WRAP_CLASS = `.${this.TEXT_WRAP_STRING}`;
46
+ this.dataUpdated = false;
47
+ this.rowHeightSet = false;
48
+ this.initialLoad = false;
49
+ this.icPageChangeEvent = false;
50
+ this.itemsPerPageChange = false;
51
+ this.DATA_ROW_HEIGHT_STRING = "data-row-height";
52
+ this.ROW_HEIGHT_CSS_VARIABLE = "--row-height";
53
+ this.DEFAULT_LINE_HEIGHT = 24;
54
+ this.densityUpdate = false;
55
+ this.truncationPatternUpdated = false;
56
+ this.isNewDebounceDelaySet = false;
57
+ this.updateSetRowHeight = (typographyEl) => {
58
+ const fontSize = parseInt(getComputedStyle(document.documentElement).fontSize);
59
+ if (typographyEl) {
60
+ const cellContainer = this.getCellContainer(typographyEl);
61
+ const rowHeight = fontSize *
62
+ parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
63
+ if (typographyEl.scrollHeight > rowHeight) {
64
+ cellContainer.style.removeProperty(this.ROW_HEIGHT_CSS_VARIABLE);
65
+ }
66
+ }
67
+ else {
68
+ this.getTypographyElements().forEach((typographyEl) => {
69
+ const cellContainer = this.getCellContainer(typographyEl);
70
+ const rowHeight = fontSize *
71
+ parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
72
+ if (typographyEl.scrollHeight > rowHeight) {
73
+ cellContainer.style.removeProperty(this.ROW_HEIGHT_CSS_VARIABLE);
74
+ }
75
+ });
76
+ }
77
+ };
78
+ this.debounceDataTruncation = () => {
79
+ this.getTypographyElements().forEach((typographyEl) => {
80
+ const cellContainer = this.getCellContainer(typographyEl);
81
+ if (!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
82
+ this.resizeObserver = new ResizeObserver(
83
+ // This gets triggered twice due to updated data and see more/see less button
84
+ dynamicDebounce(() => {
85
+ this.dataTruncation(typographyEl);
86
+ if (!this.isNewDebounceDelaySet) {
87
+ this.setNewDebounceDelay(200);
88
+ }
89
+ }, () => this.debounceDelay));
90
+ this.resizeObserver.observe(typographyEl);
91
+ }
92
+ });
93
+ };
94
+ this.setNewDebounceDelay = (delay) => {
95
+ this.debounceDelay = delay;
96
+ this.isNewDebounceDelaySet = true;
97
+ };
98
+ this.getLines = (height) => Math.floor(height / this.DEFAULT_LINE_HEIGHT);
99
+ this.truncate = (typographyEl, cellContainer, tooltip) => {
100
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
101
+ //24 is the height of a single line
102
+ if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {
103
+ if (this.truncationPattern === this.TOOLTIP_STRING) {
104
+ this.addTooltipTruncation(typographyEl, cellContainer, tooltip);
105
+ }
106
+ if (this.truncationPattern === this.SHOW_HIDE_STRING) {
107
+ this.addShowHideTruncation(cellContainer, typographyEl);
108
+ }
109
+ }
110
+ }
111
+ else {
112
+ if (this.truncationPattern === this.TOOLTIP_STRING && tooltip) {
113
+ typographyEl.setAttribute("style", `--ic-line-clamp: 0`);
114
+ cellContainer.appendChild(typographyEl);
115
+ tooltip.remove();
116
+ }
117
+ if (this.truncationPattern === this.SHOW_HIDE_STRING &&
118
+ !isEmptyString(typographyEl.getAttribute("max-lines"))) {
119
+ this.resetShowHideTruncation(typographyEl);
120
+ }
121
+ }
122
+ };
123
+ this.dataTruncation = (typographyEl) => {
124
+ // Tooltip truncation mentioned in AC. Will need revisiting
125
+ const tooltip = this.getTooltip(typographyEl);
126
+ const cellContainer = this.getCellContainer(typographyEl);
127
+ if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.classList.contains("data-type-element")) ||
128
+ this.dataUpdated) {
129
+ return;
130
+ }
131
+ if (this.truncationPattern === this.SHOW_HIDE_STRING &&
132
+ typographyEl.shadowRoot.querySelector("button")) {
133
+ const showHideBtn = typographyEl.shadowRoot.querySelector("button");
134
+ // If the see more/see less is present and the max lines is equal to the cell container
135
+ // remove the see more/see less button
136
+ if (showHideBtn) {
137
+ const truncWrapper = this.getTruncWrapper(typographyEl);
138
+ if (this.getLines(truncWrapper.scrollHeight) ===
139
+ +typographyEl.getAttribute("max-lines")) {
140
+ this.resetShowHideTruncation(typographyEl);
141
+ }
142
+ }
143
+ }
144
+ // Deals with setting and resetting row height and re-truncating data
145
+ if (this.rowHeightSet && this.truncationPattern === this.SHOW_HIDE_STRING) {
146
+ const truncWrapper = this.getTruncWrapper(typographyEl);
147
+ // cellContainer.clientHeight - 24 removes the extra line by see more/see less
148
+ if (truncWrapper &&
149
+ cellContainer.clientHeight - this.DEFAULT_LINE_HEIGHT >
150
+ truncWrapper.scrollHeight) {
151
+ this.resetShowHideTruncation(typographyEl);
152
+ return;
153
+ }
154
+ if (typographyEl.scrollHeight > cellContainer.clientHeight) {
155
+ this.addShowHideTruncation(cellContainer, typographyEl);
156
+ return;
157
+ }
158
+ }
159
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > 0 &&
160
+ (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) > 0 &&
161
+ (typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) === (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
162
+ if (tooltip) {
163
+ this.removeTooltip(cellContainer, typographyEl, tooltip);
164
+ }
165
+ return;
166
+ }
167
+ this.truncate(typographyEl, cellContainer, tooltip);
168
+ };
169
+ this.removeTextWrap = () => {
170
+ this.getTypographyElements().forEach((typographyEl) => {
171
+ const tableCell = typographyEl.closest("td");
172
+ if (tableCell.classList.contains(this.TEXT_WRAP_STRING)) {
173
+ tableCell.classList.remove(this.TEXT_WRAP_STRING);
174
+ }
175
+ });
176
+ };
177
+ this.getCellContainer = (typographyEl) => {
178
+ return typographyEl.closest(".cell-container");
179
+ };
180
+ this.deleteTextWrapDataKey = (array) => Array.isArray(array) &&
181
+ array.forEach((val) => val.textWrap && delete val.textWrap);
182
+ this.startLoadingTimer = () => {
183
+ this.hasLoadedForOneSecond = false;
184
+ this.timerStarted = Date.now();
185
+ setTimeout(() => {
186
+ this.hasLoadedForOneSecond = true;
187
+ this.timerStarted = null;
188
+ }, this.minimumLoadingDisplayDuration);
189
+ };
25
190
  this.isObject = (value) => typeof value === "object";
26
191
  this.notDefaultDensity = () => this.density !== "default";
27
192
  this.getCellContent = (cell, dataType) => {
@@ -39,9 +204,60 @@ const DataTable = class {
39
204
  return this.getObjectValue(this.getObjectValue(cell, "cellAlignment"), alignment);
40
205
  }
41
206
  };
42
- this.createCells = (row) => {
207
+ this.getCellOptions = (cell, key) => {
208
+ if (!(this.isObject(cell) && Object.keys(cell).includes(key)))
209
+ return;
210
+ return this.getObjectValue(cell, key);
211
+ };
212
+ this.createUpdatingIndicator = () => {
213
+ const { appearance, description, max, min, progress, monochrome } = this.updatingOptions || {};
214
+ return (h("th", { colSpan: this.columns.length, class: "updating-state" }, h("ic-loading-indicator", { theme: appearance, monochrome: monochrome, description: description || "Updating table data", fullWidth: true, max: max, min: min, progress: progress, type: "linear", size: "small" })));
215
+ };
216
+ this.setRowHeight = (height) => {
217
+ return pxToRem(`${height * this.DENSITY_HEIGHT_MULTIPLIER[this.density] -
218
+ this.DENSITY_PADDING_HEIGHT_DIFF[this.density]}px`);
219
+ };
220
+ this.setTruncationClass = () => {
221
+ if (this.truncationPattern) {
222
+ return { [`truncation-${this.truncationPattern}`]: true };
223
+ }
224
+ return {};
225
+ };
226
+ this.getColumnWidth = (columnWidth) => {
227
+ // TODO: Setting max width on columns
228
+ let columnWidthStyling = {};
229
+ if (columnWidth) {
230
+ if (typeof columnWidth === "string") {
231
+ columnWidthStyling = Object.assign(Object.assign({}, columnWidthStyling), { ["--column-width"]: columnWidth });
232
+ }
233
+ if (typeof columnWidth === "object" && !!Object.keys(columnWidth)) {
234
+ if (columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth.minWidth) {
235
+ columnWidthStyling = Object.assign(Object.assign({}, columnWidthStyling), { ["--column-min-width"]: columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth.minWidth });
236
+ }
237
+ if (columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth.maxWidth) {
238
+ columnWidthStyling = Object.assign(Object.assign({}, columnWidthStyling), { ["--column-max-width"]: columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth.maxWidth });
239
+ }
240
+ }
241
+ }
242
+ return columnWidthStyling;
243
+ };
244
+ this.getRowHeight = (currentRowHeight, columnProps, rowTextWrap, cell) => {
245
+ if ((this.truncationPattern || currentRowHeight) &&
246
+ !(columnProps === null || columnProps === void 0 ? void 0 : columnProps.textWrap) &&
247
+ !rowTextWrap &&
248
+ !this.getCellOptions(cell, "textWrap") &&
249
+ (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element") {
250
+ return {
251
+ [this.ROW_HEIGHT_CSS_VARIABLE]: this.setRowHeight(currentRowHeight),
252
+ };
253
+ }
254
+ return {};
255
+ };
256
+ this.createCells = (row, rowIndex) => {
257
+ var _a;
43
258
  const rowValues = Object.values(row);
44
259
  const rowKeys = Object.keys(row);
260
+ const rowOptions = this.getRowOptions(rowKeys, rowValues);
45
261
  let rowAlignment;
46
262
  let rowEmphasis;
47
263
  const headerIndex = rowKeys.indexOf("header");
@@ -49,44 +265,72 @@ const DataTable = class {
49
265
  rowAlignment = this.getObjectValue(rowValues[headerIndex], "rowAlignment");
50
266
  rowEmphasis = this.getObjectValue(rowValues[headerIndex], "emphasis");
51
267
  }
268
+ const variableRowHeightVal = (_a = this.variableRowHeight) === null || _a === void 0 ? void 0 : _a.call(this, Object.assign(Object.assign({}, row), { index: rowIndex }));
269
+ const currentRowHeight = variableRowHeightVal
270
+ ? variableRowHeightVal !== "auto" && variableRowHeightVal
271
+ : this.globalRowHeight !== "auto" && this.globalRowHeight;
52
272
  return rowValues.map((cell, index) => {
53
- const { columnAlignment, dataType, emphasis } = this.columns[index];
273
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
274
+ const columnProps = this.columns[index];
275
+ const cellSlotName = `${columnProps === null || columnProps === void 0 ? void 0 : columnProps.key}-${rowIndex}`;
276
+ const hasIcon = this.isObject(cell) && Object.keys(cell).includes("icon");
54
277
  const cellValue = (key) => this.getObjectValue(cell, key);
55
- return rowKeys[index] === "header" ? (h("th", { scope: "row", colSpan: cellValue("colspan"), class: {
56
- ["row-header"]: true,
57
- [`row-header-alignment-${cellValue("cellAlignment")}`]: !!cellValue("cellAlignment"),
58
- ["row-header-sticky"]: this.stickyRowHeaders,
59
- } }, cellValue("title"))) : (h("td", { innerHTML: dataType === "element" ? cell : null, class: {
60
- ["table-cell"]: true,
61
- [`table-density-${this.density}`]: this.notDefaultDensity(),
62
- [`data-type-${dataType}`]: true,
63
- [`cell-alignment-${(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.horizontal) ||
64
- this.getCellAlignment(cell, "horizontal")}`]: !!(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.horizontal) ||
65
- !!this.getCellAlignment(cell, "horizontal"),
66
- [`cell-alignment-${(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.vertical) ||
67
- rowAlignment ||
68
- this.getCellAlignment(cell, "vertical")}`]: !!(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.vertical) ||
69
- !!rowAlignment ||
70
- !!this.getCellAlignment(cell, "vertical"),
71
- } }, h("ic-typography", { variant: "body", class: {
72
- [`cell-emphasis-${(this.isObject(cell) && cellValue("emphasis")) ||
73
- emphasis ||
74
- rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
75
- !!emphasis ||
76
- !!rowEmphasis,
77
- [`text-${this.density}`]: this.notDefaultDensity(),
78
- } }, this.isObject(cell) && dataType !== "date" ? (Object.keys(cell).includes("href") ? (h("ic-link", { href: cellValue("href") }, cellValue("data"))) : (cellValue("data"))) : (this.getCellContent(cell, dataType)))));
278
+ if (rowKeys[index] === "header") {
279
+ return (h("th", { scope: "row", colSpan: cellValue("colspan"), class: {
280
+ ["row-header"]: true,
281
+ [`row-header-alignment-${cellValue("cellAlignment")}`]: !!cellValue("cellAlignment"),
282
+ ["row-header-sticky"]: this.stickyRowHeaders,
283
+ } }, cellValue("title")));
284
+ }
285
+ if (rowKeys[index] !== "rowOptions") {
286
+ return (h("td", { class: {
287
+ ["table-cell"]: true,
288
+ [`table-density-${this.density}`]: this.notDefaultDensity(),
289
+ ["with-overflow"]: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element",
290
+ }, style: Object.assign({}, this.getColumnWidth(columnProps.columnWidth)) }, h("div", { innerHTML: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element" &&
291
+ !isSlotUsed(this.el, cellSlotName)
292
+ ? cell
293
+ : null, class: Object.assign({ "cell-container": (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element", [`cell-alignment-${((_a = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _a === void 0 ? void 0 : _a.vertical) ||
294
+ ((_b = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _b === void 0 ? void 0 : _b.vertical) ||
295
+ rowAlignment ||
296
+ this.getCellAlignment(cell, "vertical")}`]: !!((_c = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _c === void 0 ? void 0 : _c.vertical) ||
297
+ !!((_d = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _d === void 0 ? void 0 : _d.vertical) ||
298
+ !!rowAlignment ||
299
+ !!this.getCellAlignment(cell, "vertical"), [`cell-alignment-${((_e = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _e === void 0 ? void 0 : _e.horizontal) ||
300
+ ((_f = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _f === void 0 ? void 0 : _f.horizontal) ||
301
+ this.getCellAlignment(cell, "horizontal")}`]: !!((_g = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _g === void 0 ? void 0 : _g.horizontal) ||
302
+ !!((_h = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _h === void 0 ? void 0 : _h.horizontal) ||
303
+ !!this.getCellAlignment(cell, "horizontal"), [`data-type-${columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType}`]: true, [this.TEXT_WRAP_STRING]: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.textWrap) ||
304
+ (rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.textWrap) ||
305
+ !!this.getCellOptions(cell, "textWrap"), ["cell-icon"]: hasIcon || !!((_j = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _j === void 0 ? void 0 : _j.icon) }, this.setTruncationClass()), style: Object.assign(Object.assign({}, this.getRowHeight(currentRowHeight, columnProps, rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.textWrap, cell)), this.getColumnWidth(columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnWidth)), "data-row-height": this.truncationPattern || currentRowHeight
306
+ ? this.setRowHeight(currentRowHeight)
307
+ : null }, isSlotUsed(this.el, cellSlotName) ? (h("slot", { name: cellSlotName })) : (h(Fragment, null, isSlotUsed(this.el, `${cellSlotName}-icon`) ? (h("slot", { name: `${cellSlotName}-icon` })) : ((hasIcon || ((_k = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _k === void 0 ? void 0 : _k.onAllCells)) &&
308
+ (cellValue("icon") || ((_l = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _l === void 0 ? void 0 : _l.icon)) && (h("span", { class: "icon", innerHTML: cellValue("icon") || ((_m = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _m === void 0 ? void 0 : _m.icon) }))), (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element" &&
309
+ !isSlotUsed(this.el, cellSlotName) && (h("ic-typography", { variant: "body", class: {
310
+ [`cell-emphasis-${(this.isObject(cell) && cellValue("emphasis")) ||
311
+ (columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
312
+ rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
313
+ !!(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
314
+ !!rowEmphasis,
315
+ [`text-${this.density}`]: this.notDefaultDensity(),
316
+ } }, this.isObject(cell) &&
317
+ (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "date" ? (Object.keys(cell).includes("href") ? (h("ic-link", { href: cellValue("href") }, cellValue("data"))) : (cellValue("data"))) : (this.getCellContent(cell, columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType)))))))));
318
+ }
79
319
  });
80
320
  };
81
321
  this.createColumnHeaders = () => {
82
- return this.columns.map(({ cellAlignment, colspan, key, title }) => (h("th", { scope: "col", class: {
322
+ return this.columns.map(({ cellAlignment, colspan, icon, key, title, columnWidth }) => (h("th", { scope: "col", class: {
83
323
  ["column-header"]: true,
84
- [`column-header-alignment-${cellAlignment}`]: !!cellAlignment,
85
324
  [`table-density-${this.density}`]: this.notDefaultDensity(),
86
- }, colSpan: colspan }, this.sortable ? (h("div", { class: "column-header-inner-container" }, h("ic-typography", { variant: "body", class: {
325
+ ["updating-state-headers"]: this.updating && !this.loading,
326
+ }, style: Object.assign({}, this.getColumnWidth(columnWidth)), colSpan: colspan }, h("div", { class: {
327
+ "column-header-inner-container": true,
328
+ [`column-header-alignment-${cellAlignment}`]: !!cellAlignment,
329
+ } }, isSlotUsed(this.el, `${key}-column-icon`) ? (h("slot", { name: `${key}-column-icon` })) : (icon &&
330
+ !icon.hideOnHeader && (h("span", { class: "icon", innerHTML: icon.icon }))), h("ic-typography", { variant: "body", class: {
87
331
  ["column-header-text"]: true,
88
332
  [`text-${this.density}`]: this.notDefaultDensity(),
89
- } }, title), h("ic-button", { variant: "icon", id: `sort-button-${key}`, "aria-label": this.getSortButtonLabel(key),
333
+ } }, title), this.sortable && (h("ic-button", { variant: "icon", id: `sort-button-${key}`, "aria-label": this.getSortButtonLabel(key),
90
334
  // eslint-disable-next-line react/jsx-no-bind
91
335
  onClick: () => this.sortRows(key), innerHTML: this.SORT_ICONS[this.sortedColumn === key
92
336
  ? this.sortedColumnOrder
@@ -94,21 +338,41 @@ const DataTable = class {
94
338
  ["sort-button"]: true,
95
339
  ["sort-button-unsorted"]: this.sortedColumn !== key ||
96
340
  this.sortedColumnOrder === "unsorted",
97
- } }))) : (h("ic-typography", { variant: "body", class: {
98
- ["column-header-text"]: true,
99
- [`text-${this.density}`]: this.notDefaultDensity(),
100
- } }, title)))));
341
+ } }))))));
342
+ };
343
+ this.onRowClick = (row) => {
344
+ this.selectedRow =
345
+ this.selectedRow !== row && !this.loading && !this.updating && row;
101
346
  };
102
347
  this.createRows = () => {
103
348
  const data = this.showPagination
104
349
  ? this.data.slice(this.fromRow, this.toRow)
105
350
  : this.data.slice();
106
- return data
351
+ /**
352
+ * Ensures that createCells has a value in data to map over to actually render the slot.
353
+ * Removes the need for the user to add it multiple times.
354
+ * `addDataToPosition` used to add the element in the correct column order.
355
+ * Adding empty string value in to give `createCells` something to loop over.
356
+ */
357
+ const organisedData = data.map((row, rowIndex) => {
358
+ const slottedColumns = this.columns
359
+ .map(({ key }, index) => isSlotUsed(this.el, `${key}-${rowIndex}`) && { key, index })
360
+ .filter((col) => !!col);
361
+ return slottedColumns.length > 0
362
+ ? addDataToPosition(row, slottedColumns, "")
363
+ : row;
364
+ });
365
+ return organisedData
107
366
  .sort(!this.sortable ? undefined : this.getSortFunction())
108
- .map((row) => (h("tr", { onClick: () => (this.selectedRow = this.selectedRow !== row && row), class: {
109
- ["table-row"]: true,
110
- ["table-row-selected"]: this.selectedRow === row,
111
- } }, this.createCells(row))));
367
+ .map((row, index) => {
368
+ return (h("tr", {
369
+ // eslint-disable-next-line react/jsx-no-bind
370
+ onClick: () => this.onRowClick(row), class: {
371
+ ["table-row"]: true,
372
+ ["table-row-selected"]: this.selectedRow === row,
373
+ }
374
+ }, this.createCells(row, index)));
375
+ });
112
376
  };
113
377
  this.getObjectValue = (cell, key) => {
114
378
  return Object.values(cell)[Object.keys(cell).indexOf(key)];
@@ -168,10 +432,49 @@ const DataTable = class {
168
432
  }
169
433
  this.sortedColumnOrder = sortOrders[nextSortOrderIndex];
170
434
  sortButton.setAttribute("aria-label", this.getSortButtonLabel(column));
435
+ this.tableSorted = true;
436
+ this.icSortChange.emit({
437
+ columnName: column,
438
+ sorted: this.sortedColumnOrder,
439
+ });
440
+ };
441
+ this.getTypographyElements = () => {
442
+ return Array.from(this.el.shadowRoot.querySelectorAll("ic-typography:not(.column-header-text)"));
443
+ };
444
+ this.getTooltip = (typographyEl) => {
445
+ return typographyEl.closest(this.TOOLTIP);
446
+ };
447
+ this.updateTruncationTooltip = (removeTooltipOnly = false) => {
448
+ this.getTypographyElements().forEach((typographyEl) => {
449
+ const tooltip = this.getTooltip(typographyEl);
450
+ const cellContainer = this.getCellContainer(typographyEl);
451
+ if (typographyEl.closest(this.TEXT_WRAP_CLASS)) {
452
+ this.removeTooltip(cellContainer, typographyEl, tooltip);
453
+ typographyEl.setAttribute("style", `--ic-line-clamp: 0`);
454
+ return;
455
+ }
456
+ this.regenerateTooltip(cellContainer, typographyEl, tooltip, removeTooltipOnly);
457
+ });
171
458
  };
172
459
  this.updateScrollOffset = () => {
173
460
  this.scrollOffset = this.el.shadowRoot.querySelector(".table-row-container").scrollTop;
174
461
  };
462
+ this.setTableDimensions = () => {
463
+ let tableHostDimensions = {};
464
+ if (this.width) {
465
+ tableHostDimensions = Object.assign(Object.assign({}, tableHostDimensions), { ["--table-width"]: this.width });
466
+ }
467
+ if (this.height) {
468
+ tableHostDimensions = Object.assign(Object.assign({}, tableHostDimensions), { ["--table-height"]: this.height });
469
+ }
470
+ if (this.maxWidth) {
471
+ tableHostDimensions = Object.assign(Object.assign({}, tableHostDimensions), { ["--table-max-width"]: this.maxWidth });
472
+ }
473
+ if (this.minWidth) {
474
+ tableHostDimensions = Object.assign(Object.assign({}, tableHostDimensions), { ["--table-min-width"]: this.minWidth });
475
+ }
476
+ return tableHostDimensions;
477
+ };
175
478
  this.fromRow = 0;
176
479
  this.previousRowsPerPage = undefined;
177
480
  this.rowsPerPage = undefined;
@@ -181,23 +484,36 @@ const DataTable = class {
181
484
  this.sortedColumn = undefined;
182
485
  this.sortedColumnOrder = undefined;
183
486
  this.toRow = undefined;
487
+ this.currentRowHeight = undefined;
488
+ this.debounceDelay = 0;
184
489
  this.caption = undefined;
185
490
  this.columns = undefined;
186
491
  this.data = undefined;
187
492
  this.density = "default";
188
493
  this.embedded = false;
494
+ this.globalRowHeight = "auto";
495
+ this.height = undefined;
189
496
  this.hideColumnHeaders = false;
190
- this.paginationOptions = {
191
- itemsPerPage: [
497
+ this.loading = false;
498
+ this.loadingOptions = undefined;
499
+ this.maxWidth = undefined;
500
+ this.minWidth = undefined;
501
+ this.minimumLoadingDisplayDuration = 1000;
502
+ this.paginationBarOptions = {
503
+ itemsPerPageOptions: [
192
504
  { label: "10", value: "10" },
193
505
  { label: "25", value: "25" },
194
506
  { label: "50", value: "50" },
195
507
  ],
196
- type: "page",
197
- control: "simple",
198
- itemsPerPageControl: true,
199
- goToPageControl: true,
508
+ rangeLabelType: "page",
509
+ type: "simple",
510
+ showItemsPerPageControl: true,
511
+ showGoToPageControl: true,
200
512
  alignment: "right",
513
+ appearance: "default",
514
+ itemLabel: "Item",
515
+ pageLabel: "Page",
516
+ hideRangeLabel: false,
201
517
  };
202
518
  this.showPagination = false;
203
519
  this.sortable = false;
@@ -207,58 +523,484 @@ const DataTable = class {
207
523
  };
208
524
  this.stickyColumnHeaders = false;
209
525
  this.stickyRowHeaders = false;
526
+ this.tableLayout = "fixed";
527
+ this.truncationPattern = undefined;
528
+ this.updating = false;
529
+ this.updatingOptions = undefined;
530
+ this.variableRowHeight = undefined;
531
+ this.width = undefined;
532
+ }
533
+ disconnectedCallback() {
534
+ var _a;
535
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
210
536
  }
211
537
  componentWillLoad() {
212
- this.rowsPerPage = Number(this.paginationOptions.itemsPerPage[0].value);
538
+ var _a;
539
+ this.rowsPerPage = Number(this.paginationBarOptions.itemsPerPageOptions[0].value);
213
540
  this.previousRowsPerPage = this.rowsPerPage;
214
541
  this.toRow = this.rowsPerPage;
215
542
  this.sortedColumn = this.sortOptions.defaultColumn;
216
543
  this.sortedColumnOrder = this.sortOptions.sortOrders[0];
544
+ this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) > 0 });
545
+ this.initialLoad = true;
546
+ this.previousItemsPerPage = this.rowsPerPage;
217
547
  }
218
548
  componentDidLoad() {
219
549
  const tableElement = this.el.shadowRoot.querySelector("table");
220
550
  const tableContainer = this.el.shadowRoot.querySelector(".table-container");
551
+ if (this.dataUpdated) {
552
+ this.dataUpdated = false;
553
+ }
221
554
  if ((tableElement === null || tableElement === void 0 ? void 0 : tableElement.clientHeight) > (tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.clientHeight) ||
222
555
  (tableElement === null || tableElement === void 0 ? void 0 : tableElement.clientWidth) > (tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.clientWidth)) {
223
556
  this.scrollable = true;
224
557
  }
558
+ if (this.loading) {
559
+ this.startLoadingTimer();
560
+ this.showLoadingIndicator();
561
+ }
562
+ if (this.truncationPattern) {
563
+ this.getTypographyElements().forEach((typographyEl) => {
564
+ const cellContainer = this.getCellContainer(typographyEl);
565
+ if (!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
566
+ this.dataTruncation(typographyEl);
567
+ }
568
+ });
569
+ this.debounceDataTruncation();
570
+ }
571
+ if (this.globalRowHeight !== "auto") {
572
+ this.updateSetRowHeight();
573
+ }
225
574
  }
226
- handleItemsPerPageChange(ev) {
227
- this.previousRowsPerPage = this.rowsPerPage;
228
- this.rowsPerPage = ev.detail.value;
575
+ componentDidUpdate() {
576
+ // truncation updates invoked here once new/updated data has
577
+ // rendered to take into account updated .cell-container/ic-typography box model updates.
578
+ if (this.truncationPattern === this.SHOW_HIDE_STRING ||
579
+ this.truncationPattern === this.TOOLTIP_STRING) {
580
+ this.truncateUpdatedData();
581
+ }
229
582
  }
230
- handlePageChange(ev) {
231
- this.fromRow = (ev.detail.value - 1) * this.rowsPerPage;
232
- this.toRow = this.fromRow + this.rowsPerPage;
233
- const tableRowsContainer = this.el.shadowRoot.querySelector(".table-row-container");
234
- if (this.previousRowsPerPage === this.rowsPerPage) {
235
- tableRowsContainer.scrollTop = 0;
583
+ truncateUpdatedData() {
584
+ if (this.dataUpdated) {
585
+ if (this.truncationPattern === this.SHOW_HIDE_STRING) {
586
+ this.getTypographyElements().forEach((typographyEl) => {
587
+ const truncWrapper = this.getTruncWrapper(typographyEl);
588
+ const cellContainer = this.getCellContainer(typographyEl);
589
+ if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - this.DEFAULT_LINE_HEIGHT >=
590
+ (truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight)) {
591
+ this.resetShowHideTruncation(typographyEl);
592
+ return;
593
+ }
594
+ setTimeout(() => {
595
+ // slight delay due to data rendering
596
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
597
+ this.addShowHideTruncation(cellContainer, typographyEl);
598
+ }
599
+ }, 150);
600
+ });
601
+ }
602
+ if (this.truncationPattern === this.TOOLTIP_STRING) {
603
+ this.updateTruncationTooltip();
604
+ }
605
+ this.dataUpdated = false;
236
606
  }
237
- else if (this.previousRowsPerPage < this.rowsPerPage) {
238
- tableRowsContainer.scrollTop = this.scrollOffset;
239
- this.previousRowsPerPage = this.rowsPerPage;
607
+ if (this.tableSorted) {
608
+ if (this.truncationPattern === this.TOOLTIP_STRING) {
609
+ this.updateTruncationTooltip();
610
+ }
611
+ if (this.truncationPattern === this.SHOW_HIDE_STRING) {
612
+ this.getTypographyElements().forEach((typographyEl) => {
613
+ const cellContainer = this.getCellContainer(typographyEl);
614
+ if (!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
615
+ this.createShowHideTruncation(typographyEl, cellContainer);
616
+ }
617
+ else {
618
+ typographyEl.resetTruncation().then(() => {
619
+ cellContainer.removeAttribute("style");
620
+ });
621
+ }
622
+ });
623
+ }
624
+ this.tableSorted = false;
240
625
  }
241
- else {
626
+ // This function recalculates the tooltip truncation when the rowHeight has been set.
627
+ // This is in componentDidUpdate so a setTimeout is not used to wait for the render to be complete
628
+ if (this.rowHeightSet) {
629
+ const fontSize = parseInt(getComputedStyle(document.documentElement).fontSize);
630
+ const hasAutoRowHeight = this.globalRowHeight === "auto";
631
+ this.getTypographyElements().forEach((typographyEl) => {
632
+ var _a;
633
+ const cellContainer = this.getCellContainer(typographyEl);
634
+ const tooltipEl = this.getTooltip(typographyEl);
635
+ if (hasAutoRowHeight) {
636
+ cellContainer.style.height = null;
637
+ if (this.truncationPattern === this.TOOLTIP_STRING) {
638
+ this.removeTooltip(cellContainer, typographyEl, tooltipEl);
639
+ typographyEl.setAttribute("style", `--ic-line-clamp: 0`);
640
+ }
641
+ else if (this.truncationPattern === this.SHOW_HIDE_STRING) {
642
+ this.resetShowHideTruncation(typographyEl);
643
+ }
644
+ return;
645
+ }
646
+ const rowHeight = fontSize *
647
+ parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
648
+ // If the set row height is bigger than the cell container even
649
+ // with textWrap, set the row height
650
+ if (!((_a = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.style) === null || _a === void 0 ? void 0 : _a.height) &&
651
+ rowHeight > cellContainer.clientHeight &&
652
+ !cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
653
+ cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
654
+ }
655
+ if (this.truncationPattern) {
656
+ // If the set row height is bigger than the typography truncation wrapper
657
+ // scroll height, remove see more / see less button
658
+ if (this.truncationPattern === this.SHOW_HIDE_STRING) {
659
+ const truncWrapper = this.getTruncWrapper(typographyEl);
660
+ const showHideBtn = typographyEl.shadowRoot.querySelector("button");
661
+ if (showHideBtn &&
662
+ (truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight) <= cellContainer.clientHeight) {
663
+ this.resetShowHideTruncation(typographyEl);
664
+ return;
665
+ }
666
+ }
667
+ this.truncate(typographyEl, cellContainer, tooltipEl);
668
+ }
669
+ else {
670
+ this.updateSetRowHeight(typographyEl);
671
+ }
672
+ });
673
+ this.rowHeightSet = false;
674
+ }
675
+ // Only run truncation on the new rows
676
+ // when the number of items per page has increased
677
+ if (this.itemsPerPageChange) {
678
+ const allRows = this.el.shadowRoot.querySelectorAll(".table-row");
679
+ if (this.rowsPerPage > this.previousItemsPerPage) {
680
+ const newRows = Array.from(allRows).slice(this.previousItemsPerPage);
681
+ newRows.forEach((row) => {
682
+ row
683
+ .querySelectorAll("ic-typography")
684
+ .forEach((typographyEl) => {
685
+ const cellContainer = this.getCellContainer(typographyEl);
686
+ const tooltipEl = this.getTooltip(typographyEl);
687
+ this.truncate(typographyEl, cellContainer, tooltipEl);
688
+ });
689
+ });
690
+ }
691
+ this.previousItemsPerPage = this.rowsPerPage;
692
+ this.itemsPerPageChange = false;
693
+ }
694
+ if (!this.initialLoad && this.icPageChangeEvent) {
695
+ if (this.truncationPattern === this.TOOLTIP_STRING) {
696
+ this.updateTruncationTooltip();
697
+ }
698
+ // set truncation to see more if opened and next/previous page is pressed
699
+ if (this.truncationPattern === this.SHOW_HIDE_STRING) {
700
+ this.getTypographyElements().forEach((typographyEl) => {
701
+ const cellContainer = this.getCellContainer(typographyEl);
702
+ const showHideBtn = typographyEl.shadowRoot.querySelector("button");
703
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > cellContainer.clientHeight &&
704
+ !showHideBtn) {
705
+ this.addShowHideTruncation(cellContainer, typographyEl);
706
+ }
707
+ });
708
+ }
709
+ this.icPageChangeEvent = false;
710
+ }
711
+ if (this.densityUpdate) {
712
+ this.getTypographyElements().forEach((typographyEl) => {
713
+ const cellContainer = this.getCellContainer(typographyEl);
714
+ const tooltipEl = this.getTooltip(typographyEl);
715
+ this.truncate(typographyEl, cellContainer, tooltipEl);
716
+ });
717
+ this.densityUpdate = false;
718
+ }
719
+ if (this.truncationPatternUpdated) {
720
+ if (this.truncationPattern === this.TOOLTIP_STRING) {
721
+ this.getTypographyElements().forEach((typographyEl) => {
722
+ const cellContainer = this.getCellContainer(typographyEl);
723
+ const tooltipEl = this.getTooltip(typographyEl);
724
+ if (typographyEl.scrollHeight > cellContainer.clientHeight) {
725
+ this.addTooltipTruncation(typographyEl, cellContainer, tooltipEl);
726
+ }
727
+ });
728
+ }
729
+ else if (this.truncationPattern === this.SHOW_HIDE_STRING) {
730
+ this.getTypographyElements().forEach((typographyEl) => {
731
+ const truncWrapper = this.getTruncWrapper(typographyEl);
732
+ const cellContainer = this.getCellContainer(typographyEl);
733
+ if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - this.DEFAULT_LINE_HEIGHT >
734
+ (truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight)) {
735
+ this.resetShowHideTruncation(typographyEl);
736
+ return;
737
+ }
738
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
739
+ this.addShowHideTruncation(cellContainer, typographyEl);
740
+ }
741
+ });
742
+ }
743
+ }
744
+ }
745
+ createShowHideTruncation(typographyEl, cellContainer) {
746
+ typographyEl.checkMaxLines(typographyEl.scrollHeight);
747
+ typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
748
+ typographyEl.setShowHideExpanded(false);
749
+ cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
750
+ }
751
+ addTooltipTruncation(typographyEl, cellContainer, tooltip) {
752
+ this.addLineClampCSS(typographyEl, cellContainer);
753
+ if (!tooltip) {
754
+ this.createTruncationTooltip(typographyEl, cellContainer);
755
+ }
756
+ }
757
+ addShowHideTruncation(cellContainer, typographyEl) {
758
+ cellContainer.classList.add(this.SHOW_HIDE_CSS_CLASS);
759
+ this.createShowHideTruncation(typographyEl, cellContainer);
760
+ }
761
+ getTruncWrapper(typographyEl) {
762
+ return typographyEl.shadowRoot.querySelector(".trunc-wrapper");
763
+ }
764
+ // Set the height to initial if row height is set and the show / hide truncation
765
+ // is clicked
766
+ handleTypographyTruncationExpandToggle({ detail, }) {
767
+ const { expanded, typographyEl } = detail;
768
+ const cellContainer = this.getCellContainer(typographyEl);
769
+ if (cellContainer.style.getPropertyValue(this.ROW_HEIGHT_CSS_VARIABLE) &&
770
+ expanded) {
771
+ cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, "inherit");
772
+ }
773
+ }
774
+ handlePageChange({ detail, target }) {
775
+ if (target.parentElement !== this.el) {
776
+ this.fromRow = (detail.value - 1) * this.rowsPerPage;
777
+ this.toRow = this.fromRow + this.rowsPerPage;
778
+ const tableRowsContainer = this.el.shadowRoot.querySelector(".table-row-container");
779
+ if (this.previousRowsPerPage === this.rowsPerPage) {
780
+ tableRowsContainer.scrollTop = 0;
781
+ }
782
+ else if (this.previousRowsPerPage < this.rowsPerPage) {
783
+ tableRowsContainer.scrollTop = this.scrollOffset;
784
+ this.previousRowsPerPage = this.rowsPerPage;
785
+ }
786
+ else {
787
+ this.previousRowsPerPage = this.rowsPerPage;
788
+ }
789
+ }
790
+ if (!this.initialLoad && this.previousPaginationPage !== detail.value) {
791
+ // This is to prevent icPageChange from triggering truncation on first load
792
+ this.icPageChangeEvent = true;
793
+ }
794
+ this.previousPaginationPage = detail.value;
795
+ this.initialLoad = false;
796
+ }
797
+ handleItemsPerPageChange({ detail, target, }) {
798
+ if (target.parentElement !== this.el) {
242
799
  this.previousRowsPerPage = this.rowsPerPage;
800
+ this.rowsPerPage = detail.value;
243
801
  }
802
+ this.itemsPerPageChange = true;
803
+ }
804
+ handleDensityChange(ev) {
805
+ this.density = ev.detail.value;
244
806
  }
245
807
  clickListener(ev) {
246
808
  if (ev.target !== this.el)
247
809
  this.selectedRow = undefined;
248
810
  }
811
+ loadingHandler(newValue) {
812
+ if (newValue)
813
+ this.startLoadingTimer();
814
+ if (this.loading) {
815
+ setTimeout(() => {
816
+ this.showLoadingIndicator();
817
+ }, 500);
818
+ }
819
+ }
820
+ truncationPatternHandler(newValue) {
821
+ if (newValue === this.TOOLTIP_STRING) {
822
+ this.resetShowHideTruncation();
823
+ this.updateTruncationTooltip(true);
824
+ // Not using debounceDataTruncation here due to resizeObserver not being triggered
825
+ this.getTypographyElements().forEach((typographyEl) => {
826
+ const cellContainer = this.getCellContainer(typographyEl);
827
+ const tooltip = this.getTooltip(typographyEl);
828
+ this.truncate(typographyEl, cellContainer, tooltip);
829
+ });
830
+ }
831
+ if (newValue === this.SHOW_HIDE_STRING) {
832
+ // ResizeObserver is trigger here due to the see more/see less links being removed.
833
+ // The resizeObserver will also apply the tooltip where relevant
834
+ this.updateTruncationTooltip(true);
835
+ this.getTypographyElements().forEach((typographyEl) => {
836
+ const truncWrapper = this.getTruncWrapper(typographyEl);
837
+ const cellContainer = this.getCellContainer(typographyEl);
838
+ if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - this.DEFAULT_LINE_HEIGHT >
839
+ (truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight)) {
840
+ this.resetShowHideTruncation(typographyEl);
841
+ return;
842
+ }
843
+ setTimeout(() => {
844
+ // slight delay due to data rendering
845
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
846
+ this.addShowHideTruncation(cellContainer, typographyEl);
847
+ }
848
+ }, 150);
849
+ });
850
+ }
851
+ this.truncationPatternUpdated = true;
852
+ }
853
+ async dataHandler(newData) {
854
+ this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: (newData === null || newData === void 0 ? void 0 : newData.length) > 0 });
855
+ if (this.loading) {
856
+ !this.hasLoadedForOneSecond
857
+ ? setTimeout(() => (this.loading = false), this.minimumLoadingDisplayDuration -
858
+ (Date.now() - this.timerStarted))
859
+ : (this.loading = false);
860
+ }
861
+ if (this.updating)
862
+ this.updating = false;
863
+ this.dataUpdated = true;
864
+ }
865
+ async densityHandler() {
866
+ this.densityUpdate = true;
867
+ }
868
+ resetShowHideTruncation(typographyEl) {
869
+ if (typographyEl) {
870
+ const truncWrapper = this.getTruncWrapper(typographyEl);
871
+ const cellContainer = this.getCellContainer(typographyEl);
872
+ if ((truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) &&
873
+ !isEmptyString(typographyEl.getAttribute("max-lines")) &&
874
+ Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT) !==
875
+ +typographyEl.getAttribute("max-lines")) {
876
+ typographyEl.checkMaxLines(truncWrapper.scrollHeight);
877
+ typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
878
+ typographyEl.setShowHideExpanded(false);
879
+ cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
880
+ }
881
+ else {
882
+ typographyEl.resetTruncation().then(() => {
883
+ if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {
884
+ cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
885
+ }
886
+ });
887
+ }
888
+ }
889
+ else {
890
+ this.getTypographyElements().forEach((typographyEl) => {
891
+ const cellContainer = this.getCellContainer(typographyEl);
892
+ typographyEl.resetTruncation().then(() => {
893
+ if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {
894
+ cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
895
+ }
896
+ });
897
+ });
898
+ }
899
+ }
900
+ rowHeightChangeHandler(newValue, oldValue) {
901
+ if (+newValue !== +oldValue) {
902
+ this.deleteTextWrapDataKey(this.data);
903
+ this.deleteTextWrapDataKey(this.columns);
904
+ this.removeTextWrap();
905
+ this.icRowHeightChange.emit();
906
+ this.rowHeightSet = true;
907
+ }
908
+ }
909
+ /**
910
+ * Resets the `globalRowHeight` prop to number or auto and sets the `variableRowHeight` prop to `null`.
911
+ */
912
+ async resetRowHeights(rowHeight) {
913
+ this.globalRowHeight = rowHeight || "auto";
914
+ this.variableRowHeight = null;
915
+ }
916
+ showLoadingIndicator() {
917
+ this.loadingIndicator.classList.add("show");
918
+ }
919
+ getRowOptions(rowKeys, rowValues) {
920
+ const rowOptionsIndex = rowKeys.indexOf("rowOptions");
921
+ return rowOptionsIndex > -1 && rowValues[rowOptionsIndex];
922
+ }
923
+ regenerateTooltip(cellContainer, typographyEl, tooltip, removeTooltipOnly) {
924
+ // When sorting the table, instead of regenerating the tooltip,
925
+ // the tooltip details are updated
926
+ if (tooltip) {
927
+ if (this.tableSorted) {
928
+ tooltip.setAttribute("target", typographyEl.id);
929
+ tooltip.setAttribute("label", typographyEl.textContent);
930
+ }
931
+ else {
932
+ this.removeTooltip(cellContainer, typographyEl, tooltip);
933
+ }
934
+ if (removeTooltipOnly) {
935
+ return;
936
+ }
937
+ }
938
+ // This add line clamp to data only when
939
+ // the data object has been updated
940
+ if (!typographyEl.getAttribute("style") && this.dataUpdated) {
941
+ this.addLineClampCSS(typographyEl, cellContainer);
942
+ }
943
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) &&
944
+ this.truncationPattern === this.TOOLTIP_STRING) {
945
+ if (!typographyEl.getAttribute("style") ||
946
+ typographyEl.style.cssText.includes("--ic-line-clamp: 0;")) {
947
+ this.addLineClampCSS(typographyEl, cellContainer);
948
+ }
949
+ this.createTruncationTooltip(typographyEl, cellContainer);
950
+ }
951
+ }
952
+ removeTooltip(cellContainer, typographyEl, tooltip) {
953
+ cellContainer.appendChild(typographyEl);
954
+ if (tooltip) {
955
+ tooltip.remove();
956
+ }
957
+ }
958
+ addLineClampCSS(typographyEl, cellContainer) {
959
+ typographyEl.setAttribute("style", `--ic-line-clamp: ${this.getLines(cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)}`);
960
+ }
961
+ createTruncationTooltip(typographyEl, cellContainer) {
962
+ const tooltipEl = document.createElement("ic-tooltip");
963
+ tooltipEl.setAttribute("target", typographyEl.id);
964
+ tooltipEl.setAttribute("label", typographyEl.textContent);
965
+ tooltipEl.classList.add("ic-tooltip-overflow");
966
+ tooltipEl.setExternalPopperProps({
967
+ // This might need reverting back to absolute if the tooltip doesn't dynamically position itself correctly
968
+ strategy: "fixed",
969
+ });
970
+ cellContainer.appendChild(tooltipEl);
971
+ tooltipEl.appendChild(typographyEl);
972
+ }
249
973
  render() {
250
- const { caption, createColumnHeaders, createRows, data, hideColumnHeaders, paginationOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, } = this;
251
- return (h("div", { class: "table-container" }, h("div", { class: {
974
+ const { caption, createColumnHeaders, createRows, createUpdatingIndicator, data, hideColumnHeaders, loading, loadingOptions, paginationBarOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, updating, } = this;
975
+ return (h(Host, { style: Object.assign({}, this.setTableDimensions()) }, h("div", { class: "table-container" }, isSlotUsed(this.el, "title-bar") && h("slot", { name: "title-bar" }), h("div", { class: {
252
976
  ["table-row-container"]: true,
253
977
  scrollable,
254
- }, tabIndex: scrollable ? 0 : null, onScroll: updateScrollOffset }, h("table", null, h("caption", { class: "table-caption" }, caption), !hideColumnHeaders && (h("thead", { class: {
978
+ }, tabIndex: scrollable ? 0 : null, onScroll: updateScrollOffset }, isSlotUsed(this.el, "title-bar") && h("slot", { name: "title-bar" }), h("table", { style: {
979
+ ["--table-layout"]: this.tableLayout,
980
+ } }, h("caption", { class: "table-caption" }, caption), !hideColumnHeaders && (h("thead", { class: {
255
981
  ["column-header-sticky"]: stickyColumnHeaders,
256
982
  ["column-header-overlay"]: stickyColumnHeaders && scrollOffset !== 0,
257
- } }, h("tr", null, createColumnHeaders()))), (data === null || data === void 0 ? void 0 : data.length) > 0 && h("tbody", null, createRows()))), showPagination && (h("div", { class: "pagination-container" }, h("ic-pagination-bar", { totalItems: data.length, paginationType: paginationOptions.type, paginationControl: paginationOptions.control, showItemsPerPageControl: paginationOptions.itemsPerPageControl, showGoToPageControl: paginationOptions.goToPageControl, itemsPerPageOptions: paginationOptions.itemsPerPage, alignment: paginationOptions.alignment }))), sortable && (h("div", { class: "screen-reader-sort-text", "aria-live": "polite" }, sortedColumnOrder !== "unsorted" && sortedColumn
983
+ } }, h("tr", null, createColumnHeaders()))), updating &&
984
+ !loading &&
985
+ (hideColumnHeaders ? (h("thead", null, createUpdatingIndicator())) : (createUpdatingIndicator())), (data === null || data === void 0 ? void 0 : data.length) > 0 && !loading && h("tbody", null, createRows())), !(data === null || data === void 0 ? void 0 : data.length) &&
986
+ !loading &&
987
+ (isSlotUsed(this.el, "empty-state") ? (h("slot", { name: "empty-state" })) : (h("ic-empty-state", { aligned: "center", heading: "No Data", class: "loading-empty" })))), loading && (h("ic-loading-indicator", { theme: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.appearance, monochrome: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.monochrome, class: {
988
+ "loading-empty": loading,
989
+ loading: true,
990
+ "show-background": loadingOptions.showBackground,
991
+ }, description: loadingOptions.description || "Loading table data", label: loadingOptions.label || "Loading...", labelDuration: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.labelDuration, max: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.max, min: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.min, progress: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.progress, ref: (el) => (this.loadingIndicator = el) })), (showPagination || isSlotUsed(this.el, "pagination-bar")) && (h("div", { class: "pagination-container" }, isSlotUsed(this.el, "pagination-bar") ? (h("slot", { name: "pagination-bar" })) : (h("ic-pagination-bar", { totalItems: data.length, type: paginationBarOptions.type, rangeLabelType: paginationBarOptions.rangeLabelType, showItemsPerPageControl: paginationBarOptions.showItemsPerPageControl, showGoToPageControl: paginationBarOptions.showGoToPageControl, itemsPerPageOptions: paginationBarOptions.itemsPerPageOptions, alignment: paginationBarOptions.alignment, appearance: paginationBarOptions.appearance, itemLabel: paginationBarOptions.itemLabel, pageLabel: paginationBarOptions.pageLabel, hideRangeLabel: paginationBarOptions.hideRangeLabel })))), sortable && (h("div", { class: "screen-reader-sort-text", "aria-live": "polite" }, sortedColumnOrder !== "unsorted" && sortedColumn
258
992
  ? `${sortedColumn} sorted ${sortedColumnOrder}`
259
- : "table unsorted"))));
993
+ : "table unsorted")))));
260
994
  }
261
995
  get el() { return getElement(this); }
996
+ static get watchers() { return {
997
+ "loading": ["loadingHandler"],
998
+ "truncationPattern": ["truncationPatternHandler"],
999
+ "data": ["dataHandler"],
1000
+ "density": ["densityHandler"],
1001
+ "globalRowHeight": ["rowHeightChangeHandler"],
1002
+ "variableRowHeight": ["rowHeightChangeHandler"]
1003
+ }; }
262
1004
  };
263
1005
  DataTable.style = icDataTableCss;
264
1006