@fluentui/react-table 9.0.0-alpha.9 → 9.0.0-rc.2

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 (417) hide show
  1. package/CHANGELOG.json +798 -1
  2. package/CHANGELOG.md +207 -2
  3. package/dist/index.d.ts +239 -133
  4. package/lib/components/DataGrid/DataGrid.js +1 -2
  5. package/lib/components/DataGrid/DataGrid.js.map +1 -1
  6. package/lib/components/DataGrid/DataGrid.types.js.map +1 -1
  7. package/lib/components/DataGrid/renderDataGrid.js +5 -2
  8. package/lib/components/DataGrid/renderDataGrid.js.map +1 -1
  9. package/lib/components/DataGrid/useDataGrid.js +49 -3
  10. package/lib/components/DataGrid/useDataGrid.js.map +1 -1
  11. package/lib/components/DataGrid/useDataGridContextValues.js +11 -1
  12. package/lib/components/DataGrid/useDataGridContextValues.js.map +1 -1
  13. package/lib/components/DataGrid/useDataGridStyles.js +0 -1
  14. package/lib/components/DataGrid/useDataGridStyles.js.map +1 -1
  15. package/lib/components/DataGridBody/DataGridBody.js +1 -2
  16. package/lib/components/DataGridBody/DataGridBody.js.map +1 -1
  17. package/lib/components/DataGridBody/DataGridBody.types.js.map +1 -1
  18. package/lib/components/DataGridBody/renderDataGridBody.js +13 -3
  19. package/lib/components/DataGridBody/renderDataGridBody.js.map +1 -1
  20. package/lib/components/DataGridBody/useDataGridBody.js +16 -2
  21. package/lib/components/DataGridBody/useDataGridBody.js.map +1 -1
  22. package/lib/components/DataGridBody/useDataGridBodyStyles.js +0 -1
  23. package/lib/components/DataGridBody/useDataGridBodyStyles.js.map +1 -1
  24. package/lib/components/DataGridCell/DataGridCell.js +1 -2
  25. package/lib/components/DataGridCell/DataGridCell.js.map +1 -1
  26. package/lib/components/DataGridCell/renderDataGridCell.js +0 -1
  27. package/lib/components/DataGridCell/renderDataGridCell.js.map +1 -1
  28. package/lib/components/DataGridCell/useDataGridCell.js +7 -3
  29. package/lib/components/DataGridCell/useDataGridCell.js.map +1 -1
  30. package/lib/components/DataGridCell/useDataGridCellStyles.js +0 -1
  31. package/lib/components/DataGridCell/useDataGridCellStyles.js.map +1 -1
  32. package/lib/components/DataGridHeader/DataGridHeader.js +1 -2
  33. package/lib/components/DataGridHeader/DataGridHeader.js.map +1 -1
  34. package/lib/components/DataGridHeader/renderDataGridHeader.js +0 -1
  35. package/lib/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
  36. package/lib/components/DataGridHeader/useDataGridHeader.js +2 -2
  37. package/lib/components/DataGridHeader/useDataGridHeader.js.map +1 -1
  38. package/lib/components/DataGridHeader/useDataGridHeaderStyles.js +0 -1
  39. package/lib/components/DataGridHeader/useDataGridHeaderStyles.js.map +1 -1
  40. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js +1 -2
  41. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
  42. package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js +0 -1
  43. package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
  44. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js +23 -3
  45. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
  46. package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +0 -4
  47. package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -1
  48. package/lib/components/DataGridRow/DataGridRow.js +1 -2
  49. package/lib/components/DataGridRow/DataGridRow.js.map +1 -1
  50. package/lib/components/DataGridRow/DataGridRow.types.js.map +1 -1
  51. package/lib/components/DataGridRow/renderDataGridRow.js +15 -3
  52. package/lib/components/DataGridRow/renderDataGridRow.js.map +1 -1
  53. package/lib/components/DataGridRow/useDataGridRow.js +56 -3
  54. package/lib/components/DataGridRow/useDataGridRow.js.map +1 -1
  55. package/lib/components/DataGridRow/useDataGridRowStyles.js +5 -2
  56. package/lib/components/DataGridRow/useDataGridRowStyles.js.map +1 -1
  57. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js +1 -2
  58. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
  59. package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js +0 -1
  60. package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
  61. package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js +33 -3
  62. package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
  63. package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js +0 -4
  64. package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js.map +1 -1
  65. package/lib/components/Table/Table.js +1 -2
  66. package/lib/components/Table/Table.js.map +1 -1
  67. package/lib/components/Table/Table.types.js.map +1 -1
  68. package/lib/components/Table/renderTable.js +2 -2
  69. package/lib/components/Table/renderTable.js.map +1 -1
  70. package/lib/components/Table/useTable.js +0 -2
  71. package/lib/components/Table/useTable.js.map +1 -1
  72. package/lib/components/Table/useTableContextValues.js.map +1 -1
  73. package/lib/components/Table/useTableStyles.js +13 -19
  74. package/lib/components/Table/useTableStyles.js.map +1 -1
  75. package/lib/components/TableBody/TableBody.js +1 -2
  76. package/lib/components/TableBody/TableBody.js.map +1 -1
  77. package/lib/components/TableBody/renderTableBody.js +3 -4
  78. package/lib/components/TableBody/renderTableBody.js.map +1 -1
  79. package/lib/components/TableBody/useTableBody.js +0 -2
  80. package/lib/components/TableBody/useTableBody.js.map +1 -1
  81. package/lib/components/TableBody/useTableBodyStyles.js +6 -10
  82. package/lib/components/TableBody/useTableBodyStyles.js.map +1 -1
  83. package/lib/components/TableCell/TableCell.js +1 -2
  84. package/lib/components/TableCell/TableCell.js.map +1 -1
  85. package/lib/components/TableCell/TableCell.types.js.map +1 -1
  86. package/lib/components/TableCell/renderTableCell.js +2 -2
  87. package/lib/components/TableCell/renderTableCell.js.map +1 -1
  88. package/lib/components/TableCell/useTableCell.js +4 -4
  89. package/lib/components/TableCell/useTableCell.js.map +1 -1
  90. package/lib/components/TableCell/useTableCellStyles.js +47 -26
  91. package/lib/components/TableCell/useTableCellStyles.js.map +1 -1
  92. package/lib/components/TableCellActions/TableCellActions.js +1 -2
  93. package/lib/components/TableCellActions/TableCellActions.js.map +1 -1
  94. package/lib/components/TableCellActions/renderTableCellActions.js +3 -4
  95. package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -1
  96. package/lib/components/TableCellActions/useTableCellActions.js +2 -5
  97. package/lib/components/TableCellActions/useTableCellActions.js.map +1 -1
  98. package/lib/components/TableCellActions/useTableCellActionsStyles.js +11 -19
  99. package/lib/components/TableCellActions/useTableCellActionsStyles.js.map +1 -1
  100. package/lib/components/TableCellLayout/TableCellLayout.js +1 -2
  101. package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -1
  102. package/lib/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
  103. package/lib/components/TableCellLayout/renderTableCellLayout.js +10 -6
  104. package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  105. package/lib/components/TableCellLayout/useTableCellLayout.js +5 -5
  106. package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  107. package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
  108. package/lib/components/TableCellLayout/useTableCellLayoutStyles.js +41 -35
  109. package/lib/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
  110. package/lib/components/TableHeader/TableHeader.js +1 -2
  111. package/lib/components/TableHeader/TableHeader.js.map +1 -1
  112. package/lib/components/TableHeader/renderTableHeader.js +2 -2
  113. package/lib/components/TableHeader/renderTableHeader.js.map +1 -1
  114. package/lib/components/TableHeader/useTableHeader.js +1 -10
  115. package/lib/components/TableHeader/useTableHeader.js.map +1 -1
  116. package/lib/components/TableHeader/useTableHeaderStyles.js +6 -16
  117. package/lib/components/TableHeader/useTableHeaderStyles.js.map +1 -1
  118. package/lib/components/TableHeaderCell/TableHeaderCell.js +1 -2
  119. package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  120. package/lib/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
  121. package/lib/components/TableHeaderCell/renderTableHeaderCell.js +6 -4
  122. package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  123. package/lib/components/TableHeaderCell/useTableHeaderCell.js +11 -8
  124. package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  125. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js +69 -67
  126. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
  127. package/lib/components/TableRow/TableRow.js +1 -2
  128. package/lib/components/TableRow/TableRow.js.map +1 -1
  129. package/lib/components/TableRow/TableRow.types.js.map +1 -1
  130. package/lib/components/TableRow/renderTableRow.js +3 -4
  131. package/lib/components/TableRow/renderTableRow.js.map +1 -1
  132. package/lib/components/TableRow/useTableRow.js +7 -5
  133. package/lib/components/TableRow/useTableRow.js.map +1 -1
  134. package/lib/components/TableRow/useTableRowStyles.js +137 -162
  135. package/lib/components/TableRow/useTableRowStyles.js.map +1 -1
  136. package/lib/components/TableSelectionCell/TableSelectionCell.js +1 -2
  137. package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  138. package/lib/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
  139. package/lib/components/TableSelectionCell/renderTableSelectionCell.js +6 -4
  140. package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  141. package/lib/components/TableSelectionCell/useTableSelectionCell.js +9 -5
  142. package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  143. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js +43 -46
  144. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
  145. package/lib/contexts/columnIdContext.js +9 -0
  146. package/lib/contexts/columnIdContext.js.map +1 -0
  147. package/lib/contexts/dataGridContext.js +13 -0
  148. package/lib/contexts/dataGridContext.js.map +1 -0
  149. package/lib/contexts/rowIdContext.js +9 -0
  150. package/lib/contexts/rowIdContext.js.map +1 -0
  151. package/lib/contexts/tableContext.js +0 -1
  152. package/lib/contexts/tableContext.js.map +1 -1
  153. package/lib/contexts/tableHeaderContext.js.map +1 -1
  154. package/lib/hooks/createColumn.js +35 -0
  155. package/lib/hooks/createColumn.js.map +1 -0
  156. package/lib/hooks/index.js +4 -3
  157. package/lib/hooks/index.js.map +1 -1
  158. package/lib/hooks/selectionManager.js +16 -32
  159. package/lib/hooks/selectionManager.js.map +1 -1
  160. package/lib/hooks/types.js.map +1 -1
  161. package/lib/hooks/{useTable.js → useTableFeatures.js} +12 -9
  162. package/lib/hooks/useTableFeatures.js.map +1 -0
  163. package/lib/hooks/{useSelection.js → useTableSelection.js} +18 -18
  164. package/lib/hooks/useTableSelection.js.map +1 -0
  165. package/lib/hooks/{useSort.js → useTableSort.js} +12 -21
  166. package/lib/hooks/useTableSort.js.map +1 -0
  167. package/lib/index.js +2 -1
  168. package/lib/index.js.map +1 -1
  169. package/lib-commonjs/DataGrid.js +0 -2
  170. package/lib-commonjs/DataGrid.js.map +1 -1
  171. package/lib-commonjs/DataGridBody.js +0 -2
  172. package/lib-commonjs/DataGridBody.js.map +1 -1
  173. package/lib-commonjs/DataGridCell.js +0 -2
  174. package/lib-commonjs/DataGridCell.js.map +1 -1
  175. package/lib-commonjs/DataGridHeader.js +0 -2
  176. package/lib-commonjs/DataGridHeader.js.map +1 -1
  177. package/lib-commonjs/DataGridHeaderCell.js +0 -2
  178. package/lib-commonjs/DataGridHeaderCell.js.map +1 -1
  179. package/lib-commonjs/DataGridRow.js +0 -2
  180. package/lib-commonjs/DataGridRow.js.map +1 -1
  181. package/lib-commonjs/DataGridSelectionCell.js +0 -2
  182. package/lib-commonjs/DataGridSelectionCell.js.map +1 -1
  183. package/lib-commonjs/Table.js +0 -2
  184. package/lib-commonjs/Table.js.map +1 -1
  185. package/lib-commonjs/TableBody.js +0 -2
  186. package/lib-commonjs/TableBody.js.map +1 -1
  187. package/lib-commonjs/TableCell.js +0 -2
  188. package/lib-commonjs/TableCell.js.map +1 -1
  189. package/lib-commonjs/TableCellActions.js +0 -2
  190. package/lib-commonjs/TableCellActions.js.map +1 -1
  191. package/lib-commonjs/TableCellLayout.js +0 -2
  192. package/lib-commonjs/TableCellLayout.js.map +1 -1
  193. package/lib-commonjs/TableCellPrimaryLayout.js +0 -2
  194. package/lib-commonjs/TableCellPrimaryLayout.js.map +1 -1
  195. package/lib-commonjs/TableHeader.js +0 -2
  196. package/lib-commonjs/TableHeader.js.map +1 -1
  197. package/lib-commonjs/TableHeaderCell.js +0 -2
  198. package/lib-commonjs/TableHeaderCell.js.map +1 -1
  199. package/lib-commonjs/TableRow.js +0 -2
  200. package/lib-commonjs/TableRow.js.map +1 -1
  201. package/lib-commonjs/TableSelectionCell.js +0 -2
  202. package/lib-commonjs/TableSelectionCell.js.map +1 -1
  203. package/lib-commonjs/components/DataGrid/DataGrid.js +1 -8
  204. package/lib-commonjs/components/DataGrid/DataGrid.js.map +1 -1
  205. package/lib-commonjs/components/DataGrid/DataGrid.types.js.map +1 -1
  206. package/lib-commonjs/components/DataGrid/index.js +0 -6
  207. package/lib-commonjs/components/DataGrid/index.js.map +1 -1
  208. package/lib-commonjs/components/DataGrid/renderDataGrid.js +5 -5
  209. package/lib-commonjs/components/DataGrid/renderDataGrid.js.map +1 -1
  210. package/lib-commonjs/components/DataGrid/useDataGrid.js +49 -6
  211. package/lib-commonjs/components/DataGrid/useDataGrid.js.map +1 -1
  212. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js +11 -4
  213. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js.map +1 -1
  214. package/lib-commonjs/components/DataGrid/useDataGridStyles.js +0 -5
  215. package/lib-commonjs/components/DataGrid/useDataGridStyles.js.map +1 -1
  216. package/lib-commonjs/components/DataGridBody/DataGridBody.js +1 -7
  217. package/lib-commonjs/components/DataGridBody/DataGridBody.js.map +1 -1
  218. package/lib-commonjs/components/DataGridBody/DataGridBody.types.js.map +1 -1
  219. package/lib-commonjs/components/DataGridBody/index.js +0 -6
  220. package/lib-commonjs/components/DataGridBody/index.js.map +1 -1
  221. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js +13 -6
  222. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js.map +1 -1
  223. package/lib-commonjs/components/DataGridBody/useDataGridBody.js +16 -5
  224. package/lib-commonjs/components/DataGridBody/useDataGridBody.js.map +1 -1
  225. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.js +0 -5
  226. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.js.map +1 -1
  227. package/lib-commonjs/components/DataGridCell/DataGridCell.js +1 -7
  228. package/lib-commonjs/components/DataGridCell/DataGridCell.js.map +1 -1
  229. package/lib-commonjs/components/DataGridCell/DataGridCell.types.js.map +1 -1
  230. package/lib-commonjs/components/DataGridCell/index.js +0 -6
  231. package/lib-commonjs/components/DataGridCell/index.js.map +1 -1
  232. package/lib-commonjs/components/DataGridCell/renderDataGridCell.js +0 -4
  233. package/lib-commonjs/components/DataGridCell/renderDataGridCell.js.map +1 -1
  234. package/lib-commonjs/components/DataGridCell/useDataGridCell.js +7 -6
  235. package/lib-commonjs/components/DataGridCell/useDataGridCell.js.map +1 -1
  236. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.js +0 -5
  237. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.js.map +1 -1
  238. package/lib-commonjs/components/DataGridHeader/DataGridHeader.js +1 -7
  239. package/lib-commonjs/components/DataGridHeader/DataGridHeader.js.map +1 -1
  240. package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js.map +1 -1
  241. package/lib-commonjs/components/DataGridHeader/index.js +0 -6
  242. package/lib-commonjs/components/DataGridHeader/index.js.map +1 -1
  243. package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js +0 -4
  244. package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
  245. package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js +2 -5
  246. package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js.map +1 -1
  247. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.js +0 -5
  248. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.js.map +1 -1
  249. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js +1 -7
  250. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
  251. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -1
  252. package/lib-commonjs/components/DataGridHeaderCell/index.js +0 -6
  253. package/lib-commonjs/components/DataGridHeaderCell/index.js.map +1 -1
  254. package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js +0 -4
  255. package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
  256. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js +23 -6
  257. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
  258. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +0 -8
  259. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -1
  260. package/lib-commonjs/components/DataGridRow/DataGridRow.js +1 -7
  261. package/lib-commonjs/components/DataGridRow/DataGridRow.js.map +1 -1
  262. package/lib-commonjs/components/DataGridRow/DataGridRow.types.js.map +1 -1
  263. package/lib-commonjs/components/DataGridRow/index.js +0 -6
  264. package/lib-commonjs/components/DataGridRow/index.js.map +1 -1
  265. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js +15 -6
  266. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js.map +1 -1
  267. package/lib-commonjs/components/DataGridRow/useDataGridRow.js +56 -6
  268. package/lib-commonjs/components/DataGridRow/useDataGridRow.js.map +1 -1
  269. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.js +5 -6
  270. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.js.map +1 -1
  271. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js +1 -7
  272. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
  273. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -1
  274. package/lib-commonjs/components/DataGridSelectionCell/index.js +0 -6
  275. package/lib-commonjs/components/DataGridSelectionCell/index.js.map +1 -1
  276. package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js +0 -4
  277. package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
  278. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js +33 -6
  279. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
  280. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js +0 -8
  281. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js.map +1 -1
  282. package/lib-commonjs/components/Table/Table.js +1 -8
  283. package/lib-commonjs/components/Table/Table.js.map +1 -1
  284. package/lib-commonjs/components/Table/Table.types.js.map +1 -1
  285. package/lib-commonjs/components/Table/index.js +0 -6
  286. package/lib-commonjs/components/Table/index.js.map +1 -1
  287. package/lib-commonjs/components/Table/renderTable.js +2 -7
  288. package/lib-commonjs/components/Table/renderTable.js.map +1 -1
  289. package/lib-commonjs/components/Table/useTable.js +0 -5
  290. package/lib-commonjs/components/Table/useTable.js.map +1 -1
  291. package/lib-commonjs/components/Table/useTableContextValues.js +0 -3
  292. package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -1
  293. package/lib-commonjs/components/Table/useTableStyles.js +13 -23
  294. package/lib-commonjs/components/Table/useTableStyles.js.map +1 -1
  295. package/lib-commonjs/components/TableBody/TableBody.js +1 -7
  296. package/lib-commonjs/components/TableBody/TableBody.js.map +1 -1
  297. package/lib-commonjs/components/TableBody/TableBody.types.js.map +1 -1
  298. package/lib-commonjs/components/TableBody/index.js +0 -6
  299. package/lib-commonjs/components/TableBody/index.js.map +1 -1
  300. package/lib-commonjs/components/TableBody/renderTableBody.js +3 -8
  301. package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -1
  302. package/lib-commonjs/components/TableBody/useTableBody.js +0 -6
  303. package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
  304. package/lib-commonjs/components/TableBody/useTableBodyStyles.js +6 -12
  305. package/lib-commonjs/components/TableBody/useTableBodyStyles.js.map +1 -1
  306. package/lib-commonjs/components/TableCell/TableCell.js +1 -7
  307. package/lib-commonjs/components/TableCell/TableCell.js.map +1 -1
  308. package/lib-commonjs/components/TableCell/TableCell.types.js.map +1 -1
  309. package/lib-commonjs/components/TableCell/index.js +0 -6
  310. package/lib-commonjs/components/TableCell/index.js.map +1 -1
  311. package/lib-commonjs/components/TableCell/renderTableCell.js +2 -6
  312. package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -1
  313. package/lib-commonjs/components/TableCell/useTableCell.js +4 -8
  314. package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
  315. package/lib-commonjs/components/TableCell/useTableCellStyles.js +47 -30
  316. package/lib-commonjs/components/TableCell/useTableCellStyles.js.map +1 -1
  317. package/lib-commonjs/components/TableCellActions/TableCellActions.js +1 -7
  318. package/lib-commonjs/components/TableCellActions/TableCellActions.js.map +1 -1
  319. package/lib-commonjs/components/TableCellActions/TableCellActions.types.js.map +1 -1
  320. package/lib-commonjs/components/TableCellActions/index.js +0 -6
  321. package/lib-commonjs/components/TableCellActions/index.js.map +1 -1
  322. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js +3 -8
  323. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -1
  324. package/lib-commonjs/components/TableCellActions/useTableCellActions.js +1 -8
  325. package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -1
  326. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js +11 -23
  327. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js.map +1 -1
  328. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js +1 -8
  329. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js.map +1 -1
  330. package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
  331. package/lib-commonjs/components/TableCellLayout/index.js +0 -6
  332. package/lib-commonjs/components/TableCellLayout/index.js.map +1 -1
  333. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js +10 -11
  334. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  335. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +5 -9
  336. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  337. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js +0 -3
  338. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
  339. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js +41 -39
  340. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
  341. package/lib-commonjs/components/TableHeader/TableHeader.js +1 -7
  342. package/lib-commonjs/components/TableHeader/TableHeader.js.map +1 -1
  343. package/lib-commonjs/components/TableHeader/TableHeader.types.js.map +1 -1
  344. package/lib-commonjs/components/TableHeader/index.js +0 -6
  345. package/lib-commonjs/components/TableHeader/index.js.map +1 -1
  346. package/lib-commonjs/components/TableHeader/renderTableHeader.js +2 -7
  347. package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -1
  348. package/lib-commonjs/components/TableHeader/useTableHeader.js +1 -15
  349. package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
  350. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js +6 -19
  351. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js.map +1 -1
  352. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js +1 -7
  353. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  354. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
  355. package/lib-commonjs/components/TableHeaderCell/index.js +0 -6
  356. package/lib-commonjs/components/TableHeaderCell/index.js.map +1 -1
  357. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js +6 -8
  358. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  359. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +10 -14
  360. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  361. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js +69 -71
  362. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
  363. package/lib-commonjs/components/TableRow/TableRow.js +1 -7
  364. package/lib-commonjs/components/TableRow/TableRow.js.map +1 -1
  365. package/lib-commonjs/components/TableRow/TableRow.types.js.map +1 -1
  366. package/lib-commonjs/components/TableRow/index.js +0 -6
  367. package/lib-commonjs/components/TableRow/index.js.map +1 -1
  368. package/lib-commonjs/components/TableRow/renderTableRow.js +3 -8
  369. package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -1
  370. package/lib-commonjs/components/TableRow/useTableRow.js +7 -10
  371. package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
  372. package/lib-commonjs/components/TableRow/useTableRowStyles.js +137 -170
  373. package/lib-commonjs/components/TableRow/useTableRowStyles.js.map +1 -1
  374. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js +1 -7
  375. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  376. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
  377. package/lib-commonjs/components/TableSelectionCell/index.js +0 -6
  378. package/lib-commonjs/components/TableSelectionCell/index.js.map +1 -1
  379. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js +6 -8
  380. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  381. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js +8 -11
  382. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  383. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js +43 -50
  384. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
  385. package/lib-commonjs/contexts/columnIdContext.js +16 -0
  386. package/lib-commonjs/contexts/columnIdContext.js.map +1 -0
  387. package/lib-commonjs/contexts/dataGridContext.js +20 -0
  388. package/lib-commonjs/contexts/dataGridContext.js.map +1 -0
  389. package/lib-commonjs/contexts/rowIdContext.js +16 -0
  390. package/lib-commonjs/contexts/rowIdContext.js.map +1 -0
  391. package/lib-commonjs/contexts/tableContext.js +0 -5
  392. package/lib-commonjs/contexts/tableContext.js.map +1 -1
  393. package/lib-commonjs/contexts/tableHeaderContext.js +0 -4
  394. package/lib-commonjs/contexts/tableHeaderContext.js.map +1 -1
  395. package/lib-commonjs/hooks/createColumn.js +42 -0
  396. package/lib-commonjs/hooks/createColumn.js.map +1 -0
  397. package/lib-commonjs/hooks/index.js +4 -8
  398. package/lib-commonjs/hooks/index.js.map +1 -1
  399. package/lib-commonjs/hooks/selectionManager.js +16 -34
  400. package/lib-commonjs/hooks/selectionManager.js.map +1 -1
  401. package/lib-commonjs/hooks/types.js.map +1 -1
  402. package/lib-commonjs/hooks/useTableFeatures.js +42 -0
  403. package/lib-commonjs/hooks/useTableFeatures.js.map +1 -0
  404. package/lib-commonjs/hooks/{useSelection.js → useTableSelection.js} +21 -28
  405. package/lib-commonjs/hooks/useTableSelection.js.map +1 -0
  406. package/lib-commonjs/hooks/{useSort.js → useTableSort.js} +15 -29
  407. package/lib-commonjs/hooks/useTableSort.js.map +1 -0
  408. package/lib-commonjs/index.js +27 -44
  409. package/lib-commonjs/index.js.map +1 -1
  410. package/package.json +15 -11
  411. package/lib/hooks/useSelection.js.map +0 -1
  412. package/lib/hooks/useSort.js.map +0 -1
  413. package/lib/hooks/useTable.js.map +0 -1
  414. package/lib-commonjs/hooks/useSelection.js.map +0 -1
  415. package/lib-commonjs/hooks/useSort.js.map +0 -1
  416. package/lib-commonjs/hooks/useTable.js +0 -42
  417. package/lib-commonjs/hooks/useTable.js.map +0 -1
