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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (508) hide show
  1. package/CHANGELOG.json +1071 -1
  2. package/CHANGELOG.md +280 -2
  3. package/dist/index.d.ts +551 -113
  4. package/lib/DataGrid.js +2 -0
  5. package/lib/DataGrid.js.map +1 -0
  6. package/lib/DataGridBody.js +2 -0
  7. package/lib/DataGridBody.js.map +1 -0
  8. package/lib/DataGridCell.js +2 -0
  9. package/lib/DataGridCell.js.map +1 -0
  10. package/lib/DataGridHeader.js +2 -0
  11. package/lib/DataGridHeader.js.map +1 -0
  12. package/lib/DataGridHeaderCell.js +2 -0
  13. package/lib/DataGridHeaderCell.js.map +1 -0
  14. package/lib/DataGridRow.js +2 -0
  15. package/lib/DataGridRow.js.map +1 -0
  16. package/lib/DataGridSelectionCell.js +2 -0
  17. package/lib/DataGridSelectionCell.js.map +1 -0
  18. package/lib/Table.js.map +1 -1
  19. package/lib/TableBody.js.map +1 -1
  20. package/lib/TableCell.js.map +1 -1
  21. package/lib/TableCellActions.js.map +1 -1
  22. package/lib/TableCellLayout.js.map +1 -1
  23. package/lib/TableCellPrimaryLayout.js.map +1 -1
  24. package/lib/TableHeader.js.map +1 -1
  25. package/lib/TableHeaderCell.js.map +1 -1
  26. package/lib/TableRow.js.map +1 -1
  27. package/lib/TableSelectionCell.js.map +1 -1
  28. package/lib/components/DataGrid/DataGrid.js +15 -0
  29. package/lib/components/DataGrid/DataGrid.js.map +1 -0
  30. package/lib/components/DataGrid/DataGrid.types.js +2 -0
  31. package/lib/components/DataGrid/DataGrid.types.js.map +1 -0
  32. package/lib/components/DataGrid/index.js +6 -0
  33. package/lib/components/DataGrid/index.js.map +1 -0
  34. package/lib/components/DataGrid/renderDataGrid.js +12 -0
  35. package/lib/components/DataGrid/renderDataGrid.js.map +1 -0
  36. package/lib/components/DataGrid/useDataGrid.js +63 -0
  37. package/lib/components/DataGrid/useDataGrid.js.map +1 -0
  38. package/lib/components/DataGrid/useDataGridContextValues.js +15 -0
  39. package/lib/components/DataGrid/useDataGridContextValues.js.map +1 -0
  40. package/lib/components/DataGrid/useDataGridStyles.js +14 -0
  41. package/lib/components/DataGrid/useDataGridStyles.js.map +1 -0
  42. package/lib/components/DataGridBody/DataGridBody.js +14 -0
  43. package/lib/components/DataGridBody/DataGridBody.js.map +1 -0
  44. package/lib/components/DataGridBody/DataGridBody.types.js +2 -0
  45. package/lib/components/DataGridBody/DataGridBody.types.js.map +1 -0
  46. package/lib/components/DataGridBody/index.js +6 -0
  47. package/lib/components/DataGridBody/index.js.map +1 -0
  48. package/lib/components/DataGridBody/renderDataGridBody.js +19 -0
  49. package/lib/components/DataGridBody/renderDataGridBody.js.map +1 -0
  50. package/lib/components/DataGridBody/useDataGridBody.js +31 -0
  51. package/lib/components/DataGridBody/useDataGridBody.js.map +1 -0
  52. package/lib/components/DataGridBody/useDataGridBodyStyles.js +14 -0
  53. package/lib/components/DataGridBody/useDataGridBodyStyles.js.map +1 -0
  54. package/lib/components/DataGridCell/DataGridCell.js +14 -0
  55. package/lib/components/DataGridCell/DataGridCell.js.map +1 -0
  56. package/lib/components/DataGridCell/DataGridCell.types.js +2 -0
  57. package/lib/components/DataGridCell/DataGridCell.types.js.map +1 -0
  58. package/lib/components/DataGridCell/index.js +6 -0
  59. package/lib/components/DataGridCell/index.js.map +1 -0
  60. package/lib/components/DataGridCell/renderDataGridCell.js +8 -0
  61. package/lib/components/DataGridCell/renderDataGridCell.js.map +1 -0
  62. package/lib/components/DataGridCell/useDataGridCell.js +21 -0
  63. package/lib/components/DataGridCell/useDataGridCell.js.map +1 -0
  64. package/lib/components/DataGridCell/useDataGridCellStyles.js +14 -0
  65. package/lib/components/DataGridCell/useDataGridCellStyles.js.map +1 -0
  66. package/lib/components/DataGridHeader/DataGridHeader.js +14 -0
  67. package/lib/components/DataGridHeader/DataGridHeader.js.map +1 -0
  68. package/lib/components/DataGridHeader/DataGridHeader.types.js +2 -0
  69. package/lib/components/DataGridHeader/DataGridHeader.types.js.map +1 -0
  70. package/lib/components/DataGridHeader/index.js +6 -0
  71. package/lib/components/DataGridHeader/index.js.map +1 -0
  72. package/lib/components/DataGridHeader/renderDataGridHeader.js +8 -0
  73. package/lib/components/DataGridHeader/renderDataGridHeader.js.map +1 -0
  74. package/lib/components/DataGridHeader/useDataGridHeader.js +17 -0
  75. package/lib/components/DataGridHeader/useDataGridHeader.js.map +1 -0
  76. package/lib/components/DataGridHeader/useDataGridHeaderStyles.js +14 -0
  77. package/lib/components/DataGridHeader/useDataGridHeaderStyles.js.map +1 -0
  78. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js +14 -0
  79. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -0
  80. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.types.js +2 -0
  81. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -0
  82. package/lib/components/DataGridHeaderCell/index.js +6 -0
  83. package/lib/components/DataGridHeaderCell/index.js.map +1 -0
  84. package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js +8 -0
  85. package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -0
  86. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js +37 -0
  87. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -0
  88. package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +22 -0
  89. package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -0
  90. package/lib/components/DataGridRow/DataGridRow.js +14 -0
  91. package/lib/components/DataGridRow/DataGridRow.js.map +1 -0
  92. package/lib/components/DataGridRow/DataGridRow.types.js +2 -0
  93. package/lib/components/DataGridRow/DataGridRow.types.js.map +1 -0
  94. package/lib/components/DataGridRow/index.js +6 -0
  95. package/lib/components/DataGridRow/index.js.map +1 -0
  96. package/lib/components/DataGridRow/renderDataGridRow.js +21 -0
  97. package/lib/components/DataGridRow/renderDataGridRow.js.map +1 -0
  98. package/lib/components/DataGridRow/useDataGridRow.js +70 -0
  99. package/lib/components/DataGridRow/useDataGridRow.js.map +1 -0
  100. package/lib/components/DataGridRow/useDataGridRowStyles.js +18 -0
  101. package/lib/components/DataGridRow/useDataGridRowStyles.js.map +1 -0
  102. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js +14 -0
  103. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -0
  104. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.types.js +2 -0
  105. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -0
  106. package/lib/components/DataGridSelectionCell/index.js +6 -0
  107. package/lib/components/DataGridSelectionCell/index.js.map +1 -0
  108. package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js +8 -0
  109. package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -0
  110. package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js +47 -0
  111. package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -0
  112. package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js +22 -0
  113. package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js.map +1 -0
  114. package/lib/components/Table/Table.js +1 -2
  115. package/lib/components/Table/Table.js.map +1 -1
  116. package/lib/components/Table/Table.types.js.map +1 -1
  117. package/lib/components/Table/index.js.map +1 -1
  118. package/lib/components/Table/renderTable.js +2 -2
  119. package/lib/components/Table/renderTable.js.map +1 -1
  120. package/lib/components/Table/useTable.js +0 -2
  121. package/lib/components/Table/useTable.js.map +1 -1
  122. package/lib/components/Table/useTableContextValues.js.map +1 -1
  123. package/lib/components/Table/useTableStyles.js +26 -11
  124. package/lib/components/Table/useTableStyles.js.map +1 -1
  125. package/lib/components/TableBody/TableBody.js +1 -2
  126. package/lib/components/TableBody/TableBody.js.map +1 -1
  127. package/lib/components/TableBody/TableBody.types.js.map +1 -1
  128. package/lib/components/TableBody/index.js.map +1 -1
  129. package/lib/components/TableBody/renderTableBody.js +3 -4
  130. package/lib/components/TableBody/renderTableBody.js.map +1 -1
  131. package/lib/components/TableBody/useTableBody.js +2 -3
  132. package/lib/components/TableBody/useTableBody.js.map +1 -1
  133. package/lib/components/TableBody/useTableBodyStyles.js +16 -9
  134. package/lib/components/TableBody/useTableBodyStyles.js.map +1 -1
  135. package/lib/components/TableCell/TableCell.js +1 -2
  136. package/lib/components/TableCell/TableCell.js.map +1 -1
  137. package/lib/components/TableCell/TableCell.types.js.map +1 -1
  138. package/lib/components/TableCell/index.js.map +1 -1
  139. package/lib/components/TableCell/renderTableCell.js +2 -2
  140. package/lib/components/TableCell/renderTableCell.js.map +1 -1
  141. package/lib/components/TableCell/useTableCell.js +5 -4
  142. package/lib/components/TableCell/useTableCell.js.map +1 -1
  143. package/lib/components/TableCell/useTableCellStyles.js +58 -13
  144. package/lib/components/TableCell/useTableCellStyles.js.map +1 -1
  145. package/lib/components/TableCellActions/TableCellActions.js +1 -2
  146. package/lib/components/TableCellActions/TableCellActions.js.map +1 -1
  147. package/lib/components/TableCellActions/TableCellActions.types.js.map +1 -1
  148. package/lib/components/TableCellActions/index.js.map +1 -1
  149. package/lib/components/TableCellActions/renderTableCellActions.js +3 -4
  150. package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -1
  151. package/lib/components/TableCellActions/useTableCellActions.js +5 -5
  152. package/lib/components/TableCellActions/useTableCellActions.js.map +1 -1
  153. package/lib/components/TableCellActions/useTableCellActionsStyles.js +12 -20
  154. package/lib/components/TableCellActions/useTableCellActionsStyles.js.map +1 -1
  155. package/lib/components/TableCellLayout/TableCellLayout.js +3 -3
  156. package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -1
  157. package/lib/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
  158. package/lib/components/TableCellLayout/index.js.map +1 -1
  159. package/lib/components/TableCellLayout/renderTableCellLayout.js +14 -7
  160. package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  161. package/lib/components/TableCellLayout/useTableCellLayout.js +14 -4
  162. package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  163. package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js +13 -0
  164. package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -0
  165. package/lib/components/TableCellLayout/useTableCellLayoutStyles.js +41 -35
  166. package/lib/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
  167. package/lib/components/TableHeader/TableHeader.js +1 -2
  168. package/lib/components/TableHeader/TableHeader.js.map +1 -1
  169. package/lib/components/TableHeader/TableHeader.types.js.map +1 -1
  170. package/lib/components/TableHeader/index.js.map +1 -1
  171. package/lib/components/TableHeader/renderTableHeader.js +6 -3
  172. package/lib/components/TableHeader/renderTableHeader.js.map +1 -1
  173. package/lib/components/TableHeader/useTableHeader.js +3 -11
  174. package/lib/components/TableHeader/useTableHeader.js.map +1 -1
  175. package/lib/components/TableHeader/useTableHeaderStyles.js +16 -9
  176. package/lib/components/TableHeader/useTableHeaderStyles.js.map +1 -1
  177. package/lib/components/TableHeaderCell/TableHeaderCell.js +1 -2
  178. package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  179. package/lib/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
  180. package/lib/components/TableHeaderCell/index.js.map +1 -1
  181. package/lib/components/TableHeaderCell/renderTableHeaderCell.js +6 -4
  182. package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  183. package/lib/components/TableHeaderCell/useTableHeaderCell.js +13 -9
  184. package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  185. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js +83 -50
  186. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
  187. package/lib/components/TableRow/TableRow.js +1 -2
  188. package/lib/components/TableRow/TableRow.js.map +1 -1
  189. package/lib/components/TableRow/TableRow.types.js.map +1 -1
  190. package/lib/components/TableRow/index.js.map +1 -1
  191. package/lib/components/TableRow/renderTableRow.js +3 -4
  192. package/lib/components/TableRow/renderTableRow.js.map +1 -1
  193. package/lib/components/TableRow/useTableRow.js +12 -6
  194. package/lib/components/TableRow/useTableRow.js.map +1 -1
  195. package/lib/components/TableRow/useTableRowStyles.js +196 -28
  196. package/lib/components/TableRow/useTableRowStyles.js.map +1 -1
  197. package/lib/components/TableSelectionCell/TableSelectionCell.js +1 -2
  198. package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  199. package/lib/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
  200. package/lib/components/TableSelectionCell/index.js.map +1 -1
  201. package/lib/components/TableSelectionCell/renderTableSelectionCell.js +6 -4
  202. package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  203. package/lib/components/TableSelectionCell/useTableSelectionCell.js +25 -12
  204. package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  205. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js +59 -27
  206. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
  207. package/lib/contexts/columnIdContext.js +9 -0
  208. package/lib/contexts/columnIdContext.js.map +1 -0
  209. package/lib/contexts/dataGridContext.js +13 -0
  210. package/lib/contexts/dataGridContext.js.map +1 -0
  211. package/lib/contexts/rowIdContext.js +9 -0
  212. package/lib/contexts/rowIdContext.js.map +1 -0
  213. package/lib/contexts/tableContext.js +0 -1
  214. package/lib/contexts/tableContext.js.map +1 -1
  215. package/lib/contexts/tableHeaderContext.js +6 -0
  216. package/lib/contexts/tableHeaderContext.js.map +1 -0
  217. package/lib/hooks/createColumn.js +35 -0
  218. package/lib/hooks/createColumn.js.map +1 -0
  219. package/lib/hooks/index.js +4 -1
  220. package/lib/hooks/index.js.map +1 -1
  221. package/lib/hooks/selectionManager.js +16 -32
  222. package/lib/hooks/selectionManager.js.map +1 -1
  223. package/lib/hooks/types.js.map +1 -1
  224. package/lib/hooks/useTableFeatures.js +35 -0
  225. package/lib/hooks/useTableFeatures.js.map +1 -0
  226. package/lib/hooks/useTableSelection.js +74 -0
  227. package/lib/hooks/useTableSelection.js.map +1 -0
  228. package/lib/hooks/useTableSort.js +85 -0
  229. package/lib/hooks/useTableSort.js.map +1 -0
  230. package/lib/index.js +9 -1
  231. package/lib/index.js.map +1 -1
  232. package/lib-commonjs/DataGrid.js +8 -0
  233. package/lib-commonjs/DataGrid.js.map +1 -0
  234. package/lib-commonjs/DataGridBody.js +8 -0
  235. package/lib-commonjs/DataGridBody.js.map +1 -0
  236. package/lib-commonjs/DataGridCell.js +8 -0
  237. package/lib-commonjs/DataGridCell.js.map +1 -0
  238. package/lib-commonjs/DataGridHeader.js +8 -0
  239. package/lib-commonjs/DataGridHeader.js.map +1 -0
  240. package/lib-commonjs/DataGridHeaderCell.js +8 -0
  241. package/lib-commonjs/DataGridHeaderCell.js.map +1 -0
  242. package/lib-commonjs/DataGridRow.js +8 -0
  243. package/lib-commonjs/DataGridRow.js.map +1 -0
  244. package/lib-commonjs/DataGridSelectionCell.js +8 -0
  245. package/lib-commonjs/DataGridSelectionCell.js.map +1 -0
  246. package/lib-commonjs/Table.js +0 -2
  247. package/lib-commonjs/Table.js.map +1 -1
  248. package/lib-commonjs/TableBody.js +0 -2
  249. package/lib-commonjs/TableBody.js.map +1 -1
  250. package/lib-commonjs/TableCell.js +0 -2
  251. package/lib-commonjs/TableCell.js.map +1 -1
  252. package/lib-commonjs/TableCellActions.js +0 -2
  253. package/lib-commonjs/TableCellActions.js.map +1 -1
  254. package/lib-commonjs/TableCellLayout.js +0 -2
  255. package/lib-commonjs/TableCellLayout.js.map +1 -1
  256. package/lib-commonjs/TableCellPrimaryLayout.js +0 -2
  257. package/lib-commonjs/TableCellPrimaryLayout.js.map +1 -1
  258. package/lib-commonjs/TableHeader.js +0 -2
  259. package/lib-commonjs/TableHeader.js.map +1 -1
  260. package/lib-commonjs/TableHeaderCell.js +0 -2
  261. package/lib-commonjs/TableHeaderCell.js.map +1 -1
  262. package/lib-commonjs/TableRow.js +0 -2
  263. package/lib-commonjs/TableRow.js.map +1 -1
  264. package/lib-commonjs/TableSelectionCell.js +0 -2
  265. package/lib-commonjs/TableSelectionCell.js.map +1 -1
  266. package/lib-commonjs/components/DataGrid/DataGrid.js +21 -0
  267. package/lib-commonjs/components/DataGrid/DataGrid.js.map +1 -0
  268. package/lib-commonjs/components/DataGrid/DataGrid.types.js +6 -0
  269. package/lib-commonjs/components/DataGrid/DataGrid.types.js.map +1 -0
  270. package/lib-commonjs/components/DataGrid/index.js +12 -0
  271. package/lib-commonjs/components/DataGrid/index.js.map +1 -0
  272. package/lib-commonjs/components/DataGrid/renderDataGrid.js +19 -0
  273. package/lib-commonjs/components/DataGrid/renderDataGrid.js.map +1 -0
  274. package/lib-commonjs/components/DataGrid/useDataGrid.js +70 -0
  275. package/lib-commonjs/components/DataGrid/useDataGrid.js.map +1 -0
  276. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js +22 -0
  277. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js.map +1 -0
  278. package/lib-commonjs/components/DataGrid/useDataGridStyles.js +21 -0
  279. package/lib-commonjs/components/DataGrid/useDataGridStyles.js.map +1 -0
  280. package/lib-commonjs/components/DataGridBody/DataGridBody.js +20 -0
  281. package/lib-commonjs/components/DataGridBody/DataGridBody.js.map +1 -0
  282. package/lib-commonjs/components/DataGridBody/DataGridBody.types.js +6 -0
  283. package/lib-commonjs/components/DataGridBody/DataGridBody.types.js.map +1 -0
  284. package/lib-commonjs/components/DataGridBody/index.js +12 -0
  285. package/lib-commonjs/components/DataGridBody/index.js.map +1 -0
  286. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js +26 -0
  287. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js.map +1 -0
  288. package/lib-commonjs/components/DataGridBody/useDataGridBody.js +38 -0
  289. package/lib-commonjs/components/DataGridBody/useDataGridBody.js.map +1 -0
  290. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.js +21 -0
  291. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.js.map +1 -0
  292. package/lib-commonjs/components/DataGridCell/DataGridCell.js +20 -0
  293. package/lib-commonjs/components/DataGridCell/DataGridCell.js.map +1 -0
  294. package/lib-commonjs/components/DataGridCell/DataGridCell.types.js +6 -0
  295. package/lib-commonjs/components/DataGridCell/DataGridCell.types.js.map +1 -0
  296. package/lib-commonjs/components/DataGridCell/index.js +12 -0
  297. package/lib-commonjs/components/DataGridCell/index.js.map +1 -0
  298. package/lib-commonjs/components/DataGridCell/renderDataGridCell.js +15 -0
  299. package/lib-commonjs/components/DataGridCell/renderDataGridCell.js.map +1 -0
  300. package/lib-commonjs/components/DataGridCell/useDataGridCell.js +28 -0
  301. package/lib-commonjs/components/DataGridCell/useDataGridCell.js.map +1 -0
  302. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.js +21 -0
  303. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.js.map +1 -0
  304. package/lib-commonjs/components/DataGridHeader/DataGridHeader.js +20 -0
  305. package/lib-commonjs/components/DataGridHeader/DataGridHeader.js.map +1 -0
  306. package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js +6 -0
  307. package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js.map +1 -0
  308. package/lib-commonjs/components/DataGridHeader/index.js +12 -0
  309. package/lib-commonjs/components/DataGridHeader/index.js.map +1 -0
  310. package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js +15 -0
  311. package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js.map +1 -0
  312. package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js +24 -0
  313. package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js.map +1 -0
  314. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.js +21 -0
  315. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.js.map +1 -0
  316. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js +20 -0
  317. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -0
  318. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js +6 -0
  319. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -0
  320. package/lib-commonjs/components/DataGridHeaderCell/index.js +12 -0
  321. package/lib-commonjs/components/DataGridHeaderCell/index.js.map +1 -0
  322. package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js +15 -0
  323. package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -0
  324. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js +44 -0
  325. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -0
  326. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +29 -0
  327. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -0
  328. package/lib-commonjs/components/DataGridRow/DataGridRow.js +20 -0
  329. package/lib-commonjs/components/DataGridRow/DataGridRow.js.map +1 -0
  330. package/lib-commonjs/components/DataGridRow/DataGridRow.types.js +6 -0
  331. package/lib-commonjs/components/DataGridRow/DataGridRow.types.js.map +1 -0
  332. package/lib-commonjs/components/DataGridRow/index.js +12 -0
  333. package/lib-commonjs/components/DataGridRow/index.js.map +1 -0
  334. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js +28 -0
  335. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js.map +1 -0
  336. package/lib-commonjs/components/DataGridRow/useDataGridRow.js +77 -0
  337. package/lib-commonjs/components/DataGridRow/useDataGridRow.js.map +1 -0
  338. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.js +25 -0
  339. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.js.map +1 -0
  340. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js +20 -0
  341. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -0
  342. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js +6 -0
  343. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -0
  344. package/lib-commonjs/components/DataGridSelectionCell/index.js +12 -0
  345. package/lib-commonjs/components/DataGridSelectionCell/index.js.map +1 -0
  346. package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js +15 -0
  347. package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -0
  348. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js +54 -0
  349. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -0
  350. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js +29 -0
  351. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js.map +1 -0
  352. package/lib-commonjs/components/Table/Table.js +1 -8
  353. package/lib-commonjs/components/Table/Table.js.map +1 -1
  354. package/lib-commonjs/components/Table/Table.types.js.map +1 -1
  355. package/lib-commonjs/components/Table/index.js +0 -6
  356. package/lib-commonjs/components/Table/index.js.map +1 -1
  357. package/lib-commonjs/components/Table/renderTable.js +2 -7
  358. package/lib-commonjs/components/Table/renderTable.js.map +1 -1
  359. package/lib-commonjs/components/Table/useTable.js +0 -5
  360. package/lib-commonjs/components/Table/useTable.js.map +1 -1
  361. package/lib-commonjs/components/Table/useTableContextValues.js +0 -3
  362. package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -1
  363. package/lib-commonjs/components/Table/useTableStyles.js +26 -15
  364. package/lib-commonjs/components/Table/useTableStyles.js.map +1 -1
  365. package/lib-commonjs/components/TableBody/TableBody.js +1 -7
  366. package/lib-commonjs/components/TableBody/TableBody.js.map +1 -1
  367. package/lib-commonjs/components/TableBody/TableBody.types.js.map +1 -1
  368. package/lib-commonjs/components/TableBody/index.js +0 -6
  369. package/lib-commonjs/components/TableBody/index.js.map +1 -1
  370. package/lib-commonjs/components/TableBody/renderTableBody.js +3 -8
  371. package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -1
  372. package/lib-commonjs/components/TableBody/useTableBody.js +2 -7
  373. package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
  374. package/lib-commonjs/components/TableBody/useTableBodyStyles.js +16 -11
  375. package/lib-commonjs/components/TableBody/useTableBodyStyles.js.map +1 -1
  376. package/lib-commonjs/components/TableCell/TableCell.js +1 -7
  377. package/lib-commonjs/components/TableCell/TableCell.js.map +1 -1
  378. package/lib-commonjs/components/TableCell/TableCell.types.js.map +1 -1
  379. package/lib-commonjs/components/TableCell/index.js +0 -6
  380. package/lib-commonjs/components/TableCell/index.js.map +1 -1
  381. package/lib-commonjs/components/TableCell/renderTableCell.js +2 -6
  382. package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -1
  383. package/lib-commonjs/components/TableCell/useTableCell.js +5 -8
  384. package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
  385. package/lib-commonjs/components/TableCell/useTableCellStyles.js +58 -17
  386. package/lib-commonjs/components/TableCell/useTableCellStyles.js.map +1 -1
  387. package/lib-commonjs/components/TableCellActions/TableCellActions.js +1 -7
  388. package/lib-commonjs/components/TableCellActions/TableCellActions.js.map +1 -1
  389. package/lib-commonjs/components/TableCellActions/TableCellActions.types.js.map +1 -1
  390. package/lib-commonjs/components/TableCellActions/index.js +0 -6
  391. package/lib-commonjs/components/TableCellActions/index.js.map +1 -1
  392. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js +3 -8
  393. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -1
  394. package/lib-commonjs/components/TableCellActions/useTableCellActions.js +4 -8
  395. package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -1
  396. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js +12 -25
  397. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js.map +1 -1
  398. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js +3 -8
  399. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js.map +1 -1
  400. package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
  401. package/lib-commonjs/components/TableCellLayout/index.js +0 -6
  402. package/lib-commonjs/components/TableCellLayout/index.js.map +1 -1
  403. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js +14 -11
  404. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  405. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +14 -7
  406. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  407. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js +20 -0
  408. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -0
  409. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js +41 -39
  410. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
  411. package/lib-commonjs/components/TableHeader/TableHeader.js +1 -7
  412. package/lib-commonjs/components/TableHeader/TableHeader.js.map +1 -1
  413. package/lib-commonjs/components/TableHeader/TableHeader.types.js.map +1 -1
  414. package/lib-commonjs/components/TableHeader/index.js +0 -6
  415. package/lib-commonjs/components/TableHeader/index.js.map +1 -1
  416. package/lib-commonjs/components/TableHeader/renderTableHeader.js +6 -7
  417. package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -1
  418. package/lib-commonjs/components/TableHeader/useTableHeader.js +3 -16
  419. package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
  420. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js +16 -12
  421. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js.map +1 -1
  422. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js +1 -7
  423. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  424. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
  425. package/lib-commonjs/components/TableHeaderCell/index.js +0 -6
  426. package/lib-commonjs/components/TableHeaderCell/index.js.map +1 -1
  427. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js +6 -8
  428. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  429. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +12 -15
  430. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  431. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js +83 -54
  432. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
  433. package/lib-commonjs/components/TableRow/TableRow.js +1 -7
  434. package/lib-commonjs/components/TableRow/TableRow.js.map +1 -1
  435. package/lib-commonjs/components/TableRow/TableRow.types.js.map +1 -1
  436. package/lib-commonjs/components/TableRow/index.js +0 -6
  437. package/lib-commonjs/components/TableRow/index.js.map +1 -1
  438. package/lib-commonjs/components/TableRow/renderTableRow.js +3 -8
  439. package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -1
  440. package/lib-commonjs/components/TableRow/useTableRow.js +11 -9
  441. package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
  442. package/lib-commonjs/components/TableRow/useTableRowStyles.js +196 -33
  443. package/lib-commonjs/components/TableRow/useTableRowStyles.js.map +1 -1
  444. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js +1 -7
  445. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  446. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
  447. package/lib-commonjs/components/TableSelectionCell/index.js +0 -6
  448. package/lib-commonjs/components/TableSelectionCell/index.js.map +1 -1
  449. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js +6 -8
  450. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  451. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js +24 -18
  452. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  453. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js +59 -30
  454. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
  455. package/lib-commonjs/contexts/columnIdContext.js +16 -0
  456. package/lib-commonjs/contexts/columnIdContext.js.map +1 -0
  457. package/lib-commonjs/contexts/dataGridContext.js +20 -0
  458. package/lib-commonjs/contexts/dataGridContext.js.map +1 -0
  459. package/lib-commonjs/contexts/rowIdContext.js +16 -0
  460. package/lib-commonjs/contexts/rowIdContext.js.map +1 -0
  461. package/lib-commonjs/contexts/tableContext.js +0 -5
  462. package/lib-commonjs/contexts/tableContext.js.map +1 -1
  463. package/lib-commonjs/contexts/tableHeaderContext.js +13 -0
  464. package/lib-commonjs/contexts/tableHeaderContext.js.map +1 -0
  465. package/lib-commonjs/hooks/createColumn.js +42 -0
  466. package/lib-commonjs/hooks/createColumn.js.map +1 -0
  467. package/lib-commonjs/hooks/index.js +4 -4
  468. package/lib-commonjs/hooks/index.js.map +1 -1
  469. package/lib-commonjs/hooks/selectionManager.js +16 -34
  470. package/lib-commonjs/hooks/selectionManager.js.map +1 -1
  471. package/lib-commonjs/hooks/types.js.map +1 -1
  472. package/lib-commonjs/hooks/useTableFeatures.js +42 -0
  473. package/lib-commonjs/hooks/useTableFeatures.js.map +1 -0
  474. package/lib-commonjs/hooks/useTableSelection.js +82 -0
  475. package/lib-commonjs/hooks/useTableSelection.js.map +1 -0
  476. package/lib-commonjs/hooks/useTableSort.js +93 -0
  477. package/lib-commonjs/hooks/useTableSort.js.map +1 -0
  478. package/lib-commonjs/index.js +252 -26
  479. package/lib-commonjs/index.js.map +1 -1
  480. package/package.json +30 -17
  481. package/lib/hooks/useSelection.js +0 -47
  482. package/lib/hooks/useSelection.js.map +0 -1
  483. package/lib/hooks/useSort.js +0 -72
  484. package/lib/hooks/useSort.js.map +0 -1
  485. package/lib/hooks/useTable.js +0 -87
  486. package/lib/hooks/useTable.js.map +0 -1
  487. package/lib/navigationModes/cell.js +0 -250
  488. package/lib/navigationModes/cell.js.map +0 -1
  489. package/lib/navigationModes/composite.js +0 -208
  490. package/lib/navigationModes/composite.js.map +0 -1
  491. package/lib/navigationModes/index.js +0 -3
  492. package/lib/navigationModes/index.js.map +0 -1
  493. package/lib/navigationModes/useNavigationMode.js +0 -42
  494. package/lib/navigationModes/useNavigationMode.js.map +0 -1
  495. package/lib-commonjs/hooks/useSelection.js +0 -59
  496. package/lib-commonjs/hooks/useSelection.js.map +0 -1
  497. package/lib-commonjs/hooks/useSort.js +0 -82
  498. package/lib-commonjs/hooks/useSort.js.map +0 -1
  499. package/lib-commonjs/hooks/useTable.js +0 -99
  500. package/lib-commonjs/hooks/useTable.js.map +0 -1
  501. package/lib-commonjs/navigationModes/cell.js +0 -259
  502. package/lib-commonjs/navigationModes/cell.js.map +0 -1
  503. package/lib-commonjs/navigationModes/composite.js +0 -217
  504. package/lib-commonjs/navigationModes/composite.js.map +0 -1
  505. package/lib-commonjs/navigationModes/index.js +0 -16
  506. package/lib-commonjs/navigationModes/index.js.map +0 -1
  507. package/lib-commonjs/navigationModes/useNavigationMode.js +0 -55
  508. package/lib-commonjs/navigationModes/useNavigationMode.js.map +0 -1
