@fluentui/react-table 9.0.0-alpha.1 → 9.0.0-alpha.10

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 (441) hide show
  1. package/CHANGELOG.json +501 -4
  2. package/CHANGELOG.md +139 -5
  3. package/dist/index.d.ts +653 -30
  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/Table.js.map +1 -1
  19. package/lib/TableBody.js.map +1 -1
  20. package/lib/TableCell.js.map +1 -1
  21. package/lib/TableCellActions.js +2 -0
  22. package/lib/TableCellActions.js.map +1 -0
  23. package/lib/TableCellLayout.js +2 -0
  24. package/lib/TableCellLayout.js.map +1 -0
  25. package/lib/TableCellPrimaryLayout.js +2 -0
  26. package/lib/TableCellPrimaryLayout.js.map +1 -0
  27. package/lib/TableHeader.js.map +1 -1
  28. package/lib/TableHeaderCell.js.map +1 -1
  29. package/lib/TableRow.js.map +1 -1
  30. package/lib/TableSelectionCell.js +2 -0
  31. package/lib/TableSelectionCell.js.map +1 -0
  32. package/lib/components/DataGrid/DataGrid.js +16 -0
  33. package/lib/components/DataGrid/DataGrid.js.map +1 -0
  34. package/lib/components/DataGrid/DataGrid.types.js +2 -0
  35. package/lib/components/DataGrid/DataGrid.types.js.map +1 -0
  36. package/lib/components/DataGrid/index.js +6 -0
  37. package/lib/components/DataGrid/index.js.map +1 -0
  38. package/lib/components/DataGrid/renderDataGrid.js +9 -0
  39. package/lib/components/DataGrid/renderDataGrid.js.map +1 -0
  40. package/lib/components/DataGrid/useDataGrid.js +17 -0
  41. package/lib/components/DataGrid/useDataGrid.js.map +1 -0
  42. package/lib/components/DataGrid/useDataGridContextValues.js +5 -0
  43. package/lib/components/DataGrid/useDataGridContextValues.js.map +1 -0
  44. package/lib/components/DataGrid/useDataGridStyles.js +15 -0
  45. package/lib/components/DataGrid/useDataGridStyles.js.map +1 -0
  46. package/lib/components/DataGridBody/DataGridBody.js +15 -0
  47. package/lib/components/DataGridBody/DataGridBody.js.map +1 -0
  48. package/lib/components/DataGridBody/DataGridBody.types.js +2 -0
  49. package/lib/components/DataGridBody/DataGridBody.types.js.map +1 -0
  50. package/lib/components/DataGridBody/index.js +6 -0
  51. package/lib/components/DataGridBody/index.js.map +1 -0
  52. package/lib/components/DataGridBody/renderDataGridBody.js +9 -0
  53. package/lib/components/DataGridBody/renderDataGridBody.js.map +1 -0
  54. package/lib/components/DataGridBody/useDataGridBody.js +17 -0
  55. package/lib/components/DataGridBody/useDataGridBody.js.map +1 -0
  56. package/lib/components/DataGridBody/useDataGridBodyStyles.js +15 -0
  57. package/lib/components/DataGridBody/useDataGridBodyStyles.js.map +1 -0
  58. package/lib/components/DataGridCell/DataGridCell.js +15 -0
  59. package/lib/components/DataGridCell/DataGridCell.js.map +1 -0
  60. package/lib/components/DataGridCell/DataGridCell.types.js +2 -0
  61. package/lib/components/DataGridCell/DataGridCell.types.js.map +1 -0
  62. package/lib/components/DataGridCell/index.js +6 -0
  63. package/lib/components/DataGridCell/index.js.map +1 -0
  64. package/lib/components/DataGridCell/renderDataGridCell.js +9 -0
  65. package/lib/components/DataGridCell/renderDataGridCell.js.map +1 -0
  66. package/lib/components/DataGridCell/useDataGridCell.js +17 -0
  67. package/lib/components/DataGridCell/useDataGridCell.js.map +1 -0
  68. package/lib/components/DataGridCell/useDataGridCellStyles.js +15 -0
  69. package/lib/components/DataGridCell/useDataGridCellStyles.js.map +1 -0
  70. package/lib/components/DataGridHeader/DataGridHeader.js +15 -0
  71. package/lib/components/DataGridHeader/DataGridHeader.js.map +1 -0
  72. package/lib/components/DataGridHeader/DataGridHeader.types.js +2 -0
  73. package/lib/components/DataGridHeader/DataGridHeader.types.js.map +1 -0
  74. package/lib/components/DataGridHeader/index.js +6 -0
  75. package/lib/components/DataGridHeader/index.js.map +1 -0
  76. package/lib/components/DataGridHeader/renderDataGridHeader.js +9 -0
  77. package/lib/components/DataGridHeader/renderDataGridHeader.js.map +1 -0
  78. package/lib/components/DataGridHeader/useDataGridHeader.js +17 -0
  79. package/lib/components/DataGridHeader/useDataGridHeader.js.map +1 -0
  80. package/lib/components/DataGridHeader/useDataGridHeaderStyles.js +15 -0
  81. package/lib/components/DataGridHeader/useDataGridHeaderStyles.js.map +1 -0
  82. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js +15 -0
  83. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -0
  84. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.types.js +2 -0
  85. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -0
  86. package/lib/components/DataGridHeaderCell/index.js +6 -0
  87. package/lib/components/DataGridHeaderCell/index.js.map +1 -0
  88. package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js +9 -0
  89. package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -0
  90. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js +17 -0
  91. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -0
  92. package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +26 -0
  93. package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -0
  94. package/lib/components/DataGridRow/DataGridRow.js +15 -0
  95. package/lib/components/DataGridRow/DataGridRow.js.map +1 -0
  96. package/lib/components/DataGridRow/DataGridRow.types.js +2 -0
  97. package/lib/components/DataGridRow/DataGridRow.types.js.map +1 -0
  98. package/lib/components/DataGridRow/index.js +6 -0
  99. package/lib/components/DataGridRow/index.js.map +1 -0
  100. package/lib/components/DataGridRow/renderDataGridRow.js +9 -0
  101. package/lib/components/DataGridRow/renderDataGridRow.js.map +1 -0
  102. package/lib/components/DataGridRow/useDataGridRow.js +17 -0
  103. package/lib/components/DataGridRow/useDataGridRow.js.map +1 -0
  104. package/lib/components/DataGridRow/useDataGridRowStyles.js +15 -0
  105. package/lib/components/DataGridRow/useDataGridRowStyles.js.map +1 -0
  106. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js +15 -0
  107. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -0
  108. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.types.js +2 -0
  109. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -0
  110. package/lib/components/DataGridSelectionCell/index.js +6 -0
  111. package/lib/components/DataGridSelectionCell/index.js.map +1 -0
  112. package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js +9 -0
  113. package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -0
  114. package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js +17 -0
  115. package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -0
  116. package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js +26 -0
  117. package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js.map +1 -0
  118. package/lib/components/Table/Table.js.map +1 -1
  119. package/lib/components/Table/Table.types.js.map +1 -1
  120. package/lib/components/Table/index.js.map +1 -1
  121. package/lib/components/Table/renderTable.js.map +1 -1
  122. package/lib/components/Table/useTable.js.map +1 -1
  123. package/lib/components/Table/useTableContextValues.js +7 -5
  124. package/lib/components/Table/useTableContextValues.js.map +1 -1
  125. package/lib/components/Table/useTableStyles.js +29 -3
  126. package/lib/components/Table/useTableStyles.js.map +1 -1
  127. package/lib/components/TableBody/TableBody.js.map +1 -1
  128. package/lib/components/TableBody/TableBody.types.js.map +1 -1
  129. package/lib/components/TableBody/index.js.map +1 -1
  130. package/lib/components/TableBody/renderTableBody.js.map +1 -1
  131. package/lib/components/TableBody/useTableBody.js +5 -2
  132. package/lib/components/TableBody/useTableBody.js.map +1 -1
  133. package/lib/components/TableBody/useTableBodyStyles.js +23 -2
  134. package/lib/components/TableBody/useTableBodyStyles.js.map +1 -1
  135. package/lib/components/TableCell/TableCell.js.map +1 -1
  136. package/lib/components/TableCell/TableCell.types.js.map +1 -1
  137. package/lib/components/TableCell/index.js.map +1 -1
  138. package/lib/components/TableCell/renderTableCell.js +2 -4
  139. package/lib/components/TableCell/renderTableCell.js.map +1 -1
  140. package/lib/components/TableCell/useTableCell.js +7 -6
  141. package/lib/components/TableCell/useTableCell.js.map +1 -1
  142. package/lib/components/TableCell/useTableCellStyles.js +32 -21
  143. package/lib/components/TableCell/useTableCellStyles.js.map +1 -1
  144. package/lib/components/TableCellActions/TableCellActions.js +15 -0
  145. package/lib/components/TableCellActions/TableCellActions.js.map +1 -0
  146. package/lib/components/TableCellActions/TableCellActions.types.js +2 -0
  147. package/lib/components/TableCellActions/TableCellActions.types.js.map +1 -0
  148. package/lib/components/TableCellActions/index.js +6 -0
  149. package/lib/components/TableCellActions/index.js.map +1 -0
  150. package/lib/components/TableCellActions/renderTableCellActions.js +16 -0
  151. package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -0
  152. package/lib/components/TableCellActions/useTableCellActions.js +27 -0
  153. package/lib/components/TableCellActions/useTableCellActions.js.map +1 -0
  154. package/lib/components/TableCellActions/useTableCellActionsStyles.js +40 -0
  155. package/lib/components/TableCellActions/useTableCellActionsStyles.js.map +1 -0
  156. package/lib/components/TableCellLayout/TableCellLayout.js +16 -0
  157. package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -0
  158. package/lib/components/TableCellLayout/TableCellLayout.types.js +2 -0
  159. package/lib/components/TableCellLayout/TableCellLayout.types.js.map +1 -0
  160. package/lib/components/TableCellLayout/index.js +6 -0
  161. package/lib/components/TableCellLayout/index.js.map +1 -0
  162. package/lib/components/TableCellLayout/renderTableCellLayout.js +22 -0
  163. package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -0
  164. package/lib/components/TableCellLayout/useTableCellLayout.js +46 -0
  165. package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -0
  166. package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js +13 -0
  167. package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -0
  168. package/lib/components/TableCellLayout/useTableCellLayoutStyles.js +74 -0
  169. package/lib/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -0
  170. package/lib/components/TableHeader/TableHeader.js.map +1 -1
  171. package/lib/components/TableHeader/TableHeader.types.js.map +1 -1
  172. package/lib/components/TableHeader/index.js.map +1 -1
  173. package/lib/components/TableHeader/renderTableHeader.js +5 -2
  174. package/lib/components/TableHeader/renderTableHeader.js.map +1 -1
  175. package/lib/components/TableHeader/useTableHeader.js +6 -3
  176. package/lib/components/TableHeader/useTableHeader.js.map +1 -1
  177. package/lib/components/TableHeader/useTableHeaderStyles.js +29 -2
  178. package/lib/components/TableHeader/useTableHeaderStyles.js.map +1 -1
  179. package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  180. package/lib/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
  181. package/lib/components/TableHeaderCell/index.js.map +1 -1
  182. package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  183. package/lib/components/TableHeaderCell/useTableHeaderCell.js +6 -3
  184. package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  185. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js +42 -10
  186. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
  187. package/lib/components/TableRow/TableRow.js.map +1 -1
  188. package/lib/components/TableRow/TableRow.types.js.map +1 -1
  189. package/lib/components/TableRow/index.js.map +1 -1
  190. package/lib/components/TableRow/renderTableRow.js.map +1 -1
  191. package/lib/components/TableRow/useTableRow.js +12 -6
  192. package/lib/components/TableRow/useTableRow.js.map +1 -1
  193. package/lib/components/TableRow/useTableRowStyles.js +202 -9
  194. package/lib/components/TableRow/useTableRowStyles.js.map +1 -1
  195. package/lib/components/TableSelectionCell/TableSelectionCell.js +15 -0
  196. package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -0
  197. package/lib/components/TableSelectionCell/TableSelectionCell.types.js +2 -0
  198. package/lib/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -0
  199. package/lib/components/TableSelectionCell/index.js +6 -0
  200. package/lib/components/TableSelectionCell/index.js.map +1 -0
  201. package/lib/components/TableSelectionCell/renderTableSelectionCell.js +17 -0
  202. package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -0
  203. package/lib/components/TableSelectionCell/useTableSelectionCell.js +51 -0
  204. package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -0
  205. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js +90 -0
  206. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -0
  207. package/lib/contexts/tableContext.js +7 -3
  208. package/lib/contexts/tableContext.js.map +1 -1
  209. package/lib/contexts/tableHeaderContext.js +6 -0
  210. package/lib/contexts/tableHeaderContext.js.map +1 -0
  211. package/lib/hooks/index.js +5 -0
  212. package/lib/hooks/index.js.map +1 -0
  213. package/lib/hooks/selectionManager.js +89 -0
  214. package/lib/hooks/selectionManager.js.map +1 -0
  215. package/lib/hooks/types.js +2 -0
  216. package/lib/hooks/types.js.map +1 -0
  217. package/lib/hooks/useSelection.js +74 -0
  218. package/lib/hooks/useSelection.js.map +1 -0
  219. package/lib/hooks/useSort.js +94 -0
  220. package/lib/hooks/useSort.js.map +1 -0
  221. package/lib/hooks/useTable.js +32 -0
  222. package/lib/hooks/useTable.js.map +1 -0
  223. package/lib/index.js +11 -0
  224. package/lib/index.js.map +1 -1
  225. package/lib-commonjs/DataGrid.js +10 -0
  226. package/lib-commonjs/DataGrid.js.map +1 -0
  227. package/lib-commonjs/DataGridBody.js +10 -0
  228. package/lib-commonjs/DataGridBody.js.map +1 -0
  229. package/lib-commonjs/DataGridCell.js +10 -0
  230. package/lib-commonjs/DataGridCell.js.map +1 -0
  231. package/lib-commonjs/DataGridHeader.js +10 -0
  232. package/lib-commonjs/DataGridHeader.js.map +1 -0
  233. package/lib-commonjs/DataGridHeaderCell.js +10 -0
  234. package/lib-commonjs/DataGridHeaderCell.js.map +1 -0
  235. package/lib-commonjs/DataGridRow.js +10 -0
  236. package/lib-commonjs/DataGridRow.js.map +1 -0
  237. package/lib-commonjs/DataGridSelectionCell.js +10 -0
  238. package/lib-commonjs/DataGridSelectionCell.js.map +1 -0
  239. package/lib-commonjs/Table.js.map +1 -1
  240. package/lib-commonjs/TableBody.js.map +1 -1
  241. package/lib-commonjs/TableCell.js.map +1 -1
  242. package/lib-commonjs/TableCellActions.js +10 -0
  243. package/lib-commonjs/TableCellActions.js.map +1 -0
  244. package/lib-commonjs/TableCellLayout.js +10 -0
  245. package/lib-commonjs/TableCellLayout.js.map +1 -0
  246. package/lib-commonjs/TableCellPrimaryLayout.js +10 -0
  247. package/lib-commonjs/TableCellPrimaryLayout.js.map +1 -0
  248. package/lib-commonjs/TableHeader.js.map +1 -1
  249. package/lib-commonjs/TableHeaderCell.js.map +1 -1
  250. package/lib-commonjs/TableRow.js.map +1 -1
  251. package/lib-commonjs/TableSelectionCell.js +10 -0
  252. package/lib-commonjs/TableSelectionCell.js.map +1 -0
  253. package/lib-commonjs/components/DataGrid/DataGrid.js +28 -0
  254. package/lib-commonjs/components/DataGrid/DataGrid.js.map +1 -0
  255. package/lib-commonjs/components/DataGrid/DataGrid.types.js +6 -0
  256. package/lib-commonjs/components/DataGrid/DataGrid.types.js.map +1 -0
  257. package/lib-commonjs/components/DataGrid/index.js +18 -0
  258. package/lib-commonjs/components/DataGrid/index.js.map +1 -0
  259. package/lib-commonjs/components/DataGrid/renderDataGrid.js +19 -0
  260. package/lib-commonjs/components/DataGrid/renderDataGrid.js.map +1 -0
  261. package/lib-commonjs/components/DataGrid/useDataGrid.js +27 -0
  262. package/lib-commonjs/components/DataGrid/useDataGrid.js.map +1 -0
  263. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js +15 -0
  264. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js.map +1 -0
  265. package/lib-commonjs/components/DataGrid/useDataGridStyles.js +26 -0
  266. package/lib-commonjs/components/DataGrid/useDataGridStyles.js.map +1 -0
  267. package/lib-commonjs/components/DataGridBody/DataGridBody.js +26 -0
  268. package/lib-commonjs/components/DataGridBody/DataGridBody.js.map +1 -0
  269. package/lib-commonjs/components/DataGridBody/DataGridBody.types.js +6 -0
  270. package/lib-commonjs/components/DataGridBody/DataGridBody.types.js.map +1 -0
  271. package/lib-commonjs/components/DataGridBody/index.js +18 -0
  272. package/lib-commonjs/components/DataGridBody/index.js.map +1 -0
  273. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js +19 -0
  274. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js.map +1 -0
  275. package/lib-commonjs/components/DataGridBody/useDataGridBody.js +27 -0
  276. package/lib-commonjs/components/DataGridBody/useDataGridBody.js.map +1 -0
  277. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.js +26 -0
  278. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.js.map +1 -0
  279. package/lib-commonjs/components/DataGridCell/DataGridCell.js +26 -0
  280. package/lib-commonjs/components/DataGridCell/DataGridCell.js.map +1 -0
  281. package/lib-commonjs/components/DataGridCell/DataGridCell.types.js +6 -0
  282. package/lib-commonjs/components/DataGridCell/DataGridCell.types.js.map +1 -0
  283. package/lib-commonjs/components/DataGridCell/index.js +18 -0
  284. package/lib-commonjs/components/DataGridCell/index.js.map +1 -0
  285. package/lib-commonjs/components/DataGridCell/renderDataGridCell.js +19 -0
  286. package/lib-commonjs/components/DataGridCell/renderDataGridCell.js.map +1 -0
  287. package/lib-commonjs/components/DataGridCell/useDataGridCell.js +27 -0
  288. package/lib-commonjs/components/DataGridCell/useDataGridCell.js.map +1 -0
  289. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.js +26 -0
  290. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.js.map +1 -0
  291. package/lib-commonjs/components/DataGridHeader/DataGridHeader.js +26 -0
  292. package/lib-commonjs/components/DataGridHeader/DataGridHeader.js.map +1 -0
  293. package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js +6 -0
  294. package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js.map +1 -0
  295. package/lib-commonjs/components/DataGridHeader/index.js +18 -0
  296. package/lib-commonjs/components/DataGridHeader/index.js.map +1 -0
  297. package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js +19 -0
  298. package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js.map +1 -0
  299. package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js +27 -0
  300. package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js.map +1 -0
  301. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.js +26 -0
  302. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.js.map +1 -0
  303. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js +26 -0
  304. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -0
  305. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js +6 -0
  306. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -0
  307. package/lib-commonjs/components/DataGridHeaderCell/index.js +18 -0
  308. package/lib-commonjs/components/DataGridHeaderCell/index.js.map +1 -0
  309. package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js +19 -0
  310. package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -0
  311. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js +27 -0
  312. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -0
  313. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +37 -0
  314. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -0
  315. package/lib-commonjs/components/DataGridRow/DataGridRow.js +26 -0
  316. package/lib-commonjs/components/DataGridRow/DataGridRow.js.map +1 -0
  317. package/lib-commonjs/components/DataGridRow/DataGridRow.types.js +6 -0
  318. package/lib-commonjs/components/DataGridRow/DataGridRow.types.js.map +1 -0
  319. package/lib-commonjs/components/DataGridRow/index.js +18 -0
  320. package/lib-commonjs/components/DataGridRow/index.js.map +1 -0
  321. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js +19 -0
  322. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js.map +1 -0
  323. package/lib-commonjs/components/DataGridRow/useDataGridRow.js +27 -0
  324. package/lib-commonjs/components/DataGridRow/useDataGridRow.js.map +1 -0
  325. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.js +26 -0
  326. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.js.map +1 -0
  327. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js +26 -0
  328. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -0
  329. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js +6 -0
  330. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -0
  331. package/lib-commonjs/components/DataGridSelectionCell/index.js +18 -0
  332. package/lib-commonjs/components/DataGridSelectionCell/index.js.map +1 -0
  333. package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js +19 -0
  334. package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -0
  335. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js +27 -0
  336. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -0
  337. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js +37 -0
  338. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js.map +1 -0
  339. package/lib-commonjs/components/Table/Table.js.map +1 -1
  340. package/lib-commonjs/components/Table/index.js.map +1 -1
  341. package/lib-commonjs/components/Table/renderTable.js.map +1 -1
  342. package/lib-commonjs/components/Table/useTable.js.map +1 -1
  343. package/lib-commonjs/components/Table/useTableContextValues.js +8 -5
  344. package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -1
  345. package/lib-commonjs/components/Table/useTableStyles.js +30 -3
  346. package/lib-commonjs/components/Table/useTableStyles.js.map +1 -1
  347. package/lib-commonjs/components/TableBody/TableBody.js.map +1 -1
  348. package/lib-commonjs/components/TableBody/index.js.map +1 -1
  349. package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -1
  350. package/lib-commonjs/components/TableBody/useTableBody.js +5 -2
  351. package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
  352. package/lib-commonjs/components/TableBody/useTableBodyStyles.js +21 -1
  353. package/lib-commonjs/components/TableBody/useTableBodyStyles.js.map +1 -1
  354. package/lib-commonjs/components/TableCell/TableCell.js.map +1 -1
  355. package/lib-commonjs/components/TableCell/index.js.map +1 -1
  356. package/lib-commonjs/components/TableCell/renderTableCell.js +2 -4
  357. package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -1
  358. package/lib-commonjs/components/TableCell/useTableCell.js +6 -5
  359. package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
  360. package/lib-commonjs/components/TableCell/useTableCellStyles.js +32 -21
  361. package/lib-commonjs/components/TableCell/useTableCellStyles.js.map +1 -1
  362. package/lib-commonjs/components/TableCellActions/TableCellActions.js +26 -0
  363. package/lib-commonjs/components/TableCellActions/TableCellActions.js.map +1 -0
  364. package/lib-commonjs/components/TableCellActions/TableCellActions.types.js +6 -0
  365. package/lib-commonjs/components/TableCellActions/TableCellActions.types.js.map +1 -0
  366. package/lib-commonjs/components/TableCellActions/index.js +18 -0
  367. package/lib-commonjs/components/TableCellActions/index.js.map +1 -0
  368. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js +27 -0
  369. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -0
  370. package/lib-commonjs/components/TableCellActions/useTableCellActions.js +38 -0
  371. package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -0
  372. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js +51 -0
  373. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js.map +1 -0
  374. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js +28 -0
  375. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js.map +1 -0
  376. package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js +6 -0
  377. package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js.map +1 -0
  378. package/lib-commonjs/components/TableCellLayout/index.js +18 -0
  379. package/lib-commonjs/components/TableCellLayout/index.js.map +1 -0
  380. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js +34 -0
  381. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -0
  382. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +57 -0
  383. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -0
  384. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js +23 -0
  385. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -0
  386. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js +85 -0
  387. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -0
  388. package/lib-commonjs/components/TableHeader/TableHeader.js.map +1 -1
  389. package/lib-commonjs/components/TableHeader/index.js.map +1 -1
  390. package/lib-commonjs/components/TableHeader/renderTableHeader.js +6 -2
  391. package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -1
  392. package/lib-commonjs/components/TableHeader/useTableHeader.js +6 -3
  393. package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
  394. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js +28 -1
  395. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js.map +1 -1
  396. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  397. package/lib-commonjs/components/TableHeaderCell/index.js.map +1 -1
  398. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  399. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +6 -3
  400. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  401. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js +42 -10
  402. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
  403. package/lib-commonjs/components/TableRow/TableRow.js.map +1 -1
  404. package/lib-commonjs/components/TableRow/index.js.map +1 -1
  405. package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -1
  406. package/lib-commonjs/components/TableRow/useTableRow.js +12 -5
  407. package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
  408. package/lib-commonjs/components/TableRow/useTableRowStyles.js +206 -9
  409. package/lib-commonjs/components/TableRow/useTableRowStyles.js.map +1 -1
  410. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js +26 -0
  411. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js.map +1 -0
  412. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js +6 -0
  413. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -0
  414. package/lib-commonjs/components/TableSelectionCell/index.js +18 -0
  415. package/lib-commonjs/components/TableSelectionCell/index.js.map +1 -0
  416. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js +28 -0
  417. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -0
  418. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js +65 -0
  419. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -0
  420. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js +101 -0
  421. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -0
  422. package/lib-commonjs/contexts/tableContext.js +7 -3
  423. package/lib-commonjs/contexts/tableContext.js.map +1 -1
  424. package/lib-commonjs/contexts/tableHeaderContext.js +17 -0
  425. package/lib-commonjs/contexts/tableHeaderContext.js.map +1 -0
  426. package/lib-commonjs/hooks/index.js +16 -0
  427. package/lib-commonjs/hooks/index.js.map +1 -0
  428. package/lib-commonjs/hooks/selectionManager.js +98 -0
  429. package/lib-commonjs/hooks/selectionManager.js.map +1 -0
  430. package/lib-commonjs/hooks/types.js +6 -0
  431. package/lib-commonjs/hooks/types.js.map +1 -0
  432. package/lib-commonjs/hooks/useSelection.js +89 -0
  433. package/lib-commonjs/hooks/useSelection.js.map +1 -0
  434. package/lib-commonjs/hooks/useSort.js +107 -0
  435. package/lib-commonjs/hooks/useSort.js.map +1 -0
  436. package/lib-commonjs/hooks/useTable.js +42 -0
  437. package/lib-commonjs/hooks/useTable.js.map +1 -0
  438. package/lib-commonjs/index.js +353 -1
  439. package/lib-commonjs/index.js.map +1 -1
  440. package/package.json +26 -17
  441. package/dist/tsdoc-metadata.json +0 -11
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
+
9
+ tslib_1.__exportStar(require("./TableCellLayout"), exports);
10
+
11
+ tslib_1.__exportStar(require("./TableCellLayout.types"), exports);
12
+
13
+ tslib_1.__exportStar(require("./renderTableCellLayout"), exports);
14
+
15
+ tslib_1.__exportStar(require("./useTableCellLayout"), exports);
16
+
17
+ tslib_1.__exportStar(require("./useTableCellLayoutStyles"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["packages/react-components/react-table/src/components/TableCellLayout/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,4BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './TableCellLayout';\nexport * from './TableCellLayout.types';\nexport * from './renderTableCellLayout';\nexport * from './useTableCellLayout';\nexport * from './useTableCellLayoutStyles';\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.renderTableCellLayout_unstable = void 0;
7
+
8
+ const React = /*#__PURE__*/require("react");
9
+
10
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
+
12
+ const react_avatar_1 = /*#__PURE__*/require("@fluentui/react-avatar");
13
+ /**
14
+ * Render the final JSX of TableCellLayout
15
+ */
16
+
17
+
18
+ const renderTableCellLayout_unstable = (state, contextValues) => {
19
+ const {
20
+ slots,
21
+ slotProps
22
+ } = react_utilities_1.getSlots(state);
23
+ return React.createElement(slots.root, { ...slotProps.root
24
+ }, slots.media && React.createElement(react_avatar_1.AvatarContextProvider, {
25
+ value: contextValues.avatar
26
+ }, React.createElement(slots.media, { ...slotProps.media
27
+ })), slots.wrapper && React.createElement(slots.wrapper, { ...slotProps.wrapper
28
+ }, slots.main && React.createElement(slots.main, { ...slotProps.main
29
+ }, slotProps.root.children), slots.description && React.createElement(slots.description, { ...slotProps.description
30
+ })));
31
+ };
32
+
33
+ exports.renderTableCellLayout_unstable = renderTableCellLayout_unstable;
34
+ //# sourceMappingURL=renderTableCellLayout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["packages/react-components/react-table/src/components/TableCellLayout/renderTableCellLayout.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,cAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,8BAA8B,GAAG,CAC5C,KAD4C,EAE5C,aAF4C,KAG1C;EACF,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,EACG,KAAK,CAAC,KAAN,IACC,KAAA,CAAA,aAAA,CAAC,cAAA,CAAA,qBAAD,EAAsB;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAAtB,EACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;EAAf,CAAZ,CADF,CAFJ,EAMG,KAAK,CAAC,OAAN,IACC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAK,SAAS,CAAC;EAAf,CAAd,EACG,KAAK,CAAC,IAAN,IAAc,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EAAiC,SAAS,CAAC,IAAV,CAAe,QAAhD,CADjB,EAEG,KAAK,CAAC,WAAN,IAAqB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,WAAP,EAAkB,EAAA,GAAK,SAAS,CAAC;EAAf,CAAlB,CAFxB,CAPJ,CADF;AAeD,CArBM;;AAAM,OAAA,CAAA,8BAAA,GAA8B,8BAA9B","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { AvatarContextProvider } from '@fluentui/react-avatar';\nimport type { TableCellLayoutState, TableCellLayoutSlots, TableCellLayoutContextValues } from './TableCellLayout.types';\n\n/**\n * Render the final JSX of TableCellLayout\n */\nexport const renderTableCellLayout_unstable = (\n state: TableCellLayoutState,\n contextValues: TableCellLayoutContextValues,\n) => {\n const { slots, slotProps } = getSlots<TableCellLayoutSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slots.media && (\n <AvatarContextProvider value={contextValues.avatar}>\n <slots.media {...slotProps.media} />\n </AvatarContextProvider>\n )}\n {slots.wrapper && (\n <slots.wrapper {...slotProps.wrapper}>\n {slots.main && <slots.main {...slotProps.main}>{slotProps.root.children}</slots.main>}\n {slots.description && <slots.description {...slotProps.description} />}\n </slots.wrapper>\n )}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useTableCellLayout_unstable = void 0;
7
+
8
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
+
10
+ const tableContext_1 = /*#__PURE__*/require("../../contexts/tableContext");
11
+
12
+ const tableAvatarSizeMap = {
13
+ medium: 32,
14
+ small: 24,
15
+ smaller: 20
16
+ };
17
+ /**
18
+ * Create the state required to render TableCellLayout.
19
+ *
20
+ * The returned state can be modified with hooks such as useTableCellLayoutStyles_unstable,
21
+ * before being passed to renderTableCellLayout_unstable.
22
+ *
23
+ * @param props - props from this instance of TableCellLayout
24
+ * @param ref - reference to root HTMLElement of TableCellLayout
25
+ */
26
+
27
+ const useTableCellLayout_unstable = (props, ref) => {
28
+ const {
29
+ size
30
+ } = tableContext_1.useTableContext();
31
+ return {
32
+ components: {
33
+ root: 'div',
34
+ main: 'span',
35
+ description: 'span',
36
+ wrapper: 'div',
37
+ media: 'span'
38
+ },
39
+ root: react_utilities_1.getNativeElementProps('div', {
40
+ ref,
41
+ ...props
42
+ }),
43
+ appearance: props.appearance,
44
+ main: react_utilities_1.resolveShorthand(props.main, {
45
+ required: true
46
+ }),
47
+ media: react_utilities_1.resolveShorthand(props.media),
48
+ description: react_utilities_1.resolveShorthand(props.description),
49
+ wrapper: react_utilities_1.resolveShorthand(props.wrapper, {
50
+ required: !!props.description || !!props.children
51
+ }),
52
+ avatarSize: tableAvatarSizeMap[size]
53
+ };
54
+ };
55
+
56
+ exports.useTableCellLayout_unstable = useTableCellLayout_unstable;
57
+ //# sourceMappingURL=useTableCellLayout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["packages/react-components/react-table/src/components/TableCellLayout/useTableCellLayout.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEA,MAAA,cAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AAEA,MAAM,kBAAkB,GAAG;EACzB,MAAM,EAAE,EADiB;EAEzB,KAAK,EAAE,EAFkB;EAGzB,OAAO,EAAE;AAHgB,CAA3B;AAMA;;;;;;;;AAQG;;AACI,MAAM,2BAA2B,GAAG,CACzC,KADyC,EAEzC,GAFyC,KAGjB;EACxB,MAAM;IAAE;EAAF,IAAW,cAAA,CAAA,eAAA,EAAjB;EAEA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE,KADI;MAEV,IAAI,EAAE,MAFI;MAGV,WAAW,EAAE,MAHH;MAIV,OAAO,EAAE,KAJC;MAKV,KAAK,EAAE;IALG,CADP;IAQL,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B;MAAE,GAAF;MAAO,GAAG;IAAV,CAA7B,CARD;IASL,UAAU,EAAE,KAAK,CAAC,UATb;IAUL,IAAI,EAAE,iBAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,IAAvB,EAA6B;MAAE,QAAQ,EAAE;IAAZ,CAA7B,CAVD;IAWL,KAAK,EAAE,iBAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,KAAvB,CAXF;IAYL,WAAW,EAAE,iBAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,WAAvB,CAZR;IAaL,OAAO,EAAE,iBAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,OAAvB,EAAgC;MAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,WAAR,IAAuB,CAAC,CAAC,KAAK,CAAC;IAA3C,CAAhC,CAbJ;IAcL,UAAU,EAAE,kBAAkB,CAAC,IAAD;EAdzB,CAAP;AAgBD,CAtBM;;AAAM,OAAA,CAAA,2BAAA,GAA2B,2BAA3B","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport type { TableCellLayoutProps, TableCellLayoutState } from './TableCellLayout.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\nconst tableAvatarSizeMap = {\n medium: 32,\n small: 24,\n smaller: 20,\n} as const;\n\n/**\n * Create the state required to render TableCellLayout.\n *\n * The returned state can be modified with hooks such as useTableCellLayoutStyles_unstable,\n * before being passed to renderTableCellLayout_unstable.\n *\n * @param props - props from this instance of TableCellLayout\n * @param ref - reference to root HTMLElement of TableCellLayout\n */\nexport const useTableCellLayout_unstable = (\n props: TableCellLayoutProps,\n ref: React.Ref<HTMLElement>,\n): TableCellLayoutState => {\n const { size } = useTableContext();\n\n return {\n components: {\n root: 'div',\n main: 'span',\n description: 'span',\n wrapper: 'div',\n media: 'span',\n },\n root: getNativeElementProps('div', { ref, ...props }),\n appearance: props.appearance,\n main: resolveShorthand(props.main, { required: true }),\n media: resolveShorthand(props.media),\n description: resolveShorthand(props.description),\n wrapper: resolveShorthand(props.wrapper, { required: !!props.description || !!props.children }),\n avatarSize: tableAvatarSizeMap[size],\n };\n};\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useTableCellLayoutContextValues_unstable = void 0;
7
+
8
+ const React = /*#__PURE__*/require("react");
9
+
10
+ function useTableCellLayoutContextValues_unstable(state) {
11
+ const {
12
+ avatarSize
13
+ } = state;
14
+ const avatar = React.useMemo(() => ({
15
+ size: avatarSize
16
+ }), [avatarSize]);
17
+ return {
18
+ avatar
19
+ };
20
+ }
21
+
22
+ exports.useTableCellLayoutContextValues_unstable = useTableCellLayoutContextValues_unstable;
23
+ //# sourceMappingURL=useTableCellLayoutContextValues.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["packages/react-components/react-table/src/components/TableCellLayout/useTableCellLayoutContextValues.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAGA,SAAgB,wCAAhB,CAAyD,KAAzD,EAAoF;EAClF,MAAM;IAAE;EAAF,IAAiB,KAAvB;EAEA,MAAM,MAAM,GAAG,KAAK,CAAC,OAAN,CACb,OAAO;IACL,IAAI,EAAE;EADD,CAAP,CADa,EAIb,CAAC,UAAD,CAJa,CAAf;EAOA,OAAO;IACL;EADK,CAAP;AAGD;;AAbD,OAAA,CAAA,wCAAA,GAAA,wCAAA","sourcesContent":["import * as React from 'react';\nimport type { TableCellLayoutState, TableCellLayoutContextValues } from './TableCellLayout.types';\n\nexport function useTableCellLayoutContextValues_unstable(state: TableCellLayoutState): TableCellLayoutContextValues {\n const { avatarSize } = state;\n\n const avatar = React.useMemo(\n () => ({\n size: avatarSize,\n }),\n [avatarSize],\n );\n\n return {\n avatar,\n };\n}\n"],"sourceRoot":"../src/"}
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useTableCellLayoutStyles_unstable = exports.tableCellLayoutClassNames = void 0;
7
+
8
+ const react_1 = /*#__PURE__*/require("@griffel/react");
9
+
10
+ const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
11
+
12
+ exports.tableCellLayoutClassNames = {
13
+ root: 'fui-TableCellLayout',
14
+ media: 'fui-TableCellLayout__media',
15
+ main: 'fui-TableCellLayout__main',
16
+ description: 'fui-TableCellLayout__description',
17
+ wrapper: 'fui-TableCellLayout__wrapper'
18
+ };
19
+ /**
20
+ * Styles for the root slot
21
+ */
22
+
23
+ const useStyles = /*#__PURE__*/react_1.__styles({
24
+ "root": {
25
+ "mc9l5x": "f22iagw",
26
+ "Bt984gj": "f122n59",
27
+ "i8kkvl": "fsnqrgy",
28
+ "Belr9w4": "fylz90v",
29
+ "Bh6795r": "fqerorx",
30
+ "Bnnss6s": "f1neuvcm",
31
+ "xawz": "fkjuxzh"
32
+ },
33
+ "wrapper": {
34
+ "mc9l5x": "f22iagw",
35
+ "Beiy3e4": "f1vx9l62"
36
+ },
37
+ "media": {
38
+ "mc9l5x": "f22iagw",
39
+ "Bt984gj": "f122n59"
40
+ },
41
+ "mediaPrimary": {
42
+ "B5pe6w7": "fqgjdyf",
43
+ "p4uzdd": "fppfxz8"
44
+ },
45
+ "mainPrimary": {
46
+ "Bhrd7zp": "fl43uef"
47
+ },
48
+ "description": {
49
+ "Be2twd7": "fkhj508",
50
+ "sj55zd": "fkfq4zb"
51
+ }
52
+ }, {
53
+ "d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fsnqrgy{-webkit-column-gap:var(--spacingHorizontalS);column-gap:var(--spacingHorizontalS);}", ".fylz90v{row-gap:var(--spacingHorizontalS);}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f1neuvcm{-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;}", ".fkjuxzh{-webkit-flex-basis:0px;-ms-flex-preferred-size:0px;flex-basis:0px;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".fqgjdyf svg{width:28px;}", ".fppfxz8 svg{height:28px;}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".fkfq4zb{color:var(--colorNeutralForeground2);}"]
54
+ });
55
+ /**
56
+ * Apply styling to the TableCellLayout slots based on the state
57
+ */
58
+
59
+
60
+ const useTableCellLayoutStyles_unstable = state => {
61
+ const styles = useStyles();
62
+ state.root.className = react_1.mergeClasses(exports.tableCellLayoutClassNames.root, styles.root, state.root.className);
63
+ const primary = state.appearance === 'primary';
64
+
65
+ if (state.media) {
66
+ state.media.className = react_1.mergeClasses(exports.tableCellLayoutClassNames.media, styles.media, primary && styles.mediaPrimary, state.media.className);
67
+ }
68
+
69
+ if (state.main) {
70
+ state.main.className = react_1.mergeClasses(exports.tableCellLayoutClassNames.main, primary && styles.mainPrimary, state.main.className);
71
+ }
72
+
73
+ if (state.description) {
74
+ state.description.className = react_1.mergeClasses(exports.tableCellLayoutClassNames.description, styles.description, state.description.className);
75
+ }
76
+
77
+ if (state.wrapper) {
78
+ state.wrapper.className = react_1.mergeClasses(exports.tableCellLayoutClassNames.wrapper, styles.wrapper, state.wrapper.className);
79
+ }
80
+
81
+ return state;
82
+ };
83
+
84
+ exports.useTableCellLayoutStyles_unstable = useTableCellLayoutStyles_unstable;
85
+ //# sourceMappingURL=useTableCellLayoutStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["packages/react-components/react-table/src/components/TableCellLayout/useTableCellLayoutStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAIa,OAAA,CAAA,yBAAA,GAAkE;EAC7E,IAAI,EAAE,qBADuE;EAE7E,KAAK,EAAE,4BAFsE;EAG7E,IAAI,EAAE,2BAHuE;EAI7E,WAAW,EAAE,kCAJgE;EAK7E,OAAO,EAAE;AALoE,CAAlE;AAQb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AAkCA;;AAEG;;;AACI,MAAM,iCAAiC,GAAI,KAAD,IAAsD;EACrG,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,yBAAA,CAA0B,IAAvC,EAA6C,MAAM,CAAC,IAApD,EAA0D,KAAK,CAAC,IAAN,CAAW,SAArE,CAAvB;EACA,MAAM,OAAO,GAAG,KAAK,CAAC,UAAN,KAAqB,SAArC;;EAEA,IAAI,KAAK,CAAC,KAAV,EAAiB;IACf,KAAK,CAAC,KAAN,CAAY,SAAZ,GAAwB,OAAA,CAAA,YAAA,CACtB,OAAA,CAAA,yBAAA,CAA0B,KADJ,EAEtB,MAAM,CAAC,KAFe,EAGtB,OAAO,IAAI,MAAM,CAAC,YAHI,EAItB,KAAK,CAAC,KAAN,CAAY,SAJU,CAAxB;EAMD;;EAED,IAAI,KAAK,CAAC,IAAV,EAAgB;IACd,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CACrB,OAAA,CAAA,yBAAA,CAA0B,IADL,EAErB,OAAO,IAAI,MAAM,CAAC,WAFG,EAGrB,KAAK,CAAC,IAAN,CAAW,SAHU,CAAvB;EAKD;;EAED,IAAI,KAAK,CAAC,WAAV,EAAuB;IACrB,KAAK,CAAC,WAAN,CAAkB,SAAlB,GAA8B,OAAA,CAAA,YAAA,CAC5B,OAAA,CAAA,yBAAA,CAA0B,WADE,EAE5B,MAAM,CAAC,WAFqB,EAG5B,KAAK,CAAC,WAAN,CAAkB,SAHU,CAA9B;EAKD;;EAED,IAAI,KAAK,CAAC,OAAV,EAAmB;IACjB,KAAK,CAAC,OAAN,CAAc,SAAd,GAA0B,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,yBAAA,CAA0B,OAAvC,EAAgD,MAAM,CAAC,OAAvD,EAAgE,KAAK,CAAC,OAAN,CAAc,SAA9E,CAA1B;EACD;;EAED,OAAO,KAAP;AACD,CAnCM;;AAAM,OAAA,CAAA,iCAAA,GAAiC,iCAAjC","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { TableCellLayoutSlots, TableCellLayoutState } from './TableCellLayout.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableCellLayoutClassNames: SlotClassNames<TableCellLayoutSlots> = {\n root: 'fui-TableCellLayout',\n media: 'fui-TableCellLayout__media',\n main: 'fui-TableCellLayout__main',\n description: 'fui-TableCellLayout__description',\n wrapper: 'fui-TableCellLayout__wrapper',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n ...shorthands.gap(tokens.spacingHorizontalS),\n ...shorthands.flex(1, 1, '0px'),\n },\n wrapper: {\n display: 'flex',\n flexDirection: 'column',\n },\n\n media: {\n display: 'flex',\n alignItems: 'center',\n },\n\n mediaPrimary: {\n '& svg': {\n width: '28px',\n height: '28px',\n },\n },\n\n mainPrimary: {\n fontWeight: tokens.fontWeightSemibold,\n },\n\n description: {\n fontSize: tokens.fontSizeBase300,\n color: tokens.colorNeutralForeground2,\n },\n});\n\n/**\n * Apply styling to the TableCellLayout slots based on the state\n */\nexport const useTableCellLayoutStyles_unstable = (state: TableCellLayoutState): TableCellLayoutState => {\n const styles = useStyles();\n state.root.className = mergeClasses(tableCellLayoutClassNames.root, styles.root, state.root.className);\n const primary = state.appearance === 'primary';\n\n if (state.media) {\n state.media.className = mergeClasses(\n tableCellLayoutClassNames.media,\n styles.media,\n primary && styles.mediaPrimary,\n state.media.className,\n );\n }\n\n if (state.main) {\n state.main.className = mergeClasses(\n tableCellLayoutClassNames.main,\n primary && styles.mainPrimary,\n state.main.className,\n );\n }\n\n if (state.description) {\n state.description.className = mergeClasses(\n tableCellLayoutClassNames.description,\n styles.description,\n state.description.className,\n );\n }\n\n if (state.wrapper) {\n state.wrapper.className = mergeClasses(tableCellLayoutClassNames.wrapper, styles.wrapper, state.wrapper.className);\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableHeader/TableHeader.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;;AACA,MAAA,sBAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,WAAA,gBAAqD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAChG,MAAM,KAAK,GAAG,gBAAA,CAAA,uBAAA,CAAwB,KAAxB,EAA+B,GAA/B,CAAd;EAEA,sBAAA,CAAA,6BAAA,CAA8B,KAA9B;EACA,OAAO,mBAAA,CAAA,0BAAA,CAA2B,KAA3B,CAAP;AACD,CALiE,CAArD;AAOb,OAAA,CAAA,WAAA,CAAY,WAAZ,GAA0B,aAA1B","sourcesContent":["import * as React from 'react';\nimport { useTableHeader_unstable } from './useTableHeader';\nimport { renderTableHeader_unstable } from './renderTableHeader';\nimport { useTableHeaderStyles_unstable } from './useTableHeaderStyles';\nimport type { TableHeaderProps } from './TableHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableHeader component - TODO: add more docs\n */\nexport const TableHeader: ForwardRefComponent<TableHeaderProps> = React.forwardRef((props, ref) => {\n const state = useTableHeader_unstable(props, ref);\n\n useTableHeaderStyles_unstable(state);\n return renderTableHeader_unstable(state);\n});\n\nTableHeader.displayName = 'TableHeader';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-table/src/components/TableHeader/TableHeader.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;;AACA,MAAA,sBAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,WAAA,gBAAqD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAChG,MAAM,KAAK,GAAG,gBAAA,CAAA,uBAAA,CAAwB,KAAxB,EAA+B,GAA/B,CAAd;EAEA,sBAAA,CAAA,6BAAA,CAA8B,KAA9B;EACA,OAAO,mBAAA,CAAA,0BAAA,CAA2B,KAA3B,CAAP;AACD,CALiE,CAArD;AAOb,OAAA,CAAA,WAAA,CAAY,WAAZ,GAA0B,aAA1B","sourcesContent":["import * as React from 'react';\nimport { useTableHeader_unstable } from './useTableHeader';\nimport { renderTableHeader_unstable } from './renderTableHeader';\nimport { useTableHeaderStyles_unstable } from './useTableHeaderStyles';\nimport type { TableHeaderProps } from './TableHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableHeader component - TODO: add more docs\n */\nexport const TableHeader: ForwardRefComponent<TableHeaderProps> = React.forwardRef((props, ref) => {\n const state = useTableHeader_unstable(props, ref);\n\n useTableHeaderStyles_unstable(state);\n return renderTableHeader_unstable(state);\n});\n\nTableHeader.displayName = 'TableHeader';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableHeader/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './TableHeader';\nexport * from './TableHeader.types';\nexport * from './renderTableHeader';\nexport * from './useTableHeader';\nexport * from './useTableHeaderStyles';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-table/src/components/TableHeader/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './TableHeader';\nexport * from './TableHeader.types';\nexport * from './renderTableHeader';\nexport * from './useTableHeader';\nexport * from './useTableHeaderStyles';\n"],"sourceRoot":"../src/"}
@@ -8,6 +8,8 @@ exports.renderTableHeader_unstable = void 0;
8
8
  const React = /*#__PURE__*/require("react");
9
9
 
10
10
  const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
+
12
+ const tableHeaderContext_1 = /*#__PURE__*/require("../../contexts/tableHeaderContext");
11
13
  /**
12
14
  * Render the final JSX of TableHeader
13
15
  */
@@ -18,8 +20,10 @@ const renderTableHeader_unstable = state => {
18
20
  slots,
19
21
  slotProps
20
22
  } = react_utilities_1.getSlots(state);
21
- return React.createElement(slots.root, { ...slotProps.root
22
- });
23
+ return React.createElement(tableHeaderContext_1.TableHeaderContextProvider, {
24
+ value: ""
25
+ }, React.createElement(slots.root, { ...slotProps.root
26
+ }));
23
27
  };
24
28
 
25
29
  exports.renderTableHeader_unstable = renderTableHeader_unstable;
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableHeader/renderTableHeader.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,0BAA0B,GAAI,KAAD,IAA4B;EACpE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAA2B,KAA3B,CAA7B;EAEA,OAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CAJM;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableHeaderState, TableHeaderSlots } from './TableHeader.types';\n\n/**\n * Render the final JSX of TableHeader\n */\nexport const renderTableHeader_unstable = (state: TableHeaderState) => {\n const { slots, slotProps } = getSlots<TableHeaderSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-table/src/components/TableHeader/renderTableHeader.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,oBAAA,gBAAA,OAAA,CAAA,mCAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,0BAA0B,GAAI,KAAD,IAA4B;EACpE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAA2B,KAA3B,CAA7B;EAEA,OACE,KAAA,CAAA,aAAA,CAAC,oBAAA,CAAA,0BAAD,EAA2B;IAAC,KAAK,EAAC;EAAP,CAA3B,EACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CADF,CADF;AAKD,CARM;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { TableHeaderContextProvider } from '../../contexts/tableHeaderContext';\nimport type { TableHeaderState, TableHeaderSlots } from './TableHeader.types';\n\n/**\n * Render the final JSX of TableHeader\n */\nexport const renderTableHeader_unstable = (state: TableHeaderState) => {\n const { slots, slotProps } = getSlots<TableHeaderSlots>(state);\n\n return (\n <TableHeaderContextProvider value=\"\">\n <slots.root {...slotProps.root} />\n </TableHeaderContextProvider>\n );\n};\n"],"sourceRoot":"../src/"}
@@ -24,8 +24,10 @@ const tableContext_1 = /*#__PURE__*/require("../../contexts/tableContext");
24
24
  const useTableHeader_unstable = (props, ref) => {
25
25
  var _a;
26
26
 
27
- const noNativeElements = tableContext_1.useTableContext(ctx => ctx.noNativeElements);
28
- const sortable = tableContext_1.useTableContext(ctx => ctx.sortable);
27
+ const {
28
+ noNativeElements,
29
+ sortable
30
+ } = tableContext_1.useTableContext();
29
31
  const keyboardNavAttr = react_tabster_1.useArrowNavigationGroup({
30
32
  axis: 'horizontal',
31
33
  circular: true
@@ -40,7 +42,8 @@ const useTableHeader_unstable = (props, ref) => {
40
42
  role: rootComponent === 'div' ? 'rowgroup' : undefined,
41
43
  ...(sortable && keyboardNavAttr),
42
44
  ...props
43
- })
45
+ }),
46
+ noNativeElements
44
47
  };
