@ukic/canary-web-components 2.0.0-canary.13 → 2.0.0-canary.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (479) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-6acbb97e.js → helpers-191dca49.js} +56 -89
  3. package/dist/cjs/helpers-191dca49.js.map +1 -0
  4. package/dist/cjs/{helpers-f75cf7cf.js → helpers-765a5118.js} +30 -1
  5. package/dist/cjs/helpers-765a5118.js.map +1 -0
  6. package/dist/cjs/ic-accordion-group.cjs.entry.js +3 -1
  7. package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
  8. package/dist/cjs/ic-accordion.cjs.entry.js +1 -1
  9. package/dist/cjs/ic-alert.cjs.entry.js +1 -1
  10. package/dist/cjs/ic-back-to-top.cjs.entry.js +15 -9
  11. package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ic-badge.cjs.entry.js +55 -84
  13. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  14. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +3 -1
  15. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  17. package/dist/cjs/ic-button_3.cjs.entry.js +35 -86
  18. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ic-card.cjs.entry.js +1 -1
  20. package/dist/cjs/ic-checkbox-group.cjs.entry.js +23 -16
  21. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  22. package/dist/cjs/ic-checkbox.cjs.entry.js +32 -30
  23. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  24. package/dist/cjs/ic-chip.cjs.entry.js +34 -21
  25. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -1
  26. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  27. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +57 -0
  28. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js.map +1 -0
  29. package/dist/cjs/ic-data-table.cjs.entry.js +154 -31
  30. package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
  31. package/dist/cjs/ic-date-input.cjs.entry.js +6 -6
  32. package/dist/cjs/ic-date-input.cjs.entry.js.map +1 -1
  33. package/dist/cjs/ic-date-picker.cjs.entry.js +1 -1
  34. package/dist/cjs/ic-dialog.cjs.entry.js +1 -1
  35. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  36. package/dist/cjs/ic-empty-state_2.cjs.entry.js +322 -0
  37. package/dist/cjs/ic-empty-state_2.cjs.entry.js.map +1 -0
  38. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  39. package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
  40. package/dist/cjs/ic-footer.cjs.entry.js +1 -1
  41. package/dist/cjs/ic-hero.cjs.entry.js +1 -1
  42. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +1 -1
  43. package/dist/cjs/ic-input-component-container_4.cjs.entry.js +1 -1
  44. package/dist/cjs/ic-link.cjs.entry.js +34 -16
  45. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  46. package/dist/cjs/ic-menu-group.cjs.entry.js +1 -1
  47. package/dist/cjs/ic-menu-item.cjs.entry.js +2 -2
  48. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  49. package/dist/cjs/ic-menu-with-multi.cjs.entry.js +176 -35
  50. package/dist/cjs/ic-menu-with-multi.cjs.entry.js.map +1 -1
  51. package/dist/cjs/ic-menu.cjs.entry.js +3 -3
  52. package/dist/cjs/ic-menu.cjs.entry.js.map +1 -1
  53. package/dist/cjs/ic-navigation-button.cjs.entry.js +26 -5
  54. package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
  55. package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
  56. package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
  57. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  58. package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
  59. package/dist/cjs/ic-pagination_4.cjs.entry.js +58 -17
  60. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  61. package/dist/cjs/ic-popover-menu.cjs.entry.js +3 -2
  62. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  63. package/dist/cjs/ic-radio-group.cjs.entry.js +40 -26
  64. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  65. package/dist/cjs/ic-radio-option.cjs.entry.js +9 -4
  66. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  67. package/dist/cjs/ic-search-bar.cjs.entry.js +1 -1
  68. package/dist/cjs/ic-select-with-multi.cjs.entry.js +1 -1
  69. package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
  70. package/dist/cjs/ic-status-tag.cjs.entry.js +1 -1
  71. package/dist/cjs/ic-step.cjs.entry.js +5 -2
  72. package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
  73. package/dist/cjs/ic-stepper.cjs.entry.js +2 -1
  74. package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
  75. package/dist/cjs/ic-switch.cjs.entry.js +1 -1
  76. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  77. package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
  78. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  79. package/dist/cjs/ic-theme.cjs.entry.js +13 -22
  80. package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
  81. package/dist/cjs/ic-toast.cjs.entry.js +1 -1
  82. package/dist/cjs/ic-toggle-button.cjs.entry.js +1 -1
  83. package/dist/cjs/ic-top-navigation.cjs.entry.js +1 -1
  84. package/dist/cjs/ic-typography.cjs.entry.js +2 -2
  85. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  86. package/dist/cjs/index-4cf27b16.js +8 -8
  87. package/dist/cjs/loader.cjs.js +1 -1
  88. package/dist/collection/collection-manifest.json +1 -0
  89. package/dist/collection/components/ic-data-table/ic-data-table.css +76 -1
  90. package/dist/collection/components/ic-data-table/ic-data-table.js +368 -43
  91. package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
  92. package/dist/collection/components/ic-data-table/ic-data-table.types.js.map +1 -1
  93. package/dist/collection/components/ic-data-table/story-data.js +258 -0
  94. package/dist/collection/components/ic-data-table/story-data.js.map +1 -1
  95. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js +320 -1
  96. package/dist/collection/components/ic-data-table/test/basic/ic-data-table.spec.js.map +1 -1
  97. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.css +91 -0
  98. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js +160 -0
  99. package/dist/collection/components/ic-data-table-title-bar/ic-data-table-title-bar.js.map +1 -0
  100. package/dist/collection/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.js +11 -0
  101. package/dist/collection/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.js.map +1 -0
  102. package/dist/collection/components/ic-data-table-title-bar/test/basic/ic-data-table-title-bar.spec.js +70 -0
  103. package/dist/collection/components/ic-data-table-title-bar/test/basic/ic-data-table-title-bar.spec.js.map +1 -0
  104. package/dist/collection/components/ic-date-input/ic-date-input.css +1 -1
  105. package/dist/collection/components/ic-date-input/ic-date-input.js +4 -4
  106. package/dist/collection/components/ic-date-input/ic-date-input.js.map +1 -1
  107. package/dist/collection/components/ic-menu-with-multi/ic-menu.js +176 -35
  108. package/dist/collection/components/ic-menu-with-multi/ic-menu.js.map +1 -1
  109. package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js +180 -3
  110. package/dist/collection/components/ic-menu-with-multi/test/basic/ic-menu.spec.js.map +1 -1
  111. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +145 -116
  112. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
  113. package/dist/collection/components/ic-pagination-bar/test/basic/ic-pagination-bar.spec.js +47 -10
  114. package/dist/collection/components/ic-pagination-bar/test/basic/ic-pagination-bar.spec.js.map +1 -1
  115. package/dist/collection/utils/types.js.map +1 -1
  116. package/dist/components/helpers.js +55 -87
  117. package/dist/components/helpers.js.map +1 -1
  118. package/dist/components/helpers2.js +28 -1
  119. package/dist/components/helpers2.js.map +1 -1
  120. package/dist/components/ic-accordion-group.js +2 -1
  121. package/dist/components/ic-accordion-group.js.map +1 -1
  122. package/dist/components/ic-back-to-top.js +22 -9
  123. package/dist/components/ic-back-to-top.js.map +1 -1
  124. package/dist/components/ic-badge.js +59 -84
  125. package/dist/components/ic-badge.js.map +1 -1
  126. package/dist/components/ic-breadcrumb-group.js +2 -0
  127. package/dist/components/ic-breadcrumb-group.js.map +1 -1
  128. package/dist/components/ic-button2.js +33 -84
  129. package/dist/components/ic-button2.js.map +1 -1
  130. package/dist/components/ic-card.js +1 -1
  131. package/dist/components/ic-checkbox-group.js +27 -17
  132. package/dist/components/ic-checkbox-group.js.map +1 -1
  133. package/dist/components/ic-checkbox.js +32 -30
  134. package/dist/components/ic-checkbox.js.map +1 -1
  135. package/dist/components/ic-chip.js +39 -23
  136. package/dist/components/ic-chip.js.map +1 -1
  137. package/dist/components/ic-data-table-title-bar.d.ts +11 -0
  138. package/dist/components/ic-data-table-title-bar.js +136 -0
  139. package/dist/components/ic-data-table-title-bar.js.map +1 -0
  140. package/dist/components/ic-data-table.js +179 -37
  141. package/dist/components/ic-data-table.js.map +1 -1
  142. package/dist/components/ic-date-input2.js +6 -6
  143. package/dist/components/ic-date-input2.js.map +1 -1
  144. package/dist/components/ic-date-picker.js +1 -1
  145. package/dist/components/ic-divider2.js +1 -1
  146. package/dist/components/ic-empty-state.js +1 -57
  147. package/dist/components/ic-empty-state.js.map +1 -1
  148. package/dist/{esm/ic-empty-state.entry.js → components/ic-empty-state2.js} +38 -11
  149. package/dist/components/ic-empty-state2.js.map +1 -0
  150. package/dist/components/ic-footer-link-group.js +1 -1
  151. package/dist/components/ic-footer-link.js +1 -1
  152. package/dist/components/ic-footer.js +1 -1
  153. package/dist/components/ic-hero.js +1 -1
  154. package/dist/components/ic-horizontal-scroll2.js +1 -1
  155. package/dist/components/ic-link2.js +35 -17
  156. package/dist/components/ic-link2.js.map +1 -1
  157. package/dist/components/ic-loading-indicator2.js +1 -1
  158. package/dist/components/ic-loading-indicator2.js.map +1 -1
  159. package/dist/components/ic-menu-item2.js +2 -2
  160. package/dist/components/ic-menu-item2.js.map +1 -1
  161. package/dist/components/ic-menu2.js +2 -2
  162. package/dist/components/ic-menu2.js.map +1 -1
  163. package/dist/components/ic-menu3.js +177 -36
  164. package/dist/components/ic-menu3.js.map +1 -1
  165. package/dist/components/ic-navigation-button.js +27 -6
  166. package/dist/components/ic-navigation-button.js.map +1 -1
  167. package/dist/components/ic-navigation-group.js +1 -1
  168. package/dist/components/ic-navigation-item.js +1 -1
  169. package/dist/components/ic-navigation-menu2.js +1 -1
  170. package/dist/components/ic-pagination-bar2.js +126 -99
  171. package/dist/components/ic-pagination-bar2.js.map +1 -1
  172. package/dist/components/ic-pagination-item2.js +2 -2
  173. package/dist/components/ic-pagination-item2.js.map +1 -1
  174. package/dist/components/ic-pagination2.js +1 -1
  175. package/dist/components/ic-popover-menu.js +3 -2
  176. package/dist/components/ic-popover-menu.js.map +1 -1
  177. package/dist/components/ic-radio-group.js +40 -26
  178. package/dist/components/ic-radio-group.js.map +1 -1
  179. package/dist/components/ic-radio-option.js +11 -5
  180. package/dist/components/ic-radio-option.js.map +1 -1
  181. package/dist/components/ic-search-bar.js +1 -1
  182. package/dist/components/ic-select-with-multi.js +1 -1
  183. package/dist/components/ic-select2.js +33 -11
  184. package/dist/components/ic-select2.js.map +1 -1
  185. package/dist/components/ic-side-navigation.js +1 -1
  186. package/dist/components/ic-step.js +4 -1
  187. package/dist/components/ic-step.js.map +1 -1
  188. package/dist/components/ic-stepper.js +3 -1
  189. package/dist/components/ic-stepper.js.map +1 -1
  190. package/dist/components/ic-switch.js +1 -1
  191. package/dist/components/ic-tab.js +1 -1
  192. package/dist/components/ic-text-field2.js +27 -8
  193. package/dist/components/ic-text-field2.js.map +1 -1
  194. package/dist/components/ic-theme.js +13 -22
  195. package/dist/components/ic-theme.js.map +1 -1
  196. package/dist/components/ic-toast.js +1 -1
  197. package/dist/components/ic-toggle-button.js +1 -1
  198. package/dist/components/ic-tooltip2.js +1 -1
  199. package/dist/components/ic-tooltip2.js.map +1 -1
  200. package/dist/components/ic-top-navigation.js +1 -1
  201. package/dist/components/ic-typography2.js +1 -1
  202. package/dist/components/ic-typography2.js.map +1 -1
  203. package/dist/core/core.css +2 -2
  204. package/dist/core/core.esm.js +1 -1
  205. package/dist/core/core.esm.js.map +1 -1
  206. package/dist/core/{p-b3d21d06.entry.js → p-005e83b0.entry.js} +2 -2
  207. package/dist/core/{p-b8a3b16d.entry.js → p-05df3901.entry.js} +2 -2
  208. package/dist/core/{p-3d0185a4.entry.js → p-0646ef0c.entry.js} +2 -2
  209. package/dist/core/p-0ec09955.entry.js +2 -0
  210. package/dist/core/p-0ec09955.entry.js.map +1 -0
  211. package/dist/core/p-114bea92.entry.js +2 -0
  212. package/dist/core/p-114bea92.entry.js.map +1 -0
  213. package/dist/core/p-11bbb09c.js +2 -0
  214. package/dist/core/p-11bbb09c.js.map +1 -0
  215. package/dist/core/p-11e736a3.entry.js +2 -0
  216. package/dist/core/p-11e736a3.entry.js.map +1 -0
  217. package/dist/core/{p-e0e26834.entry.js → p-16c82b13.entry.js} +2 -2
  218. package/dist/core/{p-094a0455.entry.js → p-1b35b6af.entry.js} +2 -2
  219. package/dist/core/p-1cf8a04e.entry.js +2 -0
  220. package/dist/core/p-1cf8a04e.entry.js.map +1 -0
  221. package/dist/core/{p-849f43c3.entry.js → p-2170f59e.entry.js} +2 -2
  222. package/dist/core/p-2e167ebb.entry.js +2 -0
  223. package/dist/core/p-2e167ebb.entry.js.map +1 -0
  224. package/dist/core/p-3f20608d.entry.js +2 -0
  225. package/dist/core/p-3f20608d.entry.js.map +1 -0
  226. package/dist/core/p-41606de1.entry.js +2 -0
  227. package/dist/core/p-41606de1.entry.js.map +1 -0
  228. package/dist/core/{p-8b1d128c.entry.js → p-4415c93f.entry.js} +2 -2
  229. package/dist/core/{p-6b68ee01.entry.js → p-457dd939.entry.js} +2 -2
  230. package/dist/core/p-457dd939.entry.js.map +1 -0
  231. package/dist/core/{p-04f46dac.entry.js → p-4737844f.entry.js} +2 -2
  232. package/dist/core/p-4737844f.entry.js.map +1 -0
  233. package/dist/core/{p-8ef85b15.entry.js → p-53374a27.entry.js} +2 -2
  234. package/dist/core/{p-7c8f85fd.entry.js → p-53e45d51.entry.js} +2 -2
  235. package/dist/core/{p-0707f2fc.entry.js → p-593f0318.entry.js} +2 -2
  236. package/dist/core/{p-aabab75f.entry.js → p-5d5979fa.entry.js} +2 -2
  237. package/dist/core/{p-c7b52046.entry.js → p-66af5958.entry.js} +2 -2
  238. package/dist/core/p-67b0faac.entry.js +2 -0
  239. package/dist/core/p-67b0faac.entry.js.map +1 -0
  240. package/dist/core/p-6b277e09.entry.js +2 -0
  241. package/dist/core/p-6b277e09.entry.js.map +1 -0
  242. package/dist/core/{p-2ec33c00.entry.js → p-72cea8fd.entry.js} +2 -2
  243. package/dist/core/p-73dad5cf.entry.js +2 -0
  244. package/dist/core/p-73dad5cf.entry.js.map +1 -0
  245. package/dist/core/{p-05d0ac42.entry.js → p-85e2a9af.entry.js} +2 -2
  246. package/dist/core/p-85e2a9af.entry.js.map +1 -0
  247. package/dist/core/{p-bbcd6d06.entry.js → p-872c3555.entry.js} +2 -2
  248. package/dist/core/{p-dae1779d.entry.js → p-87743c4a.entry.js} +2 -2
  249. package/dist/core/{p-55d819a6.entry.js → p-8cfc74da.entry.js} +2 -2
  250. package/dist/core/{p-bf316546.entry.js → p-9729086f.entry.js} +2 -2
  251. package/dist/core/{p-f4965c26.entry.js → p-9cc19e91.entry.js} +2 -2
  252. package/dist/core/{p-da578abf.entry.js → p-9de20265.entry.js} +2 -2
  253. package/dist/core/p-a088373e.entry.js +2 -0
  254. package/dist/core/p-a088373e.entry.js.map +1 -0
  255. package/dist/core/{p-169dcfdd.entry.js → p-a0e42564.entry.js} +2 -2
  256. package/dist/core/p-a8110c27.entry.js +2 -0
  257. package/dist/core/p-a8110c27.entry.js.map +1 -0
  258. package/dist/core/{p-f9fcdd21.entry.js → p-a9d07792.entry.js} +2 -2
  259. package/dist/core/p-a9d07792.entry.js.map +1 -0
  260. package/dist/core/{p-66b8f0a7.entry.js → p-b08f4371.entry.js} +2 -2
  261. package/dist/core/{p-a9ed6a71.entry.js → p-b79c0631.entry.js} +2 -2
  262. package/dist/core/p-b79c0631.entry.js.map +1 -0
  263. package/dist/core/p-b8247636.entry.js +2 -0
  264. package/dist/core/p-b8247636.entry.js.map +1 -0
  265. package/dist/core/{p-fdd8f3a5.entry.js → p-badfdf2a.entry.js} +2 -2
  266. package/dist/core/p-be56fa17.entry.js +2 -0
  267. package/dist/core/{p-31800427.entry.js.map → p-be56fa17.entry.js.map} +1 -1
  268. package/dist/core/{p-ed7379e3.entry.js → p-bebf535f.entry.js} +2 -2
  269. package/dist/core/p-c07cef0e.js +2 -0
  270. package/dist/core/p-c07cef0e.js.map +1 -0
  271. package/dist/core/p-c0d88af8.entry.js +2 -0
  272. package/dist/core/p-c0d88af8.entry.js.map +1 -0
  273. package/dist/core/p-c3af5dab.entry.js +2 -0
  274. package/dist/core/p-c3af5dab.entry.js.map +1 -0
  275. package/dist/core/{p-981b6f12.entry.js → p-c3dabce4.entry.js} +2 -2
  276. package/dist/core/{p-bcfbd465.entry.js → p-c7e932b5.entry.js} +2 -2
  277. package/dist/core/{p-1a4bce88.entry.js → p-d09aaa5b.entry.js} +2 -2
  278. package/dist/core/{p-3f4c408a.entry.js → p-d59a72a9.entry.js} +2 -2
  279. package/dist/core/p-d59a72a9.entry.js.map +1 -0
  280. package/dist/core/{p-1170c02d.entry.js → p-d71e9cb5.entry.js} +2 -2
  281. package/dist/core/{p-b612d68b.entry.js → p-ecd6d123.entry.js} +2 -2
  282. package/dist/core/p-ecd6d123.entry.js.map +1 -0
  283. package/dist/core/p-ee52a11a.entry.js +2 -0
  284. package/dist/core/p-ee52a11a.entry.js.map +1 -0
  285. package/dist/core/p-f11597df.entry.js +2 -0
  286. package/dist/core/p-f11597df.entry.js.map +1 -0
  287. package/dist/core/p-f1f3acd2.entry.js +2 -0
  288. package/dist/core/p-f1f3acd2.entry.js.map +1 -0
  289. package/dist/core/{p-e676069e.entry.js → p-f659e5eb.entry.js} +2 -2
  290. package/dist/core/{p-ffa94639.entry.js → p-fc2551c0.entry.js} +2 -2
  291. package/dist/esm/core.js +1 -1
  292. package/dist/esm/{helpers-f328a7b6.js → helpers-8df79303.js} +29 -2
  293. package/dist/esm/helpers-8df79303.js.map +1 -0
  294. package/dist/esm/{helpers-451953f9.js → helpers-da05c476.js} +56 -88
  295. package/dist/esm/helpers-da05c476.js.map +1 -0
  296. package/dist/esm/ic-accordion-group.entry.js +3 -1
  297. package/dist/esm/ic-accordion-group.entry.js.map +1 -1
  298. package/dist/esm/ic-accordion.entry.js +1 -1
  299. package/dist/esm/ic-alert.entry.js +1 -1
  300. package/dist/esm/ic-back-to-top.entry.js +15 -9
  301. package/dist/esm/ic-back-to-top.entry.js.map +1 -1
  302. package/dist/esm/ic-badge.entry.js +55 -84
  303. package/dist/esm/ic-badge.entry.js.map +1 -1
  304. package/dist/esm/ic-breadcrumb-group.entry.js +3 -1
  305. package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
  306. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  307. package/dist/esm/ic-button_3.entry.js +35 -86
  308. package/dist/esm/ic-button_3.entry.js.map +1 -1
  309. package/dist/esm/ic-card.entry.js +1 -1
  310. package/dist/esm/ic-checkbox-group.entry.js +23 -16
  311. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  312. package/dist/esm/ic-checkbox.entry.js +32 -30
  313. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  314. package/dist/esm/ic-chip.entry.js +34 -21
  315. package/dist/esm/ic-chip.entry.js.map +1 -1
  316. package/dist/esm/ic-data-row.entry.js +1 -1
  317. package/dist/esm/ic-data-table-title-bar.entry.js +53 -0
  318. package/dist/esm/ic-data-table-title-bar.entry.js.map +1 -0
  319. package/dist/esm/ic-data-table.entry.js +155 -32
  320. package/dist/esm/ic-data-table.entry.js.map +1 -1
  321. package/dist/esm/ic-date-input.entry.js +6 -6
  322. package/dist/esm/ic-date-input.entry.js.map +1 -1
  323. package/dist/esm/ic-date-picker.entry.js +1 -1
  324. package/dist/esm/ic-dialog.entry.js +1 -1
  325. package/dist/esm/ic-divider.entry.js +1 -1
  326. package/dist/esm/ic-empty-state_2.entry.js +317 -0
  327. package/dist/esm/ic-empty-state_2.entry.js.map +1 -0
  328. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  329. package/dist/esm/ic-footer-link.entry.js +1 -1
  330. package/dist/esm/ic-footer.entry.js +1 -1
  331. package/dist/esm/ic-hero.entry.js +1 -1
  332. package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
  333. package/dist/esm/ic-input-component-container_4.entry.js +1 -1
  334. package/dist/esm/ic-link.entry.js +35 -17
  335. package/dist/esm/ic-link.entry.js.map +1 -1
  336. package/dist/esm/ic-menu-group.entry.js +1 -1
  337. package/dist/esm/ic-menu-item.entry.js +2 -2
  338. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  339. package/dist/esm/ic-menu-with-multi.entry.js +176 -35
  340. package/dist/esm/ic-menu-with-multi.entry.js.map +1 -1
  341. package/dist/esm/ic-menu.entry.js +3 -3
  342. package/dist/esm/ic-menu.entry.js.map +1 -1
  343. package/dist/esm/ic-navigation-button.entry.js +27 -6
  344. package/dist/esm/ic-navigation-button.entry.js.map +1 -1
  345. package/dist/esm/ic-navigation-group.entry.js +1 -1
  346. package/dist/esm/ic-navigation-item.entry.js +1 -1
  347. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  348. package/dist/esm/ic-page-header.entry.js +1 -1
  349. package/dist/esm/ic-pagination_4.entry.js +59 -18
  350. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  351. package/dist/esm/ic-popover-menu.entry.js +3 -2
  352. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  353. package/dist/esm/ic-radio-group.entry.js +40 -26
  354. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  355. package/dist/esm/ic-radio-option.entry.js +9 -4
  356. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  357. package/dist/esm/ic-search-bar.entry.js +1 -1
  358. package/dist/esm/ic-select-with-multi.entry.js +1 -1
  359. package/dist/esm/ic-side-navigation.entry.js +1 -1
  360. package/dist/esm/ic-status-tag.entry.js +1 -1
  361. package/dist/esm/ic-step.entry.js +5 -2
  362. package/dist/esm/ic-step.entry.js.map +1 -1
  363. package/dist/esm/ic-stepper.entry.js +2 -1
  364. package/dist/esm/ic-stepper.entry.js.map +1 -1
  365. package/dist/esm/ic-switch.entry.js +1 -1
  366. package/dist/esm/ic-tab-group.entry.js +1 -1
  367. package/dist/esm/ic-tab-panel.entry.js +1 -1
  368. package/dist/esm/ic-tab.entry.js +1 -1
  369. package/dist/esm/ic-theme.entry.js +13 -22
  370. package/dist/esm/ic-theme.entry.js.map +1 -1
  371. package/dist/esm/ic-toast.entry.js +1 -1
  372. package/dist/esm/ic-toggle-button.entry.js +1 -1
  373. package/dist/esm/ic-top-navigation.entry.js +1 -1
  374. package/dist/esm/ic-typography.entry.js +2 -2
  375. package/dist/esm/ic-typography.entry.js.map +1 -1
  376. package/dist/esm/index-93509377.js +8 -8
  377. package/dist/esm/loader.js +1 -1
  378. package/dist/types/components/ic-data-table/ic-data-table.d.ts +79 -3
  379. package/dist/types/components/ic-data-table/ic-data-table.types.d.ts +9 -0
  380. package/dist/types/components/ic-data-table/story-data.d.ts +59 -0
  381. package/dist/types/components/ic-data-table-title-bar/ic-data-table-title-bar.d.ts +36 -0
  382. package/dist/types/components/ic-data-table-title-bar/test/a11y/ic-data-table-title-bar.test.a11y.d.ts +1 -0
  383. package/dist/types/components/ic-menu-with-multi/ic-menu.d.ts +10 -0
  384. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +24 -14
  385. package/dist/types/components.d.ts +207 -28
  386. package/dist/types/utils/types.d.ts +5 -5
  387. package/hydrate/index.js +1445 -1050
  388. package/package.json +3 -3
  389. package/dist/cjs/helpers-6acbb97e.js.map +0 -1
  390. package/dist/cjs/helpers-f75cf7cf.js.map +0 -1
  391. package/dist/cjs/ic-empty-state.cjs.entry.js +0 -38
  392. package/dist/cjs/ic-empty-state.cjs.entry.js.map +0 -1
  393. package/dist/cjs/ic-pagination-bar.cjs.entry.js +0 -269
  394. package/dist/cjs/ic-pagination-bar.cjs.entry.js.map +0 -1
  395. package/dist/collection/components/ic-pagination/ic-pagination.types.js +0 -2
  396. package/dist/collection/components/ic-pagination/ic-pagination.types.js.map +0 -1
  397. package/dist/core/p-04f46dac.entry.js.map +0 -1
  398. package/dist/core/p-05d0ac42.entry.js.map +0 -1
  399. package/dist/core/p-1c3bd46d.entry.js +0 -2
  400. package/dist/core/p-1c3bd46d.entry.js.map +0 -1
  401. package/dist/core/p-28bddd8d.entry.js +0 -2
  402. package/dist/core/p-28bddd8d.entry.js.map +0 -1
  403. package/dist/core/p-31800427.entry.js +0 -2
  404. package/dist/core/p-3b0caac0.js +0 -2
  405. package/dist/core/p-3b0caac0.js.map +0 -1
  406. package/dist/core/p-3f4c408a.entry.js.map +0 -1
  407. package/dist/core/p-4020d7f7.entry.js +0 -2
  408. package/dist/core/p-4020d7f7.entry.js.map +0 -1
  409. package/dist/core/p-402fd288.entry.js +0 -2
  410. package/dist/core/p-402fd288.entry.js.map +0 -1
  411. package/dist/core/p-49449a2d.entry.js +0 -2
  412. package/dist/core/p-49449a2d.entry.js.map +0 -1
  413. package/dist/core/p-4a30b0fc.entry.js +0 -2
  414. package/dist/core/p-4a30b0fc.entry.js.map +0 -1
  415. package/dist/core/p-4b361789.entry.js +0 -2
  416. package/dist/core/p-4b361789.entry.js.map +0 -1
  417. package/dist/core/p-50cfc2bb.entry.js +0 -2
  418. package/dist/core/p-50cfc2bb.entry.js.map +0 -1
  419. package/dist/core/p-58c87b3d.entry.js +0 -2
  420. package/dist/core/p-58c87b3d.entry.js.map +0 -1
  421. package/dist/core/p-623f911f.entry.js +0 -2
  422. package/dist/core/p-623f911f.entry.js.map +0 -1
  423. package/dist/core/p-6b68ee01.entry.js.map +0 -1
  424. package/dist/core/p-7d1381ef.entry.js +0 -2
  425. package/dist/core/p-7d1381ef.entry.js.map +0 -1
  426. package/dist/core/p-925da2d2.entry.js +0 -2
  427. package/dist/core/p-925da2d2.entry.js.map +0 -1
  428. package/dist/core/p-9e3178e8.entry.js +0 -2
  429. package/dist/core/p-9e3178e8.entry.js.map +0 -1
  430. package/dist/core/p-a9ed6a71.entry.js.map +0 -1
  431. package/dist/core/p-b612d68b.entry.js.map +0 -1
  432. package/dist/core/p-c51496ee.entry.js +0 -2
  433. package/dist/core/p-c51496ee.entry.js.map +0 -1
  434. package/dist/core/p-c7590421.entry.js +0 -2
  435. package/dist/core/p-c7590421.entry.js.map +0 -1
  436. package/dist/core/p-cd799087.js +0 -2
  437. package/dist/core/p-cd799087.js.map +0 -1
  438. package/dist/core/p-e189f1d0.entry.js +0 -2
  439. package/dist/core/p-e189f1d0.entry.js.map +0 -1
  440. package/dist/core/p-e30f2623.entry.js +0 -2
  441. package/dist/core/p-e30f2623.entry.js.map +0 -1
  442. package/dist/core/p-f9ee48f7.entry.js +0 -2
  443. package/dist/core/p-f9ee48f7.entry.js.map +0 -1
  444. package/dist/core/p-f9fcdd21.entry.js.map +0 -1
  445. package/dist/esm/helpers-451953f9.js.map +0 -1
  446. package/dist/esm/helpers-f328a7b6.js.map +0 -1
  447. package/dist/esm/ic-empty-state.entry.js.map +0 -1
  448. package/dist/esm/ic-pagination-bar.entry.js +0 -265
  449. package/dist/esm/ic-pagination-bar.entry.js.map +0 -1
  450. package/dist/types/components/ic-pagination/ic-pagination.types.d.ts +0 -6
  451. /package/dist/core/{p-b3d21d06.entry.js.map → p-005e83b0.entry.js.map} +0 -0
  452. /package/dist/core/{p-b8a3b16d.entry.js.map → p-05df3901.entry.js.map} +0 -0
  453. /package/dist/core/{p-3d0185a4.entry.js.map → p-0646ef0c.entry.js.map} +0 -0
  454. /package/dist/core/{p-e0e26834.entry.js.map → p-16c82b13.entry.js.map} +0 -0
  455. /package/dist/core/{p-094a0455.entry.js.map → p-1b35b6af.entry.js.map} +0 -0
  456. /package/dist/core/{p-849f43c3.entry.js.map → p-2170f59e.entry.js.map} +0 -0
  457. /package/dist/core/{p-8b1d128c.entry.js.map → p-4415c93f.entry.js.map} +0 -0
  458. /package/dist/core/{p-8ef85b15.entry.js.map → p-53374a27.entry.js.map} +0 -0
  459. /package/dist/core/{p-7c8f85fd.entry.js.map → p-53e45d51.entry.js.map} +0 -0
  460. /package/dist/core/{p-0707f2fc.entry.js.map → p-593f0318.entry.js.map} +0 -0
  461. /package/dist/core/{p-aabab75f.entry.js.map → p-5d5979fa.entry.js.map} +0 -0
  462. /package/dist/core/{p-c7b52046.entry.js.map → p-66af5958.entry.js.map} +0 -0
  463. /package/dist/core/{p-2ec33c00.entry.js.map → p-72cea8fd.entry.js.map} +0 -0
  464. /package/dist/core/{p-bbcd6d06.entry.js.map → p-872c3555.entry.js.map} +0 -0
  465. /package/dist/core/{p-dae1779d.entry.js.map → p-87743c4a.entry.js.map} +0 -0
  466. /package/dist/core/{p-55d819a6.entry.js.map → p-8cfc74da.entry.js.map} +0 -0
  467. /package/dist/core/{p-bf316546.entry.js.map → p-9729086f.entry.js.map} +0 -0
  468. /package/dist/core/{p-f4965c26.entry.js.map → p-9cc19e91.entry.js.map} +0 -0
  469. /package/dist/core/{p-da578abf.entry.js.map → p-9de20265.entry.js.map} +0 -0
  470. /package/dist/core/{p-169dcfdd.entry.js.map → p-a0e42564.entry.js.map} +0 -0
  471. /package/dist/core/{p-66b8f0a7.entry.js.map → p-b08f4371.entry.js.map} +0 -0
  472. /package/dist/core/{p-fdd8f3a5.entry.js.map → p-badfdf2a.entry.js.map} +0 -0
  473. /package/dist/core/{p-ed7379e3.entry.js.map → p-bebf535f.entry.js.map} +0 -0
  474. /package/dist/core/{p-981b6f12.entry.js.map → p-c3dabce4.entry.js.map} +0 -0
  475. /package/dist/core/{p-bcfbd465.entry.js.map → p-c7e932b5.entry.js.map} +0 -0
  476. /package/dist/core/{p-1a4bce88.entry.js.map → p-d09aaa5b.entry.js.map} +0 -0
  477. /package/dist/core/{p-1170c02d.entry.js.map → p-d71e9cb5.entry.js.map} +0 -0
  478. /package/dist/core/{p-e676069e.entry.js.map → p-f659e5eb.entry.js.map} +0 -0
  479. /package/dist/core/{p-ffa94639.entry.js.map → p-fc2551c0.entry.js.map} +0 -0
