@carbon/web-components 2.0.0-beta.2 → 2.0.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (615) hide show
  1. package/README.md +9 -9
  2. package/custom-elements.json +4026 -1801
  3. package/es/components/breadcrumb/breadcrumb.css.js +1 -1
  4. package/es/components/breadcrumb/breadcrumb.rtl.css.js +1 -1
  5. package/es/components/button/button.css.js +1 -1
  6. package/es/components/button/button.d.ts +12 -4
  7. package/es/components/button/button.d.ts.map +1 -1
  8. package/es/components/button/button.js +57 -19
  9. package/es/components/button/button.js.map +1 -1
  10. package/es/components/button/button.rtl.css.js +1 -1
  11. package/es/components/checkbox/checkbox.css.js +1 -1
  12. package/es/components/checkbox/checkbox.d.ts +9 -0
  13. package/es/components/checkbox/checkbox.d.ts.map +1 -1
  14. package/es/components/checkbox/checkbox.js +32 -1
  15. package/es/components/checkbox/checkbox.js.map +1 -1
  16. package/es/components/checkbox/checkbox.rtl.css.js +1 -1
  17. package/es/components/code-snippet/code-snippet-skeleton.d.ts +2 -2
  18. package/es/components/code-snippet/code-snippet-skeleton.d.ts.map +1 -1
  19. package/es/components/code-snippet/code-snippet-skeleton.js +4 -4
  20. package/es/components/code-snippet/code-snippet-skeleton.js.map +1 -1
  21. package/es/components/code-snippet/code-snippet.css.js +1 -1
  22. package/es/components/code-snippet/code-snippet.d.ts +75 -29
  23. package/es/components/code-snippet/code-snippet.d.ts.map +1 -1
  24. package/es/components/code-snippet/code-snippet.js +370 -164
  25. package/es/components/code-snippet/code-snippet.js.map +1 -1
  26. package/es/components/code-snippet/code-snippet.rtl.css.js +1 -1
  27. package/es/components/copy/copy.d.ts +1 -2
  28. package/es/components/copy/copy.d.ts.map +1 -1
  29. package/es/components/copy/copy.js +6 -13
  30. package/es/components/copy/copy.js.map +1 -1
  31. package/es/components/copy-button/copy-button.css.js +1 -1
  32. package/es/components/copy-button/copy-button.d.ts +8 -0
  33. package/es/components/copy-button/copy-button.d.ts.map +1 -1
  34. package/es/components/copy-button/copy-button.js +38 -2
  35. package/es/components/copy-button/copy-button.js.map +1 -1
  36. package/es/components/copy-button/copy-button.rtl.css.js +1 -1
  37. package/es/components/data-table/data-table.css.js +1 -1
  38. package/es/components/data-table/data-table.rtl.css.js +1 -1
  39. package/es/components/data-table/defs.d.ts +0 -13
  40. package/es/components/data-table/defs.d.ts.map +1 -1
  41. package/es/components/data-table/defs.js +0 -9
  42. package/es/components/data-table/defs.js.map +1 -1
  43. package/es/components/data-table/index.d.ts +6 -5
  44. package/es/components/data-table/index.d.ts.map +1 -1
  45. package/es/components/data-table/index.js +6 -5
  46. package/es/components/data-table/index.js.map +1 -1
  47. package/es/components/data-table/table-batch-actions.d.ts +7 -2
  48. package/es/components/data-table/table-batch-actions.d.ts.map +1 -1
  49. package/es/components/data-table/table-batch-actions.js +25 -6
  50. package/es/components/data-table/table-batch-actions.js.map +1 -1
  51. package/es/components/data-table/table-body.d.ts +8 -4
  52. package/es/components/data-table/table-body.d.ts.map +1 -1
  53. package/es/components/data-table/table-body.js +21 -14
  54. package/es/components/data-table/table-body.js.map +1 -1
  55. package/es/components/data-table/table-cell-content.d.ts +21 -0
  56. package/es/components/data-table/table-cell-content.d.ts.map +1 -0
  57. package/es/components/data-table/table-cell-content.js +53 -0
  58. package/es/components/data-table/table-cell-content.js.map +1 -0
  59. package/es/components/data-table/table-cell.d.ts +15 -2
  60. package/es/components/data-table/table-cell.d.ts.map +1 -1
  61. package/es/components/data-table/table-cell.js +43 -8
  62. package/es/components/data-table/table-cell.js.map +1 -1
  63. package/es/components/data-table/table-expanded-row.d.ts +336 -2
  64. package/es/components/data-table/table-expanded-row.d.ts.map +1 -1
  65. package/es/components/data-table/table-expanded-row.js +69 -16
  66. package/es/components/data-table/table-expanded-row.js.map +1 -1
  67. package/es/components/data-table/table-head.d.ts +7 -2
  68. package/es/components/data-table/table-head.d.ts.map +1 -1
  69. package/es/components/data-table/table-head.js +15 -6
  70. package/es/components/data-table/table-head.js.map +1 -1
  71. package/es/components/data-table/table-header-cell.d.ts +21 -3
  72. package/es/components/data-table/table-header-cell.d.ts.map +1 -1
  73. package/es/components/data-table/table-header-cell.js +67 -10
  74. package/es/components/data-table/table-header-cell.js.map +1 -1
  75. package/es/components/data-table/table-header-description.d.ts +21 -0
  76. package/es/components/data-table/table-header-description.d.ts.map +1 -0
  77. package/es/components/data-table/table-header-description.js +53 -0
  78. package/es/components/data-table/table-header-description.js.map +1 -0
  79. package/es/components/data-table/table-header-row.d.ts +3 -3
  80. package/es/components/data-table/table-header-row.d.ts.map +1 -1
  81. package/es/components/data-table/table-header-row.js +6 -6
  82. package/es/components/data-table/table-header-row.js.map +1 -1
  83. package/es/components/data-table/table-header-title.d.ts +21 -0
  84. package/es/components/data-table/table-header-title.d.ts.map +1 -0
  85. package/es/components/data-table/table-header-title.js +53 -0
  86. package/es/components/data-table/table-header-title.js.map +1 -0
  87. package/es/components/data-table/table-row.d.ts +413 -5
  88. package/es/components/data-table/table-row.d.ts.map +1 -1
  89. package/es/components/data-table/table-row.js +386 -45
  90. package/es/components/data-table/table-row.js.map +1 -1
  91. package/es/components/data-table/table-skeleton.d.ts +59 -0
  92. package/es/components/data-table/table-skeleton.d.ts.map +1 -0
  93. package/es/components/data-table/table-skeleton.js +259 -0
  94. package/es/components/data-table/table-skeleton.js.map +1 -0
  95. package/es/components/data-table/table-toolbar-content.d.ts +6 -2
  96. package/es/components/data-table/table-toolbar-content.d.ts.map +1 -1
  97. package/es/components/data-table/table-toolbar-content.js +21 -4
  98. package/es/components/data-table/table-toolbar-content.js.map +1 -1
  99. package/es/components/data-table/table-toolbar-search.d.ts +7 -3
  100. package/es/components/data-table/table-toolbar-search.d.ts.map +1 -1
  101. package/es/components/data-table/table-toolbar-search.js +25 -8
  102. package/es/components/data-table/table-toolbar-search.js.map +1 -1
  103. package/es/components/data-table/table-toolbar.d.ts +19 -2
  104. package/es/components/data-table/table-toolbar.d.ts.map +1 -1
  105. package/es/components/data-table/table-toolbar.js +68 -13
  106. package/es/components/data-table/table-toolbar.js.map +1 -1
  107. package/es/components/data-table/table.d.ts +556 -6
  108. package/es/components/data-table/table.d.ts.map +1 -1
  109. package/es/components/data-table/table.js +1012 -15
  110. package/es/components/data-table/table.js.map +1 -1
  111. package/es/components/dropdown/defs.d.ts +6 -6
  112. package/es/components/dropdown/defs.d.ts.map +1 -1
  113. package/es/components/dropdown/defs.js +2 -2
  114. package/es/components/dropdown/defs.js.map +1 -1
  115. package/es/components/dropdown/dropdown-item.d.ts.map +1 -1
  116. package/es/components/dropdown/dropdown-item.js +1 -1
  117. package/es/components/dropdown/dropdown-item.js.map +1 -1
  118. package/es/components/dropdown/dropdown.d.ts +9 -2
  119. package/es/components/dropdown/dropdown.d.ts.map +1 -1
  120. package/es/components/dropdown/dropdown.js +83 -62
  121. package/es/components/dropdown/dropdown.js.map +1 -1
  122. package/es/components/file-uploader/demo-file-uploader.d.ts +1 -1
  123. package/es/components/file-uploader/demo-file-uploader.d.ts.map +1 -1
  124. package/es/components/file-uploader/demo-file-uploader.js +38 -4
  125. package/es/components/file-uploader/demo-file-uploader.js.map +1 -1
  126. package/es/components/floating-menu/defs.d.ts +1 -39
  127. package/es/components/floating-menu/defs.d.ts.map +1 -1
  128. package/es/components/floating-menu/defs.js +2 -23
  129. package/es/components/floating-menu/defs.js.map +1 -1
  130. package/es/components/floating-menu/floating-menu-trigger.d.ts +3 -3
  131. package/es/components/floating-menu/floating-menu-trigger.d.ts.map +1 -1
  132. package/es/components/floating-menu/floating-menu.d.ts +11 -13
  133. package/es/components/floating-menu/floating-menu.d.ts.map +1 -1
  134. package/es/components/floating-menu/floating-menu.js +44 -54
  135. package/es/components/floating-menu/floating-menu.js.map +1 -1
  136. package/es/components/form/form-item.d.ts +2 -2
  137. package/es/components/form/form-item.d.ts.map +1 -1
  138. package/es/components/form/form-item.js +4 -4
  139. package/es/components/form/form-item.js.map +1 -1
  140. package/es/components/form-group/form-group.css.js +12 -0
  141. package/es/components/form-group/form-group.d.ts +44 -0
  142. package/es/components/form-group/form-group.d.ts.map +1 -0
  143. package/es/components/form-group/form-group.js +141 -0
  144. package/es/components/form-group/form-group.js.map +1 -0
  145. package/es/components/form-group/form-group.rtl.css.js +12 -0
  146. package/es/components/form-group/index.d.ts +11 -0
  147. package/es/components/form-group/index.d.ts.map +1 -0
  148. package/es/components/form-group/index.js +11 -0
  149. package/es/components/form-group/index.js.map +1 -0
  150. package/es/components/icon-button/icon-button.css.js +1 -1
  151. package/es/components/icon-button/icon-button.d.ts +1 -1
  152. package/es/components/icon-button/icon-button.d.ts.map +1 -1
  153. package/es/components/icon-button/icon-button.js +5 -3
  154. package/es/components/icon-button/icon-button.js.map +1 -1
  155. package/es/components/icon-button/icon-button.rtl.css.js +1 -1
  156. package/es/components/list/list.css.js +1 -1
  157. package/es/components/list/list.rtl.css.js +1 -1
  158. package/es/components/modal/defs.d.ts +3 -3
  159. package/es/components/modal/defs.d.ts.map +1 -1
  160. package/es/components/modal/defs.js +2 -2
  161. package/es/components/modal/defs.js.map +1 -1
  162. package/es/components/modal/index.d.ts +2 -1
  163. package/es/components/modal/index.d.ts.map +1 -1
  164. package/es/components/modal/index.js +2 -1
  165. package/es/components/modal/index.js.map +1 -1
  166. package/es/components/modal/modal-body-content.d.ts +21 -0
  167. package/es/components/modal/modal-body-content.d.ts.map +1 -0
  168. package/es/components/modal/modal-body-content.js +53 -0
  169. package/es/components/modal/modal-body-content.js.map +1 -0
  170. package/es/components/modal/modal-body.d.ts +2 -2
  171. package/es/components/modal/modal-body.d.ts.map +1 -1
  172. package/es/components/modal/modal-body.js +4 -4
  173. package/es/components/modal/modal-body.js.map +1 -1
  174. package/es/components/modal/modal-close-button.d.ts +5 -5
  175. package/es/components/modal/modal-close-button.d.ts.map +1 -1
  176. package/es/components/modal/modal-close-button.js +9 -9
  177. package/es/components/modal/modal-close-button.js.map +1 -1
  178. package/es/components/modal/modal-footer.d.ts +3 -3
  179. package/es/components/modal/modal-footer.d.ts.map +1 -1
  180. package/es/components/modal/modal-footer.js +13 -21
  181. package/es/components/modal/modal-footer.js.map +1 -1
  182. package/es/components/modal/modal-header.d.ts +2 -2
  183. package/es/components/modal/modal-header.d.ts.map +1 -1
  184. package/es/components/modal/modal-header.js +4 -4
  185. package/es/components/modal/modal-header.js.map +1 -1
  186. package/es/components/modal/modal-heading.d.ts +2 -2
  187. package/es/components/modal/modal-heading.d.ts.map +1 -1
  188. package/es/components/modal/modal-heading.js +4 -4
  189. package/es/components/modal/modal-heading.js.map +1 -1
  190. package/es/components/modal/modal-label.d.ts +2 -2
  191. package/es/components/modal/modal-label.d.ts.map +1 -1
  192. package/es/components/modal/modal-label.js +4 -4
  193. package/es/components/modal/modal-label.js.map +1 -1
  194. package/es/components/modal/modal.css.js +1 -1
  195. package/es/components/modal/modal.d.ts +33 -3
  196. package/es/components/modal/modal.d.ts.map +1 -1
  197. package/es/components/modal/modal.js +121 -14
  198. package/es/components/modal/modal.js.map +1 -1
  199. package/es/components/modal/modal.rtl.css.js +1 -1
  200. package/es/components/multi-select/defs.d.ts +27 -0
  201. package/es/components/multi-select/defs.d.ts.map +1 -0
  202. package/es/components/multi-select/defs.js +19 -0
  203. package/es/components/multi-select/defs.js.map +1 -0
  204. package/es/components/multi-select/multi-select-item.d.ts.map +1 -1
  205. package/es/components/multi-select/multi-select-item.js +9 -14
  206. package/es/components/multi-select/multi-select-item.js.map +1 -1
  207. package/es/components/multi-select/multi-select.css.js +1 -1
  208. package/es/components/multi-select/multi-select.d.ts +44 -5
  209. package/es/components/multi-select/multi-select.d.ts.map +1 -1
  210. package/es/components/multi-select/multi-select.js +250 -32
  211. package/es/components/multi-select/multi-select.js.map +1 -1
  212. package/es/components/multi-select/multi-select.rtl.css.js +1 -1
  213. package/es/components/number-input/number-input.css.js +1 -1
  214. package/es/components/number-input/number-input.d.ts.map +1 -1
  215. package/es/components/number-input/number-input.js +1 -1
  216. package/es/components/number-input/number-input.js.map +1 -1
  217. package/es/components/number-input/number-input.rtl.css.js +1 -1
  218. package/es/components/overflow-menu/defs.d.ts +4 -9
  219. package/es/components/overflow-menu/defs.d.ts.map +1 -1
  220. package/es/components/overflow-menu/defs.js +1 -4
  221. package/es/components/overflow-menu/defs.js.map +1 -1
  222. package/es/components/overflow-menu/overflow-menu-body.d.ts +16 -15
  223. package/es/components/overflow-menu/overflow-menu-body.d.ts.map +1 -1
  224. package/es/components/overflow-menu/overflow-menu-body.js +49 -28
  225. package/es/components/overflow-menu/overflow-menu-body.js.map +1 -1
  226. package/es/components/overflow-menu/overflow-menu-item.d.ts +12 -3
  227. package/es/components/overflow-menu/overflow-menu-item.d.ts.map +1 -1
  228. package/es/components/overflow-menu/overflow-menu-item.js +44 -12
  229. package/es/components/overflow-menu/overflow-menu-item.js.map +1 -1
  230. package/es/components/overflow-menu/overflow-menu.css.js +1 -1
  231. package/es/components/overflow-menu/overflow-menu.d.ts +22 -10
  232. package/es/components/overflow-menu/overflow-menu.d.ts.map +1 -1
  233. package/es/components/overflow-menu/overflow-menu.js +89 -40
  234. package/es/components/overflow-menu/overflow-menu.js.map +1 -1
  235. package/es/components/overflow-menu/overflow-menu.rtl.css.js +1 -1
  236. package/es/components/pagination/defs.d.ts +27 -0
  237. package/es/components/pagination/defs.d.ts.map +1 -0
  238. package/es/components/pagination/defs.js +19 -0
  239. package/es/components/pagination/defs.js.map +1 -0
  240. package/es/components/pagination/index.d.ts +1 -3
  241. package/es/components/pagination/index.d.ts.map +1 -1
  242. package/es/components/pagination/index.js +1 -3
  243. package/es/components/pagination/index.js.map +1 -1
  244. package/es/components/pagination/pagination.css.js +1 -1
  245. package/es/components/pagination/pagination.d.ts +55 -20
  246. package/es/components/pagination/pagination.d.ts.map +1 -1
  247. package/es/components/pagination/pagination.js +303 -123
  248. package/es/components/pagination/pagination.js.map +1 -1
  249. package/es/components/pagination/pagination.rtl.css.js +1 -1
  250. package/es/components/progress-indicator/progress-indicator-skeleton.d.ts +1 -2
  251. package/es/components/progress-indicator/progress-indicator-skeleton.d.ts.map +1 -1
  252. package/es/components/progress-indicator/progress-indicator-skeleton.js +5 -5
  253. package/es/components/progress-indicator/progress-indicator-skeleton.js.map +1 -1
  254. package/es/components/progress-indicator/progress-indicator.css.js +1 -1
  255. package/es/components/progress-indicator/progress-indicator.d.ts +8 -3
  256. package/es/components/progress-indicator/progress-indicator.d.ts.map +1 -1
  257. package/es/components/progress-indicator/progress-indicator.js +35 -8
  258. package/es/components/progress-indicator/progress-indicator.js.map +1 -1
  259. package/es/components/progress-indicator/progress-indicator.rtl.css.js +1 -1
  260. package/es/components/progress-indicator/progress-step-skeleton.d.ts +2 -2
  261. package/es/components/progress-indicator/progress-step-skeleton.d.ts.map +1 -1
  262. package/es/components/progress-indicator/progress-step-skeleton.js +12 -12
  263. package/es/components/progress-indicator/progress-step-skeleton.js.map +1 -1
  264. package/es/components/progress-indicator/progress-step.d.ts +11 -3
  265. package/es/components/progress-indicator/progress-step.d.ts.map +1 -1
  266. package/es/components/progress-indicator/progress-step.js +65 -24
  267. package/es/components/progress-indicator/progress-step.js.map +1 -1
  268. package/es/components/radio-button/radio-button.css.js +1 -1
  269. package/es/components/radio-button/radio-button.d.ts +4 -0
  270. package/es/components/radio-button/radio-button.d.ts.map +1 -1
  271. package/es/components/radio-button/radio-button.js +22 -0
  272. package/es/components/radio-button/radio-button.js.map +1 -1
  273. package/es/components/radio-button/radio-button.rtl.css.js +1 -1
  274. package/es/components/select/select.css.js +1 -1
  275. package/es/components/select/select.d.ts.map +1 -1
  276. package/es/components/select/select.js +3 -1
  277. package/es/components/select/select.js.map +1 -1
  278. package/es/components/select/select.rtl.css.js +1 -1
  279. package/es/components/slider/slider.css.js +1 -1
  280. package/es/components/slider/slider.rtl.css.js +1 -1
  281. package/es/components/stack/defs.d.ts +29 -0
  282. package/es/components/stack/defs.d.ts.map +1 -0
  283. package/es/components/stack/defs.js +31 -0
  284. package/es/components/stack/defs.js.map +1 -0
  285. package/es/components/stack/index.d.ts +11 -0
  286. package/es/components/stack/index.d.ts.map +1 -0
  287. package/es/components/stack/index.js +11 -0
  288. package/es/components/stack/index.js.map +1 -0
  289. package/es/components/stack/stack.css.js +12 -0
  290. package/es/components/stack/stack.d.ts +46 -0
  291. package/es/components/stack/stack.d.ts.map +1 -0
  292. package/es/components/stack/stack.js +116 -0
  293. package/es/components/stack/stack.js.map +1 -0
  294. package/es/components/stack/stack.rtl.css.js +12 -0
  295. package/es/components/structured-list/structured-list.css.js +1 -1
  296. package/es/components/structured-list/structured-list.d.ts +9 -0
  297. package/es/components/structured-list/structured-list.d.ts.map +1 -1
  298. package/es/components/structured-list/structured-list.js +47 -1
  299. package/es/components/structured-list/structured-list.js.map +1 -1
  300. package/es/components/structured-list/structured-list.rtl.css.js +1 -1
  301. package/es/components/tabs/tabs.css.js +1 -1
  302. package/es/components/tabs/tabs.rtl.css.js +1 -1
  303. package/es/components/text-input/defs.d.ts +38 -0
  304. package/es/components/text-input/defs.d.ts.map +1 -1
  305. package/es/components/text-input/defs.js +24 -3
  306. package/es/components/text-input/defs.js.map +1 -1
  307. package/es/components/text-input/text-input.d.ts +4 -5
  308. package/es/components/text-input/text-input.d.ts.map +1 -1
  309. package/es/components/text-input/text-input.js +5 -6
  310. package/es/components/text-input/text-input.js.map +1 -1
  311. package/es/components/textarea/textarea.d.ts.map +1 -1
  312. package/es/components/textarea/textarea.js +1 -1
  313. package/es/components/textarea/textarea.js.map +1 -1
  314. package/es/components/tile/expandable-tile.d.ts +1 -3
  315. package/es/components/tile/expandable-tile.d.ts.map +1 -1
  316. package/es/components/tile/expandable-tile.js +1 -1
  317. package/es/components/tile/expandable-tile.js.map +1 -1
  318. package/es/components/tile/radio-tile.d.ts.map +1 -1
  319. package/es/components/tile/radio-tile.js +2 -2
  320. package/es/components/tile/radio-tile.js.map +1 -1
  321. package/es/components/toggle-tip/toggletip.d.ts +1 -1
  322. package/es/components/toggle-tip/toggletip.d.ts.map +1 -1
  323. package/es/components/toggle-tip/toggletip.js +28 -3
  324. package/es/components/toggle-tip/toggletip.js.map +1 -1
  325. package/es/components/tooltip/tooltip.css.js +1 -1
  326. package/es/components/tooltip/tooltip.d.ts +12 -1
  327. package/es/components/tooltip/tooltip.d.ts.map +1 -1
  328. package/es/components/tooltip/tooltip.js +47 -1
  329. package/es/components/tooltip/tooltip.js.map +1 -1
  330. package/es/components/tooltip/tooltip.rtl.css.js +1 -1
  331. package/es/components/ui-shell/header-global-action.d.ts +31 -0
  332. package/es/components/ui-shell/header-global-action.d.ts.map +1 -0
  333. package/es/components/ui-shell/header-global-action.js +88 -0
  334. package/es/components/ui-shell/header-global-action.js.map +1 -0
  335. package/es/components/ui-shell/header-menu-button.d.ts +6 -6
  336. package/es/components/ui-shell/header-menu-button.d.ts.map +1 -1
  337. package/es/components/ui-shell/header-menu-button.js +10 -10
  338. package/es/components/ui-shell/header-menu-button.js.map +1 -1
  339. package/es/components/ui-shell/header-menu-item.d.ts +3 -3
  340. package/es/components/ui-shell/header-menu-item.d.ts.map +1 -1
  341. package/es/components/ui-shell/header-menu-item.js +6 -6
  342. package/es/components/ui-shell/header-menu-item.js.map +1 -1
  343. package/es/components/ui-shell/header-menu.d.ts +11 -3
  344. package/es/components/ui-shell/header-menu.d.ts.map +1 -1
  345. package/es/components/ui-shell/header-menu.js +47 -7
  346. package/es/components/ui-shell/header-menu.js.map +1 -1
  347. package/es/components/ui-shell/header-name.d.ts +3 -3
  348. package/es/components/ui-shell/header-name.d.ts.map +1 -1
  349. package/es/components/ui-shell/header-name.js +4 -4
  350. package/es/components/ui-shell/header-name.js.map +1 -1
  351. package/es/components/ui-shell/header-nav-item.d.ts +11 -3
  352. package/es/components/ui-shell/header-nav-item.d.ts.map +1 -1
  353. package/es/components/ui-shell/header-nav-item.js +39 -6
  354. package/es/components/ui-shell/header-nav-item.js.map +1 -1
  355. package/es/components/ui-shell/header-nav.d.ts +2 -2
  356. package/es/components/ui-shell/header-nav.d.ts.map +1 -1
  357. package/es/components/ui-shell/header-nav.js +5 -5
  358. package/es/components/ui-shell/header-nav.js.map +1 -1
  359. package/es/components/ui-shell/header-panel.d.ts +30 -0
  360. package/es/components/ui-shell/header-panel.d.ts.map +1 -0
  361. package/es/components/ui-shell/header-panel.js +72 -0
  362. package/es/components/ui-shell/header-panel.js.map +1 -0
  363. package/es/components/ui-shell/header-side-nav-items.d.ts +27 -0
  364. package/es/components/ui-shell/header-side-nav-items.d.ts.map +1 -0
  365. package/es/components/ui-shell/header-side-nav-items.js +80 -0
  366. package/es/components/ui-shell/header-side-nav-items.js.map +1 -0
  367. package/es/components/ui-shell/header.css.js +1 -1
  368. package/es/components/ui-shell/header.d.ts +2 -2
  369. package/es/components/ui-shell/header.d.ts.map +1 -1
  370. package/es/components/ui-shell/header.js +5 -5
  371. package/es/components/ui-shell/header.js.map +1 -1
  372. package/es/components/ui-shell/header.rtl.css.js +1 -1
  373. package/es/components/ui-shell/index.d.ts +5 -0
  374. package/es/components/ui-shell/index.d.ts.map +1 -1
  375. package/es/components/ui-shell/index.js +5 -0
  376. package/es/components/ui-shell/index.js.map +1 -1
  377. package/es/components/ui-shell/side-nav-divider.d.ts +2 -2
  378. package/es/components/ui-shell/side-nav-divider.d.ts.map +1 -1
  379. package/es/components/ui-shell/side-nav-divider.js +5 -5
  380. package/es/components/ui-shell/side-nav-divider.js.map +1 -1
  381. package/es/components/ui-shell/side-nav-items.d.ts +2 -2
  382. package/es/components/ui-shell/side-nav-items.d.ts.map +1 -1
  383. package/es/components/ui-shell/side-nav-items.js +6 -6
  384. package/es/components/ui-shell/side-nav-items.js.map +1 -1
  385. package/es/components/ui-shell/side-nav-link.d.ts +7 -3
  386. package/es/components/ui-shell/side-nav-link.d.ts.map +1 -1
  387. package/es/components/ui-shell/side-nav-link.js +18 -5
  388. package/es/components/ui-shell/side-nav-link.js.map +1 -1
  389. package/es/components/ui-shell/side-nav-menu-item.d.ts +3 -3
  390. package/es/components/ui-shell/side-nav-menu-item.d.ts.map +1 -1
  391. package/es/components/ui-shell/side-nav-menu-item.js +4 -4
  392. package/es/components/ui-shell/side-nav-menu-item.js.map +1 -1
  393. package/es/components/ui-shell/side-nav-menu.d.ts +7 -3
  394. package/es/components/ui-shell/side-nav-menu.d.ts.map +1 -1
  395. package/es/components/ui-shell/side-nav-menu.js +18 -5
  396. package/es/components/ui-shell/side-nav-menu.js.map +1 -1
  397. package/es/components/ui-shell/side-nav.css.js +1 -1
  398. package/es/components/ui-shell/side-nav.d.ts +35 -13
  399. package/es/components/ui-shell/side-nav.d.ts.map +1 -1
  400. package/es/components/ui-shell/side-nav.js +142 -48
  401. package/es/components/ui-shell/side-nav.js.map +1 -1
  402. package/es/components/ui-shell/side-nav.rtl.css.js +1 -1
  403. package/es/components/ui-shell/switcher-divider.d.ts +21 -0
  404. package/es/components/ui-shell/switcher-divider.d.ts.map +1 -0
  405. package/es/components/ui-shell/switcher-divider.js +56 -0
  406. package/es/components/ui-shell/switcher-divider.js.map +1 -0
  407. package/es/components/{pagination/page-sizes-select.d.ts → ui-shell/switcher-item.d.ts} +18 -22
  408. package/es/components/ui-shell/switcher-item.d.ts.map +1 -0
  409. package/es/components/ui-shell/switcher-item.js +162 -0
  410. package/es/components/ui-shell/switcher-item.js.map +1 -0
  411. package/es/components/ui-shell/switcher.d.ts +35 -0
  412. package/es/components/ui-shell/switcher.d.ts.map +1 -0
  413. package/es/components/ui-shell/switcher.js +95 -0
  414. package/es/components/ui-shell/switcher.js.map +1 -0
  415. package/es/components-react/code-snippet/code-snippet-skeleton.d.ts +2 -2
  416. package/es/components-react/code-snippet/code-snippet.d.ts +2 -2
  417. package/es/components-react/data-table/table-batch-actions.d.ts +2 -2
  418. package/es/components-react/data-table/table-body.d.ts +2 -2
  419. package/es/components-react/{pagination/pages-select.d.ts → data-table/table-cell-content.d.ts} +2 -6
  420. package/es/components-react/{pagination/pages-select.js → data-table/table-cell-content.js} +4 -10
  421. package/es/components-react/data-table/table-cell.d.ts +2 -2
  422. package/es/components-react/data-table/table-expanded-row.d.ts +2 -2
  423. package/es/components-react/data-table/table-head.d.ts +2 -2
  424. package/es/components-react/data-table/table-header-cell.d.ts +2 -2
  425. package/es/components-react/{pagination/page-sizes-select.d.ts → data-table/table-header-description.d.ts} +2 -6
  426. package/es/components-react/{pagination/page-sizes-select.js → data-table/table-header-description.js} +4 -10
  427. package/es/components-react/data-table/table-header-row.d.ts +2 -2
  428. package/es/components-react/data-table/table-header-title.d.ts +15 -0
  429. package/es/components-react/data-table/{table-header-cell-skeleton.js → table-header-title.js} +4 -6
  430. package/es/components-react/data-table/table-row.d.ts +19 -2
  431. package/es/components-react/data-table/table-row.js +16 -0
  432. package/es/components-react/data-table/table-skeleton.d.ts +15 -0
  433. package/es/components-react/data-table/table-skeleton.js +21 -0
  434. package/es/components-react/data-table/table-toolbar-content.d.ts +2 -2
  435. package/es/components-react/data-table/table-toolbar-search.d.ts +2 -2
  436. package/es/components-react/data-table/table-toolbar.d.ts +2 -2
  437. package/es/components-react/data-table/table.d.ts +44 -2
  438. package/es/components-react/data-table/table.js +45 -3
  439. package/es/components-react/file-uploader/demo-file-uploader.d.ts +0 -49
  440. package/es/components-react/file-uploader/demo-file-uploader.js +3 -51
  441. package/es/components-react/floating-menu/floating-menu.d.ts +2 -2
  442. package/es/components-react/floating-menu/floating-menu.js +0 -2
  443. package/es/components-react/form/form-item.d.ts +2 -2
  444. package/es/components-react/form-group/form-group.d.ts +15 -0
  445. package/es/components-react/form-group/form-group.js +21 -0
  446. package/es/components-react/form-group/index.d.ts +14 -0
  447. package/es/components-react/form-group/index.js +8 -0
  448. package/es/components-react/modal/modal-body-content.d.ts +15 -0
  449. package/es/components-react/modal/modal-body-content.js +21 -0
  450. package/es/components-react/modal/modal-body.d.ts +2 -2
  451. package/es/components-react/modal/modal-close-button.d.ts +2 -2
  452. package/es/components-react/modal/modal-footer.d.ts +2 -2
  453. package/es/components-react/modal/modal-header.d.ts +2 -2
  454. package/es/components-react/modal/modal-heading.d.ts +2 -2
  455. package/es/components-react/modal/modal-label.d.ts +2 -2
  456. package/es/components-react/modal/modal.d.ts +2 -2
  457. package/es/components-react/multi-select/defs.d.ts +14 -0
  458. package/es/components-react/multi-select/defs.js +9 -0
  459. package/es/components-react/multi-select/multi-select.js +6 -1
  460. package/es/components-react/overflow-menu/overflow-menu-body.d.ts +2 -2
  461. package/es/components-react/overflow-menu/overflow-menu-item.d.ts +2 -2
  462. package/es/components-react/overflow-menu/overflow-menu.d.ts +4 -5
  463. package/es/components-react/overflow-menu/overflow-menu.js +5 -3
  464. package/es/components-react/pagination/defs.d.ts +14 -0
  465. package/es/components-react/pagination/defs.js +9 -0
  466. package/es/components-react/pagination/pagination.d.ts +3 -7
  467. package/es/components-react/pagination/pagination.js +3 -7
  468. package/es/components-react/progress-indicator/progress-indicator-skeleton.d.ts +2 -3
  469. package/es/components-react/progress-indicator/progress-indicator.d.ts +2 -3
  470. package/es/components-react/progress-indicator/progress-step-skeleton.d.ts +2 -3
  471. package/es/components-react/progress-indicator/progress-step.d.ts +2 -3
  472. package/es/components-react/stack/defs.d.ts +14 -0
  473. package/es/components-react/stack/defs.js +9 -0
  474. package/es/components-react/stack/index.d.ts +14 -0
  475. package/es/components-react/stack/index.js +8 -0
  476. package/es/components-react/stack/stack.d.ts +15 -0
  477. package/es/components-react/stack/stack.js +22 -0
  478. package/es/components-react/text-input/text-input.js +7 -1
  479. package/es/components-react/toggle-tip/toggletip.d.ts +0 -5
  480. package/es/components-react/toggle-tip/toggletip.js +3 -13
  481. package/es/components-react/{data-table/table-cell-skeleton.d.ts → ui-shell/header-global-action.d.ts} +3 -3
  482. package/es/components-react/{data-table/table-cell-skeleton.js → ui-shell/header-global-action.js} +4 -4
  483. package/es/components-react/ui-shell/header-menu-button.d.ts +2 -2
  484. package/es/components-react/ui-shell/header-menu-item.d.ts +2 -2
  485. package/es/components-react/ui-shell/header-menu.d.ts +2 -2
  486. package/es/components-react/ui-shell/header-name.d.ts +2 -2
  487. package/es/components-react/ui-shell/header-nav-item.d.ts +2 -2
  488. package/es/components-react/ui-shell/header-nav.d.ts +2 -2
  489. package/es/components-react/ui-shell/header-panel.d.ts +15 -0
  490. package/es/components-react/ui-shell/header-panel.js +21 -0
  491. package/es/components-react/ui-shell/header-side-nav-items.d.ts +15 -0
  492. package/es/components-react/ui-shell/header-side-nav-items.js +21 -0
  493. package/es/components-react/ui-shell/header.d.ts +2 -2
  494. package/es/components-react/ui-shell/side-nav-divider.d.ts +2 -2
  495. package/es/components-react/ui-shell/side-nav-items.d.ts +2 -2
  496. package/es/components-react/ui-shell/side-nav-link.d.ts +2 -2
  497. package/es/components-react/ui-shell/side-nav-menu-item.d.ts +2 -2
  498. package/es/components-react/ui-shell/side-nav-menu.d.ts +2 -2
  499. package/es/components-react/ui-shell/side-nav.d.ts +2 -2
  500. package/es/components-react/ui-shell/switcher-divider.d.ts +15 -0
  501. package/es/components-react/ui-shell/switcher-divider.js +21 -0
  502. package/es/components-react/ui-shell/switcher-item.d.ts +15 -0
  503. package/es/components-react/ui-shell/switcher-item.js +21 -0
  504. package/es/components-react/ui-shell/switcher.d.ts +15 -0
  505. package/es/components-react/ui-shell/switcher.js +21 -0
  506. package/es/icons/arrow--down/16.js +1 -1
  507. package/es/icons/arrow--down/32.js +1 -1
  508. package/es/icons/arrows--vertical/16.js +1 -1
  509. package/es/icons/arrows--vertical/32.js +1 -1
  510. package/es/icons/overflow-menu--vertical/16.js +1 -1
  511. package/es/index.d.ts +12 -2
  512. package/es/index.d.ts.map +1 -1
  513. package/es/index.js +12 -2
  514. package/es/index.js.map +1 -1
  515. package/lib/components/data-table/defs.js +1 -10
  516. package/lib/components/data-table/defs.js.map +1 -1
  517. package/lib/components/dropdown/defs.js +2 -2
  518. package/lib/components/dropdown/defs.js.map +1 -1
  519. package/lib/components/floating-menu/defs.js +3 -24
  520. package/lib/components/floating-menu/defs.js.map +1 -1
  521. package/lib/components/modal/defs.js +2 -2
  522. package/lib/components/modal/defs.js.map +1 -1
  523. package/lib/components/multi-select/defs.js +25 -0
  524. package/lib/components/multi-select/defs.js.map +1 -0
  525. package/lib/components/overflow-menu/defs.js +2 -11
  526. package/lib/components/overflow-menu/defs.js.map +1 -1
  527. package/lib/components/pagination/defs.js +25 -0
  528. package/lib/components/pagination/defs.js.map +1 -0
  529. package/lib/components/stack/defs.js +36 -0
  530. package/lib/components/stack/defs.js.map +1 -0
  531. package/lib/components/text-input/defs.js +25 -4
  532. package/lib/components/text-input/defs.js.map +1 -1
  533. package/lib/components-react-node/{pagination/pages-select.js → data-table/table-cell-content.js} +3 -9
  534. package/lib/components-react-node/{pagination/page-sizes-select.js → data-table/table-header-description.js} +3 -9
  535. package/lib/components-react-node/data-table/{table-cell-skeleton.js → table-header-title.js} +3 -4
  536. package/lib/components-react-node/data-table/table-row.js +16 -0
  537. package/lib/components-react-node/data-table/{table-header-cell-skeleton.js → table-skeleton.js} +3 -4
  538. package/lib/components-react-node/data-table/table.js +44 -8
  539. package/lib/components-react-node/file-uploader/demo-file-uploader.js +3 -89
  540. package/lib/components-react-node/floating-menu/floating-menu.js +0 -12
  541. package/lib/components-react-node/form-group/form-group.js +36 -0
  542. package/lib/components-react-node/form-group/index.js +9 -0
  543. package/lib/components-react-node/modal/modal-body-content.js +36 -0
  544. package/lib/components-react-node/multi-select/defs.js +24 -0
  545. package/lib/components-react-node/multi-select/multi-select.js +13 -0
  546. package/lib/components-react-node/overflow-menu/overflow-menu.js +3 -8
  547. package/lib/components-react-node/pagination/defs.js +24 -0
  548. package/lib/components-react-node/pagination/pagination.js +3 -7
  549. package/lib/components-react-node/stack/defs.js +24 -0
  550. package/lib/components-react-node/stack/index.js +9 -0
  551. package/lib/components-react-node/stack/stack.js +49 -0
  552. package/lib/components-react-node/text-input/text-input.js +12 -0
  553. package/lib/components-react-node/toggle-tip/toggletip.js +3 -51
  554. package/lib/components-react-node/ui-shell/header-global-action.js +37 -0
  555. package/lib/components-react-node/ui-shell/header-panel.js +36 -0
  556. package/lib/components-react-node/ui-shell/header-side-nav-items.js +36 -0
  557. package/lib/components-react-node/ui-shell/switcher-divider.js +36 -0
  558. package/lib/components-react-node/ui-shell/switcher-item.js +36 -0
  559. package/lib/components-react-node/ui-shell/switcher.js +36 -0
  560. package/package.json +6 -7
  561. package/scss/components/button/button.scss +48 -1
  562. package/scss/components/checkbox/checkbox.scss +16 -0
  563. package/scss/components/code-snippet/code-snippet.scss +82 -101
  564. package/scss/components/copy-button/copy-button.scss +17 -0
  565. package/scss/components/data-table/_table-action.scss +50 -32
  566. package/scss/components/data-table/_table-core.scss +253 -29
  567. package/scss/components/data-table/_table-expandable.scss +25 -32
  568. package/scss/components/data-table/_table-selection.scss +36 -20
  569. package/scss/components/data-table/_table-sizes.scss +162 -20
  570. package/scss/components/data-table/_table-sort.scss +5 -21
  571. package/scss/components/data-table/data-table.scss +4 -3
  572. package/scss/components/form-group/form-group.scss +23 -0
  573. package/scss/components/modal/modal.scss +61 -87
  574. package/scss/components/multi-select/multi-select.scss +54 -19
  575. package/scss/components/overflow-menu/overflow-menu.scss +21 -9
  576. package/scss/components/pagination/pagination.scss +0 -66
  577. package/scss/components/progress-indicator/progress-indicator.scss +11 -10
  578. package/scss/components/radio-button/radio-button.scss +11 -1
  579. package/scss/components/select/select.scss +28 -1
  580. package/scss/components/stack/stack.scss +33 -0
  581. package/scss/components/structured-list/structured-list.scss +90 -20
  582. package/scss/components/tooltip/tooltip.scss +26 -0
  583. package/scss/components/ui-shell/header.scss +69 -0
  584. package/scss/components/ui-shell/side-nav.scss +27 -49
  585. package/es/components/data-table/table-cell-skeleton.d.ts +0 -20
  586. package/es/components/data-table/table-cell-skeleton.d.ts.map +0 -1
  587. package/es/components/data-table/table-cell-skeleton.js +0 -42
  588. package/es/components/data-table/table-cell-skeleton.js.map +0 -1
  589. package/es/components/data-table/table-expand-row.d.ts +0 -371
  590. package/es/components/data-table/table-expand-row.d.ts.map +0 -1
  591. package/es/components/data-table/table-expand-row.js +0 -192
  592. package/es/components/data-table/table-expand-row.js.map +0 -1
  593. package/es/components/data-table/table-header-cell-skeleton.d.ts +0 -19
  594. package/es/components/data-table/table-header-cell-skeleton.d.ts.map +0 -1
  595. package/es/components/data-table/table-header-cell-skeleton.js +0 -33
  596. package/es/components/data-table/table-header-cell-skeleton.js.map +0 -1
  597. package/es/components/data-table/table-header-expand-row.d.ts +0 -33
  598. package/es/components/data-table/table-header-expand-row.d.ts.map +0 -1
  599. package/es/components/data-table/table-header-expand-row.js +0 -68
  600. package/es/components/data-table/table-header-expand-row.js.map +0 -1
  601. package/es/components/pagination/page-sizes-select.d.ts.map +0 -1
  602. package/es/components/pagination/page-sizes-select.js +0 -172
  603. package/es/components/pagination/page-sizes-select.js.map +0 -1
  604. package/es/components/pagination/pages-select.d.ts +0 -362
  605. package/es/components/pagination/pages-select.d.ts.map +0 -1
  606. package/es/components/pagination/pages-select.js +0 -185
  607. package/es/components/pagination/pages-select.js.map +0 -1
  608. package/es/components-react/data-table/table-expand-row.d.ts +0 -24
  609. package/es/components-react/data-table/table-expand-row.js +0 -33
  610. package/es/components-react/data-table/table-header-cell-skeleton.d.ts +0 -14
  611. package/es/components-react/data-table/table-header-expand-row.d.ts +0 -29
  612. package/es/components-react/data-table/table-header-expand-row.js +0 -37
  613. package/lib/components-react-node/data-table/table-expand-row.js +0 -47
  614. package/lib/components-react-node/data-table/table-header-expand-row.js +0 -51
  615. package/scss/components/data-table/_table-skeleton.scss +0 -27