45
48
  };
46
49
 
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableHeader/useTableHeader.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AAEA,MAAA,cAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;AAEA;;;;;;;;AAQG;;;AACI,MAAM,uBAAuB,GAAG,CAAC,KAAD,EAA0B,GAA1B,KAA2E;;;EAChH,MAAM,gBAAgB,GAAG,cAAA,CAAA,eAAA,CAAgB,GAAG,IAAI,GAAG,CAAC,gBAA3B,CAAzB;EACA,MAAM,QAAQ,GAAG,cAAA,CAAA,eAAA,CAAgB,GAAG,IAAI,GAAG,CAAC,QAA3B,CAAjB;EACA,MAAM,eAAe,GAAG,eAAA,CAAA,uBAAA,CAAwB;IAAE,IAAI,EAAE,YAAR;IAAsB,QAAQ,EAAE;EAAhC,CAAxB,CAAxB;EAEA,MAAM,aAAa,GAAG,CAAA,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,gBAAZ,IAA+B,KAA/B,GAAuC,OAA7D;EACA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,aAAtB,EAAqC;MACzC,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,UAA1B,GAAuC,SAFJ;MAGzC,IAAI,QAAQ,IAAI,eAAhB,CAHyC;MAIzC,GAAG;IAJsC,CAArC;EAJD,CAAP;AAWD,CAjBM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport type { TableHeaderProps, TableHeaderState } from './TableHeader.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableHeader.\n *\n * The returned state can be modified with hooks such as useTableHeaderStyles_unstable,\n * before being passed to renderTableHeader_unstable.\n *\n * @param props - props from this instance of TableHeader\n * @param ref - reference to root HTMLElement of TableHeader\n */\nexport const useTableHeader_unstable = (props: TableHeaderProps, ref: React.Ref<HTMLElement>): TableHeaderState => {\n const noNativeElements = useTableContext(ctx => ctx.noNativeElements);\n const sortable = useTableContext(ctx => ctx.sortable);\n const keyboardNavAttr = useArrowNavigationGroup({ axis: 'horizontal', circular: true });\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'thead';\n return {\n components: {\n root: rootComponent,\n },\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'rowgroup' : undefined,\n ...(sortable && keyboardNavAttr),\n ...props,\n }),\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-table/src/components/TableHeader/useTableHeader.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AAEA,MAAA,cAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;AAEA;;;;;;;;AAQG;;;AACI,MAAM,uBAAuB,GAAG,CAAC,KAAD,EAA0B,GAA1B,KAA2E;;;EAChH,MAAM;IAAE,gBAAF;IAAoB;EAApB,IAAiC,cAAA,CAAA,eAAA,EAAvC;EACA,MAAM,eAAe,GAAG,eAAA,CAAA,uBAAA,CAAwB;IAAE,IAAI,EAAE,YAAR;IAAsB,QAAQ,EAAE;EAAhC,CAAxB,CAAxB;EAEA,MAAM,aAAa,GAAG,CAAA,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,gBAAZ,IAA+B,KAA/B,GAAuC,OAA7D;EACA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,aAAtB,EAAqC;MACzC,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,UAA1B,GAAuC,SAFJ;MAGzC,IAAI,QAAQ,IAAI,eAAhB,CAHyC;MAIzC,GAAG;IAJsC,CAArC,CAJD;IAUL;EAVK,CAAP;AAYD,CAjBM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport type { TableHeaderProps, TableHeaderState } from './TableHeader.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableHeader.\n *\n * The returned state can be modified with hooks such as useTableHeaderStyles_unstable,\n * before being passed to renderTableHeader_unstable.\n *\n * @param props - props from this instance of TableHeader\n * @param ref - reference to root HTMLElement of TableHeader\n */\nexport const useTableHeader_unstable = (props: TableHeaderProps, ref: React.Ref<HTMLElement>): TableHeaderState => {\n const { noNativeElements, sortable } = useTableContext();\n const keyboardNavAttr = useArrowNavigationGroup({ axis: 'horizontal', circular: true });\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'thead';\n return {\n components: {\n root: rootComponent,\n },\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'rowgroup' : undefined,\n ...(sortable && keyboardNavAttr),\n ...props,\n }),\n noNativeElements,\n };\n};\n"],"sourceRoot":"../src/"}
@@ -11,12 +11,39 @@ exports.tableHeaderClassName = 'fui-TableHeader';
11
11
  exports.tableHeaderClassNames = {
12
12
  root: 'fui-TableHeader'
13
13
  };
