@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
@@ -8,10 +8,8 @@ import { getNativeElementProps } from '@fluentui/react-utilities';
8
8
  * @param props - props from this instance of Table
9
9
  * @param ref - reference to root HTMLElement of Table
10
10
  */
11
-
12
11
  export const useTable_unstable = (props, ref) => {
13
12
  var _a, _b, _c, _d;
14
-
15
13
  const rootComponent = ((_a = props.as) !== null && _a !== void 0 ? _a : props.noNativeElements) ? 'div' : 'table';
16
14
  return {
17
15
  components: {
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Table/useTable.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,iBAAiB,GAAG,CAAC,KAAD,EAAoB,GAApB,KAA+D;;;EAC9F,MAAM,aAAa,GAAG,CAAA,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,KAAK,CAAC,gBAAlB,IAAqC,KAArC,GAA6C,OAAnE;EAEA,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,OAA1B,GAAoC,SAFD;MAGzC,GAAG;IAHsC,CAAhB,CAJtB;IASL,IAAI,EAAE,CAAA,EAAA,GAAA,KAAK,CAAC,IAAN,MAAU,IAAV,IAAU,EAAA,KAAA,KAAA,CAAV,GAAU,EAAV,GAAc,QATf;IAUL,gBAAgB,EAAE,CAAA,EAAA,GAAA,KAAK,CAAC,gBAAN,MAAsB,IAAtB,IAAsB,EAAA,KAAA,KAAA,CAAtB,GAAsB,EAAtB,GAA0B,KAVvC;IAWL,QAAQ,EAAE,CAAA,EAAA,GAAA,KAAK,CAAC,QAAN,MAAc,IAAd,IAAc,EAAA,KAAA,KAAA,CAAd,GAAc,EAAd,GAAkB;EAXvB,CAAP;AAaD,CAhBM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { TableProps, TableState } from './Table.types';\n\n/**\n * Create the state required to render Table.\n *\n * The returned state can be modified with hooks such as useTableStyles_unstable,\n * before being passed to renderTable_unstable.\n *\n * @param props - props from this instance of Table\n * @param ref - reference to root HTMLElement of Table\n */\nexport const useTable_unstable = (props: TableProps, ref: React.Ref<HTMLElement>): TableState => {\n const rootComponent = props.as ?? props.noNativeElements ? 'div' : 'table';\n\n return {\n components: {\n root: rootComponent,\n },\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'table' : undefined,\n ...props,\n }),\n size: props.size ?? 'medium',\n noNativeElements: props.noNativeElements ?? false,\n sortable: props.sortable ?? false,\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AACA,SAASA,qBAAqB,QAAQ,2BAA2B;AAGjE;;;;;;;;;AASA,OAAO,MAAMC,iBAAiB,GAAG,CAACC,KAAiB,EAAEC,GAA2B,KAAgB;;EAC9F,MAAMC,aAAa,GAAG,YAAK,CAACC,EAAE,mCAAIH,KAAK,CAACI,gBAAgB,IAAG,KAAK,GAAG,OAAO;EAE1E,OAAO;IACLC,UAAU,EAAE;MACVC,IAAI,EAAEJ;KACP;IACDI,IAAI,EAAER,qBAAqB,CAACI,aAAa,EAAE;MACzCD,GAAG;MACHM,IAAI,EAAEL,aAAa,KAAK,KAAK,GAAG,OAAO,GAAGM,SAAS;MACnD,GAAGR;KACJ,CAAC;IACFS,IAAI,EAAE,WAAK,CAACA,IAAI,mCAAI,QAAQ;IAC5BL,gBAAgB,EAAE,WAAK,CAACA,gBAAgB,mCAAI,KAAK;IACjDM,QAAQ,EAAE,WAAK,CAACA,QAAQ,mCAAI;GAC7B;AACH,CAAC","names":["getNativeElementProps","useTable_unstable","props","ref","rootComponent","as","noNativeElements","components","root","role","undefined","size","sortable"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/Table/useTable.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { TableProps, TableState } from './Table.types';\n\n/**\n * Create the state required to render Table.\n *\n * The returned state can be modified with hooks such as useTableStyles_unstable,\n * before being passed to renderTable_unstable.\n *\n * @param props - props from this instance of Table\n * @param ref - reference to root HTMLElement of Table\n */\nexport const useTable_unstable = (props: TableProps, ref: React.Ref<HTMLElement>): TableState => {\n const rootComponent = props.as ?? props.noNativeElements ? 'div' : 'table';\n\n return {\n components: {\n root: rootComponent,\n },\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'table' : undefined,\n ...props,\n }),\n size: props.size ?? 'medium',\n noNativeElements: props.noNativeElements ?? false,\n sortable: props.sortable ?? false,\n };\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Table/useTableContextValues.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA,OAAM,SAAU,8BAAV,CAAyC,KAAzC,EAA0D;EAC9D,MAAM;IAAE,IAAF;IAAQ,gBAAR;IAA0B;EAA1B,IAAuC,KAA7C;EAEA,MAAM,YAAY,GAAG,KAAK,CAAC,OAAN,CACnB,OAAO;IACL,gBADK;IAEL,IAFK;IAGL;EAHK,CAAP,CADmB,EAMnB,CAAC,gBAAD,EAAmB,IAAnB,EAAyB,QAAzB,CANmB,CAArB;EASA,OAAO;IACL,KAAK,EAAE;EADF,CAAP;AAGD","sourcesContent":["import * as React from 'react';\nimport { TableContextValues, TableState } from './Table.types';\n\nexport function useTableContextValues_unstable(state: TableState): TableContextValues {\n const { size, noNativeElements, sortable } = state;\n\n const tableContext = React.useMemo(\n () => ({\n noNativeElements,\n size,\n sortable,\n }),\n [noNativeElements, size, sortable],\n );\n\n return {\n table: tableContext,\n };\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,OAAM,SAAUC,8BAA8B,CAACC,KAAiB;EAC9D,MAAM;IAAEC,IAAI;IAAEC,gBAAgB;IAAEC;EAAQ,CAAE,GAAGH,KAAK;EAElD,MAAMI,YAAY,GAAGN,KAAK,CAACO,OAAO,CAChC,OAAO;IACLH,gBAAgB;IAChBD,IAAI;IACJE;GACD,CAAC,EACF,CAACD,gBAAgB,EAAED,IAAI,EAAEE,QAAQ,CAAC,CACnC;EAED,OAAO;IACLG,KAAK,EAAEF;GACR;AACH","names":["React","useTableContextValues_unstable","state","size","noNativeElements","sortable","tableContext","useMemo","table"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/Table/useTableContextValues.ts"],"sourcesContent":["import * as React from 'react';\nimport { TableContextValues, TableState } from './Table.types';\n\nexport function useTableContextValues_unstable(state: TableState): TableContextValues {\n const { size, noNativeElements, sortable } = state;\n\n const tableContext = React.useMemo(\n () => ({\n noNativeElements,\n size,\n sortable,\n }),\n [noNativeElements, size, sortable],\n );\n\n return {\n table: tableContext,\n };\n}\n"]}
@@ -4,29 +4,44 @@ export const tableClassName = 'fui-Table';
4
4
  export const tableClassNames = {
5
5
  root: 'fui-Table'
6
6
  };
7
+ const useTableLayoutStyles = /*#__PURE__*/__styles({
8
+ root: {
9
+ mc9l5x: "f1w4nmp0",
10
+ ha4doy: "fmrv4ls",
11
+ a9b677: "fly5x3f",
12
+ B73mfa3: "f14m3nip"
13
+ }
14
+ }, {
15
+ d: [".f1w4nmp0{display:table;}", ".fmrv4ls{vertical-align:middle;}", ".fly5x3f{width:100%;}", ".f14m3nip{table-layout:fixed;}"]
16
+ });
17
+ const useFlexLayoutStyles = /*#__PURE__*/__styles({
18
+ root: {
19
+ mc9l5x: "ftgm304"
20
+ }
21
+ }, {
22
+ d: [".ftgm304{display:block;}"]
23
+ });
7
24
  /**
8
25
  * Styles for the root slot
9
26
  */
10
-
11
27
  const useStyles = /*#__PURE__*/__styles({
12
- "root": {
13
- "ha4doy": "fmrv4ls",
14
- "po53p8": "fgkb47j",
15
- "a9b677": "fly5x3f",
16
- "mc9l5x": "f1w4nmp0",
17
- "De3pzq": "fxugw4r"
28
+ root: {
29
+ po53p8: "fgkb47j",
30
+ De3pzq: "fhovq9v"
18
31
  }
19
32
  }, {
20
- "d": [".fmrv4ls{vertical-align:middle;}", ".fgkb47j{border-collapse:collapse;}", ".fly5x3f{width:100%;}", ".f1w4nmp0{display:table;}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}"]
33
+ d: [".fgkb47j{border-collapse:collapse;}", ".fhovq9v{background-color:var(--colorSubtleBackground);}"]
21
34
  });
22
35
  /**
23
36
  * Apply styling to the Table slots based on the state
24
37
  */
25
-
26
-
27
38
  export const useTableStyles_unstable = state => {
28
39
  const styles = useStyles();
29
- state.root.className = mergeClasses(tableClassName, styles.root, state.root.className);
40
+ const layoutStyles = {
41
+ table: useTableLayoutStyles(),
42
+ flex: useFlexLayoutStyles()
43
+ };
44
+ state.root.className = mergeClasses(tableClassName, styles.root, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.root.className);
30
45
  return state;
31
46
  };
32
47
  //# sourceMappingURL=useTableStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Table/useTableStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,QAAyC,gBAAzC;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAIA,OAAO,MAAM,cAAc,GAAG,WAAvB;AACP,OAAO,MAAM,eAAe,GAA+B;EACzD,IAAI,EAAE;AADmD,CAApD;AAIP;;AAEG;;AACH,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AAUA;;AAEG;;;AACH,OAAO,MAAM,uBAAuB,GAAI,KAAD,IAAkC;EACvE,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,cAAD,EAAiB,MAAM,CAAC,IAAxB,EAA8B,KAAK,CAAC,IAAN,CAAW,SAAzC,CAAnC;EAEA,OAAO,KAAP;AACD,CALM","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { TableSlots, TableState } from './Table.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableClassName = 'fui-Table';\nexport const tableClassNames: SlotClassNames<TableSlots> = {\n root: 'fui-Table',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n verticalAlign: 'middle',\n borderCollapse: 'collapse',\n width: '100%',\n display: 'table',\n backgroundColor: tokens.colorNeutralBackground1,\n },\n});\n\n/**\n * Apply styling to the Table slots based on the state\n */\nexport const useTableStyles_unstable = (state: TableState): TableState => {\n const styles = useStyles();\n state.root.className = mergeClasses(tableClassName, styles.root, state.root.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,mBAAqBA,YAAY,QAAQ,gBAAgB;AACzD,SAASC,MAAM,QAAQ,uBAAuB;AAI9C,OAAO,MAAMC,cAAc,GAAG,WAAW;AACzC,OAAO,MAAMC,eAAe,GAA+B;EACzDC,IAAI,EAAE;CACP;AAED,MAAMC,oBAAoB,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAO3B;AAEF,MAAMC,mBAAmB,gBAAG;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAI1B;AAEF;;;AAGA,MAAMC,SAAS,gBAAG;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAKhB;AAEF;;;AAGA,OAAO,MAAMC,uBAAuB,GAAIC,KAAiB,IAAgB;EACvE,MAAMC,MAAM,GAAGH,SAAS,EAAE;EAC1B,MAAMI,YAAY,GAAG;IACnBC,KAAK,EAAEP,oBAAoB,EAAE;IAC7BQ,IAAI,EAAEP,mBAAmB;GAC1B;EACDG,KAAK,CAACL,IAAI,CAACU,SAAS,GAAGd,YAAY,CACjCE,cAAc,EACdQ,MAAM,CAACN,IAAI,EACXK,KAAK,CAACM,gBAAgB,GAAGJ,YAAY,CAACE,IAAI,CAACT,IAAI,GAAGO,YAAY,CAACC,KAAK,CAACR,IAAI,EACzEK,KAAK,CAACL,IAAI,CAACU,SAAS,CACrB;EAED,OAAOL,KAAK;AACd,CAAC","names":["mergeClasses","tokens","tableClassName","tableClassNames","root","useTableLayoutStyles","useFlexLayoutStyles","useStyles","useTableStyles_unstable","state","styles","layoutStyles","table","flex","className","noNativeElements"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/Table/useTableStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { TableSlots, TableState } from './Table.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableClassName = 'fui-Table';\nexport const tableClassNames: SlotClassNames<TableSlots> = {\n root: 'fui-Table',\n};\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table',\n verticalAlign: 'middle',\n width: '100%',\n tableLayout: 'fixed',\n },\n});\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'block',\n },\n});\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n borderCollapse: 'collapse',\n backgroundColor: tokens.colorSubtleBackground,\n },\n});\n\n/**\n * Apply styling to the Table slots based on the state\n */\nexport const useTableStyles_unstable = (state: TableState): TableState => {\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableClassName,\n styles.root,\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 { useTableBody_unstable } from './useTableBody';
3
3
  import { renderTableBody_unstable } from './renderTableBody';
4
4
  import { useTableBodyStyles_unstable } from './useTableBodyStyles';
5
5
  /**
6
- * TableBody component - TODO: add more docs
6
+ * TableBody component
7
7
  */
8
-
9
8
  export const TableBody = /*#__PURE__*/React.forwardRef((props, ref) => {
10
9
  const state = useTableBody_unstable(props, ref);
11
10
  useTableBodyStyles_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableBody/TableBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AACA,SAAS,wBAAT,QAAyC,mBAAzC;AACA,SAAS,2BAAT,QAA4C,sBAA5C;AAIA;;AAEG;;AACH,OAAO,MAAM,SAAS,gBAAwC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC5F,MAAM,KAAK,GAAG,qBAAqB,CAAC,KAAD,EAAQ,GAAR,CAAnC;EAEA,2BAA2B,CAAC,KAAD,CAA3B;EACA,OAAO,wBAAwB,CAAC,KAAD,CAA/B;AACD,CAL6D,CAAvD;AAOP,SAAS,CAAC,WAAV,GAAwB,WAAxB","sourcesContent":["import * as React from 'react';\nimport { useTableBody_unstable } from './useTableBody';\nimport { renderTableBody_unstable } from './renderTableBody';\nimport { useTableBodyStyles_unstable } from './useTableBodyStyles';\nimport type { TableBodyProps } from './TableBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableBody component - TODO: add more docs\n */\nexport const TableBody: ForwardRefComponent<TableBodyProps> = React.forwardRef((props, ref) => {\n const state = useTableBody_unstable(props, ref);\n\n useTableBodyStyles_unstable(state);\n return renderTableBody_unstable(state);\n});\n\nTableBody.displayName = 'TableBody';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,qBAAqB,QAAQ,gBAAgB;AACtD,SAASC,wBAAwB,QAAQ,mBAAmB;AAC5D,SAASC,2BAA2B,QAAQ,sBAAsB;AAIlE;;;AAGA,OAAO,MAAMC,SAAS,gBAAwCJ,KAAK,CAACK,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC5F,MAAMC,KAAK,GAAGP,qBAAqB,CAACK,KAAK,EAAEC,GAAG,CAAC;EAE/CJ,2BAA2B,CAACK,KAAK,CAAC;EAClC,OAAON,wBAAwB,CAACM,KAAK,CAAC;AACxC,CAAC,CAAC;AAEFJ,SAAS,CAACK,WAAW,GAAG,WAAW","names":["React","useTableBody_unstable","renderTableBody_unstable","useTableBodyStyles_unstable","TableBody","forwardRef","props","ref","state","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableBody/TableBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTableBody_unstable } from './useTableBody';\nimport { renderTableBody_unstable } from './renderTableBody';\nimport { useTableBodyStyles_unstable } from './useTableBodyStyles';\nimport type { TableBodyProps } from './TableBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableBody component\n */\nexport const TableBody: ForwardRefComponent<TableBodyProps> = React.forwardRef((props, ref) => {\n const state = useTableBody_unstable(props, ref);\n\n useTableBodyStyles_unstable(state);\n return renderTableBody_unstable(state);\n});\n\nTableBody.displayName = 'TableBody';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TableBody.types.js","sourceRoot":"../src/","sources":["components/TableBody/TableBody.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TableBodySlots = {\n root: Slot<'tbody', 'div'>;\n};\n\n/**\n * TableBody Props\n */\nexport type TableBodyProps = ComponentProps<TableBodySlots>;\n\n/**\n * State used in rendering TableBody\n */\nexport type TableBodyState = ComponentState<TableBodySlots>;\n"]}
1
+ {"version":3,"file":"TableBody.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableBody/TableBody.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableBodySlots = {\n root: Slot<'tbody', 'div'>;\n};\n\n/**\n * TableBody Props\n */\nexport type TableBodyProps = ComponentProps<TableBodySlots>;\n\n/**\n * State used in rendering TableBody\n */\nexport type TableBodyState = ComponentState<TableBodySlots> & Pick<TableContextValue, 'noNativeElements'>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/TableBody/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC","sourcesContent":["export * from './TableBody';\nexport * from './TableBody.types';\nexport * from './renderTableBody';\nexport * from './useTableBody';\nexport * from './useTableBodyStyles';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableBody/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC","sourcesContent":["export * from './TableBody';\nexport * from './TableBody.types';\nexport * from './renderTableBody';\nexport * from './useTableBody';\nexport * from './useTableBodyStyles';\n"]}
@@ -3,14 +3,13 @@ import { getSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Render the final JSX of TableBody
5
5
  */
6
-
7
6
  export const renderTableBody_unstable = state => {
8
7
  const {
9
8
  slots,
10
9
  slotProps
11
- } = getSlots(state); // TODO Add additional slots in the appropriate place
12
-
13
- return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
10
+ } = getSlots(state);
11
+ return /*#__PURE__*/React.createElement(slots.root, {
12
+ ...slotProps.root
14
13
  });
15
14
  };
16
15
  //# sourceMappingURL=renderTableBody.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableBody/renderTableBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,wBAAwB,GAAI,KAAD,IAA0B;EAChE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAiB,KAAjB,CAArC,CADgE,CAGhE;;EACA,oBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CALM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableBodyState, TableBodySlots } from './TableBody.types';\n\n/**\n * Render the final JSX of TableBody\n */\nexport const renderTableBody_unstable = (state: TableBodyState) => {\n const { slots, slotProps } = getSlots<TableBodySlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;AAGA,OAAO,MAAMC,wBAAwB,GAAIC,KAAqB,IAAI;EAChE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAiBE,KAAK,CAAC;EAE5D,oBAAOH,oBAACI,KAAK,CAACE,IAAI;IAAA,GAAKD,SAAS,CAACC;EAAI,EAAI;AAC3C,CAAC","names":["React","getSlots","renderTableBody_unstable","state","slots","slotProps","root"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableBody/renderTableBody.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableBodyState, TableBodySlots } from './TableBody.types';\n\n/**\n * Render the final JSX of TableBody\n */\nexport const renderTableBody_unstable = (state: TableBodyState) => {\n const { slots, slotProps } = getSlots<TableBodySlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"]}
@@ -9,10 +9,8 @@ import { useTableContext } from '../../contexts/tableContext';
9
9
  * @param props - props from this instance of TableBody
10
10
  * @param ref - reference to root HTMLElement of TableBody
11
11
  */
12
-
13
12
  export const useTableBody_unstable = (props, ref) => {
14
13
  var _a;
15
-
16
14
  const {
17
15
  noNativeElements
18
16
  } = useTableContext();
@@ -25,7 +23,8 @@ export const useTableBody_unstable = (props, ref) => {
25
23
  ref,
26
24
  role: rootComponent === 'div' ? 'rowgroup' : undefined,
27
25
  ...props
28
- })
26
+ }),
27
+ noNativeElements
29
28
  };
30
29
  };
31
30
  //# sourceMappingURL=useTableBody.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableBody/useTableBody.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAEA,SAAS,eAAT,QAAgC,6BAAhC;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,qBAAqB,GAAG,CAAC,KAAD,EAAwB,GAAxB,KAAuE;;;EAC1G,MAAM;IAAE;EAAF,IAAuB,eAAe,EAA5C;EACA,MAAM,aAAa,GAAG,CAAA,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,gBAAZ,IAA+B,KAA/B,GAAuC,OAA7D;EAEA,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,GAAG;IAHsC,CAAhB;EAJtB,CAAP;AAUD,CAdM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { TableBodyProps, TableBodyState } from './TableBody.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableBody.\n *\n * The returned state can be modified with hooks such as useTableBodyStyles_unstable,\n * before being passed to renderTableBody_unstable.\n *\n * @param props - props from this instance of TableBody\n * @param ref - reference to root HTMLElement of TableBody\n */\nexport const useTableBody_unstable = (props: TableBodyProps, ref: React.Ref<HTMLElement>): TableBodyState => {\n const { noNativeElements } = useTableContext();\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'tbody';\n\n return {\n components: {\n root: rootComponent,\n },\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'rowgroup' : undefined,\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,qBAAqB,GAAG,CAACC,KAAqB,EAAEC,GAA2B,KAAoB;;EAC1G,MAAM;IAAEC;EAAgB,CAAE,GAAGJ,eAAe,EAAE;EAC9C,MAAMK,aAAa,GAAG,YAAK,CAACC,EAAE,mCAAIF,gBAAgB,IAAG,KAAK,GAAG,OAAO;EAEpE,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","useTableBody_unstable","props","ref","noNativeElements","rootComponent","as","components","root","role","undefined"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableBody/useTableBody.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { TableBodyProps, TableBodyState } from './TableBody.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableBody.\n *\n * The returned state can be modified with hooks such as useTableBodyStyles_unstable,\n * before being passed to renderTableBody_unstable.\n *\n * @param props - props from this instance of TableBody\n * @param ref - reference to root HTMLElement of TableBody\n */\nexport const useTableBody_unstable = (props: TableBodyProps, ref: React.Ref<HTMLElement>): TableBodyState => {\n const { noNativeElements } = useTableContext();\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'tbody';\n\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"]}
@@ -1,13 +1,18 @@
1
1
  import { mergeClasses, __styles } from '@griffel/react';
2
-
3
- const useStyles = /*#__PURE__*/__styles({
4
- "root": {
5
- "mc9l5x": "f1tp1avn"
2
+ const useTableLayoutStyles = /*#__PURE__*/__styles({
3
+ root: {
4
+ mc9l5x: "f1tp1avn"
6
5
  }
7
6
  }, {
8
- "d": [".f1tp1avn{display:table-row-group;}"]
7
+ d: [".f1tp1avn{display:table-row-group;}"]
8
+ });
9
+ const useFlexLayoutStyles = /*#__PURE__*/__styles({
10
+ root: {
11
+ mc9l5x: "ftgm304"
12
+ }
13
+ }, {
14
+ d: [".ftgm304{display:block;}"]
9
15
  });
10
-
11
16
  export const tableBodyClassName = 'fui-TableBody';
12
17
  export const tableBodyClassNames = {
13
18
  root: 'fui-TableBody'
@@ -15,10 +20,12 @@ export const tableBodyClassNames = {
15
20
  /**
16
21
  * Apply styling to the TableBody slots based on the state
17
22
  */
18
-
19
23
  export const useTableBodyStyles_unstable = state => {
20
- const styles = useStyles();
21
- state.root.className = mergeClasses(tableBodyClassName, styles.root, state.root.className);
24
+ const layoutStyles = {
25
+ table: useTableLayoutStyles(),
26
+ flex: useFlexLayoutStyles()
27
+ };
28
+ state.root.className = mergeClasses(tableBodyClassName, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.root.className);
22
29
  return state;
23
30
  };
24
31
  //# sourceMappingURL=useTableBodyStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableBody/useTableBodyStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,gBAAzC;;AAIA,MAAM,SAAS,gBAAG;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;;AAMA,OAAO,MAAM,kBAAkB,GAAG,eAA3B;AACP,OAAO,MAAM,mBAAmB,GAAmC;EACjE,IAAI,EAAE;AAD2D,CAA5D;AAIP;;AAEG;;AACH,OAAO,MAAM,2BAA2B,GAAI,KAAD,IAA0C;EACnF,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,kBAAD,EAAqB,MAAM,CAAC,IAA5B,EAAkC,KAAK,CAAC,IAAN,CAAW,SAA7C,CAAnC;EAEA,OAAO,KAAP;AACD,CALM","sourcesContent":["import { mergeClasses, makeStyles } from '@griffel/react';\nimport type { TableBodySlots, TableBodyState } from './TableBody.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nconst useStyles = makeStyles({\n root: {\n display: 'table-row-group',\n },\n});\n\nexport const tableBodyClassName = 'fui-TableBody';\nexport const tableBodyClassNames: SlotClassNames<TableBodySlots> = {\n root: 'fui-TableBody',\n};\n\n/**\n * Apply styling to the TableBody slots based on the state\n */\nexport const useTableBodyStyles_unstable = (state: TableBodyState): TableBodyState => {\n const styles = useStyles();\n state.root.className = mergeClasses(tableBodyClassName, styles.root, state.root.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,SAASA,YAAY,kBAAoB,gBAAgB;AAIzD,MAAMC,oBAAoB,gBAAG;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAI3B;AAEF,MAAMC,mBAAmB,gBAAG;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAI1B;AAEF,OAAO,MAAMC,kBAAkB,GAAG,eAAe;AACjD,OAAO,MAAMC,mBAAmB,GAAmC;EACjEC,IAAI,EAAE;CACP;AAED;;;AAGA,OAAO,MAAMC,2BAA2B,GAAIC,KAAqB,IAAoB;EACnF,MAAMC,YAAY,GAAG;IACnBC,KAAK,EAAER,oBAAoB,EAAE;IAC7BS,IAAI,EAAER,mBAAmB;GAC1B;EACDK,KAAK,CAACF,IAAI,CAACM,SAAS,GAAGX,YAAY,CACjCG,kBAAkB,EAClBI,KAAK,CAACK,gBAAgB,GAAGJ,YAAY,CAACE,IAAI,CAACL,IAAI,GAAGG,YAAY,CAACC,KAAK,CAACJ,IAAI,EACzEE,KAAK,CAACF,IAAI,CAACM,SAAS,CACrB;EAED,OAAOJ,KAAK;AACd,CAAC","names":["mergeClasses","useTableLayoutStyles","useFlexLayoutStyles","tableBodyClassName","tableBodyClassNames","root","useTableBodyStyles_unstable","state","layoutStyles","table","flex","className","noNativeElements"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableBody/useTableBodyStyles.ts"],"sourcesContent":["import { mergeClasses, makeStyles } from '@griffel/react';\nimport type { TableBodySlots, TableBodyState } from './TableBody.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-row-group',\n },\n});\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'block',\n },\n});\n\nexport const tableBodyClassName = 'fui-TableBody';\nexport const tableBodyClassNames: SlotClassNames<TableBodySlots> = {\n root: 'fui-TableBody',\n};\n\n/**\n * Apply styling to the TableBody slots based on the state\n */\nexport const useTableBodyStyles_unstable = (state: TableBodyState): TableBodyState => {\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableBodyClassName,\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 { useTableCell_unstable } from './useTableCell';
3
3
  import { renderTableCell_unstable } from './renderTableCell';
4
4
  import { useTableCellStyles_unstable } from './useTableCellStyles';
5
5
  /**
6
- * TableCell component - TODO: add more docs
6
+ * TableCell component
7
7
  */
8
-
9
8
  export const TableCell = /*#__PURE__*/React.forwardRef((props, ref) => {
10
9
  const state = useTableCell_unstable(props, ref);
11
10
  useTableCellStyles_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableCell/TableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AACA,SAAS,wBAAT,QAAyC,mBAAzC;AACA,SAAS,2BAAT,QAA4C,sBAA5C;AAIA;;AAEG;;AACH,OAAO,MAAM,SAAS,gBAAwC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC5F,MAAM,KAAK,GAAG,qBAAqB,CAAC,KAAD,EAAQ,GAAR,CAAnC;EAEA,2BAA2B,CAAC,KAAD,CAA3B;EACA,OAAO,wBAAwB,CAAC,KAAD,CAA/B;AACD,CAL6D,CAAvD;AAOP,SAAS,CAAC,WAAV,GAAwB,WAAxB","sourcesContent":["import * as React from 'react';\nimport { useTableCell_unstable } from './useTableCell';\nimport { renderTableCell_unstable } from './renderTableCell';\nimport { useTableCellStyles_unstable } from './useTableCellStyles';\nimport type { TableCellProps } from './TableCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableCell component - TODO: add more docs\n */\nexport const TableCell: ForwardRefComponent<TableCellProps> = React.forwardRef((props, ref) => {\n const state = useTableCell_unstable(props, ref);\n\n useTableCellStyles_unstable(state);\n return renderTableCell_unstable(state);\n});\n\nTableCell.displayName = 'TableCell';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,qBAAqB,QAAQ,gBAAgB;AACtD,SAASC,wBAAwB,QAAQ,mBAAmB;AAC5D,SAASC,2BAA2B,QAAQ,sBAAsB;AAIlE;;;AAGA,OAAO,MAAMC,SAAS,gBAAwCJ,KAAK,CAACK,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC5F,MAAMC,KAAK,GAAGP,qBAAqB,CAACK,KAAK,EAAEC,GAAG,CAAC;EAE/CJ,2BAA2B,CAACK,KAAK,CAAC;EAClC,OAAON,wBAAwB,CAACM,KAAK,CAAC;AACxC,CAAC,CAAC;AAEFJ,SAAS,CAACK,WAAW,GAAG,WAAW","names":["React","useTableCell_unstable","renderTableCell_unstable","useTableCellStyles_unstable","TableCell","forwardRef","props","ref","state","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCell/TableCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTableCell_unstable } from './useTableCell';\nimport { renderTableCell_unstable } from './renderTableCell';\nimport { useTableCellStyles_unstable } from './useTableCellStyles';\nimport type { TableCellProps } from './TableCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableCell component\n */\nexport const TableCell: ForwardRefComponent<TableCellProps> = React.forwardRef((props, ref) => {\n const state = useTableCell_unstable(props, ref);\n\n useTableCellStyles_unstable(state);\n return renderTableCell_unstable(state);\n});\n\nTableCell.displayName = 'TableCell';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TableCell.types.js","sourceRoot":"../src/","sources":["components/TableCell/TableCell.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TableCellSlots = {\n root: Slot<'td', 'div'>;\n};\n\n/**\n * TableCell Props\n */\nexport type TableCellProps = ComponentProps<TableCellSlots> & {};\n\n/**\n * State used in rendering TableCell\n */\nexport type TableCellState = ComponentState<TableCellSlots>;\n"]}
1
+ {"version":3,"file":"TableCell.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCell/TableCell.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableCellSlots = {\n root: Slot<'td', 'div'>;\n};\n\n/**\n * TableCell Props\n */\nexport type TableCellProps = ComponentProps<TableCellSlots> & {};\n\n/**\n * State used in rendering TableCell\n */\nexport type TableCellState = ComponentState<TableCellSlots> & Pick<TableContextValue, 'noNativeElements' | 'size'>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/TableCell/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC","sourcesContent":["export * from './TableCell';\nexport * from './TableCell.types';\nexport * from './renderTableCell';\nexport * from './useTableCell';\nexport * from './useTableCellStyles';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCell/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC","sourcesContent":["export * from './TableCell';\nexport * from './TableCell.types';\nexport * from './renderTableCell';\nexport * from './useTableCell';\nexport * from './useTableCellStyles';\n"]}
@@ -3,13 +3,13 @@ import { getSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Render the final JSX of TableCell
5
5
  */
6
-
7
6
  export const renderTableCell_unstable = state => {
8
7
  const {
9
8
  slots,
10
9
  slotProps
11
10
  } = getSlots(state);
12
- return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
11
+ return /*#__PURE__*/React.createElement(slots.root, {
12
+ ...slotProps.root
13
13
  });
14
14
  };
15
15
  //# sourceMappingURL=renderTableCell.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableCell/renderTableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,wBAAwB,GAAI,KAAD,IAA0B;EAChE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAiB,KAAjB,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 { TableCellState, TableCellSlots } from './TableCell.types';\n\n/**\n * Render the final JSX of TableCell\n */\nexport const renderTableCell_unstable = (state: TableCellState) => {\n const { slots, slotProps } = getSlots<TableCellSlots>(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;AAGpD;;;AAGA,OAAO,MAAMC,wBAAwB,GAAIC,KAAqB,IAAI;EAChE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAiBE,KAAK,CAAC;EAE5D,oBAAOH,oBAACI,KAAK,CAACE,IAAI;IAAA,GAAKD,SAAS,CAACC;EAAI,EAAI;AAC3C,CAAC","names":["React","getSlots","renderTableCell_unstable","state","slots","slotProps","root"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCell/renderTableCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableCellState, TableCellSlots } from './TableCell.types';\n\n/**\n * Render the final JSX of TableCell\n */\nexport const renderTableCell_unstable = (state: TableCellState) => {\n const { slots, slotProps } = getSlots<TableCellSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"]}
@@ -9,12 +9,11 @@ import { useTableContext } from '../../contexts/tableContext';
9
9
  * @param props - props from this instance of TableCell
10
10
  * @param ref - reference to root HTMLElement of TableCell
11
11
  */
12
-
13
12
  export const useTableCell_unstable = (props, ref) => {
14
13
  var _a;
15
-
16
14
  const {
17
- noNativeElements
15
+ noNativeElements,
16
+ size
18
17
  } = useTableContext();
19
18
  const rootComponent = ((_a = props.as) !== null && _a !== void 0 ? _a : noNativeElements) ? 'div' : 'td';
20
19
  return {
@@ -25,7 +24,9 @@ export const useTableCell_unstable = (props, ref) => {
25
24
  ref,
26
25
  role: rootComponent === 'div' ? 'cell' : undefined,
27
26
  ...props
28
- })
27
+ }),
28
+ noNativeElements,
29
+ size
29
30
  };
30
31
  };
31
32
  //# sourceMappingURL=useTableCell.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableCell/useTableCell.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAEA,SAAS,eAAT,QAAgC,6BAAhC;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,qBAAqB,GAAG,CAAC,KAAD,EAAwB,GAAxB,KAAuE;;;EAC1G,MAAM;IAAE;EAAF,IAAuB,eAAe,EAA5C;EAEA,MAAM,aAAa,GAAG,CAAA,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,gBAAZ,IAA+B,KAA/B,GAAuC,IAA7D;EAEA,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,MAA1B,GAAmC,SAFA;MAGzC,GAAG;IAHsC,CAAhB;EAJtB,CAAP;AAUD,CAfM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { TableCellProps, TableCellState } from './TableCell.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableCell.\n *\n * The returned state can be modified with hooks such as useTableCellStyles_unstable,\n * before being passed to renderTableCell_unstable.\n *\n * @param props - props from this instance of TableCell\n * @param ref - reference to root HTMLElement of TableCell\n */\nexport const useTableCell_unstable = (props: TableCellProps, ref: React.Ref<HTMLElement>): TableCellState => {\n const { noNativeElements } = useTableContext();\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'td';\n\n return {\n components: {\n root: rootComponent,\n },\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'cell' : undefined,\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,qBAAqB,GAAG,CAACC,KAAqB,EAAEC,GAA2B,KAAoB;;EAC1G,MAAM;IAAEC,gBAAgB;IAAEC;EAAI,CAAE,GAAGL,eAAe,EAAE;EAEpD,MAAMM,aAAa,GAAG,YAAK,CAACC,EAAE,mCAAIH,gBAAgB,IAAG,KAAK,GAAG,IAAI;EAEjE,OAAO;IACLI,UAAU,EAAE;MACVC,IAAI,EAAEH;KACP;IACDG,IAAI,EAAEV,qBAAqB,CAACO,aAAa,EAAE;MACzCH,GAAG;MACHO,IAAI,EAAEJ,aAAa,KAAK,KAAK,GAAG,MAAM,GAAGK,SAAS;MAClD,GAAGT;KACJ,CAAC;IACFE,gBAAgB;IAChBC;GACD;AACH,CAAC","names":["getNativeElementProps","useTableContext","useTableCell_unstable","props","ref","noNativeElements","size","rootComponent","as","components","root","role","undefined"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCell/useTableCell.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { TableCellProps, TableCellState } from './TableCell.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableCell.\n *\n * The returned state can be modified with hooks such as useTableCellStyles_unstable,\n * before being passed to renderTableCell_unstable.\n *\n * @param props - props from this instance of TableCell\n * @param ref - reference to root HTMLElement of TableCell\n */\nexport const useTableCell_unstable = (props: TableCellProps, ref: React.Ref<HTMLElement>): TableCellState => {\n const { noNativeElements, size } = useTableContext();\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'td';\n\n return {\n components: {\n root: rootComponent,\n },\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'cell' : undefined,\n ...props,\n }),\n noNativeElements,\n size,\n };\n};\n"]}
@@ -1,34 +1,79 @@
1
1
  import { __styles, mergeClasses, shorthands } from '@griffel/react';
2
2
  import { tokens } from '@fluentui/react-theme';
3
+ import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';
3
4
  export const tableCellClassName = 'fui-TableCell';
4
5
  export const tableCellClassNames = {
5
6
  root: tableCellClassName
6
7
  };
8
+ const useTableLayoutStyles = /*#__PURE__*/__styles({
9
+ root: {
10
+ mc9l5x: "f15pt5es",
11
+ ha4doy: "fmrv4ls"
12
+ },
13
+ medium: {
14
+ Bqenvij: "f1ft4266"
15
+ },
16
+ small: {
17
+ Bqenvij: "fbsu25e"
18
+ },
19
+ "extra-small": {
20
+ Bqenvij: "frvgh55"
21
+ }
22
+ }, {
23
+ d: [".f15pt5es{display:table-cell;}", ".fmrv4ls{vertical-align:middle;}", ".f1ft4266{height:44px;}", ".fbsu25e{height:34px;}", ".frvgh55{height:24px;}"]
24
+ });
25
+ const useFlexLayoutStyles = /*#__PURE__*/__styles({
26
+ root: {
27
+ mc9l5x: "f22iagw",
28
+ Bf4jedk: "f10tiqix",
29
+ Bt984gj: "f122n59",
30
+ Bh6795r: "fqerorx",
31
+ Bnnss6s: "f1neuvcm",
32
+ xawz: "fkjuxzh"
33
+ },
34
+ medium: {
35
+ sshi5w: "f5pgtk9"
36
+ },
37
+ small: {
38
+ sshi5w: "fcep9tg"
39
+ },
40
+ "extra-small": {
41
+ sshi5w: "f1pha7fy"
42
+ }
43
+ }, {
44
+ d: [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f10tiqix{min-width:0px;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f1neuvcm{-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;}", ".fkjuxzh{-webkit-flex-basis:0px;-ms-flex-preferred-size:0px;flex-basis:0px;}", ".f5pgtk9{min-height:44px;}", ".fcep9tg{min-height:34px;}", ".f1pha7fy{min-height:24px;}"]
45
+ });
7
46
  /**
8
47
  * Styles for the root slot
9
48
  */
10
-
11
49
  const useStyles = /*#__PURE__*/__styles({
12
- "root": {
13
- "qhf8xq": "f10pi13n",
14
- "ha4doy": "fmrv4ls",
15
- "mc9l5x": "f15pt5es",
16
- "z8tnut": "f1nbblvp",
17
- "z189sj": ["f1vdfbxk", "f1f5gg8d"],
18
- "Byoj8tv": "f1ov4xf1",
19
- "uwmqm3": ["f1f5gg8d", "f1vdfbxk"]
50
+ root: {
51
+ qhf8xq: "f10pi13n",
52
+ z8tnut: "f1nbblvp",
53
+ z189sj: ["f1vdfbxk", "f1f5gg8d"],
54
+ Byoj8tv: "f1ov4xf1",
55
+ uwmqm3: ["f1f5gg8d", "f1vdfbxk"],
56
+ Bn4voq9: "fz36nt7",
57
+ g9k6zt: "f9znhxp",
58
+ Bfpq7zp: "fqrak0z",
59
+ kdpuga: ["f1o2ludy", "f1kjnpwc"],
60
+ Bw81rd7: ["f1kjnpwc", "f1o2ludy"],
61
+ B6xbmo0: ["fxmnebo", "f1witrsb"],
62
+ dm238s: ["f1witrsb", "fxmnebo"]
20
63
  }
21
64
  }, {
22
- "d": [".f10pi13n{position:relative;}", ".fmrv4ls{vertical-align:middle;}", ".f15pt5es{display:table-cell;}", ".f1nbblvp{padding-top:0px;}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".f1ov4xf1{padding-bottom:0px;}"]
65
+ d: [".f10pi13n{position:relative;}", ".f1nbblvp{padding-top:0px;}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".f1ov4xf1{padding-bottom:0px;}", ".fz36nt7[data-fui-focus-visible]{outline-width:2px;}", ".f9znhxp[data-fui-focus-visible]{outline-style:solid;}", ".fqrak0z[data-fui-focus-visible]{outline-color:var(--colorStrokeFocus2);}", ".f1o2ludy[data-fui-focus-visible]{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f1kjnpwc[data-fui-focus-visible]{border-bottom-left-radius:var(--borderRadiusMedium);}", ".fxmnebo[data-fui-focus-visible]{border-top-right-radius:var(--borderRadiusMedium);}", ".f1witrsb[data-fui-focus-visible]{border-top-left-radius:var(--borderRadiusMedium);}"]
23
66
  });
24
67
  /**
25
68
  * Apply styling to the TableCell slots based on the state
26
69
  */
27
-
28
-
29
70
  export const useTableCellStyles_unstable = state => {
30
71
  const styles = useStyles();
31
- state.root.className = mergeClasses(tableCellClassNames.root, styles.root, state.root.className);
72
+ const layoutStyles = {
73
+ table: useTableLayoutStyles(),
74
+ flex: useFlexLayoutStyles()
75
+ };
76
+ state.root.className = mergeClasses(tableCellClassNames.root, styles.root, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.noNativeElements ? layoutStyles.flex[state.size] : layoutStyles.table[state.size], state.root.className);
32
77
  return state;
33
78
  };
34
79
  //# sourceMappingURL=useTableCellStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableCell/useTableCellStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,EAAmC,UAAnC,QAAqD,gBAArD;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAIA,OAAO,MAAM,kBAAkB,GAAG,eAA3B;AACP,OAAO,MAAM,mBAAmB,GAAmC;EACjE,IAAI,EAAE;AAD2D,CAA5D;AAIP;;AAEG;;AACH,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AASA;;AAEG;;;AACH,OAAO,MAAM,2BAA2B,GAAI,KAAD,IAA0C;EACnF,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,mBAAmB,CAAC,IAArB,EAA2B,MAAM,CAAC,IAAlC,EAAwC,KAAK,CAAC,IAAN,CAAW,SAAnD,CAAnC;EACA,OAAO,KAAP;AACD,CAJM","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { TableCellSlots, TableCellState } from './TableCell.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableCellClassName = 'fui-TableCell';\nexport const tableCellClassNames: SlotClassNames<TableCellSlots> = {\n root: tableCellClassName,\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n position: 'relative',\n verticalAlign: 'middle',\n display: 'table-cell',\n ...shorthands.padding('0px', tokens.spacingHorizontalS),\n },\n});\n\n/**\n * Apply styling to the TableCell slots based on the state\n */\nexport const useTableCellStyles_unstable = (state: TableCellState): TableCellState => {\n const styles = useStyles();\n state.root.className = mergeClasses(tableCellClassNames.root, styles.root, state.root.className);\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,mBAAqBA,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,+BAA+B,QAAQ,yBAAyB;AAIzE,OAAO,MAAMC,kBAAkB,GAAG,eAAe;AACjD,OAAO,MAAMC,mBAAmB,GAAmC;EACjEC,IAAI,EAAEF;CACP;AAED,MAAMG,oBAAoB,gBAAG;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAiB3B;AAEF,MAAMC,mBAAmB,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAmB1B;AAEF;;;AAGA,MAAMC,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAahB;AAEF;;;AAGA,OAAO,MAAMC,2BAA2B,GAAIC,KAAqB,IAAoB;EACnF,MAAMC,MAAM,GAAGH,SAAS,EAAE;EAC1B,MAAMI,YAAY,GAAG;IACnBC,KAAK,EAAEP,oBAAoB,EAAE;IAC7BQ,IAAI,EAAEP,mBAAmB;GAC1B;EACDG,KAAK,CAACL,IAAI,CAACU,SAAS,GAAGhB,YAAY,CACjCK,mBAAmB,CAACC,IAAI,EACxBM,MAAM,CAACN,IAAI,EACXK,KAAK,CAACM,gBAAgB,GAAGJ,YAAY,CAACE,IAAI,CAACT,IAAI,GAAGO,YAAY,CAACC,KAAK,CAACR,IAAI,EACzEK,KAAK,CAACM,gBAAgB,GAAGJ,YAAY,CAACE,IAAI,CAACJ,KAAK,CAACO,IAAI,CAAC,GAAGL,YAAY,CAACC,KAAK,CAACH,KAAK,CAACO,IAAI,CAAC,EACvFP,KAAK,CAACL,IAAI,CAACU,SAAS,CACrB;EACD,OAAOL,KAAK;AACd,CAAC","names":["mergeClasses","shorthands","tokens","createCustomFocusIndicatorStyle","tableCellClassName","tableCellClassNames","root","useTableLayoutStyles","useFlexLayoutStyles","useStyles","useTableCellStyles_unstable","state","styles","layoutStyles","table","flex","className","noNativeElements","size"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCell/useTableCellStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport type { TableCellSlots, TableCellState } from './TableCell.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableCellClassName = 'fui-TableCell';\nexport const tableCellClassNames: SlotClassNames<TableCellSlots> = {\n root: tableCellClassName,\n};\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-cell',\n verticalAlign: 'middle',\n },\n\n medium: {\n height: '44px',\n },\n\n small: {\n height: '34px',\n },\n\n 'extra-small': {\n height: '24px',\n },\n});\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'flex',\n minWidth: '0px',\n alignItems: 'center',\n ...shorthands.flex(1, 1, '0px'),\n },\n\n medium: {\n minHeight: '44px',\n },\n\n small: {\n minHeight: '34px',\n },\n\n 'extra-small': {\n minHeight: '24px',\n },\n});\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n position: 'relative',\n ...shorthands.padding('0px', tokens.spacingHorizontalS),\n\n ...createCustomFocusIndicatorStyle(\n {\n ...shorthands.outline('2px', 'solid', tokens.colorStrokeFocus2),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n },\n { selector: 'focus', enableOutline: true },\n ),\n },\n});\n\n/**\n * Apply styling to the TableCell slots based on the state\n */\nexport const useTableCellStyles_unstable = (state: TableCellState): TableCellState => {\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableCellClassNames.root,\n styles.root,\n state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,\n state.noNativeElements ? layoutStyles.flex[state.size] : layoutStyles.table[state.size],\n state.root.className,\n );\n return state;\n};\n"]}
@@ -3,9 +3,8 @@ import { useTableCellActions_unstable } from './useTableCellActions';
3
3
  import { renderTableCellActions_unstable } from './renderTableCellActions';
4
4
  import { useTableCellActionsStyles_unstable } from './useTableCellActionsStyles';
5
5
  /**
6
- * TableCellActions component - TODO: add more docs
6
+ * TableCellActions component
7
7
  */
8
-
9
8
  export const TableCellActions = /*#__PURE__*/React.forwardRef((props, ref) => {
10
9
  const state = useTableCellActions_unstable(props, ref);
11
10
  useTableCellActionsStyles_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableCellActions/TableCellActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,4BAAT,QAA6C,uBAA7C;AACA,SAAS,+BAAT,QAAgD,0BAAhD;AACA,SAAS,kCAAT,QAAmD,6BAAnD;AAIA;;AAEG;;AACH,OAAO,MAAM,gBAAgB,gBAA+C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC1G,MAAM,KAAK,GAAG,4BAA4B,CAAC,KAAD,EAAQ,GAAR,CAA1C;EAEA,kCAAkC,CAAC,KAAD,CAAlC;EACA,OAAO,+BAA+B,CAAC,KAAD,CAAtC;AACD,CAL2E,CAArE;AAOP,gBAAgB,CAAC,WAAjB,GAA+B,kBAA/B","sourcesContent":["import * as React from 'react';\nimport { useTableCellActions_unstable } from './useTableCellActions';\nimport { renderTableCellActions_unstable } from './renderTableCellActions';\nimport { useTableCellActionsStyles_unstable } from './useTableCellActionsStyles';\nimport type { TableCellActionsProps } from './TableCellActions.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableCellActions component - TODO: add more docs\n */\nexport const TableCellActions: ForwardRefComponent<TableCellActionsProps> = React.forwardRef((props, ref) => {\n const state = useTableCellActions_unstable(props, ref);\n\n useTableCellActionsStyles_unstable(state);\n return renderTableCellActions_unstable(state);\n});\n\nTableCellActions.displayName = 'TableCellActions';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,4BAA4B,QAAQ,uBAAuB;AACpE,SAASC,+BAA+B,QAAQ,0BAA0B;AAC1E,SAASC,kCAAkC,QAAQ,6BAA6B;AAIhF;;;AAGA,OAAO,MAAMC,gBAAgB,gBAA+CJ,KAAK,CAACK,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC1G,MAAMC,KAAK,GAAGP,4BAA4B,CAACK,KAAK,EAAEC,GAAG,CAAC;EAEtDJ,kCAAkC,CAACK,KAAK,CAAC;EACzC,OAAON,+BAA+B,CAACM,KAAK,CAAC;AAC/C,CAAC,CAAC;AAEFJ,gBAAgB,CAACK,WAAW,GAAG,kBAAkB","names":["React","useTableCellActions_unstable","renderTableCellActions_unstable","useTableCellActionsStyles_unstable","TableCellActions","forwardRef","props","ref","state","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCellActions/TableCellActions.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTableCellActions_unstable } from './useTableCellActions';\nimport { renderTableCellActions_unstable } from './renderTableCellActions';\nimport { useTableCellActionsStyles_unstable } from './useTableCellActionsStyles';\nimport type { TableCellActionsProps } from './TableCellActions.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableCellActions component\n */\nexport const TableCellActions: ForwardRefComponent<TableCellActionsProps> = React.forwardRef((props, ref) => {\n const state = useTableCellActions_unstable(props, ref);\n\n useTableCellActionsStyles_unstable(state);\n return renderTableCellActions_unstable(state);\n});\n\nTableCellActions.displayName = 'TableCellActions';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TableCellActions.types.js","sourceRoot":"../src/","sources":["components/TableCellActions/TableCellActions.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TableCellActionsSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * TableCellActions Props\n */\nexport type TableCellActionsProps = ComponentProps<TableCellActionsSlots> & {};\n\n/**\n * State used in rendering TableCellActions\n */\nexport type TableCellActionsState = ComponentState<TableCellActionsSlots>;\n"]}
1
+ {"version":3,"file":"TableCellActions.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCellActions/TableCellActions.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TableCellActionsSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * TableCellActions Props\n */\nexport type TableCellActionsProps = ComponentProps<TableCellActionsSlots> & {\n /**\n * When true, the actions are always visible regardless of row hover.\n * Can be useful keeping the actions visible when a popout surface is opened.\n */\n visible?: boolean;\n};\n\n/**\n * State used in rendering TableCellActions\n */\nexport type TableCellActionsState = ComponentState<TableCellActionsSlots> &\n Pick<Required<TableCellActionsProps>, 'visible'>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/TableCellActions/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC","sourcesContent":["export * from './TableCellActions';\nexport * from './TableCellActions.types';\nexport * from './renderTableCellActions';\nexport * from './useTableCellActions';\nexport * from './useTableCellActionsStyles';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCellActions/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC","sourcesContent":["export * from './TableCellActions';\nexport * from './TableCellActions.types';\nexport * from './renderTableCellActions';\nexport * from './useTableCellActions';\nexport * from './useTableCellActionsStyles';\n"]}
@@ -3,14 +3,13 @@ import { getSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Render the final JSX of TableCellActions
5
5
  */
6
-
7
6
  export const renderTableCellActions_unstable = state => {
8
7
  const {
9
8
  slots,
10
9
  slotProps
11
- } = getSlots(state); // TODO Add additional slots in the appropriate place
12
-
13
- return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
10
+ } = getSlots(state);
11
+ return /*#__PURE__*/React.createElement(slots.root, {
12
+ ...slotProps.root
14
13
  });
15
14
  };
16
15
  //# sourceMappingURL=renderTableCellActions.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableCellActions/renderTableCellActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,+BAA+B,GAAI,KAAD,IAAiC;EAC9E,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAwB,KAAxB,CAArC,CAD8E,CAG9E;;EACA,oBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CALM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableCellActionsState, TableCellActionsSlots } from './TableCellActions.types';\n\n/**\n * Render the final JSX of TableCellActions\n */\nexport const renderTableCellActions_unstable = (state: TableCellActionsState) => {\n const { slots, slotProps } = getSlots<TableCellActionsSlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;AAGA,OAAO,MAAMC,+BAA+B,GAAIC,KAA4B,IAAI;EAC9E,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAwBE,KAAK,CAAC;EAEnE,oBAAOH,oBAACI,KAAK,CAACE,IAAI;IAAA,GAAKD,SAAS,CAACC;EAAI,EAAI;AAC3C,CAAC","names":["React","getSlots","renderTableCellActions_unstable","state","slots","slotProps","root"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCellActions/renderTableCellActions.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableCellActionsState, TableCellActionsSlots } from './TableCellActions.types';\n\n/**\n * Render the final JSX of TableCellActions\n */\nexport const renderTableCellActions_unstable = (state: TableCellActionsState) => {\n const { slots, slotProps } = getSlots<TableCellActionsSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"]}
@@ -1,5 +1,4 @@
1
- import { getNativeElementProps, useMergedRefs } from '@fluentui/react-utilities';
2
- import { useFocusWithin } from '@fluentui/react-tabster';
1
+ import { getNativeElementProps } from '@fluentui/react-utilities';
3
2
  /**
4
3
  * Create the state required to render TableCellActions.
5
4
  *
@@ -9,16 +8,17 @@ import { useFocusWithin } from '@fluentui/react-tabster';
9
8
  * @param props - props from this instance of TableCellActions
10
9
  * @param ref - reference to root HTMLElement of TableCellActions
11
10
  */
12
-
13
11
  export const useTableCellActions_unstable = (props, ref) => {
12
+ var _a;
14
13
  return {
15
14
  components: {
16
15
  root: 'div'
17
16
  },
18
17
  root: getNativeElementProps('div', {
19
- ref: useMergedRefs(ref, useFocusWithin()),
18
+ ref,
20
19
  ...props
21
- })
20
+ }),
21
+ visible: (_a = props.visible) !== null && _a !== void 0 ? _a : false
22
22
  };
23
23
  };
24
24
  //# sourceMappingURL=useTableCellActions.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableCellActions/useTableCellActions.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,aAAhC,QAAqD,2BAArD;AACA,SAAS,cAAT,QAA+B,yBAA/B;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,4BAA4B,GAAG,CAC1C,KAD0C,EAE1C,GAF0C,KAGjB;EACzB,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;MACjC,GAAG,EAAE,aAAa,CAAC,GAAD,EAAM,cAAc,EAApB,CADe;MAEjC,GAAG;IAF8B,CAAR;EAJtB,CAAP;AASD,CAbM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useMergedRefs } from '@fluentui/react-utilities';\nimport { useFocusWithin } from '@fluentui/react-tabster';\nimport type { TableCellActionsProps, TableCellActionsState } from './TableCellActions.types';\n\n/**\n * Create the state required to render TableCellActions.\n *\n * The returned state can be modified with hooks such as useTableCellActionsStyles_unstable,\n * before being passed to renderTableCellActions_unstable.\n *\n * @param props - props from this instance of TableCellActions\n * @param ref - reference to root HTMLElement of TableCellActions\n */\nexport const useTableCellActions_unstable = (\n props: TableCellActionsProps,\n ref: React.Ref<HTMLElement>,\n): TableCellActionsState => {\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref: useMergedRefs(ref, useFocusWithin()),\n ...props,\n }),\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AACA,SAASA,qBAAqB,QAAQ,2BAA2B;AAGjE;;;;;;;;;AASA,OAAO,MAAMC,4BAA4B,GAAG,CAC1CC,KAA4B,EAC5BC,GAA2B,KACF;;EACzB,OAAO;IACLC,UAAU,EAAE;MACVC,IAAI,EAAE;KACP;IACDA,IAAI,EAAEL,qBAAqB,CAAC,KAAK,EAAE;MACjCG,GAAG;MACH,GAAGD;KACJ,CAAC;IACFI,OAAO,EAAE,WAAK,CAACA,OAAO,mCAAI;GAC3B;AACH,CAAC","names":["getNativeElementProps","useTableCellActions_unstable","props","ref","components","root","visible"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCellActions/useTableCellActions.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { TableCellActionsProps, TableCellActionsState } from './TableCellActions.types';\n\n/**\n * Create the state required to render TableCellActions.\n *\n * The returned state can be modified with hooks such as useTableCellActionsStyles_unstable,\n * before being passed to renderTableCellActions_unstable.\n *\n * @param props - props from this instance of TableCellActions\n * @param ref - reference to root HTMLElement of TableCellActions\n */\nexport const useTableCellActions_unstable = (\n props: TableCellActionsProps,\n ref: React.Ref<HTMLElement>,\n): TableCellActionsState => {\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n visible: props.visible ?? false,\n };\n};\n"]}