@@ -1,49 +1,217 @@
1
1
  import { __styles, mergeClasses, shorthands } from '@griffel/react';
2
2
  import { tokens } from '@fluentui/react-theme';
3
3
  import { tableCellActionsClassNames } from '../TableCellActions/useTableCellActionsStyles';
4
+ import { tableSelectionCellClassNames } from '../TableSelectionCell/useTableSelectionCellStyles';
5
+ import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';
4
6
  export const tableRowClassName = 'fui-TableRow';
5
7
  export const tableRowClassNames = {
6
8
  root: tableRowClassName
7
9
  };
10
+ const useTableLayoutStyles = /*#__PURE__*/__styles({
11
+ root: {
12
+ mc9l5x: "f1u0rzck"
13
+ }
14
+ }, {
15
+ d: [".f1u0rzck{display:table-row;}"]
16
+ });
17
+ const useFlexLayoutStyles = /*#__PURE__*/__styles({
18
+ root: {
19
+ mc9l5x: "f22iagw",
20
+ Bt984gj: "f122n59"
21
+ }
22
+ }, {
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;}"]
24
+ });
8
25
  /**
9
26
  * Styles for the root slot
10
27
  */
11
-
12
28
  const useStyles = /*#__PURE__*/__styles({
13
- "root": {
14
- "mc9l5x": "f1u0rzck",
15
- "sj55zd": "f19n0e5",
16
- "Jwef8y": "f1knas48",
17
- "Bpt6rm4": "f1uorfem"
18
- },
19
- "medium": {
20
- "Bqenvij": "f1ft4266",
21
- "Bn0qgzm": "f1vxd6vx",
22
- "oivjwe": "fg706s2",
23
- "B9xav0g": "frpde29"
24
- },
25
- "small": {
26
- "Bqenvij": "fbsu25e",
27
- "Bn0qgzm": "f1vxd6vx",
28
- "oivjwe": "fg706s2",
29
- "B9xav0g": "frpde29"
30
- },
31
- "smaller": {
32
- "Bqenvij": "frvgh55",
33
- "Be2twd7": "fy9rknc"
34
- }
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
+ B5tto1x: "fgfzuaq",
44
+ Bm5rygw: "f13cic75"
45
+ },
46
+ rootInteractive: {
47
+ ecr2s2: "f1wfn5kd",
48
+ lj723h: "f1g4hkjv",
49
+ Bw1l9kw: "flaujjr",
50
+ B43xm9u: "f15ngxrw",
51
+ i921ia: "fjbbrdp",
52
+ Jwef8y: "f1t94bn6",
53
+ Bi91k9c: "feu1g3u",
54
+ Bi7d7a3: "f14h8iit",
55
+ Bpt6rm4: "f1uorfem",
56
+ ff6mpl: "fw60kww"
57
+ },
58
+ medium: {
59
+ Bn0qgzm: "f1vxd6vx",
60
+ oivjwe: "fg706s2",
61
+ B9xav0g: "frpde29"
62
+ },
63
+ small: {
64
+ Bn0qgzm: "f1vxd6vx",
65
+ oivjwe: "fg706s2",
66
+ B9xav0g: "frpde29"
67
+ },
68
+ "extra-small": {
69
+ Be2twd7: "fy9rknc"
70
+ },
71
+ brand: {
72
+ De3pzq: "f16xkysk",
73
+ sj55zd: "f1cgsbmv",
74
+ g2u3we: "frmsihh",
75
+ h3c5rm: ["frttxa5", "f11o2r7f"],
76
+ B9xav0g: "fem5et0",
77
+ zhjwy3: ["f11o2r7f", "frttxa5"],
78
+ Jwef8y: "f121v1wq",
79
+ ecr2s2: "ftepret",
80
+ gwxt9v: "fqlf3fd",
81
+ v3aym: ["f9dpb3h", "fw2muls"],
82
+ Bc736ss: "f1yat0gj",
83
+ Bk6ri7n: ["fw2muls", "f9dpb3h"],
84
+ Bk5ld8o: "f7nae3y",
85
+ c4eypz: ["fkbere7", "fa97sf3"],
86
+ felo30: "fmtyzcc",
87
+ Eshu5l: ["fa97sf3", "fkbere7"],
88
+ Bjwas2f: "fb6zhgp",
89
+ Bn1d65q: ["fyowp6c", "fz08sq8"],
90
+ Bxeuatn: "f9dii88",
91
+ n51gp8: ["fz08sq8", "fyowp6c"],
92
+ Beo2b4z: ["f1afxoft", "flqq2yx"],
93
+ h6lo6r: ["flqq2yx", "f1afxoft"],
94
+ Btyw6ap: ["f1b5xrmd", "f1831rx6"],
95
+ w1pwid: ["f1831rx6", "f1b5xrmd"],
96
+ Brwvgy3: "fd94n53",
97
+ yadkgm: "f1e0wld5"
98
+ },
99
+ neutral: {
100
+ gwxt9v: "fqlf3fd",
101
+ v3aym: ["f9dpb3h", "fw2muls"],
102
+ Bc736ss: "f1yat0gj",
103
+ Bk6ri7n: ["fw2muls", "f9dpb3h"],
104
+ Bk5ld8o: "f7nae3y",
105
+ c4eypz: ["fkbere7", "fa97sf3"],
106
+ felo30: "fmtyzcc",
107
+ Eshu5l: ["fa97sf3", "fkbere7"],
108
+ Bjwas2f: "fb6zhgp",
109
+ Bn1d65q: ["fyowp6c", "fz08sq8"],
110
+ Bxeuatn: "f9dii88",
111
+ n51gp8: ["fz08sq8", "fyowp6c"],
112
+ Beo2b4z: ["f1afxoft", "flqq2yx"],
113
+ h6lo6r: ["flqq2yx", "f1afxoft"],
114
+ Btyw6ap: ["f1b5xrmd", "f1831rx6"],
115
+ w1pwid: ["f1831rx6", "f1b5xrmd"],
116
+ Brwvgy3: "fd94n53",
117
+ yadkgm: "f1e0wld5",
118
+ De3pzq: "fq5gl1p",
119
+ sj55zd: "f1cgsbmv",
120
+ ecr2s2: "fa9o754",
121
+ g2u3we: "frmsihh",
122
+ h3c5rm: ["frttxa5", "f11o2r7f"],
123
+ B9xav0g: "fem5et0",
124
+ zhjwy3: ["f11o2r7f", "frttxa5"]
125
+ },
126
+ none: {}
35
127
  }, {
36
- "d": [".f1u0rzck{display:table-row;}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".f1ft4266{height:44px;}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".fg706s2{border-bottom-style:solid;}", ".frpde29{border-bottom-color:var(--colorNeutralStroke2);}", ".fbsu25e{height:34px;}", ".frvgh55{height:24px;}", ".fy9rknc{font-size:var(--fontSizeBase200);}"],
37
- "h": [".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}", ".f1uorfem:hover .fui-TableCellActions{opacity:1;}"]
128
+ 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);}", ".fgfzuaq[data-fui-focus-within]:focus-within .fui-TableCellActions{background-color:var(--colorSubtleBackgroundHover);}", ".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);}"],
129
+ 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;}", ".fjbbrdp:active .fui-TableSelectionCell{opacity:1;}", ".ftepret:active{background-color:var(--colorBrandBackgroundInvertedSelected);}", ".fa9o754:active{background-color:var(--colorSubtleBackgroundSelected);}"],
130
+ h: [".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}", ".feu1g3u:hover{color:var(--colorNeutralForeground1Hover);}", ".f14h8iit:hover .fui-TableCellActions{background-color:var(--colorSubtleBackgroundHover);}", ".f1uorfem:hover .fui-TableCellActions{opacity:1;}", ".fw60kww:hover .fui-TableSelectionCell{opacity:1;}", ".f121v1wq:hover{background-color:var(--colorBrandBackground2);}"],
131
+ m: [["@media (forced-colors: active){.fqlf3fd{border-top-width:2px;}}", {
132
+ m: "(forced-colors: active)"
133
+ }], ["@media (forced-colors: active){.f9dpb3h{border-right-width:2px;}.fw2muls{border-left-width:2px;}}", {
134
+ m: "(forced-colors: active)"
135
+ }], ["@media (forced-colors: active){.f1yat0gj{border-bottom-width:2px;}}", {
136
+ m: "(forced-colors: active)"
137
+ }], ["@media (forced-colors: active){.fw2muls{border-left-width:2px;}.f9dpb3h{border-right-width:2px;}}", {
138
+ m: "(forced-colors: active)"
139
+ }], ["@media (forced-colors: active){.f7nae3y{border-top-style:solid;}}", {
140
+ m: "(forced-colors: active)"
141
+ }], ["@media (forced-colors: active){.fkbere7{border-right-style:solid;}.fa97sf3{border-left-style:solid;}}", {
142
+ m: "(forced-colors: active)"
143
+ }], ["@media (forced-colors: active){.fmtyzcc{border-bottom-style:solid;}}", {
144
+ m: "(forced-colors: active)"
145
+ }], ["@media (forced-colors: active){.fa97sf3{border-left-style:solid;}.fkbere7{border-right-style:solid;}}", {
146
+ m: "(forced-colors: active)"
147
+ }], ["@media (forced-colors: active){.fb6zhgp{border-top-color:transparent;}}", {
148
+ m: "(forced-colors: active)"
149
+ }], ["@media (forced-colors: active){.fyowp6c{border-right-color:transparent;}.fz08sq8{border-left-color:transparent;}}", {
150
+ m: "(forced-colors: active)"
151
+ }], ["@media (forced-colors: active){.f9dii88{border-bottom-color:transparent;}}", {
152
+ m: "(forced-colors: active)"
153
+ }], ["@media (forced-colors: active){.fz08sq8{border-left-color:transparent;}.fyowp6c{border-right-color:transparent;}}", {
154
+ m: "(forced-colors: active)"
155
+ }], ["@media (forced-colors: active){.f1afxoft{border-bottom-right-radius:var(--borderRadiusMedium);}.flqq2yx{border-bottom-left-radius:var(--borderRadiusMedium);}}", {
156
+ m: "(forced-colors: active)"
157
+ }], ["@media (forced-colors: active){.flqq2yx{border-bottom-left-radius:var(--borderRadiusMedium);}.f1afxoft{border-bottom-right-radius:var(--borderRadiusMedium);}}", {
158
+ m: "(forced-colors: active)"
159
+ }], ["@media (forced-colors: active){.f1b5xrmd{border-top-right-radius:var(--borderRadiusMedium);}.f1831rx6{border-top-left-radius:var(--borderRadiusMedium);}}", {
160
+ m: "(forced-colors: active)"
161
+ }], ["@media (forced-colors: active){.f1831rx6{border-top-left-radius:var(--borderRadiusMedium);}.f1b5xrmd{border-top-right-radius:var(--borderRadiusMedium);}}", {
162
+ m: "(forced-colors: active)"
163
+ }], ["@media (forced-colors: active){.fd94n53{box-sizing:border-box;}}", {
164
+ m: "(forced-colors: active)"
165
+ }], ["@media (forced-colors: active){.f1e0wld5:focus-visible{outline-offset:-4px;}}", {
166
+ m: "(forced-colors: active)"
167
+ }], ["@media (forced-colors: active){.fqlf3fd{border-top-width:2px;}}", {
168
+ m: "(forced-colors: active)"
169
+ }], ["@media (forced-colors: active){.f9dpb3h{border-right-width:2px;}.fw2muls{border-left-width:2px;}}", {
170
+ m: "(forced-colors: active)"
171
+ }], ["@media (forced-colors: active){.f1yat0gj{border-bottom-width:2px;}}", {
172
+ m: "(forced-colors: active)"
173
+ }], ["@media (forced-colors: active){.fw2muls{border-left-width:2px;}.f9dpb3h{border-right-width:2px;}}", {
174
+ m: "(forced-colors: active)"
175
+ }], ["@media (forced-colors: active){.f7nae3y{border-top-style:solid;}}", {
176
+ m: "(forced-colors: active)"
177
+ }], ["@media (forced-colors: active){.fkbere7{border-right-style:solid;}.fa97sf3{border-left-style:solid;}}", {
178
+ m: "(forced-colors: active)"
179
+ }], ["@media (forced-colors: active){.fmtyzcc{border-bottom-style:solid;}}", {
180
+ m: "(forced-colors: active)"
181
+ }], ["@media (forced-colors: active){.fa97sf3{border-left-style:solid;}.fkbere7{border-right-style:solid;}}", {
182
+ m: "(forced-colors: active)"
183
+ }], ["@media (forced-colors: active){.fb6zhgp{border-top-color:transparent;}}", {
184
+ m: "(forced-colors: active)"
185
+ }], ["@media (forced-colors: active){.fyowp6c{border-right-color:transparent;}.fz08sq8{border-left-color:transparent;}}", {
186
+ m: "(forced-colors: active)"
187
+ }], ["@media (forced-colors: active){.f9dii88{border-bottom-color:transparent;}}", {
188
+ m: "(forced-colors: active)"
189
+ }], ["@media (forced-colors: active){.fz08sq8{border-left-color:transparent;}.fyowp6c{border-right-color:transparent;}}", {
190
+ m: "(forced-colors: active)"
191
+ }], ["@media (forced-colors: active){.f1afxoft{border-bottom-right-radius:var(--borderRadiusMedium);}.flqq2yx{border-bottom-left-radius:var(--borderRadiusMedium);}}", {
192
+ m: "(forced-colors: active)"
193
+ }], ["@media (forced-colors: active){.flqq2yx{border-bottom-left-radius:var(--borderRadiusMedium);}.f1afxoft{border-bottom-right-radius:var(--borderRadiusMedium);}}", {
194
+ m: "(forced-colors: active)"
195
+ }], ["@media (forced-colors: active){.f1b5xrmd{border-top-right-radius:var(--borderRadiusMedium);}.f1831rx6{border-top-left-radius:var(--borderRadiusMedium);}}", {
196
+ m: "(forced-colors: active)"
197
+ }], ["@media (forced-colors: active){.f1831rx6{border-top-left-radius:var(--borderRadiusMedium);}.f1b5xrmd{border-top-right-radius:var(--borderRadiusMedium);}}", {
198
+ m: "(forced-colors: active)"
199
+ }], ["@media (forced-colors: active){.fd94n53{box-sizing:border-box;}}", {
200
+ m: "(forced-colors: active)"
201
+ }], ["@media (forced-colors: active){.f1e0wld5:focus-visible{outline-offset:-4px;}}", {
202
+ m: "(forced-colors: active)"
203
+ }]]
38
204
  });