14
+
15
+ const useFlexLayoutStyles = /*#__PURE__*/react_1.__styles({
16
+ "root": {
17
+ "mc9l5x": "ftgm304"
18
+ },
19
+ "roottable": {
20
+ "mc9l5x": "f1tp1avn"
21
+ },
22
+ "rootFlex": {
23
+ "mc9l5x": "ftgm304"
24
+ }
25
+ }, {
26
+ "d": [".ftgm304{display:block;}", ".f1tp1avn{display:table-row-group;}"]
27
+ });
28
+
29
+ const useTableLayoutStyles = /*#__PURE__*/react_1.__styles({
30
+ "root": {
31
+ "mc9l5x": "f1tp1avn"
32
+ }
33
+ }, {
34
+ "d": [".f1tp1avn{display:table-row-group;}"]
35
+ });
14
36
  /**
15
37
  * Apply styling to the TableHeader slots based on the state
16
38
  */
17
39
 
40
+
18
41
  const useTableHeaderStyles_unstable = state => {
19
- state.root.className = react_1.mergeClasses(exports.tableHeaderClassName, state.root.className);
42
+ const layoutStyles = {
43
+ table: useTableLayoutStyles(),
44
+ flex: useFlexLayoutStyles()
45
+ };
46
+ state.root.className = react_1.mergeClasses(exports.tableHeaderClassName, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.root.className);
20
47
  return state;
21
48
  };
