@patternfly/react-table 6.0.0-alpha.1 → 6.0.0-alpha.100

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 (366) hide show
  1. package/CHANGELOG.md +1215 -1
  2. package/README.md +3 -18
  3. package/components/package.json +1 -1
  4. package/deprecated/package.json +1 -1
  5. package/dist/dynamic/components/Table/package.json +1 -1
  6. package/dist/dynamic/components/Table/utils/decorators/package.json +1 -1
  7. package/dist/dynamic/components/Table/utils/package.json +1 -1
  8. package/dist/dynamic/deprecated/components/Table/base/package.json +1 -1
  9. package/dist/dynamic/deprecated/components/Table/package.json +1 -1
  10. package/dist/dynamic/deprecated/components/package.json +1 -1
  11. package/dist/dynamic-modules.json +127 -0
  12. package/dist/esm/components/Table/ActionsColumn.d.ts +3 -1
  13. package/dist/esm/components/Table/ActionsColumn.d.ts.map +1 -1
  14. package/dist/esm/components/Table/ActionsColumn.js +4 -5
  15. package/dist/esm/components/Table/ActionsColumn.js.map +1 -1
  16. package/dist/esm/components/Table/Caption.js +1 -1
  17. package/dist/esm/components/Table/Caption.js.map +1 -1
  18. package/dist/esm/components/Table/CollapseColumn.js +1 -1
  19. package/dist/esm/components/Table/CollapseColumn.js.map +1 -1
  20. package/dist/esm/components/Table/DraggableCell.d.ts.map +1 -1
  21. package/dist/esm/components/Table/DraggableCell.js +1 -2
  22. package/dist/esm/components/Table/DraggableCell.js.map +1 -1
  23. package/dist/esm/components/Table/DraggableRowWrapper.js +2 -2
  24. package/dist/esm/components/Table/DraggableRowWrapper.js.map +1 -1
  25. package/dist/esm/components/Table/EditColumn.d.ts.map +1 -1
  26. package/dist/esm/components/Table/EditColumn.js +4 -7
  27. package/dist/esm/components/Table/EditColumn.js.map +1 -1
  28. package/dist/esm/components/Table/EditableSelectInputCell.d.ts +3 -4
  29. package/dist/esm/components/Table/EditableSelectInputCell.d.ts.map +1 -1
  30. package/dist/esm/components/Table/EditableSelectInputCell.js +11 -7
  31. package/dist/esm/components/Table/EditableSelectInputCell.js.map +1 -1
  32. package/dist/esm/components/Table/EditableTextCell.js +3 -3
  33. package/dist/esm/components/Table/EditableTextCell.js.map +1 -1
  34. package/dist/esm/components/Table/ExpandableRowContent.js +1 -1
  35. package/dist/esm/components/Table/ExpandableRowContent.js.map +1 -1
  36. package/dist/esm/components/Table/FavoritesCell.d.ts.map +1 -1
  37. package/dist/esm/components/Table/FavoritesCell.js +1 -2
  38. package/dist/esm/components/Table/FavoritesCell.js.map +1 -1
  39. package/dist/esm/components/Table/HeaderCellInfoWrapper.d.ts.map +1 -1
  40. package/dist/esm/components/Table/HeaderCellInfoWrapper.js +3 -5
  41. package/dist/esm/components/Table/HeaderCellInfoWrapper.js.map +1 -1
  42. package/dist/esm/components/Table/InnerScrollContainer.js +1 -1
  43. package/dist/esm/components/Table/InnerScrollContainer.js.map +1 -1
  44. package/dist/esm/components/Table/OuterScrollContainer.js +1 -1
  45. package/dist/esm/components/Table/OuterScrollContainer.js.map +1 -1
  46. package/dist/esm/components/Table/RowWrapper.d.ts +1 -1
  47. package/dist/esm/components/Table/RowWrapper.js.map +1 -1
  48. package/dist/esm/components/Table/SelectColumn.d.ts +5 -0
  49. package/dist/esm/components/Table/SelectColumn.d.ts.map +1 -1
  50. package/dist/esm/components/Table/SelectColumn.js +6 -3
  51. package/dist/esm/components/Table/SelectColumn.js.map +1 -1
  52. package/dist/esm/components/Table/SortColumn.d.ts +4 -0
  53. package/dist/esm/components/Table/SortColumn.d.ts.map +1 -1
  54. package/dist/esm/components/Table/SortColumn.js +3 -3
  55. package/dist/esm/components/Table/SortColumn.js.map +1 -1
  56. package/dist/esm/components/Table/Table.d.ts +1 -1
  57. package/dist/esm/components/Table/Table.d.ts.map +1 -1
  58. package/dist/esm/components/Table/Table.js +9 -9
  59. package/dist/esm/components/Table/Table.js.map +1 -1
  60. package/dist/esm/components/Table/TableText.d.ts +3 -1
  61. package/dist/esm/components/Table/TableText.d.ts.map +1 -1
  62. package/dist/esm/components/Table/TableText.js +13 -11
  63. package/dist/esm/components/Table/TableText.js.map +1 -1
  64. package/dist/esm/components/Table/TableTypes.d.ts +29 -25
  65. package/dist/esm/components/Table/TableTypes.d.ts.map +1 -1
  66. package/dist/esm/components/Table/TableTypes.js.map +1 -1
  67. package/dist/esm/components/Table/Tbody.d.ts +1 -1
  68. package/dist/esm/components/Table/Tbody.d.ts.map +1 -1
  69. package/dist/esm/components/Table/Tbody.js +1 -1
  70. package/dist/esm/components/Table/Tbody.js.map +1 -1
  71. package/dist/esm/components/Table/Td.d.ts +2 -2
  72. package/dist/esm/components/Table/Td.d.ts.map +1 -1
  73. package/dist/esm/components/Table/Td.js +9 -5
  74. package/dist/esm/components/Table/Td.js.map +1 -1
  75. package/dist/esm/components/Table/Th.d.ts +12 -1
  76. package/dist/esm/components/Table/Th.d.ts.map +1 -1
  77. package/dist/esm/components/Table/Th.js +26 -12
  78. package/dist/esm/components/Table/Th.js.map +1 -1
  79. package/dist/esm/components/Table/Thead.d.ts +1 -1
  80. package/dist/esm/components/Table/Thead.d.ts.map +1 -1
  81. package/dist/esm/components/Table/Thead.js +1 -1
  82. package/dist/esm/components/Table/Thead.js.map +1 -1
  83. package/dist/esm/components/Table/Tr.d.ts +4 -2
  84. package/dist/esm/components/Table/Tr.d.ts.map +1 -1
  85. package/dist/esm/components/Table/Tr.js +4 -4
  86. package/dist/esm/components/Table/Tr.js.map +1 -1
  87. package/dist/esm/components/Table/TreeRowWrapper.js +2 -2
  88. package/dist/esm/components/Table/TreeRowWrapper.js.map +1 -1
  89. package/dist/esm/components/Table/base/columns-are-equal.js.map +1 -1
  90. package/dist/esm/components/Table/base/evaluate-transforms.js.map +1 -1
  91. package/dist/esm/components/Table/base/merge-props.js.map +1 -1
  92. package/dist/esm/components/Table/base/provider.d.ts +8 -8
  93. package/dist/esm/components/Table/base/provider.js.map +1 -1
  94. package/dist/esm/components/Table/base/types.d.ts +23 -24
  95. package/dist/esm/components/Table/base/types.d.ts.map +1 -1
  96. package/dist/esm/components/Table/base/types.js.map +1 -1
  97. package/dist/esm/components/Table/utils/decorators/cellActions.js +1 -1
  98. package/dist/esm/components/Table/utils/decorators/cellActions.js.map +1 -1
  99. package/dist/esm/components/Table/utils/decorators/cellWidth.js +1 -1
  100. package/dist/esm/components/Table/utils/decorators/cellWidth.js.map +1 -1
  101. package/dist/esm/components/Table/utils/decorators/classNames.js +1 -1
  102. package/dist/esm/components/Table/utils/decorators/classNames.js.map +1 -1
  103. package/dist/esm/components/Table/utils/decorators/collapsible.js +1 -1
  104. package/dist/esm/components/Table/utils/decorators/collapsible.js.map +1 -1
  105. package/dist/esm/components/Table/utils/decorators/compoundExpand.js +1 -1
  106. package/dist/esm/components/Table/utils/decorators/compoundExpand.js.map +1 -1
  107. package/dist/esm/components/Table/utils/decorators/editable.js +1 -1
  108. package/dist/esm/components/Table/utils/decorators/editable.js.map +1 -1
  109. package/dist/esm/components/Table/utils/decorators/favoritable.js +1 -1
  110. package/dist/esm/components/Table/utils/decorators/favoritable.js.map +1 -1
  111. package/dist/esm/components/Table/utils/decorators/info.js +1 -1
  112. package/dist/esm/components/Table/utils/decorators/info.js.map +1 -1
  113. package/dist/esm/components/Table/utils/decorators/selectable.d.ts.map +1 -1
  114. package/dist/esm/components/Table/utils/decorators/selectable.js +5 -5
  115. package/dist/esm/components/Table/utils/decorators/selectable.js.map +1 -1
  116. package/dist/esm/components/Table/utils/decorators/sortable.d.ts.map +1 -1
  117. package/dist/esm/components/Table/utils/decorators/sortable.js +7 -4
  118. package/dist/esm/components/Table/utils/decorators/sortable.js.map +1 -1
  119. package/dist/esm/components/Table/utils/decorators/treeRow.d.ts +3 -3
  120. package/dist/esm/components/Table/utils/decorators/treeRow.d.ts.map +1 -1
  121. package/dist/esm/components/Table/utils/decorators/treeRow.js +5 -5
  122. package/dist/esm/components/Table/utils/decorators/treeRow.js.map +1 -1
  123. package/dist/esm/components/Table/utils/decorators/wrappable.js +1 -1
  124. package/dist/esm/components/Table/utils/decorators/wrappable.js.map +1 -1
  125. package/dist/esm/components/Table/utils/headerUtils.js.map +1 -1
  126. package/dist/esm/components/Table/utils/utils.js.map +1 -1
  127. package/dist/esm/demos/DashboardHeader.d.ts +8 -0
  128. package/dist/esm/demos/DashboardHeader.d.ts.map +1 -0
  129. package/dist/esm/demos/DashboardHeader.js +78 -0
  130. package/dist/esm/demos/DashboardHeader.js.map +1 -0
  131. package/dist/esm/demos/DashboardWrapper.d.ts +85 -0
  132. package/dist/esm/demos/DashboardWrapper.d.ts.map +1 -0
  133. package/dist/esm/demos/DashboardWrapper.js +41 -0
  134. package/dist/esm/demos/DashboardWrapper.js.map +1 -0
  135. package/dist/esm/demos/index.d.ts +4 -0
  136. package/dist/esm/demos/index.d.ts.map +1 -0
  137. package/dist/esm/demos/index.js +4 -0
  138. package/dist/esm/demos/index.js.map +1 -0
  139. package/dist/esm/demos/sampleData.d.ts +13 -0
  140. package/dist/esm/demos/sampleData.d.ts.map +1 -0
  141. package/dist/esm/demos/sampleData.js +764 -0
  142. package/dist/esm/demos/sampleData.js.map +1 -0
  143. package/dist/esm/deprecated/components/Table/Body.d.ts +2 -2
  144. package/dist/esm/deprecated/components/Table/Body.d.ts.map +1 -1
  145. package/dist/esm/deprecated/components/Table/Body.js.map +1 -1
  146. package/dist/esm/deprecated/components/Table/BodyCell.js.map +1 -1
  147. package/dist/esm/deprecated/components/Table/BodyWrapper.js.map +1 -1
  148. package/dist/esm/deprecated/components/Table/Table.d.ts +1 -1
  149. package/dist/esm/deprecated/components/Table/Table.d.ts.map +1 -1
  150. package/dist/esm/deprecated/components/Table/Table.js +3 -4
  151. package/dist/esm/deprecated/components/Table/Table.js.map +1 -1
  152. package/dist/esm/deprecated/components/Table/base/body-row.js.map +1 -1
  153. package/dist/esm/deprecated/components/Table/base/body.d.ts +8 -2
  154. package/dist/esm/deprecated/components/Table/base/body.d.ts.map +1 -1
  155. package/dist/esm/deprecated/components/Table/base/body.js.map +1 -1
  156. package/dist/esm/deprecated/components/Table/base/header-row.js +1 -1
  157. package/dist/esm/deprecated/components/Table/base/header-row.js.map +1 -1
  158. package/dist/esm/deprecated/components/Table/base/header.d.ts +1 -1
  159. package/dist/esm/deprecated/components/Table/base/header.d.ts.map +1 -1
  160. package/dist/esm/deprecated/components/Table/base/resolve-row-key.js.map +1 -1
  161. package/dist/esm/test-helpers/data-helpers.js.map +1 -1
  162. package/dist/js/components/Table/ActionsColumn.d.ts +3 -1
  163. package/dist/js/components/Table/ActionsColumn.d.ts.map +1 -1
  164. package/dist/js/components/Table/ActionsColumn.js +10 -11
  165. package/dist/js/components/Table/ActionsColumn.js.map +1 -1
  166. package/dist/js/components/Table/CollapseColumn.js +2 -2
  167. package/dist/js/components/Table/CollapseColumn.js.map +1 -1
  168. package/dist/js/components/Table/DraggableCell.d.ts.map +1 -1
  169. package/dist/js/components/Table/DraggableCell.js +3 -4
  170. package/dist/js/components/Table/DraggableCell.js.map +1 -1
  171. package/dist/js/components/Table/EditColumn.d.ts.map +1 -1
  172. package/dist/js/components/Table/EditColumn.js +7 -10
  173. package/dist/js/components/Table/EditColumn.js.map +1 -1
  174. package/dist/js/components/Table/EditableSelectInputCell.d.ts +3 -4
  175. package/dist/js/components/Table/EditableSelectInputCell.d.ts.map +1 -1
  176. package/dist/js/components/Table/EditableSelectInputCell.js +9 -5
  177. package/dist/js/components/Table/EditableSelectInputCell.js.map +1 -1
  178. package/dist/js/components/Table/EditableTextCell.js +2 -2
  179. package/dist/js/components/Table/EditableTextCell.js.map +1 -1
  180. package/dist/js/components/Table/FavoritesCell.d.ts.map +1 -1
  181. package/dist/js/components/Table/FavoritesCell.js +3 -4
  182. package/dist/js/components/Table/FavoritesCell.js.map +1 -1
  183. package/dist/js/components/Table/HeaderCellInfoWrapper.d.ts.map +1 -1
  184. package/dist/js/components/Table/HeaderCellInfoWrapper.js +6 -8
  185. package/dist/js/components/Table/HeaderCellInfoWrapper.js.map +1 -1
  186. package/dist/js/components/Table/RowWrapper.d.ts +1 -1
  187. package/dist/js/components/Table/RowWrapper.js +1 -1
  188. package/dist/js/components/Table/RowWrapper.js.map +1 -1
  189. package/dist/js/components/Table/SelectColumn.d.ts +5 -0
  190. package/dist/js/components/Table/SelectColumn.d.ts.map +1 -1
  191. package/dist/js/components/Table/SelectColumn.js +7 -4
  192. package/dist/js/components/Table/SelectColumn.js.map +1 -1
  193. package/dist/js/components/Table/SortColumn.d.ts +4 -0
  194. package/dist/js/components/Table/SortColumn.d.ts.map +1 -1
  195. package/dist/js/components/Table/SortColumn.js +6 -6
  196. package/dist/js/components/Table/SortColumn.js.map +1 -1
  197. package/dist/js/components/Table/Table.d.ts +1 -1
  198. package/dist/js/components/Table/Table.d.ts.map +1 -1
  199. package/dist/js/components/Table/Table.js +5 -5
  200. package/dist/js/components/Table/Table.js.map +1 -1
  201. package/dist/js/components/Table/TableText.d.ts +3 -1
  202. package/dist/js/components/Table/TableText.d.ts.map +1 -1
  203. package/dist/js/components/Table/TableText.js +15 -13
  204. package/dist/js/components/Table/TableText.js.map +1 -1
  205. package/dist/js/components/Table/TableTypes.d.ts +29 -25
  206. package/dist/js/components/Table/TableTypes.d.ts.map +1 -1
  207. package/dist/js/components/Table/TableTypes.js +2 -2
  208. package/dist/js/components/Table/TableTypes.js.map +1 -1
  209. package/dist/js/components/Table/Tbody.d.ts +1 -1
  210. package/dist/js/components/Table/Tbody.d.ts.map +1 -1
  211. package/dist/js/components/Table/Td.d.ts +2 -2
  212. package/dist/js/components/Table/Td.d.ts.map +1 -1
  213. package/dist/js/components/Table/Td.js +8 -4
  214. package/dist/js/components/Table/Td.js.map +1 -1
  215. package/dist/js/components/Table/Th.d.ts +12 -1
  216. package/dist/js/components/Table/Th.d.ts.map +1 -1
  217. package/dist/js/components/Table/Th.js +24 -10
  218. package/dist/js/components/Table/Th.js.map +1 -1
  219. package/dist/js/components/Table/Thead.d.ts +1 -1
  220. package/dist/js/components/Table/Thead.d.ts.map +1 -1
  221. package/dist/js/components/Table/Tr.d.ts +4 -2
  222. package/dist/js/components/Table/Tr.d.ts.map +1 -1
  223. package/dist/js/components/Table/Tr.js +3 -3
  224. package/dist/js/components/Table/Tr.js.map +1 -1
  225. package/dist/js/components/Table/base/columns-are-equal.js.map +1 -1
  226. package/dist/js/components/Table/base/evaluate-transforms.js.map +1 -1
  227. package/dist/js/components/Table/base/merge-props.js.map +1 -1
  228. package/dist/js/components/Table/base/provider.d.ts +8 -8
  229. package/dist/js/components/Table/base/provider.js.map +1 -1
  230. package/dist/js/components/Table/base/types.d.ts +23 -24
  231. package/dist/js/components/Table/base/types.d.ts.map +1 -1
  232. package/dist/js/components/Table/base/types.js.map +1 -1
  233. package/dist/js/components/Table/utils/decorators/compoundExpand.js.map +1 -1
  234. package/dist/js/components/Table/utils/decorators/editable.js.map +1 -1
  235. package/dist/js/components/Table/utils/decorators/favoritable.js.map +1 -1
  236. package/dist/js/components/Table/utils/decorators/selectable.d.ts.map +1 -1
  237. package/dist/js/components/Table/utils/decorators/selectable.js +3 -3
  238. package/dist/js/components/Table/utils/decorators/selectable.js.map +1 -1
  239. package/dist/js/components/Table/utils/decorators/sortable.d.ts.map +1 -1
  240. package/dist/js/components/Table/utils/decorators/sortable.js +7 -4
  241. package/dist/js/components/Table/utils/decorators/sortable.js.map +1 -1
  242. package/dist/js/components/Table/utils/decorators/treeRow.d.ts +3 -3
  243. package/dist/js/components/Table/utils/decorators/treeRow.d.ts.map +1 -1
  244. package/dist/js/components/Table/utils/decorators/treeRow.js +7 -7
  245. package/dist/js/components/Table/utils/decorators/treeRow.js.map +1 -1
  246. package/dist/js/components/Table/utils/headerUtils.js.map +1 -1
  247. package/dist/js/components/Table/utils/utils.js.map +1 -1
  248. package/dist/js/demos/DashboardHeader.d.ts +8 -0
  249. package/dist/js/demos/DashboardHeader.d.ts.map +1 -0
  250. package/dist/js/demos/DashboardHeader.js +83 -0
  251. package/dist/js/demos/DashboardHeader.js.map +1 -0
  252. package/dist/js/demos/DashboardWrapper.d.ts +85 -0
  253. package/dist/js/demos/DashboardWrapper.d.ts.map +1 -0
  254. package/dist/js/demos/DashboardWrapper.js +45 -0
  255. package/dist/js/demos/DashboardWrapper.js.map +1 -0
  256. package/dist/js/demos/index.d.ts +4 -0
  257. package/dist/js/demos/index.d.ts.map +1 -0
  258. package/dist/js/demos/index.js +7 -0
  259. package/dist/js/demos/index.js.map +1 -0
  260. package/dist/js/demos/sampleData.d.ts +13 -0
  261. package/dist/js/demos/sampleData.d.ts.map +1 -0
  262. package/dist/js/demos/sampleData.js +767 -0
  263. package/dist/js/demos/sampleData.js.map +1 -0
  264. package/dist/js/deprecated/components/Table/Body.d.ts +2 -2
  265. package/dist/js/deprecated/components/Table/Body.d.ts.map +1 -1
  266. package/dist/js/deprecated/components/Table/Body.js.map +1 -1
  267. package/dist/js/deprecated/components/Table/BodyCell.js +3 -3
  268. package/dist/js/deprecated/components/Table/BodyCell.js.map +1 -1
  269. package/dist/js/deprecated/components/Table/BodyWrapper.js.map +1 -1
  270. package/dist/js/deprecated/components/Table/Table.d.ts +1 -1
  271. package/dist/js/deprecated/components/Table/Table.d.ts.map +1 -1
  272. package/dist/js/deprecated/components/Table/Table.js +9 -10
  273. package/dist/js/deprecated/components/Table/Table.js.map +1 -1
  274. package/dist/js/deprecated/components/Table/base/body-row.js.map +1 -1
  275. package/dist/js/deprecated/components/Table/base/body.d.ts +8 -2
  276. package/dist/js/deprecated/components/Table/base/body.d.ts.map +1 -1
  277. package/dist/js/deprecated/components/Table/base/body.js.map +1 -1
  278. package/dist/js/deprecated/components/Table/base/header-row.js +1 -1
  279. package/dist/js/deprecated/components/Table/base/header-row.js.map +1 -1
  280. package/dist/js/deprecated/components/Table/base/header.d.ts +1 -1
  281. package/dist/js/deprecated/components/Table/base/header.d.ts.map +1 -1
  282. package/dist/js/deprecated/components/Table/base/resolve-row-key.js.map +1 -1
  283. package/dist/js/test-helpers/data-helpers.js.map +1 -1
  284. package/dist/umd/assets/output-BnU-TMGU.css +26986 -0
  285. package/dist/umd/react-table.min.js +8 -9
  286. package/package.json +8 -12
  287. package/rollup.config.mjs +8 -0
  288. package/single-packages.config.json +3 -6
  289. package/src/components/Table/ActionsColumn.tsx +35 -31
  290. package/src/components/Table/DraggableCell.tsx +2 -3
  291. package/src/components/Table/EditColumn.tsx +21 -9
  292. package/src/components/Table/EditableSelectInputCell.tsx +16 -11
  293. package/src/components/Table/EditableTextCell.tsx +1 -1
  294. package/src/components/Table/FavoritesCell.tsx +2 -3
  295. package/src/components/Table/HeaderCellInfoWrapper.tsx +10 -6
  296. package/src/components/Table/SelectColumn.tsx +27 -8
  297. package/src/components/Table/SortColumn.tsx +15 -1
  298. package/src/components/Table/Table.tsx +6 -6
  299. package/src/components/Table/TableText.tsx +19 -9
  300. package/src/components/Table/TableTypes.tsx +12 -9
  301. package/src/components/Table/Td.tsx +11 -6
  302. package/src/components/Table/Th.tsx +42 -10
  303. package/src/components/Table/Tr.tsx +5 -1
  304. package/src/components/Table/__tests__/Th.test.tsx +31 -0
  305. package/src/components/Table/__tests__/__snapshots__/RowWrapper.test.tsx.snap +4 -4
  306. package/src/components/Table/base/types.tsx +6 -7
  307. package/src/components/Table/examples/Table.md +48 -3
  308. package/src/components/Table/examples/TableActions.tsx +2 -2
  309. package/src/components/Table/examples/TableActionsOverflow.tsx +3 -5
  310. package/src/components/Table/examples/TableCompoundExpandable.tsx +5 -4
  311. package/src/components/Table/examples/TableDraggable.tsx +19 -16
  312. package/src/components/Table/examples/TableEditable.tsx +313 -0
  313. package/src/components/Table/examples/TableEmptyState.tsx +1 -8
  314. package/src/components/Table/examples/TableExpandable.tsx +1 -2
  315. package/src/components/Table/examples/TableMisc.tsx +3 -1
  316. package/src/components/Table/examples/TableNestedExpandable.tsx +1 -1
  317. package/src/components/Table/examples/TableNestedHeaders.tsx +4 -6
  318. package/src/components/Table/examples/TableNestedStickyHeader.tsx +4 -9
  319. package/src/components/Table/examples/TableNestedTableExpandable.tsx +1 -1
  320. package/src/components/Table/examples/TableSelectable.tsx +1 -0
  321. package/src/components/Table/examples/TableSelectableRadio.tsx +1 -1
  322. package/src/components/Table/examples/TableSortableCustom.tsx +2 -3
  323. package/src/components/Table/examples/TableStickyColumnsAndHeader.tsx +6 -5
  324. package/src/components/Table/examples/TableStripedExpandable.tsx +1 -1
  325. package/src/components/Table/utils/__snapshots__/transformers.test.tsx.snap +4 -4
  326. package/src/components/Table/utils/decorators/selectable.tsx +3 -2
  327. package/src/components/Table/utils/decorators/sortable.tsx +8 -2
  328. package/src/components/Table/utils/decorators/treeRow.tsx +3 -3
  329. package/src/components/Table/utils/transformers.test.tsx +14 -11
  330. package/src/demos/DashboardHeader.tsx +201 -0
  331. package/src/demos/DashboardWrapper.tsx +198 -0
  332. package/src/demos/Table.md +181 -0
  333. package/src/demos/assets/avatarImg.svg +18 -0
  334. package/src/demos/assets/index.d.ts +4 -0
  335. package/src/demos/assets/pf-logo.svg +28 -0
  336. package/src/demos/examples/TableAutomaticPagination.tsx +101 -0
  337. package/src/{docs/demos/table-demos/BulkSelect.jsx → demos/examples/TableBulkSelect.tsx} +42 -21
  338. package/src/demos/examples/TableColumnManagement.tsx +484 -0
  339. package/src/demos/examples/TableColumnManagementWithDraggable.tsx +635 -0
  340. package/src/{docs/demos/table-demos/Compact.jsx → demos/examples/TableCompact.tsx} +39 -18
  341. package/src/{docs/demos/table-demos/CompoundExpansion.jsx → demos/examples/TableCompoundExpansion.tsx} +31 -16
  342. package/src/demos/examples/TableEmptyStateDefault.tsx +58 -0
  343. package/src/demos/examples/TableEmptyStateError.tsx +43 -0
  344. package/src/demos/examples/TableEmptyStateLoading.tsx +33 -0
  345. package/src/{docs/demos/table-demos/ExpandCollapseAll.jsx → demos/examples/TableExpandCollapseAll.tsx} +75 -67
  346. package/src/demos/examples/TableFilterable.tsx +387 -0
  347. package/src/{docs/demos/table-demos/SortableResponsive.jsx → demos/examples/TableSortableResponsive.tsx} +42 -43
  348. package/src/{docs/demos/table-demos/StaticBottomPagination.jsx → demos/examples/TableStaticBottomPagination.tsx} +29 -11
  349. package/src/{docs/demos/table-demos/StickyFirstColumn.jsx → demos/examples/TableStickyFirstColumn.tsx} +31 -9
  350. package/src/{docs/demos/table-demos/StickyHeader.jsx → demos/examples/TableStickyHeader.tsx} +3 -3
  351. package/src/demos/index.ts +3 -0
  352. package/src/{docs/demos/table-demos/sampleData.js → demos/sampleData.tsx} +88 -77
  353. package/src/deprecated/components/Table/Table.tsx +2 -3
  354. package/src/deprecated/components/Table/__tests__/Table.test.tsx +4 -9
  355. package/src/deprecated/components/Table/__tests__/__snapshots__/Table.test.tsx.snap +2457 -2274
  356. package/src/deprecated/components/Table/base/header-row.tsx +1 -1
  357. package/src/deprecated/components/Table/examples/LegacyTableCompoundExpandable.tsx +4 -3
  358. package/src/deprecated/components/Table/examples/LegacyTableEmptyState.tsx +6 -8
  359. package/src/deprecated/components/Table/examples/LegacyTableMisc.tsx +4 -3
  360. package/src/deprecated/components/Table/examples/LegacyTableSelectable.tsx +2 -1
  361. package/src/deprecated/components/Table/examples/LegacyTableSortableCustom.tsx +2 -3
  362. package/src/deprecated/components/Table/examples/LegacyTableStripedCustomTr.tsx +2 -6
  363. package/src/deprecated/components/Table/examples/Table.md +49 -40
  364. package/rollup.config.js +0 -7
  365. package/src/docs/demos/Table.md +0 -1622
  366. package/src/docs/demos/table-demos/ColumnManagement.jsx +0 -471
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  import { css } from '@patternfly/react-styles';
3
3
  import styles from '@patternfly/react-styles/css/components/Table/table';