39
205
  /**
40
206
  * Apply styling to the TableRow slots based on the state
41
207
  */
42
-
43
-
44
208
  export const useTableRowStyles_unstable = state => {
45
209
  const styles = useStyles();
46
- state.root.className = mergeClasses(tableRowClassNames.root, styles.root, styles[state.size], state.root.className);
210
+ const layoutStyles = {
211
+ table: useTableLayoutStyles(),
212
+ flex: useFlexLayoutStyles()
213
+ };
214
+ 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);
47
215
  return state;
48
216
  };
49
217
  //# sourceMappingURL=useTableRowStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableRow/useTableRowStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,EAAmC,UAAnC,QAAqD,gBAArD;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAGA,SAAS,0BAAT,QAA2C,+CAA3C;AAEA,OAAO,MAAM,iBAAiB,GAAG,cAA1B;AACP,OAAO,MAAM,kBAAkB,GAAkC;EAC/D,IAAI,EAAE;AADyD,CAA1D;AAIP;;AAEG;;AACH,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;EAAA;AAAA,EAAlB;AA4BA;;AAEG;;;AACH,OAAO,MAAM,0BAA0B,GAAI,KAAD,IAAwC;EAChF,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,kBAAkB,CAAC,IAApB,EAA0B,MAAM,CAAC,IAAjC,EAAuC,MAAM,CAAC,KAAK,CAAC,IAAP,CAA7C,EAA2D,KAAK,CAAC,IAAN,CAAW,SAAtE,CAAnC;EAEA,OAAO,KAAP;AACD,CALM","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';\n\nexport const tableRowClassName = 'fui-TableRow';\nexport const tableRowClassNames: SlotClassNames<TableRowSlots> = {\n root: tableRowClassName,\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'table-row',\n color: tokens.colorNeutralForeground1,\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n [`& .${tableCellActionsClassNames.root}`]: {\n opacity: 1,\n },\n },\n },\n\n medium: {\n height: '44px',\n ...shorthands.borderBottom(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\n },\n\n small: {\n height: '34px',\n ...shorthands.borderBottom(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\n },\n\n smaller: {\n height: '24px',\n fontSize: tokens.fontSizeBase200,\n },\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 state.root.className = mergeClasses(tableRowClassNames.root, styles.root, styles[state.size], state.root.className);\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;IAAA;EAAA;EAAA;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;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,EAqHhB;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 [`& .${tableCellActionsClassNames.root}`]: {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n },\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 backgroundColor: tokens.colorSubtleBackgroundPressed,\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 backgroundColor: tokens.colorSubtleBackgroundHover,\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\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 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":["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":["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 { TableCellSlots } from '../TableCell/TableCell.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<'span'>;\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\n/**\n * State used in rendering TableSelectionCell\n */\nexport type TableSelectionCellState = ComponentState<TableSelectionCellSlots> &\n Pick<Required<TableSelectionCellProps>, 'type' | 'checked'>;\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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/TableSelectionCell/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC","sourcesContent":["export * from './TableSelectionCell';\nexport * from './TableSelectionCell.types';\nexport * from './renderTableSelectionCell';\nexport * from './useTableSelectionCell';\nexport * from './useTableSelectionCellStyles';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableSelectionCell/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC","sourcesContent":["export * from './TableSelectionCell';\nexport * from './TableSelectionCell.types';\nexport * from './renderTableSelectionCell';\nexport * from './useTableSelectionCell';\nexport * from './useTableSelectionCellStyles';\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":["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,8 +1,8 @@