@@ -1,14 +1,37 @@
1
- import { h } from "@stencil/core";
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ import { h, Fragment, } from "@stencil/core";
2
3
  import unsortedIcon from "./assets/unsorted-icon.svg";
3
4
  import ascendingIcon from "./assets/ascending-icon.svg";
4
5
  import descendingIcon from "./assets/descending-icon.svg";
6
+ // Unable to import helper functions via @ukic/web-components
7
+ import { getSlotContent, isSlotUsed } from "../../utils/helpers";
8
+ /**
9
+ * @slot empty-state - Content is slotted below the table header when there is no data and the table is not loading.
10
+ * @slot {COLUMN_KEY}-{ROW_INDEX}[-icon] - Each cell should have its own slot, named using the column tag and the row index, allowing for custom elements to be displayed. Include `-icon` at the end for that cell's icon slot.
11
+ * @slot {COLUMN_KEY}-column-icon - The icon slot for a column header.
12
+ * @slot title-bar - A custom ic-data-table-title-bar can be slotted above the column headers to display additional information about the table.
13
+ */
5
14
  export class DataTable {
6
15
  constructor() {
16
+ this.DENSITY_HEIGHT_MULTIPLIER = {
17
+ dense: 0.8,
18
+ default: 1,
19
+ spacious: 1.2,
20
+ };
7
21
  this.SORT_ICONS = {
8
22
  unsorted: unsortedIcon,
9
23
  ascending: ascendingIcon,
10
24
  descending: descendingIcon,
11
25
  };
26
+ this.hasLoadedForOneSecond = true;
27
+ this.startLoadingTimer = () => {
28
+ this.hasLoadedForOneSecond = false;
29
+ this.timerStarted = Date.now();
30
+ setTimeout(() => {
31
+ this.hasLoadedForOneSecond = true;
32
+ this.timerStarted = null;
33
+ }, this.minimumLoadingDisplayDuration);
34
+ };
12
35
  this.isObject = (value) => typeof value === "object";
13
36
  this.notDefaultDensity = () => this.density !== "default";
14
37
  this.getCellContent = (cell, dataType) => {
@@ -26,7 +49,11 @@ export class DataTable {
26
49
  return this.getObjectValue(this.getObjectValue(cell, "cellAlignment"), alignment);
27
50
  }
28
51
  };
29
- this.createCells = (row) => {
52
+ this.createUpdatingIndicator = () => {
53
+ const { appearance, description, max, min, progress } = this.updatingOptions || {};
54
+ return (h("th", { colSpan: this.columns.length, class: "updating-state" }, h("ic-loading-indicator", { appearance: appearance, description: description || "Updating table data", fullWidth: true, max: max, min: min, progress: progress, type: "linear", size: "small" })));
55
+ };
56
+ this.createCells = (row, rowIndex) => {
30
57
  const rowValues = Object.values(row);
31
58
  const rowKeys = Object.keys(row);
32
59
  let rowAlignment;
@@ -37,43 +64,56 @@ export class DataTable {
37
64
  rowEmphasis = this.getObjectValue(rowValues[headerIndex], "emphasis");
38
65
  }
39
66
  return rowValues.map((cell, index) => {
40
- const { columnAlignment, dataType, emphasis } = this.columns[index];
67
+ var _a, _b, _c, _d, _e;
68
+ const columnProps = this.columns[index];
69
+ const cellSlotName = `${columnProps === null || columnProps === void 0 ? void 0 : columnProps.key}-${rowIndex}`;
70
+ const hasIcon = this.isObject(cell) && Object.keys(cell).includes("icon");
41
71
  const cellValue = (key) => this.getObjectValue(cell, key);
42
72
  return rowKeys[index] === "header" ? (h("th", { scope: "row", colSpan: cellValue("colspan"), class: {
43
73
  ["row-header"]: true,
44
74
  [`row-header-alignment-${cellValue("cellAlignment")}`]: !!cellValue("cellAlignment"),
45
75
  ["row-header-sticky"]: this.stickyRowHeaders,
46
- } }, cellValue("title"))) : (h("td", { innerHTML: dataType === "element" ? cell : null, class: {
76
+ } }, cellValue("title"))) : (h("td", { class: {
47
77
  ["table-cell"]: true,
48
78
  [`table-density-${this.density}`]: this.notDefaultDensity(),
49
- [`data-type-${dataType}`]: true,
50
- [`cell-alignment-${(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.horizontal) ||
51
- this.getCellAlignment(cell, "horizontal")}`]: !!(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.horizontal) ||
52
- !!this.getCellAlignment(cell, "horizontal"),
53
- [`cell-alignment-${(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.vertical) ||
79
+ [`data-type-${columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType}`]: true,
80
+ [`cell-alignment-${((_a = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _a === void 0 ? void 0 : _a.vertical) ||
54
81
  rowAlignment ||
55
- this.getCellAlignment(cell, "vertical")}`]: !!(columnAlignment === null || columnAlignment === void 0 ? void 0 : columnAlignment.vertical) ||
82
+ this.getCellAlignment(cell, "vertical")}`]: !!((_b = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _b === void 0 ? void 0 : _b.vertical) ||
56
83
  !!rowAlignment ||
57
84
  !!this.getCellAlignment(cell, "vertical"),
58
- } }, h("ic-typography", { variant: "body", class: {
85
+ } }, h("div", { innerHTML: (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) === "element" &&
86
+ !isSlotUsed(this.el, cellSlotName)
87
+ ? cell
88
+ : null, class: {
89
+ "cell-container": (columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType) !== "element",
90
+ [`data-type-${columnProps === null || columnProps === void 0 ? void 0 : columnProps.dataType}`]: true,
91
+ [`cell-alignment-${((_c = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _c === void 0 ? void 0 : _c.horizontal) ||
92
+ this.getCellAlignment(cell, "horizontal")}`]: !!((_d = columnProps === null || columnProps === void 0 ? void 0 : columnProps.columnAlignment) === null || _d === void 0 ? void 0 : _d.horizontal) ||
93
+ !!this.getCellAlignment(cell, "horizontal"),
94
+ } }, isSlotUsed(this.el, cellSlotName) ? (h("slot", { name: cellSlotName })) : (h(Fragment, null, isSlotUsed(this.el, `${cellSlotName}-icon`) ? (h("slot", { name: `${cellSlotName}-icon` })) : ((hasIcon || ((_e = columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon) === null || _e === void 0 ? void 0 : _e.onAllCells)) && (h("span", { class: "icon", innerHTML: cellValue("icon") || (columnProps === null || columnProps === void 0 ? void 0 : columnProps.icon.icon) }))), h("ic-typography", { variant: "body", class: {
59
95
  [`cell-emphasis-${(this.isObject(cell) && cellValue("emphasis")) ||
60
- emphasis ||
96
+ (columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
61
97
  rowEmphasis}`]: (this.isObject(cell) && !!cellValue("emphasis")) ||
62
- !!emphasis ||
98
+ !!(columnProps === null || columnProps === void 0 ? void 0 : columnProps.emphasis) ||
63
99
  !!rowEmphasis,
64
100
  [`text-${this.density}`]: this.notDefaultDensity(),
65
- } }, this.isObject(cell) && dataType !== "date" ? (Object.keys(cell).includes("href") ? (h("ic-link", { href: cellValue("href") }, cellValue("data"))) : (cellValue("data"))) : (this.getCellContent(cell, dataType)))));
101
+ } }, this.isObject(cell) && (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))))))));
66
102
  });
67
103
  };
