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

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