1
- import * as React from 'react';
2
- import { resolveShorthand } from '@fluentui/react-utilities';
1
+ import { resolveShorthand, useId } from '@fluentui/react-utilities';
3
2
  import { Checkbox } from '@fluentui/react-checkbox';
4
- import { CheckmarkFilled } from '@fluentui/react-icons';
3
+ import { Radio } from '@fluentui/react-radio';
5
4
  import { useTableCell_unstable } from '../TableCell/useTableCell';
5
+ import { useTableContext } from '../../contexts/tableContext';
6
6
  /**
7
7
  * Create the state required to render TableSelectionCell.
8
8
  *
@@ -12,16 +12,23 @@ import { useTableCell_unstable } from '../TableCell/useTableCell';
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
- var _a, _b;
18
-
19
16
  const tableCellState = useTableCell_unstable(props, ref);
20
- const type = (_a = props.type) !== null && _a !== void 0 ? _a : 'checkbox';
21
- return { ...tableCellState,
22
- components: { ...tableCellState.components,
17
+ const {
18
+ noNativeElements
19
+ } = useTableContext();
20
+ const {
21
+ type = 'checkbox',
22
+ checked = false,
23
+ subtle = false,
24
+ hidden = false
25
+ } = props;
26
+ return {
27
+ ...tableCellState,
28
+ components: {
29
+ ...tableCellState.components,
23
30
  checkboxIndicator: Checkbox,
24
- radioIndicator: 'span'
31
+ radioIndicator: Radio
25
32
  },
26
33
  checkboxIndicator: resolveShorthand(props.checkboxIndicator, {
27
34
  required: type === 'checkbox',
@@ -32,11 +39,17 @@ export const useTableSelectionCell_unstable = (props, ref) => {
32
39
  radioIndicator: resolveShorthand(props.radioIndicator, {
33
40
  required: type === 'radio',
34
41
  defaultProps: {
35
- children: /*#__PURE__*/React.createElement(CheckmarkFilled, null)
42
+ checked: !!checked,
43
+ input: {
44
+ name: useId('table-selection-radio')
45
+ }
36
46
  }
