@fluentui/react-table 9.2.11 → 9.3.0

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 (555) hide show
  1. package/CHANGELOG.json +143 -1
  2. package/CHANGELOG.md +40 -2
  3. package/lib/DataGrid.js +0 -1
  4. package/lib/DataGrid.js.map +1 -1
  5. package/lib/DataGridBody.js +0 -1
  6. package/lib/DataGridBody.js.map +1 -1
  7. package/lib/DataGridCell.js +0 -1
  8. package/lib/DataGridCell.js.map +1 -1
  9. package/lib/DataGridHeader.js +0 -1
  10. package/lib/DataGridHeader.js.map +1 -1
  11. package/lib/DataGridHeaderCell.js +0 -1
  12. package/lib/DataGridHeaderCell.js.map +1 -1
  13. package/lib/DataGridRow.js +0 -1
  14. package/lib/DataGridRow.js.map +1 -1
  15. package/lib/DataGridSelectionCell.js +0 -1
  16. package/lib/DataGridSelectionCell.js.map +1 -1
  17. package/lib/Table.js +0 -1
  18. package/lib/Table.js.map +1 -1
  19. package/lib/TableBody.js +0 -1
  20. package/lib/TableBody.js.map +1 -1
  21. package/lib/TableCell.js +0 -1
  22. package/lib/TableCell.js.map +1 -1
  23. package/lib/TableCellActions.js +0 -1
  24. package/lib/TableCellActions.js.map +1 -1
  25. package/lib/TableCellLayout.js +0 -1
  26. package/lib/TableCellLayout.js.map +1 -1
  27. package/lib/TableCellPrimaryLayout.js +0 -1
  28. package/lib/TableCellPrimaryLayout.js.map +1 -1
  29. package/lib/TableHeader.js +0 -1
  30. package/lib/TableHeader.js.map +1 -1
  31. package/lib/TableHeaderCell.js +0 -1
  32. package/lib/TableHeaderCell.js.map +1 -1
  33. package/lib/TableResizeHandle.js +0 -1
  34. package/lib/TableResizeHandle.js.map +1 -1
  35. package/lib/TableRow.js +0 -1
  36. package/lib/TableRow.js.map +1 -1
  37. package/lib/TableSelectionCell.js +0 -1
  38. package/lib/TableSelectionCell.js.map +1 -1
  39. package/lib/components/DataGrid/DataGrid.js +5 -7
  40. package/lib/components/DataGrid/DataGrid.js.map +1 -1
  41. package/lib/components/DataGrid/DataGrid.types.js +0 -1
  42. package/lib/components/DataGrid/DataGrid.types.js.map +1 -1
  43. package/lib/components/DataGrid/index.js +0 -1
  44. package/lib/components/DataGrid/index.js.map +1 -1
  45. package/lib/components/DataGrid/renderDataGrid.js +4 -6
  46. package/lib/components/DataGrid/renderDataGrid.js.map +1 -1
  47. package/lib/components/DataGrid/useDataGrid.js +71 -89
  48. package/lib/components/DataGrid/useDataGrid.js.map +1 -1
  49. package/lib/components/DataGrid/useDataGridContextValues.js +12 -13
  50. package/lib/components/DataGrid/useDataGridContextValues.js.map +1 -1
  51. package/lib/components/DataGrid/useDataGridStyles.styles.js.map +1 -1
  52. package/lib/components/DataGridBody/DataGridBody.js +5 -7
  53. package/lib/components/DataGridBody/DataGridBody.js.map +1 -1
  54. package/lib/components/DataGridBody/DataGridBody.types.js +0 -1
  55. package/lib/components/DataGridBody/DataGridBody.types.js.map +1 -1
  56. package/lib/components/DataGridBody/index.js +0 -1
  57. package/lib/components/DataGridBody/index.js.map +1 -1
  58. package/lib/components/DataGridBody/renderDataGridBody.js +7 -12
  59. package/lib/components/DataGridBody/renderDataGridBody.js.map +1 -1
  60. package/lib/components/DataGridBody/useDataGridBody.js +15 -19
  61. package/lib/components/DataGridBody/useDataGridBody.js.map +1 -1
  62. package/lib/components/DataGridBody/useDataGridBodyStyles.styles.js.map +1 -1
  63. package/lib/components/DataGridCell/DataGridCell.js +5 -7
  64. package/lib/components/DataGridCell/DataGridCell.js.map +1 -1
  65. package/lib/components/DataGridCell/DataGridCell.types.js +1 -2
  66. package/lib/components/DataGridCell/DataGridCell.types.js.map +1 -1
  67. package/lib/components/DataGridCell/index.js +0 -1
  68. package/lib/components/DataGridCell/index.js.map +1 -1
  69. package/lib/components/DataGridCell/renderDataGridCell.js +2 -4
  70. package/lib/components/DataGridCell/renderDataGridCell.js.map +1 -1
  71. package/lib/components/DataGridCell/useDataGridCell.js +12 -14
  72. package/lib/components/DataGridCell/useDataGridCell.js.map +1 -1
  73. package/lib/components/DataGridCell/useDataGridCellStyles.styles.js.map +1 -1
  74. package/lib/components/DataGridHeader/DataGridHeader.js +5 -7
  75. package/lib/components/DataGridHeader/DataGridHeader.js.map +1 -1
  76. package/lib/components/DataGridHeader/DataGridHeader.types.js +1 -2
  77. package/lib/components/DataGridHeader/DataGridHeader.types.js.map +1 -1
  78. package/lib/components/DataGridHeader/index.js +0 -1
  79. package/lib/components/DataGridHeader/index.js.map +1 -1
  80. package/lib/components/DataGridHeader/renderDataGridHeader.js +2 -4
  81. package/lib/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
  82. package/lib/components/DataGridHeader/useDataGridHeader.js +5 -7
  83. package/lib/components/DataGridHeader/useDataGridHeader.js.map +1 -1
  84. package/lib/components/DataGridHeader/useDataGridHeaderStyles.styles.js.map +1 -1
  85. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js +5 -7
  86. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
  87. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.types.js +1 -2
  88. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -1
  89. package/lib/components/DataGridHeaderCell/index.js +0 -1
  90. package/lib/components/DataGridHeaderCell/index.js.map +1 -1
  91. package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js +2 -4
  92. package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
  93. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js +23 -26
  94. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
  95. package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.js.map +1 -1
  96. package/lib/components/DataGridRow/DataGridRow.js +5 -7
  97. package/lib/components/DataGridRow/DataGridRow.js.map +1 -1
  98. package/lib/components/DataGridRow/DataGridRow.types.js +0 -1
  99. package/lib/components/DataGridRow/DataGridRow.types.js.map +1 -1
  100. package/lib/components/DataGridRow/index.js +0 -1
  101. package/lib/components/DataGridRow/index.js.map +1 -1
  102. package/lib/components/DataGridRow/renderDataGridRow.js +7 -12
  103. package/lib/components/DataGridRow/renderDataGridRow.js.map +1 -1
  104. package/lib/components/DataGridRow/useDataGridRow.js +54 -56
  105. package/lib/components/DataGridRow/useDataGridRow.js.map +1 -1
  106. package/lib/components/DataGridRow/useDataGridRowStyles.styles.js.map +1 -1
  107. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js +5 -7
  108. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
  109. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.types.js +1 -2
  110. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -1
  111. package/lib/components/DataGridSelectionCell/index.js +0 -1
  112. package/lib/components/DataGridSelectionCell/index.js.map +1 -1
  113. package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js +2 -4
  114. package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
  115. package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js +31 -33
  116. package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
  117. package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.js.map +1 -1
  118. package/lib/components/Table/Table.js +5 -7
  119. package/lib/components/Table/Table.js.map +1 -1
  120. package/lib/components/Table/Table.types.js +1 -2
  121. package/lib/components/Table/Table.types.js.map +1 -1
  122. package/lib/components/Table/index.js +0 -1
  123. package/lib/components/Table/index.js.map +1 -1
  124. package/lib/components/Table/renderTable.js +6 -11
  125. package/lib/components/Table/renderTable.js.map +1 -1
  126. package/lib/components/Table/useTable.js +17 -19
  127. package/lib/components/Table/useTable.js.map +1 -1
  128. package/lib/components/Table/useTableContextValues.js +13 -14
  129. package/lib/components/Table/useTableContextValues.js.map +1 -1
  130. package/lib/components/Table/useTableStyles.styles.js.map +1 -1
  131. package/lib/components/TableBody/TableBody.js +5 -7
  132. package/lib/components/TableBody/TableBody.js.map +1 -1
  133. package/lib/components/TableBody/TableBody.types.js +1 -2
  134. package/lib/components/TableBody/TableBody.types.js.map +1 -1
  135. package/lib/components/TableBody/index.js +0 -1
  136. package/lib/components/TableBody/index.js.map +1 -1
  137. package/lib/components/TableBody/renderTableBody.js +4 -9
  138. package/lib/components/TableBody/renderTableBody.js.map +1 -1
  139. package/lib/components/TableBody/useTableBody.js +15 -19
  140. package/lib/components/TableBody/useTableBody.js.map +1 -1
  141. package/lib/components/TableBody/useTableBodyStyles.styles.js.map +1 -1
  142. package/lib/components/TableCell/TableCell.js +5 -7
  143. package/lib/components/TableCell/TableCell.js.map +1 -1
  144. package/lib/components/TableCell/TableCell.types.js +1 -2
  145. package/lib/components/TableCell/TableCell.types.js.map +1 -1
  146. package/lib/components/TableCell/index.js +0 -1
  147. package/lib/components/TableCell/index.js.map +1 -1
  148. package/lib/components/TableCell/renderTableCell.js +4 -9
  149. package/lib/components/TableCell/renderTableCell.js.map +1 -1
  150. package/lib/components/TableCell/useTableCell.js +16 -21
  151. package/lib/components/TableCell/useTableCell.js.map +1 -1
  152. package/lib/components/TableCell/useTableCellStyles.styles.js.map +1 -1
  153. package/lib/components/TableCellActions/TableCellActions.js +5 -7
  154. package/lib/components/TableCellActions/TableCellActions.js.map +1 -1
  155. package/lib/components/TableCellActions/TableCellActions.types.js +1 -2
  156. package/lib/components/TableCellActions/TableCellActions.types.js.map +1 -1
  157. package/lib/components/TableCellActions/index.js +0 -1
  158. package/lib/components/TableCellActions/index.js.map +1 -1
  159. package/lib/components/TableCellActions/renderTableCellActions.js +4 -9
  160. package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -1
  161. package/lib/components/TableCellActions/useTableCellActions.js +12 -14
  162. package/lib/components/TableCellActions/useTableCellActions.js.map +1 -1
  163. package/lib/components/TableCellActions/useTableCellActionsStyles.styles.js.map +1 -1
  164. package/lib/components/TableCellLayout/TableCellLayout.js +5 -7
  165. package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -1
  166. package/lib/components/TableCellLayout/TableCellLayout.types.js +1 -2
  167. package/lib/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
  168. package/lib/components/TableCellLayout/index.js +0 -1
  169. package/lib/components/TableCellLayout/index.js.map +1 -1
  170. package/lib/components/TableCellLayout/renderTableCellLayout.js +6 -11
  171. package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  172. package/lib/components/TableCellLayout/useTableCellLayout.js +30 -34
  173. package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  174. package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js +9 -10
  175. package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
  176. package/lib/components/TableCellLayout/useTableCellLayoutStyles.styles.js.map +1 -1
  177. package/lib/components/TableHeader/TableHeader.js +5 -7
  178. package/lib/components/TableHeader/TableHeader.js.map +1 -1
  179. package/lib/components/TableHeader/TableHeader.types.js +1 -2
  180. package/lib/components/TableHeader/TableHeader.types.js.map +1 -1
  181. package/lib/components/TableHeader/index.js +0 -1
  182. package/lib/components/TableHeader/index.js.map +1 -1
  183. package/lib/components/TableHeader/renderTableHeader.js +6 -11
  184. package/lib/components/TableHeader/renderTableHeader.js.map +1 -1
  185. package/lib/components/TableHeader/useTableHeader.js +15 -19
  186. package/lib/components/TableHeader/useTableHeader.js.map +1 -1
  187. package/lib/components/TableHeader/useTableHeaderStyles.styles.js.map +1 -1
  188. package/lib/components/TableHeaderCell/TableHeaderCell.js +5 -7
  189. package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  190. package/lib/components/TableHeaderCell/TableHeaderCell.types.js +1 -2
  191. package/lib/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
  192. package/lib/components/TableHeaderCell/index.js +0 -1
  193. package/lib/components/TableHeaderCell/index.js.map +1 -1
  194. package/lib/components/TableHeaderCell/renderTableHeaderCell.js +4 -9
  195. package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  196. package/lib/components/TableHeaderCell/useTableHeaderCell.js +46 -51
  197. package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  198. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.styles.js +10 -2
  199. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.styles.js.map +1 -1
  200. package/lib/components/TableResizeHandle/TableResizeHandle.js +5 -7
  201. package/lib/components/TableResizeHandle/TableResizeHandle.js.map +1 -1
  202. package/lib/components/TableResizeHandle/TableResizeHandle.types.js +1 -2
  203. package/lib/components/TableResizeHandle/TableResizeHandle.types.js.map +1 -1
  204. package/lib/components/TableResizeHandle/index.js +0 -1
  205. package/lib/components/TableResizeHandle/index.js.map +1 -1
  206. package/lib/components/TableResizeHandle/renderTableResizeHandle.js +4 -9
  207. package/lib/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -1
  208. package/lib/components/TableResizeHandle/useTableResizeHandle.js +16 -18
  209. package/lib/components/TableResizeHandle/useTableResizeHandle.js.map +1 -1
  210. package/lib/components/TableResizeHandle/useTableResizeHandleStyles.styles.js.map +1 -1
  211. package/lib/components/TableRow/TableRow.js +5 -7
  212. package/lib/components/TableRow/TableRow.js.map +1 -1
  213. package/lib/components/TableRow/TableRow.types.js +1 -2
  214. package/lib/components/TableRow/TableRow.types.js.map +1 -1
  215. package/lib/components/TableRow/index.js +0 -1
  216. package/lib/components/TableRow/index.js.map +1 -1
  217. package/lib/components/TableRow/renderTableRow.js +4 -9
  218. package/lib/components/TableRow/renderTableRow.js.map +1 -1
  219. package/lib/components/TableRow/useTableRow.js +22 -27
  220. package/lib/components/TableRow/useTableRow.js.map +1 -1
  221. package/lib/components/TableRow/useTableRowStyles.styles.js.map +1 -1
  222. package/lib/components/TableSelectionCell/TableSelectionCell.js +5 -7
  223. package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  224. package/lib/components/TableSelectionCell/TableSelectionCell.types.js +1 -2
  225. package/lib/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
  226. package/lib/components/TableSelectionCell/index.js +0 -1
  227. package/lib/components/TableSelectionCell/index.js.map +1 -1
  228. package/lib/components/TableSelectionCell/renderTableSelectionCell.js +4 -9
  229. package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  230. package/lib/components/TableSelectionCell/useTableSelectionCell.js +32 -41
  231. package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  232. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.styles.js.map +1 -1
  233. package/lib/contexts/columnIdContext.js +2 -3
  234. package/lib/contexts/columnIdContext.js.map +1 -1
  235. package/lib/contexts/dataGridContext.js +7 -8
  236. package/lib/contexts/dataGridContext.js.map +1 -1
  237. package/lib/contexts/rowIdContext.js +2 -3
  238. package/lib/contexts/rowIdContext.js.map +1 -1
  239. package/lib/contexts/tableContext.js +5 -6
  240. package/lib/contexts/tableContext.js.map +1 -1
  241. package/lib/contexts/tableHeaderContext.js +2 -3
  242. package/lib/contexts/tableHeaderContext.js.map +1 -1
  243. package/lib/hooks/createColumn.js +21 -28
  244. package/lib/hooks/createColumn.js.map +1 -1
  245. package/lib/hooks/index.js +0 -1
  246. package/lib/hooks/index.js.map +1 -1
  247. package/lib/hooks/selectionManager.js +71 -68
  248. package/lib/hooks/selectionManager.js.map +1 -1
  249. package/lib/hooks/types.js +0 -1
  250. package/lib/hooks/types.js.map +1 -1
  251. package/lib/hooks/useKeyboardResizing.js +96 -87
  252. package/lib/hooks/useKeyboardResizing.js.map +1 -1
  253. package/lib/hooks/useMeasureElement.js +42 -40
  254. package/lib/hooks/useMeasureElement.js.map +1 -1
  255. package/lib/hooks/useTableColumnResizeMouseHandler.js +64 -61
  256. package/lib/hooks/useTableColumnResizeMouseHandler.js.map +1 -1
  257. package/lib/hooks/useTableColumnResizeState.js +100 -105
  258. package/lib/hooks/useTableColumnResizeState.js.map +1 -1
  259. package/lib/hooks/useTableColumnSizing.js +74 -74
  260. package/lib/hooks/useTableColumnSizing.js.map +1 -1
  261. package/lib/hooks/useTableFeatures.js +30 -35
  262. package/lib/hooks/useTableFeatures.js.map +1 -1
  263. package/lib/hooks/useTableSelection.js +64 -66
  264. package/lib/hooks/useTableSelection.js.map +1 -1
  265. package/lib/hooks/useTableSort.js +68 -76
  266. package/lib/hooks/useTableSort.js.map +1 -1
  267. package/lib/index.js +0 -1
  268. package/lib/index.js.map +1 -1
  269. package/lib/utils/columnResizeUtils.js +104 -108
  270. package/lib/utils/columnResizeUtils.js.map +1 -1
  271. package/lib-commonjs/DataGrid.js +0 -3
  272. package/lib-commonjs/DataGrid.js.map +1 -1
  273. package/lib-commonjs/DataGridBody.js +0 -3
  274. package/lib-commonjs/DataGridBody.js.map +1 -1
  275. package/lib-commonjs/DataGridCell.js +0 -3
  276. package/lib-commonjs/DataGridCell.js.map +1 -1
  277. package/lib-commonjs/DataGridHeader.js +0 -3
  278. package/lib-commonjs/DataGridHeader.js.map +1 -1
  279. package/lib-commonjs/DataGridHeaderCell.js +0 -3
  280. package/lib-commonjs/DataGridHeaderCell.js.map +1 -1
  281. package/lib-commonjs/DataGridRow.js +0 -3
  282. package/lib-commonjs/DataGridRow.js.map +1 -1
  283. package/lib-commonjs/DataGridSelectionCell.js +0 -3
  284. package/lib-commonjs/DataGridSelectionCell.js.map +1 -1
  285. package/lib-commonjs/Table.js +0 -3
  286. package/lib-commonjs/Table.js.map +1 -1
  287. package/lib-commonjs/TableBody.js +0 -3
  288. package/lib-commonjs/TableBody.js.map +1 -1
  289. package/lib-commonjs/TableCell.js +0 -3
  290. package/lib-commonjs/TableCell.js.map +1 -1
  291. package/lib-commonjs/TableCellActions.js +0 -3
  292. package/lib-commonjs/TableCellActions.js.map +1 -1
  293. package/lib-commonjs/TableCellLayout.js +0 -3
  294. package/lib-commonjs/TableCellLayout.js.map +1 -1
  295. package/lib-commonjs/TableCellPrimaryLayout.js +0 -3
  296. package/lib-commonjs/TableCellPrimaryLayout.js.map +1 -1
  297. package/lib-commonjs/TableHeader.js +0 -3
  298. package/lib-commonjs/TableHeader.js.map +1 -1
  299. package/lib-commonjs/TableHeaderCell.js +0 -3
  300. package/lib-commonjs/TableHeaderCell.js.map +1 -1
  301. package/lib-commonjs/TableResizeHandle.js +0 -3
  302. package/lib-commonjs/TableResizeHandle.js.map +1 -1
  303. package/lib-commonjs/TableRow.js +0 -3
  304. package/lib-commonjs/TableRow.js.map +1 -1
  305. package/lib-commonjs/TableSelectionCell.js +0 -3
  306. package/lib-commonjs/TableSelectionCell.js.map +1 -1
  307. package/lib-commonjs/components/DataGrid/DataGrid.js +1 -3
  308. package/lib-commonjs/components/DataGrid/DataGrid.js.map +1 -1
  309. package/lib-commonjs/components/DataGrid/DataGrid.types.js +0 -3
  310. package/lib-commonjs/components/DataGrid/DataGrid.types.js.map +1 -1
  311. package/lib-commonjs/components/DataGrid/index.js +0 -3
  312. package/lib-commonjs/components/DataGrid/index.js.map +1 -1
  313. package/lib-commonjs/components/DataGrid/renderDataGrid.js +1 -3
  314. package/lib-commonjs/components/DataGrid/renderDataGrid.js.map +1 -1
  315. package/lib-commonjs/components/DataGrid/useDataGrid.js +1 -3
  316. package/lib-commonjs/components/DataGrid/useDataGrid.js.map +1 -1
  317. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js +1 -3
  318. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js.map +1 -1
  319. package/lib-commonjs/components/DataGrid/useDataGridStyles.styles.js +0 -2
  320. package/lib-commonjs/components/DataGrid/useDataGridStyles.styles.js.map +1 -1
  321. package/lib-commonjs/components/DataGridBody/DataGridBody.js +1 -3
  322. package/lib-commonjs/components/DataGridBody/DataGridBody.js.map +1 -1
  323. package/lib-commonjs/components/DataGridBody/DataGridBody.types.js +0 -3
  324. package/lib-commonjs/components/DataGridBody/DataGridBody.types.js.map +1 -1
  325. package/lib-commonjs/components/DataGridBody/index.js +0 -3
  326. package/lib-commonjs/components/DataGridBody/index.js.map +1 -1
  327. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js +1 -3
  328. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js.map +1 -1
  329. package/lib-commonjs/components/DataGridBody/useDataGridBody.js +1 -3
  330. package/lib-commonjs/components/DataGridBody/useDataGridBody.js.map +1 -1
  331. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.styles.js +0 -2
  332. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.styles.js.map +1 -1
  333. package/lib-commonjs/components/DataGridCell/DataGridCell.js +1 -3
  334. package/lib-commonjs/components/DataGridCell/DataGridCell.js.map +1 -1
  335. package/lib-commonjs/components/DataGridCell/DataGridCell.types.js +0 -3
  336. package/lib-commonjs/components/DataGridCell/DataGridCell.types.js.map +1 -1
  337. package/lib-commonjs/components/DataGridCell/index.js +0 -3
  338. package/lib-commonjs/components/DataGridCell/index.js.map +1 -1
  339. package/lib-commonjs/components/DataGridCell/renderDataGridCell.js +1 -3
  340. package/lib-commonjs/components/DataGridCell/renderDataGridCell.js.map +1 -1
  341. package/lib-commonjs/components/DataGridCell/useDataGridCell.js +1 -3
  342. package/lib-commonjs/components/DataGridCell/useDataGridCell.js.map +1 -1
  343. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.styles.js +0 -2
  344. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.styles.js.map +1 -1
  345. package/lib-commonjs/components/DataGridHeader/DataGridHeader.js +1 -3
  346. package/lib-commonjs/components/DataGridHeader/DataGridHeader.js.map +1 -1
  347. package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js +0 -3
  348. package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js.map +1 -1
  349. package/lib-commonjs/components/DataGridHeader/index.js +0 -3
  350. package/lib-commonjs/components/DataGridHeader/index.js.map +1 -1
  351. package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js +1 -3
  352. package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
  353. package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js +1 -3
  354. package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js.map +1 -1
  355. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.styles.js +0 -2
  356. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.styles.js.map +1 -1
  357. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js +1 -3
  358. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
  359. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js +0 -3
  360. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -1
  361. package/lib-commonjs/components/DataGridHeaderCell/index.js +0 -3
  362. package/lib-commonjs/components/DataGridHeaderCell/index.js.map +1 -1
  363. package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js +1 -3
  364. package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
  365. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js +2 -3
  366. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
  367. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.js +0 -2
  368. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.js.map +1 -1
  369. package/lib-commonjs/components/DataGridRow/DataGridRow.js +1 -3
  370. package/lib-commonjs/components/DataGridRow/DataGridRow.js.map +1 -1
  371. package/lib-commonjs/components/DataGridRow/DataGridRow.types.js +0 -3
  372. package/lib-commonjs/components/DataGridRow/DataGridRow.types.js.map +1 -1
  373. package/lib-commonjs/components/DataGridRow/index.js +0 -3
  374. package/lib-commonjs/components/DataGridRow/index.js.map +1 -1
  375. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js +1 -3
  376. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js.map +1 -1
  377. package/lib-commonjs/components/DataGridRow/useDataGridRow.js +1 -3
  378. package/lib-commonjs/components/DataGridRow/useDataGridRow.js.map +1 -1
  379. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.styles.js +0 -2
  380. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.styles.js.map +1 -1
  381. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js +1 -3
  382. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
  383. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js +0 -3
  384. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -1
  385. package/lib-commonjs/components/DataGridSelectionCell/index.js +0 -3
  386. package/lib-commonjs/components/DataGridSelectionCell/index.js.map +1 -1
  387. package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js +1 -3
  388. package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
  389. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js +1 -3
  390. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
  391. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.js +0 -2
  392. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.js.map +1 -1
  393. package/lib-commonjs/components/Table/Table.js +1 -3
  394. package/lib-commonjs/components/Table/Table.js.map +1 -1
  395. package/lib-commonjs/components/Table/Table.types.js +0 -3
  396. package/lib-commonjs/components/Table/Table.types.js.map +1 -1
  397. package/lib-commonjs/components/Table/index.js +0 -3
  398. package/lib-commonjs/components/Table/index.js.map +1 -1
  399. package/lib-commonjs/components/Table/renderTable.js +1 -3
  400. package/lib-commonjs/components/Table/renderTable.js.map +1 -1
  401. package/lib-commonjs/components/Table/useTable.js +1 -3
  402. package/lib-commonjs/components/Table/useTable.js.map +1 -1
  403. package/lib-commonjs/components/Table/useTableContextValues.js +1 -3
  404. package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -1
  405. package/lib-commonjs/components/Table/useTableStyles.styles.js +0 -2
  406. package/lib-commonjs/components/Table/useTableStyles.styles.js.map +1 -1
  407. package/lib-commonjs/components/TableBody/TableBody.js +1 -3
  408. package/lib-commonjs/components/TableBody/TableBody.js.map +1 -1
  409. package/lib-commonjs/components/TableBody/TableBody.types.js +0 -3
  410. package/lib-commonjs/components/TableBody/TableBody.types.js.map +1 -1
  411. package/lib-commonjs/components/TableBody/index.js +0 -3
  412. package/lib-commonjs/components/TableBody/index.js.map +1 -1
  413. package/lib-commonjs/components/TableBody/renderTableBody.js +1 -3
  414. package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -1
  415. package/lib-commonjs/components/TableBody/useTableBody.js +1 -3
  416. package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
  417. package/lib-commonjs/components/TableBody/useTableBodyStyles.styles.js +0 -2
  418. package/lib-commonjs/components/TableBody/useTableBodyStyles.styles.js.map +1 -1
  419. package/lib-commonjs/components/TableCell/TableCell.js +1 -3
  420. package/lib-commonjs/components/TableCell/TableCell.js.map +1 -1
  421. package/lib-commonjs/components/TableCell/TableCell.types.js +0 -3
  422. package/lib-commonjs/components/TableCell/TableCell.types.js.map +1 -1
  423. package/lib-commonjs/components/TableCell/index.js +0 -3
  424. package/lib-commonjs/components/TableCell/index.js.map +1 -1
  425. package/lib-commonjs/components/TableCell/renderTableCell.js +1 -3
  426. package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -1
  427. package/lib-commonjs/components/TableCell/useTableCell.js +1 -3
  428. package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
  429. package/lib-commonjs/components/TableCell/useTableCellStyles.styles.js +0 -2
  430. package/lib-commonjs/components/TableCell/useTableCellStyles.styles.js.map +1 -1
  431. package/lib-commonjs/components/TableCellActions/TableCellActions.js +1 -3
  432. package/lib-commonjs/components/TableCellActions/TableCellActions.js.map +1 -1
  433. package/lib-commonjs/components/TableCellActions/TableCellActions.types.js +0 -3
  434. package/lib-commonjs/components/TableCellActions/TableCellActions.types.js.map +1 -1
  435. package/lib-commonjs/components/TableCellActions/index.js +0 -3
  436. package/lib-commonjs/components/TableCellActions/index.js.map +1 -1
  437. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js +1 -3
  438. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -1
  439. package/lib-commonjs/components/TableCellActions/useTableCellActions.js +1 -3
  440. package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -1
  441. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.styles.js +0 -2
  442. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.styles.js.map +1 -1
  443. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js +1 -3
  444. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js.map +1 -1
  445. package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js +0 -3
  446. package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
  447. package/lib-commonjs/components/TableCellLayout/index.js +0 -3
  448. package/lib-commonjs/components/TableCellLayout/index.js.map +1 -1
  449. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js +1 -3
  450. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  451. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +1 -3
  452. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  453. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js +1 -3
  454. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
  455. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.styles.js +0 -2
  456. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.styles.js.map +1 -1
  457. package/lib-commonjs/components/TableHeader/TableHeader.js +1 -3
  458. package/lib-commonjs/components/TableHeader/TableHeader.js.map +1 -1
  459. package/lib-commonjs/components/TableHeader/TableHeader.types.js +0 -3
  460. package/lib-commonjs/components/TableHeader/TableHeader.types.js.map +1 -1
  461. package/lib-commonjs/components/TableHeader/index.js +0 -3
  462. package/lib-commonjs/components/TableHeader/index.js.map +1 -1
  463. package/lib-commonjs/components/TableHeader/renderTableHeader.js +1 -3
  464. package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -1
  465. package/lib-commonjs/components/TableHeader/useTableHeader.js +1 -3
  466. package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
  467. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.styles.js +0 -2
  468. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.styles.js.map +1 -1
  469. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js +1 -3
  470. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  471. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js +0 -3
  472. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
  473. package/lib-commonjs/components/TableHeaderCell/index.js +0 -3
  474. package/lib-commonjs/components/TableHeaderCell/index.js.map +1 -1
  475. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js +1 -3
  476. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  477. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +1 -3
  478. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  479. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.styles.js +27 -3
  480. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.styles.js.map +1 -1
  481. package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.js +1 -3
  482. package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.js.map +1 -1
  483. package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.types.js +0 -3
  484. package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.types.js.map +1 -1
  485. package/lib-commonjs/components/TableResizeHandle/index.js +0 -3
  486. package/lib-commonjs/components/TableResizeHandle/index.js.map +1 -1
  487. package/lib-commonjs/components/TableResizeHandle/renderTableResizeHandle.js +1 -3
  488. package/lib-commonjs/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -1
  489. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandle.js +1 -3
  490. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandle.js.map +1 -1
  491. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandleStyles.styles.js +0 -2
  492. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandleStyles.styles.js.map +1 -1
  493. package/lib-commonjs/components/TableRow/TableRow.js +1 -3
  494. package/lib-commonjs/components/TableRow/TableRow.js.map +1 -1
  495. package/lib-commonjs/components/TableRow/TableRow.types.js +0 -3
  496. package/lib-commonjs/components/TableRow/TableRow.types.js.map +1 -1
  497. package/lib-commonjs/components/TableRow/index.js +0 -3
  498. package/lib-commonjs/components/TableRow/index.js.map +1 -1
  499. package/lib-commonjs/components/TableRow/renderTableRow.js +1 -3
  500. package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -1
  501. package/lib-commonjs/components/TableRow/useTableRow.js +1 -3
  502. package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
  503. package/lib-commonjs/components/TableRow/useTableRowStyles.styles.js +0 -2
  504. package/lib-commonjs/components/TableRow/useTableRowStyles.styles.js.map +1 -1
  505. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js +1 -3
  506. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  507. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js +0 -3
  508. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
  509. package/lib-commonjs/components/TableSelectionCell/index.js +0 -3
  510. package/lib-commonjs/components/TableSelectionCell/index.js.map +1 -1
  511. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js +1 -3
  512. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  513. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js +1 -3
  514. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  515. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.styles.js +0 -2
  516. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.styles.js.map +1 -1
  517. package/lib-commonjs/contexts/columnIdContext.js +1 -3
  518. package/lib-commonjs/contexts/columnIdContext.js.map +1 -1
  519. package/lib-commonjs/contexts/dataGridContext.js +2 -4
  520. package/lib-commonjs/contexts/dataGridContext.js.map +1 -1
  521. package/lib-commonjs/contexts/rowIdContext.js +1 -3
  522. package/lib-commonjs/contexts/rowIdContext.js.map +1 -1
  523. package/lib-commonjs/contexts/tableContext.js +1 -3
  524. package/lib-commonjs/contexts/tableContext.js.map +1 -1
  525. package/lib-commonjs/contexts/tableHeaderContext.js +1 -3
  526. package/lib-commonjs/contexts/tableHeaderContext.js.map +1 -1
  527. package/lib-commonjs/hooks/createColumn.js +1 -3
  528. package/lib-commonjs/hooks/createColumn.js.map +1 -1
  529. package/lib-commonjs/hooks/index.js +0 -3
  530. package/lib-commonjs/hooks/index.js.map +1 -1
  531. package/lib-commonjs/hooks/selectionManager.js +1 -3
  532. package/lib-commonjs/hooks/selectionManager.js.map +1 -1
  533. package/lib-commonjs/hooks/types.js +0 -3
  534. package/lib-commonjs/hooks/types.js.map +1 -1
  535. package/lib-commonjs/hooks/useKeyboardResizing.js +17 -18
  536. package/lib-commonjs/hooks/useKeyboardResizing.js.map +1 -1
  537. package/lib-commonjs/hooks/useMeasureElement.js +1 -3
  538. package/lib-commonjs/hooks/useMeasureElement.js.map +1 -1
  539. package/lib-commonjs/hooks/useTableColumnResizeMouseHandler.js +1 -3
  540. package/lib-commonjs/hooks/useTableColumnResizeMouseHandler.js.map +1 -1
  541. package/lib-commonjs/hooks/useTableColumnResizeState.js +1 -3
  542. package/lib-commonjs/hooks/useTableColumnResizeState.js.map +1 -1
  543. package/lib-commonjs/hooks/useTableColumnSizing.js +10 -7
  544. package/lib-commonjs/hooks/useTableColumnSizing.js.map +1 -1
  545. package/lib-commonjs/hooks/useTableFeatures.js +1 -3
  546. package/lib-commonjs/hooks/useTableFeatures.js.map +1 -1
  547. package/lib-commonjs/hooks/useTableSelection.js +2 -4
  548. package/lib-commonjs/hooks/useTableSelection.js.map +1 -1
  549. package/lib-commonjs/hooks/useTableSort.js +1 -3
  550. package/lib-commonjs/hooks/useTableSort.js.map +1 -1
  551. package/lib-commonjs/index.js +0 -3
  552. package/lib-commonjs/index.js.map +1 -1
  553. package/lib-commonjs/utils/columnResizeUtils.js +1 -3
  554. package/lib-commonjs/utils/columnResizeUtils.js.map +1 -1
  555. package/package.json +11 -11