22
49
 
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableHeader/useTableHeaderStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAIa,OAAA,CAAA,oBAAA,GAAuB,iBAAvB;AACA,OAAA,CAAA,qBAAA,GAA0D;EACrE,IAAI,EAAE;AAD+D,CAA1D;AAIb;;AAEG;;AACI,MAAM,6BAA6B,GAAI,KAAD,IAA8C;EACzF,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,oBAAb,EAAmC,KAAK,CAAC,IAAN,CAAW,SAA9C,CAAvB;EAEA,OAAO,KAAP;AACD,CAJM;;AAAM,OAAA,CAAA,6BAAA,GAA6B,6BAA7B","sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport type { TableHeaderSlots, TableHeaderState } from './TableHeader.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableHeaderClassName = 'fui-TableHeader';\nexport const tableHeaderClassNames: SlotClassNames<TableHeaderSlots> = {\n root: 'fui-TableHeader',\n};\n\n/**\n * Apply styling to the TableHeader slots based on the state\n */\nexport const useTableHeaderStyles_unstable = (state: TableHeaderState): TableHeaderState => {\n state.root.className = mergeClasses(tableHeaderClassName, state.root.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-table/src/components/TableHeader/useTableHeaderStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAIa,OAAA,CAAA,oBAAA,GAAuB,iBAAvB;AACA,OAAA,CAAA,qBAAA,GAA0D;EACrE,IAAI,EAAE;AAD+D,CAA1D;;AAIb,MAAM,mBAAmB,gBAAG,OAAA,SAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA5B;;AAcA,MAAM,oBAAoB,gBAAG,OAAA,SAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA7B;AAMA;;AAEG;;;AACI,MAAM,6BAA6B,GAAI,KAAD,IAA8C;EACzF,MAAM,YAAY,GAAG;IACnB,KAAK,EAAE,oBAAoB,EADR;IAEnB,IAAI,EAAE,mBAAmB;EAFN,CAArB;EAIA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CACrB,OAAA,CAAA,oBADqB,EAErB,KAAK,CAAC,gBAAN,GAAyB,YAAY,CAAC,IAAb,CAAkB,IAA3C,GAAkD,YAAY,CAAC,KAAb,CAAmB,IAFhD,EAGrB,KAAK,CAAC,IAAN,CAAW,SAHU,CAAvB;EAMA,OAAO,KAAP;AACD,CAZM;;AAAM,OAAA,CAAA,6BAAA,GAA6B,6BAA7B","sourcesContent":["import { mergeClasses, makeStyles } from '@griffel/react';\nimport type { TableHeaderSlots, TableHeaderState } from './TableHeader.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableHeaderClassName = 'fui-TableHeader';\nexport const tableHeaderClassNames: SlotClassNames<TableHeaderSlots> = {\n root: 'fui-TableHeader',\n};\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'block',\n },\n\n roottable: {\n display: 'table-row-group',\n },\n\n rootFlex: {\n display: 'block',\n },\n});\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-row-group',\n },\n});\n\n/**\n * Apply styling to the TableHeader slots based on the state\n */\nexport const useTableHeaderStyles_unstable = (state: TableHeaderState): TableHeaderState => {\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableHeaderClassName,\n state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableHeaderCell/TableHeaderCell.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,oBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,0BAAA,gBAAA,OAAA,CAAA,4BAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,eAAA,gBAA6D,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACxG,MAAM,KAAK,GAAG,oBAAA,CAAA,2BAAA,CAA4B,KAA5B,EAAmC,GAAnC,CAAd;EAEA,0BAAA,CAAA,iCAAA,CAAkC,KAAlC;EACA,OAAO,uBAAA,CAAA,8BAAA,CAA+B,KAA/B,CAAP;AACD,CALyE,CAA7D;AAOb,OAAA,CAAA,eAAA,CAAgB,WAAhB,GAA8B,iBAA9B","sourcesContent":["import * as React from 'react';\nimport { useTableHeaderCell_unstable } from './useTableHeaderCell';\nimport { renderTableHeaderCell_unstable } from './renderTableHeaderCell';\nimport { useTableHeaderCellStyles_unstable } from './useTableHeaderCellStyles';\nimport type { TableHeaderCellProps } from './TableHeaderCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableHeaderCell component - TODO: add more docs\n */\nexport const TableHeaderCell: ForwardRefComponent<TableHeaderCellProps> = React.forwardRef((props, ref) => {\n const state = useTableHeaderCell_unstable(props, ref);\n\n useTableHeaderCellStyles_unstable(state);\n return renderTableHeaderCell_unstable(state);\n});\n\nTableHeaderCell.displayName = 'TableHeaderCell';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-table/src/components/TableHeaderCell/TableHeaderCell.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,oBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;;AACA,MAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,0BAAA,gBAAA,OAAA,CAAA,4BAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,eAAA,gBAA6D,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACxG,MAAM,KAAK,GAAG,oBAAA,CAAA,2BAAA,CAA4B,KAA5B,EAAmC,GAAnC,CAAd;EAEA,0BAAA,CAAA,iCAAA,CAAkC,KAAlC;EACA,OAAO,uBAAA,CAAA,8BAAA,CAA+B,KAA/B,CAAP;AACD,CALyE,CAA7D;AAOb,OAAA,CAAA,eAAA,CAAgB,WAAhB,GAA8B,iBAA9B","sourcesContent":["import * as React from 'react';\nimport { useTableHeaderCell_unstable } from './useTableHeaderCell';\nimport { renderTableHeaderCell_unstable } from './renderTableHeaderCell';\nimport { useTableHeaderCellStyles_unstable } from './useTableHeaderCellStyles';\nimport type { TableHeaderCellProps } from './TableHeaderCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableHeaderCell component - TODO: add more docs\n */\nexport const TableHeaderCell: ForwardRefComponent<TableHeaderCellProps> = React.forwardRef((props, ref) => {\n const state = useTableHeaderCell_unstable(props, ref);\n\n useTableHeaderCellStyles_unstable(state);\n return renderTableHeaderCell_unstable(state);\n});\n\nTableHeaderCell.displayName = 'TableHeaderCell';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableHeaderCell/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,4BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './TableHeaderCell';\nexport * from './TableHeaderCell.types';\nexport * from './renderTableHeaderCell';\nexport * from './useTableHeaderCell';\nexport * from './useTableHeaderCellStyles';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-table/src/components/TableHeaderCell/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,4BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './TableHeaderCell';\nexport * from './TableHeaderCell.types';\nexport * from './renderTableHeaderCell';\nexport * from './useTableHeaderCell';\nexport * from './useTableHeaderCellStyles';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["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,"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/"}
@@ -32,8 +32,10 @@ const sortIcons = {
32
32
  const useTableHeaderCell_unstable = (props, ref) => {
33
33
  var _a;
34
34
 
35
- const noNativeElements = tableContext_1.useTableContext(ctx => ctx.noNativeElements);
36
- const sortable = tableContext_1.useTableContext(ctx => ctx.sortable);
35
+ const {
36
+ noNativeElements,
37
+ sortable
38
+ } = tableContext_1.useTableContext();
37
39
  const rootComponent = ((_a = props.as) !== null && _a !== void 0 ? _a : noNativeElements) ? 'div' : 'th';
38
40
  return {
39
41
  components: {
@@ -65,7 +67,8 @@ const useTableHeaderCell_unstable = (props, ref) => {
65
67
  })
66
68
  }
67
69
  }),
