@fluentui/react-table 9.0.0-alpha.14 → 9.0.0-alpha.16

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 (399) hide show
  1. package/CHANGELOG.json +129 -1
  2. package/CHANGELOG.md +34 -2
  3. package/dist/index.d.ts +8 -2
  4. package/lib/components/DataGrid/DataGrid.js +0 -1
  5. package/lib/components/DataGrid/DataGrid.js.map +1 -1
  6. package/lib/components/DataGrid/renderDataGrid.js +0 -1
  7. package/lib/components/DataGrid/renderDataGrid.js.map +1 -1
  8. package/lib/components/DataGrid/useDataGrid.js +2 -2
  9. package/lib/components/DataGrid/useDataGrid.js.map +1 -1
  10. package/lib/components/DataGrid/useDataGridContextValues.js +4 -2
  11. package/lib/components/DataGrid/useDataGridContextValues.js.map +1 -1
  12. package/lib/components/DataGrid/useDataGridStyles.js +0 -1
  13. package/lib/components/DataGrid/useDataGridStyles.js.map +1 -1
  14. package/lib/components/DataGridBody/DataGridBody.js +0 -1
  15. package/lib/components/DataGridBody/DataGridBody.js.map +1 -1
  16. package/lib/components/DataGridBody/DataGridBody.types.js.map +1 -1
  17. package/lib/components/DataGridBody/renderDataGridBody.js +13 -3
  18. package/lib/components/DataGridBody/renderDataGridBody.js.map +1 -1
  19. package/lib/components/DataGridBody/useDataGridBody.js +8 -12
  20. package/lib/components/DataGridBody/useDataGridBody.js.map +1 -1
  21. package/lib/components/DataGridBody/useDataGridBodyStyles.js +0 -1
  22. package/lib/components/DataGridBody/useDataGridBodyStyles.js.map +1 -1
  23. package/lib/components/DataGridCell/DataGridCell.js +0 -1
  24. package/lib/components/DataGridCell/DataGridCell.js.map +1 -1
  25. package/lib/components/DataGridCell/renderDataGridCell.js +0 -1
  26. package/lib/components/DataGridCell/renderDataGridCell.js.map +1 -1
  27. package/lib/components/DataGridCell/useDataGridCell.js +0 -1
  28. package/lib/components/DataGridCell/useDataGridCell.js.map +1 -1
  29. package/lib/components/DataGridCell/useDataGridCellStyles.js +0 -1
  30. package/lib/components/DataGridCell/useDataGridCellStyles.js.map +1 -1
  31. package/lib/components/DataGridHeader/DataGridHeader.js +0 -1
  32. package/lib/components/DataGridHeader/DataGridHeader.js.map +1 -1
  33. package/lib/components/DataGridHeader/renderDataGridHeader.js +0 -1
  34. package/lib/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
  35. package/lib/components/DataGridHeader/useDataGridHeader.js +2 -2
  36. package/lib/components/DataGridHeader/useDataGridHeader.js.map +1 -1
  37. package/lib/components/DataGridHeader/useDataGridHeaderStyles.js +0 -1
  38. package/lib/components/DataGridHeader/useDataGridHeaderStyles.js.map +1 -1
  39. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js +0 -1
  40. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
  41. package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js +0 -1
  42. package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
  43. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js +0 -3
  44. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
  45. package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +0 -4
  46. package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -1
  47. package/lib/components/DataGridRow/DataGridRow.js +0 -1
  48. package/lib/components/DataGridRow/DataGridRow.js.map +1 -1
  49. package/lib/components/DataGridRow/DataGridRow.types.js.map +1 -1
  50. package/lib/components/DataGridRow/renderDataGridRow.js +9 -4
  51. package/lib/components/DataGridRow/renderDataGridRow.js.map +1 -1
  52. package/lib/components/DataGridRow/useDataGridRow.js +8 -19
  53. package/lib/components/DataGridRow/useDataGridRow.js.map +1 -1
  54. package/lib/components/DataGridRow/useDataGridRowStyles.js +0 -3
  55. package/lib/components/DataGridRow/useDataGridRowStyles.js.map +1 -1
  56. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js +0 -1
  57. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
  58. package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js +0 -1
  59. package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
  60. package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js +0 -8
  61. package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
  62. package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js +0 -4
  63. package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js.map +1 -1
  64. package/lib/components/Table/Table.js +0 -1
  65. package/lib/components/Table/Table.js.map +1 -1
  66. package/lib/components/Table/renderTable.js +2 -2
  67. package/lib/components/Table/renderTable.js.map +1 -1
  68. package/lib/components/Table/useTable.js +0 -2
  69. package/lib/components/Table/useTable.js.map +1 -1
  70. package/lib/components/Table/useTableContextValues.js.map +1 -1
  71. package/lib/components/Table/useTableStyles.js +13 -19
  72. package/lib/components/Table/useTableStyles.js.map +1 -1
  73. package/lib/components/TableBody/TableBody.js +0 -1
  74. package/lib/components/TableBody/TableBody.js.map +1 -1
  75. package/lib/components/TableBody/renderTableBody.js +4 -4
  76. package/lib/components/TableBody/renderTableBody.js.map +1 -1
  77. package/lib/components/TableBody/useTableBody.js +0 -2
  78. package/lib/components/TableBody/useTableBody.js.map +1 -1
  79. package/lib/components/TableBody/useTableBodyStyles.js +6 -10
  80. package/lib/components/TableBody/useTableBodyStyles.js.map +1 -1
  81. package/lib/components/TableCell/TableCell.js +0 -1
  82. package/lib/components/TableCell/TableCell.js.map +1 -1
  83. package/lib/components/TableCell/renderTableCell.js +2 -2
  84. package/lib/components/TableCell/renderTableCell.js.map +1 -1
  85. package/lib/components/TableCell/useTableCell.js +0 -2
  86. package/lib/components/TableCell/useTableCell.js.map +1 -1
  87. package/lib/components/TableCell/useTableCellStyles.js +36 -42
  88. package/lib/components/TableCell/useTableCellStyles.js.map +1 -1
  89. package/lib/components/TableCellActions/TableCellActions.js +0 -1
  90. package/lib/components/TableCellActions/TableCellActions.js.map +1 -1
  91. package/lib/components/TableCellActions/renderTableCellActions.js +4 -4
  92. package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -1
  93. package/lib/components/TableCellActions/useTableCellActions.js +0 -2
  94. package/lib/components/TableCellActions/useTableCellActions.js.map +1 -1
  95. package/lib/components/TableCellActions/useTableCellActionsStyles.js +10 -13
  96. package/lib/components/TableCellActions/useTableCellActionsStyles.js.map +1 -1
  97. package/lib/components/TableCellLayout/TableCellLayout.js +0 -1
  98. package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -1
  99. package/lib/components/TableCellLayout/renderTableCellLayout.js +10 -6
  100. package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  101. package/lib/components/TableCellLayout/useTableCellLayout.js +0 -1
  102. package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  103. package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
  104. package/lib/components/TableCellLayout/useTableCellLayoutStyles.js +29 -37
  105. package/lib/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
  106. package/lib/components/TableHeader/TableHeader.js +0 -1
  107. package/lib/components/TableHeader/TableHeader.js.map +1 -1
  108. package/lib/components/TableHeader/renderTableHeader.js +2 -2
  109. package/lib/components/TableHeader/renderTableHeader.js.map +1 -1
  110. package/lib/components/TableHeader/useTableHeader.js +0 -2
  111. package/lib/components/TableHeader/useTableHeader.js.map +1 -1
  112. package/lib/components/TableHeader/useTableHeaderStyles.js +10 -14
  113. package/lib/components/TableHeader/useTableHeaderStyles.js.map +1 -1
  114. package/lib/components/TableHeaderCell/TableHeaderCell.js +0 -1
  115. package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  116. package/lib/components/TableHeaderCell/renderTableHeaderCell.js +6 -4
  117. package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  118. package/lib/components/TableHeaderCell/useTableHeaderCell.js +0 -2
  119. package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  120. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js +68 -76
  121. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
  122. package/lib/components/TableRow/TableRow.js +0 -1
  123. package/lib/components/TableRow/TableRow.js.map +1 -1
  124. package/lib/components/TableRow/renderTableRow.js +4 -4
  125. package/lib/components/TableRow/renderTableRow.js.map +1 -1
  126. package/lib/components/TableRow/useTableRow.js +0 -2
  127. package/lib/components/TableRow/useTableRow.js.map +1 -1
  128. package/lib/components/TableRow/useTableRowStyles.js +136 -142
  129. package/lib/components/TableRow/useTableRowStyles.js.map +1 -1
  130. package/lib/components/TableSelectionCell/TableSelectionCell.js +0 -1
  131. package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  132. package/lib/components/TableSelectionCell/renderTableSelectionCell.js +6 -4
  133. package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  134. package/lib/components/TableSelectionCell/useTableSelectionCell.js +4 -3
  135. package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  136. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js +42 -51
  137. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
  138. package/lib/contexts/columnIdContext.js +0 -1
  139. package/lib/contexts/columnIdContext.js.map +1 -1
  140. package/lib/contexts/dataGridContext.js +2 -1
  141. package/lib/contexts/dataGridContext.js.map +1 -1
  142. package/lib/contexts/rowIdContext.js +0 -1
  143. package/lib/contexts/rowIdContext.js.map +1 -1
  144. package/lib/contexts/tableContext.js +0 -1
  145. package/lib/contexts/tableContext.js.map +1 -1
  146. package/lib/contexts/tableHeaderContext.js.map +1 -1
  147. package/lib/hooks/createColumn.js +0 -6
  148. package/lib/hooks/createColumn.js.map +1 -1
  149. package/lib/hooks/selectionManager.js +0 -16
  150. package/lib/hooks/selectionManager.js.map +1 -1
  151. package/lib/hooks/useTableFeatures.js +0 -5
  152. package/lib/hooks/useTableFeatures.js.map +1 -1
  153. package/lib/hooks/useTableSelection.js +2 -6
  154. package/lib/hooks/useTableSelection.js.map +1 -1
  155. package/lib/hooks/useTableSort.js +4 -13
  156. package/lib/hooks/useTableSort.js.map +1 -1
  157. package/lib/index.js.map +1 -1
  158. package/lib-commonjs/DataGrid.js +0 -2
  159. package/lib-commonjs/DataGrid.js.map +1 -1
  160. package/lib-commonjs/DataGridBody.js +0 -2
  161. package/lib-commonjs/DataGridBody.js.map +1 -1
  162. package/lib-commonjs/DataGridCell.js +0 -2
  163. package/lib-commonjs/DataGridCell.js.map +1 -1
  164. package/lib-commonjs/DataGridHeader.js +0 -2
  165. package/lib-commonjs/DataGridHeader.js.map +1 -1
  166. package/lib-commonjs/DataGridHeaderCell.js +0 -2
  167. package/lib-commonjs/DataGridHeaderCell.js.map +1 -1
  168. package/lib-commonjs/DataGridRow.js +0 -2
  169. package/lib-commonjs/DataGridRow.js.map +1 -1
  170. package/lib-commonjs/DataGridSelectionCell.js +0 -2
  171. package/lib-commonjs/DataGridSelectionCell.js.map +1 -1
  172. package/lib-commonjs/Table.js +0 -2
  173. package/lib-commonjs/Table.js.map +1 -1
  174. package/lib-commonjs/TableBody.js +0 -2
  175. package/lib-commonjs/TableBody.js.map +1 -1
  176. package/lib-commonjs/TableCell.js +0 -2
  177. package/lib-commonjs/TableCell.js.map +1 -1
  178. package/lib-commonjs/TableCellActions.js +0 -2
  179. package/lib-commonjs/TableCellActions.js.map +1 -1
  180. package/lib-commonjs/TableCellLayout.js +0 -2
  181. package/lib-commonjs/TableCellLayout.js.map +1 -1
  182. package/lib-commonjs/TableCellPrimaryLayout.js +0 -2
  183. package/lib-commonjs/TableCellPrimaryLayout.js.map +1 -1
  184. package/lib-commonjs/TableHeader.js +0 -2
  185. package/lib-commonjs/TableHeader.js.map +1 -1
  186. package/lib-commonjs/TableHeaderCell.js +0 -2
  187. package/lib-commonjs/TableHeaderCell.js.map +1 -1
  188. package/lib-commonjs/TableRow.js +0 -2
  189. package/lib-commonjs/TableRow.js.map +1 -1
  190. package/lib-commonjs/TableSelectionCell.js +0 -2
  191. package/lib-commonjs/TableSelectionCell.js.map +1 -1
  192. package/lib-commonjs/components/DataGrid/DataGrid.js +0 -7
  193. package/lib-commonjs/components/DataGrid/DataGrid.js.map +1 -1
  194. package/lib-commonjs/components/DataGrid/DataGrid.types.js.map +1 -1
  195. package/lib-commonjs/components/DataGrid/index.js +0 -6
  196. package/lib-commonjs/components/DataGrid/index.js.map +1 -1
  197. package/lib-commonjs/components/DataGrid/renderDataGrid.js +0 -6
  198. package/lib-commonjs/components/DataGrid/renderDataGrid.js.map +1 -1
  199. package/lib-commonjs/components/DataGrid/useDataGrid.js +2 -7
  200. package/lib-commonjs/components/DataGrid/useDataGrid.js.map +1 -1
  201. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js +4 -5
  202. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js.map +1 -1
  203. package/lib-commonjs/components/DataGrid/useDataGridStyles.js +0 -5
  204. package/lib-commonjs/components/DataGrid/useDataGridStyles.js.map +1 -1
  205. package/lib-commonjs/components/DataGridBody/DataGridBody.js +0 -6
  206. package/lib-commonjs/components/DataGridBody/DataGridBody.js.map +1 -1
  207. package/lib-commonjs/components/DataGridBody/DataGridBody.types.js.map +1 -1
  208. package/lib-commonjs/components/DataGridBody/index.js +0 -6
  209. package/lib-commonjs/components/DataGridBody/index.js.map +1 -1
  210. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js +13 -6
  211. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js.map +1 -1
  212. package/lib-commonjs/components/DataGridBody/useDataGridBody.js +8 -19
  213. package/lib-commonjs/components/DataGridBody/useDataGridBody.js.map +1 -1
  214. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.js +0 -5
  215. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.js.map +1 -1
  216. package/lib-commonjs/components/DataGridCell/DataGridCell.js +0 -6
  217. package/lib-commonjs/components/DataGridCell/DataGridCell.js.map +1 -1
  218. package/lib-commonjs/components/DataGridCell/DataGridCell.types.js.map +1 -1
  219. package/lib-commonjs/components/DataGridCell/index.js +0 -6
  220. package/lib-commonjs/components/DataGridCell/index.js.map +1 -1
  221. package/lib-commonjs/components/DataGridCell/renderDataGridCell.js +0 -4
  222. package/lib-commonjs/components/DataGridCell/renderDataGridCell.js.map +1 -1
  223. package/lib-commonjs/components/DataGridCell/useDataGridCell.js +0 -5
  224. package/lib-commonjs/components/DataGridCell/useDataGridCell.js.map +1 -1
  225. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.js +0 -5
  226. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.js.map +1 -1
  227. package/lib-commonjs/components/DataGridHeader/DataGridHeader.js +0 -6
  228. package/lib-commonjs/components/DataGridHeader/DataGridHeader.js.map +1 -1
  229. package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js.map +1 -1
  230. package/lib-commonjs/components/DataGridHeader/index.js +0 -6
  231. package/lib-commonjs/components/DataGridHeader/index.js.map +1 -1
  232. package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js +0 -4
  233. package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
  234. package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js +2 -5
  235. package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js.map +1 -1
  236. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.js +0 -5
  237. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.js.map +1 -1
  238. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js +0 -6
  239. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
  240. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -1
  241. package/lib-commonjs/components/DataGridHeaderCell/index.js +0 -6
  242. package/lib-commonjs/components/DataGridHeaderCell/index.js.map +1 -1
  243. package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js +0 -4
  244. package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
  245. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js +0 -10
  246. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
  247. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +0 -8
  248. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -1
  249. package/lib-commonjs/components/DataGridRow/DataGridRow.js +0 -6
  250. package/lib-commonjs/components/DataGridRow/DataGridRow.js.map +1 -1
  251. package/lib-commonjs/components/DataGridRow/DataGridRow.types.js.map +1 -1
  252. package/lib-commonjs/components/DataGridRow/index.js +0 -6
  253. package/lib-commonjs/components/DataGridRow/index.js.map +1 -1
  254. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js +9 -8
  255. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js.map +1 -1
  256. package/lib-commonjs/components/DataGridRow/useDataGridRow.js +8 -30
  257. package/lib-commonjs/components/DataGridRow/useDataGridRow.js.map +1 -1
  258. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.js +0 -7
  259. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.js.map +1 -1
  260. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js +0 -6
  261. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
  262. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -1
  263. package/lib-commonjs/components/DataGridSelectionCell/index.js +0 -6
  264. package/lib-commonjs/components/DataGridSelectionCell/index.js.map +1 -1
  265. package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js +0 -4
  266. package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
  267. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js +0 -15
  268. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
  269. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js +0 -8
  270. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js.map +1 -1
  271. package/lib-commonjs/components/Table/Table.js +0 -7
  272. package/lib-commonjs/components/Table/Table.js.map +1 -1
  273. package/lib-commonjs/components/Table/Table.types.js.map +1 -1
  274. package/lib-commonjs/components/Table/index.js +0 -6
  275. package/lib-commonjs/components/Table/index.js.map +1 -1
  276. package/lib-commonjs/components/Table/renderTable.js +2 -7
  277. package/lib-commonjs/components/Table/renderTable.js.map +1 -1
  278. package/lib-commonjs/components/Table/useTable.js +0 -5
  279. package/lib-commonjs/components/Table/useTable.js.map +1 -1
  280. package/lib-commonjs/components/Table/useTableContextValues.js +0 -3
  281. package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -1
  282. package/lib-commonjs/components/Table/useTableStyles.js +13 -23
  283. package/lib-commonjs/components/Table/useTableStyles.js.map +1 -1
  284. package/lib-commonjs/components/TableBody/TableBody.js +0 -6
  285. package/lib-commonjs/components/TableBody/TableBody.js.map +1 -1
  286. package/lib-commonjs/components/TableBody/TableBody.types.js.map +1 -1
  287. package/lib-commonjs/components/TableBody/index.js +0 -6
  288. package/lib-commonjs/components/TableBody/index.js.map +1 -1
  289. package/lib-commonjs/components/TableBody/renderTableBody.js +4 -8
  290. package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -1
  291. package/lib-commonjs/components/TableBody/useTableBody.js +0 -6
  292. package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
  293. package/lib-commonjs/components/TableBody/useTableBodyStyles.js +6 -12
  294. package/lib-commonjs/components/TableBody/useTableBodyStyles.js.map +1 -1
  295. package/lib-commonjs/components/TableCell/TableCell.js +0 -6
  296. package/lib-commonjs/components/TableCell/TableCell.js.map +1 -1
  297. package/lib-commonjs/components/TableCell/TableCell.types.js.map +1 -1
  298. package/lib-commonjs/components/TableCell/index.js +0 -6
  299. package/lib-commonjs/components/TableCell/index.js.map +1 -1
  300. package/lib-commonjs/components/TableCell/renderTableCell.js +2 -6
  301. package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -1
  302. package/lib-commonjs/components/TableCell/useTableCell.js +0 -6
  303. package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
  304. package/lib-commonjs/components/TableCell/useTableCellStyles.js +36 -47
  305. package/lib-commonjs/components/TableCell/useTableCellStyles.js.map +1 -1
  306. package/lib-commonjs/components/TableCellActions/TableCellActions.js +0 -6
  307. package/lib-commonjs/components/TableCellActions/TableCellActions.js.map +1 -1
  308. package/lib-commonjs/components/TableCellActions/TableCellActions.types.js.map +1 -1
  309. package/lib-commonjs/components/TableCellActions/index.js +0 -6
  310. package/lib-commonjs/components/TableCellActions/index.js.map +1 -1
  311. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js +4 -8
  312. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -1
  313. package/lib-commonjs/components/TableCellActions/useTableCellActions.js +0 -5
  314. package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -1
  315. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js +10 -16
  316. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js.map +1 -1
  317. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js +0 -7
  318. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js.map +1 -1
  319. package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
  320. package/lib-commonjs/components/TableCellLayout/index.js +0 -6
  321. package/lib-commonjs/components/TableCellLayout/index.js.map +1 -1
  322. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js +10 -11
  323. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  324. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +0 -5
  325. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  326. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js +0 -3
  327. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
  328. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js +29 -42
  329. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
  330. package/lib-commonjs/components/TableHeader/TableHeader.js +0 -6
  331. package/lib-commonjs/components/TableHeader/TableHeader.js.map +1 -1
  332. package/lib-commonjs/components/TableHeader/TableHeader.types.js.map +1 -1
  333. package/lib-commonjs/components/TableHeader/index.js +0 -6
  334. package/lib-commonjs/components/TableHeader/index.js.map +1 -1
  335. package/lib-commonjs/components/TableHeader/renderTableHeader.js +2 -7
  336. package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -1
  337. package/lib-commonjs/components/TableHeader/useTableHeader.js +0 -6
  338. package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
  339. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js +10 -17
  340. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js.map +1 -1
  341. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js +0 -6
  342. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  343. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
  344. package/lib-commonjs/components/TableHeaderCell/index.js +0 -6
  345. package/lib-commonjs/components/TableHeaderCell/index.js.map +1 -1
  346. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js +6 -8
  347. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  348. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +0 -10
  349. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  350. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js +68 -81
  351. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
  352. package/lib-commonjs/components/TableRow/TableRow.js +0 -6
  353. package/lib-commonjs/components/TableRow/TableRow.js.map +1 -1
  354. package/lib-commonjs/components/TableRow/TableRow.types.js.map +1 -1
  355. package/lib-commonjs/components/TableRow/index.js +0 -6
  356. package/lib-commonjs/components/TableRow/index.js.map +1 -1
  357. package/lib-commonjs/components/TableRow/renderTableRow.js +4 -8
  358. package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -1
  359. package/lib-commonjs/components/TableRow/useTableRow.js +0 -7
  360. package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
  361. package/lib-commonjs/components/TableRow/useTableRowStyles.js +136 -150
  362. package/lib-commonjs/components/TableRow/useTableRowStyles.js.map +1 -1
  363. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js +0 -6
  364. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  365. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
  366. package/lib-commonjs/components/TableSelectionCell/index.js +0 -6
  367. package/lib-commonjs/components/TableSelectionCell/index.js.map +1 -1
  368. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js +6 -8
  369. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  370. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js +4 -10
  371. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  372. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js +42 -56
  373. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
  374. package/lib-commonjs/contexts/columnIdContext.js +0 -5
  375. package/lib-commonjs/contexts/columnIdContext.js.map +1 -1
  376. package/lib-commonjs/contexts/dataGridContext.js +2 -6
  377. package/lib-commonjs/contexts/dataGridContext.js.map +1 -1
  378. package/lib-commonjs/contexts/rowIdContext.js +0 -5
  379. package/lib-commonjs/contexts/rowIdContext.js.map +1 -1
  380. package/lib-commonjs/contexts/tableContext.js +0 -5
  381. package/lib-commonjs/contexts/tableContext.js.map +1 -1
  382. package/lib-commonjs/contexts/tableHeaderContext.js +0 -4
  383. package/lib-commonjs/contexts/tableHeaderContext.js.map +1 -1
  384. package/lib-commonjs/hooks/createColumn.js +0 -8
  385. package/lib-commonjs/hooks/createColumn.js.map +1 -1
  386. package/lib-commonjs/hooks/index.js +0 -6
  387. package/lib-commonjs/hooks/index.js.map +1 -1
  388. package/lib-commonjs/hooks/selectionManager.js +0 -18
  389. package/lib-commonjs/hooks/selectionManager.js.map +1 -1
  390. package/lib-commonjs/hooks/types.js.map +1 -1
  391. package/lib-commonjs/hooks/useTableFeatures.js +0 -9
  392. package/lib-commonjs/hooks/useTableFeatures.js.map +1 -1
  393. package/lib-commonjs/hooks/useTableSelection.js +2 -13
  394. package/lib-commonjs/hooks/useTableSelection.js.map +1 -1
  395. package/lib-commonjs/hooks/useTableSort.js +4 -18
  396. package/lib-commonjs/hooks/useTableSort.js.map +1 -1
  397. package/lib-commonjs/index.js +0 -36
  398. package/lib-commonjs/index.js.map +1 -1
  399. package/package.json +12 -12
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/TableHeaderCell/renderTableHeaderCell.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,8BAA8B,GAAI,KAAD,IAAgC;EAC5E,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAA+B,KAA/B,CAA7B;EAEA,OACE,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,IAAkB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAP,EAAe,EAAA,GAAK,SAAS,CAAC;EAAf,CAAf,CAFrB,CADF,CADF;AAQD,CAXM;;AAAM,OAAA,CAAA,8BAAA,GAA8B,8BAA9B","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;AACA;AAGA;;;AAGO,MAAMA,8BAA8B,GAAIC,KAA2B,IAAI;EAC5E,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGC,0BAAQ,CAAuBH,KAAK,CAAC;EAElE,OACEI,oBAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,GAC5BD,oBAACH,KAAK,CAACK,MAAM;IAAA,GAAKJ,SAAS,CAACI;EAAM,GAC/BJ,SAAS,CAACG,IAAI,CAACE,QAAQ,EACvBN,KAAK,CAACO,QAAQ,IAAIJ,oBAACH,KAAK,CAACO,QAAQ;IAAA,GAAKN,SAAS,CAACM;EAAQ,EAAI,CAChD,CACJ;AAEjB,CAAC;AAXYC,sCAA8B","names":["renderTableHeaderCell_unstable","state","slots","slotProps","react_utilities_1","React","root","button","children","sortIcon","exports"],"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"]}
@@ -4,19 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useTableHeaderCell_unstable = void 0;
7
-
8
7
  const React = /*#__PURE__*/require("react");