37
47
  }),
38
48
  type,
39
- checked: (_b = props.checked) !== null && _b !== void 0 ? _b : false
49
+ checked,
50
+ noNativeElements,
51
+ subtle,
52
+ hidden
40
53
  };
41
54
  };
42
55
  //# sourceMappingURL=useTableSelectionCell.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableSelectionCell/useTableSelectionCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,gBAAT,QAAiC,2BAAjC;AACA,SAAS,QAAT,QAAyB,0BAAzB;AACA,SAAS,eAAT,QAAgC,uBAAhC;AAEA,SAAS,qBAAT,QAAsC,2BAAtC;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,8BAA8B,GAAG,CAC5C,KAD4C,EAE5C,GAF4C,KAGjB;;;EAC3B,MAAM,cAAc,GAAG,qBAAqB,CAAC,KAAD,EAAQ,GAAR,CAA5C;EACA,MAAM,IAAI,GAAG,CAAA,EAAA,GAAA,KAAK,CAAC,IAAN,MAAU,IAAV,IAAU,EAAA,KAAA,KAAA,CAAV,GAAU,EAAV,GAAc,UAA3B;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,QAAQ,eAAE,KAAA,CAAA,aAAA,CAAC,eAAD,EAAgB,IAAhB;MAAZ;IAFuC,CAAvB,CAX3B;IAeL,IAfK;IAgBL,OAAO,EAAE,CAAA,EAAA,GAAA,KAAK,CAAC,OAAN,MAAa,IAAb,IAAa,EAAA,KAAA,KAAA,CAAb,GAAa,EAAb,GAAiB;EAhBrB,CAAP;AAkBD,CAzBM","sourcesContent":["import * as React from 'react';\nimport { resolveShorthand } from '@fluentui/react-utilities';\nimport { Checkbox } from '@fluentui/react-checkbox';\nimport { CheckmarkFilled } from '@fluentui/react-icons';\nimport type { TableSelectionCellProps, TableSelectionCellState } from './TableSelectionCell.types';\nimport { useTableCell_unstable } from '../TableCell/useTableCell';\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 type = props.type ?? 'checkbox';\n\n return {\n ...tableCellState,\n components: {\n ...tableCellState.components,\n checkboxIndicator: Checkbox,\n radioIndicator: 'span',\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: { children: <CheckmarkFilled /> },\n }),\n type,\n checked: props.checked ?? false,\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"]}