68
104
  this.createColumnHeaders = () => {
69
- return this.columns.map(({ cellAlignment, colspan, key, title }) => (h("th", { scope: "col", class: {
105
+ return this.columns.map(({ cellAlignment, colspan, icon, key, title }) => (h("th", { scope: "col", class: {
70
106
  ["column-header"]: true,
71
- [`column-header-alignment-${cellAlignment}`]: !!cellAlignment,
72
107
  [`table-density-${this.density}`]: this.notDefaultDensity(),
73
- }, colSpan: colspan }, this.sortable ? (h("div", { class: "column-header-inner-container" }, h("ic-typography", { variant: "body", class: {
108
+ ["updating-state-headers"]: this.updating && !this.loading,
109
+ }, colSpan: colspan }, h("div", { class: {
110
+ "column-header-inner-container": true,
111
+ [`column-header-alignment-${cellAlignment}`]: !!cellAlignment,
112
+ } }, isSlotUsed(this.el, `${key}-column-icon`) ? (h("slot", { name: `${key}-column-icon` })) : (icon &&
113
+ !icon.hideOnHeader && (h("span", { class: "icon", innerHTML: icon.icon }))), h("ic-typography", { variant: "body", class: {
74
114
  ["column-header-text"]: true,
75
115
  [`text-${this.density}`]: this.notDefaultDensity(),
76
- } }, title), h("ic-button", { variant: "icon", id: `sort-button-${key}`, "aria-label": this.getSortButtonLabel(key),
116
+ } }, title), this.sortable && (h("ic-button", { variant: "icon", id: `sort-button-${key}`, "aria-label": this.getSortButtonLabel(key),
77
117
  // eslint-disable-next-line react/jsx-no-bind
78
118
  onClick: () => this.sortRows(key), innerHTML: this.SORT_ICONS[this.sortedColumn === key
79
119
  ? this.sortedColumnOrder
@@ -81,21 +121,48 @@ export class DataTable {
81
121
  ["sort-button"]: true,
82
122
  ["sort-button-unsorted"]: this.sortedColumn !== key ||
83
123
  this.sortedColumnOrder === "unsorted",
84
- } }))) : (h("ic-typography", { variant: "body", class: {
85
- ["column-header-text"]: true,
86
- [`text-${this.density}`]: this.notDefaultDensity(),
87
- } }, title)))));
124
+ } }))))));
88
125
  };