68
- sortable
70
+ sortable,
71
+ noNativeElements
69
72
  };
70
73
  };
71
74
 
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableHeaderCell/useTableHeaderCell.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,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,IAAf,CADK;EAEhB,UAAU,eAAE,KAAA,CAAA,aAAA,CAAC,aAAA,CAAA,gBAAD,EAAiB,IAAjB;AAFI,CAAlB;AAKA;;;;;;;;AAQG;;AACI,MAAM,2BAA2B,GAAG,CACzC,KADyC,EAEzC,GAFyC,KAGjB;;;EACxB,MAAM,gBAAgB,GAAG,cAAA,CAAA,eAAA,CAAgB,GAAG,IAAI,GAAG,CAAC,gBAA3B,CAAzB;EACA,MAAM,QAAQ,GAAG,cAAA,CAAA,eAAA,CAAgB,GAAG,IAAI,GAAG,CAAC,QAA3B,CAAjB;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,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,cAA1B,GAA2C,SAFR;MAGzC,aAAa,KAAK,CAAC,aAHsB;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;EA5BK,CAAP;AA8BD,CAtCM;;AAAM,OAAA,CAAA,2BAAA,GAA2B,2BAA3B","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 = useTableContext(ctx => ctx.noNativeElements);\n const sortable = useTableContext(ctx => ctx.sortable);\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 };\n};\n"],"sourceRoot":"../src/"}
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,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,IAAf,CADK;EAEhB,UAAU,eAAE,KAAA,CAAA,aAAA,CAAC,aAAA,CAAA,gBAAD,EAAiB,IAAjB;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,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,cAA1B,GAA2C,SAFR;MAGzC,aAAa,KAAK,CAAC,aAHsB;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 } 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/"}
@@ -15,24 +15,45 @@ exports.tableHeaderCellClassNames = {
15
15
  button: 'fui-TableHeaderCell__button',
16
16
  sortIcon: 'fui-TableHeaderCell__sortIcon'
17
17
  };
