@fluentui/react-table 9.0.0-alpha.9 → 9.0.0-rc.2

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 (417) hide show
  1. package/CHANGELOG.json +798 -1
  2. package/CHANGELOG.md +207 -2
  3. package/dist/index.d.ts +239 -133
  4. package/lib/components/DataGrid/DataGrid.js +1 -2
  5. package/lib/components/DataGrid/DataGrid.js.map +1 -1
  6. package/lib/components/DataGrid/DataGrid.types.js.map +1 -1
  7. package/lib/components/DataGrid/renderDataGrid.js +5 -2
  8. package/lib/components/DataGrid/renderDataGrid.js.map +1 -1
  9. package/lib/components/DataGrid/useDataGrid.js +49 -3
  10. package/lib/components/DataGrid/useDataGrid.js.map +1 -1
  11. package/lib/components/DataGrid/useDataGridContextValues.js +11 -1
  12. package/lib/components/DataGrid/useDataGridContextValues.js.map +1 -1
  13. package/lib/components/DataGrid/useDataGridStyles.js +0 -1
  14. package/lib/components/DataGrid/useDataGridStyles.js.map +1 -1
  15. package/lib/components/DataGridBody/DataGridBody.js +1 -2
  16. package/lib/components/DataGridBody/DataGridBody.js.map +1 -1
  17. package/lib/components/DataGridBody/DataGridBody.types.js.map +1 -1
  18. package/lib/components/DataGridBody/renderDataGridBody.js +13 -3
  19. package/lib/components/DataGridBody/renderDataGridBody.js.map +1 -1
  20. package/lib/components/DataGridBody/useDataGridBody.js +16 -2
  21. package/lib/components/DataGridBody/useDataGridBody.js.map +1 -1
  22. package/lib/components/DataGridBody/useDataGridBodyStyles.js +0 -1
  23. package/lib/components/DataGridBody/useDataGridBodyStyles.js.map +1 -1
  24. package/lib/components/DataGridCell/DataGridCell.js +1 -2
  25. package/lib/components/DataGridCell/DataGridCell.js.map +1 -1
  26. package/lib/components/DataGridCell/renderDataGridCell.js +0 -1
  27. package/lib/components/DataGridCell/renderDataGridCell.js.map +1 -1
  28. package/lib/components/DataGridCell/useDataGridCell.js +7 -3
  29. package/lib/components/DataGridCell/useDataGridCell.js.map +1 -1
  30. package/lib/components/DataGridCell/useDataGridCellStyles.js +0 -1
  31. package/lib/components/DataGridCell/useDataGridCellStyles.js.map +1 -1
  32. package/lib/components/DataGridHeader/DataGridHeader.js +1 -2
  33. package/lib/components/DataGridHeader/DataGridHeader.js.map +1 -1
  34. package/lib/components/DataGridHeader/renderDataGridHeader.js +0 -1
  35. package/lib/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
  36. package/lib/components/DataGridHeader/useDataGridHeader.js +2 -2
  37. package/lib/components/DataGridHeader/useDataGridHeader.js.map +1 -1
  38. package/lib/components/DataGridHeader/useDataGridHeaderStyles.js +0 -1
  39. package/lib/components/DataGridHeader/useDataGridHeaderStyles.js.map +1 -1
  40. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js +1 -2
  41. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
  42. package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js +0 -1
  43. package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
  44. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js +23 -3
  45. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
  46. package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +0 -4
  47. package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -1
  48. package/lib/components/DataGridRow/DataGridRow.js +1 -2
  49. package/lib/components/DataGridRow/DataGridRow.js.map +1 -1
  50. package/lib/components/DataGridRow/DataGridRow.types.js.map +1 -1
  51. package/lib/components/DataGridRow/renderDataGridRow.js +15 -3
  52. package/lib/components/DataGridRow/renderDataGridRow.js.map +1 -1
  53. package/lib/components/DataGridRow/useDataGridRow.js +56 -3
  54. package/lib/components/DataGridRow/useDataGridRow.js.map +1 -1
  55. package/lib/components/DataGridRow/useDataGridRowStyles.js +5 -2
  56. package/lib/components/DataGridRow/useDataGridRowStyles.js.map +1 -1
  57. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js +1 -2
  58. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
  59. package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js +0 -1
  60. package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
  61. package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js +33 -3
  62. package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
  63. package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js +0 -4
  64. package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js.map +1 -1
  65. package/lib/components/Table/Table.js +1 -2
  66. package/lib/components/Table/Table.js.map +1 -1
  67. package/lib/components/Table/Table.types.js.map +1 -1
  68. package/lib/components/Table/renderTable.js +2 -2
  69. package/lib/components/Table/renderTable.js.map +1 -1
  70. package/lib/components/Table/useTable.js +0 -2
  71. package/lib/components/Table/useTable.js.map +1 -1
  72. package/lib/components/Table/useTableContextValues.js.map +1 -1
  73. package/lib/components/Table/useTableStyles.js +13 -19
  74. package/lib/components/Table/useTableStyles.js.map +1 -1
  75. package/lib/components/TableBody/TableBody.js +1 -2
  76. package/lib/components/TableBody/TableBody.js.map +1 -1
  77. package/lib/components/TableBody/renderTableBody.js +3 -4
  78. package/lib/components/TableBody/renderTableBody.js.map +1 -1
  79. package/lib/components/TableBody/useTableBody.js +0 -2
  80. package/lib/components/TableBody/useTableBody.js.map +1 -1
  81. package/lib/components/TableBody/useTableBodyStyles.js +6 -10
  82. package/lib/components/TableBody/useTableBodyStyles.js.map +1 -1
  83. package/lib/components/TableCell/TableCell.js +1 -2
  84. package/lib/components/TableCell/TableCell.js.map +1 -1
  85. package/lib/components/TableCell/TableCell.types.js.map +1 -1
  86. package/lib/components/TableCell/renderTableCell.js +2 -2
  87. package/lib/components/TableCell/renderTableCell.js.map +1 -1
  88. package/lib/components/TableCell/useTableCell.js +4 -4
  89. package/lib/components/TableCell/useTableCell.js.map +1 -1
  90. package/lib/components/TableCell/useTableCellStyles.js +47 -26
  91. package/lib/components/TableCell/useTableCellStyles.js.map +1 -1
  92. package/lib/components/TableCellActions/TableCellActions.js +1 -2
  93. package/lib/components/TableCellActions/TableCellActions.js.map +1 -1
  94. package/lib/components/TableCellActions/renderTableCellActions.js +3 -4
  95. package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -1
  96. package/lib/components/TableCellActions/useTableCellActions.js +2 -5
  97. package/lib/components/TableCellActions/useTableCellActions.js.map +1 -1
  98. package/lib/components/TableCellActions/useTableCellActionsStyles.js +11 -19
  99. package/lib/components/TableCellActions/useTableCellActionsStyles.js.map +1 -1
  100. package/lib/components/TableCellLayout/TableCellLayout.js +1 -2
  101. package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -1
  102. package/lib/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
  103. package/lib/components/TableCellLayout/renderTableCellLayout.js +10 -6
  104. package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  105. package/lib/components/TableCellLayout/useTableCellLayout.js +5 -5
  106. package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  107. package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
  108. package/lib/components/TableCellLayout/useTableCellLayoutStyles.js +41 -35
  109. package/lib/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
  110. package/lib/components/TableHeader/TableHeader.js +1 -2
  111. package/lib/components/TableHeader/TableHeader.js.map +1 -1
  112. package/lib/components/TableHeader/renderTableHeader.js +2 -2
  113. package/lib/components/TableHeader/renderTableHeader.js.map +1 -1
  114. package/lib/components/TableHeader/useTableHeader.js +1 -10
  115. package/lib/components/TableHeader/useTableHeader.js.map +1 -1
  116. package/lib/components/TableHeader/useTableHeaderStyles.js +6 -16
  117. package/lib/components/TableHeader/useTableHeaderStyles.js.map +1 -1
  118. package/lib/components/TableHeaderCell/TableHeaderCell.js +1 -2
  119. package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  120. package/lib/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
  121. package/lib/components/TableHeaderCell/renderTableHeaderCell.js +6 -4
  122. package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  123. package/lib/components/TableHeaderCell/useTableHeaderCell.js +11 -8
  124. package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  125. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js +69 -67
  126. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
  127. package/lib/components/TableRow/TableRow.js +1 -2
  128. package/lib/components/TableRow/TableRow.js.map +1 -1
  129. package/lib/components/TableRow/TableRow.types.js.map +1 -1
  130. package/lib/components/TableRow/renderTableRow.js +3 -4
  131. package/lib/components/TableRow/renderTableRow.js.map +1 -1
  132. package/lib/components/TableRow/useTableRow.js +7 -5
  133. package/lib/components/TableRow/useTableRow.js.map +1 -1
  134. package/lib/components/TableRow/useTableRowStyles.js +137 -162
  135. package/lib/components/TableRow/useTableRowStyles.js.map +1 -1
  136. package/lib/components/TableSelectionCell/TableSelectionCell.js +1 -2
  137. package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  138. package/lib/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
  139. package/lib/components/TableSelectionCell/renderTableSelectionCell.js +6 -4
  140. package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  141. package/lib/components/TableSelectionCell/useTableSelectionCell.js +9 -5
  142. package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  143. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js +43 -46
  144. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
  145. package/lib/contexts/columnIdContext.js +9 -0
  146. package/lib/contexts/columnIdContext.js.map +1 -0
  147. package/lib/contexts/dataGridContext.js +13 -0
  148. package/lib/contexts/dataGridContext.js.map +1 -0
  149. package/lib/contexts/rowIdContext.js +9 -0
  150. package/lib/contexts/rowIdContext.js.map +1 -0
  151. package/lib/contexts/tableContext.js +0 -1
  152. package/lib/contexts/tableContext.js.map +1 -1
  153. package/lib/contexts/tableHeaderContext.js.map +1 -1
  154. package/lib/hooks/createColumn.js +35 -0
  155. package/lib/hooks/createColumn.js.map +1 -0
  156. package/lib/hooks/index.js +4 -3
  157. package/lib/hooks/index.js.map +1 -1
  158. package/lib/hooks/selectionManager.js +16 -32
  159. package/lib/hooks/selectionManager.js.map +1 -1
  160. package/lib/hooks/types.js.map +1 -1
  161. package/lib/hooks/{useTable.js → useTableFeatures.js} +12 -9
  162. package/lib/hooks/useTableFeatures.js.map +1 -0
  163. package/lib/hooks/{useSelection.js → useTableSelection.js} +18 -18
  164. package/lib/hooks/useTableSelection.js.map +1 -0
  165. package/lib/hooks/{useSort.js → useTableSort.js} +12 -21
  166. package/lib/hooks/useTableSort.js.map +1 -0
  167. package/lib/index.js +2 -1
  168. package/lib/index.js.map +1 -1
  169. package/lib-commonjs/DataGrid.js +0 -2
  170. package/lib-commonjs/DataGrid.js.map +1 -1
  171. package/lib-commonjs/DataGridBody.js +0 -2
  172. package/lib-commonjs/DataGridBody.js.map +1 -1
  173. package/lib-commonjs/DataGridCell.js +0 -2
  174. package/lib-commonjs/DataGridCell.js.map +1 -1
  175. package/lib-commonjs/DataGridHeader.js +0 -2
  176. package/lib-commonjs/DataGridHeader.js.map +1 -1
  177. package/lib-commonjs/DataGridHeaderCell.js +0 -2
  178. package/lib-commonjs/DataGridHeaderCell.js.map +1 -1
  179. package/lib-commonjs/DataGridRow.js +0 -2
  180. package/lib-commonjs/DataGridRow.js.map +1 -1
  181. package/lib-commonjs/DataGridSelectionCell.js +0 -2
  182. package/lib-commonjs/DataGridSelectionCell.js.map +1 -1
  183. package/lib-commonjs/Table.js +0 -2
  184. package/lib-commonjs/Table.js.map +1 -1
  185. package/lib-commonjs/TableBody.js +0 -2
  186. package/lib-commonjs/TableBody.js.map +1 -1
  187. package/lib-commonjs/TableCell.js +0 -2
  188. package/lib-commonjs/TableCell.js.map +1 -1
  189. package/lib-commonjs/TableCellActions.js +0 -2
  190. package/lib-commonjs/TableCellActions.js.map +1 -1
  191. package/lib-commonjs/TableCellLayout.js +0 -2
  192. package/lib-commonjs/TableCellLayout.js.map +1 -1
  193. package/lib-commonjs/TableCellPrimaryLayout.js +0 -2
  194. package/lib-commonjs/TableCellPrimaryLayout.js.map +1 -1
  195. package/lib-commonjs/TableHeader.js +0 -2
  196. package/lib-commonjs/TableHeader.js.map +1 -1
  197. package/lib-commonjs/TableHeaderCell.js +0 -2
  198. package/lib-commonjs/TableHeaderCell.js.map +1 -1
  199. package/lib-commonjs/TableRow.js +0 -2
  200. package/lib-commonjs/TableRow.js.map +1 -1
  201. package/lib-commonjs/TableSelectionCell.js +0 -2
  202. package/lib-commonjs/TableSelectionCell.js.map +1 -1
  203. package/lib-commonjs/components/DataGrid/DataGrid.js +1 -8
  204. package/lib-commonjs/components/DataGrid/DataGrid.js.map +1 -1
  205. package/lib-commonjs/components/DataGrid/DataGrid.types.js.map +1 -1
  206. package/lib-commonjs/components/DataGrid/index.js +0 -6
  207. package/lib-commonjs/components/DataGrid/index.js.map +1 -1
  208. package/lib-commonjs/components/DataGrid/renderDataGrid.js +5 -5
  209. package/lib-commonjs/components/DataGrid/renderDataGrid.js.map +1 -1
  210. package/lib-commonjs/components/DataGrid/useDataGrid.js +49 -6
  211. package/lib-commonjs/components/DataGrid/useDataGrid.js.map +1 -1
  212. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js +11 -4
  213. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js.map +1 -1
  214. package/lib-commonjs/components/DataGrid/useDataGridStyles.js +0 -5
  215. package/lib-commonjs/components/DataGrid/useDataGridStyles.js.map +1 -1
  216. package/lib-commonjs/components/DataGridBody/DataGridBody.js +1 -7
  217. package/lib-commonjs/components/DataGridBody/DataGridBody.js.map +1 -1
  218. package/lib-commonjs/components/DataGridBody/DataGridBody.types.js.map +1 -1
  219. package/lib-commonjs/components/DataGridBody/index.js +0 -6
  220. package/lib-commonjs/components/DataGridBody/index.js.map +1 -1
  221. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js +13 -6
  222. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js.map +1 -1
  223. package/lib-commonjs/components/DataGridBody/useDataGridBody.js +16 -5
  224. package/lib-commonjs/components/DataGridBody/useDataGridBody.js.map +1 -1
  225. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.js +0 -5
  226. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.js.map +1 -1
  227. package/lib-commonjs/components/DataGridCell/DataGridCell.js +1 -7
  228. package/lib-commonjs/components/DataGridCell/DataGridCell.js.map +1 -1
  229. package/lib-commonjs/components/DataGridCell/DataGridCell.types.js.map +1 -1
  230. package/lib-commonjs/components/DataGridCell/index.js +0 -6
  231. package/lib-commonjs/components/DataGridCell/index.js.map +1 -1
  232. package/lib-commonjs/components/DataGridCell/renderDataGridCell.js +0 -4
  233. package/lib-commonjs/components/DataGridCell/renderDataGridCell.js.map +1 -1
  234. package/lib-commonjs/components/DataGridCell/useDataGridCell.js +7 -6
  235. package/lib-commonjs/components/DataGridCell/useDataGridCell.js.map +1 -1
  236. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.js +0 -5
  237. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.js.map +1 -1
  238. package/lib-commonjs/components/DataGridHeader/DataGridHeader.js +1 -7
  239. package/lib-commonjs/components/DataGridHeader/DataGridHeader.js.map +1 -1
  240. package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js.map +1 -1
  241. package/lib-commonjs/components/DataGridHeader/index.js +0 -6
  242. package/lib-commonjs/components/DataGridHeader/index.js.map +1 -1
  243. package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js +0 -4
  244. package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
  245. package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js +2 -5
  246. package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js.map +1 -1
  247. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.js +0 -5
  248. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.js.map +1 -1
  249. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js +1 -7
  250. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
  251. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -1
  252. package/lib-commonjs/components/DataGridHeaderCell/index.js +0 -6
  253. package/lib-commonjs/components/DataGridHeaderCell/index.js.map +1 -1
  254. package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js +0 -4
  255. package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
  256. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js +23 -6
  257. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
  258. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +0 -8
  259. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -1
  260. package/lib-commonjs/components/DataGridRow/DataGridRow.js +1 -7
  261. package/lib-commonjs/components/DataGridRow/DataGridRow.js.map +1 -1
  262. package/lib-commonjs/components/DataGridRow/DataGridRow.types.js.map +1 -1
  263. package/lib-commonjs/components/DataGridRow/index.js +0 -6
  264. package/lib-commonjs/components/DataGridRow/index.js.map +1 -1
  265. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js +15 -6
  266. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js.map +1 -1
  267. package/lib-commonjs/components/DataGridRow/useDataGridRow.js +56 -6
  268. package/lib-commonjs/components/DataGridRow/useDataGridRow.js.map +1 -1
  269. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.js +5 -6
  270. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.js.map +1 -1
  271. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js +1 -7
  272. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
  273. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -1
  274. package/lib-commonjs/components/DataGridSelectionCell/index.js +0 -6
  275. package/lib-commonjs/components/DataGridSelectionCell/index.js.map +1 -1
  276. package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js +0 -4
  277. package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
  278. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js +33 -6
  279. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
  280. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js +0 -8
  281. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js.map +1 -1
  282. package/lib-commonjs/components/Table/Table.js +1 -8
  283. package/lib-commonjs/components/Table/Table.js.map +1 -1
  284. package/lib-commonjs/components/Table/Table.types.js.map +1 -1
  285. package/lib-commonjs/components/Table/index.js +0 -6
  286. package/lib-commonjs/components/Table/index.js.map +1 -1
  287. package/lib-commonjs/components/Table/renderTable.js +2 -7
  288. package/lib-commonjs/components/Table/renderTable.js.map +1 -1
  289. package/lib-commonjs/components/Table/useTable.js +0 -5
  290. package/lib-commonjs/components/Table/useTable.js.map +1 -1
  291. package/lib-commonjs/components/Table/useTableContextValues.js +0 -3
  292. package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -1
  293. package/lib-commonjs/components/Table/useTableStyles.js +13 -23
  294. package/lib-commonjs/components/Table/useTableStyles.js.map +1 -1
  295. package/lib-commonjs/components/TableBody/TableBody.js +1 -7
  296. package/lib-commonjs/components/TableBody/TableBody.js.map +1 -1
  297. package/lib-commonjs/components/TableBody/TableBody.types.js.map +1 -1
  298. package/lib-commonjs/components/TableBody/index.js +0 -6
  299. package/lib-commonjs/components/TableBody/index.js.map +1 -1
  300. package/lib-commonjs/components/TableBody/renderTableBody.js +3 -8
  301. package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -1
  302. package/lib-commonjs/components/TableBody/useTableBody.js +0 -6
  303. package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
  304. package/lib-commonjs/components/TableBody/useTableBodyStyles.js +6 -12
  305. package/lib-commonjs/components/TableBody/useTableBodyStyles.js.map +1 -1
  306. package/lib-commonjs/components/TableCell/TableCell.js +1 -7
  307. package/lib-commonjs/components/TableCell/TableCell.js.map +1 -1
  308. package/lib-commonjs/components/TableCell/TableCell.types.js.map +1 -1
  309. package/lib-commonjs/components/TableCell/index.js +0 -6
  310. package/lib-commonjs/components/TableCell/index.js.map +1 -1
  311. package/lib-commonjs/components/TableCell/renderTableCell.js +2 -6
  312. package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -1
  313. package/lib-commonjs/components/TableCell/useTableCell.js +4 -8
  314. package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
  315. package/lib-commonjs/components/TableCell/useTableCellStyles.js +47 -30
  316. package/lib-commonjs/components/TableCell/useTableCellStyles.js.map +1 -1
  317. package/lib-commonjs/components/TableCellActions/TableCellActions.js +1 -7
  318. package/lib-commonjs/components/TableCellActions/TableCellActions.js.map +1 -1
  319. package/lib-commonjs/components/TableCellActions/TableCellActions.types.js.map +1 -1
  320. package/lib-commonjs/components/TableCellActions/index.js +0 -6
  321. package/lib-commonjs/components/TableCellActions/index.js.map +1 -1
  322. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js +3 -8
  323. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -1
  324. package/lib-commonjs/components/TableCellActions/useTableCellActions.js +1 -8
  325. package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -1
  326. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js +11 -23
  327. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js.map +1 -1
  328. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js +1 -8
  329. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js.map +1 -1
  330. package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
  331. package/lib-commonjs/components/TableCellLayout/index.js +0 -6
  332. package/lib-commonjs/components/TableCellLayout/index.js.map +1 -1
  333. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js +10 -11
  334. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  335. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +5 -9
  336. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  337. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js +0 -3
  338. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
  339. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js +41 -39
  340. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
  341. package/lib-commonjs/components/TableHeader/TableHeader.js +1 -7
  342. package/lib-commonjs/components/TableHeader/TableHeader.js.map +1 -1
  343. package/lib-commonjs/components/TableHeader/TableHeader.types.js.map +1 -1
  344. package/lib-commonjs/components/TableHeader/index.js +0 -6
  345. package/lib-commonjs/components/TableHeader/index.js.map +1 -1
  346. package/lib-commonjs/components/TableHeader/renderTableHeader.js +2 -7
  347. package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -1
  348. package/lib-commonjs/components/TableHeader/useTableHeader.js +1 -15
  349. package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
  350. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js +6 -19
  351. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js.map +1 -1
  352. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js +1 -7
  353. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  354. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
  355. package/lib-commonjs/components/TableHeaderCell/index.js +0 -6
  356. package/lib-commonjs/components/TableHeaderCell/index.js.map +1 -1
  357. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js +6 -8
  358. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  359. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +10 -14
  360. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  361. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js +69 -71
  362. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
  363. package/lib-commonjs/components/TableRow/TableRow.js +1 -7
  364. package/lib-commonjs/components/TableRow/TableRow.js.map +1 -1
  365. package/lib-commonjs/components/TableRow/TableRow.types.js.map +1 -1
  366. package/lib-commonjs/components/TableRow/index.js +0 -6
  367. package/lib-commonjs/components/TableRow/index.js.map +1 -1
  368. package/lib-commonjs/components/TableRow/renderTableRow.js +3 -8
  369. package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -1
  370. package/lib-commonjs/components/TableRow/useTableRow.js +7 -10
  371. package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
  372. package/lib-commonjs/components/TableRow/useTableRowStyles.js +137 -170
  373. package/lib-commonjs/components/TableRow/useTableRowStyles.js.map +1 -1
  374. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js +1 -7
  375. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  376. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
  377. package/lib-commonjs/components/TableSelectionCell/index.js +0 -6
  378. package/lib-commonjs/components/TableSelectionCell/index.js.map +1 -1
  379. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js +6 -8
  380. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  381. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js +8 -11
  382. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  383. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js +43 -50
  384. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
  385. package/lib-commonjs/contexts/columnIdContext.js +16 -0
  386. package/lib-commonjs/contexts/columnIdContext.js.map +1 -0
  387. package/lib-commonjs/contexts/dataGridContext.js +20 -0
  388. package/lib-commonjs/contexts/dataGridContext.js.map +1 -0
  389. package/lib-commonjs/contexts/rowIdContext.js +16 -0
  390. package/lib-commonjs/contexts/rowIdContext.js.map +1 -0
  391. package/lib-commonjs/contexts/tableContext.js +0 -5
  392. package/lib-commonjs/contexts/tableContext.js.map +1 -1
  393. package/lib-commonjs/contexts/tableHeaderContext.js +0 -4
  394. package/lib-commonjs/contexts/tableHeaderContext.js.map +1 -1
  395. package/lib-commonjs/hooks/createColumn.js +42 -0
  396. package/lib-commonjs/hooks/createColumn.js.map +1 -0
  397. package/lib-commonjs/hooks/index.js +4 -8
  398. package/lib-commonjs/hooks/index.js.map +1 -1
  399. package/lib-commonjs/hooks/selectionManager.js +16 -34
  400. package/lib-commonjs/hooks/selectionManager.js.map +1 -1
  401. package/lib-commonjs/hooks/types.js.map +1 -1
  402. package/lib-commonjs/hooks/useTableFeatures.js +42 -0
  403. package/lib-commonjs/hooks/useTableFeatures.js.map +1 -0
  404. package/lib-commonjs/hooks/{useSelection.js → useTableSelection.js} +21 -28
  405. package/lib-commonjs/hooks/useTableSelection.js.map +1 -0
  406. package/lib-commonjs/hooks/{useSort.js → useTableSort.js} +15 -29
  407. package/lib-commonjs/hooks/useTableSort.js.map +1 -0
  408. package/lib-commonjs/index.js +27 -44
  409. package/lib-commonjs/index.js.map +1 -1
  410. package/package.json +15 -11
  411. package/lib/hooks/useSelection.js.map +0 -1
  412. package/lib/hooks/useSort.js.map +0 -1
  413. package/lib/hooks/useTable.js.map +0 -1
  414. package/lib-commonjs/hooks/useSelection.js.map +0 -1
  415. package/lib-commonjs/hooks/useSort.js.map +0 -1
  416. package/lib-commonjs/hooks/useTable.js +0 -42
  417. package/lib-commonjs/hooks/useTable.js.map +0 -1