89
126
  this.createRows = () => {
90
127
  const data = this.showPagination
91
128
  ? this.data.slice(this.fromRow, this.toRow)
92
129
  : this.data.slice();
130
+ /**
131
+ * Ensures that createCells has a value in data to map over to actually render the slot.
132
+ * Removes the need for the user to add it multiple times.
133
+ */
134
+ this.columns.forEach(({ key }) => {
135
+ data.forEach((row, rowIndex) => {
136
+ const cellSlotName = `${key}-${rowIndex}`;
137
+ if (isSlotUsed(this.el, cellSlotName)) {
138
+ row[key] = getSlotContent(this.el, cellSlotName);
139
+ }
140
+ });
141
+ });
93
142
  return data
94
143
  .sort(!this.sortable ? undefined : this.getSortFunction())
95
- .map((row) => (h("tr", { onClick: () => (this.selectedRow = this.selectedRow !== row && row), class: {
96
- ["table-row"]: true,
97
- ["table-row-selected"]: this.selectedRow === row,
98
- } }, this.createCells(row))));
144
+ .map((row, index) => {
145
+ var _a;
146
+ const variableRowHeightVal = (_a = this.variableRowHeight) === null || _a === void 0 ? void 0 : _a.call(this, Object.assign(Object.assign({}, row), { index }));
147
+ const findRowHeight = variableRowHeightVal
148
+ ? variableRowHeightVal !== "auto" && variableRowHeightVal
149
+ : this.globalRowHeight !== "auto" && this.globalRowHeight;
150
+ return (h("tr", {
151
+ // eslint-disable-next-line react/jsx-no-bind
152
+ onClick: () => (this.selectedRow =
153
+ this.selectedRow !== row &&
154
+ !this.loading &&
155
+ !this.updating &&
156
+ row), class: {
157
+ ["table-row"]: true,
158
+ ["table-row-selected"]: this.selectedRow === row,
159
+ }, style: {
160
+ height: findRowHeight
161
+ ? `${findRowHeight * this.DENSITY_HEIGHT_MULTIPLIER[this.density]}px`
162
+ : null,
163
+ }
164
+ }, this.createCells(row, index)));
165
+ });
99
166
  };