4
4
  import scrollStyles from '@patternfly/react-styles/css/components/Table/table-scrollable';
5
+ import treeViewStyles from '@patternfly/react-styles/css/components/Table/table-tree-view';
5
6
  import { BaseCellProps } from './Table';
6
7
  import {
7
8
  cellActions,
@@ -28,6 +29,10 @@ import {
28
29
  TdSelectType,
29
30
  TdTreeRowType
30
31
  } from './base/types';
32
+ import cssStickyCellMinWidth from '@patternfly/react-tokens/dist/esm/c_table__sticky_cell_MinWidth';
33
+ import cssStickyCellInlineStart from '@patternfly/react-tokens/dist/esm/c_table__sticky_cell_InsetInlineStart';
34
+ import cssStickyCellInlineEnd from '@patternfly/react-tokens/dist/esm/c_table__sticky_cell_InsetInlineEnd';
35
+
31
36
  export interface TdProps extends BaseCellProps, Omit<React.HTMLProps<HTMLTableDataCellElement>, 'onSelect' | 'width'> {
32
37
  /**
33
38
  * The column header the cell corresponds to.
@@ -50,7 +55,7 @@ export interface TdProps extends BaseCellProps, Omit<React.HTMLProps<HTMLTableDa
50
55
  draggableRow?: TdDraggableType;
51
56
  /** True to remove padding */
52
57
  noPadding?: boolean;
53
- /** Applies pf-v5-c-table__action to td */
58
+ /** Applies pf-v6-c-table__action to td */
54
59
  isActionCell?: boolean;
55
60
  /**
56
61
  * Tooltip to show on the body cell.
@@ -253,8 +258,8 @@ const TdBase: React.FunctionComponent<TdProps> = ({
253
258
  } = merged;
254
259
 
255
260
  const treeTableTitleCell =
256
- (className && className.includes('pf-v5-c-table__tree-view-title-cell')) ||
257
- (mergedClassName && mergedClassName.includes('pf-v5-c-table__tree-view-title-cell'));
261
+ (className && className.includes(treeViewStyles.tableTreeViewTitleCell)) ||
262
+ (mergedClassName && mergedClassName.includes(treeViewStyles.tableTreeViewTitleCell));
258
263
 
259
264
  React.useEffect(() => {
260
265
  setTruncated(
@@ -288,9 +293,9 @@ const TdBase: React.FunctionComponent<TdProps> = ({
288
293
  {...props}
289
294
  {...(isStickyColumn && {
290
295
  style: {
291
- '--pf-v5-c-table__sticky-cell--MinWidth': stickyMinWidth ? stickyMinWidth : undefined,
292
- '--pf-v5-c-table__sticky-cell--Left': stickyLeftOffset ? stickyLeftOffset : 0,
293
- '--pf-v5-c-table__sticky-cell--Right': stickyRightOffset ? stickyRightOffset : 0,
296
+ [cssStickyCellMinWidth.name]: stickyMinWidth ? stickyMinWidth : undefined,
297
+ [cssStickyCellInlineStart.name]: stickyLeftOffset ? stickyLeftOffset : 0,
298
+ [cssStickyCellInlineEnd.name]: stickyRightOffset ? stickyRightOffset : 0,
294
299
  ...props.style
295
300
  } as React.CSSProperties
296
301
  })}
@@ -6,9 +6,12 @@ import { info, sortable, sortableFavorites, selectable, collapsible, cellWidth,
6
6
  import { ThInfoType, ThSelectType, ThExpandType, ThSortType, formatterValueType } from './base/types';
7
7
  import { mergeProps } from './base/merge-props';
8
8
  import { IVisibility } from './utils/decorators/classNames';
9
- import { Tooltip } from '@patternfly/react-core/dist/esm/components/Tooltip/Tooltip';
9
+ import { Tooltip, TooltipProps } from '@patternfly/react-core/dist/esm/components/Tooltip';
10
10
  import { BaseCellProps } from './Table';
11
11
  import { IFormatterValueType, IColumn } from './TableTypes';
12
+ import cssStickyCellMinWidth from '@patternfly/react-tokens/dist/esm/c_table__sticky_cell_MinWidth';
13
+ import cssStickyCellInlineStart from '@patternfly/react-tokens/dist/esm/c_table__sticky_cell_InsetInlineStart';
14
+ import cssStickyCellInlineEnd from '@patternfly/react-tokens/dist/esm/c_table__sticky_cell_InsetInlineEnd';
12
15
 
13
16
  export interface ThProps
14
17
  extends BaseCellProps,
@@ -31,6 +34,8 @@ export interface ThProps
31
34
  * To disable it completely you can set it to null.
32
35
  */
33
36
  tooltip?: React.ReactNode;
37
+ /** other props to pass to the tooltip */
38
+ tooltipProps?: Omit<TooltipProps, 'content'>;
34
39
  /** Callback on mouse enter */
35
40
  onMouseEnter?: (event: any) => void;
36
41
  /** Adds tooltip/popover info button */
@@ -51,6 +56,14 @@ export interface ThProps
51
56
  stickyRightOffset?: string;
52
57
  /** Indicates the <th> is part of a subheader of a nested header */
53
58
  isSubheader?: boolean;
59
+ /** Visually hidden text accessible only via assistive technologies. This must be passed in if the
60
+ * th is intended to be visually empty, and must be conveyed as a column header text.
61
+ */
62
+ screenReaderText?: string;
63
+ /** Provides an accessible name to the th. This should only be passed in when the th contains only non-text
64
+ * content, such as a "select all" checkbox or "expand all" toggle.
65
+ */
66
+ 'aria-label'?: string;
54
67
  }
55
68
 
56
69
  const ThBase: React.FunctionComponent<ThProps> = ({
@@ -65,6 +78,7 @@ const ThBase: React.FunctionComponent<ThProps> = ({
65
78
  select = null,
66
79
  expand: collapse = null,
67
80
  tooltip = '',
81
+ tooltipProps,
68
82
  onMouseEnter: onMouseEnterProp = () => {},
69
83
  width,
70
84
  visibility,
@@ -77,8 +91,17 @@ const ThBase: React.FunctionComponent<ThProps> = ({
77
91
  stickyLeftOffset,
78
92
  stickyRightOffset,
79
93
  isSubheader = false,
94
+ screenReaderText,
95
+ 'aria-label': ariaLabel,
80
96
  ...props
81
97
  }: ThProps) => {
98
+ if (!children && !screenReaderText && !ariaLabel) {
99
+ // eslint-disable-next-line no-console
100
+ console.warn(
101
+ 'Th: Table headers must have an accessible name. If the Th is intended to be visually empty, pass in screenReaderText. If the Th contains only non-text, interactive content such as a checkbox or expand toggle, pass in an aria-label.'
102
+ );
103
+ }
104
+
82
105
  const [showTooltip, setShowTooltip] = React.useState(false);
83
106
  const [truncated, setTruncated] = React.useState(false);
84
107
  const cellRef = innerRef ? innerRef : React.createRef();
@@ -96,7 +119,9 @@ const ThBase: React.FunctionComponent<ThProps> = ({
96
119
  sortParams = sortableFavorites({
97
120
  onSort: sort?.onSort,
98
121
  columnIndex: sort.columnIndex,
99
- sortBy: sort.sortBy
122
+ sortBy: sort.sortBy,
123
+ tooltip: tooltip as string,
124
+ tooltipProps
100
125
  })();
101
126
  } else {
102
127
  sortParams = sortable(children as IFormatterValueType, {
@@ -106,7 +131,9 @@ const ThBase: React.FunctionComponent<ThProps> = ({
106
131
  sortBy: sort.sortBy,
107
132
  onSort: sort?.onSort
108
133
  }
109
- } as IColumn
134
+ } as IColumn,
135
+ tooltip: tooltip as string,
136
+ tooltipProps
110
137
  });
111
138
  }
112
139
  }
@@ -124,7 +151,9 @@ const ThBase: React.FunctionComponent<ThProps> = ({
124
151
  allRowsSelected: select.isSelected,
125
152
  isHeaderSelectDisabled: !!select.isHeaderSelectDisabled
126
153
  }
127
- }
154
+ },
155
+ tooltip: tooltip as string,
156
+ tooltipProps
128
157
  })
129
158
  : null;
130
159
  const collapseParams = collapse
@@ -176,8 +205,9 @@ const ThBase: React.FunctionComponent<ThProps> = ({
176
205
  onBlur={() => setShowTooltip(false)}
177
206
  data-label={dataLabel}
178
207
  onMouseEnter={tooltip !== null ? onMouseEnter : onMouseEnterProp}
179
- scope={component === 'th' && children ? scope : null}
208
+ scope={component === 'th' ? scope : null}
180
209
  ref={cellRef}
210
+ aria-label={ariaLabel}
181
211
  className={css(
182
212
  styles.tableTh,
183
213
  className,
@@ -193,25 +223,27 @@ const ThBase: React.FunctionComponent<ThProps> = ({
193
223
  {...props}
194
224
  {...(isStickyColumn && {
195
225
  style: {
196
- '--pf-v5-c-table__sticky-cell--MinWidth': stickyMinWidth ? stickyMinWidth : undefined,
197
- '--pf-v5-c-table__sticky-cell--Left': stickyLeftOffset ? stickyLeftOffset : 0,
198
- '--pf-v5-c-table__sticky-cell--Right': stickyRightOffset ? stickyRightOffset : 0,
226
+ [cssStickyCellMinWidth.name]: stickyMinWidth ? stickyMinWidth : undefined,
227
+ [cssStickyCellInlineStart.name]: stickyLeftOffset ? stickyLeftOffset : 0,
228
+ [cssStickyCellInlineEnd.name]: stickyRightOffset ? stickyRightOffset : 0,
199
229
  ...props.style
200
230
  } as React.CSSProperties
201
231
  })}
202
232
  >
203
- {transformedChildren}
233
+ {transformedChildren || (screenReaderText && <span className="pf-v5-screen-reader">{screenReaderText}</span>)}
204
234
  </MergedComponent>
205
235
  );
206
236
 
207
237
  const canMakeDefaultTooltip = tooltip === '' ? typeof transformedChildren === 'string' : true;
208
- return tooltip !== null && canMakeDefaultTooltip && showTooltip ? (
238
+ const childControlsTooltip = sortParams || selectParams;
239
+ return tooltip !== null && canMakeDefaultTooltip && !childControlsTooltip && showTooltip ? (
209
240
  <>
210
241
  {cell}
211
242
  <Tooltip
212
243
  triggerRef={cellRef as React.RefObject<any>}
213
244
  content={tooltip || (tooltip === '' && children)}
214
245
  isVisible
246
+ {...tooltipProps}
215
247
  />
216
248
  </>
217
249
  ) : (
@@ -5,7 +5,7 @@ import inlineStyles from '@patternfly/react-styles/css/components/InlineEdit/inl
5
5
  import { css } from '@patternfly/react-styles';
6
6
  import { TableContext } from './Table';
7
7
 
8
- export interface TrProps extends React.HTMLProps<HTMLTableRowElement>, OUIAProps {
8
+ export interface TrProps extends Omit<React.HTMLProps<HTMLTableRowElement>, 'onResize'>, OUIAProps {
9
9
  /** Content rendered inside the <tr> row */
10
10
  children?: React.ReactNode;
11
11
  /** Additional classes added to the <tr> row */
@@ -28,6 +28,8 @@ export interface TrProps extends React.HTMLProps<HTMLTableRowElement>, OUIAProps
28
28
  isStriped?: boolean;
29
29
  /** Flag indicating the row will act as a border. This is typically used for a table with a nested and sticky header. */
30
30
  isBorderRow?: boolean;
31
+ /** Flag indicating the row is controlling the expansion of another row. */
32
+ isControlRow?: boolean;
31
33
  /** An event handler for the row */
32
34
  onRowClick?: (event?: React.KeyboardEvent | React.MouseEvent) => void;
33
35
  /** Flag indicating that the row is selectable */
@@ -50,6 +52,7 @@ const TrBase: React.FunctionComponent<TrProps> = ({
50
52
  isRowSelected = false,
51
53
  isStriped = false,
52
54
  isBorderRow = false,
55
+ isControlRow = false,
53
56
  innerRef,
54
57
  ouiaId,
55
58
  ouiaSafe = true,
@@ -100,6 +103,7 @@ const TrBase: React.FunctionComponent<TrProps> = ({
100
103
  isRowSelected && styles.modifiers.selected,
101
104
  isStriped && styles.modifiers.striped,
102
105
  isBorderRow && styles.modifiers.borderRow,
106
+ isControlRow && styles.tableControlRow,
103
107
  resetOffset && styles.modifiers.firstCellOffsetReset
104
108
  )}
105
109
  hidden={rowIsHidden}
@@ -0,0 +1,31 @@
1
+ import * as React from 'react';
2
+ import { render, screen } from '@testing-library/react';
3
+ import { Th } from '../Th';
4
+
5
+ test('Does not render with aria-label by default', () => {
6
+ render(<Th />);
7
+ expect(screen.getByRole('columnheader')).not.toHaveAccessibleName();
8
+ });
9
+
10
+ test('Renders with aria-label when passed in', () => {
11
+ render(<Th aria-label="Test" />);
12
+ expect(screen.getByRole('columnheader')).toHaveAccessibleName('Test');
13
+ });
14
+
15
+ test('Does not render with screen reader text by default', () => {
16
+ render(<Th />);
17
+
18
+ expect(screen.getByRole('columnheader')).toBeEmptyDOMElement();
19
+ });
20
+
21
+ test('Does not render with screen reader text when children are passed in', () => {
22
+ render(<Th screenReaderText="Test">Heading label</Th>);
23
+
24
+ expect(screen.getByRole('columnheader')).not.toHaveTextContent('Test');
25
+ });
26
+
27
+ test('Renders with screen reader text when screenReaderText is passed in', () => {
28
+ render(<Th screenReaderText="Test" />);
29
+
30
+ expect(screen.getByRole('columnheader')).toHaveTextContent('Test');
31
+ });
@@ -5,9 +5,9 @@ exports[`RowWrapper renders correctly 1`] = `
5
5
  <table>
6
6
  <tbody>
7
7
  <tr
8
- class="pf-v5-c-table__tr"
8
+ class="pf-v6-c-table__tr"
9
9
  data-ouia-component-id="OUIA-Generated-TableRow-1"
10
- data-ouia-component-type="PF5/TableRow"
10
+ data-ouia-component-type="PF6/TableRow"
11
11
  data-ouia-safe="true"
12
12
  />
13
13
  </tbody>
@@ -20,9 +20,9 @@ exports[`RowWrapper renders expanded correctly 1`] = `
20
20
  <table>
21
21
  <tbody>
22
22
  <tr
23
- class="pf-v5-c-table__tr pf-v5-c-table__expandable-row pf-m-expanded"
23
+ class="pf-v6-c-table__tr pf-v6-c-table__expandable-row pf-m-expanded"
24
24
  data-ouia-component-id="OUIA-Generated-TableRow-2"
25
- data-ouia-component-type="PF5/TableRow"
25
+ data-ouia-component-type="PF6/TableRow"
26
26
  data-ouia-safe="true"
27
27
  />
28
28
  </tbody>
@@ -8,8 +8,7 @@
8
8
  import * as React from 'react';
9
9
  import { TooltipProps } from '@patternfly/react-core/dist/esm/components/Tooltip';
10
10
  import { PopoverProps } from '@patternfly/react-core/dist/esm/components/Popover';
11
- import { DropdownPosition, DropdownDirection } from '@patternfly/react-core/dist/esm/deprecated/components/Dropdown';
12
- import { SelectOptionObject, SelectProps } from '@patternfly/react-core/dist/esm/deprecated/components/Select';
11
+ import { SelectProps } from '@patternfly/react-core/dist/esm/components/Select';
13
12
  import { Table } from '../Table';
14
13
  import { Thead } from '../Thead';
15
14
  import { Tbody } from '../Tbody';
@@ -61,9 +60,9 @@ export interface TdActionsType {
61
60
  /** Whether the actions are disabled */
62
61
  isDisabled?: boolean;
63
62
  /** Actions dropdown position */
64
- dropdownPosition?: DropdownPosition;
63
+ dropdownPosition?: 'right' | 'left';
65
64
  /** Actions dropdown direction */
66
- dropdownDirection?: DropdownDirection;
65
+ dropdownDirection?: 'up' | 'down';
67
66
  /** The container to append the dropdown menu to. Defaults to 'inline'.
68
67
  * If your menu is being cut off you can append it to an element higher up the DOM tree.
69
68
  * Some examples:
@@ -286,11 +285,11 @@ export interface EditableSelectInputProps {
286
285
  value: string | string[];
287
286
  /** Flag controlling isOpen state of select */
288
287
  isSelectOpen: boolean;
289
- /** String or SelectOptionObject, or array of strings or SelectOptionObjects representing current selections */
290
- selected: string | SelectOptionObject | (string | SelectOptionObject)[];
288
+ /** Single select option value for single select menus, or array of select option values for multi select. You can also specify isSelected on the SelectOption */
289
+ selected: any | any[];
291
290
  /** Array of react elements to display in the select menu */
292
291
  options: React.ReactElement[];
293
- /** Props to be passed down to the Select component */
292
+ /** Props to be passed down to the select component */
294
293
  editableSelectProps?: SelectProps;
295
294
  /** arbitrary data to pass to the internal select component in the editable select input cell */
296
295
  [key: string]: any;
@@ -51,9 +51,16 @@ import FolderOpenIcon from '@patternfly/react-icons/dist/esm/icons/folder-open-i
51
51
  import SortAmountDownIcon from '@patternfly/react-icons/dist/esm/icons/sort-amount-down-icon';
52
52
  import BlueprintIcon from '@patternfly/react-icons/dist/esm/icons/blueprint-icon';
53
53
  import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon';
54
+ import PencilAltIcon from '@patternfly/react-icons/dist/esm/icons/pencil-alt-icon';
55
+ import CheckIcon from '@patternfly/react-icons/dist/esm/icons/check-icon';
56
+ import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';
54
57
 
55
58
  import { css } from '@patternfly/react-styles';
56
59
  import styles from '@patternfly/react-styles/css/components/Table/table';
60
+ import spacing from '@patternfly/react-styles/css/utilities/Spacing/spacing';
61
+ import textStyles from '@patternfly/react-styles/css/utilities/Text/text';
62
+ import inlineEditStyles from '@patternfly/react-styles/css/components/InlineEdit/inline-edit';
63
+ import global_background_color_secondary_default from '@patternfly/react-tokens/dist/esm/global_background_color_secondary_default';
57
64
 
58
65
  ## Table examples
59
66
 
@@ -68,6 +75,7 @@ Some general notes:
68
75
  ### Basic
69
76
 
70
77
  ```ts file="TableBasic.tsx"
78
+
71
79
  ```
72
80
 
73
81
  ### Custom row wrapper, header tooltips & popovers
@@ -79,6 +87,7 @@ Some general notes:
79
87
  To add a header tooltip or popover to `Th`, pass a `ThInfoType` object via the `info` prop.
80
88
 
81
89
  ```ts file="TableMisc.tsx"
90
+
82
91
  ```
83
92
 
84
93
  ### Sortable & wrapping headers
@@ -100,6 +109,7 @@ type OnSort = (
100
109
  The built in display for sorting is not fully responsive, as the column headers will be displayed per row when the screen size is small. To see a full page demo of a responsive sortable table, utilizing a toolbar item to control sorting for small screens, view the `Sortable - responsive` demo in the `React demos` tab.
101
110
 
102
111
  ```ts file="TableSortable.tsx"
112
+
103
113
  ```
104
114
 
105
115
  ### Sortable - custom control
@@ -107,6 +117,7 @@ The built in display for sorting is not fully responsive, as the column headers
107
117
  Sorting a table may also be controlled manually with a toolbar control. To see a full page demo of a responsive table, view the `Sortable - responsive` demo in the `React demos` tab.
108
118
 
109
119
  ```ts file="TableSortableCustom.tsx"
120
+
110
121
  ```
111
122
 
112
123
  ### Selectable with checkbox
@@ -137,6 +148,7 @@ type OnSelect = (
137
148
  checking checkboxes will check intermediate rows' checkboxes.
138
149
 
139
150
  ```ts file="TableSelectable.tsx"
151
+
140
152
  ```
141
153
 
142
154
  ### Selectable radio input
@@ -144,6 +156,7 @@ checking checkboxes will check intermediate rows' checkboxes.
144
156
  Similarly to the selectable example above, the radio buttons use the first column. The first header cell is empty, and each body row's first cell has radio button props.
145
157
 
146
158
  ```ts file="TableSelectableRadio.tsx"
159
+
147
160
  ```
148
161
 
149
162
  ### Row click handler, clickable rows
@@ -151,6 +164,14 @@ Similarly to the selectable example above, the radio buttons use the first colum
151
164
  This selectable rows feature is intended for use when a table is used to present a list of objects in a Primary-detail view.
152
165
 
153
166
  ```ts file="TableClickable.tsx"
167
+
168
+ ```
169
+
170
+ ### Editable rows
171
+
172
+ This example shows a table with editable rows. Cells in a row can be edited after clicking on the edit icon.
173
+
174
+ ```ts file="TableEditable.tsx"
154
175
  ```
155
176
 
156
177
  ### Actions
@@ -162,6 +183,7 @@ To make a cell an action cell, render an `ActionsColumn` component inside a row'
162
183
  If actions menus are getting clipped by other items on the page, such as sticky columns or rows, the `ActionsColumn` can be passed a `menuAppendTo` prop to adjust where the actions menu is appended.
163
184
 
164
185
  ```ts file="TableActions.tsx"
186
+
165
187
  ```
166
188
 
167
189
  ### Actions Overflow
@@ -169,6 +191,7 @@ If actions menus are getting clipped by other items on the page, such as sticky
169
191
  Useing an `OverflowMenu` in the actions column, allowing the actions to condense into a dropdown if necessary for space.
170
192
 
171
193
  ```ts file="TableActionsOverflow.tsx"
194
+
172
195
  ```
173
196
 
174
197
  ### Expandable
@@ -194,6 +217,7 @@ type OnCollapse = (
194
217
  Note: Table column widths will respond automatically when toggling expanded rows. To retain column widths between expanded and collapsed states, column header and/or data cell widths must be set.
195
218
 
196
219
  ```ts file="TableExpandable.tsx"
220
+
197
221
  ```
198
222
 
199
223
  ### Compound expandable
@@ -218,16 +242,19 @@ export type OnExpand = (
218
242
  ```
219
243
 
220
244
  ```ts file="TableCompoundExpandable.tsx"
245
+
221
246
  ```
222
247
 
223
248
  ### Cell width, breakpoint modifiers
224
249
 
225
250
  ```ts file="TableCellWidth.tsx"
251
+
226
252
  ```
227
253
 
228
254
  ### Controlling text
229
255
 
230
256
  ```ts file="TableControllingText.tsx"
257
+
231
258
  ```
232
259
 
233
260
  ### Modifiers with table text
@@ -235,11 +262,13 @@ export type OnExpand = (
235
262
  If the "wrapModifier" property is set to "truncate", it's needed to ensure that the corresponding tooltip can be opened using both keyboard and screen reader. Since this particular Td element is generic and doesn't have any predefined decorators, the focus management required to trigger the tooltip needs to be handled manually by defining and manipulating the requisite props.
236
263
 
237
264
  ```ts file="TableTextModifiers.tsx"
265
+
238
266
  ```
239
267
 
240
268
  ### Empty state
241
269
 
242
270
  ```ts file="TableEmptyState.tsx"
271
+
243
272
  ```
244
273
 
245
274
  ### Favoritable (implemented with sortable)
@@ -262,6 +291,7 @@ type OnFavorite = (
262
291
  To make a favoritable column sortable, pass a `ThSortType` object to the favoritable column's `Th` with `isFavorites` set to true.
263
292
 
264
293
  ```ts file="TableFavoritable.tsx"
294
+
265
295
  ```
266
296
 
267
297
  ### Tree table
@@ -295,6 +325,7 @@ aria-posinset, and aria-setsize as violations. This is an intentional choice at
295
325
  the voice over technologies will recognize the flat table structure as a tree.
296
326
 
297
327
  ```ts file="TableTree.tsx"
328
+
298
329
  ```
299
330
 
300
331
  ### Flat tree table with no inset
@@ -302,6 +333,7 @@ the voice over technologies will recognize the flat table structure as a tree.
302
333
  To remove the inset used to leave space for the expand/collapse toggle in a flat tree table, use the `hasNoInset` prop on the `Table` component.
303
334
 
304
335
  ```ts file="TableTreeNoInset.tsx"
336
+
305
337
  ```
306
338
 
307
339
  ### Draggable row table
@@ -315,6 +347,7 @@ To make a row draggable:
315
347
  5. The draggable `Td` in each row needs a `TdDraggableType` object passed to its `draggable` prop.
316
348
 
317
349
  ```ts isBeta file="TableDraggable.tsx"
350
+
318
351
  ```
319
352
 
320
353
  ### Sticky table modifiers
@@ -331,7 +364,7 @@ There are a few ways this can be handled:
331
364
 
332
365
  ### Sticky column
333
366
 
334
- To make a column sticky, wrap `Table` with `InnerScrollContainer` and add the following properties to the `Th` or `Td` that should be sticky:
367
+ To make a column sticky, wrap `Table` with `InnerScrollContainer` and add the following properties to the `Th` or `Td` that should be sticky:
335
368
 
336
369
  - `isStickyColumn`
337
370
  - `hasRightBorder` for a left-aligned sticky column, or `hasLeftBorder` for a right-aligned sticky column.
@@ -339,6 +372,7 @@ To make a column sticky, wrap `Table` with `InnerScrollContainer` and add the fo
339
372
  To prevent the default text wrapping behavior and allow horizontal scrolling, all `Th` or `Td` cells should also have the `modifier="nowrap"` property. To set the minimum width of the sticky column, use the `stickyMinWidth` property. For multiple sticky columns, use the `stickyLeftOffset` and `stickyRightOffset` properties for additional left or right sticky columns.
340
373
 
341
374
  ```ts file="TableStickyColumn.tsx"
375
+
342
376
  ```
343
377
 
344
378
  ### Multiple left-aligned sticky columns
@@ -348,11 +382,12 @@ To make multiple left-aligned columns sticky:
348
382
  - wrap `Table` with `InnerScrollContainer`
349
383
  - add `isStickyColumn` to all columns that should be sticky
350
384
  - add `hasRightBorder` to the rightmost sticky column
351
- - add `stickyLeftOffset` to each sticky column with a value that equals the combined width - set by `stickyMindWidth` - of the previous sticky columns. The leftmost sticky column should have a value of `0`, which is the default of this property.
385
+ - add `stickyLeftOffset` to each sticky column with a value that equals the combined width - set by `stickyMindWidth` - of the previous sticky columns. The leftmost sticky column should have a value of `0`, which is the default of this property.
352
386
 
353
387
  To prevent the default text wrapping behavior and allow horizontal scrolling, all `Th` or `Td` cells should also have the `modifier="nowrap"` property.
354
388
 
355
389
  ```ts file="TableMultipleStickyColumns.tsx"
390
+
356
391
  ```
357
392
 
358
393
  ### Multiple right-aligned sticky columns
@@ -362,11 +397,12 @@ To make multiple right-aligned columns sticky:
362
397
  - wrap `Table` with `InnerScrollContainer`
363
398
  - add `isStickyColumn` to all columns that should be sticky
364
399
  - add `hasLeftBorder` to the leftmost sticky column
365
- - add `stickyRightOffset` to each sticky column with a value that equals the combined width - set by `stickyMindWidth` - of the next sticky columns. The rightmost sticky column should have a value of `0`, which is the default of this property.
400
+ - add `stickyRightOffset` to each sticky column with a value that equals the combined width - set by `stickyMindWidth` - of the next sticky columns. The rightmost sticky column should have a value of `0`, which is the default of this property.
366
401
 
367
402
  To prevent the default text wrapping behavior and allow horizontal scrolling, all `Th` or `Td` cells should also have the `modifier="nowrap"` property.
368
403
 
369
404
  ```ts file="TableRightStickyColumn.tsx"
405
+
370
406
  ```
371
407
 
372
408
  ### Sticky columns and header
@@ -374,6 +410,7 @@ To prevent the default text wrapping behavior and allow horizontal scrolling, al
374
410
  To maintain proper sticky behavior across sticky columns and header, `Table` must be wrapped with `OuterScrollContainer` and `InnerScrollContainer`.
375
411
 
376
412
  ```ts file="TableStickyColumnsAndHeader.tsx"
413
+
377
414
  ```
378
415
 
379
416
  ### Nested column headers
@@ -390,21 +427,25 @@ The first `Tr` represents the top level of columns, and each must pass either `r
390
427
  The second `Tr` represents the second level of sub columns. The `Th` in this row each should pass `isSubHeader`, and the last sub column of a column should also pass `hasRightBorder`.
391
428
 
392
429
  ```ts file="TableNestedHeaders.tsx"
430
+
393
431
  ```
394
432
 
395
433
  ### Nested column headers and expandable rows
396
434
 
397
435
  ```ts file="TableNestedExpandable.tsx"
436
+
398
437
  ```
399
438
 
400
439
  ### Expandable with nested table
401
440
 
402
441
  ```ts file="TableNestedTableExpandable.tsx"
442
+
403
443
  ```
404
444
 
405
445
  ### Nested sticky header
406
446
 
407
447
  ```ts file="TableNestedStickyHeader.tsx"
448
+
408
449
  ```
409
450
 
410
451
  ### Striped
@@ -412,6 +453,7 @@ The second `Tr` represents the second level of sub columns. The `Th` in this row
412
453
  To apply striping to a basic table, add the `isStriped` property to `Table`.
413
454
 
414
455
  ```ts file="TableStriped.tsx"
456
+
415
457
  ```
416
458
 
417
459
  ### Striped expandable
@@ -419,6 +461,7 @@ To apply striping to a basic table, add the `isStriped` property to `Table`.
419
461
  To apply striping to an expandable table, add the `isStriped` and `isExpandable` properties to `Table`.
420
462
 
421
463
  ```ts file="TableStripedExpandable.tsx"
464
+
422
465
  ```
423
466
 
424
467
  ### Striped multiple tobdy
@@ -426,6 +469,7 @@ To apply striping to an expandable table, add the `isStriped` and `isExpandable`
426
469
  When there are multiple `Tbody` components within a table, a more granular application of striping may be controlled by adding either the `isEvenStriped` or `isOddStriped` properties to `Tbody`. These properties will stripe even or odd rows within that `Tbody` respectively.
427
470
 
428
471
  ```ts file="TableStripedMultipleTbody.tsx"
472
+
429
473
  ```
430
474
 
431
475
  ### Striped tr
@@ -433,4 +477,5 @@ When there are multiple `Tbody` components within a table, a more granular appli
433
477
  To manually control striping, add the `isStriped` property to each desired `Tr`. This replaces adding the `isStriped` property to `Table`.
434
478
 
435
479
  ```ts file="TableStripedTr.tsx"
480
+
436
481
  ```
@@ -116,8 +116,8 @@ export const TableActions: React.FunctionComponent = () => {
116
116
  <Th>{columnNames.prs}</Th>
117
117
  <Th>{columnNames.workspaces}</Th>
118
118
  <Th>{columnNames.lastCommit}</Th>
119
- <Td></Td>
120
- <Td></Td>
119
+ <Th screenReaderText="Primary action" />
120
+ <Th screenReaderText="Secondary action" />
121
121
  </Tr>
122
122
  </Thead>
123
123
  <Tbody>
@@ -1,4 +1,3 @@
1
- /* eslint-disable no-console */
2
1
  import React from 'react';
3
2
  import {
4
3
  Button,
@@ -66,7 +65,7 @@ export const TableActions: React.FunctionComponent = () => {
66
65
  <Th>{columnNames.prs}</Th>
67
66
  <Th>{columnNames.workspaces}</Th>
68
67
  <Th>{columnNames.lastCommit}</Th>
69
- <Td></Td>
68
+ <Th screenReaderText="Actions" />
70
69
  </Tr>
71
70
  </Thead>
72
71
  <Tbody>
@@ -106,9 +105,8 @@ export const TableActions: React.FunctionComponent = () => {
106
105
  setRepos(repos.map((r) => (r.name !== repo.name ? r : { ...r, isMenuOpen: !r.isMenuOpen })))
107
106
  }
108
107
  isExpanded={repo.isMenuOpen}
109
- >
110
- <EllipsisVIcon />
111
- </MenuToggle>
108
+ icon={<EllipsisVIcon />}
109
+ />
112
110
  )}
113
111
  isOpen={repo.isMenuOpen}
114
112
  onOpenChange={(isOpen) =>
@@ -4,6 +4,7 @@ import { Table, Thead, Tr, Th, Tbody, Td, TdProps, ExpandableRowContent } from '
4
4
  import CodeBranchIcon from '@patternfly/react-icons/dist/esm/icons/code-branch-icon';
5
5
  import CodeIcon from '@patternfly/react-icons/dist/esm/icons/code-icon';
6
6
  import CubeIcon from '@patternfly/react-icons/dist/esm/icons/cube-icon';
7
+ import spacing from '@patternfly/react-styles/css/utilities/Spacing/spacing';
7
8
 
8
9
  interface Repository {
9
10
  name: string;
@@ -66,7 +67,7 @@ export const TableCompoundExpandable: React.FunctionComponent = () => {
66
67
  <Th>{columnNames.prs}</Th>
67
68
  <Th>{columnNames.workspaces}</Th>
68
69
  <Th>{columnNames.lastCommit}</Th>
69
- <Th />
70
+ <Th screenReaderText="URL" />
70
71
  </Tr>
71
72
  </Thead>
72
73
  {repositories.map((repo: Repository, rowIndex: number) => {
@@ -74,7 +75,7 @@ export const TableCompoundExpandable: React.FunctionComponent = () => {
74
75
  const isRowExpanded = !!expandedCellKey;
75
76
  return (
76
77
  <Tbody key={repo.name} isExpanded={isRowExpanded}>
77
- <Tr>
78
+ <Tr isControlRow>
78
79
  <Td width={25} dataLabel={columnNames.name} component="th">
79
80
  <a href="#">{repo.name}</a>
80
81
  </Td>
@@ -108,9 +109,9 @@ export const TableCompoundExpandable: React.FunctionComponent = () => {
108
109
  </Tr>
109
110
  {isRowExpanded ? (
110
111
  <Tr isExpanded={isRowExpanded}>
111
- <Td dataLabel={columnNames[expandedCellKey]} noPadding colSpan={6}>
112
+ <Td dataLabel={columnNames[expandedCellKey]} colSpan={6}>
112
113
  <ExpandableRowContent>
113
- <div className="pf-v5-u-m-md">
114
+ <div className={spacing.mMd}>
114
115
  Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem
115
116
  ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum
116
117
  sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit dolor. Lorem ipsum sit