@@ -1,55 +1,87 @@
1
1
  import { __styles, mergeClasses, shorthands } from '@griffel/react';
2
+ import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';
3
+ import { tokens } from '@fluentui/react-theme';
2
4
  export const tableSelectionCellClassNames = {
3
5
  root: 'fui-TableSelectionCell',
4
6
  checkboxIndicator: 'fui-TableSelectionCell__checkboxIndicator',
5
7
  radioIndicator: 'fui-TableSelectionCell__radioIndicator'
6
8
  };
9
+ const useTableLayoutStyles = /*#__PURE__*/__styles({
10
+ root: {
11
+ mc9l5x: "f15pt5es",
12
+ a9b677: "fksc0bp"
13
+ }
14
+ }, {
15
+ d: [".f15pt5es{display:table-cell;}", ".fksc0bp{width:44px;}"]
16
+ });
17
+ const useFlexLayoutStyles = /*#__PURE__*/__styles({
18
+ root: {
19
+ mc9l5x: "f22iagw",
20
+ Bh6795r: "fqerorx",
21
+ Bnnss6s: "f1neuvcm",
22
+ xawz: "fkjuxzh",
23
+ Bf4jedk: "fvrlu0f",
24
+ B2u0y6b: "f1c71y05",
25
+ Brf1p80: "f4d9j23"
26
+ }
27
+ }, {
28
+ d: [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f1neuvcm{-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;}", ".fkjuxzh{-webkit-flex-basis:0px;-ms-flex-preferred-size:0px;flex-basis:0px;}", ".fvrlu0f{min-width:44px;}", ".f1c71y05{max-width:44px;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}"]
29
+ });
7
30
  /**
8
31
  * Styles for the root slot
9
32
  */
10
-
11
33
  const useStyles = /*#__PURE__*/__styles({
12
- "root": {
13
- "a9b677": "fksc0bp",
14
- "fsow6f": "f17mccla",
15
- "Huce71": "fz5stix",
16
- "z8tnut": "f1g0x7ka",
17
- "z189sj": ["fhxju0i", "f1cnd47f"],
18
- "Byoj8tv": "f1qch9an",
19
- "uwmqm3": ["f1cnd47f", "fhxju0i"],
20
- "mc9l5x": "f15pt5es"
34
+ root: {
35
+ fsow6f: "f17mccla",
36
+ Huce71: "fz5stix",
37
+ z8tnut: "f1g0x7ka",
38
+ z189sj: ["fhxju0i", "f1cnd47f"],
39
+ Byoj8tv: "f1qch9an",
40
+ uwmqm3: ["f1cnd47f", "fhxju0i"],
41
+ Bn4voq9: "fz36nt7",
42
+ g9k6zt: "f9znhxp",
43
+ Bfpq7zp: "fqrak0z",
44
+ kdpuga: ["f1o2ludy", "f1kjnpwc"],
45
+ Bw81rd7: ["f1kjnpwc", "f1o2ludy"],
46
+ B6xbmo0: ["fxmnebo", "f1witrsb"],
47
+ dm238s: ["f1witrsb", "fxmnebo"]
48
+ },
49
+ radioIndicator: {
50
+ mc9l5x: "f22iagw",
51
+ Bh6795r: "fqerorx",
52
+ Bt984gj: "f122n59",
53
+ Brf1p80: "f4d9j23"
21
54
  },
22
- "radioIndicator": {
23
- "mc9l5x": "f22iagw",
24
- "Bh6795r": "fqerorx",
25
- "Bt984gj": "f122n59",
26
- "Brf1p80": "f4d9j23",
27
- "B5pe6w7": "f1cqkysu",
28
- "p4uzdd": "f1sgf1mg"
55
+ subtle: {
56
+ abs64n: "fk73vx1",
57
+ Brovlpu: "ftqa4ok",
58
+ B486eqv: "f2hkw1w",
59
+ B8a84jv: "f1y7ij6c"
29
60
  },
30
- "hidden": {
31
- "Bcdw1i0": "fd7fpy0"
61
+ hidden: {
62
+ Bcdw1i0: "fd7fpy0"
32
63
  }
33
64
  }, {
34
- "d": [".fksc0bp{width:44px;}", ".f17mccla{text-align:center;}", ".fz5stix{white-space:nowrap;}", ".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".f15pt5es{display:table-cell;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".f1cqkysu svg{width:16px;}", ".f1sgf1mg svg{height:16px;}", ".fd7fpy0{visibility:hidden;}"]
65
+ d: [".f17mccla{text-align:center;}", ".fz5stix{white-space:nowrap;}", ".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".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);}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".fk73vx1{opacity:0;}", ".f1y7ij6c[data-fui-focus-within]:focus-within{opacity:1;}", ".fd7fpy0{visibility:hidden;}"],
66
+ f: [".ftqa4ok:focus{outline-style:none;}"],
67
+ i: [".f2hkw1w:focus-visible{outline-style:none;}"]
35
68
  });
36
69
  /**
37
70
  * Apply styling to the TableSelectionCell slots based on the state
38
71
  */
39
-
40
-
41
72
  export const useTableSelectionCellStyles_unstable = state => {
42
73
  const styles = useStyles();
43
- state.root.className = mergeClasses(tableSelectionCellClassNames.root, styles.root, state.root.className);
44
-
74
+ const layoutStyles = {
75
+ table: useTableLayoutStyles(),
76
+ flex: useFlexLayoutStyles()
77
+ };
78
+ state.root.className = mergeClasses(tableSelectionCellClassNames.root, styles.root, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.subtle && state.checked === false && styles.subtle, state.hidden && styles.hidden, state.root.className);
45
79
  if (state.checkboxIndicator) {
46
80
  state.checkboxIndicator.className = mergeClasses(tableSelectionCellClassNames.checkboxIndicator, state.checkboxIndicator.className);
47
81
  }
48
-
49
82
  if (state.radioIndicator) {
50
- state.radioIndicator.className = mergeClasses(tableSelectionCellClassNames.radioIndicator, styles.radioIndicator, state.checked === false && styles.hidden, state.radioIndicator.className);
83
+ state.radioIndicator.className = mergeClasses(tableSelectionCellClassNames.radioIndicator, styles.radioIndicator, state.radioIndicator.className);
51
84
  }
52
-
53
85
  return state;
54
86
  };
55
87
  //# sourceMappingURL=useTableSelectionCellStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableSelectionCell/useTableSelectionCellStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,EAAmC,UAAnC,QAAqD,gBAArD;AAIA,OAAO,MAAM,4BAA4B,GAA4C;EACnF,IAAI,EAAE,wBAD6E;EAEnF,iBAAiB,EAAE,2CAFgE;EAGnF,cAAc,EAAE;AAHmE,CAA9E;AAMP;;AAEG;;AACH,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AAyBA;;AAEG;;;AACH,OAAO,MAAM,oCAAoC,GAAI,KAAD,IAA4D;EAC9G,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,4BAA4B,CAAC,IAA9B,EAAoC,MAAM,CAAC,IAA3C,EAAiD,KAAK,CAAC,IAAN,CAAW,SAA5D,CAAnC;;EACA,IAAI,KAAK,CAAC,iBAAV,EAA6B;IAC3B,KAAK,CAAC,iBAAN,CAAwB,SAAxB,GAAoC,YAAY,CAC9C,4BAA4B,CAAC,iBADiB,EAE9C,KAAK,CAAC,iBAAN,CAAwB,SAFsB,CAAhD;EAID;;EAED,IAAI,KAAK,CAAC,cAAV,EAA0B;IACxB,KAAK,CAAC,cAAN,CAAqB,SAArB,GAAiC,YAAY,CAC3C,4BAA4B,CAAC,cADc,EAE3C,MAAM,CAAC,cAFoC,EAG3C,KAAK,CAAC,OAAN,KAAkB,KAAlB,IAA2B,MAAM,CAAC,MAHS,EAI3C,KAAK,CAAC,cAAN,CAAqB,SAJsB,CAA7C;EAMD;;EAED,OAAO,KAAP;AACD,CApBM","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { TableSelectionCellSlots, TableSelectionCellState } from './TableSelectionCell.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableSelectionCellClassNames: SlotClassNames<TableSelectionCellSlots> = {\n root: 'fui-TableSelectionCell',\n checkboxIndicator: 'fui-TableSelectionCell__checkboxIndicator',\n radioIndicator: 'fui-TableSelectionCell__radioIndicator',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n width: '44px',\n textAlign: 'center',\n whiteSpace: 'nowrap',\n ...shorthands.padding(0),\n display: 'table-cell',\n },\n\n radioIndicator: {\n display: 'flex',\n flexGrow: 1,\n alignItems: 'center',\n justifyContent: 'center',\n '& svg': {\n width: '16px',\n height: '16px',\n },\n },\n\n hidden: {\n visibility: 'hidden',\n },\n});\n\n/**\n * Apply styling to the TableSelectionCell slots based on the state\n */\nexport const useTableSelectionCellStyles_unstable = (state: TableSelectionCellState): TableSelectionCellState => {\n const styles = useStyles();\n state.root.className = mergeClasses(tableSelectionCellClassNames.root, styles.root, state.root.className);\n if (state.checkboxIndicator) {\n state.checkboxIndicator.className = mergeClasses(\n tableSelectionCellClassNames.checkboxIndicator,\n state.checkboxIndicator.className,\n );\n }\n\n if (state.radioIndicator) {\n state.radioIndicator.className = mergeClasses(\n tableSelectionCellClassNames.radioIndicator,\n styles.radioIndicator,\n state.checked === false && styles.hidden,\n state.radioIndicator.className,\n );\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,mBAAqBA,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AAGrE,SAASC,+BAA+B,QAAQ,yBAAyB;AACzE,SAASC,MAAM,QAAQ,uBAAuB;AAE9C,OAAO,MAAMC,4BAA4B,GAA4C;EACnFC,IAAI,EAAE,wBAAwB;EAC9BC,iBAAiB,EAAE,2CAA2C;EAC9DC,cAAc,EAAE;CACjB;AAED,MAAMC,oBAAoB,gBAAG;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAK3B;AAEF,MAAMC,mBAAmB,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAQ1B;AAEF;;;AAGA,MAAMC,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;AAAA;EAAA;EAAA;EAAA;AAAA,EAkChB;AAEF;;;AAGA,OAAO,MAAMC,oCAAoC,GAAIC,KAA8B,IAA6B;EAC9G,MAAMC,MAAM,GAAGH,SAAS,EAAE;EAC1B,MAAMI,YAAY,GAAG;IACnBC,KAAK,EAAEP,oBAAoB,EAAE;IAC7BQ,IAAI,EAAEP,mBAAmB;GAC1B;EACDG,KAAK,CAACP,IAAI,CAACY,SAAS,GAAGjB,YAAY,CACjCI,4BAA4B,CAACC,IAAI,EACjCQ,MAAM,CAACR,IAAI,EACXO,KAAK,CAACM,gBAAgB,GAAGJ,YAAY,CAACE,IAAI,CAACX,IAAI,GAAGS,YAAY,CAACC,KAAK,CAACV,IAAI,EACzEO,KAAK,CAACO,MAAM,IAAIP,KAAK,CAACQ,OAAO,KAAK,KAAK,IAAIP,MAAM,CAACM,MAAM,EACxDP,KAAK,CAACS,MAAM,IAAIR,MAAM,CAACQ,MAAM,EAC7BT,KAAK,CAACP,IAAI,CAACY,SAAS,CACrB;EACD,IAAIL,KAAK,CAACN,iBAAiB,EAAE;IAC3BM,KAAK,CAACN,iBAAiB,CAACW,SAAS,GAAGjB,YAAY,CAC9CI,4BAA4B,CAACE,iBAAiB,EAC9CM,KAAK,CAACN,iBAAiB,CAACW,SAAS,CAClC;;EAGH,IAAIL,KAAK,CAACL,cAAc,EAAE;IACxBK,KAAK,CAACL,cAAc,CAACU,SAAS,GAAGjB,YAAY,CAC3CI,4BAA4B,CAACG,cAAc,EAC3CM,MAAM,CAACN,cAAc,EACrBK,KAAK,CAACL,cAAc,CAACU,SAAS,CAC/B;;EAGH,OAAOL,KAAK;AACd,CAAC","names":["mergeClasses","shorthands","createCustomFocusIndicatorStyle","tokens","tableSelectionCellClassNames","root","checkboxIndicator","radioIndicator","useTableLayoutStyles","useFlexLayoutStyles","useStyles","useTableSelectionCellStyles_unstable","state","styles","layoutStyles","table","flex","className","noNativeElements","subtle","checked","hidden"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableSelectionCell/useTableSelectionCellStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { TableSelectionCellSlots, TableSelectionCellState } from './TableSelectionCell.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\n\nexport const tableSelectionCellClassNames: SlotClassNames<TableSelectionCellSlots> = {\n root: 'fui-TableSelectionCell',\n checkboxIndicator: 'fui-TableSelectionCell__checkboxIndicator',\n radioIndicator: 'fui-TableSelectionCell__radioIndicator',\n};\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-cell',\n width: '44px',\n },\n});\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'flex',\n ...shorthands.flex(1, 1, '0px'),\n minWidth: '44px',\n maxWidth: '44px',\n justifyContent: 'center',\n },\n});\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n textAlign: 'center',\n whiteSpace: 'nowrap',\n ...shorthands.padding(0),\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 radioIndicator: {\n display: 'flex',\n flexGrow: 1,\n alignItems: 'center',\n justifyContent: 'center',\n },\n\n subtle: {\n opacity: 0,\n ...createCustomFocusIndicatorStyle(\n {\n opacity: 1,\n },\n { selector: 'focus-within' },\n ),\n },\n\n hidden: {\n visibility: 'hidden',\n },\n});\n\n/**\n * Apply styling to the TableSelectionCell slots based on the state\n */\nexport const useTableSelectionCellStyles_unstable = (state: TableSelectionCellState): TableSelectionCellState => {\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableSelectionCellClassNames.root,\n styles.root,\n state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,\n state.subtle && state.checked === false && styles.subtle,\n state.hidden && styles.hidden,\n state.root.className,\n );\n if (state.checkboxIndicator) {\n state.checkboxIndicator.className = mergeClasses(\n tableSelectionCellClassNames.checkboxIndicator,\n state.checkboxIndicator.className,\n );\n }\n\n if (state.radioIndicator) {\n state.radioIndicator.className = mergeClasses(\n tableSelectionCellClassNames.radioIndicator,\n styles.radioIndicator,\n state.radioIndicator.className,\n );\n }\n\n return state;\n};\n"]}
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ const columnIdContext = /*#__PURE__*/React.createContext(undefined);
3
+ export const columnIdContextDefaultValue = '';
4
+ export const useColumnIdContext = () => {
5
+ var _a;
6
+ return (_a = React.useContext(columnIdContext)) !== null && _a !== void 0 ? _a : columnIdContextDefaultValue;
7
+ };
8
+ export const ColumnIdContextProvider = columnIdContext.Provider;
9
+ //# sourceMappingURL=columnIdContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,MAAMC,eAAe,gBAAGD,KAAK,CAACE,aAAa,CAA4BC,SAAS,CAAC;AAEjF,OAAO,MAAMC,2BAA2B,GAAG,EAAE;AAE7C,OAAO,MAAMC,kBAAkB,GAAG,MAAK;EAAA;EAAC,kBAAK,CAACC,UAAU,CAACL,eAAe,CAAC,mCAAIG,2BAA2B;AAAA;AAExG,OAAO,MAAMG,uBAAuB,GAAGN,eAAe,CAACO,QAAQ","names":["React","columnIdContext","createContext","undefined","columnIdContextDefaultValue","useColumnIdContext","useContext","ColumnIdContextProvider","Provider"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/contexts/columnIdContext.ts"],"sourcesContent":["import * as React from 'react';\nimport type { TableColumnId } from '../hooks/';\n\nconst columnIdContext = React.createContext<TableColumnId | undefined>(undefined);\n\nexport const columnIdContextDefaultValue = '';\n\nexport const useColumnIdContext = () => React.useContext(columnIdContext) ?? columnIdContextDefaultValue;\n\nexport const ColumnIdContextProvider = columnIdContext.Provider;\n"]}