9
-
10
8
  const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
-
12
9
  const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
13
-
14
10
  const react_icons_1 = /*#__PURE__*/require("@fluentui/react-icons");
15
-
16
11
  const tableContext_1 = /*#__PURE__*/require("../../contexts/tableContext");
17
-
18
12
  const react_aria_1 = /*#__PURE__*/require("@fluentui/react-aria");
19
-
20
13
  const sortIcons = {
21
14
  ascending: /*#__PURE__*/React.createElement(react_icons_1.ArrowUpRegular, {
22
15
  fontSize: 12
@@ -34,10 +27,8 @@ const sortIcons = {
34
27
  * @param props - props from this instance of TableHeaderCell
35
28
  * @param ref - reference to root HTMLElement of TableHeaderCell
36
29
  */
37
-
38
30
  const useTableHeaderCell_unstable = (props, ref) => {
39
31
  var _a, _b;
40
-
41
32
  const {
42
33
  noNativeElements,
43
34
  sortable
@@ -77,6 +68,5 @@ const useTableHeaderCell_unstable = (props, ref) => {
77
68
  noNativeElements
78
69
  };
79
70
  };
80
-
81
71
  exports.useTableHeaderCell_unstable = useTableHeaderCell_unstable;
82
72
  //# sourceMappingURL=useTableHeaderCell.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/TableHeaderCell/useTableHeaderCell.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAEA,MAAA,cAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,MAAA,YAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;;AAEA,MAAM,SAAS,GAAG;EAChB,SAAS,eAAE,KAAA,CAAA,aAAA,CAAC,aAAA,CAAA,cAAD,EAAe;IAAC,QAAQ,EAAE;EAAX,CAAf,CADK;EAEhB,UAAU,eAAE,KAAA,CAAA,aAAA,CAAC,aAAA,CAAA,gBAAD,EAAiB;IAAC,QAAQ,EAAE;EAAX,CAAjB;AAFI,CAAlB;AAKA;;;;;;;;AAQG;;AACI,MAAM,2BAA2B,GAAG,CACzC,KADyC,EAEzC,GAFyC,KAGjB;;;EACxB,MAAM;IAAE,gBAAF;IAAoB;EAApB,IAAiC,cAAA,CAAA,eAAA,EAAvC;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,iBAAA,CAAA,qBAAA,CAAsB,aAAtB,EAAqC;MACzC,GAAG,EAAE,iBAAA,CAAA,aAAA,CAAc,GAAd,EAAmB,eAAA,CAAA,cAAA,EAAnB,CADoC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,cAA1B,GAA2C,SAFR;MAGzC,aAAa,QAAQ,GAAG,CAAA,EAAA,GAAA,KAAK,CAAC,aAAN,MAAmB,IAAnB,IAAmB,EAAA,KAAA,KAAA,CAAnB,GAAmB,EAAnB,GAAuB,MAA1B,GAAmC,SAHf;MAIzC,GAAG;IAJsC,CAArC,CAND;IAYL,QAAQ,EAAE,iBAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,QAAvB,EAAiC;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,CAAjC,CAZL;IAgBL,MAAM,EAAE,YAAA,CAAA,sBAAA,CAAuB,KAAK,CAAC,MAA7B,EAAqC;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,CAArC,CAhBH;IA4BL,QA5BK;IA6BL;EA7BK,CAAP;AA+BD,CAtCM;;AAAM,OAAA,CAAA,2BAAA,GAA2B,2BAA3B","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"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAEA;AACA;AAEA,MAAMA,SAAS,GAAG;EAChBC,SAAS,eAAEC,oBAACC,4BAAc;IAACC,QAAQ,EAAE;EAAE,EAAI;EAC3CC,UAAU,eAAEH,oBAACC,8BAAgB;IAACC,QAAQ,EAAE;EAAE;CAC3C;AAED;;;;;;;;;AASO,MAAME,2BAA2B,GAAG,CACzCC,KAA2B,EAC3BC,GAA2B,KACH;;EACxB,MAAM;IAAEC,gBAAgB;IAAEC;EAAQ,CAAE,GAAGC,8BAAe,EAAE;EAExD,MAAMC,aAAa,GAAG,YAAK,CAACC,EAAE,mCAAIJ,gBAAgB,IAAG,KAAK,GAAG,IAAI;EACjE,OAAO;IACLK,UAAU,EAAE;MACVC,IAAI,EAAEH,aAAa;MACnBI,MAAM,EAAE,QAAQ;MAChBC,QAAQ,EAAE;KACX;IACDF,IAAI,EAAEG,uCAAqB,CAACN,aAAa,EAAE;MACzCJ,GAAG,EAAEU,+BAAa,CAACV,GAAG,EAAEW,8BAAc,EAAE,CAAC;MACzCC,IAAI,EAAER,aAAa,KAAK,KAAK,GAAG,cAAc,GAAGS,SAAS;MAC1D,WAAW,EAAEX,QAAQ,GAAG,WAAK,CAACY,aAAa,mCAAI,MAAM,GAAGD,SAAS;MACjE,GAAGd;KACJ,CAAC;IACFU,QAAQ,EAAEC,kCAAgB,CAACX,KAAK,CAACU,QAAQ,EAAE;MACzCM,QAAQ,EAAE,CAAC,CAAChB,KAAK,CAACe,aAAa;MAC/BE,YAAY,EAAE;QAAEC,QAAQ,EAAElB,KAAK,CAACe,aAAa,GAAGtB,SAAS,CAACO,KAAK,CAACe,aAAa,CAAC,GAAGD;MAAS;KAC3F,CAAC;IACFL,MAAM,EAAEU,mCAAsB,CAACnB,KAAK,CAACS,MAAM,EAAE;MAC3CO,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZJ,IAAI,EAAE,cAAc;QACpBO,QAAQ,EAAE,CAAC,CAAC;QACZC,IAAI,EAAE,QAAQ;QACd,IAAIlB,QAAQ,IAAI;UACdU,IAAI,EAAEC,SAAS;UACfM,QAAQ,EAAEN;SACX;;KAEJ,CAAC;IACFX,QAAQ;IACRD;GACD;AACH,CAAC;AAtCYoB,mCAA2B","names":["sortIcons","ascending","React","react_icons_1","fontSize","descending","useTableHeaderCell_unstable","props","ref","noNativeElements","sortable","tableContext_1","rootComponent","as","components","root","button","sortIcon","react_utilities_1","react_tabster_1","role","undefined","sortDirection","required","defaultProps","children","react_aria_1","tabIndex","type","exports"],"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"]}
@@ -4,116 +4,106 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useTableHeaderCellStyles_unstable = exports.tableHeaderCellClassNames = exports.tableHeaderCellClassName = void 0;
7
-
8
7
  const react_1 = /*#__PURE__*/require("@griffel/react");
9
-
10
8
  const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
11
-
12
9
  const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
13
-
14
10
  exports.tableHeaderCellClassName = 'fui-TableHeaderCell';
15
11
  exports.tableHeaderCellClassNames = {
16
12
  root: 'fui-TableHeaderCell',
17
13
  button: 'fui-TableHeaderCell__button',
18
14
  sortIcon: 'fui-TableHeaderCell__sortIcon'
19
15
  };
20
-
21
16
  const useTableLayoutStyles = /*#__PURE__*/react_1.__styles({
22
- "root": {
23
- "mc9l5x": "f15pt5es",
24
- "ha4doy": "fmrv4ls"
17
+ root: {
18
+ mc9l5x: "f15pt5es",
19
+ ha4doy: "fmrv4ls"
25
20
  }
26
21
  }, {
27
- "d": [".f15pt5es{display:table-cell;}", ".fmrv4ls{vertical-align:middle;}"]
22
+ d: [".f15pt5es{display:table-cell;}", ".fmrv4ls{vertical-align:middle;}"]
28
23
  });
29
-
30
24
  const useFlexLayoutStyles = /*#__PURE__*/react_1.__styles({
31
- "root": {
32
- "mc9l5x": "f22iagw",
33
- "Bh6795r": "fqerorx",
34
- "Bnnss6s": "f1neuvcm",
35
- "xawz": "fkjuxzh",
36
- "Bf4jedk": "f10tiqix"
25
+ root: {
26
+ mc9l5x: "f22iagw",
27
+ Bh6795r: "fqerorx",
28
+ Bnnss6s: "f1neuvcm",
29
+ xawz: "fkjuxzh",
30
+ Bf4jedk: "f10tiqix"
37
31
  }
38
32
  }, {
39
- "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;}"]
33
+ 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;}"]
40
34
  });
41
35
  /**
42
36
  * Styles for the root slot
43
37
  */
44
-
45
-
46
38
  const useStyles = /*#__PURE__*/react_1.__styles({
47
- "root": {
48
- "z8tnut": "f1nbblvp",
49
- "z189sj": ["f1vdfbxk", "f1f5gg8d"],
50
- "Byoj8tv": "f1ov4xf1",
51
- "uwmqm3": ["f1f5gg8d", "f1vdfbxk"],
52
- "B3nxjsc": "fhix6mv",
53
- "Bmvh20x": "fha7anx",
54
- "robkg1": "f1fmzww4",
55
- "pehzd3": ["fs9qmxf", "f187m4uq"],
56
- "B8osjzx": ["f187m4uq", "fs9qmxf"],
57
- "u7xebq": ["f145mzao", "f1uha7eq"],
58
- "Blsv9te": ["f1uha7eq", "f145mzao"]
39
+ root: {
40
+ z8tnut: "f1nbblvp",
41
+ z189sj: ["f1vdfbxk", "f1f5gg8d"],
42
+ Byoj8tv: "f1ov4xf1",
43
+ uwmqm3: ["f1f5gg8d", "f1vdfbxk"],
44
+ B3nxjsc: "fhix6mv",
45
+ Bmvh20x: "fha7anx",
46
+ robkg1: "f1fmzww4",
47
+ pehzd3: ["fs9qmxf", "f187m4uq"],
48
+ B8osjzx: ["f187m4uq", "fs9qmxf"],
49
+ u7xebq: ["f145mzao", "f1uha7eq"],
50
+ Blsv9te: ["f1uha7eq", "f145mzao"]
59
51
  },
60
- "rootInteractive": {
61
- "Jwef8y": "f1t94bn6",
62
- "ecr2s2": "f1wfn5kd"
52
+ rootInteractive: {
53
+ Jwef8y: "f1t94bn6",
54
+ ecr2s2: "f1wfn5kd"
63
55
  },
64
- "resetButton": {
65
- "B3rzk8w": "fq6nmtn",
66
- "B7ck84d": "f1e4lqlz",
67
- "De3pzq": "f1u2r49w",
68
- "sj55zd": "f1ym3bx4",
69
- "Bahqtrf": "f1mo0ibp",
70
- "Be2twd7": "fjoy568",
71
- "Bg96gwp": "fytdu2e",
72
- "B68tc82": "f1mtd64y",
73
- "Bmxbyg5": "f1y7q3j9",
74
- "z8tnut": "f1g0x7ka",
75
- "z189sj": ["fhxju0i", "f1cnd47f"],
76
- "Byoj8tv": "f1qch9an",
77
- "uwmqm3": ["f1cnd47f", "fhxju0i"],
78
- "icvyot": "f1ern45e",
79
- "vrafjx": ["f1n71otn", "f1deefiw"],
80
- "oivjwe": "f1h8hb77",
81
- "wvpqe5": ["f1deefiw", "f1n71otn"],
82
- "Bv0vk6g": "f37px4s",
83
- "fsow6f": "fgusgyc"
56
+ resetButton: {
57
+ B3rzk8w: "fq6nmtn",
58
+ B7ck84d: "f1e4lqlz",
59
+ De3pzq: "f1u2r49w",
60
+ sj55zd: "f1ym3bx4",
61
+ Bahqtrf: "f1mo0ibp",
62
+ Be2twd7: "fjoy568",
63
+ Bg96gwp: "fytdu2e",
64
+ B68tc82: "f1mtd64y",
65
+ Bmxbyg5: "f1y7q3j9",
66
+ z8tnut: "f1g0x7ka",
67
+ z189sj: ["fhxju0i", "f1cnd47f"],
68
+ Byoj8tv: "f1qch9an",
69
+ uwmqm3: ["f1cnd47f", "fhxju0i"],
70
+ icvyot: "f1ern45e",
71
+ vrafjx: ["f1n71otn", "f1deefiw"],
72
+ oivjwe: "f1h8hb77",
73
+ wvpqe5: ["f1deefiw", "f1n71otn"],
74
+ Bv0vk6g: "f37px4s",
75
+ fsow6f: "fgusgyc"
84
76
  },
85
- "button": {
86
- "qhf8xq": "f10pi13n",
87
- "a9b677": "fly5x3f",
88
- "mc9l5x": "f22iagw",
89
- "Bh6795r": "fqerorx",
90
- "Bqenvij": "f1l02sjl",
91
- "Bt984gj": "f122n59",
92
- "i8kkvl": "f1ufnopg",
93
- "Belr9w4": "f14sijuj",
94
- "sshi5w": "f1nxs5xn",
95
- "Bnnss6s": "f1neuvcm",
96
- "xawz": "fkjuxzh",
97
- "oeaueh": "f1s6fcnf"
77
+ button: {
78
+ qhf8xq: "f10pi13n",
79
+ a9b677: "fly5x3f",
80
+ mc9l5x: "f22iagw",
81
+ Bh6795r: "fqerorx",
82
+ Bqenvij: "f1l02sjl",
83
+ Bt984gj: "f122n59",
84
+ i8kkvl: "f1ufnopg",
85
+ Belr9w4: "f14sijuj",
86
+ sshi5w: "f1nxs5xn",
87
+ Bnnss6s: "f1neuvcm",
88
+ xawz: "fkjuxzh",
89
+ oeaueh: "f1s6fcnf"
98
90
  },
99
- "sortable": {
100
- "Bceei9c": "f1k6fduh"
91
+ sortable: {
92
+ Bceei9c: "f1k6fduh"
101
93
  },
102
- "sortIcon": {
103
- "mc9l5x": "f22iagw",
104
- "Bt984gj": "f122n59",
105
- "z8tnut": "fclwglc"
94
+ sortIcon: {
95
+ mc9l5x: "f22iagw",
96
+ Bt984gj: "f122n59",
97
+ z8tnut: "fclwglc"
106
98
  }
107
99
  }, {
108
- "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);}"],
109
- "h": [".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}"],
110
- "a": [".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}"]
100
+ 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);}"],
101
+ h: [".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}"],
102
+ a: [".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}"]
111
103
  });
112
104
  /**
113
105
  * Apply styling to the TableHeaderCell slots based on the state
114
106
  */
115
-
116
-
117
107
  const useTableHeaderCellStyles_unstable = state => {
118
108
  const styles = useStyles();
119
109
  const layoutStyles = {
@@ -122,13 +112,10 @@ const useTableHeaderCellStyles_unstable = state => {
122
112
  };
123
113
  state.root.className = react_1.mergeClasses(exports.tableHeaderCellClassNames.root, styles.root, state.sortable && styles.rootInteractive, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.root.className);
124
114
  state.button.className = react_1.mergeClasses(exports.tableHeaderCellClassNames.button, styles.resetButton, styles.button, state.sortable && styles.sortable, state.button.className);
125
-
126
115
  if (state.sortIcon) {
127
116
  state.sortIcon.className = react_1.mergeClasses(exports.tableHeaderCellClassNames.sortIcon, styles.sortIcon, state.sortIcon.className);
128
117
  }
129
-
130
118
  return state;
131
119
  };
132
-
133
120
  exports.useTableHeaderCellStyles_unstable = useTableHeaderCellStyles_unstable;
134
121
  //# sourceMappingURL=useTableHeaderCellStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/TableHeaderCell/useTableHeaderCellStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAEA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AAGa,OAAA,CAAA,wBAAA,GAA2B,qBAA3B;AACA,OAAA,CAAA,yBAAA,GAAkE;EAC7E,IAAI,EAAE,qBADuE;EAE7E,MAAM,EAAE,6BAFqE;EAG7E,QAAQ,EAAE;AAHmE,CAAlE;;AAMb,MAAM,oBAAoB,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA7B;;AAOA,MAAM,mBAAmB,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA5B;AAQA;;AAEG;;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;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,EAAlB;AA0DA;;AAEG;;;AACI,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,OAAA,CAAA,YAAA,CACrB,OAAA,CAAA,yBAAA,CAA0B,IADL,EAErB,MAAM,CAAC,IAFc,EAGrB,KAAK,CAAC,QAAN,IAAkB,MAAM,CAAC,eAHJ,EAIrB,KAAK,CAAC,gBAAN,GAAyB,YAAY,CAAC,IAAb,CAAkB,IAA3C,GAAkD,YAAY,CAAC,KAAb,CAAmB,IAJhD,EAKrB,KAAK,CAAC,IAAN,CAAW,SALU,CAAvB;EAOA,KAAK,CAAC,MAAN,CAAa,SAAb,GAAyB,OAAA,CAAA,YAAA,CACvB,OAAA,CAAA,yBAAA,CAA0B,MADH,EAEvB,MAAM,CAAC,WAFgB,EAGvB,MAAM,CAAC,MAHgB,EAIvB,KAAK,CAAC,QAAN,IAAkB,MAAM,CAAC,QAJF,EAKvB,KAAK,CAAC,MAAN,CAAa,SALU,CAAzB;;EAQA,IAAI,KAAK,CAAC,QAAV,EAAoB;IAClB,KAAK,CAAC,QAAN,CAAe,SAAf,GAA2B,OAAA,CAAA,YAAA,CACzB,OAAA,CAAA,yBAAA,CAA0B,QADD,EAEzB,MAAM,CAAC,QAFkB,EAGzB,KAAK,CAAC,QAAN,CAAe,SAHU,CAA3B;EAKD;;EAED,OAAO,KAAP;AACD,CA9BM;;AAAM,OAAA,CAAA,iCAAA,GAAiC,iCAAjC","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"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAA;AACA;AAEA;AAGaA,gCAAwB,GAAG,qBAAqB;AAChDA,iCAAyB,GAAyC;EAC7EC,IAAI,EAAE,qBAAqB;EAC3BC,MAAM,EAAE,6BAA6B;EACrCC,QAAQ,EAAE;CACX;AAED,MAAMC,oBAAoB,gBAAGC,gBAAU;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAKrC;AAEF,MAAMC,mBAAmB,gBAAGD,gBAAU;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAMpC;AAEF;;;AAGA,MAAME,SAAS,gBAAGF,gBAAU;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,EAwD1B;AAEF;;;AAGO,MAAMG,iCAAiC,GAAIC,KAA2B,IAA0B;EACrG,MAAMC,MAAM,GAAGH,SAAS,EAAE;EAC1B,MAAMI,YAAY,GAAG;IACnBC,KAAK,EAAER,oBAAoB,EAAE;IAC7BS,IAAI,EAAEP,mBAAmB;GAC1B;EACDG,KAAK,CAACR,IAAI,CAACa,SAAS,GAAGT,oBAAY,CACjCL,iCAAyB,CAACC,IAAI,EAC9BS,MAAM,CAACT,IAAI,EACXQ,KAAK,CAACM,QAAQ,IAAIL,MAAM,CAACM,eAAe,EACxCP,KAAK,CAACQ,gBAAgB,GAAGN,YAAY,CAACE,IAAI,CAACZ,IAAI,GAAGU,YAAY,CAACC,KAAK,CAACX,IAAI,EACzEQ,KAAK,CAACR,IAAI,CAACa,SAAS,CACrB;EACDL,KAAK,CAACP,MAAM,CAACY,SAAS,GAAGT,oBAAY,CACnCL,iCAAyB,CAACE,MAAM,EAChCQ,MAAM,CAACQ,WAAW,EAClBR,MAAM,CAACR,MAAM,EACbO,KAAK,CAACM,QAAQ,IAAIL,MAAM,CAACK,QAAQ,EACjCN,KAAK,CAACP,MAAM,CAACY,SAAS,CACvB;EAED,IAAIL,KAAK,CAACN,QAAQ,EAAE;IAClBM,KAAK,CAACN,QAAQ,CAACW,SAAS,GAAGT,oBAAY,CACrCL,iCAAyB,CAACG,QAAQ,EAClCO,MAAM,CAACP,QAAQ,EACfM,KAAK,CAACN,QAAQ,CAACW,SAAS,CACzB;;EAGH,OAAOL,KAAK;AACd,CAAC;AA9BYT,yCAAiC","names":["exports","root","button","sortIcon","useTableLayoutStyles","react_1","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"]}
@@ -4,19 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.TableRow = void 0;
7
-
8
7
  const React = /*#__PURE__*/require("react");
9
-
10
8
  const useTableRow_1 = /*#__PURE__*/require("./useTableRow");
11
-
12
9
  const renderTableRow_1 = /*#__PURE__*/require("./renderTableRow");
13
-
14
10
  const useTableRowStyles_1 = /*#__PURE__*/require("./useTableRowStyles");
15
11
  /**
16
12
  * TableRow component - TODO: add more docs
17
13
  */
18
-
19
-
20
14
  exports.TableRow = /*#__PURE__*/React.forwardRef((props, ref) => {
21
15
  const state = useTableRow_1.useTableRow_unstable(props, ref);
22
16
  useTableRowStyles_1.useTableRowStyles_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/TableRow/TableRow.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,QAAA,gBAA+C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC1F,MAAM,KAAK,GAAG,aAAA,CAAA,oBAAA,CAAqB,KAArB,EAA4B,GAA5B,CAAd;EAEA,mBAAA,CAAA,0BAAA,CAA2B,KAA3B;EACA,OAAO,gBAAA,CAAA,uBAAA,CAAwB,KAAxB,CAAP;AACD,CAL2D,CAA/C;AAOb,OAAA,CAAA,QAAA,CAAS,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;AACA;AACA;AACA;AAIA;;;AAGaA,gBAAQ,gBAAuCC,KAAK,CAACC,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC1F,MAAMC,KAAK,GAAGC,kCAAoB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAE9CG,8CAA0B,CAACF,KAAK,CAAC;EACjC,OAAOG,wCAAuB,CAACH,KAAK,CAAC;AACvC,CAAC,CAAC;AAEFL,gBAAQ,CAACS,WAAW,GAAG,UAAU","names":["exports","React","forwardRef","props","ref","state","useTableRow_1","useTableRowStyles_1","renderTableRow_1","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 - 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"]}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"","names":[],"sourceRoot":"../src/","sources":[],"sourcesContent":[]}
@@ -3,16 +3,10 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
-
7
6
  const tslib_1 = /*#__PURE__*/require("tslib");
8
-
9
7
  tslib_1.__exportStar(require("./TableRow"), exports);
10
-
11
8
  tslib_1.__exportStar(require("./TableRow.types"), exports);
12
-
13
9
  tslib_1.__exportStar(require("./renderTableRow"), exports);
14
-
15
10
  tslib_1.__exportStar(require("./useTableRow"), exports);
16
-
17
11
  tslib_1.__exportStar(require("./useTableRowStyles"), exports);
18
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/TableRow/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './TableRow';\nexport * from './TableRow.types';\nexport * from './renderTableRow';\nexport * from './useTableRow';\nexport * from './useTableRowStyles';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AAAAA;AACAA;AACAA;AACAA;AACAA","names":["tslib_1"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableRow/index.ts"],"sourcesContent":["export * from './TableRow';\nexport * from './TableRow.types';\nexport * from './renderTableRow';\nexport * from './useTableRow';\nexport * from './useTableRowStyles';\n"]}
@@ -4,24 +4,20 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.renderTableRow_unstable = void 0;
7
-
8
7
  const React = /*#__PURE__*/require("react");
9
-
10
8
  const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
9
  /**
12
10
  * Render the final JSX of TableRow
13
11
  */
14
-
15
-
16
12
  const renderTableRow_unstable = state => {
17
13
  const {
18
14
  slots,
19
15
  slotProps
20
- } = react_utilities_1.getSlots(state); // TODO Add additional slots in the appropriate place
21
-
22
- return React.createElement(slots.root, { ...slotProps.root
16
+ } = react_utilities_1.getSlots(state);
17
+ // TODO Add additional slots in the appropriate place
18
+ return React.createElement(slots.root, {
19
+ ...slotProps.root
23
20
  });
24
21
  };
25
-
26
22
  exports.renderTableRow_unstable = renderTableRow_unstable;
27
23
  //# sourceMappingURL=renderTableRow.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/TableRow/renderTableRow.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,uBAAuB,GAAI,KAAD,IAAyB;EAC9D,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAAwB,KAAxB,CAA7B,CAD8D,CAG9D;;EACA,OAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CALM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","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;AACA;AAGA;;;AAGO,MAAMA,uBAAuB,GAAIC,KAAoB,IAAI;EAC9D,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGC,0BAAQ,CAAgBH,KAAK,CAAC;EAE3D;EACA,OAAOI,oBAACH,KAAK,CAACI,IAAI;IAAA,GAAKH,SAAS,CAACG;EAAI,EAAI;AAC3C,CAAC;AALYC,+BAAuB","names":["renderTableRow_unstable","state","slots","slotProps","react_utilities_1","React","root","exports"],"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 // TODO Add additional slots in the appropriate place\n return <slots.root {...slotProps.root} />;\n};\n"]}
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.useTableRow_unstable = void 0;
7
-
8
7
  const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
-
10
8
  const tableContext_1 = /*#__PURE__*/require("../../contexts/tableContext");
11
-
12
9
  const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
13
10
  /**
14
11
  * Create the state required to render TableRow.
@@ -19,11 +16,8 @@ const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
19
16
  * @param props - props from this instance of TableRow
20
17
  * @param ref - reference to root HTMLElement of TableRow
21
18
  */
22
-
23
-
24
19
  const useTableRow_unstable = (props, ref) => {
25
20
  var _a, _b;
26
-
27
21
  const {
28
22
  noNativeElements,
29
23
  size
@@ -45,6 +39,5 @@ const useTableRow_unstable = (props, ref) => {
45
39
  appearance: (_b = props.appearance) !== null && _b !== void 0 ? _b : 'none'
46
40
  };
47
41
  };
48
-
49
42
  exports.useTableRow_unstable = useTableRow_unstable;
50
43
  //# sourceMappingURL=useTableRow.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/TableRow/useTableRow.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEA,MAAA,cAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAEA;;;;;;;;AAQG;;;AACI,MAAM,oBAAoB,GAAG,CAAC,KAAD,EAAuB,GAAvB,KAAqE;;;EACvG,MAAM;IAAE,gBAAF;IAAoB;EAApB,IAA6B,cAAA,CAAA,eAAA,EAAnC;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,eAAA,CAAA,eAAA,EAAxB;EACA,MAAM,cAAc,GAAG,eAAA,CAAA,cAAA,EAAvB;EAEA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,aAAtB,EAAqC;MACzC,GAAG,EAAE,iBAAA,CAAA,aAAA,CAAc,GAAd,EAAmB,eAAnB,EAAoC,cAApC,CADoC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,KAA1B,GAAkC,SAFC;MAGzC,GAAG;IAHsC,CAArC,CAJD;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,CAnBM;;AAAM,OAAA,CAAA,oBAAA,GAAoB,oBAApB","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, useFocusWithin } 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 const focusWithinRef = useFocusWithin();\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 };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":";;;;;;AACA;AAEA;AACA;AAEA;;;;;;;;;AASO,MAAMA,oBAAoB,GAAG,CAACC,KAAoB,EAAEC,GAA2B,KAAmB;;EACvG,MAAM;IAAEC,gBAAgB;IAAEC;EAAI,CAAE,GAAGC,8BAAe,EAAE;EACpD,MAAMC,aAAa,GAAG,YAAK,CAACC,EAAE,mCAAIJ,gBAAgB,IAAG,KAAK,GAAG,IAAI;EACjE,MAAMK,eAAe,GAAGC,+BAAe,EAAE;EACzC,MAAMC,cAAc,GAAGD,8BAAc,EAAE;EAEvC,OAAO;IACLE,UAAU,EAAE;MACVC,IAAI,EAAEN;KACP;IACDM,IAAI,EAAEC,uCAAqB,CAACP,aAAa,EAAE;MACzCJ,GAAG,EAAEW,+BAAa,CAACX,GAAG,EAAEM,eAAe,EAAEE,cAAc,CAAC;MACxDI,IAAI,EAAER,aAAa,KAAK,KAAK,GAAG,KAAK,GAAGS,SAAS;MACjD,GAAGd;KACJ,CAAC;IACFG,IAAI;IACJD,gBAAgB;IAChBa,UAAU,EAAE,WAAK,CAACA,UAAU,mCAAI;GACjC;AACH,CAAC;AAnBYC,4BAAoB","names":["useTableRow_unstable","props","ref","noNativeElements","size","tableContext_1","rootComponent","as","focusVisibleRef","react_tabster_1","focusWithinRef","components","root","react_utilities_1","role","undefined","appearance","exports"],"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 type { TableRowProps, TableRowState } from './TableRow.types';\nimport { useTableContext } from '../../contexts/tableContext';\nimport { useFocusVisible, useFocusWithin } 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 const focusWithinRef = useFocusWithin();\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 };\n};\n"]}