100
167
  this.getObjectValue = (cell, key) => {
101
168
  return Object.values(cell)[Object.keys(cell).indexOf(key)];
@@ -173,15 +240,19 @@ export class DataTable {
173
240
  this.data = undefined;
174
241
  this.density = "default";
175
242
  this.embedded = false;
243
+ this.globalRowHeight = 40;
176
244
  this.hideColumnHeaders = false;
245
+ this.loading = false;
246
+ this.loadingOptions = undefined;
247
+ this.minimumLoadingDisplayDuration = 1000;
177
248
  this.paginationOptions = {
178
249
  itemsPerPage: [
179
250
  { label: "10", value: "10" },
180
251
  { label: "25", value: "25" },
181
252
  { label: "50", value: "50" },
182
253
  ],
183
- type: "page",
184
- control: "simple",
254
+ rangeLabelType: "page",
255
+ type: "simple",
185
256
  itemsPerPageControl: true,
186
257
  goToPageControl: true,
187
258
  alignment: "right",
@@ -194,13 +265,18 @@ export class DataTable {
194
265
  };
195
266
  this.stickyColumnHeaders = false;
196
267
  this.stickyRowHeaders = false;
268
+ this.updating = false;
269
+ this.updatingOptions = undefined;
270
+ this.variableRowHeight = undefined;
197
271
  }
198
272
  componentWillLoad() {
273
+ var _a;
199
274
  this.rowsPerPage = Number(this.paginationOptions.itemsPerPage[0].value);
200
275
  this.previousRowsPerPage = this.rowsPerPage;
201
276
  this.toRow = this.rowsPerPage;
202
277
  this.sortedColumn = this.sortOptions.defaultColumn;
203
278
  this.sortedColumnOrder = this.sortOptions.sortOrders[0];
279
+ this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: ((_a = this.data) === null || _a === void 0 ? void 0 : _a.length) > 0 });
204
280
  }