@@ -3,7 +3,7 @@ import { useTableContext } from '../../contexts/tableContext';
3
3
  const tableAvatarSizeMap = {
4
4
  medium: 32,
5
5
  small: 24,
6
- smaller: 20
6
+ 'extra-small': 20
7
7
  };
8
8
  /**
9
9
  * Create the state required to render TableCellLayout.
@@ -14,7 +14,6 @@ const tableAvatarSizeMap = {
14
14
  * @param props - props from this instance of TableCellLayout
15
15
  * @param ref - reference to root HTMLElement of TableCellLayout
16
16
  */
17
-
18
17
  export const useTableCellLayout_unstable = (props, ref) => {
19
18
  const {
20
19
  size
@@ -24,7 +23,7 @@ export const useTableCellLayout_unstable = (props, ref) => {
24
23
  root: 'div',
25
24
  main: 'span',
26
25
  description: 'span',
27
- wrapper: 'div',
26
+ content: 'div',
28
27
  media: 'span'
29
28
  },
30
29
  root: getNativeElementProps('div', {
@@ -37,10 +36,11 @@ export const useTableCellLayout_unstable = (props, ref) => {
37
36
  }),
38
37
  media: resolveShorthand(props.media),
39
38
  description: resolveShorthand(props.description),
40
- wrapper: resolveShorthand(props.wrapper, {
39
+ content: resolveShorthand(props.content, {
41
40
  required: !!props.description || !!props.children
42
41
  }),
43
- avatarSize: tableAvatarSizeMap[size]
42
+ avatarSize: tableAvatarSizeMap[size],
43
+ size
44
44
  };
45
45
  };
46
46
  //# sourceMappingURL=useTableCellLayout.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/TableCellLayout/useTableCellLayout.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AAEA,SAAS,eAAT,QAAgC,6BAAhC;AAEA,MAAM,kBAAkB,GAAG;EACzB,MAAM,EAAE,EADiB;EAEzB,KAAK,EAAE,EAFkB;EAGzB,OAAO,EAAE;AAHgB,CAA3B;AAMA;;;;;;;;AAQG;;AACH,OAAO,MAAM,2BAA2B,GAAG,CACzC,KADyC,EAEzC,GAFyC,KAGjB;EACxB,MAAM;IAAE;EAAF,IAAW,eAAe,EAAhC;EAEA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE,KADI;MAEV,IAAI,EAAE,MAFI;MAGV,WAAW,EAAE,MAHH;MAIV,OAAO,EAAE,KAJC;MAKV,KAAK,EAAE;IALG,CADP;IAQL,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;MAAE,GAAF;MAAO,GAAG;IAAV,CAAR,CARtB;IASL,UAAU,EAAE,KAAK,CAAC,UATb;IAUL,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC,IAAP,EAAa;MAAE,QAAQ,EAAE;IAAZ,CAAb,CAVjB;IAWL,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC,KAAP,CAXlB;IAYL,WAAW,EAAE,gBAAgB,CAAC,KAAK,CAAC,WAAP,CAZxB;IAaL,OAAO,EAAE,gBAAgB,CAAC,KAAK,CAAC,OAAP,EAAgB;MAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,WAAR,IAAuB,CAAC,CAAC,KAAK,CAAC;IAA3C,CAAhB,CAbpB;IAcL,UAAU,EAAE,kBAAkB,CAAC,IAAD;EAdzB,CAAP;AAgBD,CAtBM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport type { TableCellLayoutProps, TableCellLayoutState } from './TableCellLayout.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\nconst tableAvatarSizeMap = {\n medium: 32,\n small: 24,\n smaller: 20,\n} as const;\n\n/**\n * Create the state required to render TableCellLayout.\n *\n * The returned state can be modified with hooks such as useTableCellLayoutStyles_unstable,\n * before being passed to renderTableCellLayout_unstable.\n *\n * @param props - props from this instance of TableCellLayout\n * @param ref - reference to root HTMLElement of TableCellLayout\n */\nexport const useTableCellLayout_unstable = (\n props: TableCellLayoutProps,\n ref: React.Ref<HTMLElement>,\n): TableCellLayoutState => {\n const { size } = useTableContext();\n\n return {\n components: {\n root: 'div',\n main: 'span',\n description: 'span',\n wrapper: 'div',\n media: 'span',\n },\n root: getNativeElementProps('div', { ref, ...props }),\n appearance: props.appearance,\n main: resolveShorthand(props.main, { required: true }),\n media: resolveShorthand(props.media),\n description: resolveShorthand(props.description),\n wrapper: resolveShorthand(props.wrapper, { required: !!props.description || !!props.children }),\n avatarSize: tableAvatarSizeMap[size],\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AACA,SAASA,qBAAqB,EAAEC,gBAAgB,QAAQ,2BAA2B;AAEnF,SAASC,eAAe,QAAQ,6BAA6B;AAE7D,MAAMC,kBAAkB,GAAG;EACzBC,MAAM,EAAE,EAAE;EACVC,KAAK,EAAE,EAAE;EACT,aAAa,EAAE;CACP;AAEV;;;;;;;;;AASA,OAAO,MAAMC,2BAA2B,GAAG,CACzCC,KAA2B,EAC3BC,GAA2B,KACH;EACxB,MAAM;IAAEC;EAAI,CAAE,GAAGP,eAAe,EAAE;EAElC,OAAO;IACLQ,UAAU,EAAE;MACVC,IAAI,EAAE,KAAK;MACXC,IAAI,EAAE,MAAM;MACZC,WAAW,EAAE,MAAM;MACnBC,OAAO,EAAE,KAAK;MACdC,KAAK,EAAE;KACR;IACDJ,IAAI,EAAEX,qBAAqB,CAAC,KAAK,EAAE;MAAEQ,GAAG;MAAE,GAAGD;IAAK,CAAE,CAAC;IACrDS,UAAU,EAAET,KAAK,CAACS,UAAU;IAC5BJ,IAAI,EAAEX,gBAAgB,CAACM,KAAK,CAACK,IAAI,EAAE;MAAEK,QAAQ,EAAE;IAAI,CAAE,CAAC;IACtDF,KAAK,EAAEd,gBAAgB,CAACM,KAAK,CAACQ,KAAK,CAAC;IACpCF,WAAW,EAAEZ,gBAAgB,CAACM,KAAK,CAACM,WAAW,CAAC;IAChDC,OAAO,EAAEb,gBAAgB,CAACM,KAAK,CAACO,OAAO,EAAE;MAAEG,QAAQ,EAAE,CAAC,CAACV,KAAK,CAACM,WAAW,IAAI,CAAC,CAACN,KAAK,CAACW;IAAQ,CAAE,CAAC;IAC/FC,UAAU,EAAEhB,kBAAkB,CAACM,IAAI,CAAC;IACpCA;GACD;AACH,CAAC","names":["getNativeElementProps","resolveShorthand","useTableContext","tableAvatarSizeMap","medium","small","useTableCellLayout_unstable","props","ref","size","components","root","main","description","content","media","appearance","required","children","avatarSize"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCellLayout/useTableCellLayout.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport type { TableCellLayoutProps, TableCellLayoutState } from './TableCellLayout.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\nconst tableAvatarSizeMap = {\n medium: 32,\n small: 24,\n 'extra-small': 20,\n} as const;\n\n/**\n * Create the state required to render TableCellLayout.\n *\n * The returned state can be modified with hooks such as useTableCellLayoutStyles_unstable,\n * before being passed to renderTableCellLayout_unstable.\n *\n * @param props - props from this instance of TableCellLayout\n * @param ref - reference to root HTMLElement of TableCellLayout\n */\nexport const useTableCellLayout_unstable = (\n props: TableCellLayoutProps,\n ref: React.Ref<HTMLElement>,\n): TableCellLayoutState => {\n const { size } = useTableContext();\n\n return {\n components: {\n root: 'div',\n main: 'span',\n description: 'span',\n content: 'div',\n media: 'span',\n },\n root: getNativeElementProps('div', { ref, ...props }),\n appearance: props.appearance,\n main: resolveShorthand(props.main, { required: true }),\n media: resolveShorthand(props.media),\n description: resolveShorthand(props.description),\n content: resolveShorthand(props.content, { required: !!props.description || !!props.children }),\n avatarSize: tableAvatarSizeMap[size],\n size,\n };\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/TableCellLayout/useTableCellLayoutContextValues.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA,OAAM,SAAU,wCAAV,CAAmD,KAAnD,EAA8E;EAClF,MAAM;IAAE;EAAF,IAAiB,KAAvB;EAEA,MAAM,MAAM,GAAG,KAAK,CAAC,OAAN,CACb,OAAO;IACL,IAAI,EAAE;EADD,CAAP,CADa,EAIb,CAAC,UAAD,CAJa,CAAf;EAOA,OAAO;IACL;EADK,CAAP;AAGD","sourcesContent":["import * as React from 'react';\nimport type { TableCellLayoutState, TableCellLayoutContextValues } from './TableCellLayout.types';\n\nexport function useTableCellLayoutContextValues_unstable(state: TableCellLayoutState): TableCellLayoutContextValues {\n const { avatarSize } = state;\n\n const avatar = React.useMemo(\n () => ({\n size: avatarSize,\n }),\n [avatarSize],\n );\n\n return {\n avatar,\n };\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,OAAM,SAAUC,wCAAwC,CAACC,KAA2B;EAClF,MAAM;IAAEC;EAAU,CAAE,GAAGD,KAAK;EAE5B,MAAME,MAAM,GAAGJ,KAAK,CAACK,OAAO,CAC1B,OAAO;IACLC,IAAI,EAAEH;GACP,CAAC,EACF,CAACA,UAAU,CAAC,CACb;EAED,OAAO;IACLC;GACD;AACH","names":["React","useTableCellLayoutContextValues_unstable","state","avatarSize","avatar","useMemo","size"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCellLayout/useTableCellLayoutContextValues.ts"],"sourcesContent":["import * as React from 'react';\nimport type { TableCellLayoutState, TableCellLayoutContextValues } from './TableCellLayout.types';\n\nexport function useTableCellLayoutContextValues_unstable(state: TableCellLayoutState): TableCellLayoutContextValues {\n const { avatarSize } = state;\n\n const avatar = React.useMemo(\n () => ({\n size: avatarSize,\n }),\n [avatarSize],\n );\n\n return {\n avatar,\n };\n}\n"]}
@@ -1,74 +1,80 @@
1
1
  import { __styles, mergeClasses, shorthands } from '@griffel/react';
2
2
  import { tokens } from '@fluentui/react-theme';
3
+ import { typographyStyles } from '@fluentui/react-theme';
3
4
  export const tableCellLayoutClassNames = {
4
5
  root: 'fui-TableCellLayout',
5
6
  media: 'fui-TableCellLayout__media',
6
7
  main: 'fui-TableCellLayout__main',
7
8
  description: 'fui-TableCellLayout__description',
8
- wrapper: 'fui-TableCellLayout__wrapper'
9
+ content: 'fui-TableCellLayout__content'
9
10
  };
10
11
  /**
11
12
  * Styles for the root slot
12
13
  */
13
-
14
14
  const useStyles = /*#__PURE__*/__styles({
15
- "root": {
16
- "mc9l5x": "f22iagw",
17
- "Bt984gj": "f122n59",
18
- "i8kkvl": "fsnqrgy",
19
- "Belr9w4": "fylz90v",
20
- "Bh6795r": "fqerorx",
21
- "Bnnss6s": "f1neuvcm",
22
- "xawz": "fkjuxzh"
15
+ root: {
16
+ mc9l5x: "f22iagw",
17
+ Bt984gj: "f122n59",
18
+ i8kkvl: "fsnqrgy",
19
+ Belr9w4: "fylz90v",
20
+ Bh6795r: "fqerorx",
21
+ Bnnss6s: "f1neuvcm",
22
+ xawz: "fkjuxzh"
23
23
  },
24
- "wrapper": {
25
- "mc9l5x": "f22iagw",
26
- "Beiy3e4": "f1vx9l62"
24
+ content: {
25
+ mc9l5x: "f22iagw",
26
+ Beiy3e4: "f1vx9l62"
27
27
  },
28
- "media": {
29
- "mc9l5x": "f22iagw",
30
- "Bt984gj": "f122n59"
28
+ media: {
29
+ mc9l5x: "f22iagw",
30
+ Bt984gj: "f122n59"
31
31
  },
32
- "mediaPrimary": {
33
- "B5pe6w7": "fqgjdyf",
34
- "p4uzdd": "fppfxz8"
32
+ mediaExtraSmall: {
33
+ Be2twd7: "f4ybsrx"
35
34
  },
36
- "mainPrimary": {
37
- "Bhrd7zp": "fl43uef"
35
+ mediaSmallAndMedium: {
36
+ Be2twd7: "fe5j1ua"
38
37
  },
39
- "description": {
40
- "Be2twd7": "fkhj508",
41
- "sj55zd": "fkfq4zb"
38
+ mediaPrimary: {
39
+ Be2twd7: "f1rt2boy"
40
+ },
41
+ mainPrimary: {
42
+ Bhrd7zp: "fl43uef"
43
+ },
44
+ description: {
45
+ sj55zd: "fkfq4zb",
46
+ Bahqtrf: "fk6fouc",
47
+ Be2twd7: "fy9rknc",
48
+ Bhrd7zp: "figsok6",
49
+ Bg96gwp: "fwrc4pm"
42
50
  }
43
51
  }, {
44
- "d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fsnqrgy{-webkit-column-gap:var(--spacingHorizontalS);column-gap:var(--spacingHorizontalS);}", ".fylz90v{row-gap:var(--spacingHorizontalS);}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f1neuvcm{-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;}", ".fkjuxzh{-webkit-flex-basis:0px;-ms-flex-preferred-size:0px;flex-basis:0px;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".fqgjdyf svg{width:28px;}", ".fppfxz8 svg{height:28px;}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".fkfq4zb{color:var(--colorNeutralForeground2);}"]
52
+ d: [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fsnqrgy{-webkit-column-gap:var(--spacingHorizontalS);column-gap:var(--spacingHorizontalS);}", ".fylz90v{row-gap:var(--spacingHorizontalS);}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f1neuvcm{-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;}", ".fkjuxzh{-webkit-flex-basis:0px;-ms-flex-preferred-size:0px;flex-basis:0px;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".f4ybsrx{font-size:16px;}", ".fe5j1ua{font-size:20px;}", ".f1rt2boy{font-size:24px;}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fkfq4zb{color:var(--colorNeutralForeground2);}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}"]
45
53
  });
46
54
  /**
47
55
  * Apply styling to the TableCellLayout slots based on the state
48
56
  */
49
-
50
-
51
57
  export const useTableCellLayoutStyles_unstable = state => {
52
58
  const styles = useStyles();
53
59
  state.root.className = mergeClasses(tableCellLayoutClassNames.root, styles.root, state.root.className);
54
60
  const primary = state.appearance === 'primary';
55
-
56
61
  if (state.media) {
57
- state.media.className = mergeClasses(tableCellLayoutClassNames.media, styles.media, primary && styles.mediaPrimary, state.media.className);
62
+ const mediaSizedStyles = {
63
+ small: styles.mediaSmallAndMedium,
64
+ medium: styles.mediaSmallAndMedium,
65
+ 'extra-small': styles.mediaExtraSmall
66
+ };
67
+ state.media.className = mergeClasses(tableCellLayoutClassNames.media, styles.media, mediaSizedStyles[state.size], primary && styles.mediaPrimary, state.media.className);
58
68
  }
59
-
60
69
  if (state.main) {
61
70
  state.main.className = mergeClasses(tableCellLayoutClassNames.main, primary && styles.mainPrimary, state.main.className);
62
71
  }
63
-
64
72
  if (state.description) {
65
73
  state.description.className = mergeClasses(tableCellLayoutClassNames.description, styles.description, state.description.className);
66
74
  }
67
-
68
- if (state.wrapper) {
69
- state.wrapper.className = mergeClasses(tableCellLayoutClassNames.wrapper, styles.wrapper, state.wrapper.className);
75
+ if (state.content) {
76
+ state.content.className = mergeClasses(tableCellLayoutClassNames.content, styles.content, state.content.className);
70
77
  }
71
-
72
78
  return state;
73
79
  };
74
80
  //# sourceMappingURL=useTableCellLayoutStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/TableCellLayout/useTableCellLayoutStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,EAAmC,UAAnC,QAAqD,gBAArD;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAIA,OAAO,MAAM,yBAAyB,GAAyC;EAC7E,IAAI,EAAE,qBADuE;EAE7E,KAAK,EAAE,4BAFsE;EAG7E,IAAI,EAAE,2BAHuE;EAI7E,WAAW,EAAE,kCAJgE;EAK7E,OAAO,EAAE;AALoE,CAAxE;AAQP;;AAEG;;AACH,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AAkCA;;AAEG;;;AACH,OAAO,MAAM,iCAAiC,GAAI,KAAD,IAAsD;EACrG,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,yBAAyB,CAAC,IAA3B,EAAiC,MAAM,CAAC,IAAxC,EAA8C,KAAK,CAAC,IAAN,CAAW,SAAzD,CAAnC;EACA,MAAM,OAAO,GAAG,KAAK,CAAC,UAAN,KAAqB,SAArC;;EAEA,IAAI,KAAK,CAAC,KAAV,EAAiB;IACf,KAAK,CAAC,KAAN,CAAY,SAAZ,GAAwB,YAAY,CAClC,yBAAyB,CAAC,KADQ,EAElC,MAAM,CAAC,KAF2B,EAGlC,OAAO,IAAI,MAAM,CAAC,YAHgB,EAIlC,KAAK,CAAC,KAAN,CAAY,SAJsB,CAApC;EAMD;;EAED,IAAI,KAAK,CAAC,IAAV,EAAgB;IACd,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,yBAAyB,CAAC,IADO,EAEjC,OAAO,IAAI,MAAM,CAAC,WAFe,EAGjC,KAAK,CAAC,IAAN,CAAW,SAHsB,CAAnC;EAKD;;EAED,IAAI,KAAK,CAAC,WAAV,EAAuB;IACrB,KAAK,CAAC,WAAN,CAAkB,SAAlB,GAA8B,YAAY,CACxC,yBAAyB,CAAC,WADc,EAExC,MAAM,CAAC,WAFiC,EAGxC,KAAK,CAAC,WAAN,CAAkB,SAHsB,CAA1C;EAKD;;EAED,IAAI,KAAK,CAAC,OAAV,EAAmB;IACjB,KAAK,CAAC,OAAN,CAAc,SAAd,GAA0B,YAAY,CAAC,yBAAyB,CAAC,OAA3B,EAAoC,MAAM,CAAC,OAA3C,EAAoD,KAAK,CAAC,OAAN,CAAc,SAAlE,CAAtC;EACD;;EAED,OAAO,KAAP;AACD,CAnCM","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { TableCellLayoutSlots, TableCellLayoutState } from './TableCellLayout.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableCellLayoutClassNames: SlotClassNames<TableCellLayoutSlots> = {\n root: 'fui-TableCellLayout',\n media: 'fui-TableCellLayout__media',\n main: 'fui-TableCellLayout__main',\n description: 'fui-TableCellLayout__description',\n wrapper: 'fui-TableCellLayout__wrapper',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n ...shorthands.gap(tokens.spacingHorizontalS),\n ...shorthands.flex(1, 1, '0px'),\n },\n wrapper: {\n display: 'flex',\n flexDirection: 'column',\n },\n\n media: {\n display: 'flex',\n alignItems: 'center',\n },\n\n mediaPrimary: {\n '& svg': {\n width: '28px',\n height: '28px',\n },\n },\n\n mainPrimary: {\n fontWeight: tokens.fontWeightSemibold,\n },\n\n description: {\n fontSize: tokens.fontSizeBase300,\n color: tokens.colorNeutralForeground2,\n },\n});\n\n/**\n * Apply styling to the TableCellLayout slots based on the state\n */\nexport const useTableCellLayoutStyles_unstable = (state: TableCellLayoutState): TableCellLayoutState => {\n const styles = useStyles();\n state.root.className = mergeClasses(tableCellLayoutClassNames.root, styles.root, state.root.className);\n const primary = state.appearance === 'primary';\n\n if (state.media) {\n state.media.className = mergeClasses(\n tableCellLayoutClassNames.media,\n styles.media,\n primary && styles.mediaPrimary,\n state.media.className,\n );\n }\n\n if (state.main) {\n state.main.className = mergeClasses(\n tableCellLayoutClassNames.main,\n primary && styles.mainPrimary,\n state.main.className,\n );\n }\n\n if (state.description) {\n state.description.className = mergeClasses(\n tableCellLayoutClassNames.description,\n styles.description,\n state.description.className,\n );\n }\n\n if (state.wrapper) {\n state.wrapper.className = mergeClasses(tableCellLayoutClassNames.wrapper, styles.wrapper, state.wrapper.className);\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,mBAAqBA,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,QAAQ,uBAAuB;AAG9C,SAASC,gBAAgB,QAAQ,uBAAuB;AAExD,OAAO,MAAMC,yBAAyB,GAAyC;EAC7EC,IAAI,EAAE,qBAAqB;EAC3BC,KAAK,EAAE,4BAA4B;EACnCC,IAAI,EAAE,2BAA2B;EACjCC,WAAW,EAAE,kCAAkC;EAC/CC,OAAO,EAAE;CACV;AAED;;;AAGA,MAAMC,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAqChB;AAEF;;;AAGA,OAAO,MAAMC,iCAAiC,GAAIC,KAA2B,IAA0B;EACrG,MAAMC,MAAM,GAAGH,SAAS,EAAE;EAC1BE,KAAK,CAACP,IAAI,CAACS,SAAS,GAAGd,YAAY,CAACI,yBAAyB,CAACC,IAAI,EAAEQ,MAAM,CAACR,IAAI,EAAEO,KAAK,CAACP,IAAI,CAACS,SAAS,CAAC;EACtG,MAAMC,OAAO,GAAGH,KAAK,CAACI,UAAU,KAAK,SAAS;EAE9C,IAAIJ,KAAK,CAACN,KAAK,EAAE;IACf,MAAMW,gBAAgB,GAAG;MACvBC,KAAK,EAAEL,MAAM,CAACM,mBAAmB;MACjCC,MAAM,EAAEP,MAAM,CAACM,mBAAmB;MAClC,aAAa,EAAEN,MAAM,CAACQ;KACvB;IAEDT,KAAK,CAACN,KAAK,CAACQ,SAAS,GAAGd,YAAY,CAClCI,yBAAyB,CAACE,KAAK,EAC/BO,MAAM,CAACP,KAAK,EACZW,gBAAgB,CAACL,KAAK,CAACU,IAAI,CAAC,EAC5BP,OAAO,IAAIF,MAAM,CAACU,YAAY,EAC9BX,KAAK,CAACN,KAAK,CAACQ,SAAS,CACtB;;EAGH,IAAIF,KAAK,CAACL,IAAI,EAAE;IACdK,KAAK,CAACL,IAAI,CAACO,SAAS,GAAGd,YAAY,CACjCI,yBAAyB,CAACG,IAAI,EAC9BQ,OAAO,IAAIF,MAAM,CAACW,WAAW,EAC7BZ,KAAK,CAACL,IAAI,CAACO,SAAS,CACrB;;EAGH,IAAIF,KAAK,CAACJ,WAAW,EAAE;IACrBI,KAAK,CAACJ,WAAW,CAACM,SAAS,GAAGd,YAAY,CACxCI,yBAAyB,CAACI,WAAW,EACrCK,MAAM,CAACL,WAAW,EAClBI,KAAK,CAACJ,WAAW,CAACM,SAAS,CAC5B;;EAGH,IAAIF,KAAK,CAACH,OAAO,EAAE;IACjBG,KAAK,CAACH,OAAO,CAACK,SAAS,GAAGd,YAAY,CAACI,yBAAyB,CAACK,OAAO,EAAEI,MAAM,CAACJ,OAAO,EAAEG,KAAK,CAACH,OAAO,CAACK,SAAS,CAAC;;EAGpH,OAAOF,KAAK;AACd,CAAC","names":["mergeClasses","shorthands","tokens","typographyStyles","tableCellLayoutClassNames","root","media","main","description","content","useStyles","useTableCellLayoutStyles_unstable","state","styles","className","primary","appearance","mediaSizedStyles","small","mediaSmallAndMedium","medium","mediaExtraSmall","size","mediaPrimary","mainPrimary"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCellLayout/useTableCellLayoutStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { TableCellLayoutSlots, TableCellLayoutState } from './TableCellLayout.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { typographyStyles } from '@fluentui/react-theme';\n\nexport const tableCellLayoutClassNames: SlotClassNames<TableCellLayoutSlots> = {\n root: 'fui-TableCellLayout',\n media: 'fui-TableCellLayout__media',\n main: 'fui-TableCellLayout__main',\n description: 'fui-TableCellLayout__description',\n content: 'fui-TableCellLayout__content',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n ...shorthands.gap(tokens.spacingHorizontalS),\n ...shorthands.flex(1, 1, '0px'),\n },\n content: {\n display: 'flex',\n flexDirection: 'column',\n },\n\n media: {\n display: 'flex',\n alignItems: 'center',\n },\n\n mediaExtraSmall: {\n fontSize: '16px',\n },\n\n mediaSmallAndMedium: {\n fontSize: '20px',\n },\n\n mediaPrimary: {\n fontSize: '24px',\n },\n\n mainPrimary: {\n fontWeight: tokens.fontWeightSemibold,\n },\n\n description: {\n color: tokens.colorNeutralForeground2,\n ...typographyStyles.caption1,\n },\n});\n\n/**\n * Apply styling to the TableCellLayout slots based on the state\n */\nexport const useTableCellLayoutStyles_unstable = (state: TableCellLayoutState): TableCellLayoutState => {\n const styles = useStyles();\n state.root.className = mergeClasses(tableCellLayoutClassNames.root, styles.root, state.root.className);\n const primary = state.appearance === 'primary';\n\n if (state.media) {\n const mediaSizedStyles = {\n small: styles.mediaSmallAndMedium,\n medium: styles.mediaSmallAndMedium,\n 'extra-small': styles.mediaExtraSmall,\n };\n\n state.media.className = mergeClasses(\n tableCellLayoutClassNames.media,\n styles.media,\n mediaSizedStyles[state.size],\n primary && styles.mediaPrimary,\n state.media.className,\n );\n }\n\n if (state.main) {\n state.main.className = mergeClasses(\n tableCellLayoutClassNames.main,\n primary && styles.mainPrimary,\n state.main.className,\n );\n }\n\n if (state.description) {\n state.description.className = mergeClasses(\n tableCellLayoutClassNames.description,\n styles.description,\n state.description.className,\n );\n }\n\n if (state.content) {\n state.content.className = mergeClasses(tableCellLayoutClassNames.content, styles.content, state.content.className);\n }\n\n return state;\n};\n"]}
@@ -3,9 +3,8 @@ import { useTableHeader_unstable } from './useTableHeader';
3
3
  import { renderTableHeader_unstable } from './renderTableHeader';
4
4
  import { useTableHeaderStyles_unstable } from './useTableHeaderStyles';
5
5
  /**
6
- * TableHeader component - TODO: add more docs
6
+ * TableHeader component
7
7
  */
8
-
9
8
  export const TableHeader = /*#__PURE__*/React.forwardRef((props, ref) => {
10
9
  const state = useTableHeader_unstable(props, ref);
11
10
  useTableHeaderStyles_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/TableHeader/TableHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,uBAAT,QAAwC,kBAAxC;AACA,SAAS,0BAAT,QAA2C,qBAA3C;AACA,SAAS,6BAAT,QAA8C,wBAA9C;AAIA;;AAEG;;AACH,OAAO,MAAM,WAAW,gBAA0C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAChG,MAAM,KAAK,GAAG,uBAAuB,CAAC,KAAD,EAAQ,GAAR,CAArC;EAEA,6BAA6B,CAAC,KAAD,CAA7B;EACA,OAAO,0BAA0B,CAAC,KAAD,CAAjC;AACD,CALiE,CAA3D;AAOP,WAAW,CAAC,WAAZ,GAA0B,aAA1B","sourcesContent":["import * as React from 'react';\nimport { useTableHeader_unstable } from './useTableHeader';\nimport { renderTableHeader_unstable } from './renderTableHeader';\nimport { useTableHeaderStyles_unstable } from './useTableHeaderStyles';\nimport type { TableHeaderProps } from './TableHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableHeader component - TODO: add more docs\n */\nexport const TableHeader: ForwardRefComponent<TableHeaderProps> = React.forwardRef((props, ref) => {\n const state = useTableHeader_unstable(props, ref);\n\n useTableHeaderStyles_unstable(state);\n return renderTableHeader_unstable(state);\n});\n\nTableHeader.displayName = 'TableHeader';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,uBAAuB,QAAQ,kBAAkB;AAC1D,SAASC,0BAA0B,QAAQ,qBAAqB;AAChE,SAASC,6BAA6B,QAAQ,wBAAwB;AAItE;;;AAGA,OAAO,MAAMC,WAAW,gBAA0CJ,KAAK,CAACK,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAChG,MAAMC,KAAK,GAAGP,uBAAuB,CAACK,KAAK,EAAEC,GAAG,CAAC;EAEjDJ,6BAA6B,CAACK,KAAK,CAAC;EACpC,OAAON,0BAA0B,CAACM,KAAK,CAAC;AAC1C,CAAC,CAAC;AAEFJ,WAAW,CAACK,WAAW,GAAG,aAAa","names":["React","useTableHeader_unstable","renderTableHeader_unstable","useTableHeaderStyles_unstable","TableHeader","forwardRef","props","ref","state","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableHeader/TableHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTableHeader_unstable } from './useTableHeader';\nimport { renderTableHeader_unstable } from './renderTableHeader';\nimport { useTableHeaderStyles_unstable } from './useTableHeaderStyles';\nimport type { TableHeaderProps } from './TableHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableHeader component\n */\nexport const TableHeader: ForwardRefComponent<TableHeaderProps> = React.forwardRef((props, ref) => {\n const state = useTableHeader_unstable(props, ref);\n\n useTableHeaderStyles_unstable(state);\n return renderTableHeader_unstable(state);\n});\n\nTableHeader.displayName = 'TableHeader';\n"]}
@@ -4,7 +4,6 @@ import { TableHeaderContextProvider } from '../../contexts/tableHeaderContext';
4
4
  /**
5
5
  * Render the final JSX of TableHeader
6
6
  */
7
-
8
7
  export const renderTableHeader_unstable = state => {
9
8
  const {
10
9
  slots,
@@ -12,7 +11,8 @@ export const renderTableHeader_unstable = state => {
12
11
  } = getSlots(state);
13
12
  return /*#__PURE__*/React.createElement(TableHeaderContextProvider, {
14
13
  value: ""
15
- }, /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
14
+ }, /*#__PURE__*/React.createElement(slots.root, {
15
+ ...slotProps.root
16
16
  }));
17
17
  };
18
18
  //# sourceMappingURL=renderTableHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/TableHeader/renderTableHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AACA,SAAS,0BAAT,QAA2C,mCAA3C;AAGA;;AAEG;;AACH,OAAO,MAAM,0BAA0B,GAAI,KAAD,IAA4B;EACpE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAmB,KAAnB,CAArC;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,0BAAD,EAA2B;IAAC,KAAK,EAAC;EAAP,CAA3B,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CADF,CADF;AAKD,CARM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { TableHeaderContextProvider } from '../../contexts/tableHeaderContext';\nimport type { TableHeaderState, TableHeaderSlots } from './TableHeader.types';\n\n/**\n * Render the final JSX of TableHeader\n */\nexport const renderTableHeader_unstable = (state: TableHeaderState) => {\n const { slots, slotProps } = getSlots<TableHeaderSlots>(state);\n\n return (\n <TableHeaderContextProvider value=\"\">\n <slots.root {...slotProps.root} />\n </TableHeaderContextProvider>\n );\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AACpD,SAASC,0BAA0B,QAAQ,mCAAmC;AAG9E;;;AAGA,OAAO,MAAMC,0BAA0B,GAAIC,KAAuB,IAAI;EACpE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGL,QAAQ,CAAmBG,KAAK,CAAC;EAE9D,oBACEJ,oBAACE,0BAA0B;IAACK,KAAK,EAAC;EAAE,gBAClCP,oBAACK,KAAK,CAACG,IAAI;IAAA,GAAKF,SAAS,CAACE;EAAI,EAAI,CACP;AAEjC,CAAC","names":["React","getSlots","TableHeaderContextProvider","renderTableHeader_unstable","state","slots","slotProps","value","root"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableHeader/renderTableHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { TableHeaderContextProvider } from '../../contexts/tableHeaderContext';\nimport type { TableHeaderState, TableHeaderSlots } from './TableHeader.types';\n\n/**\n * Render the final JSX of TableHeader\n */\nexport const renderTableHeader_unstable = (state: TableHeaderState) => {\n const { slots, slotProps } = getSlots<TableHeaderSlots>(state);\n\n return (\n <TableHeaderContextProvider value=\"\">\n <slots.root {...slotProps.root} />\n </TableHeaderContextProvider>\n );\n};\n"]}
@@ -1,5 +1,4 @@
1
1
  import { getNativeElementProps } from '@fluentui/react-utilities';
2
- import { useArrowNavigationGroup } from '@fluentui/react-tabster';
3
2
  import { useTableContext } from '../../contexts/tableContext';
4
3
  /**
5
4
  * Create the state required to render TableHeader.
@@ -10,18 +9,11 @@ import { useTableContext } from '../../contexts/tableContext';
10
9
  * @param props - props from this instance of TableHeader
11
10
  * @param ref - reference to root HTMLElement of TableHeader
12
11
  */
13
-
14
12
  export const useTableHeader_unstable = (props, ref) => {
15
13
  var _a;
16
-
17
14
  const {
18
- noNativeElements,
19
- sortable
15
+ noNativeElements
20
16
  } = useTableContext();
21
- const keyboardNavAttr = useArrowNavigationGroup({
22
- axis: 'horizontal',
23
- circular: true
24
- });
25
17
  const rootComponent = ((_a = props.as) !== null && _a !== void 0 ? _a : noNativeElements) ? 'div' : 'thead';
26
18
  return {
27
19
  components: {
@@ -30,7 +22,6 @@ export const useTableHeader_unstable = (props, ref) => {
30
22
  root: getNativeElementProps(rootComponent, {
31
23
  ref,
32
24
  role: rootComponent === 'div' ? 'rowgroup' : undefined,
33
- ...(sortable && keyboardNavAttr),
34
25
  ...props
35
26
  }),
36
27
  noNativeElements
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/TableHeader/useTableHeader.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AACA,SAAS,uBAAT,QAAwC,yBAAxC;AAEA,SAAS,eAAT,QAAgC,6BAAhC;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,uBAAuB,GAAG,CAAC,KAAD,EAA0B,GAA1B,KAA2E;;;EAChH,MAAM;IAAE,gBAAF;IAAoB;EAApB,IAAiC,eAAe,EAAtD;EACA,MAAM,eAAe,GAAG,uBAAuB,CAAC;IAAE,IAAI,EAAE,YAAR;IAAsB,QAAQ,EAAE;EAAhC,CAAD,CAA/C;EAEA,MAAM,aAAa,GAAG,CAAA,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,gBAAZ,IAA+B,KAA/B,GAAuC,OAA7D;EACA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,qBAAqB,CAAC,aAAD,EAAgB;MACzC,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,UAA1B,GAAuC,SAFJ;MAGzC,IAAI,QAAQ,IAAI,eAAhB,CAHyC;MAIzC,GAAG;IAJsC,CAAhB,CAJtB;IAUL;EAVK,CAAP;AAYD,CAjBM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport type { TableHeaderProps, TableHeaderState } from './TableHeader.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableHeader.\n *\n * The returned state can be modified with hooks such as useTableHeaderStyles_unstable,\n * before being passed to renderTableHeader_unstable.\n *\n * @param props - props from this instance of TableHeader\n * @param ref - reference to root HTMLElement of TableHeader\n */\nexport const useTableHeader_unstable = (props: TableHeaderProps, ref: React.Ref<HTMLElement>): TableHeaderState => {\n const { noNativeElements, sortable } = useTableContext();\n const keyboardNavAttr = useArrowNavigationGroup({ axis: 'horizontal', circular: true });\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'thead';\n return {\n components: {\n root: rootComponent,\n },\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'rowgroup' : undefined,\n ...(sortable && keyboardNavAttr),\n ...props,\n }),\n noNativeElements,\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AACA,SAASA,qBAAqB,QAAQ,2BAA2B;AAEjE,SAASC,eAAe,QAAQ,6BAA6B;AAE7D;;;;;;;;;AASA,OAAO,MAAMC,uBAAuB,GAAG,CAACC,KAAuB,EAAEC,GAA2B,KAAsB;;EAChH,MAAM;IAAEC;EAAgB,CAAE,GAAGJ,eAAe,EAAE;EAE9C,MAAMK,aAAa,GAAG,YAAK,CAACC,EAAE,mCAAIF,gBAAgB,IAAG,KAAK,GAAG,OAAO;EACpE,OAAO;IACLG,UAAU,EAAE;MACVC,IAAI,EAAEH;KACP;IACDG,IAAI,EAAET,qBAAqB,CAACM,aAAa,EAAE;MACzCF,GAAG;MACHM,IAAI,EAAEJ,aAAa,KAAK,KAAK,GAAG,UAAU,GAAGK,SAAS;MACtD,GAAGR;KACJ,CAAC;IACFE;GACD;AACH,CAAC","names":["getNativeElementProps","useTableContext","useTableHeader_unstable","props","ref","noNativeElements","rootComponent","as","components","root","role","undefined"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableHeader/useTableHeader.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { TableHeaderProps, TableHeaderState } from './TableHeader.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableHeader.\n *\n * The returned state can be modified with hooks such as useTableHeaderStyles_unstable,\n * before being passed to renderTableHeader_unstable.\n *\n * @param props - props from this instance of TableHeader\n * @param ref - reference to root HTMLElement of TableHeader\n */\nexport const useTableHeader_unstable = (props: TableHeaderProps, ref: React.Ref<HTMLElement>): TableHeaderState => {\n const { noNativeElements } = useTableContext();\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'thead';\n return {\n components: {\n root: rootComponent,\n },\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'rowgroup' : undefined,\n ...props,\n }),\n noNativeElements,\n };\n};\n"]}
@@ -3,33 +3,23 @@ export const tableHeaderClassName = 'fui-TableHeader';
3
3
  export const tableHeaderClassNames = {
4
4
  root: 'fui-TableHeader'
5
5
  };
6
-
7
6
  const useFlexLayoutStyles = /*#__PURE__*/__styles({
8
- "root": {
9
- "mc9l5x": "ftgm304"
10
- },
11
- "roottable": {
12
- "mc9l5x": "f1tp1avn"
13
- },
14
- "rootFlex": {
15
- "mc9l5x": "ftgm304"
7
+ root: {
8
+ mc9l5x: "ftgm304"
16
9
  }
17
10
  }, {
18
- "d": [".ftgm304{display:block;}", ".f1tp1avn{display:table-row-group;}"]
11
+ d: [".ftgm304{display:block;}"]
19
12
  });
20
-
21
13
  const useTableLayoutStyles = /*#__PURE__*/__styles({
22
- "root": {
23
- "mc9l5x": "f1tp1avn"
14
+ root: {
15
+ mc9l5x: "f1tp1avn"
24
16
  }
25
17
  }, {
26
- "d": [".f1tp1avn{display:table-row-group;}"]
18
+ d: [".f1tp1avn{display:table-row-group;}"]
27
19
  });
28
20
  /**
29
21
  * Apply styling to the TableHeader slots based on the state
30
22
  */
31
-
32
-
33
23
  export const useTableHeaderStyles_unstable = state => {
34
24
  const layoutStyles = {
35
25
  table: useTableLayoutStyles(),
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/TableHeader/useTableHeaderStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,gBAAzC;AAIA,OAAO,MAAM,oBAAoB,GAAG,iBAA7B;AACP,OAAO,MAAM,qBAAqB,GAAqC;EACrE,IAAI,EAAE;AAD+D,CAAhE;;AAIP,MAAM,mBAAmB,gBAAG;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA5B;;AAcA,MAAM,oBAAoB,gBAAG;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA7B;AAMA;;AAEG;;;AACH,OAAO,MAAM,6BAA6B,GAAI,KAAD,IAA8C;EACzF,MAAM,YAAY,GAAG;IACnB,KAAK,EAAE,oBAAoB,EADR;IAEnB,IAAI,EAAE,mBAAmB;EAFN,CAArB;EAIA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,oBADiC,EAEjC,KAAK,CAAC,gBAAN,GAAyB,YAAY,CAAC,IAAb,CAAkB,IAA3C,GAAkD,YAAY,CAAC,KAAb,CAAmB,IAFpC,EAGjC,KAAK,CAAC,IAAN,CAAW,SAHsB,CAAnC;EAMA,OAAO,KAAP;AACD,CAZM","sourcesContent":["import { mergeClasses, makeStyles } from '@griffel/react';\nimport type { TableHeaderSlots, TableHeaderState } from './TableHeader.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableHeaderClassName = 'fui-TableHeader';\nexport const tableHeaderClassNames: SlotClassNames<TableHeaderSlots> = {\n root: 'fui-TableHeader',\n};\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'block',\n },\n\n roottable: {\n display: 'table-row-group',\n },\n\n rootFlex: {\n display: 'block',\n },\n});\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-row-group',\n },\n});\n\n/**\n * Apply styling to the TableHeader slots based on the state\n */\nexport const useTableHeaderStyles_unstable = (state: TableHeaderState): TableHeaderState => {\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableHeaderClassName,\n state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,SAASA,YAAY,kBAAoB,gBAAgB;AAIzD,OAAO,MAAMC,oBAAoB,GAAG,iBAAiB;AACrD,OAAO,MAAMC,qBAAqB,GAAqC;EACrEC,IAAI,EAAE;CACP;AAED,MAAMC,mBAAmB,gBAAG;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAI1B;AAEF,MAAMC,oBAAoB,gBAAG;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAI3B;AAEF;;;AAGA,OAAO,MAAMC,6BAA6B,GAAIC,KAAuB,IAAsB;EACzF,MAAMC,YAAY,GAAG;IACnBC,KAAK,EAAEJ,oBAAoB,EAAE;IAC7BK,IAAI,EAAEN,mBAAmB;GAC1B;EACDG,KAAK,CAACJ,IAAI,CAACQ,SAAS,GAAGX,YAAY,CACjCC,oBAAoB,EACpBM,KAAK,CAACK,gBAAgB,GAAGJ,YAAY,CAACE,IAAI,CAACP,IAAI,GAAGK,YAAY,CAACC,KAAK,CAACN,IAAI,EACzEI,KAAK,CAACJ,IAAI,CAACQ,SAAS,CACrB;EAED,OAAOJ,KAAK;AACd,CAAC","names":["mergeClasses","tableHeaderClassName","tableHeaderClassNames","root","useFlexLayoutStyles","useTableLayoutStyles","useTableHeaderStyles_unstable","state","layoutStyles","table","flex","className","noNativeElements"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableHeader/useTableHeaderStyles.ts"],"sourcesContent":["import { mergeClasses, makeStyles } from '@griffel/react';\nimport type { TableHeaderSlots, TableHeaderState } from './TableHeader.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableHeaderClassName = 'fui-TableHeader';\nexport const tableHeaderClassNames: SlotClassNames<TableHeaderSlots> = {\n root: 'fui-TableHeader',\n};\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'block',\n },\n});\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-row-group',\n },\n});\n\n/**\n * Apply styling to the TableHeader slots based on the state\n */\nexport const useTableHeaderStyles_unstable = (state: TableHeaderState): TableHeaderState => {\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableHeaderClassName,\n state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,\n state.root.className,\n );\n\n return state;\n};\n"]}
@@ -3,9 +3,8 @@ import { useTableHeaderCell_unstable } from './useTableHeaderCell';
3
3
  import { renderTableHeaderCell_unstable } from './renderTableHeaderCell';
4
4
  import { useTableHeaderCellStyles_unstable } from './useTableHeaderCellStyles';
5
5
  /**
6
- * TableHeaderCell component - TODO: add more docs
6
+ * TableHeaderCell component
7
7
  */
8
-
9
8
  export const TableHeaderCell = /*#__PURE__*/React.forwardRef((props, ref) => {
10
9
  const state = useTableHeaderCell_unstable(props, ref);
11
10
  useTableHeaderCellStyles_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/TableHeaderCell/TableHeaderCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,2BAAT,QAA4C,sBAA5C;AACA,SAAS,8BAAT,QAA+C,yBAA/C;AACA,SAAS,iCAAT,QAAkD,4BAAlD;AAIA;;AAEG;;AACH,OAAO,MAAM,eAAe,gBAA8C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACxG,MAAM,KAAK,GAAG,2BAA2B,CAAC,KAAD,EAAQ,GAAR,CAAzC;EAEA,iCAAiC,CAAC,KAAD,CAAjC;EACA,OAAO,8BAA8B,CAAC,KAAD,CAArC;AACD,CALyE,CAAnE;AAOP,eAAe,CAAC,WAAhB,GAA8B,iBAA9B","sourcesContent":["import * as React from 'react';\nimport { useTableHeaderCell_unstable } from './useTableHeaderCell';\nimport { renderTableHeaderCell_unstable } from './renderTableHeaderCell';\nimport { useTableHeaderCellStyles_unstable } from './useTableHeaderCellStyles';\nimport type { TableHeaderCellProps } from './TableHeaderCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableHeaderCell component - TODO: add more docs\n */\nexport const TableHeaderCell: ForwardRefComponent<TableHeaderCellProps> = React.forwardRef((props, ref) => {\n const state = useTableHeaderCell_unstable(props, ref);\n\n useTableHeaderCellStyles_unstable(state);\n return renderTableHeaderCell_unstable(state);\n});\n\nTableHeaderCell.displayName = 'TableHeaderCell';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,2BAA2B,QAAQ,sBAAsB;AAClE,SAASC,8BAA8B,QAAQ,yBAAyB;AACxE,SAASC,iCAAiC,QAAQ,4BAA4B;AAI9E;;;AAGA,OAAO,MAAMC,eAAe,gBAA8CJ,KAAK,CAACK,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACxG,MAAMC,KAAK,GAAGP,2BAA2B,CAACK,KAAK,EAAEC,GAAG,CAAC;EAErDJ,iCAAiC,CAACK,KAAK,CAAC;EACxC,OAAON,8BAA8B,CAACM,KAAK,CAAC;AAC9C,CAAC,CAAC;AAEFJ,eAAe,CAACK,WAAW,GAAG,iBAAiB","names":["React","useTableHeaderCell_unstable","renderTableHeaderCell_unstable","useTableHeaderCellStyles_unstable","TableHeaderCell","forwardRef","props","ref","state","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableHeaderCell/TableHeaderCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTableHeaderCell_unstable } from './useTableHeaderCell';\nimport { renderTableHeaderCell_unstable } from './renderTableHeaderCell';\nimport { useTableHeaderCellStyles_unstable } from './useTableHeaderCellStyles';\nimport type { TableHeaderCellProps } from './TableHeaderCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableHeaderCell component\n */\nexport const TableHeaderCell: ForwardRefComponent<TableHeaderCellProps> = React.forwardRef((props, ref) => {\n const state = useTableHeaderCell_unstable(props, ref);\n\n useTableHeaderCellStyles_unstable(state);\n return renderTableHeaderCell_unstable(state);\n});\n\nTableHeaderCell.displayName = 'TableHeaderCell';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TableHeaderCell.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableHeaderCell/TableHeaderCell.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { ARIAButtonSlotProps } from '@fluentui/react-aria';\nimport { SortDirection, TableContextValue } from '../Table/Table.types';\n\nexport type TableHeaderCellSlots = {\n root: Slot<'th', 'div'>;\n\n sortIcon: Slot<'span'>;\n\n /**\n * Button handles correct narration and interactions for sorting;\n */\n button: NonNullable<Slot<ARIAButtonSlotProps>>;\n};\n\n/**\n * TableHeaderCell Props\n */\nexport type TableHeaderCellProps = ComponentProps<Partial<TableHeaderCellSlots>> & {\n sortDirection?: SortDirection;\n};\n\n/**\n * State used in rendering TableHeaderCell\n */\nexport type TableHeaderCellState = ComponentState<TableHeaderCellSlots> &\n Pick<TableContextValue, 'noNativeElements' | 'sortable'>;\n"]}
1
+ {"version":3,"file":"TableHeaderCell.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableHeaderCell/TableHeaderCell.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { ARIAButtonSlotProps } from '@fluentui/react-aria';\nimport { SortDirection, TableContextValue } from '../Table/Table.types';\n\nexport type TableHeaderCellSlots = {\n root: Slot<'th', 'div'>;\n\n sortIcon: Slot<'span'>;\n\n /**\n * Button handles correct narration and interactions for sorting;\n */\n button: NonNullable<Slot<ARIAButtonSlotProps>>;\n};\n\n/**\n * TableHeaderCell Props\n */\nexport type TableHeaderCellProps = ComponentProps<Partial<TableHeaderCellSlots>> & {\n /**\n * @default undefined\n */\n sortDirection?: SortDirection;\n};\n\n/**\n * State used in rendering TableHeaderCell\n */\nexport type TableHeaderCellState = ComponentState<TableHeaderCellSlots> &\n Pick<TableContextValue, 'noNativeElements' | 'sortable'>;\n"]}
@@ -3,15 +3,17 @@ import { getSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Render the final JSX of TableHeaderCell
5
5
  */
6
-
7
6
  export const renderTableHeaderCell_unstable = state => {
8
7
  const {
9
8
  slots,
10
9
  slotProps
11
10
  } = getSlots(state);
12
- return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
13
- }, /*#__PURE__*/React.createElement(slots.button, { ...slotProps.button
14
- }, slotProps.root.children, slots.sortIcon && /*#__PURE__*/React.createElement(slots.sortIcon, { ...slotProps.sortIcon
11
+ return /*#__PURE__*/React.createElement(slots.root, {
12
+ ...slotProps.root
13
+ }, /*#__PURE__*/React.createElement(slots.button, {
14
+ ...slotProps.button
15
+ }, slotProps.root.children, slots.sortIcon && /*#__PURE__*/React.createElement(slots.sortIcon, {
16
+ ...slotProps.sortIcon
15
17
  })));
16
18
  };
17
19
  //# sourceMappingURL=renderTableHeaderCell.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/TableHeaderCell/renderTableHeaderCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,8BAA8B,GAAI,KAAD,IAAgC;EAC5E,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAuB,KAAvB,CAArC;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,MAAP,EAAa,EAAA,GAAK,SAAS,CAAC;EAAf,CAAb,EACG,SAAS,CAAC,IAAV,CAAe,QADlB,EAEG,KAAK,CAAC,QAAN,iBAAkB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAP,EAAe,EAAA,GAAK,SAAS,CAAC;EAAf,CAAf,CAFrB,CADF,CADF;AAQD,CAXM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableHeaderCellState, TableHeaderCellSlots } from './TableHeaderCell.types';\n\n/**\n * Render the final JSX of TableHeaderCell\n */\nexport const renderTableHeaderCell_unstable = (state: TableHeaderCellState) => {\n const { slots, slotProps } = getSlots<TableHeaderCellSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n <slots.button {...slotProps.button}>\n {slotProps.root.children}\n {slots.sortIcon && <slots.sortIcon {...slotProps.sortIcon} />}\n </slots.button>\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;AAGA,OAAO,MAAMC,8BAA8B,GAAIC,KAA2B,IAAI;EAC5E,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAuBE,KAAK,CAAC;EAElE,oBACEH,oBAACI,KAAK,CAACE,IAAI;IAAA,GAAKD,SAAS,CAACC;EAAI,gBAC5BN,oBAACI,KAAK,CAACG,MAAM;IAAA,GAAKF,SAAS,CAACE;EAAM,GAC/BF,SAAS,CAACC,IAAI,CAACE,QAAQ,EACvBJ,KAAK,CAACK,QAAQ,iBAAIT,oBAACI,KAAK,CAACK,QAAQ;IAAA,GAAKJ,SAAS,CAACI;EAAQ,EAAI,CAChD,CACJ;AAEjB,CAAC","names":["React","getSlots","renderTableHeaderCell_unstable","state","slots","slotProps","root","button","children","sortIcon"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableHeaderCell/renderTableHeaderCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableHeaderCellState, TableHeaderCellSlots } from './TableHeaderCell.types';\n\n/**\n * Render the final JSX of TableHeaderCell\n */\nexport const renderTableHeaderCell_unstable = (state: TableHeaderCellState) => {\n const { slots, slotProps } = getSlots<TableHeaderCellSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n <slots.button {...slotProps.button}>\n {slotProps.root.children}\n {slots.sortIcon && <slots.sortIcon {...slotProps.sortIcon} />}\n </slots.button>\n </slots.root>\n );\n};\n"]}
@@ -1,11 +1,16 @@
1
1
  import * as React from 'react';
2
- import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';
2
+ import { getNativeElementProps, resolveShorthand, useMergedRefs } from '@fluentui/react-utilities';
3
+ import { useFocusWithin } from '@fluentui/react-tabster';
3
4
  import { ArrowUpRegular, ArrowDownRegular } from '@fluentui/react-icons';
4
5
  import { useTableContext } from '../../contexts/tableContext';
5
6
  import { useARIAButtonShorthand } from '@fluentui/react-aria';
6
7
  const sortIcons = {
7
- ascending: /*#__PURE__*/React.createElement(ArrowUpRegular, null),
8
- descending: /*#__PURE__*/React.createElement(ArrowDownRegular, null)
8
+ ascending: /*#__PURE__*/React.createElement(ArrowUpRegular, {
9
+ fontSize: 12
10
+ }),
11
+ descending: /*#__PURE__*/React.createElement(ArrowDownRegular, {
12
+ fontSize: 12
13
+ })
9
14
  };
10
15
  /**
11
16
  * Create the state required to render TableHeaderCell.
@@ -16,10 +21,8 @@ const sortIcons = {
16
21
  * @param props - props from this instance of TableHeaderCell
17
22
  * @param ref - reference to root HTMLElement of TableHeaderCell
18
23
  */
19
-
20
24
  export const useTableHeaderCell_unstable = (props, ref) => {
21
- var _a;
22
-
25
+ var _a, _b;
23
26
  const {
24
27
  noNativeElements,
25
28
  sortable
@@ -32,9 +35,9 @@ export const useTableHeaderCell_unstable = (props, ref) => {
32
35
  sortIcon: 'span'
33
36
  },
34
37
  root: getNativeElementProps(rootComponent, {
35
- ref,
38
+ ref: useMergedRefs(ref, useFocusWithin()),
36
39
  role: rootComponent === 'div' ? 'columnheader' : undefined,
37
- 'aria-sort': props.sortDirection,
40
+ 'aria-sort': sortable ? (_b = props.sortDirection) !== null && _b !== void 0 ? _b : 'none' : undefined,
38
41
  ...props
39
42
  }),
40
43
  sortIcon: resolveShorthand(props.sortIcon, {
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/TableHeaderCell/useTableHeaderCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AACA,SAAS,cAAT,EAAyB,gBAAzB,QAAiD,uBAAjD;AAEA,SAAS,eAAT,QAAgC,6BAAhC;AACA,SAAS,sBAAT,QAAuC,sBAAvC;AAEA,MAAM,SAAS,GAAG;EAChB,SAAS,eAAE,KAAA,CAAA,aAAA,CAAC,cAAD,EAAe,IAAf,CADK;EAEhB,UAAU,eAAE,KAAA,CAAA,aAAA,CAAC,gBAAD,EAAiB,IAAjB;AAFI,CAAlB;AAKA;;;;;;;;AAQG;;AACH,OAAO,MAAM,2BAA2B,GAAG,CACzC,KADyC,EAEzC,GAFyC,KAGjB;;;EACxB,MAAM;IAAE,gBAAF;IAAoB;EAApB,IAAiC,eAAe,EAAtD;EAEA,MAAM,aAAa,GAAG,CAAA,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,gBAAZ,IAA+B,KAA/B,GAAuC,IAA7D;EACA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE,aADI;MAEV,MAAM,EAAE,QAFE;MAGV,QAAQ,EAAE;IAHA,CADP;IAML,IAAI,EAAE,qBAAqB,CAAC,aAAD,EAAgB;MACzC,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,cAA1B,GAA2C,SAFR;MAGzC,aAAa,KAAK,CAAC,aAHsB;MAIzC,GAAG;IAJsC,CAAhB,CANtB;IAYL,QAAQ,EAAE,gBAAgB,CAAC,KAAK,CAAC,QAAP,EAAiB;MACzC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,aADuB;MAEzC,YAAY,EAAE;QAAE,QAAQ,EAAE,KAAK,CAAC,aAAN,GAAsB,SAAS,CAAC,KAAK,CAAC,aAAP,CAA/B,GAAuD;MAAnE;IAF2B,CAAjB,CAZrB;IAgBL,MAAM,EAAE,sBAAsB,CAAC,KAAK,CAAC,MAAP,EAAe;MAC3C,QAAQ,EAAE,IADiC;MAE3C,YAAY,EAAE;QACZ,IAAI,EAAE,cADM;QAEZ,QAAQ,EAAE,CAAC,CAFC;QAGZ,IAAI,EAAE,QAHM;QAIZ,IAAI,QAAQ,IAAI;UACd,IAAI,EAAE,SADQ;UAEd,QAAQ,EAAE;QAFI,CAAhB;MAJY;IAF6B,CAAf,CAhBzB;IA4BL,QA5BK;IA6BL;EA7BK,CAAP;AA+BD,CAtCM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport { ArrowUpRegular, ArrowDownRegular } from '@fluentui/react-icons';\nimport type { TableHeaderCellProps, TableHeaderCellState } from './TableHeaderCell.types';\nimport { useTableContext } from '../../contexts/tableContext';\nimport { useARIAButtonShorthand } from '@fluentui/react-aria';\n\nconst sortIcons = {\n ascending: <ArrowUpRegular />,\n descending: <ArrowDownRegular />,\n};\n\n/**\n * Create the state required to render TableHeaderCell.\n *\n * The returned state can be modified with hooks such as useTableHeaderCellStyles_unstable,\n * before being passed to renderTableHeaderCell_unstable.\n *\n * @param props - props from this instance of TableHeaderCell\n * @param ref - reference to root HTMLElement of TableHeaderCell\n */\nexport const useTableHeaderCell_unstable = (\n props: TableHeaderCellProps,\n ref: React.Ref<HTMLElement>,\n): TableHeaderCellState => {\n const { noNativeElements, sortable } = useTableContext();\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'th';\n return {\n components: {\n root: rootComponent,\n button: 'button',\n sortIcon: 'span',\n },\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'columnheader' : undefined,\n 'aria-sort': props.sortDirection,\n ...props,\n }),\n sortIcon: resolveShorthand(props.sortIcon, {\n required: !!props.sortDirection,\n defaultProps: { children: props.sortDirection ? sortIcons[props.sortDirection] : undefined },\n }),\n button: useARIAButtonShorthand(props.button, {\n required: true,\n defaultProps: {\n role: 'presentation',\n tabIndex: -1,\n type: 'button',\n ...(sortable && {\n role: undefined,\n tabIndex: undefined,\n }),\n },\n }),\n sortable,\n noNativeElements,\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,qBAAqB,EAAEC,gBAAgB,EAAEC,aAAa,QAAQ,2BAA2B;AAClG,SAASC,cAAc,QAAQ,yBAAyB;AACxD,SAASC,cAAc,EAAEC,gBAAgB,QAAQ,uBAAuB;AAExE,SAASC,eAAe,QAAQ,6BAA6B;AAC7D,SAASC,sBAAsB,QAAQ,sBAAsB;AAE7D,MAAMC,SAAS,GAAG;EAChBC,SAAS,eAAEV,oBAACK,cAAc;IAACM,QAAQ,EAAE;EAAE,EAAI;EAC3CC,UAAU,eAAEZ,oBAACM,gBAAgB;IAACK,QAAQ,EAAE;EAAE;CAC3C;AAED;;;;;;;;;AASA,OAAO,MAAME,2BAA2B,GAAG,CACzCC,KAA2B,EAC3BC,GAA2B,KACH;;EACxB,MAAM;IAAEC,gBAAgB;IAAEC;EAAQ,CAAE,GAAGV,eAAe,EAAE;EAExD,MAAMW,aAAa,GAAG,YAAK,CAACC,EAAE,mCAAIH,gBAAgB,IAAG,KAAK,GAAG,IAAI;EACjE,OAAO;IACLI,UAAU,EAAE;MACVC,IAAI,EAAEH,aAAa;MACnBI,MAAM,EAAE,QAAQ;MAChBC,QAAQ,EAAE;KACX;IACDF,IAAI,EAAEpB,qBAAqB,CAACiB,aAAa,EAAE;MACzCH,GAAG,EAAEZ,aAAa,CAACY,GAAG,EAAEX,cAAc,EAAE,CAAC;MACzCoB,IAAI,EAAEN,aAAa,KAAK,KAAK,GAAG,cAAc,GAAGO,SAAS;MAC1D,WAAW,EAAER,QAAQ,GAAG,WAAK,CAACS,aAAa,mCAAI,MAAM,GAAGD,SAAS;MACjE,GAAGX;KACJ,CAAC;IACFS,QAAQ,EAAErB,gBAAgB,CAACY,KAAK,CAACS,QAAQ,EAAE;MACzCI,QAAQ,EAAE,CAAC,CAACb,KAAK,CAACY,aAAa;MAC/BE,YAAY,EAAE;QAAEC,QAAQ,EAAEf,KAAK,CAACY,aAAa,GAAGjB,SAAS,CAACK,KAAK,CAACY,aAAa,CAAC,GAAGD;MAAS;KAC3F,CAAC;IACFH,MAAM,EAAEd,sBAAsB,CAACM,KAAK,CAACQ,MAAM,EAAE;MAC3CK,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZJ,IAAI,EAAE,cAAc;QACpBM,QAAQ,EAAE,CAAC,CAAC;QACZC,IAAI,EAAE,QAAQ;QACd,IAAId,QAAQ,IAAI;UACdO,IAAI,EAAEC,SAAS;UACfK,QAAQ,EAAEL;SACX;;KAEJ,CAAC;IACFR,QAAQ;IACRD;GACD;AACH,CAAC","names":["React","getNativeElementProps","resolveShorthand","useMergedRefs","useFocusWithin","ArrowUpRegular","ArrowDownRegular","useTableContext","useARIAButtonShorthand","sortIcons","ascending","fontSize","descending","useTableHeaderCell_unstable","props","ref","noNativeElements","sortable","rootComponent","as","components","root","button","sortIcon","role","undefined","sortDirection","required","defaultProps","children","tabIndex","type"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableHeaderCell/useTableHeaderCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand, useMergedRefs } from '@fluentui/react-utilities';\nimport { useFocusWithin } from '@fluentui/react-tabster';\nimport { ArrowUpRegular, ArrowDownRegular } from '@fluentui/react-icons';\nimport type { TableHeaderCellProps, TableHeaderCellState } from './TableHeaderCell.types';\nimport { useTableContext } from '../../contexts/tableContext';\nimport { useARIAButtonShorthand } from '@fluentui/react-aria';\n\nconst sortIcons = {\n ascending: <ArrowUpRegular fontSize={12} />,\n descending: <ArrowDownRegular fontSize={12} />,\n};\n\n/**\n * Create the state required to render TableHeaderCell.\n *\n * The returned state can be modified with hooks such as useTableHeaderCellStyles_unstable,\n * before being passed to renderTableHeaderCell_unstable.\n *\n * @param props - props from this instance of TableHeaderCell\n * @param ref - reference to root HTMLElement of TableHeaderCell\n */\nexport const useTableHeaderCell_unstable = (\n props: TableHeaderCellProps,\n ref: React.Ref<HTMLElement>,\n): TableHeaderCellState => {\n const { noNativeElements, sortable } = useTableContext();\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'th';\n return {\n components: {\n root: rootComponent,\n button: 'button',\n sortIcon: 'span',\n },\n root: getNativeElementProps(rootComponent, {\n ref: useMergedRefs(ref, useFocusWithin()),\n role: rootComponent === 'div' ? 'columnheader' : undefined,\n 'aria-sort': sortable ? props.sortDirection ?? 'none' : undefined,\n ...props,\n }),\n sortIcon: resolveShorthand(props.sortIcon, {\n required: !!props.sortDirection,\n defaultProps: { children: props.sortDirection ? sortIcons[props.sortDirection] : undefined },\n }),\n button: useARIAButtonShorthand(props.button, {\n required: true,\n defaultProps: {\n role: 'presentation',\n tabIndex: -1,\n type: 'button',\n ...(sortable && {\n role: undefined,\n tabIndex: undefined,\n }),\n },\n }),\n sortable,\n noNativeElements,\n };\n};\n"]}