@fluentui/react-table 9.0.0-alpha.2 → 9.0.0-alpha.20

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 (508) hide show
  1. package/CHANGELOG.json +1071 -1
  2. package/CHANGELOG.md +280 -2
  3. package/dist/index.d.ts +551 -113
  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.map +1 -1
  22. package/lib/TableCellLayout.js.map +1 -1
  23. package/lib/TableCellPrimaryLayout.js.map +1 -1
  24. package/lib/TableHeader.js.map +1 -1
  25. package/lib/TableHeaderCell.js.map +1 -1
  26. package/lib/TableRow.js.map +1 -1
  27. package/lib/TableSelectionCell.js.map +1 -1
  28. package/lib/components/DataGrid/DataGrid.js +15 -0
  29. package/lib/components/DataGrid/DataGrid.js.map +1 -0
  30. package/lib/components/DataGrid/DataGrid.types.js +2 -0
  31. package/lib/components/DataGrid/DataGrid.types.js.map +1 -0
  32. package/lib/components/DataGrid/index.js +6 -0
  33. package/lib/components/DataGrid/index.js.map +1 -0
  34. package/lib/components/DataGrid/renderDataGrid.js +12 -0
  35. package/lib/components/DataGrid/renderDataGrid.js.map +1 -0
  36. package/lib/components/DataGrid/useDataGrid.js +63 -0
  37. package/lib/components/DataGrid/useDataGrid.js.map +1 -0
  38. package/lib/components/DataGrid/useDataGridContextValues.js +15 -0
  39. package/lib/components/DataGrid/useDataGridContextValues.js.map +1 -0
  40. package/lib/components/DataGrid/useDataGridStyles.js +14 -0
  41. package/lib/components/DataGrid/useDataGridStyles.js.map +1 -0
  42. package/lib/components/DataGridBody/DataGridBody.js +14 -0
  43. package/lib/components/DataGridBody/DataGridBody.js.map +1 -0
  44. package/lib/components/DataGridBody/DataGridBody.types.js +2 -0
  45. package/lib/components/DataGridBody/DataGridBody.types.js.map +1 -0
  46. package/lib/components/DataGridBody/index.js +6 -0
  47. package/lib/components/DataGridBody/index.js.map +1 -0
  48. package/lib/components/DataGridBody/renderDataGridBody.js +19 -0
  49. package/lib/components/DataGridBody/renderDataGridBody.js.map +1 -0
  50. package/lib/components/DataGridBody/useDataGridBody.js +31 -0
  51. package/lib/components/DataGridBody/useDataGridBody.js.map +1 -0
  52. package/lib/components/DataGridBody/useDataGridBodyStyles.js +14 -0
  53. package/lib/components/DataGridBody/useDataGridBodyStyles.js.map +1 -0
  54. package/lib/components/DataGridCell/DataGridCell.js +14 -0
  55. package/lib/components/DataGridCell/DataGridCell.js.map +1 -0
  56. package/lib/components/DataGridCell/DataGridCell.types.js +2 -0
  57. package/lib/components/DataGridCell/DataGridCell.types.js.map +1 -0
  58. package/lib/components/DataGridCell/index.js +6 -0
  59. package/lib/components/DataGridCell/index.js.map +1 -0
  60. package/lib/components/DataGridCell/renderDataGridCell.js +8 -0
  61. package/lib/components/DataGridCell/renderDataGridCell.js.map +1 -0
  62. package/lib/components/DataGridCell/useDataGridCell.js +21 -0
  63. package/lib/components/DataGridCell/useDataGridCell.js.map +1 -0
  64. package/lib/components/DataGridCell/useDataGridCellStyles.js +14 -0
  65. package/lib/components/DataGridCell/useDataGridCellStyles.js.map +1 -0
  66. package/lib/components/DataGridHeader/DataGridHeader.js +14 -0
  67. package/lib/components/DataGridHeader/DataGridHeader.js.map +1 -0
  68. package/lib/components/DataGridHeader/DataGridHeader.types.js +2 -0
  69. package/lib/components/DataGridHeader/DataGridHeader.types.js.map +1 -0
  70. package/lib/components/DataGridHeader/index.js +6 -0
  71. package/lib/components/DataGridHeader/index.js.map +1 -0
  72. package/lib/components/DataGridHeader/renderDataGridHeader.js +8 -0
  73. package/lib/components/DataGridHeader/renderDataGridHeader.js.map +1 -0
  74. package/lib/components/DataGridHeader/useDataGridHeader.js +17 -0
  75. package/lib/components/DataGridHeader/useDataGridHeader.js.map +1 -0
  76. package/lib/components/DataGridHeader/useDataGridHeaderStyles.js +14 -0
  77. package/lib/components/DataGridHeader/useDataGridHeaderStyles.js.map +1 -0
  78. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js +14 -0
  79. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -0
  80. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.types.js +2 -0
  81. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -0
  82. package/lib/components/DataGridHeaderCell/index.js +6 -0
  83. package/lib/components/DataGridHeaderCell/index.js.map +1 -0
  84. package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js +8 -0
  85. package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -0
  86. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js +37 -0
  87. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -0
  88. package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +22 -0
  89. package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -0
  90. package/lib/components/DataGridRow/DataGridRow.js +14 -0
  91. package/lib/components/DataGridRow/DataGridRow.js.map +1 -0
  92. package/lib/components/DataGridRow/DataGridRow.types.js +2 -0
  93. package/lib/components/DataGridRow/DataGridRow.types.js.map +1 -0
  94. package/lib/components/DataGridRow/index.js +6 -0
  95. package/lib/components/DataGridRow/index.js.map +1 -0
  96. package/lib/components/DataGridRow/renderDataGridRow.js +21 -0
  97. package/lib/components/DataGridRow/renderDataGridRow.js.map +1 -0
  98. package/lib/components/DataGridRow/useDataGridRow.js +70 -0
  99. package/lib/components/DataGridRow/useDataGridRow.js.map +1 -0
  100. package/lib/components/DataGridRow/useDataGridRowStyles.js +18 -0
  101. package/lib/components/DataGridRow/useDataGridRowStyles.js.map +1 -0
  102. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js +14 -0
  103. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -0
  104. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.types.js +2 -0
  105. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -0
  106. package/lib/components/DataGridSelectionCell/index.js +6 -0
  107. package/lib/components/DataGridSelectionCell/index.js.map +1 -0
  108. package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js +8 -0
  109. package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -0
  110. package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js +47 -0
  111. package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -0
  112. package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js +22 -0
  113. package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js.map +1 -0
  114. package/lib/components/Table/Table.js +1 -2
  115. package/lib/components/Table/Table.js.map +1 -1
  116. package/lib/components/Table/Table.types.js.map +1 -1
  117. package/lib/components/Table/index.js.map +1 -1
  118. package/lib/components/Table/renderTable.js +2 -2
  119. package/lib/components/Table/renderTable.js.map +1 -1
  120. package/lib/components/Table/useTable.js +0 -2
  121. package/lib/components/Table/useTable.js.map +1 -1
  122. package/lib/components/Table/useTableContextValues.js.map +1 -1
  123. package/lib/components/Table/useTableStyles.js +26 -11
  124. package/lib/components/Table/useTableStyles.js.map +1 -1
  125. package/lib/components/TableBody/TableBody.js +1 -2
  126. package/lib/components/TableBody/TableBody.js.map +1 -1
  127. package/lib/components/TableBody/TableBody.types.js.map +1 -1
  128. package/lib/components/TableBody/index.js.map +1 -1
  129. package/lib/components/TableBody/renderTableBody.js +3 -4
  130. package/lib/components/TableBody/renderTableBody.js.map +1 -1
  131. package/lib/components/TableBody/useTableBody.js +2 -3
  132. package/lib/components/TableBody/useTableBody.js.map +1 -1
  133. package/lib/components/TableBody/useTableBodyStyles.js +16 -9
  134. package/lib/components/TableBody/useTableBodyStyles.js.map +1 -1
  135. package/lib/components/TableCell/TableCell.js +1 -2
  136. package/lib/components/TableCell/TableCell.js.map +1 -1
  137. package/lib/components/TableCell/TableCell.types.js.map +1 -1
  138. package/lib/components/TableCell/index.js.map +1 -1
  139. package/lib/components/TableCell/renderTableCell.js +2 -2
  140. package/lib/components/TableCell/renderTableCell.js.map +1 -1
  141. package/lib/components/TableCell/useTableCell.js +5 -4
  142. package/lib/components/TableCell/useTableCell.js.map +1 -1
  143. package/lib/components/TableCell/useTableCellStyles.js +58 -13
  144. package/lib/components/TableCell/useTableCellStyles.js.map +1 -1
  145. package/lib/components/TableCellActions/TableCellActions.js +1 -2
  146. package/lib/components/TableCellActions/TableCellActions.js.map +1 -1
  147. package/lib/components/TableCellActions/TableCellActions.types.js.map +1 -1
  148. package/lib/components/TableCellActions/index.js.map +1 -1
  149. package/lib/components/TableCellActions/renderTableCellActions.js +3 -4
  150. package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -1
  151. package/lib/components/TableCellActions/useTableCellActions.js +5 -5
  152. package/lib/components/TableCellActions/useTableCellActions.js.map +1 -1
  153. package/lib/components/TableCellActions/useTableCellActionsStyles.js +12 -20
  154. package/lib/components/TableCellActions/useTableCellActionsStyles.js.map +1 -1
  155. package/lib/components/TableCellLayout/TableCellLayout.js +3 -3
  156. package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -1
  157. package/lib/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
  158. package/lib/components/TableCellLayout/index.js.map +1 -1
  159. package/lib/components/TableCellLayout/renderTableCellLayout.js +14 -7
  160. package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  161. package/lib/components/TableCellLayout/useTableCellLayout.js +14 -4
  162. package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  163. package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js +13 -0
  164. package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -0
  165. package/lib/components/TableCellLayout/useTableCellLayoutStyles.js +41 -35
  166. package/lib/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
  167. package/lib/components/TableHeader/TableHeader.js +1 -2
  168. package/lib/components/TableHeader/TableHeader.js.map +1 -1
  169. package/lib/components/TableHeader/TableHeader.types.js.map +1 -1
  170. package/lib/components/TableHeader/index.js.map +1 -1
  171. package/lib/components/TableHeader/renderTableHeader.js +6 -3
  172. package/lib/components/TableHeader/renderTableHeader.js.map +1 -1
  173. package/lib/components/TableHeader/useTableHeader.js +3 -11
  174. package/lib/components/TableHeader/useTableHeader.js.map +1 -1
  175. package/lib/components/TableHeader/useTableHeaderStyles.js +16 -9
  176. package/lib/components/TableHeader/useTableHeaderStyles.js.map +1 -1
  177. package/lib/components/TableHeaderCell/TableHeaderCell.js +1 -2
  178. package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  179. package/lib/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
  180. package/lib/components/TableHeaderCell/index.js.map +1 -1
  181. package/lib/components/TableHeaderCell/renderTableHeaderCell.js +6 -4
  182. package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  183. package/lib/components/TableHeaderCell/useTableHeaderCell.js +13 -9
  184. package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  185. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js +83 -50
  186. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
  187. package/lib/components/TableRow/TableRow.js +1 -2
  188. package/lib/components/TableRow/TableRow.js.map +1 -1
  189. package/lib/components/TableRow/TableRow.types.js.map +1 -1
  190. package/lib/components/TableRow/index.js.map +1 -1
  191. package/lib/components/TableRow/renderTableRow.js +3 -4
  192. package/lib/components/TableRow/renderTableRow.js.map +1 -1
  193. package/lib/components/TableRow/useTableRow.js +12 -6
  194. package/lib/components/TableRow/useTableRow.js.map +1 -1
  195. package/lib/components/TableRow/useTableRowStyles.js +196 -28
  196. package/lib/components/TableRow/useTableRowStyles.js.map +1 -1
  197. package/lib/components/TableSelectionCell/TableSelectionCell.js +1 -2
  198. package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  199. package/lib/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
  200. package/lib/components/TableSelectionCell/index.js.map +1 -1
  201. package/lib/components/TableSelectionCell/renderTableSelectionCell.js +6 -4
  202. package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  203. package/lib/components/TableSelectionCell/useTableSelectionCell.js +25 -12
  204. package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  205. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js +59 -27
  206. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
  207. package/lib/contexts/columnIdContext.js +9 -0
  208. package/lib/contexts/columnIdContext.js.map +1 -0
  209. package/lib/contexts/dataGridContext.js +13 -0
  210. package/lib/contexts/dataGridContext.js.map +1 -0
  211. package/lib/contexts/rowIdContext.js +9 -0
  212. package/lib/contexts/rowIdContext.js.map +1 -0
  213. package/lib/contexts/tableContext.js +0 -1
  214. package/lib/contexts/tableContext.js.map +1 -1
  215. package/lib/contexts/tableHeaderContext.js +6 -0
  216. package/lib/contexts/tableHeaderContext.js.map +1 -0
  217. package/lib/hooks/createColumn.js +35 -0
  218. package/lib/hooks/createColumn.js.map +1 -0
  219. package/lib/hooks/index.js +4 -1
  220. package/lib/hooks/index.js.map +1 -1
  221. package/lib/hooks/selectionManager.js +16 -32
  222. package/lib/hooks/selectionManager.js.map +1 -1
  223. package/lib/hooks/types.js.map +1 -1
  224. package/lib/hooks/useTableFeatures.js +35 -0
  225. package/lib/hooks/useTableFeatures.js.map +1 -0
  226. package/lib/hooks/useTableSelection.js +74 -0
  227. package/lib/hooks/useTableSelection.js.map +1 -0
  228. package/lib/hooks/useTableSort.js +85 -0
  229. package/lib/hooks/useTableSort.js.map +1 -0
  230. package/lib/index.js +9 -1
  231. package/lib/index.js.map +1 -1
  232. package/lib-commonjs/DataGrid.js +8 -0
  233. package/lib-commonjs/DataGrid.js.map +1 -0
  234. package/lib-commonjs/DataGridBody.js +8 -0
  235. package/lib-commonjs/DataGridBody.js.map +1 -0
  236. package/lib-commonjs/DataGridCell.js +8 -0
  237. package/lib-commonjs/DataGridCell.js.map +1 -0
  238. package/lib-commonjs/DataGridHeader.js +8 -0
  239. package/lib-commonjs/DataGridHeader.js.map +1 -0
  240. package/lib-commonjs/DataGridHeaderCell.js +8 -0
  241. package/lib-commonjs/DataGridHeaderCell.js.map +1 -0
  242. package/lib-commonjs/DataGridRow.js +8 -0
  243. package/lib-commonjs/DataGridRow.js.map +1 -0
  244. package/lib-commonjs/DataGridSelectionCell.js +8 -0
  245. package/lib-commonjs/DataGridSelectionCell.js.map +1 -0
  246. package/lib-commonjs/Table.js +0 -2
  247. package/lib-commonjs/Table.js.map +1 -1
  248. package/lib-commonjs/TableBody.js +0 -2
  249. package/lib-commonjs/TableBody.js.map +1 -1
  250. package/lib-commonjs/TableCell.js +0 -2
  251. package/lib-commonjs/TableCell.js.map +1 -1
  252. package/lib-commonjs/TableCellActions.js +0 -2
  253. package/lib-commonjs/TableCellActions.js.map +1 -1
  254. package/lib-commonjs/TableCellLayout.js +0 -2
  255. package/lib-commonjs/TableCellLayout.js.map +1 -1
  256. package/lib-commonjs/TableCellPrimaryLayout.js +0 -2
  257. package/lib-commonjs/TableCellPrimaryLayout.js.map +1 -1
  258. package/lib-commonjs/TableHeader.js +0 -2
  259. package/lib-commonjs/TableHeader.js.map +1 -1
  260. package/lib-commonjs/TableHeaderCell.js +0 -2
  261. package/lib-commonjs/TableHeaderCell.js.map +1 -1
  262. package/lib-commonjs/TableRow.js +0 -2
  263. package/lib-commonjs/TableRow.js.map +1 -1
  264. package/lib-commonjs/TableSelectionCell.js +0 -2
  265. package/lib-commonjs/TableSelectionCell.js.map +1 -1
  266. package/lib-commonjs/components/DataGrid/DataGrid.js +21 -0
  267. package/lib-commonjs/components/DataGrid/DataGrid.js.map +1 -0
  268. package/lib-commonjs/components/DataGrid/DataGrid.types.js +6 -0
  269. package/lib-commonjs/components/DataGrid/DataGrid.types.js.map +1 -0
  270. package/lib-commonjs/components/DataGrid/index.js +12 -0
  271. package/lib-commonjs/components/DataGrid/index.js.map +1 -0
  272. package/lib-commonjs/components/DataGrid/renderDataGrid.js +19 -0
  273. package/lib-commonjs/components/DataGrid/renderDataGrid.js.map +1 -0
  274. package/lib-commonjs/components/DataGrid/useDataGrid.js +70 -0
  275. package/lib-commonjs/components/DataGrid/useDataGrid.js.map +1 -0
  276. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js +22 -0
  277. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js.map +1 -0
  278. package/lib-commonjs/components/DataGrid/useDataGridStyles.js +21 -0
  279. package/lib-commonjs/components/DataGrid/useDataGridStyles.js.map +1 -0
  280. package/lib-commonjs/components/DataGridBody/DataGridBody.js +20 -0
  281. package/lib-commonjs/components/DataGridBody/DataGridBody.js.map +1 -0
  282. package/lib-commonjs/components/DataGridBody/DataGridBody.types.js +6 -0
  283. package/lib-commonjs/components/DataGridBody/DataGridBody.types.js.map +1 -0
  284. package/lib-commonjs/components/DataGridBody/index.js +12 -0
  285. package/lib-commonjs/components/DataGridBody/index.js.map +1 -0
  286. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js +26 -0
  287. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js.map +1 -0
  288. package/lib-commonjs/components/DataGridBody/useDataGridBody.js +38 -0
  289. package/lib-commonjs/components/DataGridBody/useDataGridBody.js.map +1 -0
  290. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.js +21 -0
  291. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.js.map +1 -0
  292. package/lib-commonjs/components/DataGridCell/DataGridCell.js +20 -0
  293. package/lib-commonjs/components/DataGridCell/DataGridCell.js.map +1 -0
  294. package/lib-commonjs/components/DataGridCell/DataGridCell.types.js +6 -0
  295. package/lib-commonjs/components/DataGridCell/DataGridCell.types.js.map +1 -0
  296. package/lib-commonjs/components/DataGridCell/index.js +12 -0
  297. package/lib-commonjs/components/DataGridCell/index.js.map +1 -0
  298. package/lib-commonjs/components/DataGridCell/renderDataGridCell.js +15 -0
  299. package/lib-commonjs/components/DataGridCell/renderDataGridCell.js.map +1 -0
  300. package/lib-commonjs/components/DataGridCell/useDataGridCell.js +28 -0
  301. package/lib-commonjs/components/DataGridCell/useDataGridCell.js.map +1 -0
  302. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.js +21 -0
  303. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.js.map +1 -0
  304. package/lib-commonjs/components/DataGridHeader/DataGridHeader.js +20 -0
  305. package/lib-commonjs/components/DataGridHeader/DataGridHeader.js.map +1 -0
  306. package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js +6 -0
  307. package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js.map +1 -0
  308. package/lib-commonjs/components/DataGridHeader/index.js +12 -0
  309. package/lib-commonjs/components/DataGridHeader/index.js.map +1 -0
  310. package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js +15 -0
  311. package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js.map +1 -0
  312. package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js +24 -0
  313. package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js.map +1 -0
  314. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.js +21 -0
  315. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.js.map +1 -0
  316. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js +20 -0
  317. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -0
  318. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js +6 -0
  319. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -0
  320. package/lib-commonjs/components/DataGridHeaderCell/index.js +12 -0
  321. package/lib-commonjs/components/DataGridHeaderCell/index.js.map +1 -0
  322. package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js +15 -0
  323. package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -0
  324. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js +44 -0
  325. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -0
  326. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +29 -0
  327. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -0
  328. package/lib-commonjs/components/DataGridRow/DataGridRow.js +20 -0
  329. package/lib-commonjs/components/DataGridRow/DataGridRow.js.map +1 -0
  330. package/lib-commonjs/components/DataGridRow/DataGridRow.types.js +6 -0
  331. package/lib-commonjs/components/DataGridRow/DataGridRow.types.js.map +1 -0
  332. package/lib-commonjs/components/DataGridRow/index.js +12 -0
  333. package/lib-commonjs/components/DataGridRow/index.js.map +1 -0
  334. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js +28 -0
  335. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js.map +1 -0
  336. package/lib-commonjs/components/DataGridRow/useDataGridRow.js +77 -0
  337. package/lib-commonjs/components/DataGridRow/useDataGridRow.js.map +1 -0
  338. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.js +25 -0
  339. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.js.map +1 -0
  340. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js +20 -0
  341. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -0
  342. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js +6 -0
  343. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -0
  344. package/lib-commonjs/components/DataGridSelectionCell/index.js +12 -0
  345. package/lib-commonjs/components/DataGridSelectionCell/index.js.map +1 -0
  346. package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js +15 -0
  347. package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -0
  348. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js +54 -0
  349. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -0
  350. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js +29 -0
  351. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js.map +1 -0
  352. package/lib-commonjs/components/Table/Table.js +1 -8
  353. package/lib-commonjs/components/Table/Table.js.map +1 -1
  354. package/lib-commonjs/components/Table/Table.types.js.map +1 -1
  355. package/lib-commonjs/components/Table/index.js +0 -6
  356. package/lib-commonjs/components/Table/index.js.map +1 -1
  357. package/lib-commonjs/components/Table/renderTable.js +2 -7
  358. package/lib-commonjs/components/Table/renderTable.js.map +1 -1
  359. package/lib-commonjs/components/Table/useTable.js +0 -5
  360. package/lib-commonjs/components/Table/useTable.js.map +1 -1
  361. package/lib-commonjs/components/Table/useTableContextValues.js +0 -3
  362. package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -1
  363. package/lib-commonjs/components/Table/useTableStyles.js +26 -15
  364. package/lib-commonjs/components/Table/useTableStyles.js.map +1 -1
  365. package/lib-commonjs/components/TableBody/TableBody.js +1 -7
  366. package/lib-commonjs/components/TableBody/TableBody.js.map +1 -1
  367. package/lib-commonjs/components/TableBody/TableBody.types.js.map +1 -1
  368. package/lib-commonjs/components/TableBody/index.js +0 -6
  369. package/lib-commonjs/components/TableBody/index.js.map +1 -1
  370. package/lib-commonjs/components/TableBody/renderTableBody.js +3 -8
  371. package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -1
  372. package/lib-commonjs/components/TableBody/useTableBody.js +2 -7
  373. package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
  374. package/lib-commonjs/components/TableBody/useTableBodyStyles.js +16 -11
  375. package/lib-commonjs/components/TableBody/useTableBodyStyles.js.map +1 -1
  376. package/lib-commonjs/components/TableCell/TableCell.js +1 -7
  377. package/lib-commonjs/components/TableCell/TableCell.js.map +1 -1
  378. package/lib-commonjs/components/TableCell/TableCell.types.js.map +1 -1
  379. package/lib-commonjs/components/TableCell/index.js +0 -6
  380. package/lib-commonjs/components/TableCell/index.js.map +1 -1
  381. package/lib-commonjs/components/TableCell/renderTableCell.js +2 -6
  382. package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -1
  383. package/lib-commonjs/components/TableCell/useTableCell.js +5 -8
  384. package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
  385. package/lib-commonjs/components/TableCell/useTableCellStyles.js +58 -17
  386. package/lib-commonjs/components/TableCell/useTableCellStyles.js.map +1 -1
  387. package/lib-commonjs/components/TableCellActions/TableCellActions.js +1 -7
  388. package/lib-commonjs/components/TableCellActions/TableCellActions.js.map +1 -1
  389. package/lib-commonjs/components/TableCellActions/TableCellActions.types.js.map +1 -1
  390. package/lib-commonjs/components/TableCellActions/index.js +0 -6
  391. package/lib-commonjs/components/TableCellActions/index.js.map +1 -1
  392. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js +3 -8
  393. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -1
  394. package/lib-commonjs/components/TableCellActions/useTableCellActions.js +4 -8
  395. package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -1
  396. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js +12 -25
  397. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js.map +1 -1
  398. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js +3 -8
  399. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js.map +1 -1
  400. package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
  401. package/lib-commonjs/components/TableCellLayout/index.js +0 -6
  402. package/lib-commonjs/components/TableCellLayout/index.js.map +1 -1
  403. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js +14 -11
  404. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  405. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +14 -7
  406. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  407. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js +20 -0
  408. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -0
  409. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js +41 -39
  410. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
  411. package/lib-commonjs/components/TableHeader/TableHeader.js +1 -7
  412. package/lib-commonjs/components/TableHeader/TableHeader.js.map +1 -1
  413. package/lib-commonjs/components/TableHeader/TableHeader.types.js.map +1 -1
  414. package/lib-commonjs/components/TableHeader/index.js +0 -6
  415. package/lib-commonjs/components/TableHeader/index.js.map +1 -1
  416. package/lib-commonjs/components/TableHeader/renderTableHeader.js +6 -7
  417. package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -1
  418. package/lib-commonjs/components/TableHeader/useTableHeader.js +3 -16
  419. package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
  420. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js +16 -12
  421. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js.map +1 -1
  422. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js +1 -7
  423. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  424. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
  425. package/lib-commonjs/components/TableHeaderCell/index.js +0 -6
  426. package/lib-commonjs/components/TableHeaderCell/index.js.map +1 -1
  427. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js +6 -8
  428. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  429. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +12 -15
  430. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  431. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js +83 -54
  432. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
  433. package/lib-commonjs/components/TableRow/TableRow.js +1 -7
  434. package/lib-commonjs/components/TableRow/TableRow.js.map +1 -1
  435. package/lib-commonjs/components/TableRow/TableRow.types.js.map +1 -1
  436. package/lib-commonjs/components/TableRow/index.js +0 -6
  437. package/lib-commonjs/components/TableRow/index.js.map +1 -1
  438. package/lib-commonjs/components/TableRow/renderTableRow.js +3 -8
  439. package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -1
  440. package/lib-commonjs/components/TableRow/useTableRow.js +11 -9
  441. package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
  442. package/lib-commonjs/components/TableRow/useTableRowStyles.js +196 -33
  443. package/lib-commonjs/components/TableRow/useTableRowStyles.js.map +1 -1
  444. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js +1 -7
  445. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  446. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
  447. package/lib-commonjs/components/TableSelectionCell/index.js +0 -6
  448. package/lib-commonjs/components/TableSelectionCell/index.js.map +1 -1
  449. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js +6 -8
  450. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  451. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js +24 -18
  452. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  453. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js +59 -30
  454. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
  455. package/lib-commonjs/contexts/columnIdContext.js +16 -0
  456. package/lib-commonjs/contexts/columnIdContext.js.map +1 -0
  457. package/lib-commonjs/contexts/dataGridContext.js +20 -0
  458. package/lib-commonjs/contexts/dataGridContext.js.map +1 -0
  459. package/lib-commonjs/contexts/rowIdContext.js +16 -0
  460. package/lib-commonjs/contexts/rowIdContext.js.map +1 -0
  461. package/lib-commonjs/contexts/tableContext.js +0 -5
  462. package/lib-commonjs/contexts/tableContext.js.map +1 -1
  463. package/lib-commonjs/contexts/tableHeaderContext.js +13 -0
  464. package/lib-commonjs/contexts/tableHeaderContext.js.map +1 -0
  465. package/lib-commonjs/hooks/createColumn.js +42 -0
  466. package/lib-commonjs/hooks/createColumn.js.map +1 -0
  467. package/lib-commonjs/hooks/index.js +4 -4
  468. package/lib-commonjs/hooks/index.js.map +1 -1
  469. package/lib-commonjs/hooks/selectionManager.js +16 -34
  470. package/lib-commonjs/hooks/selectionManager.js.map +1 -1
  471. package/lib-commonjs/hooks/types.js.map +1 -1
  472. package/lib-commonjs/hooks/useTableFeatures.js +42 -0
  473. package/lib-commonjs/hooks/useTableFeatures.js.map +1 -0
  474. package/lib-commonjs/hooks/useTableSelection.js +82 -0
  475. package/lib-commonjs/hooks/useTableSelection.js.map +1 -0
  476. package/lib-commonjs/hooks/useTableSort.js +93 -0
  477. package/lib-commonjs/hooks/useTableSort.js.map +1 -0
  478. package/lib-commonjs/index.js +252 -26
  479. package/lib-commonjs/index.js.map +1 -1
  480. package/package.json +30 -17
  481. package/lib/hooks/useSelection.js +0 -47
  482. package/lib/hooks/useSelection.js.map +0 -1
  483. package/lib/hooks/useSort.js +0 -72
  484. package/lib/hooks/useSort.js.map +0 -1
  485. package/lib/hooks/useTable.js +0 -87
  486. package/lib/hooks/useTable.js.map +0 -1
  487. package/lib/navigationModes/cell.js +0 -250
  488. package/lib/navigationModes/cell.js.map +0 -1
  489. package/lib/navigationModes/composite.js +0 -208
  490. package/lib/navigationModes/composite.js.map +0 -1
  491. package/lib/navigationModes/index.js +0 -3
  492. package/lib/navigationModes/index.js.map +0 -1
  493. package/lib/navigationModes/useNavigationMode.js +0 -42
  494. package/lib/navigationModes/useNavigationMode.js.map +0 -1
  495. package/lib-commonjs/hooks/useSelection.js +0 -59
  496. package/lib-commonjs/hooks/useSelection.js.map +0 -1
  497. package/lib-commonjs/hooks/useSort.js +0 -82
  498. package/lib-commonjs/hooks/useSort.js.map +0 -1
  499. package/lib-commonjs/hooks/useTable.js +0 -99
  500. package/lib-commonjs/hooks/useTable.js.map +0 -1
  501. package/lib-commonjs/navigationModes/cell.js +0 -259
  502. package/lib-commonjs/navigationModes/cell.js.map +0 -1
  503. package/lib-commonjs/navigationModes/composite.js +0 -217
  504. package/lib-commonjs/navigationModes/composite.js.map +0 -1
  505. package/lib-commonjs/navigationModes/index.js +0 -16
  506. package/lib-commonjs/navigationModes/index.js.map +0 -1
  507. package/lib-commonjs/navigationModes/useNavigationMode.js +0 -55
  508. package/lib-commonjs/navigationModes/useNavigationMode.js.map +0 -1