@@ -7,31 +7,581 @@
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
9
  import { LitElement } from 'lit';
10
- import { TABLE_COLOR_SCHEME, TABLE_SIZE } from './defs';
11
- export { TABLE_COLOR_SCHEME, TABLE_SIZE };
10
+ import { TABLE_SIZE } from './defs';
11
+ export { TABLE_SIZE };
12
+ declare const CDSTable_base: {
13
+ new (...args: any[]): {
14
+ _handles: Set<import("../../globals/internal/handle").default>;
15
+ connectedCallback(): void;
16
+ disconnectedCallback(): void;
17
+ accessKey: string;
18
+ readonly accessKeyLabel: string;
19
+ autocapitalize: string;
20
+ dir: string;
21
+ draggable: boolean;
22
+ hidden: boolean;
23
+ inert: boolean;
24
+ innerText: string;
25
+ lang: string;
26
+ readonly offsetHeight: number;
27
+ readonly offsetLeft: number;
28
+ readonly offsetParent: Element | null;
29
+ readonly offsetTop: number;
30
+ readonly offsetWidth: number;
31
+ outerText: string;
32
+ spellcheck: boolean;
33
+ title: string;
34
+ translate: boolean;
35
+ attachInternals(): ElementInternals;
36
+ click(): void;
37
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions | undefined): void;
38
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | undefined): void;
39
+ removeEventListener<K_1 extends keyof HTMLElementEventMap>(type: K_1, listener: (this: HTMLElement, ev: HTMLElementEventMap[K_1]) => any, options?: boolean | EventListenerOptions | undefined): void;
40
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions | undefined): void;
41
+ readonly attributes: NamedNodeMap;
42
+ readonly classList: DOMTokenList;
43
+ className: string;
44
+ readonly clientHeight: number;
45
+ readonly clientLeft: number;
46
+ readonly clientTop: number;
47
+ readonly clientWidth: number;
48
+ id: string;
49
+ readonly localName: string;
50
+ readonly namespaceURI: string | null;
51
+ onfullscreenchange: ((this: Element, ev: Event) => any) | null;
52
+ onfullscreenerror: ((this: Element, ev: Event) => any) | null;
53
+ outerHTML: string;
54
+ readonly ownerDocument: Document;
55
+ readonly part: DOMTokenList;
56
+ readonly prefix: string | null;
57
+ readonly scrollHeight: number;
58
+ scrollLeft: number;
59
+ scrollTop: number;
60
+ readonly scrollWidth: number;
61
+ readonly shadowRoot: ShadowRoot | null;
62
+ slot: string;
63
+ readonly tagName: string;
64
+ attachShadow(init: ShadowRootInit): ShadowRoot;
65
+ closest<K_2 extends keyof HTMLElementTagNameMap>(selector: K_2): HTMLElementTagNameMap[K_2] | null;
66
+ closest<K_3 extends keyof SVGElementTagNameMap>(selector: K_3): SVGElementTagNameMap[K_3] | null;
67
+ closest<E extends Element = Element>(selectors: string): E | null;
68
+ getAttribute(qualifiedName: string): string | null;
69
+ getAttributeNS(namespace: string | null, localName: string): string | null;
70
+ getAttributeNames(): string[];
71
+ getAttributeNode(qualifiedName: string): Attr | null;
72
+ getAttributeNodeNS(namespace: string | null, localName: string): Attr | null;
73
+ getBoundingClientRect(): DOMRect;
74
+ getClientRects(): DOMRectList;
75
+ getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
76
+ getElementsByTagName<K_4 extends keyof HTMLElementTagNameMap>(qualifiedName: K_4): HTMLCollectionOf<HTMLElementTagNameMap[K_4]>;
77
+ getElementsByTagName<K_5 extends keyof SVGElementTagNameMap>(qualifiedName: K_5): HTMLCollectionOf<SVGElementTagNameMap[K_5]>;
78
+ getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
79
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
80
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
81
+ getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>;
82
+ hasAttribute(qualifiedName: string): boolean;
83
+ hasAttributeNS(namespace: string | null, localName: string): boolean;
84
+ hasAttributes(): boolean;
85
+ hasPointerCapture(pointerId: number): boolean;
86
+ insertAdjacentElement(where: InsertPosition, element: Element): Element | null;
87
+ insertAdjacentHTML(position: InsertPosition, text: string): void;
88
+ insertAdjacentText(where: InsertPosition, data: string): void;
89
+ matches(selectors: string): boolean;
90
+ releasePointerCapture(pointerId: number): void;
91
+ removeAttribute(qualifiedName: string): void;
92
+ removeAttributeNS(namespace: string | null, localName: string): void;
93
+ removeAttributeNode(attr: Attr): Attr;
94
+ requestFullscreen(options?: FullscreenOptions | undefined): Promise<void>;
95
+ requestPointerLock(): void;
96
+ scroll(options?: ScrollToOptions | undefined): void;
97
+ scroll(x: number, y: number): void;
98
+ scrollBy(options?: ScrollToOptions | undefined): void;
99
+ scrollBy(x: number, y: number): void;
100
+ scrollIntoView(arg?: boolean | ScrollIntoViewOptions | undefined): void;
101
+ scrollTo(options?: ScrollToOptions | undefined): void;
102
+ scrollTo(x: number, y: number): void;
103
+ setAttribute(qualifiedName: string, value: string): void;
104
+ setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void;
105
+ setAttributeNode(attr: Attr): Attr | null;
106
+ setAttributeNodeNS(attr: Attr): Attr | null;
107
+ setPointerCapture(pointerId: number): void;
108
+ toggleAttribute(qualifiedName: string, force?: boolean | undefined): boolean;
109
+ webkitMatchesSelector(selectors: string): boolean;
110
+ readonly baseURI: string;
111
+ readonly childNodes: NodeListOf<ChildNode>;
112
+ readonly firstChild: ChildNode | null;
113
+ readonly isConnected: boolean;
114
+ readonly lastChild: ChildNode | null;
115
+ readonly nextSibling: ChildNode | null;
116
+ readonly nodeName: string;
117
+ readonly nodeType: number;
118
+ nodeValue: string | null;
119
+ readonly parentElement: HTMLElement | null;
120
+ readonly parentNode: ParentNode | null;
121
+ readonly previousSibling: ChildNode | null;
122
+ textContent: string | null;
123
+ appendChild<T extends Node>(node: T): T;
124
+ cloneNode(deep?: boolean | undefined): Node;
125
+ compareDocumentPosition(other: Node): number;
126
+ contains(other: Node | null): boolean;
127
+ getRootNode(options?: GetRootNodeOptions | undefined): Node;
128
+ hasChildNodes(): boolean;
129
+ insertBefore<T_1 extends Node>(node: T_1, child: Node | null): T_1;
130
+ isDefaultNamespace(namespace: string | null): boolean;
131
+ isEqualNode(otherNode: Node | null): boolean;
132
+ isSameNode(otherNode: Node | null): boolean;
133
+ lookupNamespaceURI(prefix: string | null): string | null;
134
+ lookupPrefix(namespace: string | null): string | null;
135
+ normalize(): void;
136
+ removeChild<T_2 extends Node>(child: T_2): T_2;
137
+ replaceChild<T_3 extends Node>(node: Node, child: T_3): T_3;
138
+ readonly ATTRIBUTE_NODE: number;
139
+ readonly CDATA_SECTION_NODE: number;
140
+ readonly COMMENT_NODE: number;
141
+ readonly DOCUMENT_FRAGMENT_NODE: number;
142
+ readonly DOCUMENT_NODE: number;
143
+ readonly DOCUMENT_POSITION_CONTAINED_BY: number;
144
+ readonly DOCUMENT_POSITION_CONTAINS: number;
145
+ readonly DOCUMENT_POSITION_DISCONNECTED: number;
146
+ readonly DOCUMENT_POSITION_FOLLOWING: number;
147
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
148
+ readonly DOCUMENT_POSITION_PRECEDING: number;
149
+ readonly DOCUMENT_TYPE_NODE: number;
150
+ readonly ELEMENT_NODE: number;
151
+ readonly ENTITY_NODE: number;
152
+ readonly ENTITY_REFERENCE_NODE: number;
153
+ readonly NOTATION_NODE: number;
154
+ readonly PROCESSING_INSTRUCTION_NODE: number;
155
+ readonly TEXT_NODE: number;
156
+ dispatchEvent(event: Event): boolean;
157
+ ariaAtomic: string | null;
158
+ ariaAutoComplete: string | null;
159
+ ariaBusy: string | null;
160
+ ariaChecked: string | null;
161
+ ariaColCount: string | null;
162
+ ariaColIndex: string | null;
163
+ ariaColSpan: string | null;
164
+ ariaCurrent: string | null;
165
+ ariaDisabled: string | null;
166
+ ariaExpanded: string | null;
167
+ ariaHasPopup: string | null;
168
+ ariaHidden: string | null;
169
+ ariaKeyShortcuts: string | null;
170
+ ariaLabel: string | null;
171
+ ariaLevel: string | null;
172
+ ariaLive: string | null;
173
+ ariaModal: string | null;
174
+ ariaMultiLine: string | null;
175
+ ariaMultiSelectable: string | null;
176
+ ariaOrientation: string | null;
177
+ ariaPlaceholder: string | null;
178
+ ariaPosInSet: string | null;
179
+ ariaPressed: string | null;
180
+ ariaReadOnly: string | null;
181
+ ariaRequired: string | null;
182
+ ariaRoleDescription: string | null;
183
+ ariaRowCount: string | null;
184
+ ariaRowIndex: string | null;
185
+ ariaRowSpan: string | null;
186
+ ariaSelected: string | null;
187
+ ariaSetSize: string | null;
188
+ ariaSort: string | null;
189
+ ariaValueMax: string | null;
190
+ ariaValueMin: string | null;
191
+ ariaValueNow: string | null;
192
+ ariaValueText: string | null;
193
+ animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions | undefined): Animation;
194
+ getAnimations(options?: GetAnimationsOptions | undefined): Animation[];
195
+ after(...nodes: (string | Node)[]): void;
196
+ before(...nodes: (string | Node)[]): void;
197
+ remove(): void;
198
+ replaceWith(...nodes: (string | Node)[]): void;
199
+ innerHTML: string;
200
+ readonly nextElementSibling: Element | null;
201
+ readonly previousElementSibling: Element | null;
202
+ readonly childElementCount: number;
203
+ readonly children: HTMLCollection;
204
+ readonly firstElementChild: Element | null;
205
+ readonly lastElementChild: Element | null;
206
+ append(...nodes: (string | Node)[]): void;
207
+ prepend(...nodes: (string | Node)[]): void;
208
+ querySelector<K_6 extends keyof HTMLElementTagNameMap>(selectors: K_6): HTMLElementTagNameMap[K_6] | null;
209
+ querySelector<K_7 extends keyof SVGElementTagNameMap>(selectors: K_7): SVGElementTagNameMap[K_7] | null;
210
+ querySelector<E_1 extends Element = Element>(selectors: string): E_1 | null;
211
+ querySelectorAll<K_8 extends keyof HTMLElementTagNameMap>(selectors: K_8): NodeListOf<HTMLElementTagNameMap[K_8]>;
212
+ querySelectorAll<K_9 extends keyof SVGElementTagNameMap>(selectors: K_9): NodeListOf<SVGElementTagNameMap[K_9]>;
213
+ querySelectorAll<E_2 extends Element = Element>(selectors: string): NodeListOf<E_2>;
214
+ replaceChildren(...nodes: (string | Node)[]): void;
215
+ readonly assignedSlot: HTMLSlotElement | null;
216
+ oncopy: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
217
+ oncut: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
218
+ onpaste: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null;
219
+ readonly style: CSSStyleDeclaration;
220
+ contentEditable: string;
221
+ enterKeyHint: string;
222
+ inputMode: string;
223
+ readonly isContentEditable: boolean;
224
+ onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
225
+ onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
226
+ onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
227
+ onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
228
+ onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null;
229
+ onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
230
+ onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
231
+ oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
232
+ oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null;
233
+ onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
234
+ onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
235
+ onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null;
236
+ oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
237
+ oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
238
+ ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
239
+ ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
240
+ ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
241
+ ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
242
+ ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
243
+ ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
244
+ ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
245
+ ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null;
246
+ ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
247
+ onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null;
248
+ onended: ((this: GlobalEventHandlers, ev: Event) => any) | null;
249
+ onerror: OnErrorEventHandler;
250
+ onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null;
251
+ onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null;
252
+ ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
253
+ oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null;
254
+ oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null;
255
+ onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
256
+ onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
257
+ onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null;
258
+ onload: ((this: GlobalEventHandlers, ev: Event) => any) | null;
259
+ onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
260
+ onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null;
261
+ onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
262
+ onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
263
+ onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
264
+ onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
265
+ onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
266
+ onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
267
+ onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
268
+ onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
269
+ onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null;
270
+ onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null;
271
+ onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null;
272
+ onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null;
273
+ onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
274
+ onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
275
+ onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
276
+ onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
277
+ onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
278
+ onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
279
+ onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
280
+ onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null;
281
+ onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent<EventTarget>) => any) | null;
282
+ onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
283
+ onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null;
284
+ onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null;
285
+ onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null;
286
+ onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null;
287
+ onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null;
288
+ onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null;
289
+ onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null;
290
+ onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
291
+ onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
292
+ onslotchange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
293
+ onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null;
294
+ onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null;
295
+ onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
296
+ ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null;
297
+ ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null;
298
+ ontouchcancel?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
299
+ ontouchend?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
300
+ ontouchmove?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
301
+ ontouchstart?: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null | undefined;
302
+ ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
303
+ ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
304
+ ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
305
+ ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null;
306
+ onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null;
307
+ onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null;
308
+ onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
309
+ onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null;
310
+ onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null;
311
+ onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null;
312
+ onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null;
313
+ autofocus: boolean;
314
+ readonly dataset: DOMStringMap;
315
+ nonce?: string | undefined;
316
+ tabIndex: number;
317
+ blur(): void;
318
+ focus(options?: FocusOptions | undefined): void;
319
+ };
320
+ _hostListeners: {
321
+ [listenerName: string]: {
322
+ [type: string]: {
323
+ options?: boolean | AddEventListenerOptions | undefined;
324
+ };
325
+ };
326
+ };
327
+ } & typeof LitElement;
12
328
  /**
13
329
  * Data table.
14
330
  *
15
331
  * @element cds-table
16
332
  */
