@fluentui/react-table 9.0.0-alpha.15 → 9.0.0-alpha.17

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 (403) hide show
  1. package/CHANGELOG.json +173 -1
  2. package/CHANGELOG.md +39 -2
  3. package/dist/index.d.ts +30 -22
  4. package/lib/components/DataGrid/DataGrid.js +1 -2
  5. package/lib/components/DataGrid/DataGrid.js.map +1 -1
  6. package/lib/components/DataGrid/renderDataGrid.js +0 -1
  7. package/lib/components/DataGrid/renderDataGrid.js.map +1 -1
  8. package/lib/components/DataGrid/useDataGrid.js +2 -2
  9. package/lib/components/DataGrid/useDataGrid.js.map +1 -1
  10. package/lib/components/DataGrid/useDataGridContextValues.js +4 -2
  11. package/lib/components/DataGrid/useDataGridContextValues.js.map +1 -1
  12. package/lib/components/DataGrid/useDataGridStyles.js +0 -1
  13. package/lib/components/DataGrid/useDataGridStyles.js.map +1 -1
  14. package/lib/components/DataGridBody/DataGridBody.js +1 -2
  15. package/lib/components/DataGridBody/DataGridBody.js.map +1 -1
  16. package/lib/components/DataGridBody/DataGridBody.types.js.map +1 -1
  17. package/lib/components/DataGridBody/renderDataGridBody.js +13 -3
  18. package/lib/components/DataGridBody/renderDataGridBody.js.map +1 -1
  19. package/lib/components/DataGridBody/useDataGridBody.js +8 -12
  20. package/lib/components/DataGridBody/useDataGridBody.js.map +1 -1
  21. package/lib/components/DataGridBody/useDataGridBodyStyles.js +0 -1
  22. package/lib/components/DataGridBody/useDataGridBodyStyles.js.map +1 -1
  23. package/lib/components/DataGridCell/DataGridCell.js +1 -2
  24. package/lib/components/DataGridCell/DataGridCell.js.map +1 -1
  25. package/lib/components/DataGridCell/renderDataGridCell.js +0 -1
  26. package/lib/components/DataGridCell/renderDataGridCell.js.map +1 -1
  27. package/lib/components/DataGridCell/useDataGridCell.js +0 -1
  28. package/lib/components/DataGridCell/useDataGridCell.js.map +1 -1
  29. package/lib/components/DataGridCell/useDataGridCellStyles.js +0 -1
  30. package/lib/components/DataGridCell/useDataGridCellStyles.js.map +1 -1
  31. package/lib/components/DataGridHeader/DataGridHeader.js +1 -2
  32. package/lib/components/DataGridHeader/DataGridHeader.js.map +1 -1
  33. package/lib/components/DataGridHeader/renderDataGridHeader.js +0 -1
  34. package/lib/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
  35. package/lib/components/DataGridHeader/useDataGridHeader.js +2 -2
  36. package/lib/components/DataGridHeader/useDataGridHeader.js.map +1 -1
  37. package/lib/components/DataGridHeader/useDataGridHeaderStyles.js +0 -1
  38. package/lib/components/DataGridHeader/useDataGridHeaderStyles.js.map +1 -1
  39. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js +1 -2
  40. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
  41. package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js +0 -1
  42. package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
  43. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js +0 -3
  44. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
  45. package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +0 -4
  46. package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -1
  47. package/lib/components/DataGridRow/DataGridRow.js +1 -2
  48. package/lib/components/DataGridRow/DataGridRow.js.map +1 -1
  49. package/lib/components/DataGridRow/DataGridRow.types.js.map +1 -1
  50. package/lib/components/DataGridRow/renderDataGridRow.js +9 -4
  51. package/lib/components/DataGridRow/renderDataGridRow.js.map +1 -1
  52. package/lib/components/DataGridRow/useDataGridRow.js +8 -19
  53. package/lib/components/DataGridRow/useDataGridRow.js.map +1 -1
  54. package/lib/components/DataGridRow/useDataGridRowStyles.js +0 -3
  55. package/lib/components/DataGridRow/useDataGridRowStyles.js.map +1 -1
  56. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js +1 -2
  57. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
  58. package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js +0 -1
  59. package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
  60. package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js +0 -8
  61. package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
  62. package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js +0 -4
  63. package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js.map +1 -1
  64. package/lib/components/Table/Table.js +1 -2
  65. package/lib/components/Table/Table.js.map +1 -1
  66. package/lib/components/Table/Table.types.js.map +1 -1
  67. package/lib/components/Table/renderTable.js +2 -2
  68. package/lib/components/Table/renderTable.js.map +1 -1
  69. package/lib/components/Table/useTable.js +0 -2
  70. package/lib/components/Table/useTable.js.map +1 -1
  71. package/lib/components/Table/useTableContextValues.js.map +1 -1
  72. package/lib/components/Table/useTableStyles.js +13 -19
  73. package/lib/components/Table/useTableStyles.js.map +1 -1
  74. package/lib/components/TableBody/TableBody.js +1 -2
  75. package/lib/components/TableBody/TableBody.js.map +1 -1
  76. package/lib/components/TableBody/renderTableBody.js +3 -4
  77. package/lib/components/TableBody/renderTableBody.js.map +1 -1
  78. package/lib/components/TableBody/useTableBody.js +0 -2
  79. package/lib/components/TableBody/useTableBody.js.map +1 -1
  80. package/lib/components/TableBody/useTableBodyStyles.js +6 -10
  81. package/lib/components/TableBody/useTableBodyStyles.js.map +1 -1
  82. package/lib/components/TableCell/TableCell.js +1 -2
  83. package/lib/components/TableCell/TableCell.js.map +1 -1
  84. package/lib/components/TableCell/renderTableCell.js +2 -2
  85. package/lib/components/TableCell/renderTableCell.js.map +1 -1
  86. package/lib/components/TableCell/useTableCell.js +0 -2
  87. package/lib/components/TableCell/useTableCell.js.map +1 -1
  88. package/lib/components/TableCell/useTableCellStyles.js +36 -42
  89. package/lib/components/TableCell/useTableCellStyles.js.map +1 -1
  90. package/lib/components/TableCellActions/TableCellActions.js +1 -2
  91. package/lib/components/TableCellActions/TableCellActions.js.map +1 -1
  92. package/lib/components/TableCellActions/renderTableCellActions.js +3 -4
  93. package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -1
  94. package/lib/components/TableCellActions/useTableCellActions.js +0 -2
  95. package/lib/components/TableCellActions/useTableCellActions.js.map +1 -1
  96. package/lib/components/TableCellActions/useTableCellActionsStyles.js +10 -13
  97. package/lib/components/TableCellActions/useTableCellActionsStyles.js.map +1 -1
  98. package/lib/components/TableCellLayout/TableCellLayout.js +1 -2
  99. package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -1
  100. package/lib/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
  101. package/lib/components/TableCellLayout/renderTableCellLayout.js +10 -6
  102. package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  103. package/lib/components/TableCellLayout/useTableCellLayout.js +2 -3
  104. package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  105. package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
  106. package/lib/components/TableCellLayout/useTableCellLayoutStyles.js +32 -40
  107. package/lib/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
  108. package/lib/components/TableHeader/TableHeader.js +1 -2
  109. package/lib/components/TableHeader/TableHeader.js.map +1 -1
  110. package/lib/components/TableHeader/renderTableHeader.js +2 -2
  111. package/lib/components/TableHeader/renderTableHeader.js.map +1 -1
  112. package/lib/components/TableHeader/useTableHeader.js +0 -2
  113. package/lib/components/TableHeader/useTableHeader.js.map +1 -1
  114. package/lib/components/TableHeader/useTableHeaderStyles.js +6 -16
  115. package/lib/components/TableHeader/useTableHeaderStyles.js.map +1 -1
  116. package/lib/components/TableHeaderCell/TableHeaderCell.js +1 -2
  117. package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  118. package/lib/components/TableHeaderCell/renderTableHeaderCell.js +6 -4
  119. package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  120. package/lib/components/TableHeaderCell/useTableHeaderCell.js +0 -2
  121. package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  122. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js +68 -76
  123. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
  124. package/lib/components/TableRow/TableRow.js +1 -2
  125. package/lib/components/TableRow/TableRow.js.map +1 -1
  126. package/lib/components/TableRow/TableRow.types.js.map +1 -1
  127. package/lib/components/TableRow/renderTableRow.js +3 -4
  128. package/lib/components/TableRow/renderTableRow.js.map +1 -1
  129. package/lib/components/TableRow/useTableRow.js +5 -4
  130. package/lib/components/TableRow/useTableRow.js.map +1 -1
  131. package/lib/components/TableRow/useTableRowStyles.js +137 -145
  132. package/lib/components/TableRow/useTableRowStyles.js.map +1 -1
  133. package/lib/components/TableSelectionCell/TableSelectionCell.js +1 -2
  134. package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  135. package/lib/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
  136. package/lib/components/TableSelectionCell/renderTableSelectionCell.js +6 -4
  137. package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  138. package/lib/components/TableSelectionCell/useTableSelectionCell.js +4 -3
  139. package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  140. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js +42 -51
  141. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
  142. package/lib/contexts/columnIdContext.js +0 -1
  143. package/lib/contexts/columnIdContext.js.map +1 -1
  144. package/lib/contexts/dataGridContext.js +2 -1
  145. package/lib/contexts/dataGridContext.js.map +1 -1
  146. package/lib/contexts/rowIdContext.js +0 -1
  147. package/lib/contexts/rowIdContext.js.map +1 -1
  148. package/lib/contexts/tableContext.js +0 -1
  149. package/lib/contexts/tableContext.js.map +1 -1
  150. package/lib/contexts/tableHeaderContext.js.map +1 -1
  151. package/lib/hooks/createColumn.js +0 -6
  152. package/lib/hooks/createColumn.js.map +1 -1
  153. package/lib/hooks/selectionManager.js +0 -16
  154. package/lib/hooks/selectionManager.js.map +1 -1
  155. package/lib/hooks/useTableFeatures.js +0 -5
  156. package/lib/hooks/useTableFeatures.js.map +1 -1
  157. package/lib/hooks/useTableSelection.js +2 -6
  158. package/lib/hooks/useTableSelection.js.map +1 -1
  159. package/lib/hooks/useTableSort.js +4 -13
  160. package/lib/hooks/useTableSort.js.map +1 -1
  161. package/lib/index.js.map +1 -1
  162. package/lib-commonjs/DataGrid.js +0 -2
  163. package/lib-commonjs/DataGrid.js.map +1 -1
  164. package/lib-commonjs/DataGridBody.js +0 -2
  165. package/lib-commonjs/DataGridBody.js.map +1 -1
  166. package/lib-commonjs/DataGridCell.js +0 -2
  167. package/lib-commonjs/DataGridCell.js.map +1 -1
  168. package/lib-commonjs/DataGridHeader.js +0 -2
  169. package/lib-commonjs/DataGridHeader.js.map +1 -1
  170. package/lib-commonjs/DataGridHeaderCell.js +0 -2
  171. package/lib-commonjs/DataGridHeaderCell.js.map +1 -1
  172. package/lib-commonjs/DataGridRow.js +0 -2
  173. package/lib-commonjs/DataGridRow.js.map +1 -1
  174. package/lib-commonjs/DataGridSelectionCell.js +0 -2
  175. package/lib-commonjs/DataGridSelectionCell.js.map +1 -1
  176. package/lib-commonjs/Table.js +0 -2
  177. package/lib-commonjs/Table.js.map +1 -1
  178. package/lib-commonjs/TableBody.js +0 -2
  179. package/lib-commonjs/TableBody.js.map +1 -1
  180. package/lib-commonjs/TableCell.js +0 -2
  181. package/lib-commonjs/TableCell.js.map +1 -1
  182. package/lib-commonjs/TableCellActions.js +0 -2
  183. package/lib-commonjs/TableCellActions.js.map +1 -1
  184. package/lib-commonjs/TableCellLayout.js +0 -2
  185. package/lib-commonjs/TableCellLayout.js.map +1 -1
  186. package/lib-commonjs/TableCellPrimaryLayout.js +0 -2
  187. package/lib-commonjs/TableCellPrimaryLayout.js.map +1 -1
  188. package/lib-commonjs/TableHeader.js +0 -2
  189. package/lib-commonjs/TableHeader.js.map +1 -1
  190. package/lib-commonjs/TableHeaderCell.js +0 -2
  191. package/lib-commonjs/TableHeaderCell.js.map +1 -1
  192. package/lib-commonjs/TableRow.js +0 -2
  193. package/lib-commonjs/TableRow.js.map +1 -1
  194. package/lib-commonjs/TableSelectionCell.js +0 -2
  195. package/lib-commonjs/TableSelectionCell.js.map +1 -1
  196. package/lib-commonjs/components/DataGrid/DataGrid.js +1 -8
  197. package/lib-commonjs/components/DataGrid/DataGrid.js.map +1 -1
  198. package/lib-commonjs/components/DataGrid/DataGrid.types.js.map +1 -1
  199. package/lib-commonjs/components/DataGrid/index.js +0 -6
  200. package/lib-commonjs/components/DataGrid/index.js.map +1 -1
  201. package/lib-commonjs/components/DataGrid/renderDataGrid.js +0 -6
  202. package/lib-commonjs/components/DataGrid/renderDataGrid.js.map +1 -1
  203. package/lib-commonjs/components/DataGrid/useDataGrid.js +2 -7
  204. package/lib-commonjs/components/DataGrid/useDataGrid.js.map +1 -1
  205. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js +4 -5
  206. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js.map +1 -1
  207. package/lib-commonjs/components/DataGrid/useDataGridStyles.js +0 -5
  208. package/lib-commonjs/components/DataGrid/useDataGridStyles.js.map +1 -1
  209. package/lib-commonjs/components/DataGridBody/DataGridBody.js +1 -7
  210. package/lib-commonjs/components/DataGridBody/DataGridBody.js.map +1 -1
  211. package/lib-commonjs/components/DataGridBody/DataGridBody.types.js.map +1 -1
  212. package/lib-commonjs/components/DataGridBody/index.js +0 -6
  213. package/lib-commonjs/components/DataGridBody/index.js.map +1 -1
  214. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js +13 -6
  215. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js.map +1 -1
  216. package/lib-commonjs/components/DataGridBody/useDataGridBody.js +8 -19
  217. package/lib-commonjs/components/DataGridBody/useDataGridBody.js.map +1 -1
  218. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.js +0 -5
  219. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.js.map +1 -1
  220. package/lib-commonjs/components/DataGridCell/DataGridCell.js +1 -7
  221. package/lib-commonjs/components/DataGridCell/DataGridCell.js.map +1 -1
  222. package/lib-commonjs/components/DataGridCell/DataGridCell.types.js.map +1 -1
  223. package/lib-commonjs/components/DataGridCell/index.js +0 -6
  224. package/lib-commonjs/components/DataGridCell/index.js.map +1 -1
  225. package/lib-commonjs/components/DataGridCell/renderDataGridCell.js +0 -4
  226. package/lib-commonjs/components/DataGridCell/renderDataGridCell.js.map +1 -1
  227. package/lib-commonjs/components/DataGridCell/useDataGridCell.js +0 -5
  228. package/lib-commonjs/components/DataGridCell/useDataGridCell.js.map +1 -1
  229. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.js +0 -5
  230. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.js.map +1 -1
  231. package/lib-commonjs/components/DataGridHeader/DataGridHeader.js +1 -7
  232. package/lib-commonjs/components/DataGridHeader/DataGridHeader.js.map +1 -1
  233. package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js.map +1 -1
  234. package/lib-commonjs/components/DataGridHeader/index.js +0 -6
  235. package/lib-commonjs/components/DataGridHeader/index.js.map +1 -1
  236. package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js +0 -4
  237. package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
  238. package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js +2 -5
  239. package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js.map +1 -1
  240. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.js +0 -5
  241. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.js.map +1 -1
  242. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js +1 -7
  243. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
  244. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -1
  245. package/lib-commonjs/components/DataGridHeaderCell/index.js +0 -6
  246. package/lib-commonjs/components/DataGridHeaderCell/index.js.map +1 -1
  247. package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js +0 -4
  248. package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
  249. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js +0 -10
  250. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
  251. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +0 -8
  252. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -1
  253. package/lib-commonjs/components/DataGridRow/DataGridRow.js +1 -7
  254. package/lib-commonjs/components/DataGridRow/DataGridRow.js.map +1 -1
  255. package/lib-commonjs/components/DataGridRow/DataGridRow.types.js.map +1 -1
  256. package/lib-commonjs/components/DataGridRow/index.js +0 -6
  257. package/lib-commonjs/components/DataGridRow/index.js.map +1 -1
  258. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js +9 -8
  259. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js.map +1 -1
  260. package/lib-commonjs/components/DataGridRow/useDataGridRow.js +8 -30
  261. package/lib-commonjs/components/DataGridRow/useDataGridRow.js.map +1 -1
  262. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.js +0 -7
  263. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.js.map +1 -1
  264. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js +1 -7
  265. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
  266. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -1
  267. package/lib-commonjs/components/DataGridSelectionCell/index.js +0 -6
  268. package/lib-commonjs/components/DataGridSelectionCell/index.js.map +1 -1
  269. package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js +0 -4
  270. package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
  271. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js +0 -15
  272. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
  273. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js +0 -8
  274. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js.map +1 -1
  275. package/lib-commonjs/components/Table/Table.js +1 -8
  276. package/lib-commonjs/components/Table/Table.js.map +1 -1
  277. package/lib-commonjs/components/Table/Table.types.js.map +1 -1
  278. package/lib-commonjs/components/Table/index.js +0 -6
  279. package/lib-commonjs/components/Table/index.js.map +1 -1
  280. package/lib-commonjs/components/Table/renderTable.js +2 -7
  281. package/lib-commonjs/components/Table/renderTable.js.map +1 -1
  282. package/lib-commonjs/components/Table/useTable.js +0 -5
  283. package/lib-commonjs/components/Table/useTable.js.map +1 -1
  284. package/lib-commonjs/components/Table/useTableContextValues.js +0 -3
  285. package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -1
  286. package/lib-commonjs/components/Table/useTableStyles.js +13 -23
  287. package/lib-commonjs/components/Table/useTableStyles.js.map +1 -1
  288. package/lib-commonjs/components/TableBody/TableBody.js +1 -7
  289. package/lib-commonjs/components/TableBody/TableBody.js.map +1 -1
  290. package/lib-commonjs/components/TableBody/TableBody.types.js.map +1 -1
  291. package/lib-commonjs/components/TableBody/index.js +0 -6
  292. package/lib-commonjs/components/TableBody/index.js.map +1 -1
  293. package/lib-commonjs/components/TableBody/renderTableBody.js +3 -8
  294. package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -1
  295. package/lib-commonjs/components/TableBody/useTableBody.js +0 -6
  296. package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
  297. package/lib-commonjs/components/TableBody/useTableBodyStyles.js +6 -12
  298. package/lib-commonjs/components/TableBody/useTableBodyStyles.js.map +1 -1
  299. package/lib-commonjs/components/TableCell/TableCell.js +1 -7
  300. package/lib-commonjs/components/TableCell/TableCell.js.map +1 -1
  301. package/lib-commonjs/components/TableCell/TableCell.types.js.map +1 -1
  302. package/lib-commonjs/components/TableCell/index.js +0 -6
  303. package/lib-commonjs/components/TableCell/index.js.map +1 -1
  304. package/lib-commonjs/components/TableCell/renderTableCell.js +2 -6
  305. package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -1
  306. package/lib-commonjs/components/TableCell/useTableCell.js +0 -6
  307. package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
  308. package/lib-commonjs/components/TableCell/useTableCellStyles.js +36 -47
  309. package/lib-commonjs/components/TableCell/useTableCellStyles.js.map +1 -1
  310. package/lib-commonjs/components/TableCellActions/TableCellActions.js +1 -7
  311. package/lib-commonjs/components/TableCellActions/TableCellActions.js.map +1 -1
  312. package/lib-commonjs/components/TableCellActions/TableCellActions.types.js.map +1 -1
  313. package/lib-commonjs/components/TableCellActions/index.js +0 -6
  314. package/lib-commonjs/components/TableCellActions/index.js.map +1 -1
  315. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js +3 -8
  316. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -1
  317. package/lib-commonjs/components/TableCellActions/useTableCellActions.js +0 -5
  318. package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -1
  319. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js +10 -16
  320. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js.map +1 -1
  321. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js +1 -8
  322. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js.map +1 -1
  323. package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
  324. package/lib-commonjs/components/TableCellLayout/index.js +0 -6
  325. package/lib-commonjs/components/TableCellLayout/index.js.map +1 -1
  326. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js +10 -11
  327. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  328. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +2 -7
  329. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  330. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js +0 -3
  331. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
  332. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js +32 -45
  333. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
  334. package/lib-commonjs/components/TableHeader/TableHeader.js +1 -7
  335. package/lib-commonjs/components/TableHeader/TableHeader.js.map +1 -1
  336. package/lib-commonjs/components/TableHeader/TableHeader.types.js.map +1 -1
  337. package/lib-commonjs/components/TableHeader/index.js +0 -6
  338. package/lib-commonjs/components/TableHeader/index.js.map +1 -1
  339. package/lib-commonjs/components/TableHeader/renderTableHeader.js +2 -7
  340. package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -1
  341. package/lib-commonjs/components/TableHeader/useTableHeader.js +0 -6
  342. package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
  343. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js +6 -19
  344. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js.map +1 -1
  345. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js +1 -7
  346. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  347. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
  348. package/lib-commonjs/components/TableHeaderCell/index.js +0 -6
  349. package/lib-commonjs/components/TableHeaderCell/index.js.map +1 -1
  350. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js +6 -8
  351. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  352. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +0 -10
  353. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  354. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js +68 -81
  355. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
  356. package/lib-commonjs/components/TableRow/TableRow.js +1 -7
  357. package/lib-commonjs/components/TableRow/TableRow.js.map +1 -1
  358. package/lib-commonjs/components/TableRow/TableRow.types.js.map +1 -1
  359. package/lib-commonjs/components/TableRow/index.js +0 -6
  360. package/lib-commonjs/components/TableRow/index.js.map +1 -1
  361. package/lib-commonjs/components/TableRow/renderTableRow.js +3 -8
  362. package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -1
  363. package/lib-commonjs/components/TableRow/useTableRow.js +5 -9
  364. package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
  365. package/lib-commonjs/components/TableRow/useTableRowStyles.js +137 -153
  366. package/lib-commonjs/components/TableRow/useTableRowStyles.js.map +1 -1
  367. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js +1 -7
  368. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  369. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
  370. package/lib-commonjs/components/TableSelectionCell/index.js +0 -6
  371. package/lib-commonjs/components/TableSelectionCell/index.js.map +1 -1
  372. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js +6 -8
  373. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  374. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js +4 -10
  375. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  376. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js +42 -56
  377. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
  378. package/lib-commonjs/contexts/columnIdContext.js +0 -5
  379. package/lib-commonjs/contexts/columnIdContext.js.map +1 -1
  380. package/lib-commonjs/contexts/dataGridContext.js +2 -6
  381. package/lib-commonjs/contexts/dataGridContext.js.map +1 -1
  382. package/lib-commonjs/contexts/rowIdContext.js +0 -5
  383. package/lib-commonjs/contexts/rowIdContext.js.map +1 -1
  384. package/lib-commonjs/contexts/tableContext.js +0 -5
  385. package/lib-commonjs/contexts/tableContext.js.map +1 -1
  386. package/lib-commonjs/contexts/tableHeaderContext.js +0 -4
  387. package/lib-commonjs/contexts/tableHeaderContext.js.map +1 -1
  388. package/lib-commonjs/hooks/createColumn.js +0 -8
  389. package/lib-commonjs/hooks/createColumn.js.map +1 -1
  390. package/lib-commonjs/hooks/index.js +0 -6
  391. package/lib-commonjs/hooks/index.js.map +1 -1
  392. package/lib-commonjs/hooks/selectionManager.js +0 -18
  393. package/lib-commonjs/hooks/selectionManager.js.map +1 -1
  394. package/lib-commonjs/hooks/types.js.map +1 -1
  395. package/lib-commonjs/hooks/useTableFeatures.js +0 -9
  396. package/lib-commonjs/hooks/useTableFeatures.js.map +1 -1
  397. package/lib-commonjs/hooks/useTableSelection.js +2 -13
  398. package/lib-commonjs/hooks/useTableSelection.js.map +1 -1
  399. package/lib-commonjs/hooks/useTableSort.js +4 -18
  400. package/lib-commonjs/hooks/useTableSort.js.map +1 -1
  401. package/lib-commonjs/index.js +0 -36
  402. package/lib-commonjs/index.js.map +1 -1
  403. package/package.json +11 -11
