@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
@@ -1,14 +1,186 @@
1
- import { h } from "@stencil/core";
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ import { h, Fragment, Host, } from "@stencil/core";
2
3
  import unsortedIcon from "./assets/unsorted-icon.svg";
3
4
  import ascendingIcon from "./assets/ascending-icon.svg";
4
5
  import descendingIcon from "./assets/descending-icon.svg";
6
+ // Unable to import helper functions via @ukic/web-components
7
+ import { isEmptyString, isSlotUsed, pxToRem, addDataToPosition, dynamicDebounce, } from "../../utils/helpers";
8
+ /**
9
+ * @slot empty-state - Content is slotted below the table header when there is no data and the table is not loading.
10
+ * @slot {COLUMN_KEY}-{ROW_INDEX}[-icon] - Each cell should have its own slot, named using the column tag and the row index, allowing for custom elements to be displayed. Include `-icon` at the end for that cell's icon slot.
11
+ * @slot {COLUMN_KEY}-column-icon - The icon slot for a column header.
12
+ * @slot title-bar - A custom ic-data-table-title-bar can be slotted above the column headers to display additional information about the table.
13
+ * @slot pagination-bar - A custom ic-pagination-bar can be slotted below the data to provide enhanced control over how the data is interacted with when being fetched externally.
14
+ */
5
15
  export class DataTable {
6
16
  constructor() {
17
+ this.DENSITY_HEIGHT_MULTIPLIER = {
18
+ dense: 0.8,
19
+ default: 1,
20
+ spacious: 1.2,
21
+ };
22
+ this.DENSITY_PADDING_HEIGHT_DIFF = {
23
+ dense: 8,
24
+ default: 16,
25
+ spacious: 20,
26
+ };
7
27
  this.SORT_ICONS = {
8
28
  unsorted: unsortedIcon,
9
29
  ascending: ascendingIcon,
10
30
  descending: descendingIcon,
11
31
  };
32
+ this.hasLoadedForOneSecond = true;
33
+ this.resizeObserver = null;
34
+ this.SHOW_HIDE_STRING = "show-hide";
35
+ this.SHOW_HIDE_CSS_CLASS = `${this.SHOW_HIDE_STRING}-wrap`;
36
+ this.TOOLTIP_STRING = "tooltip";
37
+ this.TOOLTIP = `ic-${this.TOOLTIP_STRING}`;
38
+ this.TEXT_WRAP_STRING = "text-wrap";
39
+ this.TEXT_WRAP_CLASS = `.${this.TEXT_WRAP_STRING}`;
40
+ this.dataUpdated = false;
41
+ this.rowHeightSet = false;
42
+ this.initialLoad = false;
43
+ this.icPageChangeEvent = false;
44
+ this.itemsPerPageChange = false;
45
+ this.DATA_ROW_HEIGHT_STRING = "data-row-height";
46
+ this.ROW_HEIGHT_CSS_VARIABLE = "--row-height";
47
+ this.DEFAULT_LINE_HEIGHT = 24;
48
+ this.densityUpdate = false;
49
+ this.truncationPatternUpdated = false;
50
+ this.isNewDebounceDelaySet = false;
51
+ this.updateSetRowHeight = (typographyEl) => {
52
+ const fontSize = parseInt(getComputedStyle(document.documentElement).fontSize);
53
+ if (typographyEl) {
54
+ const cellContainer = this.getCellContainer(typographyEl);
55
+ const rowHeight = fontSize *
56
+ parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
57
+ if (typographyEl.scrollHeight > rowHeight) {
58
+ cellContainer.style.removeProperty(this.ROW_HEIGHT_CSS_VARIABLE);
59
+ }
60
+ }
61
+ else {
62
+ this.getTypographyElements().forEach((typographyEl) => {
63
+ const cellContainer = this.getCellContainer(typographyEl);
64
+ const rowHeight = fontSize *
65
+ parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
66
+ if (typographyEl.scrollHeight > rowHeight) {
67
+ cellContainer.style.removeProperty(this.ROW_HEIGHT_CSS_VARIABLE);
68
+ }
69
+ });
70
+ }
71
+ };
72
+ this.debounceDataTruncation = () => {
73
+ this.getTypographyElements().forEach((typographyEl) => {
74
+ const cellContainer = this.getCellContainer(typographyEl);
75
+ if (!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
76
+ this.resizeObserver = new ResizeObserver(
77
+ // This gets triggered twice due to updated data and see more/see less button
78
+ dynamicDebounce(() => {
79
+ this.dataTruncation(typographyEl);
80
+ if (!this.isNewDebounceDelaySet) {
81
+ this.setNewDebounceDelay(200);
82
+ }
83
+ }, () => this.debounceDelay));
84
+ this.resizeObserver.observe(typographyEl);
85
+ }
86
+ });
87
+ };
88
+ this.setNewDebounceDelay = (delay) => {
89
+ this.debounceDelay = delay;
90
+ this.isNewDebounceDelaySet = true;
91
+ };
92
+ this.getLines = (height) => Math.floor(height / this.DEFAULT_LINE_HEIGHT);
93
+ this.truncate = (typographyEl, cellContainer, tooltip) => {
94
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
95
+ //24 is the height of a single line
96
+ if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {
97
+ if (this.truncationPattern === this.TOOLTIP_STRING) {
98
+ this.addTooltipTruncation(typographyEl, cellContainer, tooltip);
99
+ }
100
+ if (this.truncationPattern === this.SHOW_HIDE_STRING) {
101
+ this.addShowHideTruncation(cellContainer, typographyEl);
102
+ }
103
+ }
104
+ }
105
+ else {
106
+ if (this.truncationPattern === this.TOOLTIP_STRING && tooltip) {
107
+ typographyEl.setAttribute("style", `--ic-line-clamp: 0`);
108
+ cellContainer.appendChild(typographyEl);
109
+ tooltip.remove();
110
+ }
111
+ if (this.truncationPattern === this.SHOW_HIDE_STRING &&
112
+ !isEmptyString(typographyEl.getAttribute("max-lines"))) {
113
+ this.resetShowHideTruncation(typographyEl);
114
+ }
115
+ }
116
+ };
117
+ this.dataTruncation = (typographyEl) => {
118
+ // Tooltip truncation mentioned in AC. Will need revisiting
119
+ const tooltip = this.getTooltip(typographyEl);
120
+ const cellContainer = this.getCellContainer(typographyEl);
121
+ if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.classList.contains("data-type-element")) ||
122
+ this.dataUpdated) {
123
+ return;
124
+ }
125
+ if (this.truncationPattern === this.SHOW_HIDE_STRING &&
126
+ typographyEl.shadowRoot.querySelector("button")) {
127
+ const showHideBtn = typographyEl.shadowRoot.querySelector("button");
128
+ // If the see more/see less is present and the max lines is equal to the cell container
129
+ // remove the see more/see less button
130
+ if (showHideBtn) {
131
+ const truncWrapper = this.getTruncWrapper(typographyEl);
132
+ if (this.getLines(truncWrapper.scrollHeight) ===
133
+ +typographyEl.getAttribute("max-lines")) {
134
+ this.resetShowHideTruncation(typographyEl);
135
+ }
136
+ }
137
+ }
138
+ // Deals with setting and resetting row height and re-truncating data
139
+ if (this.rowHeightSet && this.truncationPattern === this.SHOW_HIDE_STRING) {
140
+ const truncWrapper = this.getTruncWrapper(typographyEl);
141
+ // cellContainer.clientHeight - 24 removes the extra line by see more/see less
142
+ if (truncWrapper &&
143
+ cellContainer.clientHeight - this.DEFAULT_LINE_HEIGHT >
144
+ truncWrapper.scrollHeight) {
145
+ this.resetShowHideTruncation(typographyEl);
146
+ return;
147
+ }
148
+ if (typographyEl.scrollHeight > cellContainer.clientHeight) {
149
+ this.addShowHideTruncation(cellContainer, typographyEl);
150
+ return;
151
+ }
152
+ }
153
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > 0 &&
154
+ (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) > 0 &&
155
+ (typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) === (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
156
+ if (tooltip) {
157
+ this.removeTooltip(cellContainer, typographyEl, tooltip);
158
+ }
159
+ return;
160
+ }
161
+ this.truncate(typographyEl, cellContainer, tooltip);
162
+ };
163
+ this.removeTextWrap = () => {
164
+ this.getTypographyElements().forEach((typographyEl) => {
165
+ const tableCell = typographyEl.closest("td");
166
+ if (tableCell.classList.contains(this.TEXT_WRAP_STRING)) {
167
+ tableCell.classList.remove(this.TEXT_WRAP_STRING);
168
+ }
169
+ });
170
+ };
171
+ this.getCellContainer = (typographyEl) => {
172
+ return typographyEl.closest(".cell-container");
173
+ };
174
+ this.deleteTextWrapDataKey = (array) => Array.isArray(array) &&
175
+ array.forEach((val) => val.textWrap && delete val.textWrap);
176
+ this.startLoadingTimer = () => {
177
+ this.hasLoadedForOneSecond = false;
178
+ this.timerStarted = Date.now();
179
+ setTimeout(() => {
180
+ this.hasLoadedForOneSecond = true;
181
+ this.timerStarted = null;
182
+ }, this.minimumLoadingDisplayDuration);
183
+ };
12
184
  this.isObject = (value) => typeof value === "object";