17
- declare class BXTable extends LitElement {
333
+ declare class CDSTable extends CDSTable_base {
334
+ /**
335
+ * The map of how sorting direction affects sorting order.
336
+ */
337
+ private collationFactors;
338
+ /**
339
+ * Reference to download button
340
+ */
341
+ private _downloadButton;
342
+ /**
343
+ * Current search value for filtering
344
+ */
345
+ private _searchValue;
346
+ /**
347
+ * Table header row within component
348
+ */
349
+ private _tableHeaderRow;
350
+ /**
351
+ * Table body
352
+ */
353
+ private _tableBody;
354
+ /**
355
+ * Table expanded row within component
356
+ */
357
+ private _tableExpandedRows;
358
+ /**
359
+ * Table rows within component
360
+ */
361
+ private _tableRows;
362
+ /**
363
+ * Reference to the component containing batch actions
364
+ */
365
+ private _tableBatchActions;
366
+ /**
367
+ * Reference to the table toolbar
368
+ */
369
+ private _tableToolbar;
370
+ /**
371
+ * Reference to the table toolbar content
372
+ */
373
+ private _tableToolbarContent;
374
+ private _selectedRows;
375
+ /**
376
+ * `true` if this table should support batch expansion
377
+ */
378
+ batchExpansion: boolean;
379
+ /**
380
+ * The g11n collator to use.
381
+ */
382
+ collator: any;
383
+ /**
384
+ * @param lhs A value.
385
+ * @param rhs Another value.
386
+ * @param collator A custom collator.
387
+ * @returns
388
+ * `0` if the given two values are equal
389
+ * A negative value to sort `lhs` to an index lower than `rhs`
390
+ * A positive value to sort `rhs` to an index lower than `lhs`
391
+ */
392
+ customSortRow(lhs: any, rhs: any, collator: any): any;
393
+ /**
394
+ * Specify whether the rows should be able to be expandable
395
+ */
396
+ expandable: boolean;
397
+ /**
398
+ * The method used when filtering the table with the search bar.
399
+ * Can be replaced with custom method.
400
+ *
401
+ * @param row A table row.
402
+ * @param searchString A search string.
403
+ * @returns `false` if the given table row matches the given search string.
404
+ */
405
+ filterRows: (rowText: string, searchString: string) => boolean;
406
+ /**
407
+ * The total headers
408
+ */
409
+ headerCount: number;
410
+ /**
411
+ * `true` if this table contains selectable rows
412
+ */
413
+ isSelectable: boolean;
414
+ /**
415
+ * `true` if this table should support sorting.
416
+ */
417
+ isSortable: boolean;
418
+ /**
419
+ * The table size.
420
+ */
421
+ locale: string;
422
+ /**
423
+ * Specify whether the overflow menu (if it exists) should be shown always, or only on hover
424
+ */
425
+ overflowMenuOnHover: boolean;
426
+ /**
427
+ * Specify whether the control should be a radio button or inline checkbox
428
+ */
429
+ radio: boolean;
18
430
  /**
19
431
  * The table size.
20
432
  */
21
433
  size: TABLE_SIZE;
22
434
  /**
23
- * `true` if this table should support sorting.
435
+ * TODO: Uncomment when Carbon fully implements sticky header
436
+ * Specify whether the header should be sticky.
437
+ * Still experimental: may not work with every combination of table props
438
+ */
439
+ /**
440
+ * If true, will use a width of 'auto' instead of 100%
441
+ */
442
+ useStaticWidth: boolean;
443
+ /**
444
+ * true to add useZebraStyles striping.
24
445
  */
25
- sort: boolean;
446
+ useZebraStyles: boolean;
447
+ withHeader: any;
448
+ private _handleSlotChange;
449
+ private _handleFilterRows;
450
+ /**
451
+ * Download manager for selected rows.
452
+ */
453
+ private _handleDownload;
454
+ /**
455
+ * Handles batch expansion
456
+ */
457
+ private _handleBatchExpansion;
458
+ /**
459
+ * Handles sorting the table depending on the column selected
460
+ */
461
+ private _handleSort;
462
+ /**
463
+ * Handles search input within the toolbar actions
464
+ */
465
+ private _handleSearchInput;
466
+ /**
467
+ * Handles row selection
468
+ */
469
+ private _handleRowSelect;
470
+ /**
471
+ * Handles header row selection, selecting/unselecting all rows
472
+ */
473
+ private _handleAllRowsSelect;
474
+ /**
475
+ * Handles cancel button within the toolbar actions
476
+ */
477
+ private _handleCancelSelection;
26
478
  connectedCallback(): void;
479
+ firstUpdated(): void;
27
480
  updated(changedProperties: any): void;
28
481
  render(): import("lit-html").TemplateResult<1>;
482
+ /**
483
+ * The name of the custom event fired before a new sort direction is set upon a user gesture.
484
+ * Cancellation of this event stops the user-initiated change in sort direction.
485
+ */
486
+ static get eventBeforeSort(): string;
487
+ /**
488
+ * The name of the custom event fired during search bar input
489
+ */
490
+ static get eventSearchInput(): string;
491
+ /**
492
+ * The name of the custom event fired before header row is selected/unselected upon a user gesture.
493
+ */
494
+ static get eventBeforeChangeSelectionAll(): string;
495
+ /**
496
+ * The name of the custom event fired before a row is selected/unselected upon a user gesture.
497
+ */
498
+ static get eventBeforeChangeSelection(): string;
499
+ /**
500
+ * The name of the custom event fired after the Cancel button is clicked.
501
+ */
502
+ static get eventClickCancel(): string;
503
+ /**
504
+ * The name of the custom event fired after the expanded state a row is toggled upon a user gesture.
505
+ */
506
+ static get eventExpandoToggle(): string;
507
+ /**
508
+ * The name of the custom event fired after a row has been selected
509
+ */
510
+ static get eventTableRowSelect(): string;
511
+ /**
512
+ * The name of the custom event fired after all rows have been selected
513
+ */
514
+ static get eventTableRowSelectAll(): string;
515
+ /**
516
+ * The name of the custom event fired after the table has been sorted
517
+ */
518
+ static get eventTableSorted(): string;
519
+ /**
520
+ * The name of the custom event fired after the table has been filtered containing remaining rows.
521
+ */
522
+ static get eventTableFiltered(): string;
523
+ /**
524
+ * The CSS selector to find the overflow menu on the table cell
525
+ */
526
+ static get selectorTableCellOverflowMenu(): string;
527
+ /**
528
+ * The CSS selector to find the download button
529
+ */
530
+ static get selectorToolbarDownload(): string;
531
+ /**
532
+ * The CSS selector to find the table batch actions
533
+ */
534
+ static get selectorTableBatchActions(): string;
535
+ /**
536
+ * The CSS selector to find the table toolbar
537
+ */
538
+ static get selectorTableToolbar(): string;
539
+ /**
540
+ * The CSS selector to find the table toolbar content
541
+ */
542
+ static get selectorTableToolbarContent(): string;
543
+ /**
544
+ * The CSS selector to find the table toolbar search
545
+ */
546
+ static get selectorTableToolbarSearch(): string;
547
+ /**
548
+ * The CSS selector to find the table head
549
+ */
550
+ static get selectorTableHead(): string;
551
+ /**
552
+ * The CSS selector to find the table body
553
+ */
554
+ static get selectorTableBody(): string;
555
+ /**
556
+ * The CSS selector to find the table expanded rows
557
+ */
558
+ static get selectorTableExpandedRows(): string;
559
+ /**
560
+ * The CSS selector to find the table rows
561
+ */
562
+ static get selectorTableRow(): string;
563
+ /**
564
+ * The CSS selector to find the rows cells.
565
+ */
566
+ static get selectorTableRowCells(): string;
567
+ /**
568
+ * The CSS selector to find the rows cells, including header cells.
569
+ */
570
+ static get selectorTableCells(): string;
571
+ /**
572
+ * The CSS selector to find the header cell
573
+ */
574
+ static get selectorHeaderCell(): string;
29
575
  /**
30
576
  * The CSS selector to find the rows, including header rows.
31
577
  */
32
578
  static get selectorRowsWithHeader(): string;
579
+ /**
580
+ * The CSS selector to find all rows
581
+ */
582
+ static get selectorAllRows(): string;
33
583
  static styles: any;
34
584
  }
35
- export default BXTable;
585
+ export default CDSTable;
36
586
 
37
587
  //# sourceMappingURL=table.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/data-table/table.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAIvC,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGxD,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,CAAC;AAE1C;;;;GAIG;AACH,cACM,OAAQ,SAAQ,UAAU;IAC9B;;OAEG;IAEH,IAAI,aAAiB;IAErB;;OAEG;IAEH,IAAI,UAAS;IAEb,iBAAiB;IAOjB,OAAO,CAAC,iBAAiB,KAAA;IAczB,MAAM;IAIN;;OAEG;IACH,MAAM,KAAK,sBAAsB,WAEhC;IAED,MAAM,CAAC,MAAM,MAAU;CACxB;AAED,eAAe,OAAO,CAAC","file":"table.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019, 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, html } from 'lit';\nimport { property, customElement } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport { forEach } from '../../globals/internal/collection-helpers';\nimport { TABLE_COLOR_SCHEME, TABLE_SIZE } from './defs';\nimport styles from './data-table.scss';\n\nexport { TABLE_COLOR_SCHEME, TABLE_SIZE };\n\n/**\n * Data table.\n *\n * @element cds-table\n */\n@customElement(`${prefix}-table`)\nclass BXTable extends LitElement {\n /**\n * The table size.\n */\n @property({ reflect: true })\n size = TABLE_SIZE.LG;\n\n /**\n * `true` if this table should support sorting.\n */\n @property({ type: Boolean, reflect: true })\n sort = false;\n\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'table');\n }\n super.connectedCallback();\n }\n\n updated(changedProperties) {\n if (changedProperties.has('size')) {\n // Propagate `size` attribute to descendants until `:host-context()` gets supported in all major browsers\n forEach(\n this.querySelectorAll(\n (this.constructor as typeof BXTable).selectorRowsWithHeader\n ),\n (elem) => {\n elem.setAttribute('size', this.size);\n }\n );\n }\n }\n\n render() {\n return html` <slot></slot> `;\n }\n\n /**\n * The CSS selector to find the rows, including header rows.\n */\n static get selectorRowsWithHeader() {\n return `${prefix}-table-header-row,${prefix}-table-row`;\n }\n\n static styles = styles;\n}\n\nexport default BXTable;\n"]}
1
+ {"version":3,"sources":["components/data-table/table.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAIvC,OAAO,EAAE,UAAU,EAAwB,MAAM,QAAQ,CAAC;AAgB1D,OAAO,EAAE,UAAU,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtB;;;;GAIG;AACH,cACM,QAAS,SAAQ,aAA6B;IAClD;;OAEG;IACH,OAAO,CAAC,gBAAgB,CAGtB;IAEF;;OAEG;IAEH,OAAO,CAAC,eAAe,CAAC;IAExB;;OAEG;IAEH,OAAO,CAAC,YAAY,CAAM;IAE1B;;OAEG;IAEH,OAAO,CAAC,eAAe,CAAC;IAExB;;OAEG;IAEH,OAAO,CAAC,UAAU,CAAC;IAEnB;;OAEG;IAEH,OAAO,CAAC,kBAAkB,CAAC;IAE3B;;OAEG;IAEH,OAAO,CAAC,UAAU,CAAC;IAEnB;;OAEG;IAEH,OAAO,CAAC,kBAAkB,CAAC;IAE3B;;OAEG;IAEH,OAAO,CAAC,aAAa,CAAC;IAEtB;;OAEG;IAEH,OAAO,CAAC,oBAAoB,CAAC;IAG7B,OAAO,CAAC,aAAa,CAAqB;IAE1C;;OAEG;IAEH,cAAc,UAAS;IAEvB;;OAEG;IAEH,QAAQ,MAAC;IAET;;;;;;;;OAQG;IAEH,aAAa,CAAC,GAAG,KAAA,EAAE,GAAG,KAAA,EAAE,QAAQ,KAAA;IAOhC;;OAEG;IAEH,UAAU,UAAS;IAEnB;;;;;;;OAOG;IAEH,UAAU,YAAa,MAAM,gBAAgB,MAAM,aACD;IAElD;;OAEG;IAEH,WAAW,SAAK;IAEhB;;OAEG;IAEH,YAAY,UAAS;IAErB;;OAEG;IAEH,UAAU,UAAS;IAEnB;;OAEG;IAEH,MAAM,SAAQ;IAEd;;OAEG;IAMH,mBAAmB,UAAS;IAE5B;;OAEG;IAEH,KAAK,UAAS;IAEd;;OAEG;IAEH,IAAI,aAAiB;IAErB;;;;OAIG;IAIH;;OAEG;IAEH,cAAc,UAAS;IAEvB;;OAEG;IAEH,cAAc,UAAS;IAGvB,UAAU,MAAC;IAEX,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,iBAAiB;IAgCzB;;OAEG;IACH,OAAO,CAAC,eAAe;IAiCvB;;OAEG;IAGH,OAAO,CAAC,qBAAqB,CAO3B;IAEF;;OAEG;IAGH,OAAO,CAAC,WAAW,CA0EjB;IAEF;;OAEG;IAGH,OAAO,CAAC,kBAAkB,CAQxB;IAEF;;OAEG;IAGH,OAAO,CAAC,gBAAgB,CAmEtB;IAEF;;OAEG;IAGH,OAAO,CAAC,oBAAoB,CAiE1B;IAEF;;OAEG;IAGH,OAAO,CAAC,sBAAsB,CAU5B;IAEF,iBAAiB;IAOjB,YAAY;IAiCZ,OAAO,CAAC,iBAAiB,KAAA;IAuHzB,MAAM;IAmBN;;;OAGG;IACH,MAAM,KAAK,eAAe,WAEzB;IAED;;OAEG;IACH,MAAM,KAAK,gBAAgB,WAE1B;IAED;;OAEG;IACH,MAAM,KAAK,6BAA6B,WAEvC;IAED;;OAEG;IACH,MAAM,KAAK,0BAA0B,WAEpC;IAED;;OAEG;IACH,MAAM,KAAK,gBAAgB,WAE1B;IAED;;OAEG;IACH,MAAM,KAAK,kBAAkB,WAE5B;IAED;;OAEG;IACH,MAAM,KAAK,mBAAmB,WAE7B;IAED;;OAEG;IACH,MAAM,KAAK,sBAAsB,WAEhC;IAED;;OAEG;IACH,MAAM,KAAK,gBAAgB,WAE1B;IAED;;OAEG;IACH,MAAM,KAAK,kBAAkB,WAE5B;IAED;;OAEG;IACH,MAAM,KAAK,6BAA6B,WAEvC;IAED;;OAEG;IACH,MAAM,KAAK,uBAAuB,WAEjC;IAED;;OAEG;IACH,MAAM,KAAK,yBAAyB,WAEnC;IAED;;OAEG;IACH,MAAM,KAAK,oBAAoB,WAE9B;IAED;;OAEG;IACH,MAAM,KAAK,2BAA2B,WAErC;IAED;;OAEG;IACH,MAAM,KAAK,0BAA0B,WAEpC;IAED;;OAEG;IACH,MAAM,KAAK,iBAAiB,WAE3B;IAED;;OAEG;IACH,MAAM,KAAK,iBAAiB,WAE3B;IAED;;OAEG;IACH,MAAM,KAAK,yBAAyB,WAEnC;IAED;;OAEG;IACH,MAAM,KAAK,gBAAgB,WAE1B;IAED;;OAEG;IACH,MAAM,KAAK,qBAAqB,WAE/B;IAED;;OAEG;IACH,MAAM,KAAK,kBAAkB,WAE5B;IAED;;OAEG;IACH,MAAM,KAAK,kBAAkB,WAE5B;IAED;;OAEG;IACH,MAAM,KAAK,sBAAsB,WAEhC;IAED;;OAEG;IACH,MAAM,KAAK,eAAe,WAEzB;IAED,MAAM,CAAC,MAAM,MAAU;CACxB;AAED,eAAe,QAAQ,CAAC","file":"table.d.ts","sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2019, 2023\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, html } from 'lit';\nimport { property, customElement, state } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport { forEach } from '../../globals/internal/collection-helpers';\nimport { TABLE_SIZE, TABLE_SORT_DIRECTION } from './defs';\nimport styles from './data-table.scss';\n\nimport HostListener from '../../globals/decorators/host-listener';\nimport HostListenerMixin from '../../globals/mixins/host-listener';\nimport {\n CDSRadioButton,\n CDSTableBatchActions,\n CDSTableCell,\n CDSTableHeaderCell,\n CDSTableHeaderRow,\n CDSTableRow,\n CDSTableToolbarSearch,\n} from '../..';\nimport CDSTableExpandedRow from './table-expanded-row';\n\nexport { TABLE_SIZE };\n\n/**\n * Data table.\n *\n * @element cds-table\n */\n@customElement(`${prefix}-table`)\nclass CDSTable extends HostListenerMixin(LitElement) {\n /**\n * The map of how sorting direction affects sorting order.\n */\n private collationFactors = {\n [TABLE_SORT_DIRECTION.ASCENDING]: 1,\n [TABLE_SORT_DIRECTION.DESCENDING]: -1,\n };\n\n /**\n * Reference to download button\n */\n @state()\n private _downloadButton;\n\n /**\n * Current search value for filtering\n */\n @state()\n private _searchValue = '';\n\n /**\n * Table header row within component\n */\n @state()\n private _tableHeaderRow;\n\n /**\n * Table body\n */\n @state()\n private _tableBody;\n\n /**\n * Table expanded row within component\n */\n @state()\n private _tableExpandedRows;\n\n /**\n * Table rows within component\n */\n @state()\n private _tableRows;\n\n /**\n * Reference to the component containing batch actions\n */\n @state()\n private _tableBatchActions;\n\n /**\n * Reference to the table toolbar\n */\n @state()\n private _tableToolbar;\n\n /**\n * Reference to the table toolbar content\n */\n @state()\n private _tableToolbarContent;\n\n @state()\n private _selectedRows: CDSTableRow[] = [];\n\n /**\n * `true` if this table should support batch expansion\n */\n @property({ type: Boolean, reflect: true, attribute: 'batch-expansion' })\n batchExpansion = false;\n\n /**\n * The g11n collator to use.\n */\n @property({ attribute: false })\n collator;\n\n /**\n * @param lhs A value.\n * @param rhs Another value.\n * @param collator A custom collator.\n * @returns\n * `0` if the given two values are equal\n * A negative value to sort `lhs` to an index lower than `rhs`\n * A positive value to sort `rhs` to an index lower than `lhs`\n */\n // eslint-disable-next-line class-methods-use-this\n customSortRow(lhs, rhs, collator) {\n if (typeof lhs === 'number' && typeof rhs === 'number') {\n return lhs - rhs;\n }\n return collator.compare(lhs, rhs);\n }\n\n /**\n * Specify whether the rows should be able to be expandable\n */\n @property({ type: Boolean, reflect: true })\n expandable = false;\n\n /**\n * The method used when filtering the table with the search bar.\n * Can be replaced with custom method.\n *\n * @param row A table row.\n * @param searchString A search string.\n * @returns `false` if the given table row matches the given search string.\n */\n @property()\n filterRows = (rowText: string, searchString: string) =>\n rowText.toLowerCase().indexOf(searchString) < 0;\n\n /**\n * The total headers\n */\n @property()\n headerCount = 0;\n\n /**\n * `true` if this table contains selectable rows\n */\n @property({ type: Boolean, reflect: true, attribute: 'is-selectable' })\n isSelectable = false;\n\n /**\n * `true` if this table should support sorting.\n */\n @property({ type: Boolean, reflect: true, attribute: 'is-sortable' })\n isSortable = false;\n\n /**\n * The table size.\n */\n @property({ reflect: true })\n locale = 'en';\n\n /**\n * Specify whether the overflow menu (if it exists) should be shown always, or only on hover\n */\n @property({\n type: Boolean,\n reflect: true,\n attribute: 'overflow-menu-on-hover',\n })\n overflowMenuOnHover = false;\n\n /**\n * Specify whether the control should be a radio button or inline checkbox\n */\n @property({ type: Boolean, reflect: true })\n radio = false;\n\n /**\n * The table size.\n */\n @property({ reflect: true })\n size = TABLE_SIZE.LG;\n\n /**\n * TODO: Uncomment when Carbon fully implements sticky header\n * Specify whether the header should be sticky.\n * Still experimental: may not work with every combination of table props\n */\n // @property({ type: Boolean, attribute: 'sticky-header', reflect: true })\n // stickyHeader = false;\n\n /**\n * If true, will use a width of 'auto' instead of 100%\n */\n @property({ type: Boolean, attribute: 'use-static-width', reflect: true })\n useStaticWidth = false;\n\n /**\n * true to add useZebraStyles striping.\n */\n @property({ type: Boolean, attribute: 'use-zebra-styles', reflect: true })\n useZebraStyles = false;\n\n @property({ type: Boolean, attribute: 'with-header', reflect: true })\n withHeader;\n\n private _handleSlotChange({ target }: Event) {\n const hasContent = (target as HTMLSlotElement)\n .assignedNodes()\n .some(\n (node) => node.nodeType !== Node.TEXT_NODE || node!.textContent!.trim()\n );\n this.withHeader = hasContent;\n }\n\n private _handleFilterRows() {\n const unfilteredRows = [] as any;\n forEach(this._tableRows, (elem) => {\n const rowText = elem.textContent?.trim();\n const filtered = this.filterRows(rowText as string, this._searchValue);\n (elem as any).filtered = filtered;\n\n if (!filtered) {\n unfilteredRows.push(elem);\n }\n\n if (this.expandable) {\n (elem as any).nextElementSibling.filtered = filtered;\n }\n });\n\n const init = {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n unfilteredRows,\n },\n };\n this.dispatchEvent(\n new CustomEvent(\n (this.constructor as typeof CDSTable).eventTableFiltered,\n init\n )\n );\n }\n\n /**\n * Download manager for selected rows.\n */\n private _handleDownload({ target }) {\n const data = [] as any;\n\n const elementsToArray = (elements) =>\n Array.from(elements, (element) => (element as any).textContent);\n\n const headerCells = this.querySelectorAll(\n (this.constructor as typeof CDSTable).selectorHeaderCell\n );\n const rows = this._selectedRows;\n const headerTitleArray = elementsToArray(headerCells);\n\n rows.forEach((row) => {\n const rowData = {};\n const cells = elementsToArray(\n row.querySelectorAll(\n (this.constructor as typeof CDSTable).selectorTableRowCells\n )\n );\n\n cells.forEach((cellText, index) => {\n const headerTitle = headerTitleArray[index];\n rowData[headerTitle] = cellText;\n });\n\n data.push(rowData);\n });\n\n const blob = new Blob([JSON.stringify(data)], { type: 'application/json' });\n\n target.href = URL.createObjectURL(blob);\n }\n\n /**\n * Handles batch expansion\n */\n @HostListener('eventExpandoToggle')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleBatchExpansion = async (event: CustomEvent) => {\n const { detail, target } = event;\n const { expanded } = detail;\n\n if ((target as CDSTableHeaderRow) === this._tableHeaderRow) {\n this._tableRows.forEach((e) => ((e as CDSTableRow).expanded = expanded));\n }\n };\n\n /**\n * Handles sorting the table depending on the column selected\n */\n @HostListener('eventBeforeSort')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleSort = async (event: CustomEvent) => {\n const { detail, target } = event;\n const { sortDirection } = detail;\n\n if (!this.contains(target as any)) {\n return;\n }\n\n const rows = [...this._tableRows];\n const columns = [...this._tableHeaderRow.children];\n const columnIndex = columns.indexOf(target);\n\n columns.forEach(\n (e) => e !== target && e.setAttribute('sort-direction', 'none')\n );\n\n // regular row sorting\n rows.sort((a, b) => {\n const cellA = a.querySelectorAll(\n (this.constructor as typeof CDSTable).selectorTableRowCells\n )[columnIndex].textContent;\n const cellB = b.querySelectorAll(\n (this.constructor as typeof CDSTable).selectorTableRowCells\n )[columnIndex].textContent;\n return (\n this.collationFactors[sortDirection] *\n this.customSortRow(cellA, cellB, this.collator)\n );\n });\n\n // take into account the expanded rows, mapping each expandable row to its original for proper reinsertion\n if (this.expandable) {\n const originalRows = [...this._tableRows];\n const expandedRows = [...this._tableExpandedRows];\n\n const mapping = originalRows.reduce((acc, element, index) => {\n const sortId = element.getAttribute('sort-id');\n acc[sortId] = expandedRows[index];\n return acc;\n }, {});\n\n const sortedWithExpanded = [] as any;\n\n rows.forEach((e) => {\n const sortId = e.getAttribute('sort-id');\n sortedWithExpanded.push(e);\n sortedWithExpanded.push(mapping[sortId]);\n });\n\n sortedWithExpanded.forEach((e) => {\n this._tableBody.insertBefore(e, null);\n });\n } else {\n rows.forEach((e) => {\n this._tableBody.insertBefore(e, null);\n });\n }\n\n const init = {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n sortedHeader: columns[columnIndex],\n },\n };\n this.dispatchEvent(\n new CustomEvent(\n (this.constructor as typeof CDSTable).eventTableSorted,\n init\n )\n );\n\n this._handleFilterRows();\n };\n\n /**\n * Handles search input within the toolbar actions\n */\n @HostListener('eventSearchInput')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleSearchInput = async (event: CustomEvent) => {\n const { detail, target } = event;\n\n if (this.contains(target as CDSTableToolbarSearch)) {\n const { value } = detail;\n this._searchValue = value;\n this._handleFilterRows();\n }\n };\n\n /**\n * Handles row selection\n */\n @HostListener('eventBeforeChangeSelection')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleRowSelect = async (event: CustomEvent) => {\n const { detail, target } = event;\n const { selected } = detail;\n const {\n _tableBatchActions: tableBatchActions,\n _tableToolbarContent: tableToolbarContent,\n _tableHeaderRow: tableHeaderRow,\n _selectedRows: selectedRows,\n } = this;\n\n if (!this.contains(target as CDSTableRow)) {\n return;\n }\n\n if (this.radio) {\n this._tableRows.forEach((e) => {\n if (e !== target) {\n e.removeAttribute('selected');\n e.shadowRoot!.querySelector(`${prefix}-radio-button`).checked = false;\n }\n });\n this._selectedRows.push(...[target as CDSTableRow]);\n } else {\n if (selectedRows.includes(target as CDSTableRow)) {\n this._selectedRows = selectedRows.filter((e) => e !== target);\n } else {\n selectedRows.push(target as CDSTableRow);\n }\n\n if (tableBatchActions) {\n tableBatchActions.active = this._selectedRows?.length;\n tableBatchActions.selectedRowsCount += selected ? 1 : -1;\n }\n\n if (tableToolbarContent) {\n tableToolbarContent.hasBatchActions = this._selectedRows.length;\n }\n }\n\n const totalRows = [...this._tableRows].filter(\n (elem) => !elem.hasAttribute('filtered')\n ).length;\n\n // selected header checkbox upon all rows being selected\n const headerCheckbox = tableHeaderRow.shadowRoot\n ?.querySelector(`${prefix}-checkbox`)\n .shadowRoot.querySelector(`.${prefix}--checkbox`);\n const allRowsSelected = this._selectedRows.length === totalRows;\n headerCheckbox.checked = !this._selectedRows.length ? false : true;\n headerCheckbox.indeterminate =\n !allRowsSelected && this._selectedRows.length > 0;\n\n const init = {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n selectedRow: target,\n selectedRows: selectedRows,\n },\n };\n this.dispatchEvent(\n new CustomEvent(\n (this.constructor as typeof CDSTable).eventTableRowSelect,\n init\n )\n );\n };\n\n /**\n * Handles header row selection, selecting/unselecting all rows\n */\n @HostListener('eventBeforeChangeSelectionAll')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleAllRowsSelect = async (event: CustomEvent) => {\n const { detail, target } = event;\n const { selected } = detail;\n const {\n _tableBatchActions: tableBatchActions,\n _tableToolbarContent: tableToolbarContent,\n _tableRows: tableRows,\n } = this;\n\n if (!this.contains(target as CDSTableRow)) {\n return;\n }\n\n let totalRows = 0;\n forEach(tableRows, (elem) => {\n if (!(elem as CDSTableRow).filtered) {\n (elem as CDSTableRow).selected = selected;\n this.radio\n ? ((\n (elem as CDSTableRow).shadowRoot!.querySelector(\n `${prefix}-radio-button`\n ) as CDSRadioButton\n ).checked = selected)\n : null;\n this._selectedRows.push(elem as CDSTableRow);\n totalRows++;\n\n const { selectorTableExpandedRows } = this\n .constructor as typeof CDSTable;\n const { nextElementSibling } = elem;\n\n // selecting the expanded row as well\n if (nextElementSibling?.matches(selectorTableExpandedRows)) {\n (elem.nextElementSibling as CDSTableExpandedRow).selected = selected;\n }\n }\n });\n\n if (!selected) {\n this._selectedRows = [];\n }\n\n if (tableBatchActions) {\n tableBatchActions.selectedRowsCount = selected ? totalRows : 0;\n tableBatchActions.active = selected;\n }\n\n if (tableToolbarContent) {\n tableToolbarContent.hasBatchActions = selected;\n }\n\n const init = {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n selectedRows: this._selectedRows,\n },\n };\n this.dispatchEvent(\n new CustomEvent(\n (this.constructor as typeof CDSTable).eventTableRowSelectAll,\n init\n )\n );\n };\n\n /**\n * Handles cancel button within the toolbar actions\n */\n @HostListener('eventClickCancel')\n // @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to\n private _handleCancelSelection = async (event: CustomEvent) => {\n const { target } = event;\n const { _tableHeaderRow: tableHeaderRow } = this;\n\n if (this.contains(target as CDSTableBatchActions)) {\n tableHeaderRow.shadowRoot\n ?.querySelector(`${prefix}-checkbox`)\n .shadowRoot.querySelector(`.${prefix}--checkbox`)\n .click();\n }\n };\n\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'table');\n }\n super.connectedCallback();\n }\n\n firstUpdated() {\n this._tableBatchActions = this.querySelector(\n (this.constructor as typeof CDSTable).selectorTableBatchActions\n );\n this._tableToolbar = this.querySelector(\n (this.constructor as typeof CDSTable).selectorTableToolbar\n );\n this._tableToolbarContent = this.querySelector(\n (this.constructor as typeof CDSTable).selectorTableToolbarContent\n );\n this._tableBody = this.querySelector(\n (this.constructor as typeof CDSTable).selectorTableBody\n );\n this._tableHeaderRow = this.querySelector(\n (this.constructor as typeof CDSTable).selectorRowsWithHeader\n );\n this._tableExpandedRows = this.querySelectorAll(\n (this.constructor as typeof CDSTable).selectorTableExpandedRows\n );\n\n this._tableRows = this.querySelectorAll(\n (this.constructor as typeof CDSTable).selectorTableRow\n );\n\n this._downloadButton = this.querySelector(\n (this.constructor as typeof CDSTable).selectorToolbarDownload\n );\n if (this._downloadButton) {\n this._downloadButton.onclick = this._handleDownload.bind(this);\n }\n this.headerCount = this._tableHeaderRow.children.length;\n }\n\n updated(changedProperties) {\n if (changedProperties.has('expandable')) {\n this._tableRows.forEach((e, index) => {\n e.expandable = this.expandable;\n e.setAttribute('sort-id', index);\n });\n this._tableHeaderRow.expandable = this.expandable;\n this._tableHeaderRow.batchExpansion = this.batchExpansion;\n this.headerCount += this.expandable ? 1 : -1;\n }\n\n if (changedProperties.has('headerCount')) {\n this._tableExpandedRows.forEach((e) => {\n e.setAttribute('colspan', this.headerCount);\n });\n }\n\n if (changedProperties.has('isSelectable')) {\n this.headerCount++;\n }\n\n if (changedProperties.has('isSortable')) {\n const headerCells = this.querySelectorAll(\n (this.constructor as typeof CDSTable).selectorHeaderCell\n );\n headerCells.forEach((e) => {\n (e as CDSTableHeaderCell).isSortable = this.isSortable;\n (e as CDSTableHeaderCell).removeAttribute('sort-direction');\n (e as CDSTableHeaderCell).isSelectable = this.isSelectable;\n (e as CDSTableHeaderCell).isExpandable = this.expandable;\n });\n }\n\n if (changedProperties.has('locale')) {\n this.collator = new Intl.Collator(this.locale);\n }\n\n if (\n changedProperties.has('overflowMenuOnHover') ||\n changedProperties.has('size')\n ) {\n forEach(\n this.querySelectorAll(\n (this.constructor as typeof CDSTable).selectorTableCellOverflowMenu\n ),\n (elem) => {\n const cell = elem.parentNode as CDSTableCell;\n const row = cell.parentNode as CDSTableRow;\n cell.overflowMenuOnHover = this.overflowMenuOnHover;\n row.overflowMenuOnHover = this.overflowMenuOnHover;\n cell.setAttribute('size', this.size);\n elem.setAttribute('size', this.size);\n elem.setAttribute('data-table', '');\n }\n );\n }\n\n if (changedProperties.has('radio')) {\n // Propagate `size` attribute to descendants until `:host-context()` gets supported in all major browsers\n forEach(\n this.querySelectorAll(\n (this.constructor as typeof CDSTable).selectorTableRow\n ),\n (elem) => {\n (elem as CDSTableRow).radio = this.radio;\n }\n );\n }\n\n if (changedProperties.has('size')) {\n // Propagate `size` attribute to descendants until `:host-context()` gets supported in all major browsers\n forEach(\n this.querySelectorAll(\n (this.constructor as typeof CDSTable).selectorAllRows\n ),\n (elem) => {\n elem.setAttribute('size', this.size);\n }\n );\n this._tableToolbar?.setAttribute('size', this.size);\n }\n\n // TODO: Uncomment when Carbon fully implements Sticky header feature\n // if (changedProperties.has('stickyHeader')) {\n // const tableBody = this.querySelector(\n // (this.constructor as typeof CDSTable).selectorTableBody\n // );\n // const tableHead = this.querySelector(\n // (this.constructor as typeof CDSTable).selectorTableHead\n // );\n // (tableBody as any).stickyHeader = this.stickyHeader;\n // (tableHead as any).stickyHeader = this.stickyHeader;\n // forEach(\n // this.querySelectorAll(\n // (this.constructor as typeof CDSTable).selectorRowsWithHeader\n // ),\n // (elem) => {\n // (elem as any).stickyHeader = this.stickyHeader;\n // }\n // );\n // forEach(\n // this.querySelectorAll(\n // (this.constructor as typeof CDSTable).selectorTableCells\n // ),\n // (elem) => {\n // (elem as any).stickyHeader = this.stickyHeader;\n // }\n // );\n // }\n\n if (changedProperties.has('useZebraStyles')) {\n const tableBody = this.querySelector(\n (this.constructor as typeof CDSTable).selectorTableBody\n );\n (tableBody as any).useZebraStyles = this.useZebraStyles;\n }\n }\n\n /* eslint-disable no-constant-condition */\n render() {\n return html`\n <div ?hidden=\"${!this.withHeader}\" class=\"${prefix}--data-table-header\">\n <slot @slotchange=\"${this._handleSlotChange}\" name=\"title\"></slot>\n <slot @slotchange=\"${this._handleSlotChange}\" name=\"description\"></slot>\n </div>\n <slot name=\"toolbar\"></slot>\n\n ${false // TODO: replace with this.stickyHeader when feature is fully implemented\n ? html` <div class=\"${prefix}--data-table_inner-container\">\n <div class=\"${prefix}--data-table-content\">\n <slot></slot>\n </div>\n </div>`\n : html`<slot></slot>`}\n `;\n }\n /* eslint-enable no-constant-condition */\n\n /**\n * The name of the custom event fired before a new sort direction is set upon a user gesture.\n * Cancellation of this event stops the user-initiated change in sort direction.\n */\n static get eventBeforeSort() {\n return `${prefix}-table-header-cell-sort`;\n }\n\n /**\n * The name of the custom event fired during search bar input\n */\n static get eventSearchInput() {\n return `${prefix}-search-input`;\n }\n\n /**\n * The name of the custom event fired before header row is selected/unselected upon a user gesture.\n */\n static get eventBeforeChangeSelectionAll() {\n return `${prefix}-table-change-selection-all`;\n }\n\n /**\n * The name of the custom event fired before a row is selected/unselected upon a user gesture.\n */\n static get eventBeforeChangeSelection() {\n return `${prefix}-table-row-change-selection`;\n }\n\n /**\n * The name of the custom event fired after the Cancel button is clicked.\n */\n static get eventClickCancel() {\n return `${prefix}-table-batch-actions-cancel-clicked`;\n }\n\n /**\n * The name of the custom event fired after the expanded state a row is toggled upon a user gesture.\n */\n static get eventExpandoToggle() {\n return `${prefix}-table-row-expando-toggled`;\n }\n\n /**\n * The name of the custom event fired after a row has been selected\n */\n static get eventTableRowSelect() {\n return `${prefix}-table-row-selected`;\n }\n\n /**\n * The name of the custom event fired after all rows have been selected\n */\n static get eventTableRowSelectAll() {\n return `${prefix}-table-row-all-selected`;\n }\n\n /**\n * The name of the custom event fired after the table has been sorted\n */\n static get eventTableSorted() {\n return `${prefix}-table-sorted`;\n }\n\n /**\n * The name of the custom event fired after the table has been filtered containing remaining rows.\n */\n static get eventTableFiltered() {\n return `${prefix}-table-filtered`;\n }\n\n /**\n * The CSS selector to find the overflow menu on the table cell\n */\n static get selectorTableCellOverflowMenu() {\n return `${prefix}-table-cell ${prefix}-overflow-menu`;\n }\n\n /**\n * The CSS selector to find the download button\n */\n static get selectorToolbarDownload() {\n return `${prefix}-button[download]`;\n }\n\n /**\n * The CSS selector to find the table batch actions\n */\n static get selectorTableBatchActions() {\n return `${prefix}-table-batch-actions`;\n }\n\n /**\n * The CSS selector to find the table toolbar\n */\n static get selectorTableToolbar() {\n return `${prefix}-table-toolbar`;\n }\n\n /**\n * The CSS selector to find the table toolbar content\n */\n static get selectorTableToolbarContent() {\n return `${prefix}-table-toolbar-content`;\n }\n\n /**\n * The CSS selector to find the table toolbar search\n */\n static get selectorTableToolbarSearch() {\n return `${prefix}-table-toolbar-search`;\n }\n\n /**\n * The CSS selector to find the table head\n */\n static get selectorTableHead() {\n return `${prefix}-table-head`;\n }\n\n /**\n * The CSS selector to find the table body\n */\n static get selectorTableBody() {\n return `${prefix}-table-body`;\n }\n\n /**\n * The CSS selector to find the table expanded rows\n */\n static get selectorTableExpandedRows() {\n return `${prefix}-table-expanded-row`;\n }\n\n /**\n * The CSS selector to find the table rows\n */\n static get selectorTableRow() {\n return `${prefix}-table-row`;\n }\n\n /**\n * The CSS selector to find the rows cells.\n */\n static get selectorTableRowCells() {\n return `${prefix}-table-cell`;\n }\n\n /**\n * The CSS selector to find the rows cells, including header cells.\n */\n static get selectorTableCells() {\n return `${prefix}-table-cell, ${prefix}-table-header-cell`;\n }\n\n /**\n * The CSS selector to find the header cell\n */\n static get selectorHeaderCell() {\n return `${prefix}-table-header-cell`;\n }\n\n /**\n * The CSS selector to find the rows, including header rows.\n */\n static get selectorRowsWithHeader() {\n return `${prefix}-table-header-row,${prefix}-table-row`;\n }\n\n /**\n * The CSS selector to find all rows\n */\n static get selectorAllRows() {\n return `${prefix}-table-header-row,${prefix}-table-row,${prefix}-table-expanded-row`;\n }\n\n static styles = styles;\n}\n\nexport default CDSTable;\n"]}