@@ -1,39 +1,31 @@
1
1
  import { __styles, mergeClasses } from '@griffel/react';
2
- import { tokens } from '@fluentui/react-theme';
3
- import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';
4
2
  export const tableCellActionsClassNames = {
5
3
  root: 'fui-TableCellActions'
6
4
  };
7
5
  /**
8
6
  * Styles for the root slot
9
7
  */
10
-
11
8
  const useStyles = /*#__PURE__*/__styles({
12
- "root": {
13
- "qhf8xq": "f1euv43f",
14
- "j35jbq": ["f10k790i", "f1xynx9j"],
15
- "Bhzewxz": "f1i1t8d1",
16
- "Bz10aip": "f188r07x",
17
- "abs64n": "fk73vx1",
18
- "Frg6f3": ["fcgxt0o", "f1ujusj6"],
19
- "De3pzq": "f5gciec",
20
- "Brovlpu": "ftqa4ok",
21
- "B486eqv": "f2hkw1w",
22
- "Bs2wo6l": "f1g03rbe"
9
+ root: {
10
+ qhf8xq: "f1euv43f",
11
+ j35jbq: ["f10k790i", "f1xynx9j"],
12
+ Bhzewxz: "f1i1t8d1",
13
+ Bz10aip: "f188r07x",
14
+ abs64n: "fk73vx1",
15
+ Frg6f3: ["fcgxt0o", "f1ujusj6"]
16
+ },
17
+ visible: {
18
+ abs64n: "f5p0z4x"
23
19
  }
24
20
  }, {
25
- "d": [".f1euv43f{position:absolute;}", ".f10k790i{right:0px;}", ".f1xynx9j{left:0px;}", ".f1i1t8d1{top:50%;}", ".f188r07x{-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);}", ".fk73vx1{opacity:0;}", ".fcgxt0o{margin-left:auto;}", ".f1ujusj6{margin-right:auto;}", ".f5gciec{background-color:var(--colorNeutralBackground1Hover);}", ".f1g03rbe.fui-focus-within:focus-within{opacity:1;}"],
26
- "f": [".ftqa4ok:focus{outline-style:none;}"],
27
- "i": [".f2hkw1w:focus-visible{outline-style:none;}"]
21
+ d: [".f1euv43f{position:absolute;}", ".f10k790i{right:0px;}", ".f1xynx9j{left:0px;}", ".f1i1t8d1{top:50%;}", ".f188r07x{-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);}", ".fk73vx1{opacity:0;}", ".fcgxt0o{margin-left:auto;}", ".f1ujusj6{margin-right:auto;}", ".f5p0z4x{opacity:1;}"]
28
22
  });
29
23
  /**
30
24
  * Apply styling to the TableCellActions slots based on the state
31
25
  */
32
-
33
-
34
26
  export const useTableCellActionsStyles_unstable = state => {
35
27
  const styles = useStyles();
36
- state.root.className = mergeClasses(tableCellActionsClassNames.root, styles.root, state.root.className);
28
+ state.root.className = mergeClasses(tableCellActionsClassNames.root, styles.root, state.visible && styles.visible, state.root.className);
37
29
  return state;
38
30
  };
39
31
  //# sourceMappingURL=useTableCellActionsStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableCellActions/useTableCellActionsStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,QAAyC,gBAAzC;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAGA,SAAS,+BAAT,QAAgD,yBAAhD;AAEA,OAAO,MAAM,0BAA0B,GAA0C;EAC/E,IAAI,EAAE;AADyE,CAA1E;AAIP;;AAEG;;AACH,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;EAAA;EAAA;AAAA,EAAlB;AAmBA;;AAEG;;;AACH,OAAO,MAAM,kCAAkC,GAAI,KAAD,IAAwD;EACxG,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,0BAA0B,CAAC,IAA5B,EAAkC,MAAM,CAAC,IAAzC,EAA+C,KAAK,CAAC,IAAN,CAAW,SAA1D,CAAnC;EAEA,OAAO,KAAP;AACD,CALM","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { TableCellActionsSlots, TableCellActionsState } from './TableCellActions.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\n\nexport const tableCellActionsClassNames: SlotClassNames<TableCellActionsSlots> = {\n root: 'fui-TableCellActions',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n position: 'absolute',\n right: '0px',\n top: '50%',\n transform: 'translateY(-50%)',\n opacity: 0,\n marginLeft: 'auto',\n backgroundColor: tokens.colorNeutralBackground1Hover,\n\n ...createCustomFocusIndicatorStyle(\n {\n opacity: 1,\n },\n { selector: 'focus-within' },\n ),\n },\n});\n\n/**\n * Apply styling to the TableCellActions slots based on the state\n */\nexport const useTableCellActionsStyles_unstable = (state: TableCellActionsState): TableCellActionsState => {\n const styles = useStyles();\n state.root.className = mergeClasses(tableCellActionsClassNames.root, styles.root, state.root.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,mBAAqBA,YAAY,QAAQ,gBAAgB;AAIzD,OAAO,MAAMC,0BAA0B,GAA0C;EAC/EC,IAAI,EAAE;CACP;AAED;;;AAGA,MAAMC,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAahB;AAEF;;;AAGA,OAAO,MAAMC,kCAAkC,GAAIC,KAA4B,IAA2B;EACxG,MAAMC,MAAM,GAAGH,SAAS,EAAE;EAC1BE,KAAK,CAACH,IAAI,CAACK,SAAS,GAAGP,YAAY,CACjCC,0BAA0B,CAACC,IAAI,EAC/BI,MAAM,CAACJ,IAAI,EACXG,KAAK,CAACG,OAAO,IAAIF,MAAM,CAACE,OAAO,EAC/BH,KAAK,CAACH,IAAI,CAACK,SAAS,CACrB;EAED,OAAOF,KAAK;AACd,CAAC","names":["mergeClasses","tableCellActionsClassNames","root","useStyles","useTableCellActionsStyles_unstable","state","styles","className","visible"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCellActions/useTableCellActionsStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport type { TableCellActionsSlots, TableCellActionsState } from './TableCellActions.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableCellActionsClassNames: SlotClassNames<TableCellActionsSlots> = {\n root: 'fui-TableCellActions',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n position: 'absolute',\n right: '0px',\n top: '50%',\n transform: 'translateY(-50%)',\n opacity: 0,\n marginLeft: 'auto',\n },\n\n visible: {\n opacity: 1,\n },\n});\n\n/**\n * Apply styling to the TableCellActions slots based on the state\n */\nexport const useTableCellActionsStyles_unstable = (state: TableCellActionsState): TableCellActionsState => {\n const styles = useStyles();\n state.root.className = mergeClasses(\n tableCellActionsClassNames.root,\n styles.root,\n state.visible && styles.visible,\n state.root.className,\n );\n\n return state;\n};\n"]}
@@ -2,14 +2,14 @@ import * as React from 'react';
2
2
  import { useTableCellLayout_unstable } from './useTableCellLayout';
3
3
  import { renderTableCellLayout_unstable } from './renderTableCellLayout';
4
4
  import { useTableCellLayoutStyles_unstable } from './useTableCellLayoutStyles';
5
+ import { useTableCellLayoutContextValues_unstable } from './useTableCellLayoutContextValues';
5
6
  /**
6
- * TableCellLayout component - TODO: add more docs
7
+ * TableCellLayout component
7
8
  */
8
-
9
9
  export const TableCellLayout = /*#__PURE__*/React.forwardRef((props, ref) => {
10
10
  const state = useTableCellLayout_unstable(props, ref);
11
11
  useTableCellLayoutStyles_unstable(state);
12
- return renderTableCellLayout_unstable(state);
12
+ return renderTableCellLayout_unstable(state, useTableCellLayoutContextValues_unstable(state));
13
13
  });
14
14
  TableCellLayout.displayName = 'TableCellLayout';
15
15
  //# sourceMappingURL=TableCellLayout.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableCellLayout/TableCellLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,2BAAT,QAA4C,sBAA5C;AACA,SAAS,8BAAT,QAA+C,yBAA/C;AACA,SAAS,iCAAT,QAAkD,4BAAlD;AAIA;;AAEG;;AACH,OAAO,MAAM,eAAe,gBAA8C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACxG,MAAM,KAAK,GAAG,2BAA2B,CAAC,KAAD,EAAQ,GAAR,CAAzC;EAEA,iCAAiC,CAAC,KAAD,CAAjC;EACA,OAAO,8BAA8B,CAAC,KAAD,CAArC;AACD,CALyE,CAAnE;AAOP,eAAe,CAAC,WAAhB,GAA8B,iBAA9B","sourcesContent":["import * as React from 'react';\nimport { useTableCellLayout_unstable } from './useTableCellLayout';\nimport { renderTableCellLayout_unstable } from './renderTableCellLayout';\nimport { useTableCellLayoutStyles_unstable } from './useTableCellLayoutStyles';\nimport type { TableCellLayoutProps } from './TableCellLayout.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableCellLayout component - TODO: add more docs\n */\nexport const TableCellLayout: ForwardRefComponent<TableCellLayoutProps> = React.forwardRef((props, ref) => {\n const state = useTableCellLayout_unstable(props, ref);\n\n useTableCellLayoutStyles_unstable(state);\n return renderTableCellLayout_unstable(state);\n});\n\nTableCellLayout.displayName = 'TableCellLayout';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,2BAA2B,QAAQ,sBAAsB;AAClE,SAASC,8BAA8B,QAAQ,yBAAyB;AACxE,SAASC,iCAAiC,QAAQ,4BAA4B;AAC9E,SAASC,wCAAwC,QAAQ,mCAAmC;AAI5F;;;AAGA,OAAO,MAAMC,eAAe,gBAA8CL,KAAK,CAACM,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACxG,MAAMC,KAAK,GAAGR,2BAA2B,CAACM,KAAK,EAAEC,GAAG,CAAC;EAErDL,iCAAiC,CAACM,KAAK,CAAC;EACxC,OAAOP,8BAA8B,CAACO,KAAK,EAAEL,wCAAwC,CAACK,KAAK,CAAC,CAAC;AAC/F,CAAC,CAAC;AAEFJ,eAAe,CAACK,WAAW,GAAG,iBAAiB","names":["React","useTableCellLayout_unstable","renderTableCellLayout_unstable","useTableCellLayoutStyles_unstable","useTableCellLayoutContextValues_unstable","TableCellLayout","forwardRef","props","ref","state","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCellLayout/TableCellLayout.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTableCellLayout_unstable } from './useTableCellLayout';\nimport { renderTableCellLayout_unstable } from './renderTableCellLayout';\nimport { useTableCellLayoutStyles_unstable } from './useTableCellLayoutStyles';\nimport { useTableCellLayoutContextValues_unstable } from './useTableCellLayoutContextValues';\nimport type { TableCellLayoutProps } from './TableCellLayout.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableCellLayout component\n */\nexport const TableCellLayout: ForwardRefComponent<TableCellLayoutProps> = React.forwardRef((props, ref) => {\n const state = useTableCellLayout_unstable(props, ref);\n\n useTableCellLayoutStyles_unstable(state);\n return renderTableCellLayout_unstable(state, useTableCellLayoutContextValues_unstable(state));\n});\n\nTableCellLayout.displayName = 'TableCellLayout';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TableCellLayout.types.js","sourceRoot":"../src/","sources":["components/TableCellLayout/TableCellLayout.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TableCellLayoutSlots = {\n root: Slot<'div'>;\n\n /**\n * Slot for an icon or other visual element\n */\n media: Slot<'span'>;\n\n /**\n * Main text for the table cell. Children of the root slot are automatically rendered here\n */\n main: Slot<'span'>;\n\n /**\n * Secondary text that describes or complements the main text\n */\n description: Slot<'span'>;\n\n /**\n * A layout wrapper for the main and description slots\n */\n wrapper: Slot<'div'>;\n};\n\n/**\n * TableCellLayout Props\n */\nexport type TableCellLayoutProps = ComponentProps<Partial<TableCellLayoutSlots>> & {\n appearance?: 'primary';\n};\n\n/**\n * State used in rendering TableCellLayout\n */\nexport type TableCellLayoutState = ComponentState<TableCellLayoutSlots> & Pick<TableCellLayoutProps, 'appearance'>;\n"]}
1
+ {"version":3,"file":"TableCellLayout.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCellLayout/TableCellLayout.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { AvatarSizes } from '@fluentui/react-avatar';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableCellLayoutContextValues = {\n avatar: {\n size?: AvatarSizes;\n };\n};\n\nexport type TableCellLayoutSlots = {\n root: Slot<'div'>;\n\n /**\n * Slot for an icon or other visual element\n */\n media: Slot<'span'>;\n\n /**\n * Main text for the table cell. Children of the root slot are automatically rendered here\n */\n main: Slot<'span'>;\n\n /**\n * Secondary text that describes or complements the main text\n */\n description: Slot<'span'>;\n\n /**\n * A layout wrapper for the main and description slots\n */\n content: Slot<'div'>;\n};\n\n/**\n * TableCellLayout Props\n */\nexport type TableCellLayoutProps = ComponentProps<Partial<TableCellLayoutSlots>> & {\n /**\n * Renders design variants of the table cell\n * @default undefined\n */\n appearance?: 'primary';\n};\n\n/**\n * State used in rendering TableCellLayout\n */\nexport type TableCellLayoutState = ComponentState<TableCellLayoutSlots> &\n Pick<TableCellLayoutProps, 'appearance'> & { avatarSize: AvatarSizes | undefined } & Pick<TableContextValue, 'size'>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/TableCellLayout/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC","sourcesContent":["export * from './TableCellLayout';\nexport * from './TableCellLayout.types';\nexport * from './renderTableCellLayout';\nexport * from './useTableCellLayout';\nexport * from './useTableCellLayoutStyles';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCellLayout/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC","sourcesContent":["export * from './TableCellLayout';\nexport * from './TableCellLayout.types';\nexport * from './renderTableCellLayout';\nexport * from './useTableCellLayout';\nexport * from './useTableCellLayoutStyles';\n"]}
@@ -1,19 +1,26 @@
1
1
  import * as React from 'react';
2
2
  import { getSlots } from '@fluentui/react-utilities';
3
+ import { AvatarContextProvider } from '@fluentui/react-avatar';
3
4
  /**
4
5
  * Render the final JSX of TableCellLayout
5
6
  */
6
-
7
- export const renderTableCellLayout_unstable = state => {
7
+ export const renderTableCellLayout_unstable = (state, contextValues) => {
8
8
  const {
9
9
  slots,
10
10
  slotProps
11
11
  } = getSlots(state);
12
- return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
13
- }, slots.media && /*#__PURE__*/React.createElement(slots.media, { ...slotProps.media
14
- }), slots.wrapper && /*#__PURE__*/React.createElement(slots.wrapper, { ...slotProps.wrapper
15
- }, slots.main && /*#__PURE__*/React.createElement(slots.main, { ...slotProps.main
16
- }, slotProps.root.children), slots.description && /*#__PURE__*/React.createElement(slots.description, { ...slotProps.description
12
+ return /*#__PURE__*/React.createElement(slots.root, {
13
+ ...slotProps.root
14
+ }, slots.media && /*#__PURE__*/React.createElement(AvatarContextProvider, {
15
+ value: contextValues.avatar
16
+ }, /*#__PURE__*/React.createElement(slots.media, {
17
+ ...slotProps.media
18
+ })), slots.content && /*#__PURE__*/React.createElement(slots.content, {
19
+ ...slotProps.content
20
+ }, slots.main && /*#__PURE__*/React.createElement(slots.main, {
21
+ ...slotProps.main
22
+ }, slotProps.root.children), slots.description && /*#__PURE__*/React.createElement(slots.description, {
23
+ ...slotProps.description
17
24
  })));
18
25
  };
19
26
  //# sourceMappingURL=renderTableCellLayout.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableCellLayout/renderTableCellLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,8BAA8B,GAAI,KAAD,IAAgC;EAC5E,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAuB,KAAvB,CAArC;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EACG,KAAK,CAAC,KAAN,iBAAe,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;EAAf,CAAZ,CADlB,EAEG,KAAK,CAAC,OAAN,iBACC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAK,SAAS,CAAC;EAAf,CAAd,EACG,KAAK,CAAC,IAAN,iBAAc,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,iBAAqB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,WAAP,EAAkB,EAAA,GAAK,SAAS,CAAC;EAAf,CAAlB,CAFxB,CAHJ,CADF;AAWD,CAdM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableCellLayoutState, TableCellLayoutSlots } from './TableCellLayout.types';\n\n/**\n * Render the final JSX of TableCellLayout\n */\nexport const renderTableCellLayout_unstable = (state: TableCellLayoutState) => {\n const { slots, slotProps } = getSlots<TableCellLayoutSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slots.media && <slots.media {...slotProps.media} />}\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/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AACpD,SAASC,qBAAqB,QAAQ,wBAAwB;AAG9D;;;AAGA,OAAO,MAAMC,8BAA8B,GAAG,CAC5CC,KAA2B,EAC3BC,aAA2C,KACzC;EACF,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGN,QAAQ,CAAuBG,KAAK,CAAC;EAElE,oBACEJ,oBAACM,KAAK,CAACE,IAAI;IAAA,GAAKD,SAAS,CAACC;EAAI,GAC3BF,KAAK,CAACG,KAAK,iBACVT,oBAACE,qBAAqB;IAACQ,KAAK,EAAEL,aAAa,CAACM;EAAM,gBAChDX,oBAACM,KAAK,CAACG,KAAK;IAAA,GAAKF,SAAS,CAACE;EAAK,EAAI,CAEvC,EACAH,KAAK,CAACM,OAAO,iBACZZ,oBAACM,KAAK,CAACM,OAAO;IAAA,GAAKL,SAAS,CAACK;EAAO,GACjCN,KAAK,CAACO,IAAI,iBAAIb,oBAACM,KAAK,CAACO,IAAI;IAAA,GAAKN,SAAS,CAACM;EAAI,GAAGN,SAAS,CAACC,IAAI,CAACM,QAAQ,CAAc,EACpFR,KAAK,CAACS,WAAW,iBAAIf,oBAACM,KAAK,CAACS,WAAW;IAAA,GAAKR,SAAS,CAACQ;EAAW,EAAI,CAEzE,CACU;AAEjB,CAAC","names":["React","getSlots","AvatarContextProvider","renderTableCellLayout_unstable","state","contextValues","slots","slotProps","root","media","value","avatar","content","main","children","description"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCellLayout/renderTableCellLayout.tsx"],"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.content && (\n <slots.content {...slotProps.content}>\n {slots.main && <slots.main {...slotProps.main}>{slotProps.root.children}</slots.main>}\n {slots.description && <slots.description {...slotProps.description} />}\n </slots.content>\n )}\n </slots.root>\n );\n};\n"]}
@@ -1,4 +1,10 @@
1
1
  import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';
2
+ import { useTableContext } from '../../contexts/tableContext';
3
+ const tableAvatarSizeMap = {
4
+ medium: 32,
5
+ small: 24,
6
+ 'extra-small': 20
7
+ };
2
8
  /**
3
9
  * Create the state required to render TableCellLayout.
4
10
  *
@@ -8,14 +14,16 @@ import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utiliti
8
14
  * @param props - props from this instance of TableCellLayout
9
15
  * @param ref - reference to root HTMLElement of TableCellLayout
10
16
  */
11
-
12
17
  export const useTableCellLayout_unstable = (props, ref) => {
18
+ const {
19
+ size
20
+ } = useTableContext();
13
21
  return {
14
22
  components: {
15
23
  root: 'div',
16
24
  main: 'span',
17
25
  description: 'span',
18
- wrapper: 'div',
26
+ content: 'div',
19
27
  media: 'span'
20
28
  },
21
29
  root: getNativeElementProps('div', {
@@ -28,9 +36,11 @@ export const useTableCellLayout_unstable = (props, ref) => {
28
36
  }),
29
37
  media: resolveShorthand(props.media),
30
38
  description: resolveShorthand(props.description),
31
- wrapper: resolveShorthand(props.wrapper, {
39
+ content: resolveShorthand(props.content, {
32
40
  required: !!props.description || !!props.children
33
- })
41
+ }),
42
+ avatarSize: tableAvatarSizeMap[size],
43
+ size
34
44
  };
35
45
  };
36
46
  //# sourceMappingURL=useTableCellLayout.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableCellLayout/useTableCellLayout.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,2BAA2B,GAAG,CACzC,KADyC,EAEzC,GAFyC,KAGjB;EACxB,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE,KADI;MAEV,IAAI,EAAE,MAFI;MAGV,WAAW,EAAE,MAHH;MAIV,OAAO,EAAE,KAJC;MAKV,KAAK,EAAE;IALG,CADP;IAQL,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;MAAE,GAAF;MAAO,GAAG;IAAV,CAAR,CARtB;IASL,UAAU,EAAE,KAAK,CAAC,UATb;IAUL,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC,IAAP,EAAa;MAAE,QAAQ,EAAE;IAAZ,CAAb,CAVjB;IAWL,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC,KAAP,CAXlB;IAYL,WAAW,EAAE,gBAAgB,CAAC,KAAK,CAAC,WAAP,CAZxB;IAaL,OAAO,EAAE,gBAAgB,CAAC,KAAK,CAAC,OAAP,EAAgB;MAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,WAAR,IAAuB,CAAC,CAAC,KAAK,CAAC;IAA3C,CAAhB;EAbpB,CAAP;AAeD,CAnBM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport type { TableCellLayoutProps, TableCellLayoutState } from './TableCellLayout.types';\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 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 };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AACA,SAASA,qBAAqB,EAAEC,gBAAgB,QAAQ,2BAA2B;AAEnF,SAASC,eAAe,QAAQ,6BAA6B;AAE7D,MAAMC,kBAAkB,GAAG;EACzBC,MAAM,EAAE,EAAE;EACVC,KAAK,EAAE,EAAE;EACT,aAAa,EAAE;CACP;AAEV;;;;;;;;;AASA,OAAO,MAAMC,2BAA2B,GAAG,CACzCC,KAA2B,EAC3BC,GAA2B,KACH;EACxB,MAAM;IAAEC;EAAI,CAAE,GAAGP,eAAe,EAAE;EAElC,OAAO;IACLQ,UAAU,EAAE;MACVC,IAAI,EAAE,KAAK;MACXC,IAAI,EAAE,MAAM;MACZC,WAAW,EAAE,MAAM;MACnBC,OAAO,EAAE,KAAK;MACdC,KAAK,EAAE;KACR;IACDJ,IAAI,EAAEX,qBAAqB,CAAC,KAAK,EAAE;MAAEQ,GAAG;MAAE,GAAGD;IAAK,CAAE,CAAC;IACrDS,UAAU,EAAET,KAAK,CAACS,UAAU;IAC5BJ,IAAI,EAAEX,gBAAgB,CAACM,KAAK,CAACK,IAAI,EAAE;MAAEK,QAAQ,EAAE;IAAI,CAAE,CAAC;IACtDF,KAAK,EAAEd,gBAAgB,CAACM,KAAK,CAACQ,KAAK,CAAC;IACpCF,WAAW,EAAEZ,gBAAgB,CAACM,KAAK,CAACM,WAAW,CAAC;IAChDC,OAAO,EAAEb,gBAAgB,CAACM,KAAK,CAACO,OAAO,EAAE;MAAEG,QAAQ,EAAE,CAAC,CAACV,KAAK,CAACM,WAAW,IAAI,CAAC,CAACN,KAAK,CAACW;IAAQ,CAAE,CAAC;IAC/FC,UAAU,EAAEhB,kBAAkB,CAACM,IAAI,CAAC;IACpCA;GACD;AACH,CAAC","names":["getNativeElementProps","resolveShorthand","useTableContext","tableAvatarSizeMap","medium","small","useTableCellLayout_unstable","props","ref","size","components","root","main","description","content","media","appearance","required","children","avatarSize"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCellLayout/useTableCellLayout.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport type { TableCellLayoutProps, TableCellLayoutState } from './TableCellLayout.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\nconst tableAvatarSizeMap = {\n medium: 32,\n small: 24,\n 'extra-small': 20,\n} as const;\n\n/**\n * Create the state required to render TableCellLayout.\n *\n * The returned state can be modified with hooks such as useTableCellLayoutStyles_unstable,\n * before being passed to renderTableCellLayout_unstable.\n *\n * @param props - props from this instance of TableCellLayout\n * @param ref - reference to root HTMLElement of TableCellLayout\n */\nexport const useTableCellLayout_unstable = (\n props: TableCellLayoutProps,\n ref: React.Ref<HTMLElement>,\n): TableCellLayoutState => {\n const { size } = useTableContext();\n\n return {\n components: {\n root: 'div',\n main: 'span',\n description: 'span',\n content: 'div',\n media: 'span',\n },\n root: getNativeElementProps('div', { ref, ...props }),\n appearance: props.appearance,\n main: resolveShorthand(props.main, { required: true }),\n media: resolveShorthand(props.media),\n description: resolveShorthand(props.description),\n content: resolveShorthand(props.content, { required: !!props.description || !!props.children }),\n avatarSize: tableAvatarSizeMap[size],\n size,\n };\n};\n"]}
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ export function useTableCellLayoutContextValues_unstable(state) {
3
+ const {
4
+ avatarSize
5
+ } = state;
6
+ const avatar = React.useMemo(() => ({
7
+ size: avatarSize
8
+ }), [avatarSize]);
9
+ return {
10
+ avatar
11
+ };
12
+ }
13
+ //# sourceMappingURL=useTableCellLayoutContextValues.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,OAAM,SAAUC,wCAAwC,CAACC,KAA2B;EAClF,MAAM;IAAEC;EAAU,CAAE,GAAGD,KAAK;EAE5B,MAAME,MAAM,GAAGJ,KAAK,CAACK,OAAO,CAC1B,OAAO;IACLC,IAAI,EAAEH;GACP,CAAC,EACF,CAACA,UAAU,CAAC,CACb;EAED,OAAO;IACLC;GACD;AACH","names":["React","useTableCellLayoutContextValues_unstable","state","avatarSize","avatar","useMemo","size"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCellLayout/useTableCellLayoutContextValues.ts"],"sourcesContent":["import * as React from 'react';\nimport type { TableCellLayoutState, TableCellLayoutContextValues } from './TableCellLayout.types';\n\nexport function useTableCellLayoutContextValues_unstable(state: TableCellLayoutState): TableCellLayoutContextValues {\n const { avatarSize } = state;\n\n const avatar = React.useMemo(\n () => ({\n size: avatarSize,\n }),\n [avatarSize],\n );\n\n return {\n avatar,\n };\n}\n"]}
@@ -1,74 +1,80 @@
1
1
  import { __styles, mergeClasses, shorthands } from '@griffel/react';
2
2
  import { tokens } from '@fluentui/react-theme';
3
+ import { typographyStyles } from '@fluentui/react-theme';
3
4
  export const tableCellLayoutClassNames = {
4
5
  root: 'fui-TableCellLayout',
5
6
  media: 'fui-TableCellLayout__media',
6
7
  main: 'fui-TableCellLayout__main',
7
8
  description: 'fui-TableCellLayout__description',
8
- wrapper: 'fui-TableCellLayout__wrapper'
9
+ content: 'fui-TableCellLayout__content'
9
10
  };
10
11
  /**
11
12
  * Styles for the root slot
12
13
  */
13
-
14
14
  const useStyles = /*#__PURE__*/__styles({
15
- "root": {
16
- "mc9l5x": "f22iagw",
17
- "Bt984gj": "f122n59",
18
- "i8kkvl": "fsnqrgy",
19
- "Belr9w4": "fylz90v",
20
- "Bh6795r": "fqerorx",
21
- "Bnnss6s": "f1neuvcm",
22
- "xawz": "fkjuxzh"
15
+ root: {
16
+ mc9l5x: "f22iagw",
17
+ Bt984gj: "f122n59",
18
+ i8kkvl: "fsnqrgy",
19
+ Belr9w4: "fylz90v",
20
+ Bh6795r: "fqerorx",
21
+ Bnnss6s: "f1neuvcm",
22
+ xawz: "fkjuxzh"
23
23
  },
24
- "wrapper": {
25
- "mc9l5x": "f22iagw",
26
- "Beiy3e4": "f1vx9l62"
24
+ content: {
25
+ mc9l5x: "f22iagw",
26
+ Beiy3e4: "f1vx9l62"
27
27
  },
28
- "media": {
29
- "mc9l5x": "f22iagw",
30
- "Bt984gj": "f122n59"
28
+ media: {
29
+ mc9l5x: "f22iagw",
30
+ Bt984gj: "f122n59"
31
31
  },
32
- "mediaPrimary": {
33
- "B5pe6w7": "fqgjdyf",
34
- "p4uzdd": "fppfxz8"
32
+ mediaExtraSmall: {
33
+ Be2twd7: "f4ybsrx"
35
34
  },
36
- "mainPrimary": {
37
- "Bhrd7zp": "fl43uef"
35
+ mediaSmallAndMedium: {
36
+ Be2twd7: "fe5j1ua"
38
37
  },
39
- "description": {
40
- "Be2twd7": "fkhj508",
41
- "sj55zd": "fkfq4zb"
38
+ mediaPrimary: {
39
+ Be2twd7: "f1rt2boy"
40
+ },
41
+ mainPrimary: {
42
+ Bhrd7zp: "fl43uef"
43
+ },
44
+ description: {
45
+ sj55zd: "fkfq4zb",
46
+ Bahqtrf: "fk6fouc",
47
+ Be2twd7: "fy9rknc",
48
+ Bhrd7zp: "figsok6",
49
+ Bg96gwp: "fwrc4pm"
42
50
  }
43
51
  }, {
44
- "d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fsnqrgy{-webkit-column-gap:var(--spacingHorizontalS);column-gap:var(--spacingHorizontalS);}", ".fylz90v{row-gap:var(--spacingHorizontalS);}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f1neuvcm{-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;}", ".fkjuxzh{-webkit-flex-basis:0px;-ms-flex-preferred-size:0px;flex-basis:0px;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".fqgjdyf svg{width:28px;}", ".fppfxz8 svg{height:28px;}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".fkfq4zb{color:var(--colorNeutralForeground2);}"]
52
+ d: [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fsnqrgy{-webkit-column-gap:var(--spacingHorizontalS);column-gap:var(--spacingHorizontalS);}", ".fylz90v{row-gap:var(--spacingHorizontalS);}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f1neuvcm{-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;}", ".fkjuxzh{-webkit-flex-basis:0px;-ms-flex-preferred-size:0px;flex-basis:0px;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".f4ybsrx{font-size:16px;}", ".fe5j1ua{font-size:20px;}", ".f1rt2boy{font-size:24px;}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fkfq4zb{color:var(--colorNeutralForeground2);}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}"]
45
53
  });
46
54
  /**
47
55
  * Apply styling to the TableCellLayout slots based on the state
48
56
  */
49
-
50
-
51
57
  export const useTableCellLayoutStyles_unstable = state => {
52
58
  const styles = useStyles();
53
59
  state.root.className = mergeClasses(tableCellLayoutClassNames.root, styles.root, state.root.className);
54
60
  const primary = state.appearance === 'primary';
55
-
56
61
  if (state.media) {
57
- state.media.className = mergeClasses(tableCellLayoutClassNames.media, styles.media, primary && styles.mediaPrimary, state.media.className);
62
+ const mediaSizedStyles = {
63
+ small: styles.mediaSmallAndMedium,
64
+ medium: styles.mediaSmallAndMedium,
65
+ 'extra-small': styles.mediaExtraSmall
66
+ };
67
+ state.media.className = mergeClasses(tableCellLayoutClassNames.media, styles.media, mediaSizedStyles[state.size], primary && styles.mediaPrimary, state.media.className);
58
68
  }
59
-
60
69
  if (state.main) {
61
70
  state.main.className = mergeClasses(tableCellLayoutClassNames.main, primary && styles.mainPrimary, state.main.className);
62
71
  }
63
-
64
72
  if (state.description) {
65
73
  state.description.className = mergeClasses(tableCellLayoutClassNames.description, styles.description, state.description.className);
66
74
  }
67
-
68
- if (state.wrapper) {
69
- state.wrapper.className = mergeClasses(tableCellLayoutClassNames.wrapper, styles.wrapper, state.wrapper.className);
75
+ if (state.content) {
76
+ state.content.className = mergeClasses(tableCellLayoutClassNames.content, styles.content, state.content.className);
70
77
  }
71
-
72
78
  return state;
73
79
  };
74
80
  //# sourceMappingURL=useTableCellLayoutStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableCellLayout/useTableCellLayoutStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,EAAmC,UAAnC,QAAqD,gBAArD;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAIA,OAAO,MAAM,yBAAyB,GAAyC;EAC7E,IAAI,EAAE,qBADuE;EAE7E,KAAK,EAAE,4BAFsE;EAG7E,IAAI,EAAE,2BAHuE;EAI7E,WAAW,EAAE,kCAJgE;EAK7E,OAAO,EAAE;AALoE,CAAxE;AAQP;;AAEG;;AACH,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AAkCA;;AAEG;;;AACH,OAAO,MAAM,iCAAiC,GAAI,KAAD,IAAsD;EACrG,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,yBAAyB,CAAC,IAA3B,EAAiC,MAAM,CAAC,IAAxC,EAA8C,KAAK,CAAC,IAAN,CAAW,SAAzD,CAAnC;EACA,MAAM,OAAO,GAAG,KAAK,CAAC,UAAN,KAAqB,SAArC;;EAEA,IAAI,KAAK,CAAC,KAAV,EAAiB;IACf,KAAK,CAAC,KAAN,CAAY,SAAZ,GAAwB,YAAY,CAClC,yBAAyB,CAAC,KADQ,EAElC,MAAM,CAAC,KAF2B,EAGlC,OAAO,IAAI,MAAM,CAAC,YAHgB,EAIlC,KAAK,CAAC,KAAN,CAAY,SAJsB,CAApC;EAMD;;EAED,IAAI,KAAK,CAAC,IAAV,EAAgB;IACd,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,yBAAyB,CAAC,IADO,EAEjC,OAAO,IAAI,MAAM,CAAC,WAFe,EAGjC,KAAK,CAAC,IAAN,CAAW,SAHsB,CAAnC;EAKD;;EAED,IAAI,KAAK,CAAC,WAAV,EAAuB;IACrB,KAAK,CAAC,WAAN,CAAkB,SAAlB,GAA8B,YAAY,CACxC,yBAAyB,CAAC,WADc,EAExC,MAAM,CAAC,WAFiC,EAGxC,KAAK,CAAC,WAAN,CAAkB,SAHsB,CAA1C;EAKD;;EAED,IAAI,KAAK,CAAC,OAAV,EAAmB;IACjB,KAAK,CAAC,OAAN,CAAc,SAAd,GAA0B,YAAY,CAAC,yBAAyB,CAAC,OAA3B,EAAoC,MAAM,CAAC,OAA3C,EAAoD,KAAK,CAAC,OAAN,CAAc,SAAlE,CAAtC;EACD;;EAED,OAAO,KAAP;AACD,CAnCM","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { TableCellLayoutSlots, TableCellLayoutState } from './TableCellLayout.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableCellLayoutClassNames: SlotClassNames<TableCellLayoutSlots> = {\n root: 'fui-TableCellLayout',\n media: 'fui-TableCellLayout__media',\n main: 'fui-TableCellLayout__main',\n description: 'fui-TableCellLayout__description',\n wrapper: 'fui-TableCellLayout__wrapper',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n ...shorthands.gap(tokens.spacingHorizontalS),\n ...shorthands.flex(1, 1, '0px'),\n },\n wrapper: {\n display: 'flex',\n flexDirection: 'column',\n },\n\n media: {\n display: 'flex',\n alignItems: 'center',\n },\n\n mediaPrimary: {\n '& svg': {\n width: '28px',\n height: '28px',\n },\n },\n\n mainPrimary: {\n fontWeight: tokens.fontWeightSemibold,\n },\n\n description: {\n fontSize: tokens.fontSizeBase300,\n color: tokens.colorNeutralForeground2,\n },\n});\n\n/**\n * Apply styling to the TableCellLayout slots based on the state\n */\nexport const useTableCellLayoutStyles_unstable = (state: TableCellLayoutState): TableCellLayoutState => {\n const styles = useStyles();\n state.root.className = mergeClasses(tableCellLayoutClassNames.root, styles.root, state.root.className);\n const primary = state.appearance === 'primary';\n\n if (state.media) {\n state.media.className = mergeClasses(\n tableCellLayoutClassNames.media,\n styles.media,\n primary && styles.mediaPrimary,\n state.media.className,\n );\n }\n\n if (state.main) {\n state.main.className = mergeClasses(\n tableCellLayoutClassNames.main,\n primary && styles.mainPrimary,\n state.main.className,\n );\n }\n\n if (state.description) {\n state.description.className = mergeClasses(\n tableCellLayoutClassNames.description,\n styles.description,\n state.description.className,\n );\n }\n\n if (state.wrapper) {\n state.wrapper.className = mergeClasses(tableCellLayoutClassNames.wrapper, styles.wrapper, state.wrapper.className);\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,mBAAqBA,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,QAAQ,uBAAuB;AAG9C,SAASC,gBAAgB,QAAQ,uBAAuB;AAExD,OAAO,MAAMC,yBAAyB,GAAyC;EAC7EC,IAAI,EAAE,qBAAqB;EAC3BC,KAAK,EAAE,4BAA4B;EACnCC,IAAI,EAAE,2BAA2B;EACjCC,WAAW,EAAE,kCAAkC;EAC/CC,OAAO,EAAE;CACV;AAED;;;AAGA,MAAMC,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAqChB;AAEF;;;AAGA,OAAO,MAAMC,iCAAiC,GAAIC,KAA2B,IAA0B;EACrG,MAAMC,MAAM,GAAGH,SAAS,EAAE;EAC1BE,KAAK,CAACP,IAAI,CAACS,SAAS,GAAGd,YAAY,CAACI,yBAAyB,CAACC,IAAI,EAAEQ,MAAM,CAACR,IAAI,EAAEO,KAAK,CAACP,IAAI,CAACS,SAAS,CAAC;EACtG,MAAMC,OAAO,GAAGH,KAAK,CAACI,UAAU,KAAK,SAAS;EAE9C,IAAIJ,KAAK,CAACN,KAAK,EAAE;IACf,MAAMW,gBAAgB,GAAG;MACvBC,KAAK,EAAEL,MAAM,CAACM,mBAAmB;MACjCC,MAAM,EAAEP,MAAM,CAACM,mBAAmB;MAClC,aAAa,EAAEN,MAAM,CAACQ;KACvB;IAEDT,KAAK,CAACN,KAAK,CAACQ,SAAS,GAAGd,YAAY,CAClCI,yBAAyB,CAACE,KAAK,EAC/BO,MAAM,CAACP,KAAK,EACZW,gBAAgB,CAACL,KAAK,CAACU,IAAI,CAAC,EAC5BP,OAAO,IAAIF,MAAM,CAACU,YAAY,EAC9BX,KAAK,CAACN,KAAK,CAACQ,SAAS,CACtB;;EAGH,IAAIF,KAAK,CAACL,IAAI,EAAE;IACdK,KAAK,CAACL,IAAI,CAACO,SAAS,GAAGd,YAAY,CACjCI,yBAAyB,CAACG,IAAI,EAC9BQ,OAAO,IAAIF,MAAM,CAACW,WAAW,EAC7BZ,KAAK,CAACL,IAAI,CAACO,SAAS,CACrB;;EAGH,IAAIF,KAAK,CAACJ,WAAW,EAAE;IACrBI,KAAK,CAACJ,WAAW,CAACM,SAAS,GAAGd,YAAY,CACxCI,yBAAyB,CAACI,WAAW,EACrCK,MAAM,CAACL,WAAW,EAClBI,KAAK,CAACJ,WAAW,CAACM,SAAS,CAC5B;;EAGH,IAAIF,KAAK,CAACH,OAAO,EAAE;IACjBG,KAAK,CAACH,OAAO,CAACK,SAAS,GAAGd,YAAY,CAACI,yBAAyB,CAACK,OAAO,EAAEI,MAAM,CAACJ,OAAO,EAAEG,KAAK,CAACH,OAAO,CAACK,SAAS,CAAC;;EAGpH,OAAOF,KAAK;AACd,CAAC","names":["mergeClasses","shorthands","tokens","typographyStyles","tableCellLayoutClassNames","root","media","main","description","content","useStyles","useTableCellLayoutStyles_unstable","state","styles","className","primary","appearance","mediaSizedStyles","small","mediaSmallAndMedium","medium","mediaExtraSmall","size","mediaPrimary","mainPrimary"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCellLayout/useTableCellLayoutStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { TableCellLayoutSlots, TableCellLayoutState } from './TableCellLayout.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { typographyStyles } from '@fluentui/react-theme';\n\nexport const tableCellLayoutClassNames: SlotClassNames<TableCellLayoutSlots> = {\n root: 'fui-TableCellLayout',\n media: 'fui-TableCellLayout__media',\n main: 'fui-TableCellLayout__main',\n description: 'fui-TableCellLayout__description',\n content: 'fui-TableCellLayout__content',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n ...shorthands.gap(tokens.spacingHorizontalS),\n ...shorthands.flex(1, 1, '0px'),\n },\n content: {\n display: 'flex',\n flexDirection: 'column',\n },\n\n media: {\n display: 'flex',\n alignItems: 'center',\n },\n\n mediaExtraSmall: {\n fontSize: '16px',\n },\n\n mediaSmallAndMedium: {\n fontSize: '20px',\n },\n\n mediaPrimary: {\n fontSize: '24px',\n },\n\n mainPrimary: {\n fontWeight: tokens.fontWeightSemibold,\n },\n\n description: {\n color: tokens.colorNeutralForeground2,\n ...typographyStyles.caption1,\n },\n});\n\n/**\n * Apply styling to the TableCellLayout slots based on the state\n */\nexport const useTableCellLayoutStyles_unstable = (state: TableCellLayoutState): TableCellLayoutState => {\n const styles = useStyles();\n state.root.className = mergeClasses(tableCellLayoutClassNames.root, styles.root, state.root.className);\n const primary = state.appearance === 'primary';\n\n if (state.media) {\n const mediaSizedStyles = {\n small: styles.mediaSmallAndMedium,\n medium: styles.mediaSmallAndMedium,\n 'extra-small': styles.mediaExtraSmall,\n };\n\n state.media.className = mergeClasses(\n tableCellLayoutClassNames.media,\n styles.media,\n mediaSizedStyles[state.size],\n primary && styles.mediaPrimary,\n state.media.className,\n );\n }\n\n if (state.main) {\n state.main.className = mergeClasses(\n tableCellLayoutClassNames.main,\n primary && styles.mainPrimary,\n state.main.className,\n );\n }\n\n if (state.description) {\n state.description.className = mergeClasses(\n tableCellLayoutClassNames.description,\n styles.description,\n state.description.className,\n );\n }\n\n if (state.content) {\n state.content.className = mergeClasses(tableCellLayoutClassNames.content, styles.content, state.content.className);\n }\n\n return state;\n};\n"]}
@@ -3,9 +3,8 @@ import { useTableHeader_unstable } from './useTableHeader';
3
3
  import { renderTableHeader_unstable } from './renderTableHeader';
4
4
  import { useTableHeaderStyles_unstable } from './useTableHeaderStyles';
5
5
  /**
6
- * TableHeader component - TODO: add more docs
6
+ * TableHeader component
7
7
  */
8
-
9
8
  export const TableHeader = /*#__PURE__*/React.forwardRef((props, ref) => {
10
9
  const state = useTableHeader_unstable(props, ref);
11
10
  useTableHeaderStyles_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableHeader/TableHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,uBAAT,QAAwC,kBAAxC;AACA,SAAS,0BAAT,QAA2C,qBAA3C;AACA,SAAS,6BAAT,QAA8C,wBAA9C;AAIA;;AAEG;;AACH,OAAO,MAAM,WAAW,gBAA0C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAChG,MAAM,KAAK,GAAG,uBAAuB,CAAC,KAAD,EAAQ,GAAR,CAArC;EAEA,6BAA6B,CAAC,KAAD,CAA7B;EACA,OAAO,0BAA0B,CAAC,KAAD,CAAjC;AACD,CALiE,CAA3D;AAOP,WAAW,CAAC,WAAZ,GAA0B,aAA1B","sourcesContent":["import * as React from 'react';\nimport { useTableHeader_unstable } from './useTableHeader';\nimport { renderTableHeader_unstable } from './renderTableHeader';\nimport { useTableHeaderStyles_unstable } from './useTableHeaderStyles';\nimport type { TableHeaderProps } from './TableHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableHeader component - TODO: add more docs\n */\nexport const TableHeader: ForwardRefComponent<TableHeaderProps> = React.forwardRef((props, ref) => {\n const state = useTableHeader_unstable(props, ref);\n\n useTableHeaderStyles_unstable(state);\n return renderTableHeader_unstable(state);\n});\n\nTableHeader.displayName = 'TableHeader';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,uBAAuB,QAAQ,kBAAkB;AAC1D,SAASC,0BAA0B,QAAQ,qBAAqB;AAChE,SAASC,6BAA6B,QAAQ,wBAAwB;AAItE;;;AAGA,OAAO,MAAMC,WAAW,gBAA0CJ,KAAK,CAACK,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAChG,MAAMC,KAAK,GAAGP,uBAAuB,CAACK,KAAK,EAAEC,GAAG,CAAC;EAEjDJ,6BAA6B,CAACK,KAAK,CAAC;EACpC,OAAON,0BAA0B,CAACM,KAAK,CAAC;AAC1C,CAAC,CAAC;AAEFJ,WAAW,CAACK,WAAW,GAAG,aAAa","names":["React","useTableHeader_unstable","renderTableHeader_unstable","useTableHeaderStyles_unstable","TableHeader","forwardRef","props","ref","state","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableHeader/TableHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTableHeader_unstable } from './useTableHeader';\nimport { renderTableHeader_unstable } from './renderTableHeader';\nimport { useTableHeaderStyles_unstable } from './useTableHeaderStyles';\nimport type { TableHeaderProps } from './TableHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableHeader component\n */\nexport const TableHeader: ForwardRefComponent<TableHeaderProps> = React.forwardRef((props, ref) => {\n const state = useTableHeader_unstable(props, ref);\n\n useTableHeaderStyles_unstable(state);\n return renderTableHeader_unstable(state);\n});\n\nTableHeader.displayName = 'TableHeader';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TableHeader.types.js","sourceRoot":"../src/","sources":["components/TableHeader/TableHeader.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TableHeaderSlots = {\n root: Slot<'thead', 'div'>;\n};\n\n/**\n * TableHeader Props\n */\nexport type TableHeaderProps = ComponentProps<TableHeaderSlots> & {};\n\n/**\n * State used in rendering TableHeader\n */\nexport type TableHeaderState = ComponentState<TableHeaderSlots>;\n"]}
1
+ {"version":3,"file":"TableHeader.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableHeader/TableHeader.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableHeaderSlots = {\n root: Slot<'thead', 'div'>;\n};\n\n/**\n * TableHeader Props\n */\nexport type TableHeaderProps = ComponentProps<TableHeaderSlots> & {};\n\n/**\n * State used in rendering TableHeader\n */\nexport type TableHeaderState = ComponentState<TableHeaderSlots> & Pick<TableContextValue, 'noNativeElements'>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/TableHeader/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC","sourcesContent":["export * from './TableHeader';\nexport * from './TableHeader.types';\nexport * from './renderTableHeader';\nexport * from './useTableHeader';\nexport * from './useTableHeaderStyles';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableHeader/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC","sourcesContent":["export * from './TableHeader';\nexport * from './TableHeader.types';\nexport * from './renderTableHeader';\nexport * from './useTableHeader';\nexport * from './useTableHeaderStyles';\n"]}
@@ -1,15 +1,18 @@
1
1
  import * as React from 'react';
2
2
  import { getSlots } from '@fluentui/react-utilities';
3
+ import { TableHeaderContextProvider } from '../../contexts/tableHeaderContext';
3
4
  /**
4
5
  * Render the final JSX of TableHeader
5
6
  */
6
-
7
7
  export const renderTableHeader_unstable = state => {
8
8
  const {
9
9
  slots,
10
10
  slotProps
11
11
  } = getSlots(state);
12
- return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
13
- });
12
+ return /*#__PURE__*/React.createElement(TableHeaderContextProvider, {
13
+ value: ""
14
+ }, /*#__PURE__*/React.createElement(slots.root, {
15
+ ...slotProps.root
16
+ }));
14
17
  };
15
18
  //# sourceMappingURL=renderTableHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableHeader/renderTableHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,0BAA0B,GAAI,KAAD,IAA4B;EACpE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAmB,KAAnB,CAArC;EAEA,oBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CAJM","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,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AACpD,SAASC,0BAA0B,QAAQ,mCAAmC;AAG9E;;;AAGA,OAAO,MAAMC,0BAA0B,GAAIC,KAAuB,IAAI;EACpE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGL,QAAQ,CAAmBG,KAAK,CAAC;EAE9D,oBACEJ,oBAACE,0BAA0B;IAACK,KAAK,EAAC;EAAE,gBAClCP,oBAACK,KAAK,CAACG,IAAI;IAAA,GAAKF,SAAS,CAACE;EAAI,EAAI,CACP;AAEjC,CAAC","names":["React","getSlots","TableHeaderContextProvider","renderTableHeader_unstable","state","slots","slotProps","value","root"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableHeader/renderTableHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { TableHeaderContextProvider } from '../../contexts/tableHeaderContext';\nimport type { TableHeaderState, TableHeaderSlots } from './TableHeader.types';\n\n/**\n * Render the final JSX of TableHeader\n */\nexport const renderTableHeader_unstable = (state: TableHeaderState) => {\n const { slots, slotProps } = getSlots<TableHeaderSlots>(state);\n\n return (\n <TableHeaderContextProvider value=\"\">\n <slots.root {...slotProps.root} />\n </TableHeaderContextProvider>\n );\n};\n"]}
@@ -1,5 +1,4 @@
1
1
  import { getNativeElementProps } from '@fluentui/react-utilities';
2
- import { useArrowNavigationGroup } from '@fluentui/react-tabster';
3
2
  import { useTableContext } from '../../contexts/tableContext';
4
3
  /**
5
4
  * Create the state required to render TableHeader.
@@ -10,18 +9,11 @@ import { useTableContext } from '../../contexts/tableContext';
10
9
  * @param props - props from this instance of TableHeader
11
10
  * @param ref - reference to root HTMLElement of TableHeader
12
11
  */
13
-
14
12
  export const useTableHeader_unstable = (props, ref) => {
15
13
  var _a;
16
-
17
14
  const {
18
- noNativeElements,
19
- sortable
15
+ noNativeElements
20
16
  } = useTableContext();
21
- const keyboardNavAttr = useArrowNavigationGroup({
22
- axis: 'horizontal',
23
- circular: true
24
- });
25
17
  const rootComponent = ((_a = props.as) !== null && _a !== void 0 ? _a : noNativeElements) ? 'div' : 'thead';
26
18
  return {
27
19
  components: {
@@ -30,9 +22,9 @@ export const useTableHeader_unstable = (props, ref) => {
30
22
  root: getNativeElementProps(rootComponent, {
31
23
  ref,
32
24
  role: rootComponent === 'div' ? 'rowgroup' : undefined,
33
- ...(sortable && keyboardNavAttr),
34
25
  ...props
35
- })
26
+ }),
27
+ noNativeElements
36
28
  };
37
29
  };
38
30
  //# sourceMappingURL=useTableHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableHeader/useTableHeader.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AACA,SAAS,uBAAT,QAAwC,yBAAxC;AAEA,SAAS,eAAT,QAAgC,6BAAhC;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,uBAAuB,GAAG,CAAC,KAAD,EAA0B,GAA1B,KAA2E;;;EAChH,MAAM;IAAE,gBAAF;IAAoB;EAApB,IAAiC,eAAe,EAAtD;EACA,MAAM,eAAe,GAAG,uBAAuB,CAAC;IAAE,IAAI,EAAE,YAAR;IAAsB,QAAQ,EAAE;EAAhC,CAAD,CAA/C;EAEA,MAAM,aAAa,GAAG,CAAA,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,gBAAZ,IAA+B,KAA/B,GAAuC,OAA7D;EACA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,qBAAqB,CAAC,aAAD,EAAgB;MACzC,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,UAA1B,GAAuC,SAFJ;MAGzC,IAAI,QAAQ,IAAI,eAAhB,CAHyC;MAIzC,GAAG;IAJsC,CAAhB;EAJtB,CAAP;AAWD,CAhBM","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 };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AACA,SAASA,qBAAqB,QAAQ,2BAA2B;AAEjE,SAASC,eAAe,QAAQ,6BAA6B;AAE7D;;;;;;;;;AASA,OAAO,MAAMC,uBAAuB,GAAG,CAACC,KAAuB,EAAEC,GAA2B,KAAsB;;EAChH,MAAM;IAAEC;EAAgB,CAAE,GAAGJ,eAAe,EAAE;EAE9C,MAAMK,aAAa,GAAG,YAAK,CAACC,EAAE,mCAAIF,gBAAgB,IAAG,KAAK,GAAG,OAAO;EACpE,OAAO;IACLG,UAAU,EAAE;MACVC,IAAI,EAAEH;KACP;IACDG,IAAI,EAAET,qBAAqB,CAACM,aAAa,EAAE;MACzCF,GAAG;MACHM,IAAI,EAAEJ,aAAa,KAAK,KAAK,GAAG,UAAU,GAAGK,SAAS;MACtD,GAAGR;KACJ,CAAC;IACFE;GACD;AACH,CAAC","names":["getNativeElementProps","useTableContext","useTableHeader_unstable","props","ref","noNativeElements","rootComponent","as","components","root","role","undefined"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableHeader/useTableHeader.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { TableHeaderProps, TableHeaderState } from './TableHeader.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableHeader.\n *\n * The returned state can be modified with hooks such as useTableHeaderStyles_unstable,\n * before being passed to renderTableHeader_unstable.\n *\n * @param props - props from this instance of TableHeader\n * @param ref - reference to root HTMLElement of TableHeader\n */\nexport const useTableHeader_unstable = (props: TableHeaderProps, ref: React.Ref<HTMLElement>): TableHeaderState => {\n const { noNativeElements } = useTableContext();\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'thead';\n return {\n components: {\n root: rootComponent,\n },\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'rowgroup' : undefined,\n ...props,\n }),\n noNativeElements,\n };\n};\n"]}
@@ -3,22 +3,29 @@ export const tableHeaderClassName = 'fui-TableHeader';
3
3
  export const tableHeaderClassNames = {
4
4
  root: 'fui-TableHeader'
5
5
  };
6
-
7
- const useStyles = /*#__PURE__*/__styles({
8
- "root": {
9
- "mc9l5x": "f1tp1avn"
6
+ const useFlexLayoutStyles = /*#__PURE__*/__styles({
7
+ root: {
8
+ mc9l5x: "ftgm304"
10
9
  }
11
10
  }, {
12
- "d": [".f1tp1avn{display:table-row-group;}"]
11
+ d: [".ftgm304{display:block;}"]
12
+ });
13
+ const useTableLayoutStyles = /*#__PURE__*/__styles({
14
+ root: {
15
+ mc9l5x: "f1tp1avn"
16
+ }
17
+ }, {
18
+ d: [".f1tp1avn{display:table-row-group;}"]
13
19
  });
14
20
  /**
15
21
  * Apply styling to the TableHeader slots based on the state
16
22
  */
17
-
18
-
19
23
  export const useTableHeaderStyles_unstable = state => {
20
- const styles = useStyles();
21
- state.root.className = mergeClasses(tableHeaderClassName, styles.root, state.root.className);
24
+ const layoutStyles = {
25
+ table: useTableLayoutStyles(),
26
+ flex: useFlexLayoutStyles()
27
+ };
28
+ state.root.className = mergeClasses(tableHeaderClassName, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.root.className);
22
29
  return state;
23
30
  };
24
31
  //# sourceMappingURL=useTableHeaderStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableHeader/useTableHeaderStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,gBAAzC;AAIA,OAAO,MAAM,oBAAoB,GAAG,iBAA7B;AACP,OAAO,MAAM,qBAAqB,GAAqC;EACrE,IAAI,EAAE;AAD+D,CAAhE;;AAIP,MAAM,SAAS,gBAAG;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AAMA;;AAEG;;;AACH,OAAO,MAAM,6BAA6B,GAAI,KAAD,IAA8C;EACzF,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,oBAAD,EAAuB,MAAM,CAAC,IAA9B,EAAoC,KAAK,CAAC,IAAN,CAAW,SAA/C,CAAnC;EAEA,OAAO,KAAP;AACD,CALM","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 useStyles = 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 styles = useStyles();\n state.root.className = mergeClasses(tableHeaderClassName, styles.root, state.root.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,SAASA,YAAY,kBAAoB,gBAAgB;AAIzD,OAAO,MAAMC,oBAAoB,GAAG,iBAAiB;AACrD,OAAO,MAAMC,qBAAqB,GAAqC;EACrEC,IAAI,EAAE;CACP;AAED,MAAMC,mBAAmB,gBAAG;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAI1B;AAEF,MAAMC,oBAAoB,gBAAG;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAI3B;AAEF;;;AAGA,OAAO,MAAMC,6BAA6B,GAAIC,KAAuB,IAAsB;EACzF,MAAMC,YAAY,GAAG;IACnBC,KAAK,EAAEJ,oBAAoB,EAAE;IAC7BK,IAAI,EAAEN,mBAAmB;GAC1B;EACDG,KAAK,CAACJ,IAAI,CAACQ,SAAS,GAAGX,YAAY,CACjCC,oBAAoB,EACpBM,KAAK,CAACK,gBAAgB,GAAGJ,YAAY,CAACE,IAAI,CAACP,IAAI,GAAGK,YAAY,CAACC,KAAK,CAACN,IAAI,EACzEI,KAAK,CAACJ,IAAI,CAACQ,SAAS,CACrB;EAED,OAAOJ,KAAK;AACd,CAAC","names":["mergeClasses","tableHeaderClassName","tableHeaderClassNames","root","useFlexLayoutStyles","useTableLayoutStyles","useTableHeaderStyles_unstable","state","layoutStyles","table","flex","className","noNativeElements"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableHeader/useTableHeaderStyles.ts"],"sourcesContent":["import { mergeClasses, makeStyles } from '@griffel/react';\nimport type { TableHeaderSlots, TableHeaderState } from './TableHeader.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableHeaderClassName = 'fui-TableHeader';\nexport const tableHeaderClassNames: SlotClassNames<TableHeaderSlots> = {\n root: 'fui-TableHeader',\n};\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'block',\n },\n});\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-row-group',\n },\n});\n\n/**\n * Apply styling to the TableHeader slots based on the state\n */\nexport const useTableHeaderStyles_unstable = (state: TableHeaderState): TableHeaderState => {\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableHeaderClassName,\n state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,\n state.root.className,\n );\n\n return state;\n};\n"]}
@@ -3,9 +3,8 @@ import { useTableHeaderCell_unstable } from './useTableHeaderCell';
3
3
  import { renderTableHeaderCell_unstable } from './renderTableHeaderCell';
4
4
  import { useTableHeaderCellStyles_unstable } from './useTableHeaderCellStyles';
5
5
  /**
6
- * TableHeaderCell component - TODO: add more docs
6
+ * TableHeaderCell component
7
7
  */
8
-
9
8
  export const TableHeaderCell = /*#__PURE__*/React.forwardRef((props, ref) => {
10
9
  const state = useTableHeaderCell_unstable(props, ref);
11
10
  useTableHeaderCellStyles_unstable(state);