13
185
  this.notDefaultDensity = () => this.density !== "default";
14
186
  this.getCellContent = (cell, dataType) => {
@@ -26,9 +198,60 @@ export class DataTable {
26
198
  return this.getObjectValue(this.getObjectValue(cell, "cellAlignment"), alignment);
27
199
  }
28
200
  };
29
- this.createCells = (row) => {
201
+ this.getCellOptions = (cell, key) => {
202
+ if (!(this.isObject(cell) && Object.keys(cell).includes(key)))
203
+ return;
204
+ return this.getObjectValue(cell, key);
205
+ };
206
+ this.createUpdatingIndicator = () => {
207
+ const { appearance, description, max, min, progress } = this.updatingOptions || {};
208
+ return (h("th", { colSpan: this.columns.length, class: "updating-state" }, h("ic-loading-indicator", { appearance: appearance, description: description || "Updating table data", fullWidth: true, max: max, min: min, progress: progress, type: "linear", size: "small" })));
209
+ };
210
+ this.setRowHeight = (height) => {
211
+ return pxToRem(`${height * this.DENSITY_HEIGHT_MULTIPLIER[this.density] -
212
+ this.DENSITY_PADDING_HEIGHT_DIFF[this.density]}px`);
213
+ };
214
+ this.setTruncationClass = () => {
215
+ if (this.truncationPattern) {
216
+ return { [`truncation-${this.truncationPattern}`]: true };
217
+ }
218
+ return {};
219
+ };
220
+ this.getColumnWidth = (columnWidth) => {
221
+ // TODO: Setting max width on columns
222
+ let columnWidthStyling = {};
223
+ if (columnWidth) {
224
+ if (typeof columnWidth === "string") {
225
+ columnWidthStyling = Object.assign(Object.assign({}, columnWidthStyling), { ["--column-width"]: columnWidth });
226
+ }
227
+ if (typeof columnWidth === "object" && !!Object.keys(columnWidth)) {
228
+ if (columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth.minWidth) {
229
+ columnWidthStyling = Object.assign(Object.assign({}, columnWidthStyling), { ["--column-min-width"]: columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth.minWidth });
230
+ }
231
+ if (columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth.maxWidth) {
232
+ columnWidthStyling = Object.assign(Object.assign({}, columnWidthStyling), { ["--column-max-width"]: columnWidth === null || columnWidth === void 0 ? void 0 : columnWidth.maxWidth });
233
+ }
234
+ }
235
+ }
236
+ return columnWidthStyling;
237
+ };
238
+ this.getRowHeight = (currentRowHeight, columnProps, rowTextWrap, cell) => {
239
+ if ((this.truncationPattern || currentRowHeight) &&
240
+ !(columnProps === null || columnProps === void 0 ? void 0 : columnProps.textWrap) &&
241
+ !rowTextWrap &&
242
+ !this.getCellOptions(cell, "textWrap") &&
243
+ (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element") {
244
+ return {
245
+ [this.ROW_HEIGHT_CSS_VARIABLE]: this.setRowHeight(currentRowHeight),
246
+ };
247
+ }
248
+ return {};
249
+ };
250
+ this.createCells = (row, rowIndex) => {
251
+ var _a;
30
252
  const rowValues = Object.values(row);
31
253
  const rowKeys = Object.keys(row);
254
+ const rowOptions = this.getRowOptions(rowKeys, rowValues);
32
255
  let rowAlignment;
33
256
  let rowEmphasis;
34
257
  const headerIndex = rowKeys.indexOf("header");
@@ -36,44 +259,70 @@ export class DataTable {
36
259
  rowAlignment = this.getObjectValue(rowValues[headerIndex], "rowAlignment");
37
260
  rowEmphasis = this.getObjectValue(rowValues[headerIndex], "emphasis");
38
261
  }
262
+ const variableRowHeightVal = (_a = this.variableRowHeight) === null || _a === void 0 ? void 0 : _a.call(this, Object.assign(Object.assign({}, row), { index: rowIndex }));
263
+ const currentRowHeight = variableRowHeightVal
264
+ ? variableRowHeightVal !== "auto" && variableRowHeightVal
265
+ : this.globalRowHeight !== "auto" && this.globalRowHeight;
39
266
  return rowValues.map((cell, index) => {
40
- const { columnAlignment, dataType, emphasis } = this.columns[index];
267
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
268
+ const columnProps = this.columns[index];
269
+ const cellSlotName = `${columnProps === null || columnProps === void 0 ? void 0 : columnProps.key}-${rowIndex}`;
270
+ const hasIcon = this.isObject(cell) && Object.keys(cell).includes("icon");
41
271
  const cellValue = (key) => this.getObjectValue(cell, key);
42
- return rowKeys[index] === "header" ? (h("th", { scope: "row", colSpan: cellValue("colspan"), class: {
43
- ["row-header"]: true,
44
- [`row-header-alignment-${cellValue("cellAlignment")}`]: !!cellValue("cellAlignment"),
45
- ["row-header-sticky"]: this.stickyRowHeaders,
46
- } }, cellValue("title"))) : (h("td", { innerHTML: dataType === "element" ? cell : null, class: {
47
- ["table-cell"]: true,
48
- [`table-density-${this.density}`]: this.notDefaultDensity(),
49
- [`data-type-${dataType}`]: true,
50
- [`cell-alignment-${(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.horizontal) ||
51
- this.getCellAlignment(cell, "horizontal")}`]: !!(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.horizontal) ||
52
- !!this.getCellAlignment(cell, "horizontal"),
53
- [`cell-alignment-${(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.vertical) ||
54
- rowAlignment ||
55
- this.getCellAlignment(cell, "vertical")}`]: !!(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.vertical) ||
56
- !!rowAlignment ||
57
- !!this.getCellAlignment(cell, "vertical"),
58
- } }, h("ic-typography", { variant: "body", class: {
59
- [`cell-emphasis-${(this.isObject(cell) && cellValue("emphasis")) ||
60
- emphasis ||
61
- rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
62
- !!emphasis ||
63
- !!rowEmphasis,
64
- [`text-${this.density}`]: this.notDefaultDensity(),
65
- } }, this.isObject(cell) && dataType !== "date" ? (Object.keys(cell).includes("href") ? (h("ic-link", { href: cellValue("href") }, cellValue("data"))) : (cellValue("data"))) : (this.getCellContent(cell, dataType)))));
272
+ if (rowKeys[index] === "header") {
273
+ return (h("th", { scope: "row", colSpan: cellValue("colspan"), class: {
274
+ ["row-header"]: true,
275
+ [`row-header-alignment-${cellValue("cellAlignment")}`]: !!cellValue("cellAlignment"),
276
+ ["row-header-sticky"]: this.stickyRowHeaders,
277
+ } }, cellValue("title")));
278
+ }
279
+ if (rowKeys[index] !== "rowOptions") {
280
+ return (h("td", { class: {
281
+ ["table-cell"]: true,
282
+ [`table-density-${this.density}`]: this.notDefaultDensity(),
283
+ }, style: Object.assign({}, this.getColumnWidth(columnProps.columnWidth)) }, h("div", { innerHTML: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element" &&
284
+ !isSlotUsed(this.el, cellSlotName)
285
+ ? cell
286
+ : 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) ||
287
+ ((_b = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _b === void 0 ? void 0 : _b.vertical) ||
288
+ rowAlignment ||
289
+ this.getCellAlignment(cell, "vertical")}`]: !!((_c = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _c === void 0 ? void 0 : _c.vertical) ||
290
+ !!((_d = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _d === void 0 ? void 0 : _d.vertical) ||
291
+ !!rowAlignment ||
292
+ !!this.getCellAlignment(cell, "vertical"), [`cell-alignment-${((_e = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _e === void 0 ? void 0 : _e.horizontal) ||
293
+ ((_f = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _f === void 0 ? void 0 : _f.horizontal) ||
294
+ this.getCellAlignment(cell, "horizontal")}`]: !!((_g = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _g === void 0 ? void 0 : _g.horizontal) ||
295
+ !!((_h = rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.rowAlignment) === null || _h === void 0 ? void 0 : _h.horizontal) ||
296
+ !!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) ||
297
+ (rowOptions === null || rowOptions === void 0 ? void 0 : rowOptions.textWrap) ||
298
+ !!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
299
+ ? this.setRowHeight(currentRowHeight)
300
+ : null }, isSlotUsed(this.el, cellSlotName) ? (h("slot", { name: cellSlotName })) : (h(Fragment, null, isSlotUsed(this.el, `${cellSlotName}-icon`) ? (h("slot", { name: `${cellSlotName}-icon` })) : ((hasIcon || ((_k = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _k === void 0 ? void 0 : _k.onAllCells)) && (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" &&
301
+ !isSlotUsed(this.el, cellSlotName) && (h("ic-typography", { variant: "body", class: {
302
+ [`cell-emphasis-${(this.isObject(cell) && cellValue("emphasis")) ||
303
+ (columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
304
+ rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
305
+ !!(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
306
+ !!rowEmphasis,
307
+ [`text-${this.density}`]: this.notDefaultDensity(),
308
+ } }, this.isObject(cell) &&
309
+ (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "date" ? (Object.keys(cell).includes("href") ? (h("ic-link", { href: cellValue("href") }, cellValue("data"))) : (cellValue("data"))) : (this.getCellContent(cell, columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType)))))))));
310
+ }
66
311
  });
67
312
  };
68
313
  this.createColumnHeaders = () => {
69
- return this.columns.map(({ cellAlignment, colspan, key, title }) => (h("th", { scope: "col", class: {
314
+ return this.columns.map(({ cellAlignment, colspan, icon, key, title, columnWidth }) => (h("th", { scope: "col", class: {
70
315
  ["column-header"]: true,
71
- [`column-header-alignment-${cellAlignment}`]: !!cellAlignment,
72
316
  [`table-density-${this.density}`]: this.notDefaultDensity(),
73
- }, colSpan: colspan }, this.sortable ? (h("div", { class: "column-header-inner-container" }, h("ic-typography", { variant: "body", class: {
317
+ ["updating-state-headers"]: this.updating && !this.loading,
318
+ }, style: Object.assign({}, this.getColumnWidth(columnWidth)), colSpan: colspan }, h("div", { class: {
319
+ "column-header-inner-container": true,
320
+ [`column-header-alignment-${cellAlignment}`]: !!cellAlignment,
321
+ } }, isSlotUsed(this.el, `${key}-column-icon`) ? (h("slot", { name: `${key}-column-icon` })) : (icon &&
322
+ !icon.hideOnHeader && (h("span", { class: "icon", innerHTML: icon.icon }))), h("ic-typography", { variant: "body", class: {
74
323
  ["column-header-text"]: true,
75
324
  [`text-${this.density}`]: this.notDefaultDensity(),
76
- } }, title), h("ic-button", { variant: "icon", id: `sort-button-${key}`, "aria-label": this.getSortButtonLabel(key),
325
+ } }, title), this.sortable && (h("ic-button", { variant: "icon", id: `sort-button-${key}`, "aria-label": this.getSortButtonLabel(key),
77
326
  // eslint-disable-next-line react/jsx-no-bind
78
327
  onClick: () => this.sortRows(key), innerHTML: this.SORT_ICONS[this.sortedColumn === key
79
328
  ? this.sortedColumnOrder
@@ -81,21 +330,41 @@ export class DataTable {
81
330
  ["sort-button"]: true,
82
331
  ["sort-button-unsorted"]: this.sortedColumn !== key ||
83
332
  this.sortedColumnOrder === "unsorted",
84
- } }))) : (h("ic-typography", { variant: "body", class: {
85
- ["column-header-text"]: true,
86
- [`text-${this.density}`]: this.notDefaultDensity(),
87
- } }, title)))));
333
+ } }))))));
334
+ };
335
+ this.onRowClick = (row) => {
336
+ this.selectedRow =
337
+ this.selectedRow !== row && !this.loading && !this.updating && row;
88
338
  };
89
339
  this.createRows = () => {
90
340
  const data = this.showPagination
91
341
  ? this.data.slice(this.fromRow, this.toRow)
92
342
  : this.data.slice();
93
- return data
343
+ /**
344
+ * Ensures that createCells has a value in data to map over to actually render the slot.
345
+ * Removes the need for the user to add it multiple times.
346
+ * `addDataToPosition` used to add the element in the correct column order.
347
+ * Adding empty string value in to give `createCells` something to loop over.
348
+ */
349
+ const organisedData = data.map((row, rowIndex) => {
350
+ const slottedColumns = this.columns
351
+ .map(({ key }, index) => isSlotUsed(this.el, `${key}-${rowIndex}`) && { key, index })
352
+ .filter((col) => !!col);
353
+ return slottedColumns.length > 0
354
+ ? addDataToPosition(row, slottedColumns, "")
355
+ : row;
356
+ });
357
+ return organisedData
94
358
  .sort(!this.sortable ? undefined : this.getSortFunction())
95
- .map((row) => (h("tr", { onClick: () => (this.selectedRow = this.selectedRow !== row && row), class: {
96
- ["table-row"]: true,
97
- ["table-row-selected"]: this.selectedRow === row,
98
- } }, this.createCells(row))));
359
+ .map((row, index) => {
360
+ return (h("tr", {
361
+ // eslint-disable-next-line react/jsx-no-bind
362
+ onClick: () => this.onRowClick(row), class: {
363
+ ["table-row"]: true,
364
+ ["table-row-selected"]: this.selectedRow === row,
365
+ }
366
+ }, this.createCells(row, index)));
367
+ });
99
368
  };
100
369
  this.getObjectValue = (cell, key) => {
101
370
  return Object.values(cell)[Object.keys(cell).indexOf(key)];
@@ -155,10 +424,49 @@ export class DataTable {
155
424
  }
156
425
  this.sortedColumnOrder = sortOrders[nextSortOrderIndex];
157
426
  sortButton.setAttribute("aria-label", this.getSortButtonLabel(column));
427
+ this.tableSorted = true;
428
+ this.icSortChange.emit({
429
+ columnName: column,
430
+ sorted: this.sortedColumnOrder,
431
+ });
432
+ };
433
+ this.getTypographyElements = () => {
434
+ return Array.from(this.el.shadowRoot.querySelectorAll("ic-typography:not(.column-header-text)"));
435
+ };
436
+ this.getTooltip = (typographyEl) => {
437
+ return typographyEl.closest(this.TOOLTIP);
438
+ };
439
+ this.updateTruncationTooltip = (removeTooltipOnly = false) => {
440
+ this.getTypographyElements().forEach((typographyEl) => {
441
+ const tooltip = this.getTooltip(typographyEl);
442
+ const cellContainer = this.getCellContainer(typographyEl);
443
+ if (typographyEl.closest(this.TEXT_WRAP_CLASS)) {
444
+ this.removeTooltip(cellContainer, typographyEl, tooltip);
445
+ typographyEl.setAttribute("style", `--ic-line-clamp: 0`);
446
+ return;
447
+ }
448
+ this.regenerateTooltip(cellContainer, typographyEl, tooltip, removeTooltipOnly);
449
+ });
158
450
  };
159
451
  this.updateScrollOffset = () => {
160
452
  this.scrollOffset = this.el.shadowRoot.querySelector(".table-row-container").scrollTop;
161
453
  };
454
+ this.setTableDimensions = () => {
455
+ let tableHostDimensions = {};
456
+ if (this.width) {
457
+ tableHostDimensions = Object.assign(Object.assign({}, tableHostDimensions), { ["--table-width"]: this.width });
458
+ }
459
+ if (this.height) {
460
+ tableHostDimensions = Object.assign(Object.assign({}, tableHostDimensions), { ["--table-height"]: this.height });
461
+ }
462
+ if (this.maxWidth) {
463
+ tableHostDimensions = Object.assign(Object.assign({}, tableHostDimensions), { ["--table-max-width"]: this.maxWidth });
464
+ }
465
+ if (this.minWidth) {
466
+ tableHostDimensions = Object.assign(Object.assign({}, tableHostDimensions), { ["--table-min-width"]: this.minWidth });
467
+ }
468
+ return tableHostDimensions;
469
+ };
162
470
  this.fromRow = 0;
163
471
  this.previousRowsPerPage = undefined;
164
472
  this.rowsPerPage = undefined;
@@ -168,23 +476,36 @@ export class DataTable {
168
476
  this.sortedColumn = undefined;
169
477
  this.sortedColumnOrder = undefined;
170
478
  this.toRow = undefined;
479
+ this.currentRowHeight = undefined;
480
+ this.debounceDelay = 0;
171
481
  this.caption = undefined;
172
482
  this.columns = undefined;
173
483
  this.data = undefined;
174
484
  this.density = "default";
175
485
  this.embedded = false;
486
+ this.globalRowHeight = "auto";
487
+ this.height = undefined;
176
488
  this.hideColumnHeaders = false;
177
- this.paginationOptions = {
178
- itemsPerPage: [
489
+ this.loading = false;
490
+ this.loadingOptions = undefined;
491
+ this.maxWidth = undefined;
492
+ this.minWidth = undefined;
493
+ this.minimumLoadingDisplayDuration = 1000;
494
+ this.paginationBarOptions = {
495
+ itemsPerPageOptions: [
179
496
  { label: "10", value: "10" },
180
497
  { label: "25", value: "25" },
181
498
  { label: "50", value: "50" },
182
499
  ],
183
- type: "page",
184
- control: "simple",
185
- itemsPerPageControl: true,
186
- goToPageControl: true,
500
+ rangeLabelType: "page",
501
+ type: "simple",
502
+ showItemsPerPageControl: true,
503
+ showGoToPageControl: true,
187
504
  alignment: "right",
505
+ appearance: "default",
506
+ itemLabel: "Item",
507
+ pageLabel: "Page",
508
+ hideRangeLabel: false,
188
509
  };
189
510
  this.showPagination = false;
190
511
  this.sortable = false;
@@ -194,56 +515,474 @@ export class DataTable {
194
515
  };
195
516
  this.stickyColumnHeaders = false;
196
517
  this.stickyRowHeaders = false;
518
+ this.tableLayout = "fixed";
519
+ this.truncationPattern = undefined;
520
+ this.updating = false;
521
+ this.updatingOptions = undefined;
522
+ this.variableRowHeight = undefined;
523
+ this.width = undefined;
524
+ }
525
+ disconnectedCallback() {
526
+ var _a;
527
+ (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
197
528
  }
198
529
  componentWillLoad() {
199
- this.rowsPerPage = Number(this.paginationOptions.itemsPerPage[0].value);
530
+ var _a;
531
+ this.rowsPerPage = Number(this.paginationBarOptions.itemsPerPageOptions[0].value);
200
532
  this.previousRowsPerPage = this.rowsPerPage;
201
533
  this.toRow = this.rowsPerPage;
202
534
  this.sortedColumn = this.sortOptions.defaultColumn;
203
535
  this.sortedColumnOrder = this.sortOptions.sortOrders[0];
536
+ this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) > 0 });
537
+ this.initialLoad = true;
538
+ this.previousItemsPerPage = this.rowsPerPage;
204
539
  }
205
540
  componentDidLoad() {
206
541
  const tableElement = this.el.shadowRoot.querySelector("table");
207
542
  const tableContainer = this.el.shadowRoot.querySelector(".table-container");
543
+ if (this.dataUpdated) {
544
+ this.dataUpdated = false;
545
+ }
208
546
  if ((tableElement === null || tableElement === void 0 ? void 0 : tableElement.clientHeight) > (tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.clientHeight) ||
209
547
  (tableElement === null || tableElement === void 0 ? void 0 : tableElement.clientWidth) > (tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.clientWidth)) {
210
548
  this.scrollable = true;
211
549
  }
550
+ if (this.loading) {
551
+ this.startLoadingTimer();
552
+ this.showLoadingIndicator();
553
+ }
554
+ if (this.truncationPattern) {
555
+ this.getTypographyElements().forEach((typographyEl) => {
556
+ const cellContainer = this.getCellContainer(typographyEl);
557
+ if (!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
558
+ this.dataTruncation(typographyEl);
559
+ }
560
+ });
561
+ this.debounceDataTruncation();
562
+ }
563
+ if (this.globalRowHeight !== "auto") {
564
+ this.updateSetRowHeight();
565
+ }
212
566
  }
213
- handleItemsPerPageChange(ev) {
214
- this.previousRowsPerPage = this.rowsPerPage;
215
- this.rowsPerPage = ev.detail.value;
216
- }
217
- handlePageChange(ev) {
218
- this.fromRow = (ev.detail.value - 1) * this.rowsPerPage;
219
- this.toRow = this.fromRow + this.rowsPerPage;
220
- const tableRowsContainer = this.el.shadowRoot.querySelector(".table-row-container");
221
- if (this.previousRowsPerPage === this.rowsPerPage) {
222
- tableRowsContainer.scrollTop = 0;
567
+ componentDidUpdate() {
568
+ // truncation updates invoked here once new/updated data has
569
+ // rendered to take into account updated .cell-container/ic-typography box model updates.
570
+ if (this.truncationPattern === this.SHOW_HIDE_STRING ||
571
+ this.truncationPattern === this.TOOLTIP_STRING) {
572
+ this.truncateUpdatedData();
223
573
  }
224
- else if (this.previousRowsPerPage < this.rowsPerPage) {
225
- tableRowsContainer.scrollTop = this.scrollOffset;
226
- this.previousRowsPerPage = this.rowsPerPage;
574
+ }
575
+ truncateUpdatedData() {
576
+ if (this.dataUpdated) {
577
+ if (this.truncationPattern === this.SHOW_HIDE_STRING) {
578
+ this.getTypographyElements().forEach((typographyEl) => {
579
+ const truncWrapper = this.getTruncWrapper(typographyEl);
580
+ const cellContainer = this.getCellContainer(typographyEl);
581
+ if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - this.DEFAULT_LINE_HEIGHT >=
582
+ (truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight)) {
583
+ this.resetShowHideTruncation(typographyEl);
584
+ return;
585
+ }
586
+ setTimeout(() => {
587
+ // slight delay due to data rendering
588
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
589
+ this.addShowHideTruncation(cellContainer, typographyEl);
590
+ }
591
+ }, 150);
592
+ });
593
+ }
594
+ if (this.truncationPattern === this.TOOLTIP_STRING) {
595
+ this.updateTruncationTooltip();
596
+ }
597
+ this.dataUpdated = false;
227
598
  }
228
- else {
599
+ if (this.tableSorted) {
600
+ if (this.truncationPattern === this.TOOLTIP_STRING) {
601
+ this.updateTruncationTooltip();
602
+ }
603
+ if (this.truncationPattern === this.SHOW_HIDE_STRING) {
604
+ this.getTypographyElements().forEach((typographyEl) => {
605
+ const cellContainer = this.getCellContainer(typographyEl);
606
+ if (!cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
607
+ this.createShowHideTruncation(typographyEl, cellContainer);
608
+ }
609
+ else {
610
+ typographyEl.resetTruncation().then(() => {
611
+ cellContainer.removeAttribute("style");
612
+ });
613
+ }
614
+ });
615
+ }
616
+ this.tableSorted = false;
617
+ }
618
+ // This function recalculates the tooltip truncation when the rowHeight has been set.
619
+ // This is in componentDidUpdate so a setTimeout is not used to wait for the render to be complete
620
+ if (this.rowHeightSet) {
621
+ const fontSize = parseInt(getComputedStyle(document.documentElement).fontSize);
622
+ const hasAutoRowHeight = this.globalRowHeight === "auto";
623
+ this.getTypographyElements().forEach((typographyEl) => {
624
+ var _a;
625
+ const cellContainer = this.getCellContainer(typographyEl);
626
+ const tooltipEl = this.getTooltip(typographyEl);
627
+ if (hasAutoRowHeight) {
628
+ cellContainer.style.height = null;
629
+ if (this.truncationPattern === this.TOOLTIP_STRING) {
630
+ this.removeTooltip(cellContainer, typographyEl, tooltipEl);
631
+ typographyEl.setAttribute("style", `--ic-line-clamp: 0`);
632
+ }
633
+ else if (this.truncationPattern === this.SHOW_HIDE_STRING) {
634
+ this.resetShowHideTruncation(typographyEl);
635
+ }
636
+ return;
637
+ }
638
+ const rowHeight = fontSize *
639
+ parseFloat(cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
640
+ // If the set row height is bigger than the cell container even
641
+ // with textWrap, set the row height
642
+ if (!((_a = cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.style) === null || _a === void 0 ? void 0 : _a.height) &&
643
+ rowHeight > cellContainer.clientHeight &&
644
+ !cellContainer.classList.contains(this.TEXT_WRAP_STRING)) {
645
+ cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
646
+ }
647
+ if (this.truncationPattern) {
648
+ // If the set row height is bigger than the typography truncation wrapper
649
+ // scroll height, remove see more / see less button
650
+ if (this.truncationPattern === this.SHOW_HIDE_STRING) {
651
+ const truncWrapper = this.getTruncWrapper(typographyEl);
652
+ const showHideBtn = typographyEl.shadowRoot.querySelector("button");
653
+ if (showHideBtn &&
654
+ (truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight) <= cellContainer.clientHeight) {
655
+ this.resetShowHideTruncation(typographyEl);
656
+ return;
657
+ }
658
+ }
659
+ this.truncate(typographyEl, cellContainer, tooltipEl);
660
+ }
661
+ else {
662
+ this.updateSetRowHeight(typographyEl);
663
+ }
664
+ });
665
+ this.rowHeightSet = false;
666
+ }
667
+ // Only run truncation on the new rows
668
+ // when the number of items per page has increased
669
+ if (this.itemsPerPageChange) {
670
+ const allRows = this.el.shadowRoot.querySelectorAll(".table-row");
671
+ if (this.rowsPerPage > this.previousItemsPerPage) {
672
+ const newRows = Array.from(allRows).slice(this.previousItemsPerPage);
673
+ newRows.forEach((row) => {
674
+ row
675
+ .querySelectorAll("ic-typography")
676
+ .forEach((typographyEl) => {
677
+ const cellContainer = this.getCellContainer(typographyEl);
678
+ const tooltipEl = this.getTooltip(typographyEl);
679
+ this.truncate(typographyEl, cellContainer, tooltipEl);
680
+ });
681
+ });
682
+ }
683
+ this.previousItemsPerPage = this.rowsPerPage;
684
+ this.itemsPerPageChange = false;
685
+ }
686
+ if (!this.initialLoad && this.icPageChangeEvent) {
687
+ if (this.truncationPattern === this.TOOLTIP_STRING) {
688
+ this.updateTruncationTooltip();
689
+ }
690
+ // set truncation to see more if opened and next/previous page is pressed
691
+ if (this.truncationPattern === this.SHOW_HIDE_STRING) {
692
+ this.getTypographyElements().forEach((typographyEl) => {
693
+ const cellContainer = this.getCellContainer(typographyEl);
694
+ const showHideBtn = typographyEl.shadowRoot.querySelector("button");
695
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > cellContainer.clientHeight &&
696
+ !showHideBtn) {
697
+ this.addShowHideTruncation(cellContainer, typographyEl);
698
+ }
699
+ });
700
+ }
701
+ this.icPageChangeEvent = false;
702
+ }
703
+ if (this.densityUpdate) {
704
+ this.getTypographyElements().forEach((typographyEl) => {
705
+ const cellContainer = this.getCellContainer(typographyEl);
706
+ const tooltipEl = this.getTooltip(typographyEl);
707
+ this.truncate(typographyEl, cellContainer, tooltipEl);
708
+ });
709
+ this.densityUpdate = false;
710
+ }
711
+ if (this.truncationPatternUpdated) {
712
+ if (this.truncationPattern === this.TOOLTIP_STRING) {
713
+ this.getTypographyElements().forEach((typographyEl) => {
714
+ const cellContainer = this.getCellContainer(typographyEl);
715
+ const tooltipEl = this.getTooltip(typographyEl);
716
+ if (typographyEl.scrollHeight > cellContainer.clientHeight) {
717
+ this.addTooltipTruncation(typographyEl, cellContainer, tooltipEl);
718
+ }
719
+ });
720
+ }
721
+ else if (this.truncationPattern === this.SHOW_HIDE_STRING) {
722
+ this.getTypographyElements().forEach((typographyEl) => {
723
+ const truncWrapper = this.getTruncWrapper(typographyEl);
724
+ const cellContainer = this.getCellContainer(typographyEl);
725
+ if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - this.DEFAULT_LINE_HEIGHT >
726
+ (truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight)) {
727
+ this.resetShowHideTruncation(typographyEl);
728
+ return;
729
+ }
730
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
731
+ this.addShowHideTruncation(cellContainer, typographyEl);
732
+ }
733
+ });
734
+ }
735
+ }
736
+ }
737
+ createShowHideTruncation(typographyEl, cellContainer) {
738
+ typographyEl.checkMaxLines(typographyEl.scrollHeight);
739
+ typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
740
+ typographyEl.setShowHideExpanded(false);
741
+ cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
742
+ }
743
+ addTooltipTruncation(typographyEl, cellContainer, tooltip) {
744
+ this.addLineClampCSS(typographyEl, cellContainer);
745
+ if (!tooltip) {
746
+ this.createTruncationTooltip(typographyEl, cellContainer);
747
+ }
748
+ }
749
+ addShowHideTruncation(cellContainer, typographyEl) {
750
+ cellContainer.classList.add(this.SHOW_HIDE_CSS_CLASS);
751
+ this.createShowHideTruncation(typographyEl, cellContainer);
752
+ }
753
+ getTruncWrapper(typographyEl) {
754
+ return typographyEl.shadowRoot.querySelector(".trunc-wrapper");
755
+ }
756
+ // Set the height to initial if row height is set and the show / hide truncation
757
+ // is clicked
758
+ handleTypographyTruncationExpandToggle({ detail, }) {
759
+ const { expanded, typographyEl } = detail;
760
+ const cellContainer = this.getCellContainer(typographyEl);
761
+ if (cellContainer.style.getPropertyValue(this.ROW_HEIGHT_CSS_VARIABLE) &&
762
+ expanded) {
763
+ cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, "inherit");
764
+ }
765
+ }
766
+ handlePageChange({ detail, target }) {
767
+ if (target.parentElement !== this.el) {
768
+ this.fromRow = (detail.value - 1) * this.rowsPerPage;
769
+ this.toRow = this.fromRow + this.rowsPerPage;
770
+ const tableRowsContainer = this.el.shadowRoot.querySelector(".table-row-container");
771
+ if (this.previousRowsPerPage === this.rowsPerPage) {
772
+ tableRowsContainer.scrollTop = 0;
773
+ }
774
+ else if (this.previousRowsPerPage < this.rowsPerPage) {
775
+ tableRowsContainer.scrollTop = this.scrollOffset;
776
+ this.previousRowsPerPage = this.rowsPerPage;
777
+ }
778
+ else {
779
+ this.previousRowsPerPage = this.rowsPerPage;
780
+ }
781
+ }
782
+ if (!this.initialLoad && this.previousPaginationPage !== detail.value) {
783
+ // This is to prevent icPageChange from triggering truncation on first load
784
+ this.icPageChangeEvent = true;
785
+ }
786
+ this.previousPaginationPage = detail.value;
787
+ this.initialLoad = false;
788
+ }
789
+ handleItemsPerPageChange({ detail, target, }) {
790
+ if (target.parentElement !== this.el) {
229
791
  this.previousRowsPerPage = this.rowsPerPage;
792
+ this.rowsPerPage = detail.value;
230
793
  }
794
+ this.itemsPerPageChange = true;
795
+ }
796
+ handleDensityChange(ev) {
797
+ this.density = ev.detail.value;
231
798
  }
232
799
  clickListener(ev) {
233
800
  if (ev.target !== this.el)
234
801
  this.selectedRow = undefined;
235
802
  }
803
+ loadingHandler(newValue) {
804
+ if (newValue)
805
+ this.startLoadingTimer();
806
+ if (this.loading) {
807
+ setTimeout(() => {
808
+ this.showLoadingIndicator();
809
+ }, 500);
810
+ }
811
+ }
812
+ truncationPatternHandler(newValue) {
813
+ if (newValue === this.TOOLTIP_STRING) {
814
+ this.resetShowHideTruncation();
815
+ this.updateTruncationTooltip(true);
816
+ // Not using debounceDataTruncation here due to resizeObserver not being triggered
817
+ this.getTypographyElements().forEach((typographyEl) => {
818
+ const cellContainer = this.getCellContainer(typographyEl);
819
+ const tooltip = this.getTooltip(typographyEl);
820
+ this.truncate(typographyEl, cellContainer, tooltip);
821
+ });
822
+ }
823
+ if (newValue === this.SHOW_HIDE_STRING) {
824
+ // ResizeObserver is trigger here due to the see more/see less links being removed.
825
+ // The resizeObserver will also apply the tooltip where relevant
826
+ this.updateTruncationTooltip(true);
827
+ this.getTypographyElements().forEach((typographyEl) => {
828
+ const truncWrapper = this.getTruncWrapper(typographyEl);
829
+ const cellContainer = this.getCellContainer(typographyEl);
830
+ if ((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) - this.DEFAULT_LINE_HEIGHT >
831
+ (truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight)) {
832
+ this.resetShowHideTruncation(typographyEl);
833
+ return;
834
+ }
835
+ setTimeout(() => {
836
+ // slight delay due to data rendering
837
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)) {
838
+ this.addShowHideTruncation(cellContainer, typographyEl);
839
+ }
840
+ }, 150);
841
+ });
842
+ }
843
+ this.truncationPatternUpdated = true;
844
+ }
845
+ async dataHandler(newData) {
846
+ this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: (newData === null || newData === void 0 ? void 0 : newData.length) > 0 });
847
+ if (this.loading) {
848
+ !this.hasLoadedForOneSecond
849
+ ? setTimeout(() => (this.loading = false), this.minimumLoadingDisplayDuration -
850
+ (Date.now() - this.timerStarted))
851
+ : (this.loading = false);
852
+ }
853
+ if (this.updating)
854
+ this.updating = false;
855
+ this.dataUpdated = true;
856
+ }
857
+ async densityHandler() {
858
+ this.densityUpdate = true;
859
+ }
860
+ resetShowHideTruncation(typographyEl) {
861
+ if (typographyEl) {
862
+ const truncWrapper = this.getTruncWrapper(typographyEl);
863
+ const cellContainer = this.getCellContainer(typographyEl);
864
+ if ((truncWrapper === null || truncWrapper === void 0 ? void 0 : truncWrapper.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) &&
865
+ !isEmptyString(typographyEl.getAttribute("max-lines")) &&
866
+ Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT) !==
867
+ +typographyEl.getAttribute("max-lines")) {
868
+ typographyEl.checkMaxLines(truncWrapper.scrollHeight);
869
+ typographyEl.setAttribute("max-lines", `${Math.floor((cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) / this.DEFAULT_LINE_HEIGHT)}`);
870
+ typographyEl.setShowHideExpanded(false);
871
+ cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, null);
872
+ }
873
+ else {
874
+ typographyEl.resetTruncation().then(() => {
875
+ if (!typographyEl.closest(this.TEXT_WRAP_CLASS)) {
876
+ cellContainer.style.setProperty(this.ROW_HEIGHT_CSS_VARIABLE, cellContainer.getAttribute(this.DATA_ROW_HEIGHT_STRING));
877
+ }
878
+ });
879
+ }
880
+ }
881
+ else {
882
+ this.getTypographyElements().forEach((typographyEl) => {
883
+ const cellContainer = this.getCellContainer(typographyEl);
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
+ }
892
+ rowHeightChangeHandler(newValue, oldValue) {
893
+ if (+newValue !== +oldValue) {
894
+ this.deleteTextWrapDataKey(this.data);
895
+ this.deleteTextWrapDataKey(this.columns);
896
+ this.removeTextWrap();
897
+ this.icRowHeightChange.emit();
898
+ this.rowHeightSet = true;
899
+ }
900
+ }
901
+ /**
902
+ * Resets the `globalRowHeight` prop to number or auto and sets the `variableRowHeight` prop to `null`.
903
+ */
904
+ async resetRowHeights(rowHeight) {
905
+ this.globalRowHeight = rowHeight || "auto";
906
+ this.variableRowHeight = null;
907
+ }
908
+ showLoadingIndicator() {
909
+ this.loadingIndicator.classList.add("show");
910
+ }
911
+ getRowOptions(rowKeys, rowValues) {
912
+ const rowOptionsIndex = rowKeys.indexOf("rowOptions");
913
+ return rowOptionsIndex > -1 && rowValues[rowOptionsIndex];
914
+ }
915
+ regenerateTooltip(cellContainer, typographyEl, tooltip, removeTooltipOnly) {
916
+ // When sorting the table, instead of regenerating the tooltip,
917
+ // the tooltip details are updated
918
+ if (tooltip) {
919
+ if (this.tableSorted) {
920
+ tooltip.setAttribute("target", typographyEl.id);
921
+ tooltip.setAttribute("label", typographyEl.textContent);
922
+ }
923
+ else {
924
+ this.removeTooltip(cellContainer, typographyEl, tooltip);
925
+ }
926
+ if (removeTooltipOnly) {
927
+ return;
928
+ }
929
+ }
930
+ // This add line clamp to data only when
931
+ // the data object has been updated
932
+ if (!typographyEl.getAttribute("style") && this.dataUpdated) {
933
+ this.addLineClampCSS(typographyEl, cellContainer);
934
+ }
935
+ if ((typographyEl === null || typographyEl === void 0 ? void 0 : typographyEl.scrollHeight) > (cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight) &&
936
+ this.truncationPattern === this.TOOLTIP_STRING) {
937
+ if (!typographyEl.getAttribute("style") ||
938
+ typographyEl.style.cssText.includes("--ic-line-clamp: 0;")) {
939
+ this.addLineClampCSS(typographyEl, cellContainer);
940
+ }
941
+ this.createTruncationTooltip(typographyEl, cellContainer);
942
+ }
943
+ }
944
+ removeTooltip(cellContainer, typographyEl, tooltip) {
945
+ cellContainer.appendChild(typographyEl);
946
+ if (tooltip) {
947
+ tooltip.remove();
948
+ }
949
+ }
950
+ addLineClampCSS(typographyEl, cellContainer) {
951
+ typographyEl.setAttribute("style", `--ic-line-clamp: ${this.getLines(cellContainer === null || cellContainer === void 0 ? void 0 : cellContainer.clientHeight)}`);
952
+ }
953
+ createTruncationTooltip(typographyEl, cellContainer) {
954
+ const tooltipEl = document.createElement("ic-tooltip");
955
+ tooltipEl.setAttribute("target", typographyEl.id);
956
+ tooltipEl.setAttribute("label", typographyEl.textContent);
957
+ tooltipEl.classList.add("ic-tooltip-overflow");
958
+ tooltipEl.setExternalPopperProps({
959
+ // This might need reverting back to absolute if the tooltip doesn't dynamically position itself correctly
960
+ strategy: "fixed",
961
+ });
962
+ cellContainer.appendChild(tooltipEl);
963
+ tooltipEl.appendChild(typographyEl);
964
+ }
236
965
  render() {
237
- const { caption, createColumnHeaders, createRows, data, hideColumnHeaders, paginationOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, } = this;
238
- return (h("div", { class: "table-container" }, h("div", { class: {
966
+ const { caption, createColumnHeaders, createRows, createUpdatingIndicator, data, hideColumnHeaders, loading, loadingOptions, paginationBarOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, updating, } = this;
967
+ return (h(Host, { style: Object.assign({}, this.setTableDimensions()) }, h("div", { class: "table-container" }, isSlotUsed(this.el, "title-bar") && h("slot", { name: "title-bar" }), h("div", { class: {
239
968
  ["table-row-container"]: true,
240
969
  scrollable,
241
- }, tabIndex: scrollable ? 0 : null, onScroll: updateScrollOffset }, h("table", null, h("caption", { class: "table-caption" }, caption), !hideColumnHeaders && (h("thead", { class: {
970
+ }, tabIndex: scrollable ? 0 : null, onScroll: updateScrollOffset }, isSlotUsed(this.el, "title-bar") && h("slot", { name: "title-bar" }), h("table", { style: {
971
+ ["--table-layout"]: this.tableLayout,
972
+ } }, h("caption", { class: "table-caption" }, caption), !hideColumnHeaders && (h("thead", { class: {
242
973
  ["column-header-sticky"]: stickyColumnHeaders,
243
974
  ["column-header-overlay"]: stickyColumnHeaders && scrollOffset !== 0,
244
- } }, h("tr", null, createColumnHeaders()))), (data === null || data === void 0 ? void 0 : data.length) > 0 && h("tbody", null, createRows()))), showPagination && (h("div", { class: "pagination-container" }, h("ic-pagination-bar", { totalItems: data.length, paginationType: paginationOptions.type, paginationControl: paginationOptions.control, showItemsPerPageControl: paginationOptions.itemsPerPageControl, showGoToPageControl: paginationOptions.goToPageControl, itemsPerPageOptions: paginationOptions.itemsPerPage, alignment: paginationOptions.alignment }))), sortable && (h("div", { class: "screen-reader-sort-text", "aria-live": "polite" }, sortedColumnOrder !== "unsorted" && sortedColumn
975
+ } }, h("tr", null, createColumnHeaders()))), updating &&
976
+ !loading &&
977
+ (hideColumnHeaders ? (h("thead", null, createUpdatingIndicator())) : (createUpdatingIndicator())), (data === null || data === void 0 ? void 0 : data.length) > 0 && !loading && h("tbody", null, createRows())), !(data === null || data === void 0 ? void 0 : data.length) &&
978
+ !loading &&
979
+ (isSlotUsed(this.el, "empty-state") ? (h("slot", { name: "empty-state" })) : (h("ic-empty-state", { aligned: "center", heading: "No Data", class: "loading-empty" })))), loading && (h("ic-loading-indicator", { appearance: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.appearance, class: {
980
+ "loading-empty": loading,
981
+ loading: true,
982
+ "show-background": loadingOptions.showBackground,
983
+ }, description: loadingOptions.description || "Loading table data", label: loadingOptions.label || "Loading...", labelDuration: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.labelDuration, max: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.max, min: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.min, progress: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.progress, ref: (el) => (this.loadingIndicator = el) })), (showPagination || isSlotUsed(this.el, "pagination-bar")) && (h("div", { class: "pagination-container" }, isSlotUsed(this.el, "pagination-bar") ? (h("slot", { name: "pagination-bar" })) : (h("ic-pagination-bar", { totalItems: data.length, type: paginationBarOptions.type, rangeLabelType: paginationBarOptions.rangeLabelType, showItemsPerPageControl: paginationBarOptions.showItemsPerPageControl, showGoToPageControl: paginationBarOptions.showGoToPageControl, itemsPerPageOptions: paginationBarOptions.itemsPerPageOptions, alignment: paginationBarOptions.alignment, appearance: paginationBarOptions.appearance, itemLabel: paginationBarOptions.itemLabel, pageLabel: paginationBarOptions.pageLabel, hideRangeLabel: paginationBarOptions.hideRangeLabel })))), sortable && (h("div", { class: "screen-reader-sort-text", "aria-live": "polite" }, sortedColumnOrder !== "unsorted" && sortedColumn
245
984
  ? `${sortedColumn} sorted ${sortedColumnOrder}`
246
- : "table unsorted"))));
985
+ : "table unsorted")))));
247
986
  }
248
987
  static get is() { return "ic-data-table"; }
249
988
  static get encapsulation() { return "shadow"; }
@@ -301,9 +1040,15 @@ export class DataTable {
301
1040
  "type": "unknown",
302
1041
  "mutable": false,
303
1042
  "complexType": {
304
- "original": "{ [key: string]: any }[]",
305
- "resolved": "{ [key: string]: any; }[]",
306
- "references": {}
1043
+ "original": "IcDataTableDataType[]",
1044
+ "resolved": "IcDataTableDataType[]",
1045
+ "references": {
1046
+ "IcDataTableDataType": {
1047
+ "location": "import",
1048
+ "path": "./ic-data-table.types",
1049
+ "id": "src/components/ic-data-table/ic-data-table.types.tsx::IcDataTableDataType"
1050
+ }
1051
+ }
307
1052
  },
308
1053
  "required": false,
309
1054
  "optional": false,
@@ -314,7 +1059,7 @@ export class DataTable {
314
1059
  },
315
1060
  "density": {
316
1061
  "type": "string",
317
- "mutable": false,
1062
+ "mutable": true,
318
1063
  "complexType": {
319
1064
  "original": "IcDataTableDensityOptions",
320
1065
  "resolved": "\"default\" | \"dense\" | \"spacious\"",
@@ -354,6 +1099,47 @@ export class DataTable {
354
1099
  "reflect": false,
355
1100
  "defaultValue": "false"
356
1101
  },
1102
+ "globalRowHeight": {
1103
+ "type": "any",
1104
+ "mutable": true,
1105
+ "complexType": {
1106
+ "original": "IcDataTableRowHeights",
1107
+ "resolved": "\"auto\" | number",
1108
+ "references": {
1109
+ "IcDataTableRowHeights": {
1110
+ "location": "import",
1111
+ "path": "./ic-data-table.types",
1112
+ "id": "src/components/ic-data-table/ic-data-table.types.tsx::IcDataTableRowHeights"
1113
+ }
1114
+ }
1115
+ },
1116
+ "required": false,
1117
+ "optional": true,
1118
+ "docs": {
1119
+ "tags": [],
1120
+ "text": "Sets the row height on all rows in the table that aren't set using the `variableRowHeight` method."
1121
+ },
1122
+ "attribute": "global-row-height",
1123
+ "reflect": false,
1124
+ "defaultValue": "\"auto\""
1125
+ },
1126
+ "height": {
1127
+ "type": "string",
1128
+ "mutable": false,
1129
+ "complexType": {
1130
+ "original": "string",
1131
+ "resolved": "string",
1132
+ "references": {}
1133
+ },
1134
+ "required": false,
1135
+ "optional": true,
1136
+ "docs": {
1137
+ "tags": [],
1138
+ "text": "Sets the table height. Can be set to `auto` or a specific value in `px`, `rem`, or `%`."
1139
+ },
1140
+ "attribute": "height",
1141
+ "reflect": false
1142
+ },
357
1143
  "hideColumnHeaders": {
358
1144
  "type": "boolean",
359
1145
  "mutable": false,
@@ -372,27 +1158,108 @@ export class DataTable {
372
1158
  "reflect": false,
373
1159
  "defaultValue": "false"
374
1160
  },
375
- "paginationOptions": {
1161
+ "loading": {
1162
+ "type": "boolean",
1163
+ "mutable": true,
1164
+ "complexType": {
1165
+ "original": "boolean",
1166
+ "resolved": "boolean",
1167
+ "references": {}
1168
+ },
1169
+ "required": false,
1170
+ "optional": true,
1171
+ "docs": {
1172
+ "tags": [],
1173
+ "text": "When set to `true`, the full table will show a loading state, featuring a radial indicator."
1174
+ },
1175
+ "attribute": "loading",
1176
+ "reflect": false,
1177
+ "defaultValue": "false"
1178
+ },
1179
+ "loadingOptions": {
376
1180
  "type": "unknown",
377
1181
  "mutable": false,
378
1182
  "complexType": {
379
- "original": "{\n itemsPerPage?: { label: string; value: string }[];\n type?: IcPaginationTypes;\n control?: IcPaginationControlTypes;\n itemsPerPageControl?: boolean;\n goToPageControl?: boolean;\n alignment?: IcPaginationAlignmentOptions;\n }",
380
- "resolved": "{ itemsPerPage?: { label: string; value: string; }[]; type?: IcPaginationTypes; control?: IcPaginationControlTypes; itemsPerPageControl?: boolean; goToPageControl?: boolean; alignment?: IcPaginationAlignmentOptions; }",
1183
+ "original": "{\n appearance?: IcThemeForegroundNoDefault;\n description?: string;\n label?: string;\n labelDuration?: number;\n max?: number;\n min?: number;\n progress?: number;\n showBackground?: boolean;\n }",
1184
+ "resolved": "{ appearance?: IcThemeForegroundNoDefault; description?: string; label?: string; labelDuration?: number; max?: number; min?: number; progress?: number; showBackground?: boolean; }",
381
1185
  "references": {
382
- "IcPaginationTypes": {
383
- "location": "import",
384
- "path": "../ic-pagination/ic-pagination.types",
385
- "id": "src/components/ic-pagination/ic-pagination.types.ts::IcPaginationTypes"
386
- },
387
- "IcPaginationControlTypes": {
1186
+ "IcThemeForegroundNoDefault": {
388
1187
  "location": "import",
389
- "path": "../ic-pagination/ic-pagination.types",
390
- "id": "src/components/ic-pagination/ic-pagination.types.ts::IcPaginationControlTypes"
391
- },
392
- "IcPaginationAlignmentOptions": {
1188
+ "path": "@ukic/web-components/dist/types/utils/types",
1189
+ "id": "../web-components/dist/types/utils/types.d.ts::IcThemeForegroundNoDefault"
1190
+ }
1191
+ }
1192
+ },
1193
+ "required": false,
1194
+ "optional": true,
1195
+ "docs": {
1196
+ "tags": [],
1197
+ "text": "Sets the props for the circular loading indicator used in the loading state."
1198
+ }
1199
+ },
1200
+ "maxWidth": {
1201
+ "type": "string",
1202
+ "mutable": false,
1203
+ "complexType": {
1204
+ "original": "string",
1205
+ "resolved": "string",
1206
+ "references": {}
1207
+ },
1208
+ "required": false,
1209
+ "optional": true,
1210
+ "docs": {
1211
+ "tags": [],
1212
+ "text": "Sets the maximum width of the data table. Can be set in `px`, `rem`, or `%`."
1213
+ },
1214
+ "attribute": "max-width",
1215
+ "reflect": false
1216
+ },
1217
+ "minWidth": {
1218
+ "type": "string",
1219
+ "mutable": false,
1220
+ "complexType": {
1221
+ "original": "string",
1222
+ "resolved": "string",
1223
+ "references": {}
1224
+ },
1225
+ "required": false,
1226
+ "optional": true,
1227
+ "docs": {
1228
+ "tags": [],
1229
+ "text": "Sets the minimum width of the data table. Can be set in `px`, `rem`, or `%`."
1230
+ },
1231
+ "attribute": "min-width",
1232
+ "reflect": false
1233
+ },
1234
+ "minimumLoadingDisplayDuration": {
1235
+ "type": "number",
1236
+ "mutable": false,
1237
+ "complexType": {
1238
+ "original": "number",
1239
+ "resolved": "number",
1240
+ "references": {}
1241
+ },
1242
+ "required": false,
1243
+ "optional": true,
1244
+ "docs": {
1245
+ "tags": [],
1246
+ "text": "The minimum amount of time the `loading` state displays for before showing the data. Used to prevent flashing in the component."
1247
+ },
1248
+ "attribute": "minimum-loading-display-duration",
1249
+ "reflect": false,
1250
+ "defaultValue": "1000"
1251
+ },
1252
+ "paginationBarOptions": {
1253
+ "type": "unknown",
1254
+ "mutable": false,
1255
+ "complexType": {
1256
+ "original": "IcPaginationBarOptions",
1257
+ "resolved": "IcPaginationBarOptions",
1258
+ "references": {
1259
+ "IcPaginationBarOptions": {
393
1260
  "location": "import",
394
- "path": "../ic-pagination/ic-pagination.types",
395
- "id": "src/components/ic-pagination/ic-pagination.types.ts::IcPaginationAlignmentOptions"
1261
+ "path": "../../utils/types",
1262
+ "id": "src/utils/types.ts::IcPaginationBarOptions"
396
1263
  }
397
1264
  }
398
1265
  },
@@ -400,9 +1267,9 @@ export class DataTable {
400
1267
  "optional": true,
401
1268
  "docs": {
402
1269
  "tags": [],
403
- "text": "Sets the props for the pagination bar."
1270
+ "text": "Sets the props for the built-in pagination bar. If the `pagination-bar` slot is used then this prop is ignored."
404
1271
  },
405
- "defaultValue": "{\n itemsPerPage: [\n { label: \"10\", value: \"10\" },\n { label: \"25\", value: \"25\" },\n { label: \"50\", value: \"50\" },\n ],\n type: \"page\",\n control: \"simple\",\n itemsPerPageControl: true,\n goToPageControl: true,\n alignment: \"right\",\n }"
1272
+ "defaultValue": "{\n itemsPerPageOptions: [\n { label: \"10\", value: \"10\" },\n { label: \"25\", value: \"25\" },\n { label: \"50\", value: \"50\" },\n ],\n rangeLabelType: \"page\",\n type: \"simple\",\n showItemsPerPageControl: true,\n showGoToPageControl: true,\n alignment: \"right\",\n appearance: \"default\",\n itemLabel: \"Item\",\n pageLabel: \"Page\",\n hideRangeLabel: false,\n }"
406
1273
  },
407
1274
  "showPagination": {
408
1275
  "type": "boolean",
@@ -497,6 +1364,124 @@ export class DataTable {
497
1364
  "attribute": "sticky-row-headers",
498
1365
  "reflect": false,
499
1366
  "defaultValue": "false"
1367
+ },
1368
+ "tableLayout": {
1369
+ "type": "string",
1370
+ "mutable": false,
1371
+ "complexType": {
1372
+ "original": "\"fixed\" | \"auto\"",
1373
+ "resolved": "\"auto\" | \"fixed\"",
1374
+ "references": {}
1375
+ },
1376
+ "required": false,
1377
+ "optional": true,
1378
+ "docs": {
1379
+ "tags": [],
1380
+ "text": "Sets the layout of the table"
1381
+ },
1382
+ "attribute": "table-layout",
1383
+ "reflect": false,
1384
+ "defaultValue": "\"fixed\""
1385
+ },
1386
+ "truncationPattern": {
1387
+ "type": "string",
1388
+ "mutable": false,
1389
+ "complexType": {
1390
+ "original": "IcDataTableTruncationTypes",
1391
+ "resolved": "\"show-hide\" | \"tooltip\"",
1392
+ "references": {
1393
+ "IcDataTableTruncationTypes": {
1394
+ "location": "import",
1395
+ "path": "./ic-data-table.types",
1396
+ "id": "src/components/ic-data-table/ic-data-table.types.tsx::IcDataTableTruncationTypes"
1397
+ }
1398
+ }
1399
+ },
1400
+ "required": false,
1401
+ "optional": true,
1402
+ "docs": {
1403
+ "tags": [],
1404
+ "text": "Sets the method used to truncate long text in cells where textWrap is `false`. The `tooltip` truncation pattern allows the overflowing text to be seen in a tooltip. The `show-hide` truncation pattern allows the overflowing text to be shown and hidden using the ic-typography \"See more\"/\"See less\" buttons."
1405
+ },
1406
+ "attribute": "truncation-pattern",
1407
+ "reflect": false
1408
+ },
1409
+ "updating": {
1410
+ "type": "boolean",
1411
+ "mutable": false,
1412
+ "complexType": {
1413
+ "original": "boolean",
1414
+ "resolved": "boolean",
1415
+ "references": {}
1416
+ },
1417
+ "required": false,
1418
+ "optional": true,
1419
+ "docs": {
1420
+ "tags": [],
1421
+ "text": "If `true`, the table displays a linear loading indicator below the header row to indicate an updating state."
1422
+ },
1423
+ "attribute": "updating",
1424
+ "reflect": false,
1425
+ "defaultValue": "false"
1426
+ },
1427
+ "updatingOptions": {
1428
+ "type": "unknown",
1429
+ "mutable": false,
1430
+ "complexType": {
1431
+ "original": "{\n appearance?: IcThemeForegroundNoDefault;\n description?: string;\n max?: number;\n min?: number;\n progress?: number;\n }",
1432
+ "resolved": "{ appearance?: IcThemeForegroundNoDefault; description?: string; max?: number; min?: number; progress?: number; }",
1433
+ "references": {
1434
+ "IcThemeForegroundNoDefault": {
1435
+ "location": "import",
1436
+ "path": "@ukic/web-components/dist/types/utils/types",
1437
+ "id": "../web-components/dist/types/utils/types.d.ts::IcThemeForegroundNoDefault"
1438
+ }
1439
+ }
1440
+ },
1441
+ "required": false,
1442
+ "optional": true,
1443
+ "docs": {
1444
+ "tags": [],
1445
+ "text": "Sets the props for the linear loading indicator used in the updating state."
1446
+ }
1447
+ },
1448
+ "variableRowHeight": {
1449
+ "type": "unknown",
1450
+ "mutable": true,
1451
+ "complexType": {
1452
+ "original": "(params: {\n [key: string]: any;\n index: number;\n }) => IcDataTableRowHeights | null",
1453
+ "resolved": "(params: { [key: string]: any; index: number; }) => IcDataTableRowHeights",
1454
+ "references": {
1455
+ "IcDataTableRowHeights": {
1456
+ "location": "import",
1457
+ "path": "./ic-data-table.types",
1458
+ "id": "src/components/ic-data-table/ic-data-table.types.tsx::IcDataTableRowHeights"
1459
+ }
1460
+ }
1461
+ },
1462
+ "required": false,
1463
+ "optional": true,
1464
+ "docs": {
1465
+ "tags": [],
1466
+ "text": "Allows for custom setting of row heights on individual rows based on an individual value from the `data` prop and the row index.\nIf the function returns `null`, that row's height will be set to the `globalRowHeight` property."
1467
+ }
1468
+ },
1469
+ "width": {
1470
+ "type": "string",
1471
+ "mutable": false,
1472
+ "complexType": {
1473
+ "original": "string",
1474
+ "resolved": "string",
1475
+ "references": {}
1476
+ },
1477
+ "required": false,
1478
+ "optional": true,
1479
+ "docs": {
1480
+ "tags": [],
1481
+ "text": "Sets the table width. Can be set to `auto` or a specific value in `px`, `rem`, or `%`."
1482
+ },
1483
+ "attribute": "width",
1484
+ "reflect": false
500
1485
  }
501
1486
  };
502
1487
  }
@@ -510,14 +1495,101 @@ export class DataTable {
510
1495
  "selectedRow": {},
511
1496
  "sortedColumn": {},
512
1497
  "sortedColumnOrder": {},
513
- "toRow": {}
1498
+ "toRow": {},
1499
+ "currentRowHeight": {},
1500
+ "debounceDelay": {}
1501
+ };
1502
+ }
1503
+ static get events() {
1504
+ return [{
1505
+ "method": "icRowHeightChange",
1506
+ "name": "icRowHeightChange",
1507
+ "bubbles": true,
1508
+ "cancelable": true,
1509
+ "composed": true,
1510
+ "docs": {
1511
+ "tags": [],
1512
+ "text": "Emitted when the `globalRowHeight` or `variableRowHeight` properties change in the data table."
1513
+ },
1514
+ "complexType": {
1515
+ "original": "void",
1516
+ "resolved": "void",
1517
+ "references": {}
1518
+ }
1519
+ }, {
1520
+ "method": "icSortChange",
1521
+ "name": "icSortChange",
1522
+ "bubbles": true,
1523
+ "cancelable": true,
1524
+ "composed": true,
1525
+ "docs": {
1526
+ "tags": [],
1527
+ "text": "Emitted when a column sort button is clicked."
1528
+ },
1529
+ "complexType": {
1530
+ "original": "IcSortEventDetail",
1531
+ "resolved": "IcSortEventDetail",
1532
+ "references": {
1533
+ "IcSortEventDetail": {
1534
+ "location": "import",
1535
+ "path": "./ic-data-table.types",
1536
+ "id": "src/components/ic-data-table/ic-data-table.types.tsx::IcSortEventDetail"
1537
+ }
1538
+ }
1539
+ }
1540
+ }];
1541
+ }
1542
+ static get methods() {
1543
+ return {
1544
+ "resetRowHeights": {
1545
+ "complexType": {
1546
+ "signature": "(rowHeight?: number | \"auto\") => Promise<void>",
1547
+ "parameters": [{
1548
+ "name": "rowHeight",
1549
+ "type": "number | \"auto\"",
1550
+ "docs": ""
1551
+ }],
1552
+ "references": {
1553
+ "Promise": {
1554
+ "location": "global",
1555
+ "id": "global::Promise"
1556
+ }
1557
+ },
1558
+ "return": "Promise<void>"
1559
+ },
1560
+ "docs": {
1561
+ "text": "Resets the `globalRowHeight` prop to number or auto and sets the `variableRowHeight` prop to `null`.",
1562
+ "tags": []
1563
+ }
1564
+ }
514
1565
  };
515
1566
  }
516
1567
  static get elementRef() { return "el"; }
1568
+ static get watchers() {
1569
+ return [{
1570
+ "propName": "loading",
1571
+ "methodName": "loadingHandler"
1572
+ }, {
1573
+ "propName": "truncationPattern",
1574
+ "methodName": "truncationPatternHandler"
1575
+ }, {
1576
+ "propName": "data",
1577
+ "methodName": "dataHandler"
1578
+ }, {
1579
+ "propName": "density",
1580
+ "methodName": "densityHandler"
1581
+ }, {
1582
+ "propName": "globalRowHeight",
1583
+ "methodName": "rowHeightChangeHandler"
1584
+ }, {
1585
+ "propName": "variableRowHeight",
1586
+ "methodName": "rowHeightChangeHandler"
1587
+ }];
1588
+ }
517
1589
  static get listeners() {
518
1590
  return [{
519
- "name": "icItemsPerPageChange",
520
- "method": "handleItemsPerPageChange",
1591
+ "name": "typographyTruncationExpandToggle",
1592
+ "method": "handleTypographyTruncationExpandToggle",
521
1593
  "target": undefined,
522
1594
  "capture": false,
523
1595
  "passive": false
@@ -527,6 +1599,18 @@ export class DataTable {
527
1599
  "target": undefined,
528
1600
  "capture": false,
529
1601
  "passive": false
1602
+ }, {
1603
+ "name": "icItemsPerPageChange",
1604
+ "method": "handleItemsPerPageChange",
1605
+ "target": undefined,
1606
+ "capture": false,
1607
+ "passive": false
1608
+ }, {
1609
+ "name": "icTableDensityUpdate",
1610
+ "method": "handleDensityChange",
1611
+ "target": undefined,
1612
+ "capture": false,
1613
+ "passive": false
530
1614
  }, {
531
1615
  "name": "click",
532
1616
  "method": "clickListener",