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

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