package/CHANGELOG.json CHANGED
@@ -2,7 +2,179 @@
2
2
  "name": "@fluentui/react-table",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 21 Dec 2022 10:17:16 GMT",
5
+ "date": "Mon, 09 Jan 2023 14:31:47 GMT",
6
+ "tag": "@fluentui/react-table_v9.0.0-alpha.17",
7
+ "version": "9.0.0-alpha.17",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "olfedias@microsoft.com",
12
+ "package": "@fluentui/react-table",
13
+ "commit": "73bd103d70370326286daee55dad5c1c2b9861a7",
14
+ "comment": "fix: remove Event type in selectionManager"
15
+ },
16
+ {
17
+ "author": "lingfangao@hotmail.com",
18
+ "package": "@fluentui/react-table",
19
+ "commit": "2bde4a96454105f8943284b590b6174ccb1aea94",
20
+ "comment": "refactor: Cleanup unused code"
21
+ },
22
+ {
23
+ "author": "lingfangao@hotmail.com",
24
+ "package": "@fluentui/react-table",
25
+ "commit": "87fcaf175c6588438c7f8dc2c2de5a4af5f94d1a",
26
+ "comment": "BREAKING(TableCellLayout): `wrapper` slot renamed to `content`"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui/react-table",
31
+ "comment": "Bump @fluentui/react-aria to v9.3.5",
32
+ "commit": "26f0364b3837056ee8e0df42a7932c298c68290e"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@fluentui/react-table",
37
+ "comment": "Bump @fluentui/react-avatar to v9.2.12",
38
+ "commit": "26f0364b3837056ee8e0df42a7932c298c68290e"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@fluentui/react-table",
43
+ "comment": "Bump @fluentui/react-checkbox to v9.0.18",
44
+ "commit": "26f0364b3837056ee8e0df42a7932c298c68290e"
45
+ },
46
+ {
47
+ "author": "beachball",
48
+ "package": "@fluentui/react-table",
49
+ "comment": "Bump @fluentui/react-context-selector to v9.1.5",
50
+ "commit": "26f0364b3837056ee8e0df42a7932c298c68290e"
51
+ },
52
+ {
53
+ "author": "beachball",
54
+ "package": "@fluentui/react-table",
55
+ "comment": "Bump @fluentui/react-radio to v9.0.17",
56
+ "commit": "26f0364b3837056ee8e0df42a7932c298c68290e"
57
+ },
58
+ {
59
+ "author": "beachball",
60
+ "package": "@fluentui/react-table",
61
+ "comment": "Bump @fluentui/react-tabster to v9.3.6",
62
+ "commit": "26f0364b3837056ee8e0df42a7932c298c68290e"
63
+ },
64
+ {
65
+ "author": "beachball",
66
+ "package": "@fluentui/react-table",
67
+ "comment": "Bump @fluentui/react-utilities to v9.4.0",
68
+ "commit": "26f0364b3837056ee8e0df42a7932c298c68290e"
69
+ }
70
+ ],
71
+ "none": [
72
+ {
73
+ "author": "olfedias@microsoft.com",
74
+ "package": "@fluentui/react-table",
75
+ "commit": "bffa36e0a7824f1e54d73907912473692c40d70b",
76
+ "comment": "docs: fix typo in Table.types.ts"
77
+ },
78
+ {
79
+ "author": "lingfangao@hotmail.com",
80
+ "package": "@fluentui/react-table",
81
+ "commit": "f514d1ff53ea0b2a6e959b3d457f341d7f68575e",
82
+ "comment": "docs: Fix typos in react-table docs"
83
+ }
84
+ ]
85
+ }
86
+ },
87
+ {
88
+ "date": "Wed, 04 Jan 2023 01:40:32 GMT",
89
+ "tag": "@fluentui/react-table_v9.0.0-alpha.16",
90
+ "version": "9.0.0-alpha.16",
91
+ "comments": {
92
+ "prerelease": [
93
+ {
94
+ "author": "olfedias@microsoft.com",
95
+ "package": "@fluentui/react-table",
96
+ "commit": "2c38f1e4ae07b2b60df596efe11015a68f166dbf",
97
+ "comment": "chore: Update Griffel to latest version"
98
+ },
99
+ {
100
+ "author": "lingfangao@hotmail.com",
101
+ "package": "@fluentui/react-table",
102
+ "commit": "ee58fac0ac94e1456e9319150c4b456f186aba56",
103
+ "comment": "refactor: render function children called in component render function"
104
+ },
105
+ {
106
+ "author": "lingfangao@hotmail.com",
107
+ "package": "@fluentui/react-table",
108
+ "commit": "47d4b0bec3fb3aa815bde1fd7fb67ecf85c97b5a",
109
+ "comment": "fix: DataGridSelection cell should focus on input, not cell"
110
+ },
111
+ {
112
+ "author": "beachball",
113
+ "package": "@fluentui/react-table",
114
+ "comment": "Bump @fluentui/react-aria to v9.3.4",
115
+ "commit": "3e322d15529451be153e97298873253e21af4082"
116
+ },
117
+ {
118
+ "author": "beachball",
119
+ "package": "@fluentui/react-table",
120
+ "comment": "Bump @fluentui/react-avatar to v9.2.11",
121
+ "commit": "3e322d15529451be153e97298873253e21af4082"
122
+ },
123
+ {
124
+ "author": "beachball",
125
+ "package": "@fluentui/react-table",
126
+ "comment": "Bump @fluentui/react-checkbox to v9.0.17",
127
+ "commit": "3e322d15529451be153e97298873253e21af4082"
128
+ },
129
+ {
130
+ "author": "beachball",
131
+ "package": "@fluentui/react-table",
132
+ "comment": "Bump @fluentui/react-context-selector to v9.1.4",
133
+ "commit": "3e322d15529451be153e97298873253e21af4082"
134
+ },
135
+ {
136
+ "author": "beachball",
137
+ "package": "@fluentui/react-table",
138
+ "comment": "Bump @fluentui/react-radio to v9.0.16",
139
+ "commit": "3e322d15529451be153e97298873253e21af4082"
140
+ },
141
+ {
142
+ "author": "beachball",
143
+ "package": "@fluentui/react-table",
144
+ "comment": "Bump @fluentui/react-tabster to v9.3.5",
145
+ "commit": "3e322d15529451be153e97298873253e21af4082"
146
+ },
147
+ {
148
+ "author": "beachball",
149
+ "package": "@fluentui/react-table",
150
+ "comment": "Bump @fluentui/react-utilities to v9.3.1",
151
+ "commit": "3e322d15529451be153e97298873253e21af4082"
152
+ },
153
+ {
154
+ "author": "beachball",
155
+ "package": "@fluentui/react-table",
156
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.19",
157
+ "commit": "3e322d15529451be153e97298873253e21af4082"
158
+ }
159
+ ],
160
+ "none": [
161
+ {
162
+ "author": "martinhochel@microsoft.com",
163
+ "package": "@fluentui/react-table",
164
+ "commit": "4ec2b998b294d6d9c3196d3d82893bdd97d0c105",
165
+ "comment": "chore(scripts): move index.ts to to follow sub-folder domain packaging"
166
+ },
167
+ {
168
+ "author": "martinhochel@microsoft.com",
169
+ "package": "@fluentui/react-table",
170
+ "commit": "194b0cf0cc27c1c1233aa945f09b3ad29778d8ca",
171
+ "comment": "chore(scripts): use for @fluentui/scripts version within all package.json"
172
+ }
173
+ ]
174
+ }
175
+ },
176
+ {
177
+ "date": "Wed, 21 Dec 2022 10:20:33 GMT",
6
178
  "tag": "@fluentui/react-table_v9.0.0-alpha.15",
7
179
  "version": "9.0.0-alpha.15",
8
180
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,49 @@
1
1
  # Change Log - @fluentui/react-table
2
2
 
3
- This log was last generated on Wed, 21 Dec 2022 10:17:16 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 09 Jan 2023 14:31:47 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.0-alpha.17](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.0.0-alpha.17)
8
+
9
+ Mon, 09 Jan 2023 14:31:47 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-table_v9.0.0-alpha.16..@fluentui/react-table_v9.0.0-alpha.17)
11
+
12
+ ### Changes
13
+
14
+ - fix: remove Event type in selectionManager ([PR #26211](https://github.com/microsoft/fluentui/pull/26211) by olfedias@microsoft.com)
15
+ - refactor: Cleanup unused code ([PR #26219](https://github.com/microsoft/fluentui/pull/26219) by lingfangao@hotmail.com)
16
+ - BREAKING(TableCellLayout): `wrapper` slot renamed to `content` ([PR #26220](https://github.com/microsoft/fluentui/pull/26220) by lingfangao@hotmail.com)
17
+ - Bump @fluentui/react-aria to v9.3.5 ([PR #26257](https://github.com/microsoft/fluentui/pull/26257) by beachball)
18
+ - Bump @fluentui/react-avatar to v9.2.12 ([PR #26257](https://github.com/microsoft/fluentui/pull/26257) by beachball)
19
+ - Bump @fluentui/react-checkbox to v9.0.18 ([PR #26257](https://github.com/microsoft/fluentui/pull/26257) by beachball)
20
+ - Bump @fluentui/react-context-selector to v9.1.5 ([PR #26257](https://github.com/microsoft/fluentui/pull/26257) by beachball)
21
+ - Bump @fluentui/react-radio to v9.0.17 ([PR #26257](https://github.com/microsoft/fluentui/pull/26257) by beachball)
22
+ - Bump @fluentui/react-tabster to v9.3.6 ([PR #26257](https://github.com/microsoft/fluentui/pull/26257) by beachball)
23
+ - Bump @fluentui/react-utilities to v9.4.0 ([PR #26257](https://github.com/microsoft/fluentui/pull/26257) by beachball)
24
+
25
+ ## [9.0.0-alpha.16](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.0.0-alpha.16)
26
+
27
+ Wed, 04 Jan 2023 01:40:32 GMT
28
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-table_v9.0.0-alpha.15..@fluentui/react-table_v9.0.0-alpha.16)
29
+
30
+ ### Changes
31
+
32
+ - chore: Update Griffel to latest version ([PR #26045](https://github.com/microsoft/fluentui/pull/26045) by olfedias@microsoft.com)
33
+ - refactor: render function children called in component render function ([PR #26085](https://github.com/microsoft/fluentui/pull/26085) by lingfangao@hotmail.com)
34
+ - fix: DataGridSelection cell should focus on input, not cell ([PR #26076](https://github.com/microsoft/fluentui/pull/26076) by lingfangao@hotmail.com)
35
+ - Bump @fluentui/react-aria to v9.3.4 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
36
+ - Bump @fluentui/react-avatar to v9.2.11 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
37
+ - Bump @fluentui/react-checkbox to v9.0.17 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
38
+ - Bump @fluentui/react-context-selector to v9.1.4 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
39
+ - Bump @fluentui/react-radio to v9.0.16 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
40
+ - Bump @fluentui/react-tabster to v9.3.5 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
41
+ - Bump @fluentui/react-utilities to v9.3.1 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
42
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.19 ([PR #26114](https://github.com/microsoft/fluentui/pull/26114) by beachball)
43
+
7
44
  ## [9.0.0-alpha.15](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.0.0-alpha.15)
8
45
 
9
- Wed, 21 Dec 2022 10:17:16 GMT
46
+ Wed, 21 Dec 2022 10:20:33 GMT
10
47
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-table_v9.0.0-alpha.14..@fluentui/react-table_v9.0.0-alpha.15)
11
48
 
12
49
  ### Changes
package/dist/index.d.ts CHANGED
@@ -41,12 +41,12 @@ export declare interface CreateColumnOptions<TItem> extends Partial<ColumnDefini
41
41
  }
42
42
 
43
43
  /**
44
- * DataGrid component - TODO: add more docs
44
+ * DataGrid component
45
45
  */
46
46
  export declare const DataGrid: ForwardRefComponent<DataGridProps>;
47
47
 
48
48
  /**
49
- * DataGridBody component - TODO: add more docs
49
+ * DataGridBody component
50
50
  */
51
51
  export declare const DataGridBody: ForwardRefComponent<DataGridBodyProps>;
52
52
 
@@ -67,10 +67,13 @@ export declare type DataGridBodySlots = TableBodySlots;
67
67
  /**
68
68
  * State used in rendering DataGridBody
69
69
  */
70
- export declare type DataGridBodyState = TableBodyState;
70
+ export declare type DataGridBodyState = TableBodyState & {
71
+ rows: RowState<any>[];
72
+ renderRow: RowRenderFunction;
73
+ };
71
74
 
72
75
  /**
73
- * DataGridCell component - TODO: add more docs
76
+ * DataGridCell component
74
77
  */
75
78
  export declare const DataGridCell: ForwardRefComponent<DataGridCellProps>;
76
79
 
@@ -118,12 +121,12 @@ export declare type DataGridContextValues = TableContextValues & {
118
121
  };
119
122
 
120
123
  /**
121
- * DataGridHeader component - TODO: add more docs
124
+ * DataGridHeader component
122
125
  */
123
126
  export declare const DataGridHeader: ForwardRefComponent<DataGridHeaderProps>;
124
127
 
125
128
  /**
126
- * DataGridHeaderCell component - TODO: add more docs
129
+ * DataGridHeaderCell component
127
130
  */
128
131
  export declare const DataGridHeaderCell: ForwardRefComponent<DataGridHeaderCellProps>;
129
132
 
@@ -169,7 +172,7 @@ export declare type DataGridProps = TableProps & Pick<DataGridContextValue, 'ite
169
172
  };
170
173
 
171
174
  /**
172
- * DataGridRow component - TODO: add more docs
175
+ * DataGridRow component
173
176
  */
174
177
  export declare const DataGridRow: ForwardRefComponent<DataGridRowProps>;
175
178
 
@@ -193,10 +196,13 @@ export declare type DataGridRowSlots = TableRowSlots & {
193
196
  /**
194
197
  * State used in rendering DataGridRow
195
198
  */
196
- export declare type DataGridRowState = TableRowState & ComponentState<DataGridRowSlots>;
199
+ export declare type DataGridRowState = TableRowState & ComponentState<DataGridRowSlots> & {
200
+ renderCell: CellRenderFunction;
201
+ columnDefs: ColumnDefinition<any>[];
202
+ };
197
203
 
198
204
  /**
199
- * DataGridSelectionCell component - TODO: add more docs
205
+ * DataGridSelectionCell component
200
206
  */
201
207
  export declare const DataGridSelectionCell: ForwardRefComponent<DataGridSelectionCellProps>;
202
208
 
@@ -356,12 +362,12 @@ declare interface SortState {
356
362
  }
357
363
 
358
364
  /**
359
- * Table component - TODO: add more docs
365
+ * Table component
360
366
  */
361
367
  export declare const Table: ForwardRefComponent<TableProps>;
362
368
 
363
369
  /**
364
- * TableBody component - TODO: add more docs
370
+ * TableBody component
365
371
  */
366
372
  export declare const TableBody: ForwardRefComponent<TableBodyProps>;
367
373
 
@@ -384,12 +390,12 @@ export declare type TableBodySlots = {
384
390
  export declare type TableBodyState = ComponentState<TableBodySlots> & Pick<TableContextValue, 'noNativeElements'>;
385
391
 
386
392
  /**
387
- * TableCell component - TODO: add more docs
393
+ * TableCell component
388
394
  */
389
395
  export declare const TableCell: ForwardRefComponent<TableCellProps>;
390
396
 
391
397
  /**
392
- * TableCellActions component - TODO: add more docs
398
+ * TableCellActions component
393
399
  */
394
400
  export declare const TableCellActions: ForwardRefComponent<TableCellActionsProps>;
395
401
 
@@ -420,7 +426,7 @@ export declare const tableCellClassName = "fui-TableCell";
420
426
  export declare const tableCellClassNames: SlotClassNames<TableCellSlots>;
421
427
 
422
428
  /**
423
- * TableCellLayout component - TODO: add more docs
429
+ * TableCellLayout component
424
430
  */
425
431
  export declare const TableCellLayout: ForwardRefComponent<TableCellLayoutProps>;
426
432
 
@@ -460,7 +466,7 @@ export declare type TableCellLayoutSlots = {
460
466
  /**
461
467
  * A layout wrapper for the main and description slots
462
468
  */
463
- wrapper: Slot<'div'>;
469
+ content: Slot<'div'>;
464
470
  };
465
471
 
466
472
  /**
@@ -497,7 +503,7 @@ export declare type TableContextValue = {
497
503
  */
498
504
  size: 'extra-small' | 'small' | 'medium';
499
505
  /**
500
- * Render all table elements as divs intead of semantic table elements
506
+ * Render all table elements as divs instead of semantic table elements
501
507
  * Using divs no longer uses `display: table` layout but `display: flex`
502
508
  * @default false
503
509
  */
@@ -514,12 +520,12 @@ export declare type TableContextValues = {
514
520
  };
515
521
 
516
522
  /**
517
- * TableHeader component - TODO: add more docs
523
+ * TableHeader component
518
524
  */
519
525
  export declare const TableHeader: ForwardRefComponent<TableHeaderProps>;
520
526
 
521
527
  /**
522
- * TableHeaderCell component - TODO: add more docs
528
+ * TableHeaderCell component
523
529
  */
524
530
  export declare const TableHeaderCell: ForwardRefComponent<TableHeaderCellProps>;
525
531
 
@@ -575,7 +581,7 @@ export declare type TableHeaderState = ComponentState<TableHeaderSlots> & Pick<T
575
581
  export declare type TableProps = ComponentProps<TableSlots> & Partial<TableContextValue>;
576
582
 
577
583
  /**
578
- * TableRow component - TODO: add more docs
584
+ * TableRow component
579
585
  */
580
586
  export declare const TableRow: ForwardRefComponent<TableRowProps>;
581
587
 
@@ -602,10 +608,12 @@ export declare type TableRowSlots = {
602
608
  /**
603
609
  * State used in rendering TableRow
604
610
  */
605
- export declare type TableRowState = ComponentState<TableRowSlots> & Pick<TableContextValue, 'noNativeElements' | 'size'> & Pick<Required<TableRowProps>, 'appearance'>;
611
+ export declare type TableRowState = ComponentState<TableRowSlots> & Pick<TableContextValue, 'noNativeElements' | 'size'> & Pick<Required<TableRowProps>, 'appearance'> & {
612
+ isHeaderRow: boolean;
613
+ };
606
614
 
607
615
  /**
608
- * TableSelectionCell component - TODO: add more docs
616
+ * TableSelectionCell component
609
617
  */
610
618
  export declare const TableSelectionCell: ForwardRefComponent<TableSelectionCellProps>;
611
619
 
@@ -614,7 +622,7 @@ export declare const tableSelectionCellClassNames: SlotClassNames<TableSelection
614
622
  /**
615
623
  * TableSelectionCell Props
616
624
  */
617
- export declare type TableSelectionCellProps = ComponentProps<Partial<Omit<TableSelectionCellSlots, 'media'>>> & {
625
+ export declare type TableSelectionCellProps = ComponentProps<Partial<TableSelectionCellSlots>> & {
618
626
  /**
619
627
  * A table can have two kinds of selection modes.
620
628
  * @default checkbox
@@ -4,9 +4,8 @@ import { renderDataGrid_unstable } from './renderDataGrid';
4
4
  import { useDataGridStyles_unstable } from './useDataGridStyles';
5
5
  import { useDataGridContextValues_unstable } from './useDataGridContextValues';
6
6
  /**
7
- * DataGrid component - TODO: add more docs
7
+ * DataGrid component
8
8
  */
9
-
10
9
  export const DataGrid = /*#__PURE__*/React.forwardRef((props, ref) => {
11
10
  const state = useDataGrid_unstable(props, ref);
12
11
  useDataGridStyles_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/DataGrid/DataGrid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,oBAAT,QAAqC,eAArC;AACA,SAAS,uBAAT,QAAwC,kBAAxC;AACA,SAAS,0BAAT,QAA2C,qBAA3C;AAGA,SAAS,iCAAT,QAAkD,4BAAlD;AAEA;;AAEG;;AACH,OAAO,MAAM,QAAQ,gBAAuC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC1F,MAAM,KAAK,GAAG,oBAAoB,CAAC,KAAD,EAAQ,GAAR,CAAlC;EAEA,0BAA0B,CAAC,KAAD,CAA1B;EACA,OAAO,uBAAuB,CAAC,KAAD,EAAQ,iCAAiC,CAAC,KAAD,CAAzC,CAA9B;AACD,CAL2D,CAArD;AAOP,QAAQ,CAAC,WAAT,GAAuB,UAAvB","sourcesContent":["import * as React from 'react';\nimport { useDataGrid_unstable } from './useDataGrid';\nimport { renderDataGrid_unstable } from './renderDataGrid';\nimport { useDataGridStyles_unstable } from './useDataGridStyles';\nimport type { DataGridProps } from './DataGrid.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useDataGridContextValues_unstable } from './useDataGridContextValues';\n\n/**\n * DataGrid component - TODO: add more docs\n */\nexport const DataGrid: ForwardRefComponent<DataGridProps> = React.forwardRef((props, ref) => {\n const state = useDataGrid_unstable(props, ref);\n\n useDataGridStyles_unstable(state);\n return renderDataGrid_unstable(state, useDataGridContextValues_unstable(state));\n});\n\nDataGrid.displayName = 'DataGrid';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,oBAAoB,QAAQ,eAAe;AACpD,SAASC,uBAAuB,QAAQ,kBAAkB;AAC1D,SAASC,0BAA0B,QAAQ,qBAAqB;AAGhE,SAASC,iCAAiC,QAAQ,4BAA4B;AAE9E;;;AAGA,OAAO,MAAMC,QAAQ,gBAAuCL,KAAK,CAACM,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC1F,MAAMC,KAAK,GAAGR,oBAAoB,CAACM,KAAK,EAAEC,GAAG,CAAC;EAE9CL,0BAA0B,CAACM,KAAK,CAAC;EACjC,OAAOP,uBAAuB,CAACO,KAAK,EAAEL,iCAAiC,CAACK,KAAK,CAAC,CAAC;AACjF,CAAC,CAAC;AAEFJ,QAAQ,CAACK,WAAW,GAAG,UAAU","names":["React","useDataGrid_unstable","renderDataGrid_unstable","useDataGridStyles_unstable","useDataGridContextValues_unstable","DataGrid","forwardRef","props","ref","state","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/DataGrid/DataGrid.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGrid_unstable } from './useDataGrid';\nimport { renderDataGrid_unstable } from './renderDataGrid';\nimport { useDataGridStyles_unstable } from './useDataGridStyles';\nimport type { DataGridProps } from './DataGrid.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useDataGridContextValues_unstable } from './useDataGridContextValues';\n\n/**\n * DataGrid component\n */\nexport const DataGrid: ForwardRefComponent<DataGridProps> = React.forwardRef((props, ref) => {\n const state = useDataGrid_unstable(props, ref);\n\n useDataGridStyles_unstable(state);\n return renderDataGrid_unstable(state, useDataGridContextValues_unstable(state));\n});\n\nDataGrid.displayName = 'DataGrid';\n"]}
@@ -4,7 +4,6 @@ import { DataGridContextProvider } from '../../contexts/dataGridContext';
4
4
  /**
5
5
  * Render the final JSX of DataGrid
6
6
  */
7
-
8
7
  export const renderDataGrid_unstable = (state, contextValues) => {
9
8
  return /*#__PURE__*/React.createElement(DataGridContextProvider, {
10
9
  value: contextValues.dataGrid
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/DataGrid/renderDataGrid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAEA,SAAS,oBAAT,QAAqC,sBAArC;AACA,SAAS,uBAAT,QAAwC,gCAAxC;AAEA;;AAEG;;AACH,OAAO,MAAM,uBAAuB,GAAG,CAAC,KAAD,EAAuB,aAAvB,KAA+D;EACpG,oBACE,KAAA,CAAA,aAAA,CAAC,uBAAD,EAAwB;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAAxB,EACG,oBAAoB,CAAC,KAAD,EAAQ,aAAR,CADvB,CADF;AAKD,CANM","sourcesContent":["import * as React from 'react';\nimport type { DataGridContextValues, DataGridState } from './DataGrid.types';\nimport { renderTable_unstable } from '../Table/renderTable';\nimport { DataGridContextProvider } from '../../contexts/dataGridContext';\n\n/**\n * Render the final JSX of DataGrid\n */\nexport const renderDataGrid_unstable = (state: DataGridState, contextValues: DataGridContextValues) => {\n return (\n <DataGridContextProvider value={contextValues.dataGrid}>\n {renderTable_unstable(state, contextValues)}\n </DataGridContextProvider>\n );\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,oBAAoB,QAAQ,sBAAsB;AAC3D,SAASC,uBAAuB,QAAQ,gCAAgC;AAExE;;;AAGA,OAAO,MAAMC,uBAAuB,GAAG,CAACC,KAAoB,EAAEC,aAAoC,KAAI;EACpG,oBACEL,oBAACE,uBAAuB;IAACI,KAAK,EAAED,aAAa,CAACE;EAAQ,GACnDN,oBAAoB,CAACG,KAAK,EAAEC,aAAa,CAAC,CACnB;AAE9B,CAAC","names":["React","renderTable_unstable","DataGridContextProvider","renderDataGrid_unstable","state","contextValues","value","dataGrid"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/DataGrid/renderDataGrid.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { DataGridContextValues, DataGridState } from './DataGrid.types';\nimport { renderTable_unstable } from '../Table/renderTable';\nimport { DataGridContextProvider } from '../../contexts/dataGridContext';\n\n/**\n * Render the final JSX of DataGrid\n */\nexport const renderDataGrid_unstable = (state: DataGridState, contextValues: DataGridContextValues) => {\n return (\n <DataGridContextProvider value={contextValues.dataGrid}>\n {renderTable_unstable(state, contextValues)}\n </DataGridContextProvider>\n );\n};\n"]}
@@ -10,7 +10,6 @@ import { useTableFeatures, useTableSort, useTableSelection } from '../../hooks';
10
10
  * @param props - props from this instance of DataGrid
11
11
  * @param ref - reference to root HTMLElement of DataGrid
12
12
  */
13
-
14
13
  export const useDataGrid_unstable = (props, ref) => {
15
14
  const {
16
15
  items,
@@ -52,7 +51,8 @@ export const useDataGrid_unstable = (props, ref) => {
52
51
  ...(navigable && keyboardNavAttr),
53
52
  ...props
54
53
  }, ref);
55
- return { ...baseTableState,
54
+ return {
55
+ ...baseTableState,
56
56
  focusMode,
57
57
  tableState,
58
58
  selectableRows: !!selectionMode,
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/DataGrid/useDataGrid.ts"],"names":[],"mappings":"AACA,SAAS,uBAAT,QAAwC,yBAAxC;AAEA,SAAS,iBAAT,QAAkC,mBAAlC;AACA,SAAS,gBAAT,EAA2B,YAA3B,EAAyC,iBAAzC,QAAkE,aAAlE;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,oBAAoB,GAAG,CAAC,KAAD,EAAuB,GAAvB,KAAqE;EACvG,MAAM;IACJ,KADI;IAEJ,OAFI;IAGJ,SAAS,GAAG,MAHR;IAIJ,aAJI;IAKJ,YALI;IAMJ,iBANI;IAOJ,gBAPI;IAQJ,SARI;IASJ,aATI;IAUJ,oBAVI;IAWJ,eAAe,GAAG,KAXd;IAYJ,mBAAmB,GAAG,OAZlB;IAaJ;EAbI,IAcF,KAdJ;EAgBA,MAAM,SAAS,GAAG,SAAS,KAAK,MAAhC;EACA,MAAM,eAAe,GAAG,uBAAuB,CAAC;IAAE,IAAI,EAAE;EAAR,CAAD,CAA/C;EAEA,MAAM,UAAU,GAAG,gBAAgB,CAAC;IAAE,KAAF;IAAS,OAAT;IAAkB;EAAlB,CAAD,EAA+B,CAChE,YAAY,CAAC;IACX,gBADW;IAEX,SAFW;IAGX;EAHW,CAAD,CADoD,EAMhE,iBAAiB,CAAC;IAChB,oBADgB;IAEhB,aAFgB;IAGhB,iBAHgB;IAIhB,aAAa,EAAE,aAAa,KAAA,IAAb,IAAA,aAAa,KAAA,KAAA,CAAb,GAAA,aAAA,GAAiB;EAJhB,CAAD,CAN+C,CAA/B,CAAnC;EAcA,MAAM,cAAc,GAAG,iBAAiB,CACtC;IAAE,IAAI,EAAE,MAAR;IAAgB,EAAE,EAAE,KAApB;IAA2B,gBAAgB,EAAE,IAA7C;IAAmD,IAAI,SAAS,IAAI,eAAjB,CAAnD;IAAsF,GAAG;EAAzF,CADsC,EAEtC,GAFsC,CAAxC;EAKA,OAAO,EACL,GAAG,cADE;IAEL,SAFK;IAGL,UAHK;IAIL,cAAc,EAAE,CAAC,CAAC,aAJb;IAKL,eALK;IAML;EANK,CAAP;AAQD,CA/CM","sourcesContent":["import * as React from 'react';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport type { DataGridProps, DataGridState } from './DataGrid.types';\nimport { useTable_unstable } from '../Table/useTable';\nimport { useTableFeatures, useTableSort, useTableSelection } from '../../hooks';\n\n/**\n * Create the state required to render DataGrid.\n *\n * The returned state can be modified with hooks such as useDataGridStyles_unstable,\n * before being passed to renderDataGrid_unstable.\n *\n * @param props - props from this instance of DataGrid\n * @param ref - reference to root HTMLElement of DataGrid\n */\nexport const useDataGrid_unstable = (props: DataGridProps, ref: React.Ref<HTMLElement>): DataGridState => {\n const {\n items,\n columns,\n focusMode = 'cell',\n selectionMode,\n onSortChange,\n onSelectionChange,\n defaultSortState,\n sortState,\n selectedItems,\n defaultSelectedItems,\n subtleSelection = false,\n selectionAppearance = 'brand',\n getRowId,\n } = props;\n\n const navigable = focusMode !== 'none';\n const keyboardNavAttr = useArrowNavigationGroup({ axis: 'grid' });\n\n const tableState = useTableFeatures({ items, columns, getRowId }, [\n useTableSort({\n defaultSortState,\n sortState,\n onSortChange,\n }),\n useTableSelection({\n defaultSelectedItems,\n selectedItems,\n onSelectionChange,\n selectionMode: selectionMode ?? 'multiselect',\n }),\n ]);\n\n const baseTableState = useTable_unstable(\n { role: 'grid', as: 'div', noNativeElements: true, ...(navigable && keyboardNavAttr), ...props },\n ref,\n );\n\n return {\n ...baseTableState,\n focusMode,\n tableState,\n selectableRows: !!selectionMode,\n subtleSelection,\n selectionAppearance,\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AACA,SAASA,uBAAuB,QAAQ,yBAAyB;AAEjE,SAASC,iBAAiB,QAAQ,mBAAmB;AACrD,SAASC,gBAAgB,EAAEC,YAAY,EAAEC,iBAAiB,QAAQ,aAAa;AAE/E;;;;;;;;;AASA,OAAO,MAAMC,oBAAoB,GAAG,CAACC,KAAoB,EAAEC,GAA2B,KAAmB;EACvG,MAAM;IACJC,KAAK;IACLC,OAAO;IACPC,SAAS,GAAG,MAAM;IAClBC,aAAa;IACbC,YAAY;IACZC,iBAAiB;IACjBC,gBAAgB;IAChBC,SAAS;IACTC,aAAa;IACbC,oBAAoB;IACpBC,eAAe,GAAG,KAAK;IACvBC,mBAAmB,GAAG,OAAO;IAC7BC;EAAQ,CACT,GAAGd,KAAK;EAET,MAAMe,SAAS,GAAGX,SAAS,KAAK,MAAM;EACtC,MAAMY,eAAe,GAAGtB,uBAAuB,CAAC;IAAEuB,IAAI,EAAE;EAAM,CAAE,CAAC;EAEjE,MAAMC,UAAU,GAAGtB,gBAAgB,CAAC;IAAEM,KAAK;IAAEC,OAAO;IAAEW;EAAQ,CAAE,EAAE,CAChEjB,YAAY,CAAC;IACXW,gBAAgB;IAChBC,SAAS;IACTH;GACD,CAAC,EACFR,iBAAiB,CAAC;IAChBa,oBAAoB;IACpBD,aAAa;IACbH,iBAAiB;IACjBF,aAAa,EAAEA,aAAa,aAAbA,aAAa,cAAbA,aAAa,GAAI;GACjC,CAAC,CACH,CAAC;EAEF,MAAMc,cAAc,GAAGxB,iBAAiB,CACtC;IAAEyB,IAAI,EAAE,MAAM;IAAEC,EAAE,EAAE,KAAK;IAAEC,gBAAgB,EAAE,IAAI;IAAE,IAAIP,SAAS,IAAIC,eAAe,CAAC;IAAE,GAAGhB;EAAK,CAAE,EAChGC,GAAG,CACJ;EAED,OAAO;IACL,GAAGkB,cAAc;IACjBf,SAAS;IACTc,UAAU;IACVK,cAAc,EAAE,CAAC,CAAClB,aAAa;IAC/BO,eAAe;IACfC;GACD;AACH,CAAC","names":["useArrowNavigationGroup","useTable_unstable","useTableFeatures","useTableSort","useTableSelection","useDataGrid_unstable","props","ref","items","columns","focusMode","selectionMode","onSortChange","onSelectionChange","defaultSortState","sortState","selectedItems","defaultSelectedItems","subtleSelection","selectionAppearance","getRowId","navigable","keyboardNavAttr","axis","tableState","baseTableState","role","as","noNativeElements","selectableRows"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/DataGrid/useDataGrid.ts"],"sourcesContent":["import * as React from 'react';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport type { DataGridProps, DataGridState } from './DataGrid.types';\nimport { useTable_unstable } from '../Table/useTable';\nimport { useTableFeatures, useTableSort, useTableSelection } from '../../hooks';\n\n/**\n * Create the state required to render DataGrid.\n *\n * The returned state can be modified with hooks such as useDataGridStyles_unstable,\n * before being passed to renderDataGrid_unstable.\n *\n * @param props - props from this instance of DataGrid\n * @param ref - reference to root HTMLElement of DataGrid\n */\nexport const useDataGrid_unstable = (props: DataGridProps, ref: React.Ref<HTMLElement>): DataGridState => {\n const {\n items,\n columns,\n focusMode = 'cell',\n selectionMode,\n onSortChange,\n onSelectionChange,\n defaultSortState,\n sortState,\n selectedItems,\n defaultSelectedItems,\n subtleSelection = false,\n selectionAppearance = 'brand',\n getRowId,\n } = props;\n\n const navigable = focusMode !== 'none';\n const keyboardNavAttr = useArrowNavigationGroup({ axis: 'grid' });\n\n const tableState = useTableFeatures({ items, columns, getRowId }, [\n useTableSort({\n defaultSortState,\n sortState,\n onSortChange,\n }),\n useTableSelection({\n defaultSelectedItems,\n selectedItems,\n onSelectionChange,\n selectionMode: selectionMode ?? 'multiselect',\n }),\n ]);\n\n const baseTableState = useTable_unstable(\n { role: 'grid', as: 'div', noNativeElements: true, ...(navigable && keyboardNavAttr), ...props },\n ref,\n );\n\n return {\n ...baseTableState,\n focusMode,\n tableState,\n selectableRows: !!selectionMode,\n subtleSelection,\n selectionAppearance,\n };\n};\n"]}
@@ -1,8 +1,10 @@
1
1
  import { useTableContextValues_unstable } from '../Table/useTableContextValues';
2
2
  export function useDataGridContextValues_unstable(state) {
3
3
  const tableContextValues = useTableContextValues_unstable(state);
4
- return { ...tableContextValues,
5
- dataGrid: { ...state.tableState,
4
+ return {
5
+ ...tableContextValues,
6
+ dataGrid: {
7
+ ...state.tableState,
6
8
  focusMode: state.focusMode,
7
9
  selectableRows: state.selectableRows,
8
10
  subtleSelection: state.subtleSelection,
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/DataGrid/useDataGridContextValues.ts"],"names":[],"mappings":"AAAA,SAAS,8BAAT,QAA+C,gCAA/C;AAGA,OAAM,SAAU,iCAAV,CAA4C,KAA5C,EAAgE;EACpE,MAAM,kBAAkB,GAAG,8BAA8B,CAAC,KAAD,CAAzD;EACA,OAAO,EACL,GAAG,kBADE;IAEL,QAAQ,EAAE,EACR,GAAG,KAAK,CAAC,UADD;MAER,SAAS,EAAE,KAAK,CAAC,SAFT;MAGR,cAAc,EAAE,KAAK,CAAC,cAHd;MAIR,eAAe,EAAE,KAAK,CAAC,eAJf;MAKR,mBAAmB,EAAE,KAAK,CAAC;IALnB;EAFL,CAAP;AAUD","sourcesContent":["import { useTableContextValues_unstable } from '../Table/useTableContextValues';\nimport { DataGridContextValues, DataGridState } from './DataGrid.types';\n\nexport function useDataGridContextValues_unstable(state: DataGridState): DataGridContextValues {\n const tableContextValues = useTableContextValues_unstable(state);\n return {\n ...tableContextValues,\n dataGrid: {\n ...state.tableState,\n focusMode: state.focusMode,\n selectableRows: state.selectableRows,\n subtleSelection: state.subtleSelection,\n selectionAppearance: state.selectionAppearance,\n },\n };\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,SAASA,8BAA8B,QAAQ,gCAAgC;AAG/E,OAAM,SAAUC,iCAAiC,CAACC,KAAoB;EACpE,MAAMC,kBAAkB,GAAGH,8BAA8B,CAACE,KAAK,CAAC;EAChE,OAAO;IACL,GAAGC,kBAAkB;IACrBC,QAAQ,EAAE;MACR,GAAGF,KAAK,CAACG,UAAU;MACnBC,SAAS,EAAEJ,KAAK,CAACI,SAAS;MAC1BC,cAAc,EAAEL,KAAK,CAACK,cAAc;MACpCC,eAAe,EAAEN,KAAK,CAACM,eAAe;MACtCC,mBAAmB,EAAEP,KAAK,CAACO;;GAE9B;AACH","names":["useTableContextValues_unstable","useDataGridContextValues_unstable","state","tableContextValues","dataGrid","tableState","focusMode","selectableRows","subtleSelection","selectionAppearance"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/DataGrid/useDataGridContextValues.ts"],"sourcesContent":["import { useTableContextValues_unstable } from '../Table/useTableContextValues';\nimport { DataGridContextValues, DataGridState } from './DataGrid.types';\n\nexport function useDataGridContextValues_unstable(state: DataGridState): DataGridContextValues {\n const tableContextValues = useTableContextValues_unstable(state);\n return {\n ...tableContextValues,\n dataGrid: {\n ...state.tableState,\n focusMode: state.focusMode,\n selectableRows: state.selectableRows,\n subtleSelection: state.subtleSelection,\n selectionAppearance: state.selectionAppearance,\n },\n };\n}\n"]}
@@ -6,7 +6,6 @@ export const dataGridClassNames = {
6
6
  /**
7
7
  * Apply styling to the DataGrid slots based on the state
8
8
  */
9
-
10
9
  export const useDataGridStyles_unstable = state => {
11
10
  useTableStyles_unstable(state);
12
11
  state.root.className = mergeClasses(dataGridClassNames.root, state.root.className);
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/DataGrid/useDataGridStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,QAA6B,gBAA7B;AAGA,SAAS,uBAAT,QAAwC,yBAAxC;AAEA,OAAO,MAAM,kBAAkB,GAAkC;EAC/D,IAAI,EAAE;AADyD,CAA1D;AAIP;;AAEG;;AACH,OAAO,MAAM,0BAA0B,GAAI,KAAD,IAAwC;EAChF,uBAAuB,CAAC,KAAD,CAAvB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,kBAAkB,CAAC,IAApB,EAA0B,KAAK,CAAC,IAAN,CAAW,SAArC,CAAnC;EAEA,OAAO,KAAP;AACD,CALM","sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport type { DataGridSlots, DataGridState } from './DataGrid.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { useTableStyles_unstable } from '../Table/useTableStyles';\n\nexport const dataGridClassNames: SlotClassNames<DataGridSlots> = {\n root: 'fui-DataGrid',\n};\n\n/**\n * Apply styling to the DataGrid slots based on the state\n */\nexport const useDataGridStyles_unstable = (state: DataGridState): DataGridState => {\n useTableStyles_unstable(state);\n state.root.className = mergeClasses(dataGridClassNames.root, state.root.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB;AAG7C,SAASC,uBAAuB,QAAQ,yBAAyB;AAEjE,OAAO,MAAMC,kBAAkB,GAAkC;EAC/DC,IAAI,EAAE;CACP;AAED;;;AAGA,OAAO,MAAMC,0BAA0B,GAAIC,KAAoB,IAAmB;EAChFJ,uBAAuB,CAACI,KAAK,CAAC;EAC9BA,KAAK,CAACF,IAAI,CAACG,SAAS,GAAGN,YAAY,CAACE,kBAAkB,CAACC,IAAI,EAAEE,KAAK,CAACF,IAAI,CAACG,SAAS,CAAC;EAElF,OAAOD,KAAK;AACd,CAAC","names":["mergeClasses","useTableStyles_unstable","dataGridClassNames","root","useDataGridStyles_unstable","state","className"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/DataGrid/useDataGridStyles.ts"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport type { DataGridSlots, DataGridState } from './DataGrid.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { useTableStyles_unstable } from '../Table/useTableStyles';\n\nexport const dataGridClassNames: SlotClassNames<DataGridSlots> = {\n root: 'fui-DataGrid',\n};\n\n/**\n * Apply styling to the DataGrid slots based on the state\n */\nexport const useDataGridStyles_unstable = (state: DataGridState): DataGridState => {\n useTableStyles_unstable(state);\n state.root.className = mergeClasses(dataGridClassNames.root, state.root.className);\n\n return state;\n};\n"]}
@@ -3,9 +3,8 @@ import { useDataGridBody_unstable } from './useDataGridBody';
3
3
  import { renderDataGridBody_unstable } from './renderDataGridBody';
4
4
  import { useDataGridBodyStyles_unstable } from './useDataGridBodyStyles';
5
5
  /**
6
- * DataGridBody component - TODO: add more docs
6
+ * DataGridBody component
7
7
  */
8
-
9
8
  export const DataGridBody = /*#__PURE__*/React.forwardRef((props, ref) => {
10
9
  const state = useDataGridBody_unstable(props, ref);
11
10
  useDataGridBodyStyles_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/DataGridBody/DataGridBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,wBAAT,QAAyC,mBAAzC;AACA,SAAS,2BAAT,QAA4C,sBAA5C;AACA,SAAS,8BAAT,QAA+C,yBAA/C;AAIA;;AAEG;;AACH,OAAO,MAAM,YAAY,gBAA2C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAClG,MAAM,KAAK,GAAG,wBAAwB,CAAC,KAAD,EAAQ,GAAR,CAAtC;EAEA,8BAA8B,CAAC,KAAD,CAA9B;EACA,OAAO,2BAA2B,CAAC,KAAD,CAAlC;AACD,CALmE,CAA7D;AAOP,YAAY,CAAC,WAAb,GAA2B,cAA3B","sourcesContent":["import * as React from 'react';\nimport { useDataGridBody_unstable } from './useDataGridBody';\nimport { renderDataGridBody_unstable } from './renderDataGridBody';\nimport { useDataGridBodyStyles_unstable } from './useDataGridBodyStyles';\nimport type { DataGridBodyProps } from './DataGridBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * DataGridBody component - TODO: add more docs\n */\nexport const DataGridBody: ForwardRefComponent<DataGridBodyProps> = React.forwardRef((props, ref) => {\n const state = useDataGridBody_unstable(props, ref);\n\n useDataGridBodyStyles_unstable(state);\n return renderDataGridBody_unstable(state);\n});\n\nDataGridBody.displayName = 'DataGridBody';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,wBAAwB,QAAQ,mBAAmB;AAC5D,SAASC,2BAA2B,QAAQ,sBAAsB;AAClE,SAASC,8BAA8B,QAAQ,yBAAyB;AAIxE;;;AAGA,OAAO,MAAMC,YAAY,gBAA2CJ,KAAK,CAACK,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAClG,MAAMC,KAAK,GAAGP,wBAAwB,CAACK,KAAK,EAAEC,GAAG,CAAC;EAElDJ,8BAA8B,CAACK,KAAK,CAAC;EACrC,OAAON,2BAA2B,CAACM,KAAK,CAAC;AAC3C,CAAC,CAAC;AAEFJ,YAAY,CAACK,WAAW,GAAG,cAAc","names":["React","useDataGridBody_unstable","renderDataGridBody_unstable","useDataGridBodyStyles_unstable","DataGridBody","forwardRef","props","ref","state","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/DataGridBody/DataGridBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridBody_unstable } from './useDataGridBody';\nimport { renderDataGridBody_unstable } from './renderDataGridBody';\nimport { useDataGridBodyStyles_unstable } from './useDataGridBodyStyles';\nimport type { DataGridBodyProps } from './DataGridBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * DataGridBody component\n */\nexport const DataGridBody: ForwardRefComponent<DataGridBodyProps> = React.forwardRef((props, ref) => {\n const state = useDataGridBody_unstable(props, ref);\n\n useDataGridBodyStyles_unstable(state);\n return renderDataGridBody_unstable(state);\n});\n\nDataGridBody.displayName = 'DataGridBody';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"DataGridBody.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/DataGridBody/DataGridBody.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport type { RowState } from '../../hooks';\nimport type { TableBodySlots, TableBodyProps, TableBodyState } from '../TableBody/TableBody.types';\n\nexport type DataGridBodySlots = TableBodySlots;\n\n// Use any here since we can't know the user types\n// The user is responsible for narrowing the type downstream\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type RowRenderFunction<TItem = any> = (row: RowState<TItem>) => React.ReactNode;\n\n/**\n * DataGridBody Props\n */\nexport type DataGridBodyProps = Omit<TableBodyProps, 'children'> & {\n /**\n * Render function for rows\n */\n children: RowRenderFunction;\n};\n\n/**\n * State used in rendering DataGridBody\n */\nexport type DataGridBodyState = TableBodyState;\n"]}
1
+ {"version":3,"file":"DataGridBody.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/DataGridBody/DataGridBody.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport type { RowState } from '../../hooks';\nimport type { TableBodySlots, TableBodyProps, TableBodyState } from '../TableBody/TableBody.types';\n\nexport type DataGridBodySlots = TableBodySlots;\n\n// Use any here since we can't know the user types\n// The user is responsible for narrowing the type downstream\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type RowRenderFunction<TItem = any> = (row: RowState<TItem>) => React.ReactNode;\n\n/**\n * DataGridBody Props\n */\nexport type DataGridBodyProps = Omit<TableBodyProps, 'children'> & {\n /**\n * Render function for rows\n */\n children: RowRenderFunction;\n};\n\n/**\n * State used in rendering DataGridBody\n */\nexport type DataGridBodyState = TableBodyState & {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n rows: RowState<any>[];\n\n renderRow: RowRenderFunction;\n};\n"]}
@@ -1,9 +1,19 @@
1
- import { renderTableBody_unstable } from '../TableBody/renderTableBody';
1
+ import * as React from 'react';
2
+ import { getSlots } from '@fluentui/react-utilities';
3
+ import { RowIdContextProvider } from '../../contexts/rowIdContext';
2
4
  /**
3
5
  * Render the final JSX of DataGridBody
4
6
  */
5
-
6
7
  export const renderDataGridBody_unstable = state => {
7
- return renderTableBody_unstable(state);
8
+ const {
9
+ slots,
10
+ slotProps
11
+ } = getSlots(state);
12
+ return /*#__PURE__*/React.createElement(slots.root, {
13
+ ...slotProps.root
14
+ }, state.rows.map(row => /*#__PURE__*/React.createElement(RowIdContextProvider, {
15
+ key: row.rowId,
16
+ value: row.rowId
17
+ }, state.renderRow(row))));
8
18
  };
9
19
  //# sourceMappingURL=renderDataGridBody.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/DataGridBody/renderDataGridBody.tsx"],"names":[],"mappings":"AACA,SAAS,wBAAT,QAAyC,8BAAzC;AAEA;;AAEG;;AACH,OAAO,MAAM,2BAA2B,GAAI,KAAD,IAA6B;EACtE,OAAO,wBAAwB,CAAC,KAAD,CAA/B;AACD,CAFM","sourcesContent":["import type { DataGridBodyState } from './DataGridBody.types';\nimport { renderTableBody_unstable } from '../TableBody/renderTableBody';\n\n/**\n * Render the final JSX of DataGridBody\n */\nexport const renderDataGridBody_unstable = (state: DataGridBodyState) => {\n return renderTableBody_unstable(state);\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAEpD,SAASC,oBAAoB,QAAQ,6BAA6B;AAElE;;;AAGA,OAAO,MAAMC,2BAA2B,GAAIC,KAAwB,IAAI;EACtE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGL,QAAQ,CAAoBG,KAAK,CAAC;EAE/D,oBACEJ,oBAACK,KAAK,CAACE,IAAI;IAAA,GAAKD,SAAS,CAACC;EAAI,GAC3BH,KAAK,CAACI,IAAI,CAACC,GAAG,CAACC,GAAG,iBACjBV,oBAACE,oBAAoB;IAACS,GAAG,EAAED,GAAG,CAACE,KAAK;IAAEC,KAAK,EAAEH,GAAG,CAACE;EAAK,GACnDR,KAAK,CAACU,SAAS,CAACJ,GAAG,CAAC,CAExB,CAAC,CACS;AAEjB,CAAC","names":["React","getSlots","RowIdContextProvider","renderDataGridBody_unstable","state","slots","slotProps","root","rows","map","row","key","rowId","value","renderRow"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/DataGridBody/renderDataGridBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { DataGridBodyState, DataGridBodySlots } from './DataGridBody.types';\nimport { RowIdContextProvider } from '../../contexts/rowIdContext';\n\n/**\n * Render the final JSX of DataGridBody\n */\nexport const renderDataGridBody_unstable = (state: DataGridBodyState) => {\n const { slots, slotProps } = getSlots<DataGridBodySlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {state.rows.map(row => (\n <RowIdContextProvider key={row.rowId} value={row.rowId}>\n {state.renderRow(row)}\n </RowIdContextProvider>\n ))}\n </slots.root>\n );\n};\n"]}