@@ -3,238 +3,213 @@ import { tokens } from '@fluentui/react-theme';
3
3
  import { tableCellActionsClassNames } from '../TableCellActions/useTableCellActionsStyles';
4
4
  import { tableSelectionCellClassNames } from '../TableSelectionCell/useTableSelectionCellStyles';
5
5
  import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';
6
- import { useIsInTableHeader } from '../../contexts/tableHeaderContext';
7
6
  export const tableRowClassName = 'fui-TableRow';
8
7
  export const tableRowClassNames = {
9
8
  root: tableRowClassName
10
9
  };
11
-
12
10
  const useTableLayoutStyles = /*#__PURE__*/__styles({
13
- "root": {
14
- "mc9l5x": "f1u0rzck"
15
- },
16
- "medium": {
17
- "Bqenvij": "f1ft4266"
18
- },
19
- "small": {
20
- "Bqenvij": "fbsu25e"
21
- },
22
- "smaller": {
23
- "Bqenvij": "frvgh55"
11
+ root: {
12
+ mc9l5x: "f1u0rzck"
24
13
  }
25
14
  }, {
26
- "d": [".f1u0rzck{display:table-row;}", ".f1ft4266{height:44px;}", ".fbsu25e{height:34px;}", ".frvgh55{height:24px;}"]
15
+ d: [".f1u0rzck{display:table-row;}"]
27
16
  });
28
-
29
17
  const useFlexLayoutStyles = /*#__PURE__*/__styles({
30
- "root": {
31
- "mc9l5x": "f22iagw",
32
- "Bt984gj": "f122n59"
33
- },
34
- "medium": {
35
- "sshi5w": "f5pgtk9"
36
- },
37
- "small": {
38
- "sshi5w": "fcep9tg"
39
- },
40
- "smaller": {
41
- "sshi5w": "f1pha7fy"
18
+ root: {
19
+ mc9l5x: "f22iagw",
20
+ Bt984gj: "f122n59"
42
21
  }
43
22
  }, {
44
- "d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f5pgtk9{min-height:44px;}", ".fcep9tg{min-height:34px;}", ".f1pha7fy{min-height:24px;}"]
23
+ d: [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}"]
45
24
  });
46
25
  /**
47
26
  * Styles for the root slot
48
27
  */
49
-
50
-
51
28
  const useStyles = /*#__PURE__*/__styles({
52
- "root": {
53
- "sj55zd": "f19n0e5",
54
- "B7ck84d": "f1ewtqcl",
55
- "Befpiv7": "fblfkud",
56
- "Bn4voq9": "fz36nt7",
57
- "g9k6zt": "f9znhxp",
58
- "kdpuga": ["f1o2ludy", "f1kjnpwc"],
59
- "Bw81rd7": ["f1kjnpwc", "f1o2ludy"],
60
- "B6xbmo0": ["fxmnebo", "f1witrsb"],
61
- "dm238s": ["f1witrsb", "fxmnebo"]
29
+ root: {
30
+ sj55zd: "f19n0e5",
31
+ B7ck84d: "f1ewtqcl",
32
+ Bconypa: "f1jazu75",
33
+ B6guboy: "f1xeqee6",
34
+ Bn4voq9: "fz36nt7",
35
+ g9k6zt: "f9znhxp",
36
+ Bfpq7zp: "fqrak0z",
37
+ kdpuga: ["f1o2ludy", "f1kjnpwc"],
38
+ Bw81rd7: ["f1kjnpwc", "f1o2ludy"],
39
+ B6xbmo0: ["fxmnebo", "f1witrsb"],
40
+ dm238s: ["f1witrsb", "fxmnebo"]
41
+ },
42
+ noAppearanceFocusWithin: {
43
+ Bm5rygw: "f13cic75"
62
44
  },
63
- "rootInteractive": {
64
- "ecr2s2": "f1wfn5kd",
65
- "lj723h": "f1g4hkjv",
66
- "Bw1l9kw": "flaujjr",
67
- "B43xm9u": "f15ngxrw",
68
- "Bs8fhbl": "fd28r7f",
69
- "i921ia": "fjbbrdp",
70
- "Jwef8y": "f1t94bn6",
71
- "Bi91k9c": "feu1g3u",
72
- "Bi7d7a3": "f1boln4s",
73
- "Bpt6rm4": "f1uorfem",
74
- "Bt8cqyk": "frasl6z",
75
- "ff6mpl": "fw60kww"
45
+ rootInteractive: {
46
+ ecr2s2: "f1wfn5kd",
47
+ lj723h: "f1g4hkjv",
48
+ B43xm9u: "f15ngxrw",
49
+ i921ia: "fjbbrdp",
50
+ Jwef8y: "f1t94bn6",
51
+ Bi91k9c: "feu1g3u",
52
+ Bpt6rm4: "f1uorfem",
53
+ ff6mpl: "fw60kww"
76
54
  },
77
- "medium": {
78
- "Bn0qgzm": "f1vxd6vx",
79
- "oivjwe": "fg706s2",
80
- "B9xav0g": "frpde29"
55
+ medium: {
56
+ Bn0qgzm: "f1vxd6vx",
57
+ oivjwe: "fg706s2",
58
+ B9xav0g: "frpde29"
81
59
  },
82
- "small": {
83
- "Bn0qgzm": "f1vxd6vx",
84
- "oivjwe": "fg706s2",
85
- "B9xav0g": "frpde29"
60
+ small: {
61
+ Bn0qgzm: "f1vxd6vx",
62
+ oivjwe: "fg706s2",
63
+ B9xav0g: "frpde29"
86
64
  },
87
- "smaller": {
88
- "Be2twd7": "fy9rknc"
65
+ "extra-small": {
66
+ Be2twd7: "fy9rknc"
89
67
  },
90
- "brand": {
91
- "De3pzq": "f16xkysk",
92
- "sj55zd": "f1cgsbmv",
93
- "g2u3we": "frmsihh",
94
- "h3c5rm": ["frttxa5", "f11o2r7f"],
95
- "B9xav0g": "fem5et0",
96
- "zhjwy3": ["f11o2r7f", "frttxa5"],
97
- "Jwef8y": "f121v1wq",
98
- "ecr2s2": "ftepret",
99
- "gwxt9v": "fqlf3fd",
100
- "v3aym": ["f9dpb3h", "fw2muls"],
101
- "Bc736ss": "f1yat0gj",
102
- "Bk6ri7n": ["fw2muls", "f9dpb3h"],
103
- "Bk5ld8o": "f7nae3y",
104
- "c4eypz": ["fkbere7", "fa97sf3"],
105
- "felo30": "fmtyzcc",
106
- "Eshu5l": ["fa97sf3", "fkbere7"],
107
- "Bjwas2f": "fb6zhgp",
108
- "Bn1d65q": ["fyowp6c", "fz08sq8"],
109
- "Bxeuatn": "f9dii88",
110
- "n51gp8": ["fz08sq8", "fyowp6c"],
111
- "Beo2b4z": ["f1afxoft", "flqq2yx"],
112
- "h6lo6r": ["flqq2yx", "f1afxoft"],
113
- "Btyw6ap": ["f1b5xrmd", "f1831rx6"],
114
- "w1pwid": ["f1831rx6", "f1b5xrmd"],
115
- "Brwvgy3": "fd94n53",
116
- "yadkgm": "f1e0wld5"
68
+ brand: {
69
+ De3pzq: "f16xkysk",
70
+ sj55zd: "f1cgsbmv",
71
+ g2u3we: "frmsihh",
72
+ h3c5rm: ["frttxa5", "f11o2r7f"],
73
+ B9xav0g: "fem5et0",
74
+ zhjwy3: ["f11o2r7f", "frttxa5"],
75
+ Jwef8y: "f121v1wq",
76
+ ecr2s2: "ftepret",
77
+ gwxt9v: "fqlf3fd",
78
+ v3aym: ["f9dpb3h", "fw2muls"],
79
+ Bc736ss: "f1yat0gj",
80
+ Bk6ri7n: ["fw2muls", "f9dpb3h"],
81
+ Bk5ld8o: "f7nae3y",
82
+ c4eypz: ["fkbere7", "fa97sf3"],
83
+ felo30: "fmtyzcc",
84
+ Eshu5l: ["fa97sf3", "fkbere7"],
85
+ Bjwas2f: "fb6zhgp",
86
+ Bn1d65q: ["fyowp6c", "fz08sq8"],
87
+ Bxeuatn: "f9dii88",
88
+ n51gp8: ["fz08sq8", "fyowp6c"],
89
+ Beo2b4z: ["f1afxoft", "flqq2yx"],
90
+ h6lo6r: ["flqq2yx", "f1afxoft"],
91
+ Btyw6ap: ["f1b5xrmd", "f1831rx6"],
92
+ w1pwid: ["f1831rx6", "f1b5xrmd"],
93
+ Brwvgy3: "fd94n53",
94
+ yadkgm: "f1e0wld5"
117
95
  },
118
- "neutral": {
119
- "gwxt9v": "fqlf3fd",
120
- "v3aym": ["f9dpb3h", "fw2muls"],
121
- "Bc736ss": "f1yat0gj",
122
- "Bk6ri7n": ["fw2muls", "f9dpb3h"],
123
- "Bk5ld8o": "f7nae3y",
124
- "c4eypz": ["fkbere7", "fa97sf3"],
125
- "felo30": "fmtyzcc",
126
- "Eshu5l": ["fa97sf3", "fkbere7"],
127
- "Bjwas2f": "fb6zhgp",
128
- "Bn1d65q": ["fyowp6c", "fz08sq8"],
129
- "Bxeuatn": "f9dii88",
130
- "n51gp8": ["fz08sq8", "fyowp6c"],
131
- "Beo2b4z": ["f1afxoft", "flqq2yx"],
132
- "h6lo6r": ["flqq2yx", "f1afxoft"],
133
- "Btyw6ap": ["f1b5xrmd", "f1831rx6"],
134
- "w1pwid": ["f1831rx6", "f1b5xrmd"],
135
- "Brwvgy3": "fd94n53",
136
- "yadkgm": "f1e0wld5",
137
- "De3pzq": "fq5gl1p",
138
- "sj55zd": "f1cgsbmv",
139
- "Jwef8y": "f1uqaxdt",
140
- "ecr2s2": "fa9o754",
141
- "g2u3we": "frmsihh",
142
- "h3c5rm": ["frttxa5", "f11o2r7f"],
143
- "B9xav0g": "fem5et0",
144
- "zhjwy3": ["f11o2r7f", "frttxa5"]
96
+ neutral: {
97
+ gwxt9v: "fqlf3fd",
98
+ v3aym: ["f9dpb3h", "fw2muls"],
99
+ Bc736ss: "f1yat0gj",
100
+ Bk6ri7n: ["fw2muls", "f9dpb3h"],
101
+ Bk5ld8o: "f7nae3y",
102
+ c4eypz: ["fkbere7", "fa97sf3"],
103
+ felo30: "fmtyzcc",
104
+ Eshu5l: ["fa97sf3", "fkbere7"],
105
+ Bjwas2f: "fb6zhgp",
106
+ Bn1d65q: ["fyowp6c", "fz08sq8"],
107
+ Bxeuatn: "f9dii88",
108
+ n51gp8: ["fz08sq8", "fyowp6c"],
109
+ Beo2b4z: ["f1afxoft", "flqq2yx"],
110
+ h6lo6r: ["flqq2yx", "f1afxoft"],
111
+ Btyw6ap: ["f1b5xrmd", "f1831rx6"],
112
+ w1pwid: ["f1831rx6", "f1b5xrmd"],
113
+ Brwvgy3: "fd94n53",
114
+ yadkgm: "f1e0wld5",
115
+ De3pzq: "fq5gl1p",
116
+ sj55zd: "f1cgsbmv",
117
+ Jwef8y: "f1uqaxdt",
118
+ ecr2s2: "fa9o754",
119
+ g2u3we: "frmsihh",
120
+ h3c5rm: ["frttxa5", "f11o2r7f"],
121
+ B9xav0g: "fem5et0",
122
+ zhjwy3: ["f11o2r7f", "frttxa5"]
145
123
  },
146
- "none": {}
124
+ none: {}
147
125
  }, {
148
- "d": [".f19n0e5{color:var(--colorNeutralForeground1);}", ".f1ewtqcl{box-sizing:border-box;}", ".fblfkud[data-fui-focus-visible]:focus-within .fui-TableSelectionCell{opacity:1;}", ".fz36nt7[data-fui-focus-visible]{outline-width:2px;}", ".f9znhxp[data-fui-focus-visible]{outline-style:solid;}", ".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);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".fg706s2{border-bottom-style:solid;}", ".frpde29{border-bottom-color:var(--colorNeutralStroke2);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".f16xkysk{background-color:var(--colorBrandBackground2);}", ".f1cgsbmv{color:var(--colorNeutralForeground1Hover);}", ".frmsihh{border-top-color:var(--colorNeutralStrokeOnBrand);}", ".frttxa5{border-right-color:var(--colorNeutralStrokeOnBrand);}", ".f11o2r7f{border-left-color:var(--colorNeutralStrokeOnBrand);}", ".fem5et0{border-bottom-color:var(--colorNeutralStrokeOnBrand);}", ".fq5gl1p{background-color:var(--colorSubtleBackgroundSelected);}"],
149
- "a": [".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}", ".f1g4hkjv:active{color:var(--colorNeutralForeground1Pressed);}", ".flaujjr:active .fui-TableCellActions{background-color:var(--colorSubtleBackgroundPressed);}", ".f15ngxrw:active .fui-TableCellActions{opacity:1;}", ".fd28r7f:active .fui-TableSelectionCell{background-color:var(--colorNeutralBackground1Hover);}", ".fjbbrdp:active .fui-TableSelectionCell{opacity:1;}", ".ftepret:active{background-color:var(--colorBrandBackgroundInvertedSelected);}", ".fa9o754:active{background-color:var(--colorSubtleBackgroundSelected);}"],
150
- "h": [".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}", ".feu1g3u:hover{color:var(--colorNeutralForeground1Hover);}", ".f1boln4s:hover .fui-TableCellActions{background-color:var(--colorNeutralBackground1Hover);}", ".f1uorfem:hover .fui-TableCellActions{opacity:1;}", ".frasl6z:hover .fui-TableSelectionCell{background-color:var(--colorNeutralBackground1Hover);}", ".fw60kww:hover .fui-TableSelectionCell{opacity:1;}", ".f121v1wq:hover{background-color:var(--colorBrandBackground2);}", ".f1uqaxdt:hover{background-color:var(--colorSubtleBackgroundSelected);}"],
151
- "m": [["@media (forced-colors: active){.fqlf3fd{border-top-width:2px;}}", {
152
- "m": "(forced-colors: active)"
126
+ d: [".f19n0e5{color:var(--colorNeutralForeground1);}", ".f1ewtqcl{box-sizing:border-box;}", ".f1jazu75[data-fui-focus-within]:focus-within .fui-TableSelectionCell{opacity:1;}", ".f1xeqee6[data-fui-focus-within]:focus-within .fui-TableCellActions{opacity:1;}", ".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);}", ".f13cic75[data-fui-focus-within]:focus-within{background-color:var(--colorSubtleBackgroundHover);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".fg706s2{border-bottom-style:solid;}", ".frpde29{border-bottom-color:var(--colorNeutralStroke2);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".f16xkysk{background-color:var(--colorBrandBackground2);}", ".f1cgsbmv{color:var(--colorNeutralForeground1Hover);}", ".frmsihh{border-top-color:var(--colorNeutralStrokeOnBrand);}", ".frttxa5{border-right-color:var(--colorNeutralStrokeOnBrand);}", ".f11o2r7f{border-left-color:var(--colorNeutralStrokeOnBrand);}", ".fem5et0{border-bottom-color:var(--colorNeutralStrokeOnBrand);}", ".fq5gl1p{background-color:var(--colorSubtleBackgroundSelected);}"],
127
+ a: [".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}", ".f1g4hkjv:active{color:var(--colorNeutralForeground1Pressed);}", ".f15ngxrw:active .fui-TableCellActions{opacity:1;}", ".fjbbrdp:active .fui-TableSelectionCell{opacity:1;}", ".ftepret:active{background-color:var(--colorBrandBackgroundInvertedSelected);}", ".fa9o754:active{background-color:var(--colorSubtleBackgroundSelected);}"],
128
+ h: [".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}", ".feu1g3u:hover{color:var(--colorNeutralForeground1Hover);}", ".f1uorfem:hover .fui-TableCellActions{opacity:1;}", ".fw60kww:hover .fui-TableSelectionCell{opacity:1;}", ".f121v1wq:hover{background-color:var(--colorBrandBackground2);}", ".f1uqaxdt:hover{background-color:var(--colorSubtleBackgroundSelected);}"],
129
+ m: [["@media (forced-colors: active){.fqlf3fd{border-top-width:2px;}}", {
130
+ m: "(forced-colors: active)"
153
131
  }], ["@media (forced-colors: active){.f9dpb3h{border-right-width:2px;}.fw2muls{border-left-width:2px;}}", {
154
- "m": "(forced-colors: active)"
132
+ m: "(forced-colors: active)"
155
133
  }], ["@media (forced-colors: active){.f1yat0gj{border-bottom-width:2px;}}", {
156
- "m": "(forced-colors: active)"
134
+ m: "(forced-colors: active)"
157
135
  }], ["@media (forced-colors: active){.fw2muls{border-left-width:2px;}.f9dpb3h{border-right-width:2px;}}", {
158
- "m": "(forced-colors: active)"
136
+ m: "(forced-colors: active)"
159
137
  }], ["@media (forced-colors: active){.f7nae3y{border-top-style:solid;}}", {
160
- "m": "(forced-colors: active)"
138
+ m: "(forced-colors: active)"
161
139
  }], ["@media (forced-colors: active){.fkbere7{border-right-style:solid;}.fa97sf3{border-left-style:solid;}}", {
162
- "m": "(forced-colors: active)"
140
+ m: "(forced-colors: active)"
163
141
  }], ["@media (forced-colors: active){.fmtyzcc{border-bottom-style:solid;}}", {
164
- "m": "(forced-colors: active)"
142
+ m: "(forced-colors: active)"
165
143
  }], ["@media (forced-colors: active){.fa97sf3{border-left-style:solid;}.fkbere7{border-right-style:solid;}}", {
166
- "m": "(forced-colors: active)"
144
+ m: "(forced-colors: active)"
167
145
  }], ["@media (forced-colors: active){.fb6zhgp{border-top-color:transparent;}}", {
168
- "m": "(forced-colors: active)"
146
+ m: "(forced-colors: active)"
169
147
  }], ["@media (forced-colors: active){.fyowp6c{border-right-color:transparent;}.fz08sq8{border-left-color:transparent;}}", {
170
- "m": "(forced-colors: active)"
148
+ m: "(forced-colors: active)"
171
149
  }], ["@media (forced-colors: active){.f9dii88{border-bottom-color:transparent;}}", {
172
- "m": "(forced-colors: active)"
150
+ m: "(forced-colors: active)"
173
151
  }], ["@media (forced-colors: active){.fz08sq8{border-left-color:transparent;}.fyowp6c{border-right-color:transparent;}}", {
174
- "m": "(forced-colors: active)"
152
+ m: "(forced-colors: active)"
175
153
  }], ["@media (forced-colors: active){.f1afxoft{border-bottom-right-radius:var(--borderRadiusMedium);}.flqq2yx{border-bottom-left-radius:var(--borderRadiusMedium);}}", {
176
- "m": "(forced-colors: active)"
154
+ m: "(forced-colors: active)"
177
155
  }], ["@media (forced-colors: active){.flqq2yx{border-bottom-left-radius:var(--borderRadiusMedium);}.f1afxoft{border-bottom-right-radius:var(--borderRadiusMedium);}}", {
178
- "m": "(forced-colors: active)"
156
+ m: "(forced-colors: active)"
179
157
  }], ["@media (forced-colors: active){.f1b5xrmd{border-top-right-radius:var(--borderRadiusMedium);}.f1831rx6{border-top-left-radius:var(--borderRadiusMedium);}}", {
180
- "m": "(forced-colors: active)"
158
+ m: "(forced-colors: active)"
181
159
  }], ["@media (forced-colors: active){.f1831rx6{border-top-left-radius:var(--borderRadiusMedium);}.f1b5xrmd{border-top-right-radius:var(--borderRadiusMedium);}}", {
182
- "m": "(forced-colors: active)"
160
+ m: "(forced-colors: active)"
183
161
  }], ["@media (forced-colors: active){.fd94n53{box-sizing:border-box;}}", {
184
- "m": "(forced-colors: active)"
162
+ m: "(forced-colors: active)"
185
163
  }], ["@media (forced-colors: active){.f1e0wld5:focus-visible{outline-offset:-4px;}}", {
186
- "m": "(forced-colors: active)"
164
+ m: "(forced-colors: active)"
187
165
  }], ["@media (forced-colors: active){.fqlf3fd{border-top-width:2px;}}", {
188
- "m": "(forced-colors: active)"
166
+ m: "(forced-colors: active)"
189
167
  }], ["@media (forced-colors: active){.f9dpb3h{border-right-width:2px;}.fw2muls{border-left-width:2px;}}", {
190
- "m": "(forced-colors: active)"
168
+ m: "(forced-colors: active)"
191
169
  }], ["@media (forced-colors: active){.f1yat0gj{border-bottom-width:2px;}}", {
192
- "m": "(forced-colors: active)"
170
+ m: "(forced-colors: active)"
193
171
  }], ["@media (forced-colors: active){.fw2muls{border-left-width:2px;}.f9dpb3h{border-right-width:2px;}}", {
194
- "m": "(forced-colors: active)"
172
+ m: "(forced-colors: active)"
195
173
  }], ["@media (forced-colors: active){.f7nae3y{border-top-style:solid;}}", {
196
- "m": "(forced-colors: active)"
174
+ m: "(forced-colors: active)"
197
175
  }], ["@media (forced-colors: active){.fkbere7{border-right-style:solid;}.fa97sf3{border-left-style:solid;}}", {
198
- "m": "(forced-colors: active)"
176
+ m: "(forced-colors: active)"
199
177
  }], ["@media (forced-colors: active){.fmtyzcc{border-bottom-style:solid;}}", {
200
- "m": "(forced-colors: active)"
178
+ m: "(forced-colors: active)"
201
179
  }], ["@media (forced-colors: active){.fa97sf3{border-left-style:solid;}.fkbere7{border-right-style:solid;}}", {
202
- "m": "(forced-colors: active)"
180
+ m: "(forced-colors: active)"
203
181
  }], ["@media (forced-colors: active){.fb6zhgp{border-top-color:transparent;}}", {
204
- "m": "(forced-colors: active)"
182
+ m: "(forced-colors: active)"
205
183
  }], ["@media (forced-colors: active){.fyowp6c{border-right-color:transparent;}.fz08sq8{border-left-color:transparent;}}", {
206
- "m": "(forced-colors: active)"
184
+ m: "(forced-colors: active)"
207
185
  }], ["@media (forced-colors: active){.f9dii88{border-bottom-color:transparent;}}", {
208
- "m": "(forced-colors: active)"
186
+ m: "(forced-colors: active)"
209
187
  }], ["@media (forced-colors: active){.fz08sq8{border-left-color:transparent;}.fyowp6c{border-right-color:transparent;}}", {
210
- "m": "(forced-colors: active)"
188
+ m: "(forced-colors: active)"
211
189
  }], ["@media (forced-colors: active){.f1afxoft{border-bottom-right-radius:var(--borderRadiusMedium);}.flqq2yx{border-bottom-left-radius:var(--borderRadiusMedium);}}", {
212
- "m": "(forced-colors: active)"
190
+ m: "(forced-colors: active)"
213
191
  }], ["@media (forced-colors: active){.flqq2yx{border-bottom-left-radius:var(--borderRadiusMedium);}.f1afxoft{border-bottom-right-radius:var(--borderRadiusMedium);}}", {
214
- "m": "(forced-colors: active)"
192
+ m: "(forced-colors: active)"
215
193
  }], ["@media (forced-colors: active){.f1b5xrmd{border-top-right-radius:var(--borderRadiusMedium);}.f1831rx6{border-top-left-radius:var(--borderRadiusMedium);}}", {
216
- "m": "(forced-colors: active)"
194
+ m: "(forced-colors: active)"
217
195
  }], ["@media (forced-colors: active){.f1831rx6{border-top-left-radius:var(--borderRadiusMedium);}.f1b5xrmd{border-top-right-radius:var(--borderRadiusMedium);}}", {
218
- "m": "(forced-colors: active)"
196
+ m: "(forced-colors: active)"
219
197
  }], ["@media (forced-colors: active){.fd94n53{box-sizing:border-box;}}", {
220
- "m": "(forced-colors: active)"
198
+ m: "(forced-colors: active)"
221
199
  }], ["@media (forced-colors: active){.f1e0wld5:focus-visible{outline-offset:-4px;}}", {
222
- "m": "(forced-colors: active)"
200
+ m: "(forced-colors: active)"
223
201
  }]]
224
202
  });
225
203
  /**
226
204
  * Apply styling to the TableRow slots based on the state
227
205
  */
228
-
229
-
230
206
  export const useTableRowStyles_unstable = state => {
231
- const isHeaderRow = useIsInTableHeader();
232
207
  const styles = useStyles();
233
208
  const layoutStyles = {
234
209
  table: useTableLayoutStyles(),
235
210
  flex: useFlexLayoutStyles()
236
211
  };
237
- state.root.className = mergeClasses(tableRowClassNames.root, styles.root, !isHeaderRow && styles.rootInteractive, styles[state.size], state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.noNativeElements ? layoutStyles.flex[state.size] : layoutStyles.table[state.size], styles[state.appearance], state.root.className);
212
+ state.root.className = mergeClasses(tableRowClassNames.root, styles.root, !state.isHeaderRow && styles.rootInteractive, styles[state.size], state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, styles[state.appearance], state.appearance === 'none' && !state.isHeaderRow && styles.noAppearanceFocusWithin, state.root.className);
238
213
  return state;
239
214
  };
240
215
  //# sourceMappingURL=useTableRowStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/TableRow/useTableRowStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,EAAmC,UAAnC,QAAqD,gBAArD;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAGA,SAAS,0BAAT,QAA2C,+CAA3C;AACA,SAAS,4BAAT,QAA6C,mDAA7C;AACA,SAAS,+BAAT,QAAgD,yBAAhD;AACA,SAAS,kBAAT,QAAmC,mCAAnC;AAEA,OAAO,MAAM,iBAAiB,GAAG,cAA1B;AACP,OAAO,MAAM,kBAAkB,GAAkC;EAC/D,IAAI,EAAE;AADyD,CAA1D;;AAIP,MAAM,oBAAoB,gBAAG;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA7B;;AAkBA,MAAM,mBAAmB,gBAAG;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA5B;AAmBA;;AAEG;;;AACH,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;AAAA,EAAlB;AAwGA;;AAEG;;;AACH,OAAO,MAAM,0BAA0B,GAAI,KAAD,IAAwC;EAChF,MAAM,WAAW,GAAG,kBAAkB,EAAtC;EACA,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,MAAM,YAAY,GAAG;IACnB,KAAK,EAAE,oBAAoB,EADR;IAEnB,IAAI,EAAE,mBAAmB;EAFN,CAArB;EAIA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,kBAAkB,CAAC,IADc,EAEjC,MAAM,CAAC,IAF0B,EAGjC,CAAC,WAAD,IAAgB,MAAM,CAAC,eAHU,EAIjC,MAAM,CAAC,KAAK,CAAC,IAAP,CAJ2B,EAKjC,KAAK,CAAC,gBAAN,GAAyB,YAAY,CAAC,IAAb,CAAkB,IAA3C,GAAkD,YAAY,CAAC,KAAb,CAAmB,IALpC,EAMjC,KAAK,CAAC,gBAAN,GAAyB,YAAY,CAAC,IAAb,CAAkB,KAAK,CAAC,IAAxB,CAAzB,GAAyD,YAAY,CAAC,KAAb,CAAmB,KAAK,CAAC,IAAzB,CANxB,EAOjC,MAAM,CAAC,KAAK,CAAC,UAAP,CAP2B,EAQjC,KAAK,CAAC,IAAN,CAAW,SARsB,CAAnC;EAWA,OAAO,KAAP;AACD,CAnBM","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { TableRowSlots, TableRowState } from './TableRow.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tableCellActionsClassNames } from '../TableCellActions/useTableCellActionsStyles';\nimport { tableSelectionCellClassNames } from '../TableSelectionCell/useTableSelectionCellStyles';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { useIsInTableHeader } from '../../contexts/tableHeaderContext';\n\nexport const tableRowClassName = 'fui-TableRow';\nexport const tableRowClassNames: SlotClassNames<TableRowSlots> = {\n root: tableRowClassName,\n};\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-row',\n },\n\n medium: {\n height: '44px',\n },\n\n small: {\n height: '34px',\n },\n\n smaller: {\n height: '24px',\n },\n});\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n },\n\n medium: {\n minHeight: '44px',\n },\n\n small: {\n minHeight: '34px',\n },\n\n smaller: {\n minHeight: '24px',\n },\n});\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForeground1,\n boxSizing: 'border-box',\n ...createCustomFocusIndicatorStyle(\n {\n [`& .${tableSelectionCellClassNames.root}`]: {\n opacity: 1,\n },\n },\n { selector: 'focus-within' },\n ),\n ...createCustomFocusIndicatorStyle(\n {\n ...shorthands.outline('2px', 'solid'),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n },\n { selector: 'focus', enableOutline: true },\n ),\n },\n\n rootInteractive: {\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n color: tokens.colorNeutralForeground1Pressed,\n [`& .${tableCellActionsClassNames.root}`]: {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n opacity: 1,\n },\n [`& .${tableSelectionCellClassNames.root}`]: {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n opacity: 1,\n },\n },\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n color: tokens.colorNeutralForeground1Hover,\n [`& .${tableCellActionsClassNames.root}`]: {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n opacity: 1,\n },\n [`& .${tableSelectionCellClassNames.root}`]: {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n opacity: 1,\n },\n },\n },\n\n medium: {\n ...shorthands.borderBottom(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\n },\n\n small: {\n ...shorthands.borderBottom(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\n },\n\n smaller: {\n fontSize: tokens.fontSizeBase200,\n },\n\n brand: {\n backgroundColor: tokens.colorBrandBackground2,\n color: tokens.colorNeutralForeground1Hover,\n ...shorthands.borderColor(tokens.colorNeutralStrokeOnBrand),\n ':hover': {\n backgroundColor: tokens.colorBrandBackground2,\n },\n ':active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n },\n\n '@media(forced-colors: active)': {\n ...shorthands.border('2px', 'solid', 'transparent'),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n boxSizing: 'border-box',\n ':focus-visible': {\n outlineOffset: '-4px',\n },\n },\n },\n\n neutral: {\n '@media(forced-colors: active)': {\n ...shorthands.border('2px', 'solid', 'transparent'),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n boxSizing: 'border-box',\n ':focus-visible': {\n outlineOffset: '-4px',\n },\n },\n backgroundColor: tokens.colorSubtleBackgroundSelected,\n color: tokens.colorNeutralForeground1Hover,\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundSelected,\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundSelected,\n },\n ...shorthands.borderColor(tokens.colorNeutralStrokeOnBrand),\n },\n\n none: {},\n});\n\n/**\n * Apply styling to the TableRow slots based on the state\n */\nexport const useTableRowStyles_unstable = (state: TableRowState): TableRowState => {\n const isHeaderRow = useIsInTableHeader();\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableRowClassNames.root,\n styles.root,\n !isHeaderRow && styles.rootInteractive,\n styles[state.size],\n state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,\n state.noNativeElements ? layoutStyles.flex[state.size] : layoutStyles.table[state.size],\n styles[state.appearance],\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,mBAAqBA,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,QAAQ,uBAAuB;AAG9C,SAASC,0BAA0B,QAAQ,+CAA+C;AAC1F,SAASC,4BAA4B,QAAQ,mDAAmD;AAChG,SAASC,+BAA+B,QAAQ,yBAAyB;AAEzE,OAAO,MAAMC,iBAAiB,GAAG,cAAc;AAC/C,OAAO,MAAMC,kBAAkB,GAAkC;EAC/DC,IAAI,EAAEF;CACP;AAED,MAAMG,oBAAoB,gBAAG;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAI3B;AAEF,MAAMC,mBAAmB,gBAAG;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAK1B;AAEF;;;AAGA,MAAMC,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;IAAA;EAAA;AAAA,EAkHhB;AAEF;;;AAGA,OAAO,MAAMC,0BAA0B,GAAIC,KAAoB,IAAmB;EAChF,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,GAAGlB,YAAY,CACjCO,kBAAkB,CAACC,IAAI,EACvBM,MAAM,CAACN,IAAI,EACX,CAACK,KAAK,CAACM,WAAW,IAAIL,MAAM,CAACM,eAAe,EAC5CN,MAAM,CAACD,KAAK,CAACQ,IAAI,CAAC,EAClBR,KAAK,CAACS,gBAAgB,GAAGP,YAAY,CAACE,IAAI,CAACT,IAAI,GAAGO,YAAY,CAACC,KAAK,CAACR,IAAI,EACzEM,MAAM,CAACD,KAAK,CAACU,UAAU,CAAC,EACxBV,KAAK,CAACU,UAAU,KAAK,MAAM,IAAI,CAACV,KAAK,CAACM,WAAW,IAAIL,MAAM,CAACU,uBAAuB,EACnFX,KAAK,CAACL,IAAI,CAACU,SAAS,CACrB;EAED,OAAOL,KAAK;AACd,CAAC","names":["mergeClasses","shorthands","tokens","tableCellActionsClassNames","tableSelectionCellClassNames","createCustomFocusIndicatorStyle","tableRowClassName","tableRowClassNames","root","useTableLayoutStyles","useFlexLayoutStyles","useStyles","useTableRowStyles_unstable","state","styles","layoutStyles","table","flex","className","isHeaderRow","rootInteractive","size","noNativeElements","appearance","noAppearanceFocusWithin"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableRow/useTableRowStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { TableRowSlots, TableRowState } from './TableRow.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tableCellActionsClassNames } from '../TableCellActions/useTableCellActionsStyles';\nimport { tableSelectionCellClassNames } from '../TableSelectionCell/useTableSelectionCellStyles';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\n\nexport const tableRowClassName = 'fui-TableRow';\nexport const tableRowClassNames: SlotClassNames<TableRowSlots> = {\n root: tableRowClassName,\n};\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-row',\n },\n});\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n },\n});\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForeground1,\n boxSizing: 'border-box',\n ...createCustomFocusIndicatorStyle(\n {\n [`& .${tableSelectionCellClassNames.root}`]: {\n opacity: 1,\n },\n [`& .${tableCellActionsClassNames.root}`]: {\n opacity: 1,\n },\n },\n { selector: 'focus-within', enableOutline: true },\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 // When focus is within the row the background colour\n // should be the same as hover, except when there is a brand\n // or neutral appearance applied on the row\n noAppearanceFocusWithin: {\n ...createCustomFocusIndicatorStyle(\n {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n },\n { selector: 'focus-within', enableOutline: true },\n ),\n },\n\n rootInteractive: {\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n color: tokens.colorNeutralForeground1Pressed,\n [`& .${tableCellActionsClassNames.root}`]: {\n opacity: 1,\n },\n [`& .${tableSelectionCellClassNames.root}`]: {\n opacity: 1,\n },\n },\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n color: tokens.colorNeutralForeground1Hover,\n [`& .${tableCellActionsClassNames.root}`]: {\n opacity: 1,\n },\n [`& .${tableSelectionCellClassNames.root}`]: {\n opacity: 1,\n },\n },\n },\n\n medium: {\n ...shorthands.borderBottom(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\n },\n\n small: {\n ...shorthands.borderBottom(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\n },\n\n 'extra-small': {\n fontSize: tokens.fontSizeBase200,\n },\n\n brand: {\n backgroundColor: tokens.colorBrandBackground2,\n color: tokens.colorNeutralForeground1Hover,\n ...shorthands.borderColor(tokens.colorNeutralStrokeOnBrand),\n ':hover': {\n backgroundColor: tokens.colorBrandBackground2,\n },\n ':active': {\n backgroundColor: tokens.colorBrandBackgroundInvertedSelected,\n },\n\n '@media(forced-colors: active)': {\n ...shorthands.border('2px', 'solid', 'transparent'),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n boxSizing: 'border-box',\n ':focus-visible': {\n outlineOffset: '-4px',\n },\n },\n },\n\n neutral: {\n '@media(forced-colors: active)': {\n ...shorthands.border('2px', 'solid', 'transparent'),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n boxSizing: 'border-box',\n ':focus-visible': {\n outlineOffset: '-4px',\n },\n },\n backgroundColor: tokens.colorSubtleBackgroundSelected,\n color: tokens.colorNeutralForeground1Hover,\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundSelected,\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundSelected,\n },\n\n ...shorthands.borderColor(tokens.colorNeutralStrokeOnBrand),\n },\n\n none: {},\n});\n\n/**\n * Apply styling to the TableRow slots based on the state\n */\nexport const useTableRowStyles_unstable = (state: TableRowState): TableRowState => {\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableRowClassNames.root,\n styles.root,\n !state.isHeaderRow && styles.rootInteractive,\n styles[state.size],\n state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,\n styles[state.appearance],\n state.appearance === 'none' && !state.isHeaderRow && styles.noAppearanceFocusWithin,\n state.root.className,\n );\n\n return state;\n};\n"]}
@@ -3,9 +3,8 @@ import { useTableSelectionCell_unstable } from './useTableSelectionCell';
3
3
  import { renderTableSelectionCell_unstable } from './renderTableSelectionCell';
4
4
  import { useTableSelectionCellStyles_unstable } from './useTableSelectionCellStyles';
5
5
  /**
6
- * TableSelectionCell component - TODO: add more docs
6
+ * TableSelectionCell component
7
7
  */
8
-
9
8
  export const TableSelectionCell = /*#__PURE__*/React.forwardRef((props, ref) => {
10
9
  const state = useTableSelectionCell_unstable(props, ref);
11
10
  useTableSelectionCellStyles_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/TableSelectionCell/TableSelectionCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,8BAAT,QAA+C,yBAA/C;AACA,SAAS,iCAAT,QAAkD,4BAAlD;AACA,SAAS,oCAAT,QAAqD,+BAArD;AAIA;;AAEG;;AACH,OAAO,MAAM,kBAAkB,gBAAiD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC9G,MAAM,KAAK,GAAG,8BAA8B,CAAC,KAAD,EAAQ,GAAR,CAA5C;EAEA,oCAAoC,CAAC,KAAD,CAApC;EACA,OAAO,iCAAiC,CAAC,KAAD,CAAxC;AACD,CAL+E,CAAzE;AAOP,kBAAkB,CAAC,WAAnB,GAAiC,oBAAjC","sourcesContent":["import * as React from 'react';\nimport { useTableSelectionCell_unstable } from './useTableSelectionCell';\nimport { renderTableSelectionCell_unstable } from './renderTableSelectionCell';\nimport { useTableSelectionCellStyles_unstable } from './useTableSelectionCellStyles';\nimport type { TableSelectionCellProps } from './TableSelectionCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableSelectionCell component - TODO: add more docs\n */\nexport const TableSelectionCell: ForwardRefComponent<TableSelectionCellProps> = React.forwardRef((props, ref) => {\n const state = useTableSelectionCell_unstable(props, ref);\n\n useTableSelectionCellStyles_unstable(state);\n return renderTableSelectionCell_unstable(state);\n});\n\nTableSelectionCell.displayName = 'TableSelectionCell';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,8BAA8B,QAAQ,yBAAyB;AACxE,SAASC,iCAAiC,QAAQ,4BAA4B;AAC9E,SAASC,oCAAoC,QAAQ,+BAA+B;AAIpF;;;AAGA,OAAO,MAAMC,kBAAkB,gBAAiDJ,KAAK,CAACK,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC9G,MAAMC,KAAK,GAAGP,8BAA8B,CAACK,KAAK,EAAEC,GAAG,CAAC;EAExDJ,oCAAoC,CAACK,KAAK,CAAC;EAC3C,OAAON,iCAAiC,CAACM,KAAK,CAAC;AACjD,CAAC,CAAC;AAEFJ,kBAAkB,CAACK,WAAW,GAAG,oBAAoB","names":["React","useTableSelectionCell_unstable","renderTableSelectionCell_unstable","useTableSelectionCellStyles_unstable","TableSelectionCell","forwardRef","props","ref","state","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableSelectionCell/TableSelectionCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTableSelectionCell_unstable } from './useTableSelectionCell';\nimport { renderTableSelectionCell_unstable } from './renderTableSelectionCell';\nimport { useTableSelectionCellStyles_unstable } from './useTableSelectionCellStyles';\nimport type { TableSelectionCellProps } from './TableSelectionCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableSelectionCell component\n */\nexport const TableSelectionCell: ForwardRefComponent<TableSelectionCellProps> = React.forwardRef((props, ref) => {\n const state = useTableSelectionCell_unstable(props, ref);\n\n useTableSelectionCellStyles_unstable(state);\n return renderTableSelectionCell_unstable(state);\n});\n\nTableSelectionCell.displayName = 'TableSelectionCell';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TableSelectionCell.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableSelectionCell/TableSelectionCell.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { Checkbox, CheckboxProps } from '@fluentui/react-checkbox';\nimport type { Radio } from '@fluentui/react-radio';\nimport { TableCellSlots } from '../TableCell/TableCell.types';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableSelectionCellSlots = {\n /**\n * Selection indicator if selection type is checkbox\n */\n checkboxIndicator: Slot<typeof Checkbox>;\n /**\n * Selection indicator if selection type is radio\n */\n radioIndicator: Slot<typeof Radio>;\n} & Pick<TableCellSlots, 'root'>;\n\n/**\n * TableSelectionCell Props\n */\nexport type TableSelectionCellProps = ComponentProps<Partial<Omit<TableSelectionCellSlots, 'media'>>> & {\n /**\n * A table can have two kinds of selection modes\n */\n type?: 'checkbox' | 'radio';\n checked?: CheckboxProps['checked'];\n /**\n * Only visible when checked or the parent row is hovered\n */\n subtle?: boolean;\n\n /**\n * Completely hides the selection cell visually but takes up the same space\n */\n hidden?: boolean;\n};\n\n/**\n * State used in rendering TableSelectionCell\n */\nexport type TableSelectionCellState = ComponentState<TableSelectionCellSlots> &\n Pick<Required<TableSelectionCellProps>, 'type' | 'checked' | 'subtle' | 'hidden'> &\n Pick<TableContextValue, 'noNativeElements'>;\n"]}
1
+ {"version":3,"file":"TableSelectionCell.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableSelectionCell/TableSelectionCell.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { Checkbox, CheckboxProps } from '@fluentui/react-checkbox';\nimport type { Radio } from '@fluentui/react-radio';\nimport { TableCellSlots } from '../TableCell/TableCell.types';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableSelectionCellSlots = {\n /**\n * Selection indicator if selection type is checkbox\n */\n checkboxIndicator: Slot<typeof Checkbox>;\n /**\n * Selection indicator if selection type is radio\n */\n radioIndicator: Slot<typeof Radio>;\n} & Pick<TableCellSlots, 'root'>;\n\n/**\n * TableSelectionCell Props\n */\nexport type TableSelectionCellProps = ComponentProps<Partial<TableSelectionCellSlots>> & {\n /**\n * A table can have two kinds of selection modes.\n * @default checkbox\n */\n type?: 'checkbox' | 'radio';\n\n /**\n * @default false\n */\n checked?: CheckboxProps['checked'];\n\n /**\n * Only visible when checked or the parent row is hovered/focused\n * @default false\n */\n subtle?: boolean;\n\n /**\n * Completely hides the selection cell visually but takes up the same space\n * @default false\n */\n hidden?: boolean;\n};\n\n/**\n * State used in rendering TableSelectionCell\n */\nexport type TableSelectionCellState = ComponentState<TableSelectionCellSlots> &\n Pick<Required<TableSelectionCellProps>, 'type' | 'checked' | 'subtle' | 'hidden'> &\n Pick<TableContextValue, 'noNativeElements'>;\n"]}
@@ -3,15 +3,17 @@ import { getSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Render the final JSX of TableSelectionCell
5
5
  */
6
-
7
6
  export const renderTableSelectionCell_unstable = state => {
8
7
  const {
9
8
  slots,
10
9
  slotProps
11
10
  } = getSlots(state);
12
- return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
13
- }, state.type === 'checkbox' && slots.checkboxIndicator && /*#__PURE__*/React.createElement(slots.checkboxIndicator, { ...slotProps.checkboxIndicator
14
- }), state.type === 'radio' && slots.radioIndicator && /*#__PURE__*/React.createElement(slots.radioIndicator, { ...slotProps.radioIndicator
11
+ return /*#__PURE__*/React.createElement(slots.root, {
12
+ ...slotProps.root
13
+ }, state.type === 'checkbox' && slots.checkboxIndicator && /*#__PURE__*/React.createElement(slots.checkboxIndicator, {
14
+ ...slotProps.checkboxIndicator
15
+ }), state.type === 'radio' && slots.radioIndicator && /*#__PURE__*/React.createElement(slots.radioIndicator, {
16
+ ...slotProps.radioIndicator
15
17
  }));
16
18
  };
17
19
  //# sourceMappingURL=renderTableSelectionCell.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/TableSelectionCell/renderTableSelectionCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,iCAAiC,GAAI,KAAD,IAAmC;EAClF,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAA0B,KAA1B,CAArC;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EACG,KAAK,CAAC,IAAN,KAAe,UAAf,IAA6B,KAAK,CAAC,iBAAnC,iBACC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,iBAAP,EAAwB,EAAA,GAAK,SAAS,CAAC;EAAf,CAAxB,CAFJ,EAIG,KAAK,CAAC,IAAN,KAAe,OAAf,IAA0B,KAAK,CAAC,cAAhC,iBAAkD,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,cAAP,EAAqB,EAAA,GAAK,SAAS,CAAC;EAAf,CAArB,CAJrD,CADF;AAQD,CAXM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableSelectionCellState, TableSelectionCellSlots } from './TableSelectionCell.types';\n\n/**\n * Render the final JSX of TableSelectionCell\n */\nexport const renderTableSelectionCell_unstable = (state: TableSelectionCellState) => {\n const { slots, slotProps } = getSlots<TableSelectionCellSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {state.type === 'checkbox' && slots.checkboxIndicator && (\n <slots.checkboxIndicator {...slotProps.checkboxIndicator} />\n )}\n {state.type === 'radio' && slots.radioIndicator && <slots.radioIndicator {...slotProps.radioIndicator} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;AAGA,OAAO,MAAMC,iCAAiC,GAAIC,KAA8B,IAAI;EAClF,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAA0BE,KAAK,CAAC;EAErE,oBACEH,oBAACI,KAAK,CAACE,IAAI;IAAA,GAAKD,SAAS,CAACC;EAAI,GAC3BH,KAAK,CAACI,IAAI,KAAK,UAAU,IAAIH,KAAK,CAACI,iBAAiB,iBACnDR,oBAACI,KAAK,CAACI,iBAAiB;IAAA,GAAKH,SAAS,CAACG;EAAiB,EACzD,EACAL,KAAK,CAACI,IAAI,KAAK,OAAO,IAAIH,KAAK,CAACK,cAAc,iBAAIT,oBAACI,KAAK,CAACK,cAAc;IAAA,GAAKJ,SAAS,CAACI;EAAc,EAAI,CAC9F;AAEjB,CAAC","names":["React","getSlots","renderTableSelectionCell_unstable","state","slots","slotProps","root","type","checkboxIndicator","radioIndicator"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableSelectionCell/renderTableSelectionCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableSelectionCellState, TableSelectionCellSlots } from './TableSelectionCell.types';\n\n/**\n * Render the final JSX of TableSelectionCell\n */\nexport const renderTableSelectionCell_unstable = (state: TableSelectionCellState) => {\n const { slots, slotProps } = getSlots<TableSelectionCellSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {state.type === 'checkbox' && slots.checkboxIndicator && (\n <slots.checkboxIndicator {...slotProps.checkboxIndicator} />\n )}\n {state.type === 'radio' && slots.radioIndicator && <slots.radioIndicator {...slotProps.radioIndicator} />}\n </slots.root>\n );\n};\n"]}
@@ -1,4 +1,4 @@
1
- import { resolveShorthand } from '@fluentui/react-utilities';
1
+ import { resolveShorthand, useId } from '@fluentui/react-utilities';
2
2
  import { Checkbox } from '@fluentui/react-checkbox';
3
3
  import { Radio } from '@fluentui/react-radio';
4
4
  import { useTableCell_unstable } from '../TableCell/useTableCell';
@@ -12,7 +12,6 @@ import { useTableContext } from '../../contexts/tableContext';
12
12
  * @param props - props from this instance of TableSelectionCell
13
13
  * @param ref - reference to root HTMLElement of TableSelectionCell
14
14
  */
15
-
16
15
  export const useTableSelectionCell_unstable = (props, ref) => {
17
16
  const tableCellState = useTableCell_unstable(props, ref);
18
17
  const {
@@ -24,8 +23,10 @@ export const useTableSelectionCell_unstable = (props, ref) => {
24
23
  subtle = false,
25
24
  hidden = false
26
25
  } = props;
27
- return { ...tableCellState,
28
- components: { ...tableCellState.components,
26
+ return {
27
+ ...tableCellState,
28
+ components: {
29
+ ...tableCellState.components,
29
30
  checkboxIndicator: Checkbox,
30
31
  radioIndicator: Radio
31
32
  },
@@ -38,7 +39,10 @@ export const useTableSelectionCell_unstable = (props, ref) => {
38
39
  radioIndicator: resolveShorthand(props.radioIndicator, {
39
40
  required: type === 'radio',
40
41
  defaultProps: {
41
- checked: !!checked
42
+ checked: !!checked,
43
+ input: {
44
+ name: useId('table-selection-radio')
45
+ }
42
46
  }
43
47
  }),
44
48
  type,
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-table/src/components/TableSelectionCell/useTableSelectionCell.tsx"],"names":[],"mappings":"AACA,SAAS,gBAAT,QAAiC,2BAAjC;AACA,SAAS,QAAT,QAAyB,0BAAzB;AACA,SAAS,KAAT,QAAsB,uBAAtB;AAEA,SAAS,qBAAT,QAAsC,2BAAtC;AACA,SAAS,eAAT,QAAgC,6BAAhC;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,8BAA8B,GAAG,CAC5C,KAD4C,EAE5C,GAF4C,KAGjB;EAC3B,MAAM,cAAc,GAAG,qBAAqB,CAAC,KAAD,EAAQ,GAAR,CAA5C;EACA,MAAM;IAAE;EAAF,IAAuB,eAAe,EAA5C;EACA,MAAM;IAAE,IAAI,GAAG,UAAT;IAAqB,OAAO,GAAG,KAA/B;IAAsC,MAAM,GAAG,KAA/C;IAAsD,MAAM,GAAG;EAA/D,IAAyE,KAA/E;EAEA,OAAO,EACL,GAAG,cADE;IAEL,UAAU,EAAE,EACV,GAAG,cAAc,CAAC,UADR;MAEV,iBAAiB,EAAE,QAFT;MAGV,cAAc,EAAE;IAHN,CAFP;IAOL,iBAAiB,EAAE,gBAAgB,CAAC,KAAK,CAAC,iBAAP,EAA0B;MAC3D,QAAQ,EAAE,IAAI,KAAK,UADwC;MAE3D,YAAY,EAAE;QAAE,OAAO,EAAE,KAAK,CAAC;MAAjB;IAF6C,CAA1B,CAP9B;IAWL,cAAc,EAAE,gBAAgB,CAAC,KAAK,CAAC,cAAP,EAAuB;MACrD,QAAQ,EAAE,IAAI,KAAK,OADkC;MAErD,YAAY,EAAE;QAAE,OAAO,EAAE,CAAC,CAAC;MAAb;IAFuC,CAAvB,CAX3B;IAeL,IAfK;IAgBL,OAhBK;IAiBL,gBAjBK;IAkBL,MAlBK;IAmBL;EAnBK,CAAP;AAqBD,CA7BM","sourcesContent":["import * as React from 'react';\nimport { resolveShorthand } from '@fluentui/react-utilities';\nimport { Checkbox } from '@fluentui/react-checkbox';\nimport { Radio } from '@fluentui/react-radio';\nimport type { TableSelectionCellProps, TableSelectionCellState } from './TableSelectionCell.types';\nimport { useTableCell_unstable } from '../TableCell/useTableCell';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableSelectionCell.\n *\n * The returned state can be modified with hooks such as useTableSelectionCellStyles_unstable,\n * before being passed to renderTableSelectionCell_unstable.\n *\n * @param props - props from this instance of TableSelectionCell\n * @param ref - reference to root HTMLElement of TableSelectionCell\n */\nexport const useTableSelectionCell_unstable = (\n props: TableSelectionCellProps,\n ref: React.Ref<HTMLElement>,\n): TableSelectionCellState => {\n const tableCellState = useTableCell_unstable(props, ref);\n const { noNativeElements } = useTableContext();\n const { type = 'checkbox', checked = false, subtle = false, hidden = false } = props;\n\n return {\n ...tableCellState,\n components: {\n ...tableCellState.components,\n checkboxIndicator: Checkbox,\n radioIndicator: Radio,\n },\n checkboxIndicator: resolveShorthand(props.checkboxIndicator, {\n required: type === 'checkbox',\n defaultProps: { checked: props.checked },\n }),\n radioIndicator: resolveShorthand(props.radioIndicator, {\n required: type === 'radio',\n defaultProps: { checked: !!checked },\n }),\n type,\n checked,\n noNativeElements,\n subtle,\n hidden,\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AACA,SAASA,gBAAgB,EAAEC,KAAK,QAAQ,2BAA2B;AACnE,SAASC,QAAQ,QAAQ,0BAA0B;AACnD,SAASC,KAAK,QAAQ,uBAAuB;AAE7C,SAASC,qBAAqB,QAAQ,2BAA2B;AACjE,SAASC,eAAe,QAAQ,6BAA6B;AAE7D;;;;;;;;;AASA,OAAO,MAAMC,8BAA8B,GAAG,CAC5CC,KAA8B,EAC9BC,GAA2B,KACA;EAC3B,MAAMC,cAAc,GAAGL,qBAAqB,CAACG,KAAK,EAAEC,GAAG,CAAC;EACxD,MAAM;IAAEE;EAAgB,CAAE,GAAGL,eAAe,EAAE;EAC9C,MAAM;IAAEM,IAAI,GAAG,UAAU;IAAEC,OAAO,GAAG,KAAK;IAAEC,MAAM,GAAG,KAAK;IAAEC,MAAM,GAAG;EAAK,CAAE,GAAGP,KAAK;EAEpF,OAAO;IACL,GAAGE,cAAc;IACjBM,UAAU,EAAE;MACV,GAAGN,cAAc,CAACM,UAAU;MAC5BC,iBAAiB,EAAEd,QAAQ;MAC3Be,cAAc,EAAEd;KACjB;IACDa,iBAAiB,EAAEhB,gBAAgB,CAACO,KAAK,CAACS,iBAAiB,EAAE;MAC3DE,QAAQ,EAAEP,IAAI,KAAK,UAAU;MAC7BQ,YAAY,EAAE;QAAEP,OAAO,EAAEL,KAAK,CAACK;MAAO;KACvC,CAAC;IACFK,cAAc,EAAEjB,gBAAgB,CAACO,KAAK,CAACU,cAAc,EAAE;MACrDC,QAAQ,EAAEP,IAAI,KAAK,OAAO;MAC1BQ,YAAY,EAAE;QAAEP,OAAO,EAAE,CAAC,CAACA,OAAO;QAAEQ,KAAK,EAAE;UAAEC,IAAI,EAAEpB,KAAK,CAAC,uBAAuB;QAAC;MAAE;KACpF,CAAC;IACFU,IAAI;IACJC,OAAO;IACPF,gBAAgB;IAChBG,MAAM;IACNC;GACD;AACH,CAAC","names":["resolveShorthand","useId","Checkbox","Radio","useTableCell_unstable","useTableContext","useTableSelectionCell_unstable","props","ref","tableCellState","noNativeElements","type","checked","subtle","hidden","components","checkboxIndicator","radioIndicator","required","defaultProps","input","name"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableSelectionCell/useTableSelectionCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { resolveShorthand, useId } from '@fluentui/react-utilities';\nimport { Checkbox } from '@fluentui/react-checkbox';\nimport { Radio } from '@fluentui/react-radio';\nimport type { TableSelectionCellProps, TableSelectionCellState } from './TableSelectionCell.types';\nimport { useTableCell_unstable } from '../TableCell/useTableCell';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableSelectionCell.\n *\n * The returned state can be modified with hooks such as useTableSelectionCellStyles_unstable,\n * before being passed to renderTableSelectionCell_unstable.\n *\n * @param props - props from this instance of TableSelectionCell\n * @param ref - reference to root HTMLElement of TableSelectionCell\n */\nexport const useTableSelectionCell_unstable = (\n props: TableSelectionCellProps,\n ref: React.Ref<HTMLElement>,\n): TableSelectionCellState => {\n const tableCellState = useTableCell_unstable(props, ref);\n const { noNativeElements } = useTableContext();\n const { type = 'checkbox', checked = false, subtle = false, hidden = false } = props;\n\n return {\n ...tableCellState,\n components: {\n ...tableCellState.components,\n checkboxIndicator: Checkbox,\n radioIndicator: Radio,\n },\n checkboxIndicator: resolveShorthand(props.checkboxIndicator, {\n required: type === 'checkbox',\n defaultProps: { checked: props.checked },\n }),\n radioIndicator: resolveShorthand(props.radioIndicator, {\n required: type === 'radio',\n defaultProps: { checked: !!checked, input: { name: useId('table-selection-radio') } },\n }),\n type,\n checked,\n noNativeElements,\n subtle,\n hidden,\n };\n};\n"]}