18
+
19
+ const useTableLayoutStyles = /*#__PURE__*/react_1.__styles({
20
+ "root": {
21
+ "mc9l5x": "f15pt5es",
22
+ "ha4doy": "fmrv4ls"
23
+ }
24
+ }, {
25
+ "d": [".f15pt5es{display:table-cell;}", ".fmrv4ls{vertical-align:middle;}"]
26
+ });
27
+
28
+ const useFlexLayoutStyles = /*#__PURE__*/react_1.__styles({
29
+ "root": {
30
+ "mc9l5x": "f22iagw",
31
+ "Bh6795r": "fqerorx",
32
+ "Bnnss6s": "f1neuvcm",
33
+ "xawz": "fkjuxzh",
34
+ "Bf4jedk": "f10tiqix"
35
+ }
36
+ }, {
37
+ "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;}"]
38
+ });
18
39
  /**
19
40
  * Styles for the root slot
20
41
  */
21
42
 
43
+
22
44
  const useStyles = /*#__PURE__*/react_1.__styles({
23
45
  "root": {
24
- "sshi5w": "f5pgtk9",
25
46
  "z8tnut": "f1nbblvp",
26
47
  "z189sj": ["f1vdfbxk", "f1f5gg8d"],
27
48
  "Byoj8tv": "f1ov4xf1",
28
- "uwmqm3": ["f1f5gg8d", "f1vdfbxk"],
29
- "mc9l5x": "f22iagw",
30
- "Bt984gj": "f122n59",
31
- "Bh6795r": "fqerorx",
32
- "Bnnss6s": "f1neuvcm",
33
- "xawz": "fkjuxzh"
49
+ "uwmqm3": ["f1f5gg8d", "f1vdfbxk"]
50
+ },
51
+ "rootInteractive": {
52
+ "Jwef8y": "f1t94bn6",
53
+ "ecr2s2": "f1wfn5kd"
34
54
  },
35
55
  "resetButton": {
56
+ "B3rzk8w": "fq6nmtn",
36
57
  "B7ck84d": "f1e4lqlz",
37
58
  "De3pzq": "f1u2r49w",
38
59
  "sj55zd": "f1ym3bx4",
@@ -53,12 +74,17 @@ const useStyles = /*#__PURE__*/react_1.__styles({
53
74
  "fsow6f": "fgusgyc"
54
75
  },
55
76
  "button": {
77
+ "qhf8xq": "f10pi13n",
78
+ "a9b677": "fly5x3f",
56
79
  "mc9l5x": "f22iagw",
57
80
  "Bh6795r": "fqerorx",
58
81
  "Bqenvij": "f1l02sjl",
59
82
  "Bt984gj": "f122n59",
60
83
  "i8kkvl": "fsnqrgy",
61
- "Belr9w4": "fylz90v"
84
+ "Belr9w4": "fylz90v",
85
+ "sshi5w": "f5pgtk9",
86
+ "Bnnss6s": "f1neuvcm",
87
+ "xawz": "fkjuxzh"
62
88
  },
63
89
  "sortable": {
64
90
  "Bceei9c": "f1k6fduh"
@@ -68,7 +94,9 @@ const useStyles = /*#__PURE__*/react_1.__styles({
68
94
  "Bt984gj": "f122n59"
69
95
  }
70
96
  }, {
71
- "d": [".f5pgtk9{min-height:44px;}", ".f1nbblvp{padding-top:0px;}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".f1ov4xf1{padding-bottom:0px;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".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;}", ".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;}", ".f1l02sjl{height:100%;}", ".fsnqrgy{-webkit-column-gap:var(--spacingHorizontalS);column-gap:var(--spacingHorizontalS);}", ".fylz90v{row-gap:var(--spacingHorizontalS);}", ".f1k6fduh{cursor:pointer;}"]
97
+ "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;}"],
98
+ "h": [".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}"],
99
+ "a": [".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}"]
72
100
  });
73
101
  /**
74
102
  * Apply styling to the TableHeaderCell slots based on the state
@@ -77,7 +105,11 @@ const useStyles = /*#__PURE__*/react_1.__styles({
77
105
 
78
106
  const useTableHeaderCellStyles_unstable = state => {
79
107
  const styles = useStyles();
80
- state.root.className = react_1.mergeClasses(exports.tableHeaderCellClassNames.root, styles.root, state.root.className);
108
+ const layoutStyles = {
109
+ table: useTableLayoutStyles(),
110
+ flex: useFlexLayoutStyles()
111
+ };
112
+ 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);
81
113
  state.button.className = react_1.mergeClasses(exports.tableHeaderCellClassNames.button, styles.resetButton, styles.button, state.sortable && styles.sortable, state.button.className);
82
114
 
83
115
  if (state.sortIcon) {
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableHeaderCell/useTableHeaderCellStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAIa,OAAA,CAAA,wBAAA,GAA2B,qBAA3B;AACA,OAAA,CAAA,yBAAA,GAAkE;EAC7E,IAAI,EAAE,qBADuE;EAE7E,MAAM,EAAE,6BAFqE;EAG7E,QAAQ,EAAE;AAHmE,CAAlE;AAMb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;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;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AAuCA;;AAEG;;;AACI,MAAM,iCAAiC,GAAI,KAAD,IAAsD;EACrG,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,yBAAA,CAA0B,IAAvC,EAA6C,MAAM,CAAC,IAApD,EAA0D,KAAK,CAAC,IAAN,CAAW,SAArE,CAAvB;EACA,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,CApBM;;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 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\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n minHeight: '44px',\n ...shorthands.padding('0px', tokens.spacingHorizontalS),\n display: 'flex',\n alignItems: 'center',\n ...shorthands.flex(1, 1, '0px'),\n },\n\n resetButton: {\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 display: 'flex',\n flexGrow: 1,\n height: '100%',\n alignItems: 'center',\n ...shorthands.gap(tokens.spacingHorizontalS),\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 state.root.className = mergeClasses(tableHeaderCellClassNames.root, styles.root, state.root.className);\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,"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;;AAIa,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;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;;;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 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 +1 @@
1
- {"version":3,"sources":["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,"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 +1 @@
1
- {"version":3,"sources":["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,"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/"}