@fluentui/react-table 9.0.0-alpha.8 → 9.0.0-rc.1

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 (463) hide show
  1. package/CHANGELOG.json +836 -1
  2. package/CHANGELOG.md +212 -2
  3. package/dist/index.d.ts +489 -101
  4. package/lib/DataGrid.js +2 -0
  5. package/lib/DataGrid.js.map +1 -0
  6. package/lib/DataGridBody.js +2 -0
  7. package/lib/DataGridBody.js.map +1 -0
  8. package/lib/DataGridCell.js +2 -0
  9. package/lib/DataGridCell.js.map +1 -0
  10. package/lib/DataGridHeader.js +2 -0
  11. package/lib/DataGridHeader.js.map +1 -0
  12. package/lib/DataGridHeaderCell.js +2 -0
  13. package/lib/DataGridHeaderCell.js.map +1 -0
  14. package/lib/DataGridRow.js +2 -0
  15. package/lib/DataGridRow.js.map +1 -0
  16. package/lib/DataGridSelectionCell.js +2 -0
  17. package/lib/DataGridSelectionCell.js.map +1 -0
  18. package/lib/components/DataGrid/DataGrid.js +15 -0
  19. package/lib/components/DataGrid/DataGrid.js.map +1 -0
  20. package/lib/components/DataGrid/DataGrid.types.js +2 -0
  21. package/lib/components/DataGrid/DataGrid.types.js.map +1 -0
  22. package/lib/components/DataGrid/index.js +6 -0
  23. package/lib/components/DataGrid/index.js.map +1 -0
  24. package/lib/components/DataGrid/renderDataGrid.js +12 -0
  25. package/lib/components/DataGrid/renderDataGrid.js.map +1 -0
  26. package/lib/components/DataGrid/useDataGrid.js +63 -0
  27. package/lib/components/DataGrid/useDataGrid.js.map +1 -0
  28. package/lib/components/DataGrid/useDataGridContextValues.js +15 -0
  29. package/lib/components/DataGrid/useDataGridContextValues.js.map +1 -0
  30. package/lib/components/DataGrid/useDataGridStyles.js +14 -0
  31. package/lib/components/DataGrid/useDataGridStyles.js.map +1 -0
  32. package/lib/components/DataGridBody/DataGridBody.js +14 -0
  33. package/lib/components/DataGridBody/DataGridBody.js.map +1 -0
  34. package/lib/components/DataGridBody/DataGridBody.types.js +2 -0
  35. package/lib/components/DataGridBody/DataGridBody.types.js.map +1 -0
  36. package/lib/components/DataGridBody/index.js +6 -0
  37. package/lib/components/DataGridBody/index.js.map +1 -0
  38. package/lib/components/DataGridBody/renderDataGridBody.js +19 -0
  39. package/lib/components/DataGridBody/renderDataGridBody.js.map +1 -0
  40. package/lib/components/DataGridBody/useDataGridBody.js +31 -0
  41. package/lib/components/DataGridBody/useDataGridBody.js.map +1 -0
  42. package/lib/components/DataGridBody/useDataGridBodyStyles.js +14 -0
  43. package/lib/components/DataGridBody/useDataGridBodyStyles.js.map +1 -0
  44. package/lib/components/DataGridCell/DataGridCell.js +14 -0
  45. package/lib/components/DataGridCell/DataGridCell.js.map +1 -0
  46. package/lib/components/DataGridCell/DataGridCell.types.js +2 -0
  47. package/lib/components/DataGridCell/DataGridCell.types.js.map +1 -0
  48. package/lib/components/DataGridCell/index.js +6 -0
  49. package/lib/components/DataGridCell/index.js.map +1 -0
  50. package/lib/components/DataGridCell/renderDataGridCell.js +8 -0
  51. package/lib/components/DataGridCell/renderDataGridCell.js.map +1 -0
  52. package/lib/components/DataGridCell/useDataGridCell.js +21 -0
  53. package/lib/components/DataGridCell/useDataGridCell.js.map +1 -0
  54. package/lib/components/DataGridCell/useDataGridCellStyles.js +14 -0
  55. package/lib/components/DataGridCell/useDataGridCellStyles.js.map +1 -0
  56. package/lib/components/DataGridHeader/DataGridHeader.js +14 -0
  57. package/lib/components/DataGridHeader/DataGridHeader.js.map +1 -0
  58. package/lib/components/DataGridHeader/DataGridHeader.types.js +2 -0
  59. package/lib/components/DataGridHeader/DataGridHeader.types.js.map +1 -0
  60. package/lib/components/DataGridHeader/index.js +6 -0
  61. package/lib/components/DataGridHeader/index.js.map +1 -0
  62. package/lib/components/DataGridHeader/renderDataGridHeader.js +8 -0
  63. package/lib/components/DataGridHeader/renderDataGridHeader.js.map +1 -0
  64. package/lib/components/DataGridHeader/useDataGridHeader.js +17 -0
  65. package/lib/components/DataGridHeader/useDataGridHeader.js.map +1 -0
  66. package/lib/components/DataGridHeader/useDataGridHeaderStyles.js +14 -0
  67. package/lib/components/DataGridHeader/useDataGridHeaderStyles.js.map +1 -0
  68. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js +14 -0
  69. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -0
  70. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.types.js +2 -0
  71. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -0
  72. package/lib/components/DataGridHeaderCell/index.js +6 -0
  73. package/lib/components/DataGridHeaderCell/index.js.map +1 -0
  74. package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js +8 -0
  75. package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -0
  76. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js +37 -0
  77. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -0
  78. package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +22 -0
  79. package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -0
  80. package/lib/components/DataGridRow/DataGridRow.js +14 -0
  81. package/lib/components/DataGridRow/DataGridRow.js.map +1 -0
  82. package/lib/components/DataGridRow/DataGridRow.types.js +2 -0
  83. package/lib/components/DataGridRow/DataGridRow.types.js.map +1 -0
  84. package/lib/components/DataGridRow/index.js +6 -0
  85. package/lib/components/DataGridRow/index.js.map +1 -0
  86. package/lib/components/DataGridRow/renderDataGridRow.js +21 -0
  87. package/lib/components/DataGridRow/renderDataGridRow.js.map +1 -0
  88. package/lib/components/DataGridRow/useDataGridRow.js +70 -0
  89. package/lib/components/DataGridRow/useDataGridRow.js.map +1 -0
  90. package/lib/components/DataGridRow/useDataGridRowStyles.js +18 -0
  91. package/lib/components/DataGridRow/useDataGridRowStyles.js.map +1 -0
  92. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js +14 -0
  93. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -0
  94. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.types.js +2 -0
  95. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -0
  96. package/lib/components/DataGridSelectionCell/index.js +6 -0
  97. package/lib/components/DataGridSelectionCell/index.js.map +1 -0
  98. package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js +8 -0
  99. package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -0
  100. package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js +47 -0
  101. package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -0
  102. package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js +22 -0
  103. package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js.map +1 -0
  104. package/lib/components/Table/Table.js +1 -2
  105. package/lib/components/Table/Table.js.map +1 -1
  106. package/lib/components/Table/Table.types.js.map +1 -1
  107. package/lib/components/Table/renderTable.js +2 -2
  108. package/lib/components/Table/renderTable.js.map +1 -1
  109. package/lib/components/Table/useTable.js +0 -2
  110. package/lib/components/Table/useTable.js.map +1 -1
  111. package/lib/components/Table/useTableContextValues.js.map +1 -1
  112. package/lib/components/Table/useTableStyles.js +13 -19
  113. package/lib/components/Table/useTableStyles.js.map +1 -1
  114. package/lib/components/TableBody/TableBody.js +1 -2
  115. package/lib/components/TableBody/TableBody.js.map +1 -1
  116. package/lib/components/TableBody/renderTableBody.js +3 -4
  117. package/lib/components/TableBody/renderTableBody.js.map +1 -1
  118. package/lib/components/TableBody/useTableBody.js +0 -2
  119. package/lib/components/TableBody/useTableBody.js.map +1 -1
  120. package/lib/components/TableBody/useTableBodyStyles.js +6 -10
  121. package/lib/components/TableBody/useTableBodyStyles.js.map +1 -1
  122. package/lib/components/TableCell/TableCell.js +1 -2
  123. package/lib/components/TableCell/TableCell.js.map +1 -1
  124. package/lib/components/TableCell/TableCell.types.js.map +1 -1
  125. package/lib/components/TableCell/renderTableCell.js +2 -2
  126. package/lib/components/TableCell/renderTableCell.js.map +1 -1
  127. package/lib/components/TableCell/useTableCell.js +4 -4
  128. package/lib/components/TableCell/useTableCell.js.map +1 -1
  129. package/lib/components/TableCell/useTableCellStyles.js +47 -26
  130. package/lib/components/TableCell/useTableCellStyles.js.map +1 -1
  131. package/lib/components/TableCellActions/TableCellActions.js +1 -2
  132. package/lib/components/TableCellActions/TableCellActions.js.map +1 -1
  133. package/lib/components/TableCellActions/renderTableCellActions.js +3 -4
  134. package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -1
  135. package/lib/components/TableCellActions/useTableCellActions.js +2 -5
  136. package/lib/components/TableCellActions/useTableCellActions.js.map +1 -1
  137. package/lib/components/TableCellActions/useTableCellActionsStyles.js +11 -19
  138. package/lib/components/TableCellActions/useTableCellActionsStyles.js.map +1 -1
  139. package/lib/components/TableCellLayout/TableCellLayout.js +1 -2
  140. package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -1
  141. package/lib/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
  142. package/lib/components/TableCellLayout/renderTableCellLayout.js +10 -6
  143. package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  144. package/lib/components/TableCellLayout/useTableCellLayout.js +5 -5
  145. package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  146. package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
  147. package/lib/components/TableCellLayout/useTableCellLayoutStyles.js +41 -35
  148. package/lib/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
  149. package/lib/components/TableHeader/TableHeader.js +1 -2
  150. package/lib/components/TableHeader/TableHeader.js.map +1 -1
  151. package/lib/components/TableHeader/renderTableHeader.js +2 -2
  152. package/lib/components/TableHeader/renderTableHeader.js.map +1 -1
  153. package/lib/components/TableHeader/useTableHeader.js +1 -10
  154. package/lib/components/TableHeader/useTableHeader.js.map +1 -1
  155. package/lib/components/TableHeader/useTableHeaderStyles.js +6 -16
  156. package/lib/components/TableHeader/useTableHeaderStyles.js.map +1 -1
  157. package/lib/components/TableHeaderCell/TableHeaderCell.js +1 -2
  158. package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  159. package/lib/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
  160. package/lib/components/TableHeaderCell/renderTableHeaderCell.js +6 -4
  161. package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  162. package/lib/components/TableHeaderCell/useTableHeaderCell.js +11 -8
  163. package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  164. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js +69 -67
  165. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
  166. package/lib/components/TableRow/TableRow.js +1 -2
  167. package/lib/components/TableRow/TableRow.js.map +1 -1
  168. package/lib/components/TableRow/TableRow.types.js.map +1 -1
  169. package/lib/components/TableRow/renderTableRow.js +3 -4
  170. package/lib/components/TableRow/renderTableRow.js.map +1 -1
  171. package/lib/components/TableRow/useTableRow.js +7 -5
  172. package/lib/components/TableRow/useTableRow.js.map +1 -1
  173. package/lib/components/TableRow/useTableRowStyles.js +137 -162
  174. package/lib/components/TableRow/useTableRowStyles.js.map +1 -1
  175. package/lib/components/TableSelectionCell/TableSelectionCell.js +1 -2
  176. package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  177. package/lib/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
  178. package/lib/components/TableSelectionCell/renderTableSelectionCell.js +6 -4
  179. package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  180. package/lib/components/TableSelectionCell/useTableSelectionCell.js +9 -5
  181. package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  182. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js +43 -46
  183. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
  184. package/lib/contexts/columnIdContext.js +9 -0
  185. package/lib/contexts/columnIdContext.js.map +1 -0
  186. package/lib/contexts/dataGridContext.js +13 -0
  187. package/lib/contexts/dataGridContext.js.map +1 -0
  188. package/lib/contexts/rowIdContext.js +9 -0
  189. package/lib/contexts/rowIdContext.js.map +1 -0
  190. package/lib/contexts/tableContext.js +0 -1
  191. package/lib/contexts/tableContext.js.map +1 -1
  192. package/lib/contexts/tableHeaderContext.js.map +1 -1
  193. package/lib/hooks/createColumn.js +35 -0
  194. package/lib/hooks/createColumn.js.map +1 -0
  195. package/lib/hooks/index.js +4 -3
  196. package/lib/hooks/index.js.map +1 -1
  197. package/lib/hooks/selectionManager.js +16 -32
  198. package/lib/hooks/selectionManager.js.map +1 -1
  199. package/lib/hooks/types.js.map +1 -1
  200. package/lib/hooks/{useTable.js → useTableFeatures.js} +12 -9
  201. package/lib/hooks/useTableFeatures.js.map +1 -0
  202. package/lib/hooks/{useSelection.js → useTableSelection.js} +18 -18
  203. package/lib/hooks/useTableSelection.js.map +1 -0
  204. package/lib/hooks/{useSort.js → useTableSort.js} +12 -21
  205. package/lib/hooks/useTableSort.js.map +1 -0
  206. package/lib/index.js +9 -1
  207. package/lib/index.js.map +1 -1
  208. package/lib-commonjs/DataGrid.js +8 -0
  209. package/lib-commonjs/DataGrid.js.map +1 -0
  210. package/lib-commonjs/DataGridBody.js +8 -0
  211. package/lib-commonjs/DataGridBody.js.map +1 -0
  212. package/lib-commonjs/DataGridCell.js +8 -0
  213. package/lib-commonjs/DataGridCell.js.map +1 -0
  214. package/lib-commonjs/DataGridHeader.js +8 -0
  215. package/lib-commonjs/DataGridHeader.js.map +1 -0
  216. package/lib-commonjs/DataGridHeaderCell.js +8 -0
  217. package/lib-commonjs/DataGridHeaderCell.js.map +1 -0
  218. package/lib-commonjs/DataGridRow.js +8 -0
  219. package/lib-commonjs/DataGridRow.js.map +1 -0
  220. package/lib-commonjs/DataGridSelectionCell.js +8 -0
  221. package/lib-commonjs/DataGridSelectionCell.js.map +1 -0
  222. package/lib-commonjs/Table.js +0 -2
  223. package/lib-commonjs/Table.js.map +1 -1
  224. package/lib-commonjs/TableBody.js +0 -2
  225. package/lib-commonjs/TableBody.js.map +1 -1
  226. package/lib-commonjs/TableCell.js +0 -2
  227. package/lib-commonjs/TableCell.js.map +1 -1
  228. package/lib-commonjs/TableCellActions.js +0 -2
  229. package/lib-commonjs/TableCellActions.js.map +1 -1
  230. package/lib-commonjs/TableCellLayout.js +0 -2
  231. package/lib-commonjs/TableCellLayout.js.map +1 -1
  232. package/lib-commonjs/TableCellPrimaryLayout.js +0 -2
  233. package/lib-commonjs/TableCellPrimaryLayout.js.map +1 -1
  234. package/lib-commonjs/TableHeader.js +0 -2
  235. package/lib-commonjs/TableHeader.js.map +1 -1
  236. package/lib-commonjs/TableHeaderCell.js +0 -2
  237. package/lib-commonjs/TableHeaderCell.js.map +1 -1
  238. package/lib-commonjs/TableRow.js +0 -2
  239. package/lib-commonjs/TableRow.js.map +1 -1
  240. package/lib-commonjs/TableSelectionCell.js +0 -2
  241. package/lib-commonjs/TableSelectionCell.js.map +1 -1
  242. package/lib-commonjs/components/DataGrid/DataGrid.js +21 -0
  243. package/lib-commonjs/components/DataGrid/DataGrid.js.map +1 -0
  244. package/lib-commonjs/components/DataGrid/DataGrid.types.js +6 -0
  245. package/lib-commonjs/components/DataGrid/DataGrid.types.js.map +1 -0
  246. package/lib-commonjs/components/DataGrid/index.js +12 -0
  247. package/lib-commonjs/components/DataGrid/index.js.map +1 -0
  248. package/lib-commonjs/components/DataGrid/renderDataGrid.js +19 -0
  249. package/lib-commonjs/components/DataGrid/renderDataGrid.js.map +1 -0
  250. package/lib-commonjs/components/DataGrid/useDataGrid.js +70 -0
  251. package/lib-commonjs/components/DataGrid/useDataGrid.js.map +1 -0
  252. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js +22 -0
  253. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js.map +1 -0
  254. package/lib-commonjs/components/DataGrid/useDataGridStyles.js +21 -0
  255. package/lib-commonjs/components/DataGrid/useDataGridStyles.js.map +1 -0
  256. package/lib-commonjs/components/DataGridBody/DataGridBody.js +20 -0
  257. package/lib-commonjs/components/DataGridBody/DataGridBody.js.map +1 -0
  258. package/lib-commonjs/components/DataGridBody/DataGridBody.types.js +6 -0
  259. package/lib-commonjs/components/DataGridBody/DataGridBody.types.js.map +1 -0
  260. package/lib-commonjs/components/DataGridBody/index.js +12 -0
  261. package/lib-commonjs/components/DataGridBody/index.js.map +1 -0
  262. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js +26 -0
  263. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js.map +1 -0
  264. package/lib-commonjs/components/DataGridBody/useDataGridBody.js +38 -0
  265. package/lib-commonjs/components/DataGridBody/useDataGridBody.js.map +1 -0
  266. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.js +21 -0
  267. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.js.map +1 -0
  268. package/lib-commonjs/components/DataGridCell/DataGridCell.js +20 -0
  269. package/lib-commonjs/components/DataGridCell/DataGridCell.js.map +1 -0
  270. package/lib-commonjs/components/DataGridCell/DataGridCell.types.js +6 -0
  271. package/lib-commonjs/components/DataGridCell/DataGridCell.types.js.map +1 -0
  272. package/lib-commonjs/components/DataGridCell/index.js +12 -0
  273. package/lib-commonjs/components/DataGridCell/index.js.map +1 -0
  274. package/lib-commonjs/components/DataGridCell/renderDataGridCell.js +15 -0
  275. package/lib-commonjs/components/DataGridCell/renderDataGridCell.js.map +1 -0
  276. package/lib-commonjs/components/DataGridCell/useDataGridCell.js +28 -0
  277. package/lib-commonjs/components/DataGridCell/useDataGridCell.js.map +1 -0
  278. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.js +21 -0
  279. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.js.map +1 -0
  280. package/lib-commonjs/components/DataGridHeader/DataGridHeader.js +20 -0
  281. package/lib-commonjs/components/DataGridHeader/DataGridHeader.js.map +1 -0
  282. package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js +6 -0
  283. package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js.map +1 -0
  284. package/lib-commonjs/components/DataGridHeader/index.js +12 -0
  285. package/lib-commonjs/components/DataGridHeader/index.js.map +1 -0
  286. package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js +15 -0
  287. package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js.map +1 -0
  288. package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js +24 -0
  289. package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js.map +1 -0
  290. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.js +21 -0
  291. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.js.map +1 -0
  292. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js +20 -0
  293. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -0
  294. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js +6 -0
  295. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -0
  296. package/lib-commonjs/components/DataGridHeaderCell/index.js +12 -0
  297. package/lib-commonjs/components/DataGridHeaderCell/index.js.map +1 -0
  298. package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js +15 -0
  299. package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -0
  300. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js +44 -0
  301. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -0
  302. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +29 -0
  303. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -0
  304. package/lib-commonjs/components/DataGridRow/DataGridRow.js +20 -0
  305. package/lib-commonjs/components/DataGridRow/DataGridRow.js.map +1 -0
  306. package/lib-commonjs/components/DataGridRow/DataGridRow.types.js +6 -0
  307. package/lib-commonjs/components/DataGridRow/DataGridRow.types.js.map +1 -0
  308. package/lib-commonjs/components/DataGridRow/index.js +12 -0
  309. package/lib-commonjs/components/DataGridRow/index.js.map +1 -0
  310. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js +28 -0
  311. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js.map +1 -0
  312. package/lib-commonjs/components/DataGridRow/useDataGridRow.js +77 -0
  313. package/lib-commonjs/components/DataGridRow/useDataGridRow.js.map +1 -0
  314. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.js +25 -0
  315. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.js.map +1 -0
  316. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js +20 -0
  317. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -0
  318. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js +6 -0
  319. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -0
  320. package/lib-commonjs/components/DataGridSelectionCell/index.js +12 -0
  321. package/lib-commonjs/components/DataGridSelectionCell/index.js.map +1 -0
  322. package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js +15 -0
  323. package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -0
  324. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js +54 -0
  325. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -0
  326. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js +29 -0
  327. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js.map +1 -0
  328. package/lib-commonjs/components/Table/Table.js +1 -8
  329. package/lib-commonjs/components/Table/Table.js.map +1 -1
  330. package/lib-commonjs/components/Table/Table.types.js.map +1 -1
  331. package/lib-commonjs/components/Table/index.js +0 -6
  332. package/lib-commonjs/components/Table/index.js.map +1 -1
  333. package/lib-commonjs/components/Table/renderTable.js +2 -7
  334. package/lib-commonjs/components/Table/renderTable.js.map +1 -1
  335. package/lib-commonjs/components/Table/useTable.js +0 -5
  336. package/lib-commonjs/components/Table/useTable.js.map +1 -1
  337. package/lib-commonjs/components/Table/useTableContextValues.js +0 -3
  338. package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -1
  339. package/lib-commonjs/components/Table/useTableStyles.js +13 -23
  340. package/lib-commonjs/components/Table/useTableStyles.js.map +1 -1
  341. package/lib-commonjs/components/TableBody/TableBody.js +1 -7
  342. package/lib-commonjs/components/TableBody/TableBody.js.map +1 -1
  343. package/lib-commonjs/components/TableBody/TableBody.types.js.map +1 -1
  344. package/lib-commonjs/components/TableBody/index.js +0 -6
  345. package/lib-commonjs/components/TableBody/index.js.map +1 -1
  346. package/lib-commonjs/components/TableBody/renderTableBody.js +3 -8
  347. package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -1
  348. package/lib-commonjs/components/TableBody/useTableBody.js +0 -6
  349. package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
  350. package/lib-commonjs/components/TableBody/useTableBodyStyles.js +6 -12
  351. package/lib-commonjs/components/TableBody/useTableBodyStyles.js.map +1 -1
  352. package/lib-commonjs/components/TableCell/TableCell.js +1 -7
  353. package/lib-commonjs/components/TableCell/TableCell.js.map +1 -1
  354. package/lib-commonjs/components/TableCell/TableCell.types.js.map +1 -1
  355. package/lib-commonjs/components/TableCell/index.js +0 -6
  356. package/lib-commonjs/components/TableCell/index.js.map +1 -1
  357. package/lib-commonjs/components/TableCell/renderTableCell.js +2 -6
  358. package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -1
  359. package/lib-commonjs/components/TableCell/useTableCell.js +4 -8
  360. package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
  361. package/lib-commonjs/components/TableCell/useTableCellStyles.js +47 -30
  362. package/lib-commonjs/components/TableCell/useTableCellStyles.js.map +1 -1
  363. package/lib-commonjs/components/TableCellActions/TableCellActions.js +1 -7
  364. package/lib-commonjs/components/TableCellActions/TableCellActions.js.map +1 -1
  365. package/lib-commonjs/components/TableCellActions/TableCellActions.types.js.map +1 -1
  366. package/lib-commonjs/components/TableCellActions/index.js +0 -6
  367. package/lib-commonjs/components/TableCellActions/index.js.map +1 -1
  368. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js +3 -8
  369. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -1
  370. package/lib-commonjs/components/TableCellActions/useTableCellActions.js +1 -8
  371. package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -1
  372. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js +11 -23
  373. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js.map +1 -1
  374. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js +1 -8
  375. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js.map +1 -1
  376. package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
  377. package/lib-commonjs/components/TableCellLayout/index.js +0 -6
  378. package/lib-commonjs/components/TableCellLayout/index.js.map +1 -1
  379. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js +10 -11
  380. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  381. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +5 -9
  382. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  383. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js +0 -3
  384. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
  385. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js +41 -39
  386. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
  387. package/lib-commonjs/components/TableHeader/TableHeader.js +1 -7
  388. package/lib-commonjs/components/TableHeader/TableHeader.js.map +1 -1
  389. package/lib-commonjs/components/TableHeader/TableHeader.types.js.map +1 -1
  390. package/lib-commonjs/components/TableHeader/index.js +0 -6
  391. package/lib-commonjs/components/TableHeader/index.js.map +1 -1
  392. package/lib-commonjs/components/TableHeader/renderTableHeader.js +2 -7
  393. package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -1
  394. package/lib-commonjs/components/TableHeader/useTableHeader.js +1 -15
  395. package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
  396. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js +6 -19
  397. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js.map +1 -1
  398. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js +1 -7
  399. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  400. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
  401. package/lib-commonjs/components/TableHeaderCell/index.js +0 -6
  402. package/lib-commonjs/components/TableHeaderCell/index.js.map +1 -1
  403. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js +6 -8
  404. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  405. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +10 -14
  406. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  407. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js +69 -71
  408. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
  409. package/lib-commonjs/components/TableRow/TableRow.js +1 -7
  410. package/lib-commonjs/components/TableRow/TableRow.js.map +1 -1
  411. package/lib-commonjs/components/TableRow/TableRow.types.js.map +1 -1
  412. package/lib-commonjs/components/TableRow/index.js +0 -6
  413. package/lib-commonjs/components/TableRow/index.js.map +1 -1
  414. package/lib-commonjs/components/TableRow/renderTableRow.js +3 -8
  415. package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -1
  416. package/lib-commonjs/components/TableRow/useTableRow.js +7 -10
  417. package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
  418. package/lib-commonjs/components/TableRow/useTableRowStyles.js +137 -170
  419. package/lib-commonjs/components/TableRow/useTableRowStyles.js.map +1 -1
  420. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js +1 -7
  421. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  422. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
  423. package/lib-commonjs/components/TableSelectionCell/index.js +0 -6
  424. package/lib-commonjs/components/TableSelectionCell/index.js.map +1 -1
  425. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js +6 -8
  426. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  427. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js +8 -11
  428. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  429. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js +43 -50
  430. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
  431. package/lib-commonjs/contexts/columnIdContext.js +16 -0
  432. package/lib-commonjs/contexts/columnIdContext.js.map +1 -0
  433. package/lib-commonjs/contexts/dataGridContext.js +20 -0
  434. package/lib-commonjs/contexts/dataGridContext.js.map +1 -0
  435. package/lib-commonjs/contexts/rowIdContext.js +16 -0
  436. package/lib-commonjs/contexts/rowIdContext.js.map +1 -0
  437. package/lib-commonjs/contexts/tableContext.js +0 -5
  438. package/lib-commonjs/contexts/tableContext.js.map +1 -1
  439. package/lib-commonjs/contexts/tableHeaderContext.js +0 -4
  440. package/lib-commonjs/contexts/tableHeaderContext.js.map +1 -1
  441. package/lib-commonjs/hooks/createColumn.js +42 -0
  442. package/lib-commonjs/hooks/createColumn.js.map +1 -0
  443. package/lib-commonjs/hooks/index.js +4 -8
  444. package/lib-commonjs/hooks/index.js.map +1 -1
  445. package/lib-commonjs/hooks/selectionManager.js +16 -34
  446. package/lib-commonjs/hooks/selectionManager.js.map +1 -1
  447. package/lib-commonjs/hooks/types.js.map +1 -1
  448. package/lib-commonjs/hooks/useTableFeatures.js +42 -0
  449. package/lib-commonjs/hooks/useTableFeatures.js.map +1 -0
  450. package/lib-commonjs/hooks/{useSelection.js → useTableSelection.js} +21 -28
  451. package/lib-commonjs/hooks/useTableSelection.js.map +1 -0
  452. package/lib-commonjs/hooks/{useSort.js → useTableSort.js} +15 -29
  453. package/lib-commonjs/hooks/useTableSort.js.map +1 -0
  454. package/lib-commonjs/index.js +244 -30
  455. package/lib-commonjs/index.js.map +1 -1
  456. package/package.json +24 -12
  457. package/lib/hooks/useSelection.js.map +0 -1
  458. package/lib/hooks/useSort.js.map +0 -1
  459. package/lib/hooks/useTable.js.map +0 -1
  460. package/lib-commonjs/hooks/useSelection.js.map +0 -1
  461. package/lib-commonjs/hooks/useSort.js.map +0 -1
  462. package/lib-commonjs/hooks/useTable.js +0 -42
  463. package/lib-commonjs/hooks/useTable.js.map +0 -1