205
281
  componentDidLoad() {
206
282
  const tableElement = this.el.shadowRoot.querySelector("table");
@@ -209,6 +285,10 @@ export class DataTable {
209
285
  (tableElement === null || tableElement === void 0 ? void 0 : tableElement.clientWidth) > (tableContainer === null || tableContainer === void 0 ? void 0 : tableContainer.clientWidth)) {
210
286
  this.scrollable = true;
211
287
  }
288
+ if (this.loading) {
289
+ this.startLoadingTimer();
290
+ this.showLoadingIndicator();
291
+ }
212
292
  }
213
293
  handleItemsPerPageChange(ev) {
214
294
  this.previousRowsPerPage = this.rowsPerPage;
@@ -229,19 +309,63 @@ export class DataTable {
229
309
  this.previousRowsPerPage = this.rowsPerPage;
230
310
  }
231
311
  }
312
+ handleDensityChange(ev) {
313
+ this.density = ev.detail.value;
314
+ }
232
315
  clickListener(ev) {
233
316
  if (ev.target !== this.el)
234
317
  this.selectedRow = undefined;
235
318
  }
319
+ loadingHandler(newValue) {
320
+ if (newValue)
321
+ this.startLoadingTimer();
322
+ if (this.loading) {
323
+ setTimeout(() => {
324
+ this.showLoadingIndicator();
325
+ }, 500);
326
+ }
327
+ }
328
+ dataHandler(newData) {
329
+ this.loadingOptions = Object.assign(Object.assign({}, this.loadingOptions), { showBackground: (newData === null || newData === void 0 ? void 0 : newData.length) > 0 });
330
+ if (this.loading) {
331
+ !this.hasLoadedForOneSecond
332
+ ? setTimeout(() => (this.loading = false), this.minimumLoadingDisplayDuration -
333
+ (Date.now() - this.timerStarted))
334
+ : (this.loading = false);
335
+ }
336
+ if (this.updating)
337
+ this.updating = false;
338
+ }
339
+ rowHeightChangeHandler() {
340
+ this.icRowHeightChange.emit();
341
+ }
342
+ /**
343
+ * Resets the `globalRowHeight` prop to `40px` and sets the `variableRowHeight` prop to `null`.
344
+ */
345
+ async resetRowHeights() {
346
+ this.globalRowHeight = 40;
347
+ this.variableRowHeight = null;
348
+ }
349
+ showLoadingIndicator() {
350
+ this.loadingIndicator.classList.add("show");
351
+ }
236
352
  render() {
237
- const { caption, createColumnHeaders, createRows, data, hideColumnHeaders, paginationOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, } = this;
238
- return (h("div", { class: "table-container" }, h("div", { class: {
353
+ const { caption, createColumnHeaders, createRows, createUpdatingIndicator, data, hideColumnHeaders, loading, loadingOptions, paginationOptions, scrollable, scrollOffset, showPagination, sortable, sortedColumnOrder, sortedColumn, stickyColumnHeaders, updateScrollOffset, updating, } = this;
354
+ return (h("div", { class: "table-container" }, isSlotUsed(this.el, "title-bar") && h("slot", { name: "title-bar" }), h("div", { class: {
239
355
  ["table-row-container"]: true,
240
356
  scrollable,
241
357
  }, tabIndex: scrollable ? 0 : null, onScroll: updateScrollOffset }, h("table", null, h("caption", { class: "table-caption" }, caption), !hideColumnHeaders && (h("thead", { class: {
242
358
  ["column-header-sticky"]: stickyColumnHeaders,
243
359
  ["column-header-overlay"]: stickyColumnHeaders && scrollOffset !== 0,
244
- } }, h("tr", null, createColumnHeaders()))), (data === null || data === void 0 ? void 0 : data.length) > 0 && h("tbody", null, createRows()))), showPagination && (h("div", { class: "pagination-container" }, h("ic-pagination-bar", { totalItems: data.length, paginationType: paginationOptions.type, paginationControl: paginationOptions.control, showItemsPerPageControl: paginationOptions.itemsPerPageControl, showGoToPageControl: paginationOptions.goToPageControl, itemsPerPageOptions: paginationOptions.itemsPerPage, alignment: paginationOptions.alignment }))), sortable && (h("div", { class: "screen-reader-sort-text", "aria-live": "polite" }, sortedColumnOrder !== "unsorted" && sortedColumn
360
+ } }, h("tr", null, createColumnHeaders()))), updating &&
361
+ !loading &&
362
+ (hideColumnHeaders ? (h("thead", null, createUpdatingIndicator())) : (createUpdatingIndicator())), (data === null || data === void 0 ? void 0 : data.length) > 0 && h("tbody", null, createRows())), !(data === null || data === void 0 ? void 0 : data.length) &&
363
+ !loading &&
364
+ (isSlotUsed(this.el, "empty-state") ? (h("slot", { name: "empty-state" })) : (h("ic-empty-state", { aligned: "center", heading: "No Data", class: "loading-empty" })))), loading && (h("ic-loading-indicator", { appearance: loadingOptions === null || loadingOptions === void 0 ? void 0 : loadingOptions.appearance, class: {
365
+ "loading-empty": loading,
366
+ loading: true,
367
+ "show-background": loadingOptions.showBackground,
368
+ }, 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 && (h("div", { class: "pagination-container" }, h("ic-pagination-bar", { totalItems: data.length, type: paginationOptions.type, rangeLabelType: paginationOptions.rangeLabelType, 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
245
369
  ? `${sortedColumn} sorted ${sortedColumnOrder}`
246
370
  : "table unsorted"))));
247
371
  }
@@ -314,7 +438,7 @@ export class DataTable {
314
438
  },
315
439
  "density": {
316
440
  "type": "string",
317
- "mutable": false,
441
+ "mutable": true,
318
442
  "complexType": {
319
443
  "original": "IcDataTableDensityOptions",
320
444
  "resolved": "\"default\" | \"dense\" | \"spacious\"",
@@ -354,6 +478,30 @@ export class DataTable {
354
478
  "reflect": false,
355
479
  "defaultValue": "false"
356
480
  },
481
+ "globalRowHeight": {
482
+ "type": "any",
483
+ "mutable": true,
484
+ "complexType": {
485
+ "original": "IcDataTableRowHeights",
486
+ "resolved": "\"auto\" | number",
487
+ "references": {
488
+ "IcDataTableRowHeights": {
489
+ "location": "import",
490
+ "path": "./ic-data-table.types",
491
+ "id": "src/components/ic-data-table/ic-data-table.types.tsx::IcDataTableRowHeights"
492
+ }
493
+ }
494
+ },
495
+ "required": false,
496
+ "optional": true,
497
+ "docs": {
498
+ "tags": [],
499
+ "text": "Sets the row height on all rows in the table that aren't set using the `variableRowHeight` method."
500
+ },
501
+ "attribute": "global-row-height",
502
+ "reflect": false,
503
+ "defaultValue": "40"
504
+ },
357
505
  "hideColumnHeaders": {
358
506
  "type": "boolean",
359
507
  "mutable": false,
@@ -372,27 +520,84 @@ export class DataTable {
372
520
  "reflect": false,
373
521
  "defaultValue": "false"
374
522
  },
523
+ "loading": {
524
+ "type": "boolean",
525
+ "mutable": true,
526
+ "complexType": {
527
+ "original": "boolean",
528
+ "resolved": "boolean",
529
+ "references": {}
530
+ },
531
+ "required": false,
532
+ "optional": true,
533
+ "docs": {
534
+ "tags": [],
535
+ "text": "When set to `true`, the full table will show a loading state, featuring a radial indicator."
536
+ },
537
+ "attribute": "loading",
538
+ "reflect": false,
539
+ "defaultValue": "false"
540
+ },
541
+ "loadingOptions": {
542
+ "type": "unknown",
543
+ "mutable": false,
544
+ "complexType": {
545
+ "original": "{\n appearance?: IcThemeForegroundNoDefault;\n description?: string;\n label?: string;\n labelDuration?: number;\n max?: number;\n min?: number;\n progress?: number;\n showBackground?: boolean;\n }",
546
+ "resolved": "{ appearance?: IcThemeForegroundNoDefault; description?: string; label?: string; labelDuration?: number; max?: number; min?: number; progress?: number; showBackground?: boolean; }",
547
+ "references": {
548
+ "IcThemeForegroundNoDefault": {
549
+ "location": "import",
550
+ "path": "@ukic/web-components/dist/types/utils/types",
551
+ "id": "../web-components/dist/types/utils/types.d.ts::IcThemeForegroundNoDefault"
552
+ }
553
+ }
554
+ },
555
+ "required": false,
556
+ "optional": true,
557
+ "docs": {
558
+ "tags": [],
559
+ "text": "Sets the props for the circular loading indicator used in the loading state."
560
+ }
561
+ },
562
+ "minimumLoadingDisplayDuration": {
563
+ "type": "number",
564
+ "mutable": false,
565
+ "complexType": {
566
+ "original": "number",
567
+ "resolved": "number",
568
+ "references": {}
569
+ },
570
+ "required": false,
571
+ "optional": true,
572
+ "docs": {
573
+ "tags": [],
574
+ "text": "The minimum amount of time the `loading` state displays for before showing the data. Used to prevent flashing in the component."
575
+ },
576
+ "attribute": "minimum-loading-display-duration",
577
+ "reflect": false,
578
+ "defaultValue": "1000"
579
+ },
375
580
  "paginationOptions": {
376
581
  "type": "unknown",
377
582
  "mutable": false,
378
583
  "complexType": {
379
- "original": "{\n itemsPerPage?: { label: string; value: string }[];\n type?: IcPaginationTypes;\n control?: IcPaginationControlTypes;\n itemsPerPageControl?: boolean;\n goToPageControl?: boolean;\n alignment?: IcPaginationAlignmentOptions;\n }",
380
- "resolved": "{ itemsPerPage?: { label: string; value: string; }[]; type?: IcPaginationTypes; control?: IcPaginationControlTypes; itemsPerPageControl?: boolean; goToPageControl?: boolean; alignment?: IcPaginationAlignmentOptions; }",
584
+ "original": "{\n itemsPerPage?: { label: string; value: string }[];\n rangeLabelType?: IcPaginationLabelTypes;\n type?: IcPaginationTypes;\n itemsPerPageControl?: boolean;\n goToPageControl?: boolean;\n alignment?: IcPaginationAlignmentOptions;\n }",
585
+ "resolved": "{ itemsPerPage?: { label: string; value: string; }[]; rangeLabelType?: IcPaginationLabelTypes; type?: IcPaginationTypes; itemsPerPageControl?: boolean; goToPageControl?: boolean; alignment?: IcPaginationAlignmentOptions; }",
381
586
  "references": {
382
- "IcPaginationTypes": {
587
+ "IcPaginationLabelTypes": {
383
588
  "location": "import",
384
- "path": "../ic-pagination/ic-pagination.types",
385
- "id": "src/components/ic-pagination/ic-pagination.types.ts::IcPaginationTypes"
589
+ "path": "@ukic/web-components/dist/types/components/ic-pagination/ic-pagination.types",
590
+ "id": "../web-components/dist/types/components/ic-pagination/ic-pagination.types.d.ts::IcPaginationLabelTypes"
386
591
  },
387
- "IcPaginationControlTypes": {
592
+ "IcPaginationTypes": {
388
593
  "location": "import",
389
- "path": "../ic-pagination/ic-pagination.types",
390
- "id": "src/components/ic-pagination/ic-pagination.types.ts::IcPaginationControlTypes"
594
+ "path": "@ukic/web-components/dist/types/components/ic-pagination/ic-pagination.types",
595
+ "id": "../web-components/dist/types/components/ic-pagination/ic-pagination.types.d.ts::IcPaginationTypes"
391
596
  },
392
597
  "IcPaginationAlignmentOptions": {
393
598
  "location": "import",
394
- "path": "../ic-pagination/ic-pagination.types",
395
- "id": "src/components/ic-pagination/ic-pagination.types.ts::IcPaginationAlignmentOptions"
599
+ "path": "@ukic/web-components/dist/types/components/ic-pagination/ic-pagination.types",
600
+ "id": "../web-components/dist/types/components/ic-pagination/ic-pagination.types.d.ts::IcPaginationAlignmentOptions"
396
601
  }
397
602
  }
398
603
  },
@@ -402,7 +607,7 @@ export class DataTable {
402
607
  "tags": [],
403
608
  "text": "Sets the props for the pagination bar."
404
609
  },
405
- "defaultValue": "{\n itemsPerPage: [\n { label: \"10\", value: \"10\" },\n { label: \"25\", value: \"25\" },\n { label: \"50\", value: \"50\" },\n ],\n type: \"page\",\n control: \"simple\",\n itemsPerPageControl: true,\n goToPageControl: true,\n alignment: \"right\",\n }"
610
+ "defaultValue": "{\n itemsPerPage: [\n { label: \"10\", value: \"10\" },\n { label: \"25\", value: \"25\" },\n { label: \"50\", value: \"50\" },\n ],\n rangeLabelType: \"page\",\n type: \"simple\",\n itemsPerPageControl: true,\n goToPageControl: true,\n alignment: \"right\",\n }"
406
611
  },
407
612
  "showPagination": {
408
613
  "type": "boolean",
@@ -497,6 +702,66 @@ export class DataTable {
497
702
  "attribute": "sticky-row-headers",
498
703
  "reflect": false,
499
704
  "defaultValue": "false"
705
+ },
706
+ "updating": {
707
+ "type": "boolean",
708
+ "mutable": false,
709
+ "complexType": {
710
+ "original": "boolean",
711
+ "resolved": "boolean",
712
+ "references": {}
713
+ },
714
+ "required": false,
715
+ "optional": true,
716
+ "docs": {
717
+ "tags": [],
718
+ "text": "If `true`, the table displays a linear loading indicator below the header row to indicate an updating state."
719
+ },
720
+ "attribute": "updating",
721
+ "reflect": false,
722
+ "defaultValue": "false"
723
+ },
724
+ "updatingOptions": {
725
+ "type": "unknown",
726
+ "mutable": false,
727
+ "complexType": {
728
+ "original": "{\n appearance?: IcThemeForegroundNoDefault;\n description?: string;\n max?: number;\n min?: number;\n progress?: number;\n }",
729
+ "resolved": "{ appearance?: IcThemeForegroundNoDefault; description?: string; max?: number; min?: number; progress?: number; }",
730
+ "references": {
731
+ "IcThemeForegroundNoDefault": {
732
+ "location": "import",
733
+ "path": "@ukic/web-components/dist/types/utils/types",
734
+ "id": "../web-components/dist/types/utils/types.d.ts::IcThemeForegroundNoDefault"
735
+ }
736
+ }
737
+ },
738
+ "required": false,
739
+ "optional": true,
740
+ "docs": {
741
+ "tags": [],
742
+ "text": "Sets the props for the linear loading indicator used in the updating state."
743
+ }
744
+ },
745
+ "variableRowHeight": {
746
+ "type": "unknown",
747
+ "mutable": true,
748
+ "complexType": {
749
+ "original": "(params: {\n [key: string]: any;\n index: number;\n }) => IcDataTableRowHeights | null",
750
+ "resolved": "(params: { [key: string]: any; index: number; }) => IcDataTableRowHeights",
751
+ "references": {
752
+ "IcDataTableRowHeights": {
753
+ "location": "import",
754
+ "path": "./ic-data-table.types",
755
+ "id": "src/components/ic-data-table/ic-data-table.types.tsx::IcDataTableRowHeights"
756
+ }
757
+ }
758
+ },
759
+ "required": false,
760
+ "optional": true,
761
+ "docs": {
762
+ "tags": [],
763
+ "text": "Allows for custom setting of row heights on individual rows based on an individual value from the `data` prop and the row index.\nIf the function returns `null`, that row's height will be set to the `globalRowHeight` property."
764
+ }
500
765
  }
501
766
  };
502
767
  }
@@ -513,7 +778,61 @@ export class DataTable {
513
778
  "toRow": {}
514
779
  };
515
780
  }
781
+ static get events() {
782
+ return [{
783
+ "method": "icRowHeightChange",
784
+ "name": "icRowHeightChange",
785
+ "bubbles": true,
786
+ "cancelable": true,
787
+ "composed": true,
788
+ "docs": {
789
+ "tags": [],
790
+ "text": "Emitted when the `globalRowHeight` or `variableRowHeight` properties change in the data table."
791
+ },
792
+ "complexType": {
793
+ "original": "void",
794
+ "resolved": "void",
795
+ "references": {}
796
+ }
797
+ }];
798
+ }
799
+ static get methods() {
800
+ return {
801
+ "resetRowHeights": {
802
+ "complexType": {
803
+ "signature": "() => Promise<void>",
804
+ "parameters": [],
805
+ "references": {
806
+ "Promise": {
807
+ "location": "global",
808
+ "id": "global::Promise"
809
+ }
810
+ },
811
+ "return": "Promise<void>"
812
+ },
813
+ "docs": {
814
+ "text": "Resets the `globalRowHeight` prop to `40px` and sets the `variableRowHeight` prop to `null`.",
815
+ "tags": []
816
+ }
817
+ }
818
+ };
819
+ }
516
820
  static get elementRef() { return "el"; }
821
+ static get watchers() {
822
+ return [{
823
+ "propName": "loading",
824
+ "methodName": "loadingHandler"
825
+ }, {
826
+ "propName": "data",
827
+ "methodName": "dataHandler"
828
+ }, {
829
+ "propName": "globalRowHeight",
830
+ "methodName": "rowHeightChangeHandler"
831
+ }, {
832
+ "propName": "variableRowHeight",
833
+ "methodName": "rowHeightChangeHandler"
834
+ }];
835
+ }
517
836
  static get listeners() {
518
837
  return [{
519
838
  "name": "icItemsPerPageChange",
@@ -527,6 +846,12 @@ export class DataTable {
527
846
  "target": undefined,
528
847
  "capture": false,
529
848
  "passive": false
849
+ }, {
850
+ "name": "icTableDensityUpdate",
851
+ "method": "handleDensityChange",
852
+ "target": undefined,
853
+ "capture": false,
854
+ "passive": false
530
855
  }, {
531
856
  "name": "click",
532
857
  "method": "clickListener",