@@ -13,93 +13,75 @@ import { End, Home } from '@fluentui/keyboard-keys';
13
13
  *
14
14
  * @param props - props from this instance of DataGrid
15
15
  * @param ref - reference to root HTMLElement of DataGrid
16
- */
17
- export const useDataGrid_unstable = (props, ref) => {
18
- const {
19
- items,
20
- columns,
21
- focusMode = 'cell',
22
- selectionMode,
23
- onSortChange,
24
- onSelectionChange,
25
- defaultSortState,
26
- sortState,
27
- selectedItems,
28
- defaultSelectedItems,
29
- subtleSelection = false,
30
- selectionAppearance = 'brand',
31
- getRowId,
32
- resizableColumns,
33
- columnSizingOptions,
34
- onColumnResize
35
- } = props;
36
- const navigable = focusMode !== 'none';
37
- const keyboardNavAttr = useArrowNavigationGroup({
38
- axis: 'grid'
39
- });
40
- const tableState = useTableFeatures({
41
- items,
42
- columns,
43
- getRowId
44
- }, [useTableSort({
45
- defaultSortState,
46
- sortState,
47
- onSortChange
48
- }), useTableSelection({
49
- defaultSelectedItems,
50
- selectedItems,
51
- onSelectionChange,
52
- selectionMode: selectionMode !== null && selectionMode !== void 0 ? selectionMode : 'multiselect'
53
- }), useTableColumnSizing_unstable({
54
- onColumnResize,
55
- columnSizingOptions,
56
- // The selection cell is not part of the columns, therefore its width needs to be subtracted
57
- // from the container to make sure the columns don't overflow the table.
58
- containerWidthOffset: selectionMode ? -CELL_WIDTH : 0
59
- })]);
60
- const innerRef = React.useRef(null);
61
- const {
62
- findFirstFocusable,
63
- findLastFocusable
64
- } = useFocusFinders();
65
- const onKeyDown = useEventCallback(e => {
66
- var _props_onKeyDown;
67
- (_props_onKeyDown = props.onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(props, e);
68
- if (!innerRef.current || !e.ctrlKey || e.defaultPrevented) {
69
- return;
70
- }
71
- if (e.key === Home) {
72
- const firstRow = innerRef.current.querySelector('[role="row"]');
73
- if (firstRow) {
74
- var _findFirstFocusable;
75
- (_findFirstFocusable = findFirstFocusable(firstRow)) === null || _findFirstFocusable === void 0 ? void 0 : _findFirstFocusable.focus();
76
- }
77
- }
78
- if (e.key === End) {
79
- const rows = innerRef.current.querySelectorAll('[role="row"]');
80
- if (rows.length) {
81
- var _findLastFocusable;
82
- const lastRow = rows.item(rows.length - 1);
83
- (_findLastFocusable = findLastFocusable(lastRow)) === null || _findLastFocusable === void 0 ? void 0 : _findLastFocusable.focus();
84
- }
85
- }
86
- });
87
- const baseTableState = useTable_unstable({
88
- role: 'grid',
89
- as: 'div',
90
- noNativeElements: true,
91
- ...(navigable && keyboardNavAttr),
92
- ...props,
93
- onKeyDown
94
- }, useMergedRefs(ref, tableState.tableRef, innerRef));
95
- return {
96
- ...baseTableState,
97
- focusMode,
98
- tableState,
99
- selectableRows: !!selectionMode,
100
- subtleSelection,
101
- selectionAppearance,
102
- resizableColumns
103
- };
16
+ */ export const useDataGrid_unstable = (props, ref)=>{
17
+ const { items , columns , focusMode ='cell' , selectionMode , onSortChange , onSelectionChange , defaultSortState , sortState , selectedItems , defaultSelectedItems , subtleSelection =false , selectionAppearance ='brand' , getRowId , resizableColumns , columnSizingOptions , onColumnResize } = props;
18
+ const navigable = focusMode !== 'none';
19
+ const keyboardNavAttr = useArrowNavigationGroup({
20
+ axis: 'grid'
21
+ });
22
+ const tableState = useTableFeatures({
23
+ items,
24
+ columns,
25
+ getRowId
26
+ }, [
27
+ useTableSort({
28
+ defaultSortState,
29
+ sortState,
30
+ onSortChange
31
+ }),
32
+ useTableSelection({
33
+ defaultSelectedItems,
34
+ selectedItems,
35
+ onSelectionChange,
36
+ selectionMode: selectionMode !== null && selectionMode !== void 0 ? selectionMode : 'multiselect'
37
+ }),
38
+ useTableColumnSizing_unstable({
39
+ onColumnResize,
40
+ columnSizingOptions,
41
+ // The selection cell is not part of the columns, therefore its width needs to be subtracted
42
+ // from the container to make sure the columns don't overflow the table.
43
+ containerWidthOffset: selectionMode ? -CELL_WIDTH : 0
44
+ })
45
+ ]);
46
+ const innerRef = React.useRef(null);
47
+ const { findFirstFocusable , findLastFocusable } = useFocusFinders();
48
+ const onKeyDown = useEventCallback((e)=>{
49
+ var _props_onKeyDown;
50
+ (_props_onKeyDown = props.onKeyDown) === null || _props_onKeyDown === void 0 ? void 0 : _props_onKeyDown.call(props, e);
51
+ if (!innerRef.current || !e.ctrlKey || e.defaultPrevented) {
52
+ return;
53
+ }
54
+ if (e.key === Home) {
55
+ const firstRow = innerRef.current.querySelector('[role="row"]');
56
+ if (firstRow) {
57
+ var _findFirstFocusable;
58
+ (_findFirstFocusable = findFirstFocusable(firstRow)) === null || _findFirstFocusable === void 0 ? void 0 : _findFirstFocusable.focus();
59
+ }
60
+ }
61
+ if (e.key === End) {
62
+ const rows = innerRef.current.querySelectorAll('[role="row"]');
63
+ if (rows.length) {
64
+ var _findLastFocusable;
65
+ const lastRow = rows.item(rows.length - 1);
66
+ (_findLastFocusable = findLastFocusable(lastRow)) === null || _findLastFocusable === void 0 ? void 0 : _findLastFocusable.focus();
67
+ }
68
+ }
69
+ });
70
+ const baseTableState = useTable_unstable({
71
+ role: 'grid',
72
+ as: 'div',
73
+ noNativeElements: true,
74
+ ...navigable && keyboardNavAttr,
75
+ ...props,
76
+ onKeyDown
77
+ }, useMergedRefs(ref, tableState.tableRef, innerRef));
78
+ return {
79
+ ...baseTableState,
80
+ focusMode,
81
+ tableState,
82
+ selectableRows: !!selectionMode,
83
+ subtleSelection,
84
+ selectionAppearance,
85
+ resizableColumns
86
+ };
104
87
  };
105
- //# sourceMappingURL=useDataGrid.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useArrowNavigationGroup","useFocusFinders","useTable_unstable","useTableFeatures","useTableSort","useTableSelection","useTableColumnSizing_unstable","CELL_WIDTH","useEventCallback","useMergedRefs","End","Home","useDataGrid_unstable","props","ref","items","columns","focusMode","selectionMode","onSortChange","onSelectionChange","defaultSortState","sortState","selectedItems","defaultSelectedItems","subtleSelection","selectionAppearance","getRowId","resizableColumns","columnSizingOptions","onColumnResize","navigable","keyboardNavAttr","axis","tableState","containerWidthOffset","innerRef","useRef","findFirstFocusable","findLastFocusable","onKeyDown","e","_props_onKeyDown","call","current","ctrlKey","defaultPrevented","key","firstRow","querySelector","_findFirstFocusable","focus","rows","querySelectorAll","length","_findLastFocusable","lastRow","item","baseTableState","role","as","noNativeElements","tableRef","selectableRows"],"sources":["../../../src/components/DataGrid/useDataGrid.ts"],"sourcesContent":["import * as React from 'react';\nimport { useArrowNavigationGroup, useFocusFinders } from '@fluentui/react-tabster';\nimport type { DataGridProps, DataGridState } from './DataGrid.types';\nimport { useTable_unstable } from '../Table/useTable';\nimport { useTableFeatures, useTableSort, useTableSelection, useTableColumnSizing_unstable } from '../../hooks';\nimport { CELL_WIDTH } from '../TableSelectionCell';\nimport { useEventCallback, useMergedRefs } from '@fluentui/react-utilities';\nimport { End, Home } from '@fluentui/keyboard-keys';\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 resizableColumns,\n columnSizingOptions,\n onColumnResize,\n } = props;\n\n const navigable = focusMode !== 'none';\n const keyboardNavAttr = useArrowNavigationGroup({\n axis: 'grid',\n });\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 useTableColumnSizing_unstable({\n onColumnResize,\n columnSizingOptions,\n // The selection cell is not part of the columns, therefore its width needs to be subtracted\n // from the container to make sure the columns don't overflow the table.\n containerWidthOffset: selectionMode ? -CELL_WIDTH : 0,\n }),\n ]);\n\n const innerRef = React.useRef<HTMLDivElement>(null);\n const { findFirstFocusable, findLastFocusable } = useFocusFinders();\n const onKeyDown = useEventCallback((e: React.KeyboardEvent<HTMLTableElement>) => {\n props.onKeyDown?.(e);\n if (!innerRef.current || !e.ctrlKey || e.defaultPrevented) {\n return;\n }\n\n if (e.key === Home) {\n const firstRow = innerRef.current.querySelector('[role=\"row\"]') as HTMLElement | null;\n if (firstRow) {\n findFirstFocusable(firstRow)?.focus();\n }\n }\n\n if (e.key === End) {\n const rows = innerRef.current.querySelectorAll('[role=\"row\"]');\n if (rows.length) {\n const lastRow = rows.item(rows.length - 1);\n findLastFocusable(lastRow as HTMLElement)?.focus();\n }\n }\n });\n\n const baseTableState = useTable_unstable(\n {\n role: 'grid',\n as: 'div',\n noNativeElements: true,\n ...(navigable && keyboardNavAttr),\n ...props,\n onKeyDown,\n },\n useMergedRefs(ref, tableState.tableRef, innerRef),\n );\n\n return {\n ...baseTableState,\n focusMode,\n tableState,\n selectableRows: !!selectionMode,\n subtleSelection,\n selectionAppearance,\n resizableColumns,\n };\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,uBAAuB,EAAEC,eAAe,QAAQ;AAEzD,SAASC,iBAAiB,QAAQ;AAClC,SAASC,gBAAgB,EAAEC,YAAY,EAAEC,iBAAiB,EAAEC,6BAA6B,QAAQ;AACjG,SAASC,UAAU,QAAQ;AAC3B,SAASC,gBAAgB,EAAEC,aAAa,QAAQ;AAChD,SAASC,GAAG,EAAEC,IAAI,QAAQ;AAE1B;;;;;;;;;AASA,OAAO,MAAMC,oBAAA,GAAuBA,CAACC,KAAA,EAAsBC,GAAA,KAA+C;EACxG,MAAM;IACJC,KAAA;IACAC,OAAA;IACAC,SAAA,GAAY;IACZC,aAAA;IACAC,YAAA;IACAC,iBAAA;IACAC,gBAAA;IACAC,SAAA;IACAC,aAAA;IACAC,oBAAA;IACAC,eAAA,GAAkB,KAAK;IACvBC,mBAAA,GAAsB;IACtBC,QAAA;IACAC,gBAAA;IACAC,mBAAA;IACAC;EAAc,CACf,GAAGjB,KAAA;EAEJ,MAAMkB,SAAA,GAAYd,SAAA,KAAc;EAChC,MAAMe,eAAA,GAAkBhC,uBAAA,CAAwB;IAC9CiC,IAAA,EAAM;EACR;EAEA,MAAMC,UAAA,GAAa/B,gBAAA,CAAiB;IAAEY,KAAA;IAAOC,OAAA;IAASW;EAAS,GAAG,CAChEvB,YAAA,CAAa;IACXiB,gBAAA;IACAC,SAAA;IACAH;EACF,IACAd,iBAAA,CAAkB;IAChBmB,oBAAA;IACAD,aAAA;IACAH,iBAAA;IACAF,aAAA,EAAeA,aAAA,aAAAA,aAAA,cAAAA,aAAA,GAAiB;EAClC,IACAZ,6BAAA,CAA8B;IAC5BwB,cAAA;IACAD,mBAAA;IACA;IACA;IACAM,oBAAA,EAAsBjB,aAAA,GAAgB,CAACX,UAAA,GAAa;EACtD,GACD;EAED,MAAM6B,QAAA,GAAWrC,KAAA,CAAMsC,MAAM,CAAiB,IAAI;EAClD,MAAM;IAAEC,kBAAA;IAAoBC;EAAiB,CAAE,GAAGtC,eAAA;EAClD,MAAMuC,SAAA,GAAYhC,gBAAA,CAAkBiC,CAAA,IAA6C;QAC/EC,gBAAA;IAAA,CAAAA,gBAAA,GAAA7B,KAAA,CAAM2B,SAAS,cAAfE,gBAAA,uBAAAA,gBAAA,CAAAC,IAAA,CAAA9B,KAAA,EAAkB4B,CAAA;IAClB,IAAI,CAACL,QAAA,CAASQ,OAAO,IAAI,CAACH,CAAA,CAAEI,OAAO,IAAIJ,CAAA,CAAEK,gBAAgB,EAAE;MACzD;IACF;IAEA,IAAIL,CAAA,CAAEM,GAAG,KAAKpC,IAAA,EAAM;MAClB,MAAMqC,QAAA,GAAWZ,QAAA,CAASQ,OAAO,CAACK,aAAa,CAAC;MAChD,IAAID,QAAA,EAAU;YACZE,mBAAA;QAAA,CAAAA,mBAAA,GAAAZ,kBAAA,CAAmBU,QAAA,eAAnBE,mBAAA,uBAAAA,mBAAA,CAA8BC,KAAA;MAChC;IACF;IAEA,IAAIV,CAAA,CAAEM,GAAG,KAAKrC,GAAA,EAAK;MACjB,MAAM0C,IAAA,GAAOhB,QAAA,CAASQ,OAAO,CAACS,gBAAgB,CAAC;MAC/C,IAAID,IAAA,CAAKE,MAAM,EAAE;YAEfC,kBAAA;QADA,MAAMC,OAAA,GAAUJ,IAAA,CAAKK,IAAI,CAACL,IAAA,CAAKE,MAAM,GAAG;QACxC,CAAAC,kBAAA,GAAAhB,iBAAA,CAAkBiB,OAAA,eAAlBD,kBAAA,uBAAAA,kBAAA,CAA2CJ,KAAA;MAC7C;IACF;EACF;EAEA,MAAMO,cAAA,GAAiBxD,iBAAA,CACrB;IACEyD,IAAA,EAAM;IACNC,EAAA,EAAI;IACJC,gBAAA,EAAkB,IAAI;IACtB,IAAI9B,SAAA,IAAaC,eAAe;IAChC,GAAGnB,KAAK;IACR2B;EACF,GACA/B,aAAA,CAAcK,GAAA,EAAKoB,UAAA,CAAW4B,QAAQ,EAAE1B,QAAA;EAG1C,OAAO;IACL,GAAGsB,cAAc;IACjBzC,SAAA;IACAiB,UAAA;IACA6B,cAAA,EAAgB,CAAC,CAAC7C,aAAA;IAClBO,eAAA;IACAC,mBAAA;IACAE;EACF;AACF"}
1
+ {"version":3,"sources":["useDataGrid.ts"],"sourcesContent":["import * as React from 'react';\nimport { useArrowNavigationGroup, useFocusFinders } from '@fluentui/react-tabster';\nimport type { DataGridProps, DataGridState } from './DataGrid.types';\nimport { useTable_unstable } from '../Table/useTable';\nimport { useTableFeatures, useTableSort, useTableSelection, useTableColumnSizing_unstable } from '../../hooks';\nimport { CELL_WIDTH } from '../TableSelectionCell';\nimport { useEventCallback, useMergedRefs } from '@fluentui/react-utilities';\nimport { End, Home } from '@fluentui/keyboard-keys';\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 resizableColumns,\n columnSizingOptions,\n onColumnResize,\n } = props;\n\n const navigable = focusMode !== 'none';\n const keyboardNavAttr = useArrowNavigationGroup({\n axis: 'grid',\n });\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 useTableColumnSizing_unstable({\n onColumnResize,\n columnSizingOptions,\n // The selection cell is not part of the columns, therefore its width needs to be subtracted\n // from the container to make sure the columns don't overflow the table.\n containerWidthOffset: selectionMode ? -CELL_WIDTH : 0,\n }),\n ]);\n\n const innerRef = React.useRef<HTMLDivElement>(null);\n const { findFirstFocusable, findLastFocusable } = useFocusFinders();\n const onKeyDown = useEventCallback((e: React.KeyboardEvent<HTMLTableElement>) => {\n props.onKeyDown?.(e);\n if (!innerRef.current || !e.ctrlKey || e.defaultPrevented) {\n return;\n }\n\n if (e.key === Home) {\n const firstRow = innerRef.current.querySelector('[role=\"row\"]') as HTMLElement | null;\n if (firstRow) {\n findFirstFocusable(firstRow)?.focus();\n }\n }\n\n if (e.key === End) {\n const rows = innerRef.current.querySelectorAll('[role=\"row\"]');\n if (rows.length) {\n const lastRow = rows.item(rows.length - 1);\n findLastFocusable(lastRow as HTMLElement)?.focus();\n }\n }\n });\n\n const baseTableState = useTable_unstable(\n {\n role: 'grid',\n as: 'div',\n noNativeElements: true,\n ...(navigable && keyboardNavAttr),\n ...props,\n onKeyDown,\n },\n useMergedRefs(ref, tableState.tableRef, innerRef),\n );\n\n return {\n ...baseTableState,\n focusMode,\n tableState,\n selectableRows: !!selectionMode,\n subtleSelection,\n selectionAppearance,\n resizableColumns,\n };\n};\n"],"names":["React","useArrowNavigationGroup","useFocusFinders","useTable_unstable","useTableFeatures","useTableSort","useTableSelection","useTableColumnSizing_unstable","CELL_WIDTH","useEventCallback","useMergedRefs","End","Home","useDataGrid_unstable","props","ref","items","columns","focusMode","selectionMode","onSortChange","onSelectionChange","defaultSortState","sortState","selectedItems","defaultSelectedItems","subtleSelection","selectionAppearance","getRowId","resizableColumns","columnSizingOptions","onColumnResize","navigable","keyboardNavAttr","axis","tableState","containerWidthOffset","innerRef","useRef","findFirstFocusable","findLastFocusable","onKeyDown","e","current","ctrlKey","defaultPrevented","key","firstRow","querySelector","focus","rows","querySelectorAll","length","lastRow","item","baseTableState","role","as","noNativeElements","tableRef","selectableRows"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,uBAAuB,EAAEC,eAAe,QAAQ,0BAA0B;AAEnF,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD,SAASC,gBAAgB,EAAEC,YAAY,EAAEC,iBAAiB,EAAEC,6BAA6B,QAAQ,cAAc;AAC/G,SAASC,UAAU,QAAQ,wBAAwB;AACnD,SAASC,gBAAgB,EAAEC,aAAa,QAAQ,4BAA4B;AAC5E,SAASC,GAAG,EAAEC,IAAI,QAAQ,0BAA0B;AAEpD;;;;;;;;CAQC,GACD,OAAO,MAAMC,uBAAuB,CAACC,OAAsBC,MAA+C;IACxG,MAAM,EACJC,MAAK,EACLC,QAAO,EACPC,WAAY,OAAM,EAClBC,cAAa,EACbC,aAAY,EACZC,kBAAiB,EACjBC,iBAAgB,EAChBC,UAAS,EACTC,cAAa,EACbC,qBAAoB,EACpBC,iBAAkB,KAAK,CAAA,EACvBC,qBAAsB,QAAO,EAC7BC,SAAQ,EACRC,iBAAgB,EAChBC,oBAAmB,EACnBC,eAAc,EACf,GAAGjB;IAEJ,MAAMkB,YAAYd,cAAc;IAChC,MAAMe,kBAAkBhC,wBAAwB;QAC9CiC,MAAM;IACR;IAEA,MAAMC,aAAa/B,iBAAiB;QAAEY;QAAOC;QAASW;IAAS,GAAG;QAChEvB,aAAa;YACXiB;YACAC;YACAH;QACF;QACAd,kBAAkB;YAChBmB;YACAD;YACAH;YACAF,eAAeA,0BAAAA,2BAAAA,gBAAiB,aAAa;QAC/C;QACAZ,8BAA8B;YAC5BwB;YACAD;YACA,4FAA4F;YAC5F,wEAAwE;YACxEM,sBAAsBjB,gBAAgB,CAACX,aAAa,CAAC;QACvD;KACD;IAED,MAAM6B,WAAWrC,MAAMsC,MAAM,CAAiB,IAAI;IAClD,MAAM,EAAEC,mBAAkB,EAAEC,kBAAiB,EAAE,GAAGtC;IAClD,MAAMuC,YAAYhC,iBAAiB,CAACiC,IAA6C;YAC/E5B;QAAAA,CAAAA,mBAAAA,MAAM2B,SAAS,cAAf3B,8BAAAA,KAAAA,IAAAA,iBAAAA,KAAAA,OAAkB4B;QAClB,IAAI,CAACL,SAASM,OAAO,IAAI,CAACD,EAAEE,OAAO,IAAIF,EAAEG,gBAAgB,EAAE;YACzD;QACF,CAAC;QAED,IAAIH,EAAEI,GAAG,KAAKlC,MAAM;YAClB,MAAMmC,WAAWV,SAASM,OAAO,CAACK,aAAa,CAAC;YAChD,IAAID,UAAU;oBACZR;gBAAAA,CAAAA,sBAAAA,mBAAmBQ,uBAAnBR,iCAAAA,KAAAA,IAAAA,oBAA8BU;YAChC,CAAC;QACH,CAAC;QAED,IAAIP,EAAEI,GAAG,KAAKnC,KAAK;YACjB,MAAMuC,OAAOb,SAASM,OAAO,CAACQ,gBAAgB,CAAC;YAC/C,IAAID,KAAKE,MAAM,EAAE;oBAEfZ;gBADA,MAAMa,UAAUH,KAAKI,IAAI,CAACJ,KAAKE,MAAM,GAAG;gBACxCZ,CAAAA,qBAAAA,kBAAkBa,sBAAlBb,gCAAAA,KAAAA,IAAAA,mBAA2CS;YAC7C,CAAC;QACH,CAAC;IACH;IAEA,MAAMM,iBAAiBpD,kBACrB;QACEqD,MAAM;QACNC,IAAI;QACJC,kBAAkB,IAAI;QACtB,GAAI1B,aAAaC,eAAe;QAChC,GAAGnB,KAAK;QACR2B;IACF,GACA/B,cAAcK,KAAKoB,WAAWwB,QAAQ,EAAEtB;IAG1C,OAAO;QACL,GAAGkB,cAAc;QACjBrC;QACAiB;QACAyB,gBAAgB,CAAC,CAACzC;QAClBO;QACAC;QACAE;IACF;AACF,EAAE"}
@@ -1,16 +1,15 @@
1
1
  import { useTableContextValues_unstable } from '../Table/useTableContextValues';
2
2
  export function useDataGridContextValues_unstable(state) {
3
- const tableContextValues = useTableContextValues_unstable(state);
4
- return {
5
- ...tableContextValues,
6
- dataGrid: {
7
- ...state.tableState,
8
- focusMode: state.focusMode,
9
- selectableRows: state.selectableRows,
10
- subtleSelection: state.subtleSelection,
11
- selectionAppearance: state.selectionAppearance,
12
- resizableColumns: state.resizableColumns
13
- }
14
- };
3
+ const tableContextValues = useTableContextValues_unstable(state);
4
+ return {
5
+ ...tableContextValues,
6
+ dataGrid: {
7
+ ...state.tableState,
8
+ focusMode: state.focusMode,
9
+ selectableRows: state.selectableRows,
10
+ subtleSelection: state.subtleSelection,
11
+ selectionAppearance: state.selectionAppearance,
12
+ resizableColumns: state.resizableColumns
13
+ }
14
+ };
15
15
  }
16
- //# sourceMappingURL=useDataGridContextValues.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useTableContextValues_unstable","useDataGridContextValues_unstable","state","tableContextValues","dataGrid","tableState","focusMode","selectableRows","subtleSelection","selectionAppearance","resizableColumns"],"sources":["../../../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 resizableColumns: state.resizableColumns,\n },\n };\n}\n"],"mappings":"AAAA,SAASA,8BAA8B,QAAQ;AAG/C,OAAO,SAASC,kCAAkCC,KAAoB,EAAyB;EAC7F,MAAMC,kBAAA,GAAqBH,8BAAA,CAA+BE,KAAA;EAC1D,OAAO;IACL,GAAGC,kBAAkB;IACrBC,QAAA,EAAU;MACR,GAAGF,KAAA,CAAMG,UAAU;MACnBC,SAAA,EAAWJ,KAAA,CAAMI,SAAS;MAC1BC,cAAA,EAAgBL,KAAA,CAAMK,cAAc;MACpCC,eAAA,EAAiBN,KAAA,CAAMM,eAAe;MACtCC,mBAAA,EAAqBP,KAAA,CAAMO,mBAAmB;MAC9CC,gBAAA,EAAkBR,KAAA,CAAMQ;IAC1B;EACF;AACF"}
1
+ {"version":3,"sources":["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 resizableColumns: state.resizableColumns,\n },\n };\n}\n"],"names":["useTableContextValues_unstable","useDataGridContextValues_unstable","state","tableContextValues","dataGrid","tableState","focusMode","selectableRows","subtleSelection","selectionAppearance","resizableColumns"],"mappings":"AAAA,SAASA,8BAA8B,QAAQ,iCAAiC;AAGhF,OAAO,SAASC,kCAAkCC,KAAoB,EAAyB;IAC7F,MAAMC,qBAAqBH,+BAA+BE;IAC1D,OAAO;QACL,GAAGC,kBAAkB;QACrBC,UAAU;YACR,GAAGF,MAAMG,UAAU;YACnBC,WAAWJ,MAAMI,SAAS;YAC1BC,gBAAgBL,MAAMK,cAAc;YACpCC,iBAAiBN,MAAMM,eAAe;YACtCC,qBAAqBP,MAAMO,mBAAmB;YAC9CC,kBAAkBR,MAAMQ,gBAAgB;QAC1C;IACF;AACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["mergeClasses","useTableStyles_unstable","dataGridClassNames","root","useDataGridStyles_unstable","state","className"],"sources":["../../../src/components/DataGrid/useDataGridStyles.styles.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.styles';\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"],"mappings":"AAAA,SAASA,YAAY,QAAQ;AAG7B,SAASC,uBAAuB,QAAQ;AAExC,OAAO,MAAMC,kBAAA,GAAoD;EAC/DC,IAAA,EAAM;AACR;AAEA;;;AAGA,OAAO,MAAMC,0BAAA,GAA8BC,KAAA,IAAwC;EACjFJ,uBAAA,CAAwBI,KAAA;EACxBA,KAAA,CAAMF,IAAI,CAACG,SAAS,GAAGN,YAAA,CAAaE,kBAAA,CAAmBC,IAAI,EAAEE,KAAA,CAAMF,IAAI,CAACG,SAAS;EAEjF,OAAOD,KAAA;AACT"}
1
+ {"version":3,"names":["mergeClasses","useTableStyles_unstable","dataGridClassNames","root","useDataGridStyles_unstable","state","className"],"sources":["useDataGridStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useTableStyles_unstable } from '../Table/useTableStyles.styles';\nexport const dataGridClassNames = {\n root: 'fui-DataGrid'\n};\n/**\n * Apply styling to the DataGrid slots based on the state\n */ export const useDataGridStyles_unstable = (state)=>{\n useTableStyles_unstable(state);\n state.root.className = mergeClasses(dataGridClassNames.root, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,uBAAuB,QAAQ,gCAAgC;AACxE,OAAO,MAAMC,kBAAkB,GAAG;EAC9BC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,OAAO,MAAMC,0BAA0B,GAAIC,KAAK,IAAG;EACnDJ,uBAAuB,CAACI,KAAK,CAAC;EAC9BA,KAAK,CAACF,IAAI,CAACG,SAAS,GAAGN,YAAY,CAACE,kBAAkB,CAACC,IAAI,EAAEE,KAAK,CAACF,IAAI,CAACG,SAAS,CAAC;EAClF,OAAOD,KAAK;AAChB,CAAC"}
@@ -5,12 +5,10 @@ import { useDataGridBodyStyles_unstable } from './useDataGridBodyStyles.styles';
5
5
  import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
6
6
  /**
7
7
  * DataGridBody component
8
- */
9
- export const DataGridBody = /*#__PURE__*/React.forwardRef((props, ref) => {
10
- const state = useDataGridBody_unstable(props, ref);
11
- useDataGridBodyStyles_unstable(state);
12
- useCustomStyleHook_unstable('useDataGridBodyStyles_unstable')(state);
13
- return renderDataGridBody_unstable(state);
8
+ */ export const DataGridBody = /*#__PURE__*/ React.forwardRef((props, ref)=>{
9
+ const state = useDataGridBody_unstable(props, ref);
10
+ useDataGridBodyStyles_unstable(state);
11
+ useCustomStyleHook_unstable('useDataGridBodyStyles_unstable')(state);
12
+ return renderDataGridBody_unstable(state);
14
13
  });
15
14
  DataGridBody.displayName = 'DataGridBody';
16
- //# sourceMappingURL=DataGridBody.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useDataGridBody_unstable","renderDataGridBody_unstable","useDataGridBodyStyles_unstable","useCustomStyleHook_unstable","DataGridBody","forwardRef","props","ref","state","displayName"],"sources":["../../../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.styles';\nimport type { DataGridBodyProps } from './DataGridBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridBody component\n */\nexport const DataGridBody: ForwardRefComponent<DataGridBodyProps> &\n (<TItem>(props: DataGridBodyProps<TItem>) => JSX.Element) = React.forwardRef((props, ref) => {\n const state = useDataGridBody_unstable(props, ref);\n\n useDataGridBodyStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridBodyStyles_unstable')(state);\n\n return renderDataGridBody_unstable(state);\n}) as ForwardRefComponent<DataGridBodyProps> & (<TItem>(props: DataGridBodyProps<TItem>) => JSX.Element);\n\nDataGridBody.displayName = 'DataGridBody';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,wBAAwB,QAAQ;AACzC,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,8BAA8B,QAAQ;AAG/C,SAASC,2BAA2B,QAAQ;AAE5C;;;AAGA,OAAO,MAAMC,YAAA,gBACiDL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EAC7F,MAAMC,KAAA,GAAQR,wBAAA,CAAyBM,KAAA,EAAOC,GAAA;EAE9CL,8BAAA,CAA+BM,KAAA;EAE/BL,2BAAA,CAA4B,kCAAkCK,KAAA;EAE9D,OAAOP,2BAAA,CAA4BO,KAAA;AACrC;AAEAJ,YAAA,CAAaK,WAAW,GAAG"}
1
+ {"version":3,"sources":["DataGridBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridBody_unstable } from './useDataGridBody';\nimport { renderDataGridBody_unstable } from './renderDataGridBody';\nimport { useDataGridBodyStyles_unstable } from './useDataGridBodyStyles.styles';\nimport type { DataGridBodyProps } from './DataGridBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridBody component\n */\nexport const DataGridBody: ForwardRefComponent<DataGridBodyProps> &\n (<TItem>(props: DataGridBodyProps<TItem>) => JSX.Element) = React.forwardRef((props, ref) => {\n const state = useDataGridBody_unstable(props, ref);\n\n useDataGridBodyStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridBodyStyles_unstable')(state);\n\n return renderDataGridBody_unstable(state);\n}) as ForwardRefComponent<DataGridBodyProps> & (<TItem>(props: DataGridBodyProps<TItem>) => JSX.Element);\n\nDataGridBody.displayName = 'DataGridBody';\n"],"names":["React","useDataGridBody_unstable","renderDataGridBody_unstable","useDataGridBodyStyles_unstable","useCustomStyleHook_unstable","DataGridBody","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,8BAA8B,QAAQ,iCAAiC;AAGhF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,6BACiDL,MAAMM,UAAU,CAAC,CAACC,OAAOC,MAAQ;IAC7F,MAAMC,QAAQR,yBAAyBM,OAAOC;IAE9CL,+BAA+BM;IAE/BL,4BAA4B,kCAAkCK;IAE9D,OAAOP,4BAA4BO;AACrC,GAAyG;AAEzGJ,aAAaK,WAAW,GAAG"}
@@ -1,2 +1 @@
1
1
  import * as React from 'react';
2
- //# sourceMappingURL=DataGridBody.types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React"],"sources":["../../../src/components/DataGridBody/DataGridBody.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { TableRowData } from '../../hooks';\nimport type { TableBodySlots, TableBodyProps, TableBodyState } from '../TableBody/TableBody.types';\n\nexport type DataGridBodySlots = TableBodySlots;\n\nexport type RowRenderFunction<TItem = unknown> = (row: TableRowData<TItem>, ...rest: unknown[]) => React.ReactNode;\n\n/**\n * DataGridBody Props\n */\nexport type DataGridBodyProps<TItem = unknown> = Omit<TableBodyProps, 'children'> & {\n /**\n * Render function for rows\n */\n children: RowRenderFunction<TItem>;\n};\n\n/**\n * State used in rendering DataGridBody\n */\nexport type DataGridBodyState = TableBodyState & {\n rows: TableRowData<unknown>[];\n\n renderRow: RowRenderFunction;\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW"}
1
+ {"version":3,"sources":["DataGridBody.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { TableRowData } from '../../hooks';\nimport type { TableBodySlots, TableBodyProps, TableBodyState } from '../TableBody/TableBody.types';\n\nexport type DataGridBodySlots = TableBodySlots;\n\nexport type RowRenderFunction<TItem = unknown> = (row: TableRowData<TItem>, ...rest: unknown[]) => React.ReactNode;\n\n/**\n * DataGridBody Props\n */\nexport type DataGridBodyProps<TItem = unknown> = Omit<TableBodyProps, 'children'> & {\n /**\n * Render function for rows\n */\n children: RowRenderFunction<TItem>;\n};\n\n/**\n * State used in rendering DataGridBody\n */\nexport type DataGridBodyState = TableBodyState & {\n rows: TableRowData<unknown>[];\n\n renderRow: RowRenderFunction;\n};\n"],"names":["React"],"mappings":"AAAA,YAAYA,WAAW,QAAQ"}
@@ -3,4 +3,3 @@ export * from './DataGridBody.types';
3
3
  export * from './renderDataGridBody';
4
4
  export * from './useDataGridBody';
5
5
  export * from './useDataGridBodyStyles.styles';
6
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/DataGridBody/index.ts"],"sourcesContent":["export * from './DataGridBody';\nexport * from './DataGridBody.types';\nexport * from './renderDataGridBody';\nexport * from './useDataGridBody';\nexport * from './useDataGridBodyStyles.styles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './DataGridBody';\nexport * from './DataGridBody.types';\nexport * from './renderDataGridBody';\nexport * from './useDataGridBody';\nexport * from './useDataGridBodyStyles.styles';\n"],"names":[],"mappings":"AAAA,cAAc,iBAAiB;AAC/B,cAAc,uBAAuB;AACrC,cAAc,uBAAuB;AACrC,cAAc,oBAAoB;AAClC,cAAc,iCAAiC"}
@@ -1,17 +1,12 @@
1
- /** @jsxRuntime classic */ /** @jsx createElement */import { createElement } from '@fluentui/react-jsx-runtime';
1
+ /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
2
2
  import { getSlotsNext } from '@fluentui/react-utilities';
3
3
  import { TableRowIdContextProvider } from '../../contexts/rowIdContext';
4
4
  /**
5
5
  * Render the final JSX of DataGridBody
6
- */
7
- export const renderDataGridBody_unstable = state => {
8
- const {
9
- slots,
10
- slotProps
11
- } = getSlotsNext(state);
12
- return /*#__PURE__*/createElement(slots.root, slotProps.root, state.rows.map(row => /*#__PURE__*/createElement(TableRowIdContextProvider, {
13
- key: row.rowId,
14
- value: row.rowId
15
- }, state.renderRow(row))));
6
+ */ export const renderDataGridBody_unstable = (state)=>{
7
+ const { slots , slotProps } = getSlotsNext(state);
8
+ return /*#__PURE__*/ createElement(slots.root, slotProps.root, state.rows.map((row)=>/*#__PURE__*/ createElement(TableRowIdContextProvider, {
9
+ key: row.rowId,
10
+ value: row.rowId
11
+ }, state.renderRow(row))));
16
12
  };
17
- //# sourceMappingURL=renderDataGridBody.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createElement","getSlotsNext","TableRowIdContextProvider","renderDataGridBody_unstable","state","slots","slotProps","root","rows","map","row","key","rowId","value","renderRow"],"sources":["../../../src/components/DataGridBody/renderDataGridBody.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport type { DataGridBodyState, DataGridBodySlots } from './DataGridBody.types';\nimport { TableRowIdContextProvider } from '../../contexts/rowIdContext';\n\n/**\n * Render the final JSX of DataGridBody\n */\nexport const renderDataGridBody_unstable = (state: DataGridBodyState) => {\n const { slots, slotProps } = getSlotsNext<DataGridBodySlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {state.rows.map(row => (\n <TableRowIdContextProvider key={row.rowId} value={row.rowId}>\n {state.renderRow(row)}\n </TableRowIdContextProvider>\n ))}\n </slots.root>\n );\n};\n"],"mappings":"AAAA,2BACA,yBAEA,SAASA,aAAa,QAAQ;AAC9B,SAASC,YAAY,QAAQ;AAE7B,SAASC,yBAAyB,QAAQ;AAE1C;;;AAGA,OAAO,MAAMC,2BAAA,GAA+BC,KAAA,IAA6B;EACvE,MAAM;IAAEC,KAAA;IAAOC;EAAS,CAAE,GAAGL,YAAA,CAAgCG,KAAA;EAE7D,oBACEJ,aAdJ,CAcKK,KAAA,CAAME,IAAI,EAAKD,SAAA,CAAUC,IAAI,EAC3BH,KAAA,CAAMI,IAAI,CAACC,GAAG,CAACC,GAAA,iBACdV,aAhBR,CAgBSE,yBAAA;IAA0BS,GAAA,EAAKD,GAAA,CAAIE,KAAK;IAAEC,KAAA,EAAOH,GAAA,CAAIE;KACnDR,KAAA,CAAMU,SAAS,CAACJ,GAAA;AAK3B"}
1
+ {"version":3,"sources":["renderDataGridBody.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport type { DataGridBodyState, DataGridBodySlots } from './DataGridBody.types';\nimport { TableRowIdContextProvider } from '../../contexts/rowIdContext';\n\n/**\n * Render the final JSX of DataGridBody\n */\nexport const renderDataGridBody_unstable = (state: DataGridBodyState) => {\n const { slots, slotProps } = getSlotsNext<DataGridBodySlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {state.rows.map(row => (\n <TableRowIdContextProvider key={row.rowId} value={row.rowId}>\n {state.renderRow(row)}\n </TableRowIdContextProvider>\n ))}\n </slots.root>\n );\n};\n"],"names":["createElement","getSlotsNext","TableRowIdContextProvider","renderDataGridBody_unstable","state","slots","slotProps","root","rows","map","row","key","rowId","value","renderRow"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,YAAY,QAAQ,4BAA4B;AAEzD,SAASC,yBAAyB,QAAQ,8BAA8B;AAExE;;CAEC,GACD,OAAO,MAAMC,8BAA8B,CAACC,QAA6B;IACvE,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGL,aAAgCG;IAE7D,qBACE,AAdJ,cAcKC,MAAME,IAAI,EAAKD,UAAUC,IAAI,EAC3BH,MAAMI,IAAI,CAACC,GAAG,CAACC,CAAAA,oBACd,AAhBR,cAgBSR;YAA0BS,KAAKD,IAAIE,KAAK;YAAEC,OAAOH,IAAIE,KAAK;WACxDR,MAAMU,SAAS,CAACJ;AAK3B,EAAE"}
@@ -10,23 +10,19 @@ import { useTableContext } from '../../contexts/tableContext';
10
10
  *
11
11
  * @param props - props from this instance of DataGridBody
12
12
  * @param ref - reference to root HTMLElement of DataGridBody
13
- */
14
- export const useDataGridBody_unstable = (props, ref) => {
15
- const {
16
- sortable
17
- } = useTableContext();
18
- const getRows = useDataGridContext_unstable(ctx => ctx.getRows);
19
- const sort = useDataGridContext_unstable(ctx => ctx.sort.sort);
20
- const rows = sortable ? sort(getRows()) : getRows();
21
- const baseState = useTableBody_unstable({
22
- ...props,
23
- children: null,
24
- as: 'div'
25
- }, ref);
26
- return {
27
- ...baseState,
28
- rows,
29
- renderRow: props.children
30
- };
13
+ */ export const useDataGridBody_unstable = (props, ref)=>{
14
+ const { sortable } = useTableContext();
15
+ const getRows = useDataGridContext_unstable((ctx)=>ctx.getRows);
16
+ const sort = useDataGridContext_unstable((ctx)=>ctx.sort.sort);
17
+ const rows = sortable ? sort(getRows()) : getRows();
18
+ const baseState = useTableBody_unstable({
19
+ ...props,
20
+ children: null,
21
+ as: 'div'
22
+ }, ref);
23
+ return {
24
+ ...baseState,
25
+ rows,
26
+ renderRow: props.children
27
+ };
31
28
  };
32
- //# sourceMappingURL=useDataGridBody.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useTableBody_unstable","useDataGridContext_unstable","useTableContext","useDataGridBody_unstable","props","ref","sortable","getRows","ctx","sort","rows","baseState","children","as","renderRow"],"sources":["../../../src/components/DataGridBody/useDataGridBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { DataGridBodyProps, DataGridBodyState } from './DataGridBody.types';\nimport { useTableBody_unstable } from '../TableBody/useTableBody';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render DataGridBody.\n *\n * The returned state can be modified with hooks such as useDataGridBodyStyles_unstable,\n * before being passed to renderDataGridBody_unstable.\n *\n * @param props - props from this instance of DataGridBody\n * @param ref - reference to root HTMLElement of DataGridBody\n */\nexport const useDataGridBody_unstable = (props: DataGridBodyProps, ref: React.Ref<HTMLElement>): DataGridBodyState => {\n const { sortable } = useTableContext();\n const getRows = useDataGridContext_unstable(ctx => ctx.getRows);\n const sort = useDataGridContext_unstable(ctx => ctx.sort.sort);\n const rows = sortable ? sort(getRows()) : getRows();\n\n const baseState = useTableBody_unstable({ ...props, children: null, as: 'div' }, ref);\n return {\n ...baseState,\n rows,\n renderRow: props.children,\n };\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AAEvB,SAASC,qBAAqB,QAAQ;AACtC,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,eAAe,QAAQ;AAEhC;;;;;;;;;AASA,OAAO,MAAMC,wBAAA,GAA2BA,CAACC,KAAA,EAA0BC,GAAA,KAAmD;EACpH,MAAM;IAAEC;EAAQ,CAAE,GAAGJ,eAAA;EACrB,MAAMK,OAAA,GAAUN,2BAAA,CAA4BO,GAAA,IAAOA,GAAA,CAAID,OAAO;EAC9D,MAAME,IAAA,GAAOR,2BAAA,CAA4BO,GAAA,IAAOA,GAAA,CAAIC,IAAI,CAACA,IAAI;EAC7D,MAAMC,IAAA,GAAOJ,QAAA,GAAWG,IAAA,CAAKF,OAAA,MAAaA,OAAA,EAAS;EAEnD,MAAMI,SAAA,GAAYX,qBAAA,CAAsB;IAAE,GAAGI,KAAK;IAAEQ,QAAA,EAAU,IAAI;IAAEC,EAAA,EAAI;EAAM,GAAGR,GAAA;EACjF,OAAO;IACL,GAAGM,SAAS;IACZD,IAAA;IACAI,SAAA,EAAWV,KAAA,CAAMQ;EACnB;AACF"}
1
+ {"version":3,"sources":["useDataGridBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { DataGridBodyProps, DataGridBodyState } from './DataGridBody.types';\nimport { useTableBody_unstable } from '../TableBody/useTableBody';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render DataGridBody.\n *\n * The returned state can be modified with hooks such as useDataGridBodyStyles_unstable,\n * before being passed to renderDataGridBody_unstable.\n *\n * @param props - props from this instance of DataGridBody\n * @param ref - reference to root HTMLElement of DataGridBody\n */\nexport const useDataGridBody_unstable = (props: DataGridBodyProps, ref: React.Ref<HTMLElement>): DataGridBodyState => {\n const { sortable } = useTableContext();\n const getRows = useDataGridContext_unstable(ctx => ctx.getRows);\n const sort = useDataGridContext_unstable(ctx => ctx.sort.sort);\n const rows = sortable ? sort(getRows()) : getRows();\n\n const baseState = useTableBody_unstable({ ...props, children: null, as: 'div' }, ref);\n return {\n ...baseState,\n rows,\n renderRow: props.children,\n };\n};\n"],"names":["React","useTableBody_unstable","useDataGridContext_unstable","useTableContext","useDataGridBody_unstable","props","ref","sortable","getRows","ctx","sort","rows","baseState","children","as","renderRow"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,qBAAqB,QAAQ,4BAA4B;AAClE,SAASC,2BAA2B,QAAQ,iCAAiC;AAC7E,SAASC,eAAe,QAAQ,8BAA8B;AAE9D;;;;;;;;CAQC,GACD,OAAO,MAAMC,2BAA2B,CAACC,OAA0BC,MAAmD;IACpH,MAAM,EAAEC,SAAQ,EAAE,GAAGJ;IACrB,MAAMK,UAAUN,4BAA4BO,CAAAA,MAAOA,IAAID,OAAO;IAC9D,MAAME,OAAOR,4BAA4BO,CAAAA,MAAOA,IAAIC,IAAI,CAACA,IAAI;IAC7D,MAAMC,OAAOJ,WAAWG,KAAKF,aAAaA,SAAS;IAEnD,MAAMI,YAAYX,sBAAsB;QAAE,GAAGI,KAAK;QAAEQ,UAAU,IAAI;QAAEC,IAAI;IAAM,GAAGR;IACjF,OAAO;QACL,GAAGM,SAAS;QACZD;QACAI,WAAWV,MAAMQ,QAAQ;IAC3B;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"names":["mergeClasses","useTableBodyStyles_unstable","dataGridBodyClassNames","root","useDataGridBodyStyles_unstable","state","className"],"sources":["../../../src/components/DataGridBody/useDataGridBodyStyles.styles.ts"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport type { DataGridBodySlots, DataGridBodyState } from './DataGridBody.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { useTableBodyStyles_unstable } from '../TableBody/useTableBodyStyles.styles';\n\nexport const dataGridBodyClassNames: SlotClassNames<DataGridBodySlots> = {\n root: 'fui-DataGridBody',\n};\n\n/**\n * Apply styling to the DataGridBody slots based on the state\n */\nexport const useDataGridBodyStyles_unstable = (state: DataGridBodyState): DataGridBodyState => {\n useTableBodyStyles_unstable(state);\n state.root.className = mergeClasses(dataGridBodyClassNames.root, state.root.className);\n\n return state;\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ;AAG7B,SAASC,2BAA2B,QAAQ;AAE5C,OAAO,MAAMC,sBAAA,GAA4D;EACvEC,IAAA,EAAM;AACR;AAEA;;;AAGA,OAAO,MAAMC,8BAAA,GAAkCC,KAAA,IAAgD;EAC7FJ,2BAAA,CAA4BI,KAAA;EAC5BA,KAAA,CAAMF,IAAI,CAACG,SAAS,GAAGN,YAAA,CAAaE,sBAAA,CAAuBC,IAAI,EAAEE,KAAA,CAAMF,IAAI,CAACG,SAAS;EAErF,OAAOD,KAAA;AACT"}
1
+ {"version":3,"names":["mergeClasses","useTableBodyStyles_unstable","dataGridBodyClassNames","root","useDataGridBodyStyles_unstable","state","className"],"sources":["useDataGridBodyStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useTableBodyStyles_unstable } from '../TableBody/useTableBodyStyles.styles';\nexport const dataGridBodyClassNames = {\n root: 'fui-DataGridBody'\n};\n/**\n * Apply styling to the DataGridBody slots based on the state\n */ export const useDataGridBodyStyles_unstable = (state)=>{\n useTableBodyStyles_unstable(state);\n state.root.className = mergeClasses(dataGridBodyClassNames.root, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,2BAA2B,QAAQ,wCAAwC;AACpF,OAAO,MAAMC,sBAAsB,GAAG;EAClCC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,OAAO,MAAMC,8BAA8B,GAAIC,KAAK,IAAG;EACvDJ,2BAA2B,CAACI,KAAK,CAAC;EAClCA,KAAK,CAACF,IAAI,CAACG,SAAS,GAAGN,YAAY,CAACE,sBAAsB,CAACC,IAAI,EAAEE,KAAK,CAACF,IAAI,CAACG,SAAS,CAAC;EACtF,OAAOD,KAAK;AAChB,CAAC"}
@@ -5,12 +5,10 @@ import { useDataGridCellStyles_unstable } from './useDataGridCellStyles.styles';
5
5
  import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
6
6
  /**
7
7
  * DataGridCell component
8
- */
9
- export const DataGridCell = /*#__PURE__*/React.forwardRef((props, ref) => {
10
- const state = useDataGridCell_unstable(props, ref);
11
- useDataGridCellStyles_unstable(state);
12
- useCustomStyleHook_unstable('useDataGridCellStyles_unstable')(state);
13
- return renderDataGridCell_unstable(state);
8
+ */ export const DataGridCell = /*#__PURE__*/ React.forwardRef((props, ref)=>{
9
+ const state = useDataGridCell_unstable(props, ref);
10
+ useDataGridCellStyles_unstable(state);
11
+ useCustomStyleHook_unstable('useDataGridCellStyles_unstable')(state);
12
+ return renderDataGridCell_unstable(state);
14
13
  });
15
14
  DataGridCell.displayName = 'DataGridCell';
16
- //# sourceMappingURL=DataGridCell.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useDataGridCell_unstable","renderDataGridCell_unstable","useDataGridCellStyles_unstable","useCustomStyleHook_unstable","DataGridCell","forwardRef","props","ref","state","displayName"],"sources":["../../../src/components/DataGridCell/DataGridCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridCell_unstable } from './useDataGridCell';\nimport { renderDataGridCell_unstable } from './renderDataGridCell';\nimport { useDataGridCellStyles_unstable } from './useDataGridCellStyles.styles';\nimport type { DataGridCellProps } from './DataGridCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridCell component\n */\nexport const DataGridCell: ForwardRefComponent<DataGridCellProps> = React.forwardRef((props, ref) => {\n const state = useDataGridCell_unstable(props, ref);\n\n useDataGridCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridCellStyles_unstable')(state);\n\n return renderDataGridCell_unstable(state);\n});\n\nDataGridCell.displayName = 'DataGridCell';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,wBAAwB,QAAQ;AACzC,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,8BAA8B,QAAQ;AAG/C,SAASC,2BAA2B,QAAQ;AAE5C;;;AAGA,OAAO,MAAMC,YAAA,gBAAuDL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EACnG,MAAMC,KAAA,GAAQR,wBAAA,CAAyBM,KAAA,EAAOC,GAAA;EAE9CL,8BAAA,CAA+BM,KAAA;EAE/BL,2BAAA,CAA4B,kCAAkCK,KAAA;EAE9D,OAAOP,2BAAA,CAA4BO,KAAA;AACrC;AAEAJ,YAAA,CAAaK,WAAW,GAAG"}
1
+ {"version":3,"sources":["DataGridCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useDataGridCell_unstable } from './useDataGridCell';\nimport { renderDataGridCell_unstable } from './renderDataGridCell';\nimport { useDataGridCellStyles_unstable } from './useDataGridCellStyles.styles';\nimport type { DataGridCellProps } from './DataGridCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * DataGridCell component\n */\nexport const DataGridCell: ForwardRefComponent<DataGridCellProps> = React.forwardRef((props, ref) => {\n const state = useDataGridCell_unstable(props, ref);\n\n useDataGridCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useDataGridCellStyles_unstable')(state);\n\n return renderDataGridCell_unstable(state);\n});\n\nDataGridCell.displayName = 'DataGridCell';\n"],"names":["React","useDataGridCell_unstable","renderDataGridCell_unstable","useDataGridCellStyles_unstable","useCustomStyleHook_unstable","DataGridCell","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,uBAAuB;AACnE,SAASC,8BAA8B,QAAQ,iCAAiC;AAGhF,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,6BAAuDL,MAAMM,UAAU,CAAC,CAACC,OAAOC,MAAQ;IACnG,MAAMC,QAAQR,yBAAyBM,OAAOC;IAE9CL,+BAA+BM;IAE/BL,4BAA4B,kCAAkCK;IAE9D,OAAOP,4BAA4BO;AACrC,GAAG;AAEHJ,aAAaK,WAAW,GAAG"}
@@ -1,2 +1 @@
1
- export {};
2
- //# sourceMappingURL=DataGridCell.types.js.map
1
+ export { };
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/DataGridCell/DataGridCell.types.ts"],"sourcesContent":["import { TableCellProps, TableCellSlots, TableCellState } from '../TableCell/TableCell.types';\n\nexport type DataGridCellSlots = TableCellSlots;\n\n/**\n * DataGridCell Props\n */\nexport type DataGridCellProps = TableCellProps;\n\n/**\n * State used in rendering DataGridCell\n */\nexport type DataGridCellState = TableCellState;\n"],"mappings":"AAAA"}
1
+ {"version":3,"sources":["DataGridCell.types.ts"],"sourcesContent":["import { TableCellProps, TableCellSlots, TableCellState } from '../TableCell/TableCell.types';\n\nexport type DataGridCellSlots = TableCellSlots;\n\n/**\n * DataGridCell Props\n */\nexport type DataGridCellProps = TableCellProps;\n\n/**\n * State used in rendering DataGridCell\n */\nexport type DataGridCellState = TableCellState;\n"],"names":[],"mappings":"AAAA,WAY+C"}
@@ -3,4 +3,3 @@ export * from './DataGridCell.types';
3
3
  export * from './renderDataGridCell';
4
4
  export * from './useDataGridCell';
5
5
  export * from './useDataGridCellStyles.styles';
6
- //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/DataGridCell/index.ts"],"sourcesContent":["export * from './DataGridCell';\nexport * from './DataGridCell.types';\nexport * from './renderDataGridCell';\nexport * from './useDataGridCell';\nexport * from './useDataGridCellStyles.styles';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './DataGridCell';\nexport * from './DataGridCell.types';\nexport * from './renderDataGridCell';\nexport * from './useDataGridCell';\nexport * from './useDataGridCellStyles.styles';\n"],"names":[],"mappings":"AAAA,cAAc,iBAAiB;AAC/B,cAAc,uBAAuB;AACrC,cAAc,uBAAuB;AACrC,cAAc,oBAAoB;AAClC,cAAc,iCAAiC"}
@@ -1,8 +1,6 @@
1
1
  import { renderTableCell_unstable } from '../TableCell/renderTableCell';
2
2
  /**
3
3
  * Render the final JSX of DataGridCell
4
- */
5
- export const renderDataGridCell_unstable = state => {
6
- return renderTableCell_unstable(state);
4
+ */ export const renderDataGridCell_unstable = (state)=>{
5
+ return renderTableCell_unstable(state);
7
6
  };
8
- //# sourceMappingURL=renderDataGridCell.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["renderTableCell_unstable","renderDataGridCell_unstable","state"],"sources":["../../../src/components/DataGridCell/renderDataGridCell.tsx"],"sourcesContent":["import type { DataGridCellState } from './DataGridCell.types';\nimport { renderTableCell_unstable } from '../TableCell/renderTableCell';\n\n/**\n * Render the final JSX of DataGridCell\n */\nexport const renderDataGridCell_unstable = (state: DataGridCellState) => {\n return renderTableCell_unstable(state);\n};\n"],"mappings":"AACA,SAASA,wBAAwB,QAAQ;AAEzC;;;AAGA,OAAO,MAAMC,2BAAA,GAA+BC,KAAA,IAA6B;EACvE,OAAOF,wBAAA,CAAyBE,KAAA;AAClC"}
1
+ {"version":3,"sources":["renderDataGridCell.tsx"],"sourcesContent":["import type { DataGridCellState } from './DataGridCell.types';\nimport { renderTableCell_unstable } from '../TableCell/renderTableCell';\n\n/**\n * Render the final JSX of DataGridCell\n */\nexport const renderDataGridCell_unstable = (state: DataGridCellState) => {\n return renderTableCell_unstable(state);\n};\n"],"names":["renderTableCell_unstable","renderDataGridCell_unstable","state"],"mappings":"AACA,SAASA,wBAAwB,QAAQ,+BAA+B;AAExE;;CAEC,GACD,OAAO,MAAMC,8BAA8B,CAACC,QAA6B;IACvE,OAAOF,yBAAyBE;AAClC,EAAE"}
@@ -10,18 +10,16 @@ import { useColumnIdContext } from '../../contexts/columnIdContext';
10
10
  *
11
11
  * @param props - props from this instance of DataGridCell
12
12
  * @param ref - reference to root HTMLElement of DataGridCell
13
- */
14
- export const useDataGridCell_unstable = (props, ref) => {
15
- const columnId = useColumnIdContext();
16
- const tabbable = useDataGridContext_unstable(ctx => ctx.focusMode === 'cell');
17
- const resizableColumns = useDataGridContext_unstable(ctx => ctx.resizableColumns);
18
- const columnSizing = useDataGridContext_unstable(ctx => ctx.columnSizing_unstable);
19
- return useTableCell_unstable({
20
- as: 'div',
21
- role: 'gridcell',
22
- tabIndex: tabbable ? 0 : undefined,
23
- ...(resizableColumns ? columnSizing.getTableCellProps(columnId) : {}),
24
- ...props
25
- }, ref);
13
+ */ export const useDataGridCell_unstable = (props, ref)=>{
14
+ const columnId = useColumnIdContext();
15
+ const tabbable = useDataGridContext_unstable((ctx)=>ctx.focusMode === 'cell');
16
+ const resizableColumns = useDataGridContext_unstable((ctx)=>ctx.resizableColumns);
17
+ const columnSizing = useDataGridContext_unstable((ctx)=>ctx.columnSizing_unstable);
18
+ return useTableCell_unstable({
19
+ as: 'div',
20
+ role: 'gridcell',
21
+ tabIndex: tabbable ? 0 : undefined,
22
+ ...resizableColumns ? columnSizing.getTableCellProps(columnId) : {},
23
+ ...props
24
+ }, ref);
26
25
  };
27
- //# sourceMappingURL=useDataGridCell.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useTableCell_unstable","useDataGridContext_unstable","useColumnIdContext","useDataGridCell_unstable","props","ref","columnId","tabbable","ctx","focusMode","resizableColumns","columnSizing","columnSizing_unstable","as","role","tabIndex","undefined","getTableCellProps"],"sources":["../../../src/components/DataGridCell/useDataGridCell.ts"],"sourcesContent":["import * as React from 'react';\nimport type { DataGridCellProps, DataGridCellState } from './DataGridCell.types';\nimport { useTableCell_unstable } from '../TableCell/useTableCell';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useColumnIdContext } from '../../contexts/columnIdContext';\n\n/**\n * Create the state required to render DataGridCell.\n *\n * The returned state can be modified with hooks such as useDataGridCellStyles_unstable,\n * before being passed to renderDataGridCell_unstable.\n *\n * @param props - props from this instance of DataGridCell\n * @param ref - reference to root HTMLElement of DataGridCell\n */\nexport const useDataGridCell_unstable = (props: DataGridCellProps, ref: React.Ref<HTMLElement>): DataGridCellState => {\n const columnId = useColumnIdContext();\n const tabbable = useDataGridContext_unstable(ctx => ctx.focusMode === 'cell');\n const resizableColumns = useDataGridContext_unstable(ctx => ctx.resizableColumns);\n const columnSizing = useDataGridContext_unstable(ctx => ctx.columnSizing_unstable);\n return useTableCell_unstable(\n {\n as: 'div',\n role: 'gridcell',\n tabIndex: tabbable ? 0 : undefined,\n ...(resizableColumns ? columnSizing.getTableCellProps(columnId) : {}),\n ...props,\n },\n ref,\n );\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AAEvB,SAASC,qBAAqB,QAAQ;AACtC,SAASC,2BAA2B,QAAQ;AAC5C,SAASC,kBAAkB,QAAQ;AAEnC;;;;;;;;;AASA,OAAO,MAAMC,wBAAA,GAA2BA,CAACC,KAAA,EAA0BC,GAAA,KAAmD;EACpH,MAAMC,QAAA,GAAWJ,kBAAA;EACjB,MAAMK,QAAA,GAAWN,2BAAA,CAA4BO,GAAA,IAAOA,GAAA,CAAIC,SAAS,KAAK;EACtE,MAAMC,gBAAA,GAAmBT,2BAAA,CAA4BO,GAAA,IAAOA,GAAA,CAAIE,gBAAgB;EAChF,MAAMC,YAAA,GAAeV,2BAAA,CAA4BO,GAAA,IAAOA,GAAA,CAAII,qBAAqB;EACjF,OAAOZ,qBAAA,CACL;IACEa,EAAA,EAAI;IACJC,IAAA,EAAM;IACNC,QAAA,EAAUR,QAAA,GAAW,IAAIS,SAAS;IAClC,IAAIN,gBAAA,GAAmBC,YAAA,CAAaM,iBAAiB,CAACX,QAAA,IAAY,CAAC,CAAC;IACpE,GAAGF;EACL,GACAC,GAAA;AAEJ"}
1
+ {"version":3,"sources":["useDataGridCell.ts"],"sourcesContent":["import * as React from 'react';\nimport type { DataGridCellProps, DataGridCellState } from './DataGridCell.types';\nimport { useTableCell_unstable } from '../TableCell/useTableCell';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useColumnIdContext } from '../../contexts/columnIdContext';\n\n/**\n * Create the state required to render DataGridCell.\n *\n * The returned state can be modified with hooks such as useDataGridCellStyles_unstable,\n * before being passed to renderDataGridCell_unstable.\n *\n * @param props - props from this instance of DataGridCell\n * @param ref - reference to root HTMLElement of DataGridCell\n */\nexport const useDataGridCell_unstable = (props: DataGridCellProps, ref: React.Ref<HTMLElement>): DataGridCellState => {\n const columnId = useColumnIdContext();\n const tabbable = useDataGridContext_unstable(ctx => ctx.focusMode === 'cell');\n const resizableColumns = useDataGridContext_unstable(ctx => ctx.resizableColumns);\n const columnSizing = useDataGridContext_unstable(ctx => ctx.columnSizing_unstable);\n return useTableCell_unstable(\n {\n as: 'div',\n role: 'gridcell',\n tabIndex: tabbable ? 0 : undefined,\n ...(resizableColumns ? columnSizing.getTableCellProps(columnId) : {}),\n ...props,\n },\n ref,\n );\n};\n"],"names":["React","useTableCell_unstable","useDataGridContext_unstable","useColumnIdContext","useDataGridCell_unstable","props","ref","columnId","tabbable","ctx","focusMode","resizableColumns","columnSizing","columnSizing_unstable","as","role","tabIndex","undefined","getTableCellProps"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,qBAAqB,QAAQ,4BAA4B;AAClE,SAASC,2BAA2B,QAAQ,iCAAiC;AAC7E,SAASC,kBAAkB,QAAQ,iCAAiC;AAEpE;;;;;;;;CAQC,GACD,OAAO,MAAMC,2BAA2B,CAACC,OAA0BC,MAAmD;IACpH,MAAMC,WAAWJ;IACjB,MAAMK,WAAWN,4BAA4BO,CAAAA,MAAOA,IAAIC,SAAS,KAAK;IACtE,MAAMC,mBAAmBT,4BAA4BO,CAAAA,MAAOA,IAAIE,gBAAgB;IAChF,MAAMC,eAAeV,4BAA4BO,CAAAA,MAAOA,IAAII,qBAAqB;IACjF,OAAOZ,sBACL;QACEa,IAAI;QACJC,MAAM;QACNC,UAAUR,WAAW,IAAIS,SAAS;QAClC,GAAIN,mBAAmBC,aAAaM,iBAAiB,CAACX,YAAY,CAAC,CAAC;QACpE,GAAGF,KAAK;IACV,GACAC;AAEJ,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"names":["mergeClasses","useTableCellStyles_unstable","dataGridCellClassNames","root","useDataGridCellStyles_unstable","state","className"],"sources":["../../../src/components/DataGridCell/useDataGridCellStyles.styles.ts"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport type { DataGridCellSlots, DataGridCellState } from './DataGridCell.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { useTableCellStyles_unstable } from '../TableCell/useTableCellStyles.styles';\n\nexport const dataGridCellClassNames: SlotClassNames<DataGridCellSlots> = {\n root: 'fui-DataGridCell',\n};\n\n/**\n * Apply styling to the DataGridCell slots based on the state\n */\nexport const useDataGridCellStyles_unstable = (state: DataGridCellState): DataGridCellState => {\n useTableCellStyles_unstable(state);\n state.root.className = mergeClasses(dataGridCellClassNames.root, state.root.className);\n\n return state;\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ;AAG7B,SAASC,2BAA2B,QAAQ;AAE5C,OAAO,MAAMC,sBAAA,GAA4D;EACvEC,IAAA,EAAM;AACR;AAEA;;;AAGA,OAAO,MAAMC,8BAAA,GAAkCC,KAAA,IAAgD;EAC7FJ,2BAAA,CAA4BI,KAAA;EAC5BA,KAAA,CAAMF,IAAI,CAACG,SAAS,GAAGN,YAAA,CAAaE,sBAAA,CAAuBC,IAAI,EAAEE,KAAA,CAAMF,IAAI,CAACG,SAAS;EAErF,OAAOD,KAAA;AACT"}
1
+ {"version":3,"names":["mergeClasses","useTableCellStyles_unstable","dataGridCellClassNames","root","useDataGridCellStyles_unstable","state","className"],"sources":["useDataGridCellStyles.styles.js"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport { useTableCellStyles_unstable } from '../TableCell/useTableCellStyles.styles';\nexport const dataGridCellClassNames = {\n root: 'fui-DataGridCell'\n};\n/**\n * Apply styling to the DataGridCell slots based on the state\n */ export const useDataGridCellStyles_unstable = (state)=>{\n useTableCellStyles_unstable(state);\n state.root.className = mergeClasses(dataGridCellClassNames.root, state.root.className);\n return state;\n};\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,2BAA2B,QAAQ,wCAAwC;AACpF,OAAO,MAAMC,sBAAsB,GAAG;EAClCC,IAAI,EAAE;AACV,CAAC;AACD;AACA;AACA;AAAI,OAAO,MAAMC,8BAA8B,GAAIC,KAAK,IAAG;EACvDJ,2BAA2B,CAACI,KAAK,CAAC;EAClCA,KAAK,CAACF,IAAI,CAACG,SAAS,GAAGN,YAAY,CAACE,sBAAsB,CAACC,IAAI,EAAEE,KAAK,CAACF,IAAI,CAACG,SAAS,CAAC;EACtF,OAAOD,KAAK;AAChB,CAAC"}
@@ -5,12 +5,10 @@ import { useDataGridHeaderStyles_unstable } from './useDataGridHeaderStyles.styl
5
5
  import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
6
6
  /**
7
7
  * DataGridHeader component
8
- */
9
- export const DataGridHeader = /*#__PURE__*/React.forwardRef((props, ref) => {
10
- const state = useDataGridHeader_unstable(props, ref);
11
- useDataGridHeaderStyles_unstable(state);
12
- useCustomStyleHook_unstable('useDataGridHeaderStyles_unstable')(state);
13
- return renderDataGridHeader_unstable(state);
8
+ */ export const DataGridHeader = /*#__PURE__*/ React.forwardRef((props, ref)=>{
9
+ const state = useDataGridHeader_unstable(props, ref);
10
+ useDataGridHeaderStyles_unstable(state);
11
+ useCustomStyleHook_unstable('useDataGridHeaderStyles_unstable')(state);
12
+ return renderDataGridHeader_unstable(state);
14
13
  });
15
14
  DataGridHeader.displayName = 'DataGridHeader';
16
- //# sourceMappingURL=DataGridHeader.js.map