@@ -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"]}
@@ -1,99 +1,103 @@
1
1
  import { __styles, mergeClasses, shorthands } from '@griffel/react';
2
2
  import { tokens } from '@fluentui/react-theme';
3
+ import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';
3
4
  export const tableHeaderCellClassName = 'fui-TableHeaderCell';
4
5
  export const tableHeaderCellClassNames = {
5
6
  root: 'fui-TableHeaderCell',
6
7
  button: 'fui-TableHeaderCell__button',
7
8
  sortIcon: 'fui-TableHeaderCell__sortIcon'
8
9
  };
9
-
10
10
  const useTableLayoutStyles = /*#__PURE__*/__styles({
11
- "root": {
12
- "mc9l5x": "f15pt5es",
13
- "ha4doy": "fmrv4ls"
11
+ root: {
12
+ mc9l5x: "f15pt5es",
13
+ ha4doy: "fmrv4ls"
14
14
  }
15
15
  }, {
16
- "d": [".f15pt5es{display:table-cell;}", ".fmrv4ls{vertical-align:middle;}"]
16
+ d: [".f15pt5es{display:table-cell;}", ".fmrv4ls{vertical-align:middle;}"]
17
17
  });
18
-
19
18
  const useFlexLayoutStyles = /*#__PURE__*/__styles({
20
- "root": {
21
- "mc9l5x": "f22iagw",
22
- "Bh6795r": "fqerorx",
23
- "Bnnss6s": "f1neuvcm",
24
- "xawz": "fkjuxzh",
25
- "Bf4jedk": "f10tiqix"
19
+ root: {
20
+ mc9l5x: "f22iagw",
21
+ Bh6795r: "fqerorx",
22
+ Bnnss6s: "f1neuvcm",
23
+ xawz: "fkjuxzh",
24
+ Bf4jedk: "f10tiqix"
26
25
  }
27
26
  }, {
28
- "d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".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;}", ".f10tiqix{min-width:0px;}"]
27
+ d: [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".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;}", ".f10tiqix{min-width:0px;}"]
29
28
  });
30
29
  /**
31
30
  * Styles for the root slot
32
31
  */
33
-
34
-
35
32
  const useStyles = /*#__PURE__*/__styles({
36
- "root": {
37
- "z8tnut": "f1nbblvp",
38
- "z189sj": ["f1vdfbxk", "f1f5gg8d"],
39
- "Byoj8tv": "f1ov4xf1",
40
- "uwmqm3": ["f1f5gg8d", "f1vdfbxk"]
33
+ root: {
34
+ z8tnut: "f1nbblvp",
35
+ z189sj: ["f1vdfbxk", "f1f5gg8d"],
36
+ Byoj8tv: "f1ov4xf1",
37
+ uwmqm3: ["f1f5gg8d", "f1vdfbxk"],
38
+ B3nxjsc: "fhix6mv",
39
+ Bmvh20x: "fha7anx",
40
+ robkg1: "f1fmzww4",
41
+ pehzd3: ["fs9qmxf", "f187m4uq"],
42
+ B8osjzx: ["f187m4uq", "fs9qmxf"],
43
+ u7xebq: ["f145mzao", "f1uha7eq"],
44
+ Blsv9te: ["f1uha7eq", "f145mzao"]
41
45
  },
42
- "rootInteractive": {
43
- "Jwef8y": "f1t94bn6",
44
- "ecr2s2": "f1wfn5kd"
46
+ rootInteractive: {
47
+ Jwef8y: "f1t94bn6",
48
+ ecr2s2: "f1wfn5kd"
45
49
  },
46
- "resetButton": {
47
- "B3rzk8w": "fq6nmtn",
48
- "B7ck84d": "f1e4lqlz",
49
- "De3pzq": "f1u2r49w",
50
- "sj55zd": "f1ym3bx4",
51
- "Bahqtrf": "f1mo0ibp",
52
- "Be2twd7": "fjoy568",
53
- "Bg96gwp": "fytdu2e",
54
- "B68tc82": "f1mtd64y",
55
- "Bmxbyg5": "f1y7q3j9",
56
- "z8tnut": "f1g0x7ka",
57
- "z189sj": ["fhxju0i", "f1cnd47f"],
58
- "Byoj8tv": "f1qch9an",
59
- "uwmqm3": ["f1cnd47f", "fhxju0i"],
60
- "icvyot": "f1ern45e",
61
- "vrafjx": ["f1n71otn", "f1deefiw"],
62
- "oivjwe": "f1h8hb77",
63
- "wvpqe5": ["f1deefiw", "f1n71otn"],
64
- "Bv0vk6g": "f37px4s",
65
- "fsow6f": "fgusgyc"
50
+ resetButton: {
51
+ B3rzk8w: "fq6nmtn",
52
+ B7ck84d: "f1e4lqlz",
53
+ De3pzq: "f1u2r49w",
54
+ sj55zd: "f1ym3bx4",
55
+ Bahqtrf: "f1mo0ibp",
56
+ Be2twd7: "fjoy568",
57
+ Bg96gwp: "fytdu2e",
58
+ B68tc82: "f1mtd64y",
59
+ Bmxbyg5: "f1y7q3j9",
60
+ z8tnut: "f1g0x7ka",
61
+ z189sj: ["fhxju0i", "f1cnd47f"],
62
+ Byoj8tv: "f1qch9an",
63
+ uwmqm3: ["f1cnd47f", "fhxju0i"],
64
+ icvyot: "f1ern45e",
65
+ vrafjx: ["f1n71otn", "f1deefiw"],
66
+ oivjwe: "f1h8hb77",
67
+ wvpqe5: ["f1deefiw", "f1n71otn"],
68
+ Bv0vk6g: "f37px4s",
69
+ fsow6f: "fgusgyc"
66
70
  },
67
- "button": {
68
- "qhf8xq": "f10pi13n",
69
- "a9b677": "fly5x3f",
70
- "mc9l5x": "f22iagw",
71
- "Bh6795r": "fqerorx",
72
- "Bqenvij": "f1l02sjl",
73
- "Bt984gj": "f122n59",
74
- "i8kkvl": "fsnqrgy",
75
- "Belr9w4": "fylz90v",
76
- "sshi5w": "f5pgtk9",
77
- "Bnnss6s": "f1neuvcm",
78
- "xawz": "fkjuxzh"
71
+ button: {
72
+ qhf8xq: "f10pi13n",
73
+ a9b677: "fly5x3f",
74
+ mc9l5x: "f22iagw",
75
+ Bh6795r: "fqerorx",
76
+ Bqenvij: "f1l02sjl",
77
+ Bt984gj: "f122n59",
78
+ i8kkvl: "f1ufnopg",
79
+ Belr9w4: "f14sijuj",
80
+ sshi5w: "f1nxs5xn",
81
+ Bnnss6s: "f1neuvcm",
82
+ xawz: "fkjuxzh",
83
+ oeaueh: "f1s6fcnf"
79
84
  },
80
- "sortable": {
81
- "Bceei9c": "f1k6fduh"
85
+ sortable: {
86
+ Bceei9c: "f1k6fduh"
82
87
  },
83
- "sortIcon": {
84
- "mc9l5x": "f22iagw",
85
- "Bt984gj": "f122n59"
88
+ sortIcon: {
89
+ mc9l5x: "f22iagw",
90
+ Bt984gj: "f122n59",
91
+ z8tnut: "fclwglc"
86
92
  }
87
93
  }, {
88
- "d": [".f1nbblvp{padding-top:0px;}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".f1ov4xf1{padding-bottom:0px;}", ".fq6nmtn{resize:horizontal;}", ".f1e4lqlz{box-sizing:content-box;}", ".f1u2r49w{background-color:inherit;}", ".f1ym3bx4{color:inherit;}", ".f1mo0ibp{font-family:inherit;}", ".fjoy568{font-size:inherit;}", ".fytdu2e{line-height:normal;}", ".f1mtd64y{overflow-x:visible;}", ".f1y7q3j9{overflow-y:visible;}", ".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".f1ern45e{border-top-style:none;}", ".f1n71otn{border-right-style:none;}", ".f1deefiw{border-left-style:none;}", ".f1h8hb77{border-bottom-style:none;}", ".f37px4s{-webkit-appearance:button;}", ".fgusgyc{text-align:unset;}", ".f10pi13n{position:relative;}", ".fly5x3f{width:100%;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f1l02sjl{height:100%;}", ".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);}", ".f5pgtk9{min-height:44px;}", ".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;}", ".f1k6fduh{cursor:pointer;}"],
89
- "h": [".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}"],
90
- "a": [".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}"]
94
+ d: [".f1nbblvp{padding-top:0px;}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".f1ov4xf1{padding-bottom:0px;}", ".fhix6mv[data-fui-focus-within]:focus-within{outline-width:2px;}", ".fha7anx[data-fui-focus-within]:focus-within{outline-style:solid;}", ".f1fmzww4[data-fui-focus-within]:focus-within{outline-color:var(--colorStrokeFocus2);}", ".fs9qmxf[data-fui-focus-within]:focus-within{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f187m4uq[data-fui-focus-within]:focus-within{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f145mzao[data-fui-focus-within]:focus-within{border-top-right-radius:var(--borderRadiusMedium);}", ".f1uha7eq[data-fui-focus-within]:focus-within{border-top-left-radius:var(--borderRadiusMedium);}", ".fq6nmtn{resize:horizontal;}", ".f1e4lqlz{box-sizing:content-box;}", ".f1u2r49w{background-color:inherit;}", ".f1ym3bx4{color:inherit;}", ".f1mo0ibp{font-family:inherit;}", ".fjoy568{font-size:inherit;}", ".fytdu2e{line-height:normal;}", ".f1mtd64y{overflow-x:visible;}", ".f1y7q3j9{overflow-y:visible;}", ".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".f1ern45e{border-top-style:none;}", ".f1n71otn{border-right-style:none;}", ".f1deefiw{border-left-style:none;}", ".f1h8hb77{border-bottom-style:none;}", ".f37px4s{-webkit-appearance:button;}", ".fgusgyc{text-align:unset;}", ".f10pi13n{position:relative;}", ".fly5x3f{width:100%;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f1l02sjl{height:100%;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f1ufnopg{-webkit-column-gap:var(--spacingHorizontalXS);column-gap:var(--spacingHorizontalXS);}", ".f14sijuj{row-gap:var(--spacingHorizontalXS);}", ".f1nxs5xn{min-height:32px;}", ".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;}", ".f1s6fcnf{outline-style:none;}", ".f1k6fduh{cursor:pointer;}", ".fclwglc{padding-top:var(--spacingVerticalXXS);}"],
95
+ h: [".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}"],
96
+ a: [".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}"]
91
97
  });
92
98
  /**
93
99
  * Apply styling to the TableHeaderCell slots based on the state
94
100
  */
95
-
96
-
97
101
  export const useTableHeaderCellStyles_unstable = state => {
98
102
  const styles = useStyles();
99
103
  const layoutStyles = {
@@ -102,11 +106,9 @@ export const useTableHeaderCellStyles_unstable = state => {
102
106
  };
103
107
  state.root.className = mergeClasses(tableHeaderCellClassNames.root, styles.root, state.sortable && styles.rootInteractive, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.root.className);
104
108
  state.button.className = mergeClasses(tableHeaderCellClassNames.button, styles.resetButton, styles.button, state.sortable && styles.sortable, state.button.className);
105
-
106
109
  if (state.sortIcon) {
107
110
  state.sortIcon.className = mergeClasses(tableHeaderCellClassNames.sortIcon, styles.sortIcon, state.sortIcon.className);
108
111
  }
109
-
110
112
  return state;
111
113
  };
112
114
  //# sourceMappingURL=useTableHeaderCellStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/TableHeaderCell/useTableHeaderCellStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,EAAmC,UAAnC,QAAqD,gBAArD;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAIA,OAAO,MAAM,wBAAwB,GAAG,qBAAjC;AACP,OAAO,MAAM,yBAAyB,GAAyC;EAC7E,IAAI,EAAE,qBADuE;EAE7E,MAAM,EAAE,6BAFqE;EAG7E,QAAQ,EAAE;AAHmE,CAAxE;;AAMP,MAAM,oBAAoB,gBAAG;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA7B;;AAOA,MAAM,mBAAmB,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA5B;AAQA;;AAEG;;;AACH,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;EAAA;EAAA;AAAA,EAAlB;AAiDA;;AAEG;;;AACH,OAAO,MAAM,iCAAiC,GAAI,KAAD,IAAsD;EACrG,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,MAAM,YAAY,GAAG;IACnB,KAAK,EAAE,oBAAoB,EADR;IAEnB,IAAI,EAAE,mBAAmB;EAFN,CAArB;EAIA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,yBAAyB,CAAC,IADO,EAEjC,MAAM,CAAC,IAF0B,EAGjC,KAAK,CAAC,QAAN,IAAkB,MAAM,CAAC,eAHQ,EAIjC,KAAK,CAAC,gBAAN,GAAyB,YAAY,CAAC,IAAb,CAAkB,IAA3C,GAAkD,YAAY,CAAC,KAAb,CAAmB,IAJpC,EAKjC,KAAK,CAAC,IAAN,CAAW,SALsB,CAAnC;EAOA,KAAK,CAAC,MAAN,CAAa,SAAb,GAAyB,YAAY,CACnC,yBAAyB,CAAC,MADS,EAEnC,MAAM,CAAC,WAF4B,EAGnC,MAAM,CAAC,MAH4B,EAInC,KAAK,CAAC,QAAN,IAAkB,MAAM,CAAC,QAJU,EAKnC,KAAK,CAAC,MAAN,CAAa,SALsB,CAArC;;EAQA,IAAI,KAAK,CAAC,QAAV,EAAoB;IAClB,KAAK,CAAC,QAAN,CAAe,SAAf,GAA2B,YAAY,CACrC,yBAAyB,CAAC,QADW,EAErC,MAAM,CAAC,QAF8B,EAGrC,KAAK,CAAC,QAAN,CAAe,SAHsB,CAAvC;EAKD;;EAED,OAAO,KAAP;AACD,CA9BM","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { TableHeaderCellSlots, TableHeaderCellState } from './TableHeaderCell.types';\n\nexport const tableHeaderCellClassName = 'fui-TableHeaderCell';\nexport const tableHeaderCellClassNames: SlotClassNames<TableHeaderCellSlots> = {\n root: 'fui-TableHeaderCell',\n button: 'fui-TableHeaderCell__button',\n sortIcon: 'fui-TableHeaderCell__sortIcon',\n};\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-cell',\n verticalAlign: 'middle',\n },\n});\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'flex',\n ...shorthands.flex(1, 1, '0px'),\n minWidth: '0px',\n },\n});\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n ...shorthands.padding('0px', tokens.spacingHorizontalS),\n },\n\n rootInteractive: {\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n },\n },\n\n resetButton: {\n resize: 'horizontal',\n boxSizing: 'content-box',\n backgroundColor: 'inherit',\n color: 'inherit',\n fontFamily: 'inherit',\n fontSize: 'inherit',\n lineHeight: 'normal',\n ...shorthands.overflow('visible'),\n ...shorthands.padding(0),\n ...shorthands.borderStyle('none'),\n WebkitAppearance: 'button',\n textAlign: 'unset',\n },\n button: {\n position: 'relative',\n width: '100%',\n display: 'flex',\n flexGrow: 1,\n height: '100%',\n alignItems: 'center',\n ...shorthands.gap(tokens.spacingHorizontalS),\n minHeight: '44px',\n ...shorthands.flex(1, 1, '0px'),\n },\n sortable: {\n cursor: 'pointer',\n },\n\n sortIcon: {\n display: 'flex',\n alignItems: 'center',\n },\n});\n\n/**\n * Apply styling to the TableHeaderCell slots based on the state\n */\nexport const useTableHeaderCellStyles_unstable = (state: TableHeaderCellState): TableHeaderCellState => {\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableHeaderCellClassNames.root,\n styles.root,\n state.sortable && styles.rootInteractive,\n state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,\n state.root.className,\n );\n state.button.className = mergeClasses(\n tableHeaderCellClassNames.button,\n styles.resetButton,\n styles.button,\n state.sortable && styles.sortable,\n state.button.className,\n );\n\n if (state.sortIcon) {\n state.sortIcon.className = mergeClasses(\n tableHeaderCellClassNames.sortIcon,\n styles.sortIcon,\n state.sortIcon.className,\n );\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;AAE9C,SAASC,+BAA+B,QAAQ,yBAAyB;AAGzE,OAAO,MAAMC,wBAAwB,GAAG,qBAAqB;AAC7D,OAAO,MAAMC,yBAAyB,GAAyC;EAC7EC,IAAI,EAAE,qBAAqB;EAC3BC,MAAM,EAAE,6BAA6B;EACrCC,QAAQ,EAAE;CACX;AAED,MAAMC,oBAAoB,gBAAG;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAK3B;AAEF,MAAMC,mBAAmB,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAM1B;AAEF;;;AAGA,MAAMC,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;EAAA;EAAA;AAAA,EAwDhB;AAEF;;;AAGA,OAAO,MAAMC,iCAAiC,GAAIC,KAA2B,IAA0B;EACrG,MAAMC,MAAM,GAAGH,SAAS,EAAE;EAC1B,MAAMI,YAAY,GAAG;IACnBC,KAAK,EAAEP,oBAAoB,EAAE;IAC7BQ,IAAI,EAAEP,mBAAmB;GAC1B;EACDG,KAAK,CAACP,IAAI,CAACY,SAAS,GAAGlB,YAAY,CACjCK,yBAAyB,CAACC,IAAI,EAC9BQ,MAAM,CAACR,IAAI,EACXO,KAAK,CAACM,QAAQ,IAAIL,MAAM,CAACM,eAAe,EACxCP,KAAK,CAACQ,gBAAgB,GAAGN,YAAY,CAACE,IAAI,CAACX,IAAI,GAAGS,YAAY,CAACC,KAAK,CAACV,IAAI,EACzEO,KAAK,CAACP,IAAI,CAACY,SAAS,CACrB;EACDL,KAAK,CAACN,MAAM,CAACW,SAAS,GAAGlB,YAAY,CACnCK,yBAAyB,CAACE,MAAM,EAChCO,MAAM,CAACQ,WAAW,EAClBR,MAAM,CAACP,MAAM,EACbM,KAAK,CAACM,QAAQ,IAAIL,MAAM,CAACK,QAAQ,EACjCN,KAAK,CAACN,MAAM,CAACW,SAAS,CACvB;EAED,IAAIL,KAAK,CAACL,QAAQ,EAAE;IAClBK,KAAK,CAACL,QAAQ,CAACU,SAAS,GAAGlB,YAAY,CACrCK,yBAAyB,CAACG,QAAQ,EAClCM,MAAM,CAACN,QAAQ,EACfK,KAAK,CAACL,QAAQ,CAACU,SAAS,CACzB;;EAGH,OAAOL,KAAK;AACd,CAAC","names":["mergeClasses","shorthands","tokens","createCustomFocusIndicatorStyle","tableHeaderCellClassName","tableHeaderCellClassNames","root","button","sortIcon","useTableLayoutStyles","useFlexLayoutStyles","useStyles","useTableHeaderCellStyles_unstable","state","styles","layoutStyles","table","flex","className","sortable","rootInteractive","noNativeElements","resetButton"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableHeaderCell/useTableHeaderCellStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport type { TableHeaderCellSlots, TableHeaderCellState } from './TableHeaderCell.types';\n\nexport const tableHeaderCellClassName = 'fui-TableHeaderCell';\nexport const tableHeaderCellClassNames: SlotClassNames<TableHeaderCellSlots> = {\n root: 'fui-TableHeaderCell',\n button: 'fui-TableHeaderCell__button',\n sortIcon: 'fui-TableHeaderCell__sortIcon',\n};\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-cell',\n verticalAlign: 'middle',\n },\n});\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'flex',\n ...shorthands.flex(1, 1, '0px'),\n minWidth: '0px',\n },\n});\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n ...shorthands.padding('0px', tokens.spacingHorizontalS),\n ...createCustomFocusIndicatorStyle(\n {\n ...shorthands.outline('2px', 'solid', tokens.colorStrokeFocus2),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n },\n { selector: 'focus-within', enableOutline: true },\n ),\n },\n\n rootInteractive: {\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n },\n },\n\n resetButton: {\n resize: 'horizontal',\n boxSizing: 'content-box',\n backgroundColor: 'inherit',\n color: 'inherit',\n fontFamily: 'inherit',\n fontSize: 'inherit',\n lineHeight: 'normal',\n ...shorthands.overflow('visible'),\n ...shorthands.padding(0),\n ...shorthands.borderStyle('none'),\n WebkitAppearance: 'button',\n textAlign: 'unset',\n },\n button: {\n position: 'relative',\n width: '100%',\n display: 'flex',\n flexGrow: 1,\n height: '100%',\n alignItems: 'center',\n ...shorthands.gap(tokens.spacingHorizontalXS),\n minHeight: '32px',\n ...shorthands.flex(1, 1, '0px'),\n outlineStyle: 'none',\n },\n sortable: {\n cursor: 'pointer',\n },\n\n sortIcon: {\n display: 'flex',\n alignItems: 'center',\n paddingTop: tokens.spacingVerticalXXS,\n },\n});\n\n/**\n * Apply styling to the TableHeaderCell slots based on the state\n */\nexport const useTableHeaderCellStyles_unstable = (state: TableHeaderCellState): TableHeaderCellState => {\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableHeaderCellClassNames.root,\n styles.root,\n state.sortable && styles.rootInteractive,\n state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,\n state.root.className,\n );\n state.button.className = mergeClasses(\n tableHeaderCellClassNames.button,\n styles.resetButton,\n styles.button,\n state.sortable && styles.sortable,\n state.button.className,\n );\n\n if (state.sortIcon) {\n state.sortIcon.className = mergeClasses(\n tableHeaderCellClassNames.sortIcon,\n styles.sortIcon,\n state.sortIcon.className,\n );\n }\n\n return state;\n};\n"]}
@@ -3,9 +3,8 @@ import { useTableRow_unstable } from './useTableRow';
3
3
  import { renderTableRow_unstable } from './renderTableRow';
4
4
  import { useTableRowStyles_unstable } from './useTableRowStyles';
5
5
  /**
6
- * TableRow component - TODO: add more docs
6
+ * TableRow component
7
7
  */
8
-
9
8
  export const TableRow = /*#__PURE__*/React.forwardRef((props, ref) => {
10
9
  const state = useTableRow_unstable(props, ref);
11
10
  useTableRowStyles_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/TableRow/TableRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,oBAAT,QAAqC,eAArC;AACA,SAAS,uBAAT,QAAwC,kBAAxC;AACA,SAAS,0BAAT,QAA2C,qBAA3C;AAIA;;AAEG;;AACH,OAAO,MAAM,QAAQ,gBAAuC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC1F,MAAM,KAAK,GAAG,oBAAoB,CAAC,KAAD,EAAQ,GAAR,CAAlC;EAEA,0BAA0B,CAAC,KAAD,CAA1B;EACA,OAAO,uBAAuB,CAAC,KAAD,CAA9B;AACD,CAL2D,CAArD;AAOP,QAAQ,CAAC,WAAT,GAAuB,UAAvB","sourcesContent":["import * as React from 'react';\nimport { useTableRow_unstable } from './useTableRow';\nimport { renderTableRow_unstable } from './renderTableRow';\nimport { useTableRowStyles_unstable } from './useTableRowStyles';\nimport type { TableRowProps } from './TableRow.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableRow component - TODO: add more docs\n */\nexport const TableRow: ForwardRefComponent<TableRowProps> = React.forwardRef((props, ref) => {\n const state = useTableRow_unstable(props, ref);\n\n useTableRowStyles_unstable(state);\n return renderTableRow_unstable(state);\n});\n\nTableRow.displayName = 'TableRow';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,oBAAoB,QAAQ,eAAe;AACpD,SAASC,uBAAuB,QAAQ,kBAAkB;AAC1D,SAASC,0BAA0B,QAAQ,qBAAqB;AAIhE;;;AAGA,OAAO,MAAMC,QAAQ,gBAAuCJ,KAAK,CAACK,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC1F,MAAMC,KAAK,GAAGP,oBAAoB,CAACK,KAAK,EAAEC,GAAG,CAAC;EAE9CJ,0BAA0B,CAACK,KAAK,CAAC;EACjC,OAAON,uBAAuB,CAACM,KAAK,CAAC;AACvC,CAAC,CAAC;AAEFJ,QAAQ,CAACK,WAAW,GAAG,UAAU","names":["React","useTableRow_unstable","renderTableRow_unstable","useTableRowStyles_unstable","TableRow","forwardRef","props","ref","state","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableRow/TableRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTableRow_unstable } from './useTableRow';\nimport { renderTableRow_unstable } from './renderTableRow';\nimport { useTableRowStyles_unstable } from './useTableRowStyles';\nimport type { TableRowProps } from './TableRow.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableRow component\n */\nexport const TableRow: ForwardRefComponent<TableRowProps> = React.forwardRef((props, ref) => {\n const state = useTableRow_unstable(props, ref);\n\n useTableRowStyles_unstable(state);\n return renderTableRow_unstable(state);\n});\n\nTableRow.displayName = 'TableRow';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TableRow.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableRow/TableRow.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableRowSlots = {\n root: Slot<'tr', 'div'>;\n};\n\n/**\n * TableRow Props\n */\nexport type TableRowProps = ComponentProps<TableRowSlots> & {\n /**\n * A table row can have different variants\n * @default none\n */\n appearance?: 'brand' | 'neutral' | 'none';\n};\n\n/**\n * State used in rendering TableRow\n */\nexport type TableRowState = ComponentState<TableRowSlots> &\n Pick<TableContextValue, 'noNativeElements' | 'size'> &\n Pick<Required<TableRowProps>, 'appearance'>;\n"]}
1
+ {"version":3,"file":"TableRow.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableRow/TableRow.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableRowSlots = {\n root: Slot<'tr', 'div'>;\n};\n\n/**\n * TableRow Props\n */\nexport type TableRowProps = ComponentProps<TableRowSlots> & {\n /**\n * A table row can have different variants. These appearances are\n * intended to be used with selection.\n * @default none\n */\n appearance?: 'brand' | 'neutral' | 'none';\n};\n\n/**\n * State used in rendering TableRow\n */\nexport type TableRowState = ComponentState<TableRowSlots> &\n Pick<TableContextValue, 'noNativeElements' | 'size'> &\n Pick<Required<TableRowProps>, 'appearance'> & {\n isHeaderRow: boolean;\n };\n"]}
@@ -3,14 +3,13 @@ import { getSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Render the final JSX of TableRow
5
5
  */
6
-
7
6
  export const renderTableRow_unstable = state => {
8
7
  const {
9
8
  slots,
10
9
  slotProps
11
- } = getSlots(state); // TODO Add additional slots in the appropriate place
12
-
13
- return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
10
+ } = getSlots(state);
11
+ return /*#__PURE__*/React.createElement(slots.root, {
12
+ ...slotProps.root
14
13
  });
15
14
  };
16
15
  //# sourceMappingURL=renderTableRow.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/TableRow/renderTableRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,uBAAuB,GAAI,KAAD,IAAyB;EAC9D,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAgB,KAAhB,CAArC,CAD8D,CAG9D;;EACA,oBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CALM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableRowState, TableRowSlots } from './TableRow.types';\n\n/**\n * Render the final JSX of TableRow\n */\nexport const renderTableRow_unstable = (state: TableRowState) => {\n const { slots, slotProps } = getSlots<TableRowSlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;AAGA,OAAO,MAAMC,uBAAuB,GAAIC,KAAoB,IAAI;EAC9D,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAgBE,KAAK,CAAC;EAE3D,oBAAOH,oBAACI,KAAK,CAACE,IAAI;IAAA,GAAKD,SAAS,CAACC;EAAI,EAAI;AAC3C,CAAC","names":["React","getSlots","renderTableRow_unstable","state","slots","slotProps","root"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableRow/renderTableRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableRowState, TableRowSlots } from './TableRow.types';\n\n/**\n * Render the final JSX of TableRow\n */\nexport const renderTableRow_unstable = (state: TableRowState) => {\n const { slots, slotProps } = getSlots<TableRowSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"]}
@@ -1,6 +1,7 @@
1
1
  import { getNativeElementProps, useMergedRefs } from '@fluentui/react-utilities';
2
+ import { useFocusVisible, useFocusWithin } from '@fluentui/react-tabster';
2
3
  import { useTableContext } from '../../contexts/tableContext';
3
- import { useFocusVisible } from '@fluentui/react-tabster';
4
+ import { useIsInTableHeader } from '../../contexts/tableHeaderContext';
4
5
  /**
5
6
  * Create the state required to render TableRow.
6
7
  *
@@ -10,28 +11,29 @@ import { useFocusVisible } from '@fluentui/react-tabster';
10
11
  * @param props - props from this instance of TableRow
11
12
  * @param ref - reference to root HTMLElement of TableRow
12
13
  */
13
-
14
14
  export const useTableRow_unstable = (props, ref) => {
15
15
  var _a, _b;
16
-
17
16
  const {
18
17
  noNativeElements,
19
18
  size
20
19
  } = useTableContext();
21
20
  const rootComponent = ((_a = props.as) !== null && _a !== void 0 ? _a : noNativeElements) ? 'div' : 'tr';
22
21
  const focusVisibleRef = useFocusVisible();
22
+ const focusWithinRef = useFocusWithin();
23
+ const isHeaderRow = useIsInTableHeader();
23
24
  return {
24
25
  components: {
25
26
  root: rootComponent
26
27
  },
27
28
  root: getNativeElementProps(rootComponent, {
28
- ref: useMergedRefs(ref, focusVisibleRef),
29
+ ref: useMergedRefs(ref, focusVisibleRef, focusWithinRef),
29
30
  role: rootComponent === 'div' ? 'row' : undefined,
30
31
  ...props
31
32
  }),
32
33
  size,
33
34
  noNativeElements,
34
- appearance: (_b = props.appearance) !== null && _b !== void 0 ? _b : 'none'
35
+ appearance: (_b = props.appearance) !== null && _b !== void 0 ? _b : 'none',
36
+ isHeaderRow
35
37
  };
36
38
  };
37
39
  //# sourceMappingURL=useTableRow.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/TableRow/useTableRow.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,aAAhC,QAAqD,2BAArD;AAEA,SAAS,eAAT,QAAgC,6BAAhC;AACA,SAAS,eAAT,QAAgC,yBAAhC;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,oBAAoB,GAAG,CAAC,KAAD,EAAuB,GAAvB,KAAqE;;;EACvG,MAAM;IAAE,gBAAF;IAAoB;EAApB,IAA6B,eAAe,EAAlD;EACA,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,MAAM,eAAe,GAAG,eAAe,EAAvC;EAEA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,qBAAqB,CAAC,aAAD,EAAgB;MACzC,GAAG,EAAE,aAAa,CAAC,GAAD,EAAM,eAAN,CADuB;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,KAA1B,GAAkC,SAFC;MAGzC,GAAG;IAHsC,CAAhB,CAJtB;IASL,IATK;IAUL,gBAVK;IAWL,UAAU,EAAE,CAAA,EAAA,GAAA,KAAK,CAAC,UAAN,MAAgB,IAAhB,IAAgB,EAAA,KAAA,KAAA,CAAhB,GAAgB,EAAhB,GAAoB;EAX3B,CAAP;AAaD,CAlBM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useMergedRefs } from '@fluentui/react-utilities';\nimport type { TableRowProps, TableRowState } from './TableRow.types';\nimport { useTableContext } from '../../contexts/tableContext';\nimport { useFocusVisible } from '@fluentui/react-tabster';\n\n/**\n * Create the state required to render TableRow.\n *\n * The returned state can be modified with hooks such as useTableRowStyles_unstable,\n * before being passed to renderTableRow_unstable.\n *\n * @param props - props from this instance of TableRow\n * @param ref - reference to root HTMLElement of TableRow\n */\nexport const useTableRow_unstable = (props: TableRowProps, ref: React.Ref<HTMLElement>): TableRowState => {\n const { noNativeElements, size } = useTableContext();\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'tr';\n const focusVisibleRef = useFocusVisible();\n\n return {\n components: {\n root: rootComponent,\n },\n root: getNativeElementProps(rootComponent, {\n ref: useMergedRefs(ref, focusVisibleRef),\n role: rootComponent === 'div' ? 'row' : undefined,\n ...props,\n }),\n size,\n noNativeElements,\n appearance: props.appearance ?? 'none',\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AACA,SAASA,qBAAqB,EAAEC,aAAa,QAAQ,2BAA2B;AAChF,SAASC,eAAe,EAAEC,cAAc,QAAQ,yBAAyB;AAEzE,SAASC,eAAe,QAAQ,6BAA6B;AAC7D,SAASC,kBAAkB,QAAQ,mCAAmC;AAEtE;;;;;;;;;AASA,OAAO,MAAMC,oBAAoB,GAAG,CAACC,KAAoB,EAAEC,GAA2B,KAAmB;;EACvG,MAAM;IAAEC,gBAAgB;IAAEC;EAAI,CAAE,GAAGN,eAAe,EAAE;EACpD,MAAMO,aAAa,GAAG,YAAK,CAACC,EAAE,mCAAIH,gBAAgB,IAAG,KAAK,GAAG,IAAI;EACjE,MAAMI,eAAe,GAAGX,eAAe,EAAE;EACzC,MAAMY,cAAc,GAAGX,cAAc,EAAE;EACvC,MAAMY,WAAW,GAAGV,kBAAkB,EAAE;EAExC,OAAO;IACLW,UAAU,EAAE;MACVC,IAAI,EAAEN;KACP;IACDM,IAAI,EAAEjB,qBAAqB,CAACW,aAAa,EAAE;MACzCH,GAAG,EAAEP,aAAa,CAACO,GAAG,EAAEK,eAAe,EAAEC,cAAc,CAAC;MACxDI,IAAI,EAAEP,aAAa,KAAK,KAAK,GAAG,KAAK,GAAGQ,SAAS;MACjD,GAAGZ;KACJ,CAAC;IACFG,IAAI;IACJD,gBAAgB;IAChBW,UAAU,EAAE,WAAK,CAACA,UAAU,mCAAI,MAAM;IACtCL;GACD;AACH,CAAC","names":["getNativeElementProps","useMergedRefs","useFocusVisible","useFocusWithin","useTableContext","useIsInTableHeader","useTableRow_unstable","props","ref","noNativeElements","size","rootComponent","as","focusVisibleRef","focusWithinRef","isHeaderRow","components","root","role","undefined","appearance"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableRow/useTableRow.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useMergedRefs } from '@fluentui/react-utilities';\nimport { useFocusVisible, useFocusWithin } from '@fluentui/react-tabster';\nimport type { TableRowProps, TableRowState } from './TableRow.types';\nimport { useTableContext } from '../../contexts/tableContext';\nimport { useIsInTableHeader } from '../../contexts/tableHeaderContext';\n\n/**\n * Create the state required to render TableRow.\n *\n * The returned state can be modified with hooks such as useTableRowStyles_unstable,\n * before being passed to renderTableRow_unstable.\n *\n * @param props - props from this instance of TableRow\n * @param ref - reference to root HTMLElement of TableRow\n */\nexport const useTableRow_unstable = (props: TableRowProps, ref: React.Ref<HTMLElement>): TableRowState => {\n const { noNativeElements, size } = useTableContext();\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'tr';\n const focusVisibleRef = useFocusVisible();\n const focusWithinRef = useFocusWithin();\n const isHeaderRow = useIsInTableHeader();\n\n return {\n components: {\n root: rootComponent,\n },\n root: getNativeElementProps(rootComponent, {\n ref: useMergedRefs(ref, focusVisibleRef, focusWithinRef),\n role: rootComponent === 'div' ? 'row' : undefined,\n ...props,\n }),\n size,\n noNativeElements,\n appearance: props.appearance ?? 'none',\n isHeaderRow,\n };\n};\n"]}