@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
@@ -12,11 +12,16 @@ import { LitElement } from 'lit';
12
12
  *
13
13
  * @element cds-table-head
14
14
  */
15
- declare class BXTableHead extends LitElement {
15
+ declare class CDSTableHead extends LitElement {
16
+ /**
17
+ * TODO: Uncomment when Carbon fully implements sticky header
18
+ * Specify whether the header should be sticky.
19
+ * Still experimental: may not work with every combination of table props
20
+ */
16
21
  connectedCallback(): void;
17
22
  render(): import("lit-html").TemplateResult<1>;
18
23
  static styles: any;
19
24
  }
20
- export default BXTableHead;
25
+ export default CDSTableHead;
21
26
 
22
27
  //# sourceMappingURL=table-head.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/data-table/table-head.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAKvC;;;;GAIG;AACH,cACM,WAAY,SAAQ,UAAU;IAClC,iBAAiB;IAOjB,MAAM;IAIN,MAAM,CAAC,MAAM,MAAU;CACxB;AAED,eAAe,WAAW,CAAC","file":"table-head.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 { customElement } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport styles from './data-table.scss';\n\n/**\n * Data table header.\n *\n * @element cds-table-head\n */\n@customElement(`${prefix}-table-head`)\nclass BXTableHead extends LitElement {\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'rowgroup');\n }\n super.connectedCallback();\n }\n\n render() {\n return html` <slot></slot> `;\n }\n\n static styles = styles;\n}\n\nexport default BXTableHead;\n"]}
1
+ {"version":3,"sources":["components/data-table/table-head.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAKvC;;;;GAIG;AACH,cACM,YAAa,SAAQ,UAAU;IACnC;;;;OAIG;IAIH,iBAAiB;IAOjB,MAAM;IAIN,MAAM,CAAC,MAAM,MAAU;CACxB;AAED,eAAe,YAAY,CAAC","file":"table-head.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 { customElement } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport styles from './data-table.scss';\n\n/**\n * Data table header.\n *\n * @element cds-table-head\n */\n@customElement(`${prefix}-table-head`)\nclass CDSTableHead extends LitElement {\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, reflect: true, attribute: 'sticky-header' })\n // stickyHeader = false;\n\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'rowgroup');\n }\n super.connectedCallback();\n }\n\n render() {\n return html` <slot></slot> `;\n }\n\n static styles = styles;\n}\n\nexport default CDSTableHead;\n"]}
@@ -26,23 +26,32 @@ import styles from "././data-table.css.js";
26
26
  *
27
27
  * @element cds-table-head
28
28
  */
29
- let BXTableHead = _decorate([customElement(`${prefix}-table-head`)], function (_initialize, _LitElement) {
30
- class BXTableHead extends _LitElement {
29
+ let CDSTableHead = _decorate([customElement(`${prefix}-table-head`)], function (_initialize, _LitElement) {
30
+ class CDSTableHead extends _LitElement {
31
31
  constructor(...args) {
32
32
  super(...args);
33
33
  _initialize(this);
34
34
  }
35
35
  }
36
36
  return {
37
- F: BXTableHead,
37
+ F: CDSTableHead,
38
38
  d: [{
39
39
  kind: "method",
40
40
  key: "connectedCallback",
41
- value: function connectedCallback() {
41
+ value:
42
+ /**
43
+ * TODO: Uncomment when Carbon fully implements sticky header
44
+ * Specify whether the header should be sticky.
45
+ * Still experimental: may not work with every combination of table props
46
+ */
47
+ //@property({ type: Boolean, reflect: true, attribute: 'sticky-header' })
48
+ // stickyHeader = false;
49
+
50
+ function connectedCallback() {
42
51
  if (!this.hasAttribute('role')) {
43
52
  this.setAttribute('role', 'rowgroup');
44
53
  }
45
- _get(_getPrototypeOf(BXTableHead.prototype), "connectedCallback", this).call(this);
54
+ _get(_getPrototypeOf(CDSTableHead.prototype), "connectedCallback", this).call(this);
46
55
  }
47
56
  }, {
48
57
  kind: "method",
@@ -60,5 +69,5 @@ let BXTableHead = _decorate([customElement(`${prefix}-table-head`)], function (_
60
69
  }]
61
70
  };
62
71
  }, LitElement);
63
- export default BXTableHead;
72
+ export default CDSTableHead;
64
73
  //# sourceMappingURL=table-head.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"table-head.js","names":["LitElement","html","customElement","prefix","styles","BXTableHead","_decorate","_initialize","_LitElement","constructor","args","F","d","kind","key","value","connectedCallback","hasAttribute","setAttribute","_get","_getPrototypeOf","prototype","call","render","_t","_","static"],"sources":["components/data-table/table-head.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 { customElement } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport styles from './data-table.scss';\n\n/**\n * Data table header.\n *\n * @element cds-table-head\n */\n@customElement(`${prefix}-table-head`)\nclass BXTableHead extends LitElement {\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'rowgroup');\n }\n super.connectedCallback();\n }\n\n render() {\n return html` <slot></slot> `;\n }\n\n static styles = styles;\n}\n\nexport default BXTableHead;\n"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,EAAEC,IAAI,QAAQ,KAAK;AACtC,SAASC,aAAa,QAAQ,mBAAmB;AACjD,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,OAAOC,MAAM,MAAM,uBAAmB;;AAEtC;AACA;AACA;AACA;AACA,GAJA;AACA;AACA;AACA;AACA;AAJA,IAMMC,WAAW,GAAAC,SAAA,EADhBJ,aAAa,CAAE,GAAEC,MAAO,aAAY,CAAC,aAAAI,WAAA,EAAAC,WAAA;EAAtC,MACMH,WAAW,SAAAG,WAAA,CAAoB;IAAAC,YAAA,GAAAC,IAAA;MAAA,SAAAA,IAAA;MAAAH,WAAA;IAAA;EAarC;EAAC;IAAAI,CAAA,EAbKN,WAAW;IAAAO,CAAA;MAAAC,IAAA;MAAAC,GAAA;MAAAC,KAAA,EACf,SAAAC,kBAAA,EAAoB;QAClB,IAAI,CAAC,IAAI,CAACC,YAAY,CAAC,MAAM,CAAC,EAAE;UAC9B,IAAI,CAACC,YAAY,CAAC,MAAM,EAAE,UAAU,CAAC;QACvC;QACAC,IAAA,CAAAC,eAAA,CALEf,WAAW,CAAAgB,SAAA,8BAAAC,IAAA;MAMf;IAAC;MAAAT,IAAA;MAAAC,GAAA;MAAAC,KAAA,EAED,SAAAQ,OAAA,EAAS;QACP,OAAOtB,IAAI,CAAAuB,EAAA,KAAAA,EAAA,GAAAC,CAAC,iBAAe;MAC7B;IAAC;MAAAZ,IAAA;MAAAa,MAAA;MAAAZ,GAAA;MAAAC,MAAA;QAAA,OAEeX,MAAM;MAAA;IAAA;EAAA;AAAA,GAZEJ,UAAU;AAepC,eAAeK,WAAW"}
1
+ {"version":3,"file":"table-head.js","names":["LitElement","html","customElement","prefix","styles","CDSTableHead","_decorate","_initialize","_LitElement","constructor","args","F","d","kind","key","value","connectedCallback","hasAttribute","setAttribute","_get","_getPrototypeOf","prototype","call","render","_t","_","static"],"sources":["components/data-table/table-head.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 { customElement } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport styles from './data-table.scss';\n\n/**\n * Data table header.\n *\n * @element cds-table-head\n */\n@customElement(`${prefix}-table-head`)\nclass CDSTableHead extends LitElement {\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, reflect: true, attribute: 'sticky-header' })\n // stickyHeader = false;\n\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'rowgroup');\n }\n super.connectedCallback();\n }\n\n render() {\n return html` <slot></slot> `;\n }\n\n static styles = styles;\n}\n\nexport default CDSTableHead;\n"],"mappings":";;;;;AAAA;AACA;A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CLES, TABLE_SORT_DIRECTION };
12
- declare const BXTableHeaderCell_base: {
12
+ declare const CDSTableHeaderCell_base: {
13
13
  new (...args: any[]): {
14
14
  focus(): void;
15
15
  accessKey: string;
@@ -323,7 +323,7 @@ declare const BXTableHeaderCell_base: {
323
323
  * The custom event fired before a new sort direction is set upon a user gesture.
324
324
  * Cancellation of this event stops the user-initiated change in sort direction.
325
325
  */
326
- declare class BXTableHeaderCell extends BXTableHeaderCell_base {
326
+ declare class CDSTableHeaderCell extends CDSTableHeaderCell_base {
327
327
  /**
328
328
  * Handles `click` event on the sort button.
329
329
  *
@@ -338,6 +338,18 @@ declare class BXTableHeaderCell extends BXTableHeaderCell_base {
338
338
  * @returns The next sort direction.
339
339
  */
340
340
  private _getNextSort;
341
+ /**
342
+ * `true` if the table has expandable rows
343
+ */
344
+ isExpandable: boolean;
345
+ /**
346
+ * `true` if this table has selectable rows
347
+ */
348
+ isSelectable: boolean;
349
+ /**
350
+ * `true` if this table header column should be sortable
351
+ */
352
+ isSortable: boolean;
341
353
  /**
342
354
  * `true` if this table header cell is of a primary sorting column.
343
355
  */
@@ -351,7 +363,13 @@ declare class BXTableHeaderCell extends BXTableHeaderCell_base {
351
363
  * If present, this table header cell will have a sorting UI. Choose between `ascending` or `descending`.
352
364
  */
353
365
  sortDirection?: TABLE_SORT_DIRECTION;
366
+ /**
367
+ * TODO: Uncomment when Carbon fully implements sticky header
368
+ * Specify whether the header should be sticky.
369
+ * Still experimental: may not work with every combination of table props
370
+ */
354
371
  connectedCallback(): void;
372
+ updated(changedProperties: any): void;
355
373
  render(): import("lit-html").TemplateResult<1>;
356
374
  /**
357
375
  * The name of the custom event fired before a new sort direction is set upon a user gesture.
@@ -374,6 +392,6 @@ declare class BXTableHeaderCell extends BXTableHeaderCell_base {
374
392
  "tri-states-from-descending": TABLE_SORT_DIRECTION[];
375
393
  };
376
394
  }
377
- export default BXTableHeaderCell;
395
+ export default CDSTableHeaderCell;
378
396
 
379
397
  //# sourceMappingURL=table-header-cell.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/data-table/table-header-cell.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAMvC,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,QAAQ,CAAC;AAGhB,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAErE;;;;;;;GAOG;AACH,cACM,iBAAkB,SAAQ,sBAAsB;IACpD;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAoB9B;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAIzB;;OAEG;IACH,OAAO,CAAC,YAAY;IA0BpB;;OAEG;IAEH,UAAU,UAAS;IAEnB;;OAEG;IAEH,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAE7B;;;OAGG;IAEH,aAAa,CAAC,EAAE,oBAAoB,CAAC;IAErC,iBAAiB;IAOjB,MAAM;IA6BN;;;OAGG;IACH,MAAM,KAAK,eAAe,WAEzB;IAED,MAAM,CAAC,iBAAiB;;;;MAGtB;IACF,MAAM,CAAC,MAAM,MAAU;IAEvB;;OAEG;IACH,MAAM,CAAC,iBAAiB;;;;;MAAqB;CAC9C;AAED,eAAe,iBAAiB,CAAC","file":"table-header-cell.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 ArrowsVeritcal16 from '@carbon/icons/lib/arrows--vertical/16';\nimport ArrowDown16 from '@carbon/icons/lib/arrow--down/16';\nimport { prefix } from '../../globals/settings';\nimport FocusMixin from '../../globals/mixins/focus';\nimport {\n TABLE_SORT_CYCLE,\n TABLE_SORT_CYCLES,\n TABLE_SORT_DIRECTION,\n} from './defs';\nimport styles from './data-table.scss';\n\nexport { TABLE_SORT_CYCLE, TABLE_SORT_CYCLES, TABLE_SORT_DIRECTION };\n\n/**\n * Data table header cell.\n *\n * @element cds-table-header-cell\n * @fires cds-table-header-cell-sort\n * 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@customElement(`${prefix}-table-header-cell`)\nclass BXTableHeaderCell extends FocusMixin(LitElement) {\n /**\n * Handles `click` event on the sort button.\n *\n */\n private _handleClickSortButton() {\n const nextSortDirection = this._getNextSort();\n const init = {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n oldSortDirection: this.sortDirection,\n sortDirection: nextSortDirection,\n },\n };\n const constructor = this.constructor as typeof BXTableHeaderCell;\n if (\n this.dispatchEvent(new CustomEvent(constructor.eventBeforeSort, init))\n ) {\n this.sortActive = true;\n this.sortDirection = nextSortDirection;\n }\n }\n\n /**\n * Handles `slotchange` event.\n *\n */\n private _handleSlotChange() {\n this.requestUpdate();\n }\n\n /**\n * @returns The next sort direction.\n */\n private _getNextSort() {\n const {\n sortCycle = TABLE_SORT_CYCLE.TRI_STATES_FROM_ASCENDING,\n sortDirection,\n } = this;\n if (!sortDirection) {\n throw new TypeError(\n 'Table sort direction is not defined. ' +\n 'Likely that `_getNextSort()` is called with non-sorted table column, which should not happen in regular condition.'\n );\n }\n const directions = (this.constructor as typeof BXTableHeaderCell)\n .TABLE_SORT_CYCLES[sortCycle];\n const index = directions.indexOf(sortDirection as TABLE_SORT_DIRECTION);\n if (index < 0) {\n if (sortDirection === TABLE_SORT_DIRECTION.NONE) {\n // If the current sort direction is `none` in bi-state sort cycle, returns the first one in the cycle\n return directions[0];\n }\n throw new RangeError(\n `The given sort state (${sortDirection}) is not found in the given table sort cycle: ${sortCycle}`\n );\n }\n return directions[(index + 1) % directions.length];\n }\n\n /**\n * `true` if this table header cell is of a primary sorting column.\n */\n @property({ type: Boolean, reflect: true, attribute: 'sort-active' })\n sortActive = false;\n\n /**\n * The table sort cycle in use.\n */\n @property({ reflect: true, attribute: 'sort-cycle' })\n sortCycle?: TABLE_SORT_CYCLE;\n\n /**\n * The table sort direction.\n * If present, this table header cell will have a sorting UI. Choose between `ascending` or `descending`.\n */\n @property({ reflect: true, attribute: 'sort-direction' })\n sortDirection?: TABLE_SORT_DIRECTION;\n\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'columnheader');\n }\n super.connectedCallback();\n }\n\n render() {\n const { sortDirection } = this;\n if (sortDirection) {\n const sortIcon =\n sortDirection === TABLE_SORT_DIRECTION.NONE\n ? ArrowsVeritcal16({\n part: 'sort-icon',\n class: `${prefix}--table-sort__icon-unsorted`,\n })\n : ArrowDown16({\n part: 'sort-icon',\n class: `${prefix}--table-sort__icon`,\n });\n return html`\n <button\n part=\"sort-button\"\n class=\"${prefix}--table-sort\"\n title=\"${this.textContent}\"\n @click=${this._handleClickSortButton}>\n <span part=\"label-text\" class=\"${prefix}--table-header-label\"\n ><slot @slotchange=${this._handleSlotChange}></slot\n ></span>\n ${sortIcon}\n </button>\n `;\n }\n return html` <slot></slot> `;\n }\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 static shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n static styles = styles;\n\n /**\n * Mapping of table sort cycles to table sort states.\n */\n static TABLE_SORT_CYCLES = TABLE_SORT_CYCLES;\n}\n\nexport default BXTableHeaderCell;\n"]}
1
+ {"version":3,"sources":["components/data-table/table-header-cell.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAMvC,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,QAAQ,CAAC;AAGhB,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAErE;;;;;;;GAOG;AACH,cACM,kBAAmB,SAAQ,uBAAsB;IACrD;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAoB9B;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAIzB;;OAEG;IACH,OAAO,CAAC,YAAY;IA0BpB;;OAEG;IAEH,YAAY,UAAS;IAErB;;OAEG;IAEH,YAAY,UAAS;IACrB;;OAEG;IAEH,UAAU,UAAS;IAEnB;;OAEG;IAEH,UAAU,UAAS;IAEnB;;OAEG;IAEH,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAE7B;;;OAGG;IAEH,aAAa,CAAC,EAAE,oBAAoB,CAAC;IAErC;;;;OAIG;IAIH,iBAAiB;IAOjB,OAAO,CAAC,iBAAiB,KAAA;IAMzB,MAAM;IA6BN;;;OAGG;IACH,MAAM,KAAK,eAAe,WAEzB;IAED,MAAM,CAAC,iBAAiB;;;;MAGtB;IACF,MAAM,CAAC,MAAM,MAAU;IAEvB;;OAEG;IACH,MAAM,CAAC,iBAAiB;;;;;MAAqB;CAC9C;AAED,eAAe,kBAAkB,CAAC","file":"table-header-cell.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 ArrowsVertical32 from '@carbon/icons/lib/arrows--vertical/32';\nimport ArrowDown32 from '@carbon/icons/lib/arrow--down/32';\nimport { prefix } from '../../globals/settings';\nimport FocusMixin from '../../globals/mixins/focus';\nimport {\n TABLE_SORT_CYCLE,\n TABLE_SORT_CYCLES,\n TABLE_SORT_DIRECTION,\n} from './defs';\nimport styles from './data-table.scss';\n\nexport { TABLE_SORT_CYCLE, TABLE_SORT_CYCLES, TABLE_SORT_DIRECTION };\n\n/**\n * Data table header cell.\n *\n * @element cds-table-header-cell\n * @fires cds-table-header-cell-sort\n * 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@customElement(`${prefix}-table-header-cell`)\nclass CDSTableHeaderCell extends FocusMixin(LitElement) {\n /**\n * Handles `click` event on the sort button.\n *\n */\n private _handleClickSortButton() {\n const nextSortDirection = this._getNextSort();\n const init = {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n oldSortDirection: this.sortDirection,\n sortDirection: nextSortDirection,\n },\n };\n const constructor = this.constructor as typeof CDSTableHeaderCell;\n if (\n this.dispatchEvent(new CustomEvent(constructor.eventBeforeSort, init))\n ) {\n this.sortActive = true;\n this.sortDirection = nextSortDirection;\n }\n }\n\n /**\n * Handles `slotchange` event.\n *\n */\n private _handleSlotChange() {\n this.requestUpdate();\n }\n\n /**\n * @returns The next sort direction.\n */\n private _getNextSort() {\n const {\n sortCycle = TABLE_SORT_CYCLE.TRI_STATES_FROM_ASCENDING,\n sortDirection,\n } = this;\n if (!sortDirection) {\n throw new TypeError(\n 'Table sort direction is not defined. ' +\n 'Likely that `_getNextSort()` is called with non-sorted table column, which should not happen in regular condition.'\n );\n }\n const directions = (this.constructor as typeof CDSTableHeaderCell)\n .TABLE_SORT_CYCLES[sortCycle];\n const index = directions.indexOf(sortDirection as TABLE_SORT_DIRECTION);\n if (index < 0) {\n if (sortDirection === TABLE_SORT_DIRECTION.NONE) {\n // If the current sort direction is `none` in bi-state sort cycle, returns the first one in the cycle\n return directions[0];\n }\n throw new RangeError(\n `The given sort state (${sortDirection}) is not found in the given table sort cycle: ${sortCycle}`\n );\n }\n return directions[(index + 1) % directions.length];\n }\n\n /**\n * `true` if the table has expandable rows\n */\n @property({ type: Boolean, reflect: true, attribute: 'is-sortable' })\n isExpandable = false;\n\n /**\n * `true` if this table has selectable rows\n */\n @property({ type: Boolean, reflect: true, attribute: 'is-sortable' })\n isSelectable = false;\n /**\n * `true` if this table header column should be sortable\n */\n @property({ type: Boolean, reflect: true, attribute: 'is-sortable' })\n isSortable = false;\n\n /**\n * `true` if this table header cell is of a primary sorting column.\n */\n @property({ type: Boolean, reflect: true, attribute: 'sort-active' })\n sortActive = false;\n\n /**\n * The table sort cycle in use.\n */\n @property({ reflect: true, attribute: 'sort-cycle' })\n sortCycle?: TABLE_SORT_CYCLE;\n\n /**\n * The table sort direction.\n * If present, this table header cell will have a sorting UI. Choose between `ascending` or `descending`.\n */\n @property({ reflect: true, attribute: 'sort-direction' })\n sortDirection?: TABLE_SORT_DIRECTION;\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, reflect: true, attribute: 'sticky-header' })\n // stickyHeader = false;\n\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'columnheader');\n }\n super.connectedCallback();\n }\n\n updated(changedProperties) {\n if (this.isSortable && !changedProperties.has('sortDirection')) {\n this.sortDirection = TABLE_SORT_DIRECTION.NONE;\n }\n }\n\n render() {\n const { sortDirection } = this;\n if (sortDirection) {\n const sortIcon =\n sortDirection === TABLE_SORT_DIRECTION.NONE\n ? ArrowsVertical32({\n part: 'sort-icon',\n class: `${prefix}--table-sort__icon-unsorted`,\n })\n : ArrowDown32({\n part: 'sort-icon',\n class: `${prefix}--table-sort__icon`,\n });\n return html`\n <button\n part=\"sort-button\"\n class=\"${prefix}--table-sort\"\n title=\"${this.textContent}\"\n @click=${this._handleClickSortButton}>\n <span part=\"label-text\" class=\"${prefix}--table-header-label\"\n ><slot @slotchange=${this._handleSlotChange}></slot\n ></span>\n ${sortIcon}\n </button>\n `;\n }\n return html` <slot></slot> `;\n }\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 static shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n static styles = styles;\n\n /**\n * Mapping of table sort cycles to table sort states.\n */\n static TABLE_SORT_CYCLES = TABLE_SORT_CYCLES;\n}\n\nexport default CDSTableHeaderCell;\n"]}
@@ -16,8 +16,8 @@ let _ = t => t,
16
16
 
17
17
  import { LitElement, html } from 'lit';
18
18
  import { property, customElement } from 'lit/decorators.js';
19
- import ArrowsVeritcal16 from "../../icons/arrows--vertical/16";
20
- import ArrowDown16 from "../../icons/arrow--down/16";
19
+ import ArrowsVertical32 from "../../icons/arrows--vertical/32";
20
+ import ArrowDown32 from "../../icons/arrow--down/32";
21
21
  import { prefix } from '../../globals/settings';
22
22
  import FocusMixin from '../../globals/mixins/focus';
23
23
  import { TABLE_SORT_CYCLE, TABLE_SORT_CYCLES, TABLE_SORT_DIRECTION } from './defs';
@@ -32,15 +32,15 @@ export { TABLE_SORT_CYCLE, TABLE_SORT_CYCLES, TABLE_SORT_DIRECTION };
32
32
  * The custom event fired before a new sort direction is set upon a user gesture.
33
33
  * Cancellation of this event stops the user-initiated change in sort direction.
34
34
  */
35
- let BXTableHeaderCell = _decorate([customElement(`${prefix}-table-header-cell`)], function (_initialize, _FocusMixin) {
36
- class BXTableHeaderCell extends _FocusMixin {
35
+ let CDSTableHeaderCell = _decorate([customElement(`${prefix}-table-header-cell`)], function (_initialize, _FocusMixin) {
36
+ class CDSTableHeaderCell extends _FocusMixin {
37
37
  constructor(...args) {
38
38
  super(...args);
39
39
  _initialize(this);
40
40
  }
41
41
  }
42
42
  return {
43
- F: BXTableHeaderCell,
43
+ F: CDSTableHeaderCell,
44
44
  d: [{
45
45
  kind: "method",
46
46
  key: "_handleClickSortButton",
@@ -105,8 +105,41 @@ let BXTableHeaderCell = _decorate([customElement(`${prefix}-table-header-cell`)]
105
105
  }
106
106
 
107
107
  /**
108
- * `true` if this table header cell is of a primary sorting column.
108
+ * `true` if the table has expandable rows
109
109
  */
110
+ }, {
111
+ kind: "field",
112
+ decorators: [property({
113
+ type: Boolean,
114
+ reflect: true,
115
+ attribute: 'is-sortable'
116
+ })],
117
+ key: "isExpandable",
118
+ value() {
119
+ return false;
120
+ }
121
+ }, {
122
+ kind: "field",
123
+ decorators: [property({
124
+ type: Boolean,
125
+ reflect: true,
126
+ attribute: 'is-sortable'
127
+ })],
128
+ key: "isSelectable",
129
+ value() {
130
+ return false;
131
+ }
132
+ }, {
133
+ kind: "field",
134
+ decorators: [property({
135
+ type: Boolean,
136
+ reflect: true,
137
+ attribute: 'is-sortable'
138
+ })],
139
+ key: "isSortable",
140
+ value() {
141
+ return false;
142
+ }
110
143
  }, {
111
144
  kind: "field",
112
145
  decorators: [property({
@@ -138,6 +171,15 @@ let BXTableHeaderCell = _decorate([customElement(`${prefix}-table-header-cell`)]
138
171
  kind: "method",
139
172
  key: "connectedCallback",
140
173
  value:
174
+ /**
175
+ * `true` if this table has selectable rows
176
+ */
177
+ /**
178
+ * `true` if this table header column should be sortable
179
+ */
180
+ /**
181
+ * `true` if this table header cell is of a primary sorting column.
182
+ */
141
183
  /**
142
184
  * The table sort cycle in use.
143
185
  */
@@ -145,11 +187,26 @@ let BXTableHeaderCell = _decorate([customElement(`${prefix}-table-header-cell`)]
145
187
  * The table sort direction.
146
188
  * If present, this table header cell will have a sorting UI. Choose between `ascending` or `descending`.
147
189
  */
190
+ /**
191
+ * TODO: Uncomment when Carbon fully implements sticky header
192
+ * Specify whether the header should be sticky.
193
+ * Still experimental: may not work with every combination of table props
194
+ */
195
+ // @property({ type: Boolean, reflect: true, attribute: 'sticky-header' })
196
+ // stickyHeader = false;
148
197
  function connectedCallback() {
149
198
  if (!this.hasAttribute('role')) {
150
199
  this.setAttribute('role', 'columnheader');
151
200
  }
152
- _get(_getPrototypeOf(BXTableHeaderCell.prototype), "connectedCallback", this).call(this);
201
+ _get(_getPrototypeOf(CDSTableHeaderCell.prototype), "connectedCallback", this).call(this);
202
+ }
203
+ }, {
204
+ kind: "method",
205
+ key: "updated",
206
+ value: function updated(changedProperties) {
207
+ if (this.isSortable && !changedProperties.has('sortDirection')) {
208
+ this.sortDirection = TABLE_SORT_DIRECTION.NONE;
209
+ }
153
210
  }
154
211
  }, {
155
212
  kind: "method",
@@ -159,10 +216,10 @@ let BXTableHeaderCell = _decorate([customElement(`${prefix}-table-header-cell`)]
159
216
  sortDirection
160
217
  } = this;
161
218
  if (sortDirection) {
162
- const sortIcon = sortDirection === TABLE_SORT_DIRECTION.NONE ? ArrowsVeritcal16({
219
+ const sortIcon = sortDirection === TABLE_SORT_DIRECTION.NONE ? ArrowsVertical32({
163
220
  part: 'sort-icon',
164
221
  class: `${prefix}--table-sort__icon-unsorted`
165
- }) : ArrowDown16({
222
+ }) : ArrowDown32({
166
223
  part: 'sort-icon',
167
224
  class: `${prefix}--table-sort__icon`
168
225
  });
@@ -219,5 +276,5 @@ let BXTableHeaderCell = _decorate([customElement(`${prefix}-table-header-cell`)]
219
276
  }]
220
277
  };
221
278
  }, FocusMixin(LitElement));
222
- export default BXTableHeaderCell;
279
+ export default CDSTableHeaderCell;
223
280
  //# sourceMappingURL=table-header-cell.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"table-header-cell.js","names":["LitElement","html","property","customElement","ArrowsVeritcal16","ArrowDown16","prefix","FocusMixin","TABLE_SORT_CYCLE","TABLE_SORT_CYCLES","TABLE_SORT_DIRECTION","styles","BXTableHeaderCell","_decorate","_initialize","_FocusMixin","constructor","args","F","d","kind","key","value","_handleClickSortButton","nextSortDirection","_getNextSort","init","bubbles","cancelable","composed","detail","oldSortDirection","sortDirection","dispatchEvent","CustomEvent","eventBeforeSort","sortActive","_handleSlotChange","requestUpdate","sortCycle","TRI_STATES_FROM_ASCENDING","TypeError","directions","index","indexOf","NONE","RangeError","length","decorators","type","Boolean","reflect","attribute","connectedCallback","hasAttribute","setAttribute","_get","_getPrototypeOf","prototype","call","render","sortIcon","part","class","_t","_","textContent","_t2","static","_objectSpread","shadowRootOptions","delegatesFocus"],"sources":["components/data-table/table-header-cell.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 ArrowsVeritcal16 from '@carbon/icons/lib/arrows--vertical/16';\nimport ArrowDown16 from '@carbon/icons/lib/arrow--down/16';\nimport { prefix } from '../../globals/settings';\nimport FocusMixin from '../../globals/mixins/focus';\nimport {\n TABLE_SORT_CYCLE,\n TABLE_SORT_CYCLES,\n TABLE_SORT_DIRECTION,\n} from './defs';\nimport styles from './data-table.scss';\n\nexport { TABLE_SORT_CYCLE, TABLE_SORT_CYCLES, TABLE_SORT_DIRECTION };\n\n/**\n * Data table header cell.\n *\n * @element cds-table-header-cell\n * @fires cds-table-header-cell-sort\n * 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@customElement(`${prefix}-table-header-cell`)\nclass BXTableHeaderCell extends FocusMixin(LitElement) {\n /**\n * Handles `click` event on the sort button.\n *\n */\n private _handleClickSortButton() {\n const nextSortDirection = this._getNextSort();\n const init = {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n oldSortDirection: this.sortDirection,\n sortDirection: nextSortDirection,\n },\n };\n const constructor = this.constructor as typeof BXTableHeaderCell;\n if (\n this.dispatchEvent(new CustomEvent(constructor.eventBeforeSort, init))\n ) {\n this.sortActive = true;\n this.sortDirection = nextSortDirection;\n }\n }\n\n /**\n * Handles `slotchange` event.\n *\n */\n private _handleSlotChange() {\n this.requestUpdate();\n }\n\n /**\n * @returns The next sort direction.\n */\n private _getNextSort() {\n const {\n sortCycle = TABLE_SORT_CYCLE.TRI_STATES_FROM_ASCENDING,\n sortDirection,\n } = this;\n if (!sortDirection) {\n throw new TypeError(\n 'Table sort direction is not defined. ' +\n 'Likely that `_getNextSort()` is called with non-sorted table column, which should not happen in regular condition.'\n );\n }\n const directions = (this.constructor as typeof BXTableHeaderCell)\n .TABLE_SORT_CYCLES[sortCycle];\n const index = directions.indexOf(sortDirection as TABLE_SORT_DIRECTION);\n if (index < 0) {\n if (sortDirection === TABLE_SORT_DIRECTION.NONE) {\n // If the current sort direction is `none` in bi-state sort cycle, returns the first one in the cycle\n return directions[0];\n }\n throw new RangeError(\n `The given sort state (${sortDirection}) is not found in the given table sort cycle: ${sortCycle}`\n );\n }\n return directions[(index + 1) % directions.length];\n }\n\n /**\n * `true` if this table header cell is of a primary sorting column.\n */\n @property({ type: Boolean, reflect: true, attribute: 'sort-active' })\n sortActive = false;\n\n /**\n * The table sort cycle in use.\n */\n @property({ reflect: true, attribute: 'sort-cycle' })\n sortCycle?: TABLE_SORT_CYCLE;\n\n /**\n * The table sort direction.\n * If present, this table header cell will have a sorting UI. Choose between `ascending` or `descending`.\n */\n @property({ reflect: true, attribute: 'sort-direction' })\n sortDirection?: TABLE_SORT_DIRECTION;\n\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'columnheader');\n }\n super.connectedCallback();\n }\n\n render() {\n const { sortDirection } = this;\n if (sortDirection) {\n const sortIcon =\n sortDirection === TABLE_SORT_DIRECTION.NONE\n ? ArrowsVeritcal16({\n part: 'sort-icon',\n class: `${prefix}--table-sort__icon-unsorted`,\n })\n : ArrowDown16({\n part: 'sort-icon',\n class: `${prefix}--table-sort__icon`,\n });\n return html`\n <button\n part=\"sort-button\"\n class=\"${prefix}--table-sort\"\n title=\"${this.textContent}\"\n @click=${this._handleClickSortButton}>\n <span part=\"label-text\" class=\"${prefix}--table-header-label\"\n ><slot @slotchange=${this._handleSlotChange}></slot\n ></span>\n ${sortIcon}\n </button>\n `;\n }\n return html` <slot></slot> `;\n }\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 static shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n static styles = styles;\n\n /**\n * Mapping of table sort cycles to table sort states.\n */\n static TABLE_SORT_CYCLES = TABLE_SORT_CYCLES;\n}\n\nexport default BXTableHeaderCell;\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,EAAEC,IAAI,QAAQ,KAAK;AACtC,SAASC,QAAQ,EAAEC,aAAa,QAAQ,mBAAmB;AAC3D,OAAOC,gBAAgB,MAAM,iCAAuC;AACpE,OAAOC,WAAW,MAAM,4BAAkC;AAC1D,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,OAAOC,UAAU,MAAM,4BAA4B;AACnD,SACEC,gBAAgB,EAChBC,iBAAiB,EACjBC,oBAAoB,QACf,QAAQ;AACf,OAAOC,MAAM,MAAM,uBAAmB;AAEtC,SAASH,gBA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E,iBAAiB;UAC/BC,cAAc,EAAE;QAAI;MAAA;IAAA;MAAAnD,IAAA;MAAAgD,MAAA;MAAA/C,GAAA;MAAAC,MAAA;QAAA,OAENX,MAAM;MAAA;IAAA;MAAAS,IAAA;MAAAgD,MAAA;MAAA/C,GAAA;MAAAC,MAAA;QAAA,OAKKb,iBAAiB;MAAA;IAAA;EAAA;AAAA,GAtIdF,UAAU,CAACP,UAAU,CAAC;AAyItD,eAAeY,iBAAiB"}
1
+ {"version":3,"file":"table-header-cell.js","names":["LitElement","html","property","customElement","ArrowsVertical32","ArrowDown32","prefix","FocusMixin","TABLE_SORT_CYCLE","TABLE_SORT_CYCLES","TABLE_SORT_DIRECTION","styles","CDSTableHeaderCell","_decorate","_initialize","_FocusMixin","constructor","args","F","d","kind","key","value","_handleClickSortButton","nextSortDirection","_getNextSort","init","bubbles","cancelable","composed","detail","oldSortDirection","sortDirection","dispatchEvent","CustomEvent","eventBeforeSort","sortActive","_handleSlotChange","requestUpdate","sortCycle","TRI_STATES_FROM_ASCENDING","TypeError","directions","index","indexOf","NONE","RangeError","length","decorators","type","Boolean","reflect","attribute","connectedCallback","hasAttribute","setAttribute","_get","_getPrototypeOf","prototype","call","updated","changedProperties","isSortable","has","render","sortIcon","part","class","_t","_","textContent","_t2","static","_objectSpread","shadowRootOptions","delegatesFocus"],"sources":["components/data-table/table-header-cell.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 ArrowsVertical32 from '@carbon/icons/lib/arrows--vertical/32';\nimport ArrowDown32 from '@carbon/icons/lib/arrow--down/32';\nimport { prefix } from '../../globals/settings';\nimport FocusMixin from '../../globals/mixins/focus';\nimport {\n TABLE_SORT_CYCLE,\n TABLE_SORT_CYCLES,\n TABLE_SORT_DIRECTION,\n} from './defs';\nimport styles from './data-table.scss';\n\nexport { TABLE_SORT_CYCLE, TABLE_SORT_CYCLES, TABLE_SORT_DIRECTION };\n\n/**\n * Data table header cell.\n *\n * @element cds-table-header-cell\n * @fires cds-table-header-cell-sort\n * 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@customElement(`${prefix}-table-header-cell`)\nclass CDSTableHeaderCell extends FocusMixin(LitElement) {\n /**\n * Handles `click` event on the sort button.\n *\n */\n private _handleClickSortButton() {\n const nextSortDirection = this._getNextSort();\n const init = {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: {\n oldSortDirection: this.sortDirection,\n sortDirection: nextSortDirection,\n },\n };\n const constructor = this.constructor as typeof CDSTableHeaderCell;\n if (\n this.dispatchEvent(new CustomEvent(constructor.eventBeforeSort, init))\n ) {\n this.sortActive = true;\n this.sortDirection = nextSortDirection;\n }\n }\n\n /**\n * Handles `slotchange` event.\n *\n */\n private _handleSlotChange() {\n this.requestUpdate();\n }\n\n /**\n * @returns The next sort direction.\n */\n private _getNextSort() {\n const {\n sortCycle = TABLE_SORT_CYCLE.TRI_STATES_FROM_ASCENDING,\n sortDirection,\n } = this;\n if (!sortDirection) {\n throw new TypeError(\n 'Table sort direction is not defined. ' +\n 'Likely that `_getNextSort()` is called with non-sorted table column, which should not happen in regular condition.'\n );\n }\n const directions = (this.constructor as typeof CDSTableHeaderCell)\n .TABLE_SORT_CYCLES[sortCycle];\n const index = directions.indexOf(sortDirection as TABLE_SORT_DIRECTION);\n if (index < 0) {\n if (sortDirection === TABLE_SORT_DIRECTION.NONE) {\n // If the current sort direction is `none` in bi-state sort cycle, returns the first one in the cycle\n return directions[0];\n }\n throw new RangeError(\n `The given sort state (${sortDirection}) is not found in the given table sort cycle: ${sortCycle}`\n );\n }\n return directions[(index + 1) % directions.length];\n }\n\n /**\n * `true` if the table has expandable rows\n */\n @property({ type: Boolean, reflect: true, attribute: 'is-sortable' })\n isExpandable = false;\n\n /**\n * `true` if this table has selectable rows\n */\n @property({ type: Boolean, reflect: true, attribute: 'is-sortable' })\n isSelectable = false;\n /**\n * `true` if this table header column should be sortable\n */\n @property({ type: Boolean, reflect: true, attribute: 'is-sortable' })\n isSortable = false;\n\n /**\n * `true` if this table header cell is of a primary sorting column.\n */\n @property({ type: Boolean, reflect: true, attribute: 'sort-active' })\n sortActive = false;\n\n /**\n * The table sort cycle in use.\n */\n @property({ reflect: true, attribute: 'sort-cycle' })\n sortCycle?: TABLE_SORT_CYCLE;\n\n /**\n * The table sort direction.\n * If present, this table header cell will have a sorting UI. Choose between `ascending` or `descending`.\n */\n @property({ reflect: true, attribute: 'sort-direction' })\n sortDirection?: TABLE_SORT_DIRECTION;\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, reflect: true, attribute: 'sticky-header' })\n // stickyHeader = false;\n\n connectedCallback() {\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'columnheader');\n }\n super.connectedCallback();\n }\n\n updated(changedProperties) {\n if (this.isSortable && !changedProperties.has('sortDirection')) {\n this.sortDirection = TABLE_SORT_DIRECTION.NONE;\n }\n }\n\n render() {\n const { sortDirection } = this;\n if (sortDirection) {\n const sortIcon =\n sortDirection === TABLE_SORT_DIRECTION.NONE\n ? ArrowsVertical32({\n part: 'sort-icon',\n class: `${prefix}--table-sort__icon-unsorted`,\n })\n : ArrowDown32({\n part: 'sort-icon',\n class: `${prefix}--table-sort__icon`,\n });\n return html`\n <button\n part=\"sort-button\"\n class=\"${prefix}--table-sort\"\n title=\"${this.textContent}\"\n @click=${this._handleClickSortButton}>\n <span part=\"label-text\" class=\"${prefix}--table-header-label\"\n ><slot @slotchange=${this._handleSlotChange}></slot\n ></span>\n ${sortIcon}\n </button>\n `;\n }\n return html` <slot></slot> `;\n }\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 static shadowRootOptions = {\n ...LitElement.shadowRootOptions,\n delegatesFocus: true,\n };\n static styles = styles;\n\n /**\n * Mapping of table sort cycles to table sort states.\n */\n static TABLE_SORT_CYCLES = TABLE_SORT_CYCLES;\n}\n\nexport default CDSTableHeaderCell;\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,EAAEC,IAAI,QAAQ,KAAK;AACtC,SAASC,QAAQ,EAAEC,aAAa,QAAQ,mBAAmB;AAC3D,OAAOC,gBAAgB,MAAM,iCAAuC;AACpE,OAAOC,WAAW,MAAM,4BAAkC;AAC1D,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,OAAOC,UAAU,MAAM,4BAA4B;AACnD,SACEC,gBAAgB,EAChBC,iBAAiB,EACjBC,oBAAoB,QACf,QAAQ;AACf,OAAOC,MAAM,MAAM,uBAAmB;AAEtC,SAASH,gBAAgB,EAAEC,iBAAiB,EAAEC,oBAAoB;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAPA,IASME,kBAAkB,GAAAC,SAAA,EADvBV,aAAa,CAAE,GAAEG,MAAO,oBAAmB,CAAC,aAAAQ,WAAA,EAAAC,WAAA;EAA7C,MACMH,kBAAkB,SAAAG,WAAA,CAAgC;IAAAC,YAAA,GAAAC,IAAA;MAAA,SAAAA,IAAA;MAAAH,WAAA;IAAA;EAsKxD;EAAC;IAAAI,CAAA,EAtKKN,kBAAkB;IAAAO,CAAA;MAAAC,IAAA;MAAAC,GAAA;MAAAC,KAAA;MACtB;AACF;AACA;AACA;MACE,SAAAC,uBAAA,EAAiC;QAC/B,MAAMC,iBAAiB,GAAG,IAAI,CAACC,YAAY,EAAE;QAC7C,MAAMC,IAAI,GAAG;UACXC,OAAO,EAAE,IAAI;UACbC,UAAU,EAAE,IAAI;UAChBC,QAAQ,EAAE,IAAI;UACdC,MAAM,EA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AAA,GAAA,GAAAF,CAAC,iBAAe;MAC7B;;MAEA;AACF;AACA;AACA;IAHE;MAAAjD,IAAA;MAAAoD,MAAA;MAAAnD,GAAA;MAAAC,KAAA,EAIA,SAAAa,gBAAA,EAA6B;QAC3B,OAAQ,GAAE7B,MAAO,yBAAwB;MAC3C;IAAC;MAAAc,IAAA;MAAAoD,MAAA;MAAAnD,GAAA;MAAAC,MAAA;QAAA,OAAAmD,aAAA,CAAAA,aAAA,KAGIzE,UAAU,CAAC0E,iBAAiB;UAC/BC,cAAc,EAAE;QAAI;MAAA;IAAA;MAAAvD,IAAA;MAAAoD,MAAA;MAAAnD,GAAA;MAAAC,MAAA;QAAA,OAENX,MAAM;MAAA;IAAA;MAAAS,IAAA;MAAAoD,MAAA;MAAAnD,GAAA;MAAAC,MAAA;QAAA,OAKKb,iBAAiB;MAAA;IAAA;EAAA;AAAA,GArKbF,UAAU,CAACP,UAAU,CAAC;AAwKvD,eAAeY,kBAAkB"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2019, 2023
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ import { LitElement } from 'lit';
10
+ /**
11
+ * Data table header description
12
+ *
13
+ * @element cds-table-header-description
14
+ */
15
+ declare class CDSTableHeaderDescription extends LitElement {
16
+ render(): import("lit-html").TemplateResult<1>;
17
+ static styles: any;
18
+ }
19
+ export default CDSTableHeaderDescription;
20
+
21
+ //# sourceMappingURL=table-header-description.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/data-table/table-header-description.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAKvC;;;;GAIG;AACH,cACM,yBAA0B,SAAQ,UAAU;IAChD,MAAM;IAIN,MAAM,CAAC,MAAM,MAAU;CACxB;AAED,eAAe,yBAAyB,CAAC","file":"table-header-description.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 { customElement } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport styles from './data-table.scss';\n\n/**\n * Data table header description\n *\n * @element cds-table-header-description\n */\n@customElement(`${prefix}-table-header-description`)\nclass CDSTableHeaderDescription extends LitElement {\n render() {\n return html` <slot></slot> `;\n }\n\n static styles = styles;\n}\n\nexport default CDSTableHeaderDescription;\n"]}
@@ -0,0 +1,53 @@
1
+ import _decorate from "@babel/runtime/helpers/esm/decorate";
2
+ let _ = t => t,
3
+ _t;
4
+ /**
5
+ * @license
6
+ *
7
+ * Copyright IBM Corp. 2019, 2023
8
+ *
9
+ * This source code is licensed under the Apache-2.0 license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ */
12
+
13
+ import { LitElement, html } from 'lit';
14
+ import { customElement } from 'lit/decorators.js';
15
+ import { prefix } from '../../globals/settings';
16
+ import styles from "././data-table.css.js";
17
+
18
+ /**
19
+ * Data table header description
20
+ *
21
+ * @element cds-table-header-description
22
+ */ /**
23
+ * Data table header description
24
+ *
25
+ * @element cds-table-header-description
26
+ */
27
+ let CDSTableHeaderDescription = _decorate([customElement(`${prefix}-table-header-description`)], function (_initialize, _LitElement) {
28
+ class CDSTableHeaderDescription extends _LitElement {
29
+ constructor(...args) {
30
+ super(...args);
31
+ _initialize(this);
32
+ }
33
+ }
34
+ return {
35
+ F: CDSTableHeaderDescription,
36
+ d: [{
37
+ kind: "method",
38
+ key: "render",
39
+ value: function render() {
40
+ return html(_t || (_t = _` <slot></slot> `));
41
+ }
42
+ }, {
43
+ kind: "field",
44
+ static: true,
45
+ key: "styles",
46
+ value() {
47
+ return styles;
48
+ }
49
+ }]
50
+ };
51
+ }, LitElement);
52
+ export default CDSTableHeaderDescription;
53
+ //# sourceMappingURL=table-header-description.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-header-description.js","names":["LitElement","html","customElement","prefix","styles","CDSTableHeaderDescription","_decorate","_initialize","_LitElement","constructor","args","F","d","kind","key","value","render","_t","_","static"],"sources":["components/data-table/table-header-description.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 { customElement } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport styles from './data-table.scss';\n\n/**\n * Data table header description\n *\n * @element cds-table-header-description\n */\n@customElement(`${prefix}-table-header-description`)\nclass CDSTableHeaderDescription extends LitElement {\n render() {\n return html` <slot></slot> `;\n }\n\n static styles = styles;\n}\n\nexport default CDSTableHeaderDescription;\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,EAAEC,IAAI,QAAQ,KAAK;AACtC,SAASC,aAAa,QAAQ,mBAAmB;AACjD,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,OAAOC,MAAM,MAAM,uBAAmB;;AAEtC;AACA;AACA;AACA;AACA,GAJA;AACA;AACA;AACA;AACA;AAJA,IAMMC,yBAAyB,GAAAC,SAAA,EAD9BJ,aAAa,CAAE,GAAEC,MAAO,2BAA0B,CAAC,aAAAI,WAAA,EAAAC,WAAA;EAApD,MACMH,yBAAyB,SAAAG,WAAA,CAAoB;IAAAC,YAAA,GAAAC,IAAA;MAAA,SAAAA,IAAA;MAAAH,WAAA;IAAA;EAMnD;EAAC;IAAAI,CAAA,EANKN,yBAAyB;IAAAO,CAAA;MAAAC,IAAA;MAAAC,GAAA;MAAAC,KAAA,EAC7B,SAAAC,OAAA,EAAS;QACP,OAAOf,IAAI,CAAAgB,EAAA,KAAAA,EAAA,GAAAC,CAAC,iBAAe;MAC7B;IAAC;MAAAL,IAAA;MAAAM,MAAA;MAAAL,GAAA;MAAAC,MAAA;QAAA,OAEeX,MAAM;MAAA;IAAA;EAAA;AAAA,GALgBJ,UAAU;AAQlD,eAAeK,yBAAyB"}
@@ -6,19 +6,19 @@
6
6
  * This source code is licensed under the Apache-2.0 license found in the
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
- import BXTableRow from './table-row';
9
+ import CDSTableRow from './table-row';
10
10
  /**
11
11
  * Data table header row.
12
12
  *
13
13
  * @element cds-table-header-row
14
14
  */
15
- declare class BXTableHeaderRow extends BXTableRow {
15
+ declare class CDSTableHeaderRow extends CDSTableRow {
16
16
  /**
17
17
  * The name of the custom event fired before this row is selected/unselected upon a user gesture.
18
18
  * Cancellation of this event stops the user-initiated change in selection.
19
19
  */
20
20
  static get eventBeforeChangeSelection(): string;
21
21
  }
22
- export default BXTableHeaderRow;
22
+ export default CDSTableHeaderRow;
23
23
 
24
24
  //# sourceMappingURL=table-header-row.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/data-table/table-header-row.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC;;;;GAIG;AACH,cACM,gBAAiB,SAAQ,UAAU;IACvC;;;OAGG;IACH,MAAM,KAAK,0BAA0B,WAEpC;CACF;AAED,eAAe,gBAAgB,CAAC","file":"table-header-row.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 { customElement } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport BXTableRow from './table-row';\n\n/**\n * Data table header row.\n *\n * @element cds-table-header-row\n */\n@customElement(`${prefix}-table-header-row`)\nclass BXTableHeaderRow extends BXTableRow {\n /**\n * The name of the custom event fired before this row is selected/unselected upon a user gesture.\n * Cancellation of this event stops the user-initiated change in selection.\n */\n static get eventBeforeChangeSelection() {\n return `${prefix}-table-change-selection-all`;\n }\n}\n\nexport default BXTableHeaderRow;\n"]}
1
+ {"version":3,"sources":["components/data-table/table-header-row.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,WAAW,MAAM,aAAa,CAAC;AAEtC;;;;GAIG;AACH,cACM,iBAAkB,SAAQ,WAAW;IACzC;;;OAGG;IACH,MAAM,KAAK,0BAA0B,WAEpC;CACF;AAED,eAAe,iBAAiB,CAAC","file":"table-header-row.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 { customElement } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport CDSTableRow from './table-row';\n\n/**\n * Data table header row.\n *\n * @element cds-table-header-row\n */\n@customElement(`${prefix}-table-header-row`)\nclass CDSTableHeaderRow extends CDSTableRow {\n /**\n * The name of the custom event fired before this row is selected/unselected upon a user gesture.\n * Cancellation of this event stops the user-initiated change in selection.\n */\n static get eventBeforeChangeSelection() {\n return `${prefix}-table-change-selection-all`;\n }\n}\n\nexport default CDSTableHeaderRow;\n"]}
@@ -10,22 +10,22 @@ import _decorate from "@babel/runtime/helpers/esm/decorate";
10
10
 
11
11
  import { customElement } from 'lit/decorators.js';
12
12
  import { prefix } from '../../globals/settings';
13
- import BXTableRow from './table-row';
13
+ import CDSTableRow from './table-row';
14
14
 
15
15
  /**
16
16
  * Data table header row.
17
17
  *
18
18
  * @element cds-table-header-row
19
19
  */
20
- let BXTableHeaderRow = _decorate([customElement(`${prefix}-table-header-row`)], function (_initialize, _BXTableRow) {
21
- class BXTableHeaderRow extends _BXTableRow {
20
+ let CDSTableHeaderRow = _decorate([customElement(`${prefix}-table-header-row`)], function (_initialize, _CDSTableRow) {
21
+ class CDSTableHeaderRow extends _CDSTableRow {
22
22
  constructor(...args) {
23
23
  super(...args);
24
24
  _initialize(this);
25
25
  }
26
26
  }
27
27
  return {
28
- F: BXTableHeaderRow,
28
+ F: CDSTableHeaderRow,
29
29
  d: [{
30
30
  kind: "get",
31
31
  static: true,
@@ -40,6 +40,6 @@ let BXTableHeaderRow = _decorate([customElement(`${prefix}-table-header-row`)],
40
40
  }
41
41
  }]
42
42
  };
43
- }, BXTableRow);
44
- export default BXTableHeaderRow;
43
+ }, CDSTableRow);
44
+ export default CDSTableHeaderRow;
45
45
  //# sourceMappingURL=table-header-row.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"table-header-row.js","names":["customElement","prefix","BXTableRow","BXTableHeaderRow","_decorate","_initialize","_BXTableRow","constructor","args","F","d","kind","static","key","value","eventBeforeChangeSelection"],"sources":["components/data-table/table-header-row.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 { customElement } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport BXTableRow from './table-row';\n\n/**\n * Data table header row.\n *\n * @element cds-table-header-row\n */\n@customElement(`${prefix}-table-header-row`)\nclass BXTableHeaderRow extends BXTableRow {\n /**\n * The name of the custom event fired before this row is selected/unselected upon a user gesture.\n * Cancellation of this event stops the user-initiated change in selection.\n */\n static get eventBeforeChangeSelection() {\n return `${prefix}-table-change-selection-all`;\n }\n}\n\nexport default BXTableHeaderRow;\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,QAAQ,mBAAmB;AACjD,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,OAAOC,UAAU,MAAM,aAAa;;AAEpC;AACA;AACA;AACA;AACA;AAJA,IAMMC,gBAAgB,GAAAC,SAAA,EADrBJ,aAAa,CAAE,GAAEC,MAAO,mBAAkB,CAAC,aAAAI,WAAA,EAAAC,WAAA;EAA5C,MACMH,gBAAgB,SAAAG,WAAA,CAAoB;IAAAC,YAAA,GAAAC,IAAA;MAAA,SAAAA,IAAA;MAAAH,WAAA;IAAA;EAQ1C;EAAC;IAAAI,CAAA,EARKN,gBAAgB;IAAAO,CAAA;MAAAC,IAAA;MAAAC,MAAA;MAAAC,GAAA;MAAAC,KAAA;MACpB;AACF;AACA;AACA;MACE,SAAAC,2BAAA,EAAwC;QACtC,OAAQ,GAAEd,MAAO,6BAA4B;MAC/C;IAAC;EAAA;AAAA,GAP4BC,UAAU;AAUzC,eAAeC,gBAAgB"}
1
+ {"version":3,"file":"table-header-row.js","names":["customElement","prefix","CDSTableRow","CDSTableHeaderRow","_decorate","_initialize","_CDSTableRow","constructor","args","F","d","kind","static","key","value","eventBeforeChangeSelection"],"sources":["components/data-table/table-header-row.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 { customElement } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport CDSTableRow from './table-row';\n\n/**\n * Data table header row.\n *\n * @element cds-table-header-row\n */\n@customElement(`${prefix}-table-header-row`)\nclass CDSTableHeaderRow extends CDSTableRow {\n /**\n * The name of the custom event fired before this row is selected/unselected upon a user gesture.\n * Cancellation of this event stops the user-initiated change in selection.\n */\n static get eventBeforeChangeSelection() {\n return `${prefix}-table-change-selection-all`;\n }\n}\n\nexport default CDSTableHeaderRow;\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,QAAQ,mBAAmB;AACjD,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,OAAOC,WAAW,MAAM,aAAa;;AAErC;AACA;AACA;AACA;AACA;AAJA,IAMMC,iBAAiB,GAAAC,SAAA,EADtBJ,aAAa,CAAE,GAAEC,MAAO,mBAAkB,CAAC,aAAAI,WAAA,EAAAC,YAAA;EAA5C,MACMH,iBAAiB,SAAAG,YAAA,CAAqB;IAAAC,YAAA,GAAAC,IAAA;MAAA,SAAAA,IAAA;MAAAH,WAAA;IAAA;EAQ5C;EAAC;IAAAI,CAAA,EARKN,iBAAiB;IAAAO,CAAA;MAAAC,IAAA;MAAAC,MAAA;MAAAC,GAAA;MAAAC,KAAA;MACrB;AACF;AACA;AACA;MACE,SAAAC,2BAAA,EAAwC;QACtC,OAAQ,GAAEd,MAAO,6BAA4B;MAC/C;IAAC;EAAA;AAAA,GAP6BC,WAAW;AAU3C,eAAeC,iBAAiB"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @license
3
+ *
4
+ * Copyright IBM Corp. 2019, 2023
5
+ *
6
+ * This source code is licensed under the Apache-2.0 license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */
9
+ import { LitElement } from 'lit';
10
+ /**
11
+ * Data table header title
12
+ *
13
+ * @element cds-table-header-title
14
+ */
15
+ declare class CDSTableHeader extends LitElement {
16
+ render(): import("lit-html").TemplateResult<1>;
17
+ static styles: any;
18
+ }
19
+ export default CDSTableHeader;
20
+
21
+ //# sourceMappingURL=table-header-title.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/data-table/table-header-title.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAKvC;;;;GAIG;AACH,cACM,cAAe,SAAQ,UAAU;IACrC,MAAM;IAIN,MAAM,CAAC,MAAM,MAAU;CACxB;AAED,eAAe,cAAc,CAAC","file":"table-header-title.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 { customElement } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport styles from './data-table.scss';\n\n/**\n * Data table header title\n *\n * @element cds-table-header-title\n */\n@customElement(`${prefix}-table-header-title`)\nclass CDSTableHeader extends LitElement {\n render() {\n return html` <slot></slot> `;\n }\n\n static styles = styles;\n}\n\nexport default CDSTableHeader;\n"]}
@@ -0,0 +1,53 @@
1
+ import _decorate from "@babel/runtime/helpers/esm/decorate";
2
+ let _ = t => t,
3
+ _t;
4
+ /**
5
+ * @license
6
+ *
7
+ * Copyright IBM Corp. 2019, 2023
8
+ *
9
+ * This source code is licensed under the Apache-2.0 license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ */
12
+
13
+ import { LitElement, html } from 'lit';
14
+ import { customElement } from 'lit/decorators.js';
15
+ import { prefix } from '../../globals/settings';
16
+ import styles from "././data-table.css.js";
17
+
18
+ /**
19
+ * Data table header title
20
+ *
21
+ * @element cds-table-header-title
22
+ */ /**
23
+ * Data table header title
24
+ *
25
+ * @element cds-table-header-title
26
+ */
27
+ let CDSTableHeader = _decorate([customElement(`${prefix}-table-header-title`)], function (_initialize, _LitElement) {
28
+ class CDSTableHeader extends _LitElement {
29
+ constructor(...args) {
30
+ super(...args);
31
+ _initialize(this);
32
+ }
33
+ }
34
+ return {
35
+ F: CDSTableHeader,
36
+ d: [{
37
+ kind: "method",
38
+ key: "render",
39
+ value: function render() {
40
+ return html(_t || (_t = _` <slot></slot> `));
41
+ }
42
+ }, {
43
+ kind: "field",
44
+ static: true,
45
+ key: "styles",
46
+ value() {
47
+ return styles;
48
+ }
49
+ }]
50
+ };
51
+ }, LitElement);
52
+ export default CDSTableHeader;
53
+ //# sourceMappingURL=table-header-title.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-header-title.js","names":["LitElement","html","customElement","prefix","styles","CDSTableHeader","_decorate","_initialize","_LitElement","constructor","args","F","d","kind","key","value","render","_t","_","static"],"sources":["components/data-table/table-header-title.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 { customElement } from 'lit/decorators.js';\nimport { prefix } from '../../globals/settings';\nimport styles from './data-table.scss';\n\n/**\n * Data table header title\n *\n * @element cds-table-header-title\n */\n@customElement(`${prefix}-table-header-title`)\nclass CDSTableHeader extends LitElement {\n render() {\n return html` <slot></slot> `;\n }\n\n static styles = styles;\n}\n\nexport default CDSTableHeader;\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,UAAU,EAAEC,IAAI,QAAQ,KAAK;AACtC,SAASC,aAAa,QAAQ,mBAAmB;AACjD,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,OAAOC,MAAM,MAAM,uBAAmB;;AAEtC;AACA;AACA;AACA;AACA,GAJA;AACA;AACA;AACA;AACA;AAJA,IAMMC,cAAc,GAAAC,SAAA,EADnBJ,aAAa,CAAE,GAAEC,MAAO,qBAAoB,CAAC,aAAAI,WAAA,EAAAC,WAAA;EAA9C,MACMH,cAAc,SAAAG,WAAA,CAAoB;IAAAC,YAAA,GAAAC,IAAA;MAAA,SAAAA,IAAA;MAAAH,WAAA;IAAA;EAMxC;EAAC;IAAAI,CAAA,EANKN,cAAc;IAAAO,CAAA;MAAAC,IAAA;MAAAC,GAAA;MAAAC,KAAA,EAClB,SAAAC,OAAA,EAAS;QACP,OAAOf,IAAI,CAAAgB,EAAA,KAAAA,EAAA,GAAAC,CAAC,iBAAe;MAC7B;IAAC;MAAAL,IAAA;MAAAM,MAAA;MAAAL,GAAA;MAAAC,MAAA;QAAA,OAEeX,MAAM;MAAA;IAAA;EAAA;AAAA,GALKJ,UAAU;AAQvC,eAAeK,cAAc"}