@fluentui/react-table 9.0.0-rc.5 → 9.0.0

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 (331) hide show
  1. package/CHANGELOG.json +72 -1
  2. package/CHANGELOG.md +23 -2
  3. package/dist/index.d.ts +27 -4
  4. package/lib/components/DataGrid/DataGrid.types.js.map +1 -1
  5. package/lib/components/DataGrid/useDataGrid.js +16 -4
  6. package/lib/components/DataGrid/useDataGrid.js.map +1 -1
  7. package/lib/components/DataGrid/useDataGridContextValues.js +2 -1
  8. package/lib/components/DataGrid/useDataGridContextValues.js.map +1 -1
  9. package/lib/components/DataGridCell/useDataGridCell.js +5 -0
  10. package/lib/components/DataGridCell/useDataGridCell.js.map +1 -1
  11. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js +3 -0
  12. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
  13. package/lib/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
  14. package/lib/components/TableCellLayout/useTableCellLayout.js +1 -0
  15. package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  16. package/lib/components/TableCellLayout/useTableCellLayoutStyles.js +18 -4
  17. package/lib/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
  18. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js +1 -0
  19. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
  20. package/lib/hooks/types.js.map +1 -1
  21. package/lib/hooks/useTableColumnResizeMouseHandler.js +4 -1
  22. package/lib/hooks/useTableColumnResizeMouseHandler.js.map +1 -1
  23. package/lib/hooks/useTableColumnResizeState.js +11 -2
  24. package/lib/hooks/useTableColumnResizeState.js.map +1 -1
  25. package/lib/hooks/useTableColumnSizing.js +5 -2
  26. package/lib/hooks/useTableColumnSizing.js.map +1 -1
  27. package/lib/utils/columnResizeUtils.js +6 -6
  28. package/lib/utils/columnResizeUtils.js.map +1 -1
  29. package/lib-amd/DataGrid.js +6 -0
  30. package/lib-amd/DataGrid.js.map +1 -0
  31. package/lib-amd/DataGridBody.js +6 -0
  32. package/lib-amd/DataGridBody.js.map +1 -0
  33. package/lib-amd/DataGridCell.js +6 -0
  34. package/lib-amd/DataGridCell.js.map +1 -0
  35. package/lib-amd/DataGridHeader.js +6 -0
  36. package/lib-amd/DataGridHeader.js.map +1 -0
  37. package/lib-amd/DataGridHeaderCell.js +6 -0
  38. package/lib-amd/DataGridHeaderCell.js.map +1 -0
  39. package/lib-amd/DataGridRow.js +6 -0
  40. package/lib-amd/DataGridRow.js.map +1 -0
  41. package/lib-amd/DataGridSelectionCell.js +6 -0
  42. package/lib-amd/DataGridSelectionCell.js.map +1 -0
  43. package/lib-amd/Table.js +6 -0
  44. package/lib-amd/Table.js.map +1 -0
  45. package/lib-amd/TableBody.js +6 -0
  46. package/lib-amd/TableBody.js.map +1 -0
  47. package/lib-amd/TableCell.js +6 -0
  48. package/lib-amd/TableCell.js.map +1 -0
  49. package/lib-amd/TableCellActions.js +6 -0
  50. package/lib-amd/TableCellActions.js.map +1 -0
  51. package/lib-amd/TableCellLayout.js +6 -0
  52. package/lib-amd/TableCellLayout.js.map +1 -0
  53. package/lib-amd/TableHeader.js +6 -0
  54. package/lib-amd/TableHeader.js.map +1 -0
  55. package/lib-amd/TableHeaderCell.js +6 -0
  56. package/lib-amd/TableHeaderCell.js.map +1 -0
  57. package/lib-amd/TableResizeHandle.js +6 -0
  58. package/lib-amd/TableResizeHandle.js.map +1 -0
  59. package/lib-amd/TableRow.js +6 -0
  60. package/lib-amd/TableRow.js.map +1 -0
  61. package/lib-amd/TableSelectionCell.js +6 -0
  62. package/lib-amd/TableSelectionCell.js.map +1 -0
  63. package/lib-amd/components/DataGrid/DataGrid.js +15 -0
  64. package/lib-amd/components/DataGrid/DataGrid.js.map +1 -0
  65. package/lib-amd/components/DataGrid/DataGrid.types.js +5 -0
  66. package/lib-amd/components/DataGrid/DataGrid.types.js.map +1 -0
  67. package/lib-amd/components/DataGrid/index.js +11 -0
  68. package/lib-amd/components/DataGrid/index.js.map +1 -0
  69. package/lib-amd/components/DataGrid/renderDataGrid.js +13 -0
  70. package/lib-amd/components/DataGrid/renderDataGrid.js.map +1 -0
  71. package/lib-amd/components/DataGrid/useDataGrid.js +43 -0
  72. package/lib-amd/components/DataGrid/useDataGrid.js.map +1 -0
  73. package/lib-amd/components/DataGrid/useDataGridContextValues.js +11 -0
  74. package/lib-amd/components/DataGrid/useDataGridContextValues.js.map +1 -0
  75. package/lib-amd/components/DataGrid/useDataGridStyles.js +18 -0
  76. package/lib-amd/components/DataGrid/useDataGridStyles.js.map +1 -0
  77. package/lib-amd/components/DataGridBody/DataGridBody.js +15 -0
  78. package/lib-amd/components/DataGridBody/DataGridBody.js.map +1 -0
  79. package/lib-amd/components/DataGridBody/DataGridBody.types.js +5 -0
  80. package/lib-amd/components/DataGridBody/DataGridBody.types.js.map +1 -0
  81. package/lib-amd/components/DataGridBody/index.js +10 -0
  82. package/lib-amd/components/DataGridBody/index.js.map +1 -0
  83. package/lib-amd/components/DataGridBody/renderDataGridBody.js +14 -0
  84. package/lib-amd/components/DataGridBody/renderDataGridBody.js.map +1 -0
  85. package/lib-amd/components/DataGridBody/useDataGridBody.js +24 -0
  86. package/lib-amd/components/DataGridBody/useDataGridBody.js.map +1 -0
  87. package/lib-amd/components/DataGridBody/useDataGridBodyStyles.js +18 -0
  88. package/lib-amd/components/DataGridBody/useDataGridBodyStyles.js.map +1 -0
  89. package/lib-amd/components/DataGridCell/DataGridCell.js +15 -0
  90. package/lib-amd/components/DataGridCell/DataGridCell.js.map +1 -0
  91. package/lib-amd/components/DataGridCell/DataGridCell.types.js +5 -0
  92. package/lib-amd/components/DataGridCell/DataGridCell.types.js.map +1 -0
  93. package/lib-amd/components/DataGridCell/index.js +10 -0
  94. package/lib-amd/components/DataGridCell/index.js.map +1 -0
  95. package/lib-amd/components/DataGridCell/renderDataGridCell.js +13 -0
  96. package/lib-amd/components/DataGridCell/renderDataGridCell.js.map +1 -0
  97. package/lib-amd/components/DataGridCell/useDataGridCell.js +23 -0
  98. package/lib-amd/components/DataGridCell/useDataGridCell.js.map +1 -0
  99. package/lib-amd/components/DataGridCell/useDataGridCellStyles.js +18 -0
  100. package/lib-amd/components/DataGridCell/useDataGridCellStyles.js.map +1 -0
  101. package/lib-amd/components/DataGridHeader/DataGridHeader.js +15 -0
  102. package/lib-amd/components/DataGridHeader/DataGridHeader.js.map +1 -0
  103. package/lib-amd/components/DataGridHeader/DataGridHeader.types.js +5 -0
  104. package/lib-amd/components/DataGridHeader/DataGridHeader.types.js.map +1 -0
  105. package/lib-amd/components/DataGridHeader/index.js +10 -0
  106. package/lib-amd/components/DataGridHeader/index.js.map +1 -0
  107. package/lib-amd/components/DataGridHeader/renderDataGridHeader.js +13 -0
  108. package/lib-amd/components/DataGridHeader/renderDataGridHeader.js.map +1 -0
  109. package/lib-amd/components/DataGridHeader/useDataGridHeader.js +19 -0
  110. package/lib-amd/components/DataGridHeader/useDataGridHeader.js.map +1 -0
  111. package/lib-amd/components/DataGridHeader/useDataGridHeaderStyles.js +18 -0
  112. package/lib-amd/components/DataGridHeader/useDataGridHeaderStyles.js.map +1 -0
  113. package/lib-amd/components/DataGridHeaderCell/DataGridHeaderCell.js +15 -0
  114. package/lib-amd/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -0
  115. package/lib-amd/components/DataGridHeaderCell/DataGridHeaderCell.types.js +5 -0
  116. package/lib-amd/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -0
  117. package/lib-amd/components/DataGridHeaderCell/index.js +10 -0
  118. package/lib-amd/components/DataGridHeaderCell/index.js.map +1 -0
  119. package/lib-amd/components/DataGridHeaderCell/renderDataGridHeaderCell.js +13 -0
  120. package/lib-amd/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -0
  121. package/lib-amd/components/DataGridHeaderCell/useDataGridHeaderCell.js +34 -0
  122. package/lib-amd/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -0
  123. package/lib-amd/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +30 -0
  124. package/lib-amd/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -0
  125. package/lib-amd/components/DataGridRow/DataGridRow.js +15 -0
  126. package/lib-amd/components/DataGridRow/DataGridRow.js.map +1 -0
  127. package/lib-amd/components/DataGridRow/DataGridRow.types.js +5 -0
  128. package/lib-amd/components/DataGridRow/DataGridRow.types.js.map +1 -0
  129. package/lib-amd/components/DataGridRow/index.js +10 -0
  130. package/lib-amd/components/DataGridRow/index.js.map +1 -0
  131. package/lib-amd/components/DataGridRow/renderDataGridRow.js +16 -0
  132. package/lib-amd/components/DataGridRow/renderDataGridRow.js.map +1 -0
  133. package/lib-amd/components/DataGridRow/useDataGridRow.js +49 -0
  134. package/lib-amd/components/DataGridRow/useDataGridRow.js.map +1 -0
  135. package/lib-amd/components/DataGridRow/useDataGridRowStyles.js +22 -0
  136. package/lib-amd/components/DataGridRow/useDataGridRowStyles.js.map +1 -0
  137. package/lib-amd/components/DataGridSelectionCell/DataGridSelectionCell.js +15 -0
  138. package/lib-amd/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -0
  139. package/lib-amd/components/DataGridSelectionCell/DataGridSelectionCell.types.js +5 -0
  140. package/lib-amd/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -0
  141. package/lib-amd/components/DataGridSelectionCell/index.js +10 -0
  142. package/lib-amd/components/DataGridSelectionCell/index.js.map +1 -0
  143. package/lib-amd/components/DataGridSelectionCell/renderDataGridSelectionCell.js +13 -0
  144. package/lib-amd/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -0
  145. package/lib-amd/components/DataGridSelectionCell/useDataGridSelectionCell.js +39 -0
  146. package/lib-amd/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -0
  147. package/lib-amd/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js +26 -0
  148. package/lib-amd/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js.map +1 -0
  149. package/lib-amd/components/Table/Table.js +15 -0
  150. package/lib-amd/components/Table/Table.js.map +1 -0
  151. package/lib-amd/components/Table/Table.types.js +5 -0
  152. package/lib-amd/components/Table/Table.types.js.map +1 -0
  153. package/lib-amd/components/Table/index.js +10 -0
  154. package/lib-amd/components/Table/index.js.map +1 -0
  155. package/lib-amd/components/Table/renderTable.js +15 -0
  156. package/lib-amd/components/Table/renderTable.js.map +1 -0
  157. package/lib-amd/components/Table/useTable.js +29 -0
  158. package/lib-amd/components/Table/useTable.js.map +1 -0
  159. package/lib-amd/components/Table/useTableContextValues.js +18 -0
  160. package/lib-amd/components/Table/useTableContextValues.js.map +1 -0
  161. package/lib-amd/components/Table/useTableStyles.js +45 -0
  162. package/lib-amd/components/Table/useTableStyles.js.map +1 -0
  163. package/lib-amd/components/TableBody/TableBody.js +15 -0
  164. package/lib-amd/components/TableBody/TableBody.js.map +1 -0
  165. package/lib-amd/components/TableBody/TableBody.types.js +5 -0
  166. package/lib-amd/components/TableBody/TableBody.types.js.map +1 -0
  167. package/lib-amd/components/TableBody/index.js +10 -0
  168. package/lib-amd/components/TableBody/index.js.map +1 -0
  169. package/lib-amd/components/TableBody/renderTableBody.js +14 -0
  170. package/lib-amd/components/TableBody/renderTableBody.js.map +1 -0
  171. package/lib-amd/components/TableBody/useTableBody.js +28 -0
  172. package/lib-amd/components/TableBody/useTableBody.js.map +1 -0
  173. package/lib-amd/components/TableBody/useTableBodyStyles.js +32 -0
  174. package/lib-amd/components/TableBody/useTableBodyStyles.js.map +1 -0
  175. package/lib-amd/components/TableCell/TableCell.js +15 -0
  176. package/lib-amd/components/TableCell/TableCell.js.map +1 -0
  177. package/lib-amd/components/TableCell/TableCell.types.js +5 -0
  178. package/lib-amd/components/TableCell/TableCell.types.js.map +1 -0
  179. package/lib-amd/components/TableCell/index.js +10 -0
  180. package/lib-amd/components/TableCell/index.js.map +1 -0
  181. package/lib-amd/components/TableCell/renderTableCell.js +14 -0
  182. package/lib-amd/components/TableCell/renderTableCell.js.map +1 -0
  183. package/lib-amd/components/TableCell/useTableCell.js +29 -0
  184. package/lib-amd/components/TableCell/useTableCell.js.map +1 -0
  185. package/lib-amd/components/TableCell/useTableCellStyles.js +56 -0
  186. package/lib-amd/components/TableCell/useTableCellStyles.js.map +1 -0
  187. package/lib-amd/components/TableCellActions/TableCellActions.js +15 -0
  188. package/lib-amd/components/TableCellActions/TableCellActions.js.map +1 -0
  189. package/lib-amd/components/TableCellActions/TableCellActions.types.js +5 -0
  190. package/lib-amd/components/TableCellActions/TableCellActions.types.js.map +1 -0
  191. package/lib-amd/components/TableCellActions/index.js +10 -0
  192. package/lib-amd/components/TableCellActions/index.js.map +1 -0
  193. package/lib-amd/components/TableCellActions/renderTableCellActions.js +14 -0
  194. package/lib-amd/components/TableCellActions/renderTableCellActions.js.map +1 -0
  195. package/lib-amd/components/TableCellActions/useTableCellActions.js +26 -0
  196. package/lib-amd/components/TableCellActions/useTableCellActions.js.map +1 -0
  197. package/lib-amd/components/TableCellActions/useTableCellActionsStyles.js +35 -0
  198. package/lib-amd/components/TableCellActions/useTableCellActionsStyles.js.map +1 -0
  199. package/lib-amd/components/TableCellLayout/TableCellLayout.js +15 -0
  200. package/lib-amd/components/TableCellLayout/TableCellLayout.js.map +1 -0
  201. package/lib-amd/components/TableCellLayout/TableCellLayout.types.js +5 -0
  202. package/lib-amd/components/TableCellLayout/TableCellLayout.types.js.map +1 -0
  203. package/lib-amd/components/TableCellLayout/index.js +10 -0
  204. package/lib-amd/components/TableCellLayout/index.js.map +1 -0
  205. package/lib-amd/components/TableCellLayout/renderTableCellLayout.js +19 -0
  206. package/lib-amd/components/TableCellLayout/renderTableCellLayout.js.map +1 -0
  207. package/lib-amd/components/TableCellLayout/useTableCellLayout.js +42 -0
  208. package/lib-amd/components/TableCellLayout/useTableCellLayout.js.map +1 -0
  209. package/lib-amd/components/TableCellLayout/useTableCellLayoutContextValues.js +16 -0
  210. package/lib-amd/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -0
  211. package/lib-amd/components/TableCellLayout/useTableCellLayoutStyles.js +79 -0
  212. package/lib-amd/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -0
  213. package/lib-amd/components/TableHeader/TableHeader.js +15 -0
  214. package/lib-amd/components/TableHeader/TableHeader.js.map +1 -0
  215. package/lib-amd/components/TableHeader/TableHeader.types.js +5 -0
  216. package/lib-amd/components/TableHeader/TableHeader.types.js.map +1 -0
  217. package/lib-amd/components/TableHeader/index.js +10 -0
  218. package/lib-amd/components/TableHeader/index.js.map +1 -0
  219. package/lib-amd/components/TableHeader/renderTableHeader.js +15 -0
  220. package/lib-amd/components/TableHeader/renderTableHeader.js.map +1 -0
  221. package/lib-amd/components/TableHeader/useTableHeader.js +28 -0
  222. package/lib-amd/components/TableHeader/useTableHeader.js.map +1 -0
  223. package/lib-amd/components/TableHeader/useTableHeaderStyles.js +32 -0
  224. package/lib-amd/components/TableHeader/useTableHeaderStyles.js.map +1 -0
  225. package/lib-amd/components/TableHeaderCell/TableHeaderCell.js +15 -0
  226. package/lib-amd/components/TableHeaderCell/TableHeaderCell.js.map +1 -0
  227. package/lib-amd/components/TableHeaderCell/TableHeaderCell.types.js +5 -0
  228. package/lib-amd/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -0
  229. package/lib-amd/components/TableHeaderCell/index.js +10 -0
  230. package/lib-amd/components/TableHeaderCell/index.js.map +1 -0
  231. package/lib-amd/components/TableHeaderCell/renderTableHeaderCell.js +18 -0
  232. package/lib-amd/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -0
  233. package/lib-amd/components/TableHeaderCell/useTableHeaderCell.js +48 -0
  234. package/lib-amd/components/TableHeaderCell/useTableHeaderCell.js.map +1 -0
  235. package/lib-amd/components/TableHeaderCell/useTableHeaderCellStyles.js +67 -0
  236. package/lib-amd/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -0
  237. package/lib-amd/components/TableResizeHandle/TableResizeHandle.js +15 -0
  238. package/lib-amd/components/TableResizeHandle/TableResizeHandle.js.map +1 -0
  239. package/lib-amd/components/TableResizeHandle/TableResizeHandle.types.js +5 -0
  240. package/lib-amd/components/TableResizeHandle/TableResizeHandle.types.js.map +1 -0
  241. package/lib-amd/components/TableResizeHandle/index.js +10 -0
  242. package/lib-amd/components/TableResizeHandle/index.js.map +1 -0
  243. package/lib-amd/components/TableResizeHandle/renderTableResizeHandle.js +14 -0
  244. package/lib-amd/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -0
  245. package/lib-amd/components/TableResizeHandle/useTableResizeHandle.js +29 -0
  246. package/lib-amd/components/TableResizeHandle/useTableResizeHandle.js.map +1 -0
  247. package/lib-amd/components/TableResizeHandle/useTableResizeHandleStyles.js +37 -0
  248. package/lib-amd/components/TableResizeHandle/useTableResizeHandleStyles.js.map +1 -0
  249. package/lib-amd/components/TableRow/TableRow.js +15 -0
  250. package/lib-amd/components/TableRow/TableRow.js.map +1 -0
  251. package/lib-amd/components/TableRow/TableRow.types.js +5 -0
  252. package/lib-amd/components/TableRow/TableRow.types.js.map +1 -0
  253. package/lib-amd/components/TableRow/index.js +10 -0
  254. package/lib-amd/components/TableRow/index.js.map +1 -0
  255. package/lib-amd/components/TableRow/renderTableRow.js +14 -0
  256. package/lib-amd/components/TableRow/renderTableRow.js.map +1 -0
  257. package/lib-amd/components/TableRow/useTableRow.js +34 -0
  258. package/lib-amd/components/TableRow/useTableRow.js.map +1 -0
  259. package/lib-amd/components/TableRow/useTableRowStyles.js +98 -0
  260. package/lib-amd/components/TableRow/useTableRowStyles.js.map +1 -0
  261. package/lib-amd/components/TableSelectionCell/TableSelectionCell.js +15 -0
  262. package/lib-amd/components/TableSelectionCell/TableSelectionCell.js.map +1 -0
  263. package/lib-amd/components/TableSelectionCell/TableSelectionCell.types.js +5 -0
  264. package/lib-amd/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -0
  265. package/lib-amd/components/TableSelectionCell/index.js +10 -0
  266. package/lib-amd/components/TableSelectionCell/index.js.map +1 -0
  267. package/lib-amd/components/TableSelectionCell/renderTableSelectionCell.js +16 -0
  268. package/lib-amd/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -0
  269. package/lib-amd/components/TableSelectionCell/useTableSelectionCell.js +28 -0
  270. package/lib-amd/components/TableSelectionCell/useTableSelectionCell.js.map +1 -0
  271. package/lib-amd/components/TableSelectionCell/useTableSelectionCellStyles.js +58 -0
  272. package/lib-amd/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -0
  273. package/lib-amd/contexts/columnIdContext.js +11 -0
  274. package/lib-amd/contexts/columnIdContext.js.map +1 -0
  275. package/lib-amd/contexts/dataGridContext.js +16 -0
  276. package/lib-amd/contexts/dataGridContext.js.map +1 -0
  277. package/lib-amd/contexts/rowIdContext.js +11 -0
  278. package/lib-amd/contexts/rowIdContext.js.map +1 -0
  279. package/lib-amd/contexts/tableContext.js +15 -0
  280. package/lib-amd/contexts/tableContext.js.map +1 -0
  281. package/lib-amd/contexts/tableHeaderContext.js +11 -0
  282. package/lib-amd/contexts/tableHeaderContext.js.map +1 -0
  283. package/lib-amd/hooks/createColumn.js +36 -0
  284. package/lib-amd/hooks/createColumn.js.map +1 -0
  285. package/lib-amd/hooks/index.js +11 -0
  286. package/lib-amd/hooks/index.js.map +1 -0
  287. package/lib-amd/hooks/selectionManager.js +82 -0
  288. package/lib-amd/hooks/selectionManager.js.map +1 -0
  289. package/lib-amd/hooks/types.js +5 -0
  290. package/lib-amd/hooks/types.js.map +1 -0
  291. package/lib-amd/hooks/useMeasureElement.js +46 -0
  292. package/lib-amd/hooks/useMeasureElement.js.map +1 -0
  293. package/lib-amd/hooks/useTableColumnResizeMouseHandler.js +50 -0
  294. package/lib-amd/hooks/useTableColumnResizeMouseHandler.js.map +1 -0
  295. package/lib-amd/hooks/useTableColumnResizeState.js +73 -0
  296. package/lib-amd/hooks/useTableColumnResizeState.js.map +1 -0
  297. package/lib-amd/hooks/useTableColumnSizing.js +56 -0
  298. package/lib-amd/hooks/useTableColumnSizing.js.map +1 -0
  299. package/lib-amd/hooks/useTableFeatures.js +39 -0
  300. package/lib-amd/hooks/useTableFeatures.js.map +1 -0
  301. package/lib-amd/hooks/useTableSelection.js +70 -0
  302. package/lib-amd/hooks/useTableSelection.js.map +1 -0
  303. package/lib-amd/hooks/useTableSort.js +74 -0
  304. package/lib-amd/hooks/useTableSort.js.map +1 -0
  305. package/lib-amd/index.js +107 -0
  306. package/lib-amd/index.js.map +1 -0
  307. package/lib-amd/utils/columnResizeUtils.js +158 -0
  308. package/lib-amd/utils/columnResizeUtils.js.map +1 -0
  309. package/lib-commonjs/components/DataGrid/useDataGrid.js +15 -3
  310. package/lib-commonjs/components/DataGrid/useDataGrid.js.map +1 -1
  311. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js +2 -1
  312. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js.map +1 -1
  313. package/lib-commonjs/components/DataGridCell/useDataGridCell.js +5 -0
  314. package/lib-commonjs/components/DataGridCell/useDataGridCell.js.map +1 -1
  315. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js +3 -0
  316. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
  317. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +1 -0
  318. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  319. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js +18 -4
  320. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
  321. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js +2 -1
  322. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
  323. package/lib-commonjs/hooks/useTableColumnResizeMouseHandler.js +4 -1
  324. package/lib-commonjs/hooks/useTableColumnResizeMouseHandler.js.map +1 -1
  325. package/lib-commonjs/hooks/useTableColumnResizeState.js +11 -2
  326. package/lib-commonjs/hooks/useTableColumnResizeState.js.map +1 -1
  327. package/lib-commonjs/hooks/useTableColumnSizing.js +5 -2
  328. package/lib-commonjs/hooks/useTableColumnSizing.js.map +1 -1
  329. package/lib-commonjs/utils/columnResizeUtils.js +6 -6
  330. package/lib-commonjs/utils/columnResizeUtils.js.map +1 -1
  331. package/package.json +9 -11
@@ -0,0 +1,79 @@
1
+ define(["require", "exports", "tslib", "@griffel/react", "@fluentui/react-theme", "@fluentui/react-theme"], function (require, exports, tslib_1, react_1, react_theme_1, react_theme_2) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.useTableCellLayoutStyles_unstable = exports.tableCellLayoutClassNames = void 0;
5
+ exports.tableCellLayoutClassNames = {
6
+ root: 'fui-TableCellLayout',
7
+ media: 'fui-TableCellLayout__media',
8
+ main: 'fui-TableCellLayout__main',
9
+ description: 'fui-TableCellLayout__description',
10
+ content: 'fui-TableCellLayout__content',
11
+ };
12
+ /**
13
+ * Styles for the root slot
14
+ */
15
+ var useStyles = react_1.makeStyles({
16
+ root: tslib_1.__assign(tslib_1.__assign({ display: 'flex', alignItems: 'center' }, react_1.shorthands.gap(react_theme_1.tokens.spacingHorizontalS)), react_1.shorthands.flex(1, 1, '0px')),
17
+ rootTruncate: {
18
+ overflowX: 'hidden',
19
+ },
20
+ content: {
21
+ display: 'flex',
22
+ flexDirection: 'column',
23
+ },
24
+ contentTruncate: {
25
+ overflowX: 'hidden',
26
+ },
27
+ media: {
28
+ display: 'flex',
29
+ alignItems: 'center',
30
+ },
31
+ mediaExtraSmall: {
32
+ fontSize: '16px',
33
+ },
34
+ mediaSmallAndMedium: {
35
+ fontSize: '20px',
36
+ },
37
+ mediaPrimary: {
38
+ fontSize: '24px',
39
+ },
40
+ mainPrimary: {
41
+ fontWeight: react_theme_1.tokens.fontWeightSemibold,
42
+ },
43
+ mainTruncate: {
44
+ overflowX: 'hidden',
45
+ whiteSpace: 'nowrap',
46
+ textOverflow: 'ellipsis',
47
+ },
48
+ description: tslib_1.__assign({ color: react_theme_1.tokens.colorNeutralForeground2 }, react_theme_2.typographyStyles.caption1),
49
+ });
50
+ /**
51
+ * Apply styling to the TableCellLayout slots based on the state
52
+ */
53
+ var useTableCellLayoutStyles_unstable = function (state) {
54
+ var styles = useStyles();
55
+ var truncate = state.truncate;
56
+ state.root.className = react_1.mergeClasses(exports.tableCellLayoutClassNames.root, styles.root, truncate && styles.rootTruncate, state.root.className);
57
+ var primary = state.appearance === 'primary';
58
+ if (state.media) {
59
+ var mediaSizedStyles = {
60
+ small: styles.mediaSmallAndMedium,
61
+ medium: styles.mediaSmallAndMedium,
62
+ 'extra-small': styles.mediaExtraSmall,
63
+ };
64
+ state.media.className = react_1.mergeClasses(exports.tableCellLayoutClassNames.media, styles.media, mediaSizedStyles[state.size], primary && styles.mediaPrimary, state.media.className);
65
+ }
66
+ if (state.main) {
67
+ state.main.className = react_1.mergeClasses(exports.tableCellLayoutClassNames.main, truncate && styles.mainTruncate, primary && styles.mainPrimary, state.main.className);
68
+ }
69
+ if (state.description) {
70
+ state.description.className = react_1.mergeClasses(exports.tableCellLayoutClassNames.description, styles.description, state.description.className);
71
+ }
72
+ if (state.content) {
73
+ state.content.className = react_1.mergeClasses(exports.tableCellLayoutClassNames.content, styles.content, truncate && styles.contentTruncate, state.content.className);
74
+ }
75
+ return state;
76
+ };
77
+ exports.useTableCellLayoutStyles_unstable = useTableCellLayoutStyles_unstable;
78
+ });
79
+ //# sourceMappingURL=useTableCellLayoutStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTableCellLayoutStyles.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableCellLayout/useTableCellLayoutStyles.ts"],"names":[],"mappings":"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","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { TableCellLayoutSlots, TableCellLayoutState } from './TableCellLayout.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { typographyStyles } from '@fluentui/react-theme';\n\nexport const tableCellLayoutClassNames: SlotClassNames<TableCellLayoutSlots> = {\n root: 'fui-TableCellLayout',\n media: 'fui-TableCellLayout__media',\n main: 'fui-TableCellLayout__main',\n description: 'fui-TableCellLayout__description',\n content: 'fui-TableCellLayout__content',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n ...shorthands.gap(tokens.spacingHorizontalS),\n ...shorthands.flex(1, 1, '0px'),\n },\n\n rootTruncate: {\n overflowX: 'hidden',\n },\n\n content: {\n display: 'flex',\n flexDirection: 'column',\n },\n\n contentTruncate: {\n overflowX: 'hidden',\n },\n\n media: {\n display: 'flex',\n alignItems: 'center',\n },\n\n mediaExtraSmall: {\n fontSize: '16px',\n },\n\n mediaSmallAndMedium: {\n fontSize: '20px',\n },\n\n mediaPrimary: {\n fontSize: '24px',\n },\n\n mainPrimary: {\n fontWeight: tokens.fontWeightSemibold,\n },\n\n mainTruncate: {\n overflowX: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n },\n\n description: {\n color: tokens.colorNeutralForeground2,\n ...typographyStyles.caption1,\n },\n});\n\n/**\n * Apply styling to the TableCellLayout slots based on the state\n */\nexport const useTableCellLayoutStyles_unstable = (state: TableCellLayoutState): TableCellLayoutState => {\n const styles = useStyles();\n const { truncate } = state;\n\n state.root.className = mergeClasses(\n tableCellLayoutClassNames.root,\n styles.root,\n truncate && styles.rootTruncate,\n state.root.className,\n );\n const primary = state.appearance === 'primary';\n\n if (state.media) {\n const mediaSizedStyles = {\n small: styles.mediaSmallAndMedium,\n medium: styles.mediaSmallAndMedium,\n 'extra-small': styles.mediaExtraSmall,\n };\n\n state.media.className = mergeClasses(\n tableCellLayoutClassNames.media,\n styles.media,\n mediaSizedStyles[state.size],\n primary && styles.mediaPrimary,\n state.media.className,\n );\n }\n\n if (state.main) {\n state.main.className = mergeClasses(\n tableCellLayoutClassNames.main,\n truncate && styles.mainTruncate,\n primary && styles.mainPrimary,\n state.main.className,\n );\n }\n\n if (state.description) {\n state.description.className = mergeClasses(\n tableCellLayoutClassNames.description,\n styles.description,\n state.description.className,\n );\n }\n\n if (state.content) {\n state.content.className = mergeClasses(\n tableCellLayoutClassNames.content,\n styles.content,\n truncate && styles.contentTruncate,\n state.content.className,\n );\n }\n\n return state;\n};\n"]}
@@ -0,0 +1,15 @@
1
+ define(["require", "exports", "react", "./useTableHeader", "./renderTableHeader", "./useTableHeaderStyles"], function (require, exports, React, useTableHeader_1, renderTableHeader_1, useTableHeaderStyles_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.TableHeader = void 0;
5
+ /**
6
+ * TableHeader component
7
+ */
8
+ exports.TableHeader = React.forwardRef(function (props, ref) {
9
+ var state = useTableHeader_1.useTableHeader_unstable(props, ref);
10
+ useTableHeaderStyles_1.useTableHeaderStyles_unstable(state);
11
+ return renderTableHeader_1.renderTableHeader_unstable(state);
12
+ });
13
+ exports.TableHeader.displayName = 'TableHeader';
14
+ });
15
+ //# sourceMappingURL=TableHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableHeader.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableHeader/TableHeader.tsx"],"names":[],"mappings":";;;;IAOA;;OAEG;IACU,QAAA,WAAW,GAA0C,KAAK,CAAC,UAAU,CAAC,UAAC,KAAK,EAAE,GAAG;QAC5F,IAAM,KAAK,GAAG,wCAAuB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAElD,oDAA6B,CAAC,KAAK,CAAC,CAAC;QACrC,OAAO,8CAA0B,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["import * as React from 'react';\nimport { useTableHeader_unstable } from './useTableHeader';\nimport { renderTableHeader_unstable } from './renderTableHeader';\nimport { useTableHeaderStyles_unstable } from './useTableHeaderStyles';\nimport type { TableHeaderProps } from './TableHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableHeader component\n */\nexport const TableHeader: ForwardRefComponent<TableHeaderProps> = React.forwardRef((props, ref) => {\n const state = useTableHeader_unstable(props, ref);\n\n useTableHeaderStyles_unstable(state);\n return renderTableHeader_unstable(state);\n});\n\nTableHeader.displayName = 'TableHeader';\n"]}
@@ -0,0 +1,5 @@
1
+ define(["require", "exports"], function (require, exports) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ });
5
+ //# sourceMappingURL=TableHeader.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableHeader.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableHeader/TableHeader.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableHeaderSlots = {\n root: Slot<'thead', 'div'>;\n};\n\n/**\n * TableHeader Props\n */\nexport type TableHeaderProps = ComponentProps<TableHeaderSlots> & {};\n\n/**\n * State used in rendering TableHeader\n */\nexport type TableHeaderState = ComponentState<TableHeaderSlots> & Pick<TableContextValue, 'noNativeElements'>;\n"]}
@@ -0,0 +1,10 @@
1
+ define(["require", "exports", "tslib", "./TableHeader", "./TableHeader.types", "./renderTableHeader", "./useTableHeader", "./useTableHeaderStyles"], function (require, exports, tslib_1, TableHeader_1, TableHeader_types_1, renderTableHeader_1, useTableHeader_1, useTableHeaderStyles_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ tslib_1.__exportStar(TableHeader_1, exports);
5
+ tslib_1.__exportStar(TableHeader_types_1, exports);
6
+ tslib_1.__exportStar(renderTableHeader_1, exports);
7
+ tslib_1.__exportStar(useTableHeader_1, exports);
8
+ tslib_1.__exportStar(useTableHeaderStyles_1, exports);
9
+ });
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableHeader/index.ts"],"names":[],"mappings":";;;IAAA,6CAA8B;IAC9B,mDAAoC;IACpC,mDAAoC;IACpC,gDAAiC;IACjC,sDAAuC","sourcesContent":["export * from './TableHeader';\nexport * from './TableHeader.types';\nexport * from './renderTableHeader';\nexport * from './useTableHeader';\nexport * from './useTableHeaderStyles';\n"]}
@@ -0,0 +1,15 @@
1
+ define(["require", "exports", "tslib", "react", "@fluentui/react-utilities", "../../contexts/tableHeaderContext"], function (require, exports, tslib_1, React, react_utilities_1, tableHeaderContext_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.renderTableHeader_unstable = void 0;
5
+ /**
6
+ * Render the final JSX of TableHeader
7
+ */
8
+ var renderTableHeader_unstable = function (state) {
9
+ var _a = react_utilities_1.getSlots(state), slots = _a.slots, slotProps = _a.slotProps;
10
+ return (React.createElement(tableHeaderContext_1.TableHeaderContextProvider, { value: "" },
11
+ React.createElement(slots.root, tslib_1.__assign({}, slotProps.root))));
12
+ };
13
+ exports.renderTableHeader_unstable = renderTableHeader_unstable;
14
+ });
15
+ //# sourceMappingURL=renderTableHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderTableHeader.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableHeader/renderTableHeader.tsx"],"names":[],"mappings":";;;;IAKA;;OAEG;IACI,IAAM,0BAA0B,GAAG,UAAC,KAAuB;QAC1D,IAAA,KAAuB,0BAAQ,CAAmB,KAAK,CAAC,EAAtD,KAAK,WAAA,EAAE,SAAS,eAAsC,CAAC;QAE/D,OAAO,CACL,oBAAC,+CAA0B,IAAC,KAAK,EAAC,EAAE;YAClC,oBAAC,KAAK,CAAC,IAAI,uBAAK,SAAS,CAAC,IAAI,EAAI,CACP,CAC9B,CAAC;IACJ,CAAC,CAAC;IARW,QAAA,0BAA0B,8BAQrC","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { TableHeaderContextProvider } from '../../contexts/tableHeaderContext';\nimport type { TableHeaderState, TableHeaderSlots } from './TableHeader.types';\n\n/**\n * Render the final JSX of TableHeader\n */\nexport const renderTableHeader_unstable = (state: TableHeaderState) => {\n const { slots, slotProps } = getSlots<TableHeaderSlots>(state);\n\n return (\n <TableHeaderContextProvider value=\"\">\n <slots.root {...slotProps.root} />\n </TableHeaderContextProvider>\n );\n};\n"]}
@@ -0,0 +1,28 @@
1
+ define(["require", "exports", "tslib", "@fluentui/react-utilities", "../../contexts/tableContext"], function (require, exports, tslib_1, react_utilities_1, tableContext_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.useTableHeader_unstable = void 0;
5
+ /**
6
+ * Create the state required to render TableHeader.
7
+ *
8
+ * The returned state can be modified with hooks such as useTableHeaderStyles_unstable,
9
+ * before being passed to renderTableHeader_unstable.
10
+ *
11
+ * @param props - props from this instance of TableHeader
12
+ * @param ref - reference to root HTMLElement of TableHeader
13
+ */
14
+ var useTableHeader_unstable = function (props, ref) {
15
+ var _a;
16
+ var noNativeElements = tableContext_1.useTableContext().noNativeElements;
17
+ var rootComponent = ((_a = props.as) !== null && _a !== void 0 ? _a : noNativeElements) ? 'div' : 'thead';
18
+ return {
19
+ components: {
20
+ root: rootComponent,
21
+ },
22
+ root: react_utilities_1.getNativeElementProps(rootComponent, tslib_1.__assign({ ref: ref, role: rootComponent === 'div' ? 'rowgroup' : undefined }, props)),
23
+ noNativeElements: noNativeElements,
24
+ };
25
+ };
26
+ exports.useTableHeader_unstable = useTableHeader_unstable;
27
+ });
28
+ //# sourceMappingURL=useTableHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTableHeader.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableHeader/useTableHeader.ts"],"names":[],"mappings":";;;;IAKA;;;;;;;;OAQG;IACI,IAAM,uBAAuB,GAAG,UAAC,KAAuB,EAAE,GAA2B;;QAClF,IAAA,gBAAgB,GAAK,8BAAe,EAAE,iBAAtB,CAAuB;QAE/C,IAAM,aAAa,GAAG,CAAA,MAAA,KAAK,CAAC,EAAE,mCAAI,gBAAgB,EAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC;QACrE,OAAO;YACL,UAAU,EAAE;gBACV,IAAI,EAAE,aAAa;aACpB;YACD,IAAI,EAAE,uCAAqB,CAAC,aAAa,qBACvC,GAAG,KAAA,EACH,IAAI,EAAE,aAAa,KAAK,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,IACnD,KAAK,EACR;YACF,gBAAgB,kBAAA;SACjB,CAAC;IACJ,CAAC,CAAC;IAfW,QAAA,uBAAuB,2BAelC","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { TableHeaderProps, TableHeaderState } from './TableHeader.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableHeader.\n *\n * The returned state can be modified with hooks such as useTableHeaderStyles_unstable,\n * before being passed to renderTableHeader_unstable.\n *\n * @param props - props from this instance of TableHeader\n * @param ref - reference to root HTMLElement of TableHeader\n */\nexport const useTableHeader_unstable = (props: TableHeaderProps, ref: React.Ref<HTMLElement>): TableHeaderState => {\n const { noNativeElements } = useTableContext();\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'thead';\n return {\n components: {\n root: rootComponent,\n },\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'rowgroup' : undefined,\n ...props,\n }),\n noNativeElements,\n };\n};\n"]}
@@ -0,0 +1,32 @@
1
+ define(["require", "exports", "@griffel/react"], function (require, exports, react_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.useTableHeaderStyles_unstable = exports.tableHeaderClassNames = exports.tableHeaderClassName = void 0;
5
+ exports.tableHeaderClassName = 'fui-TableHeader';
6
+ exports.tableHeaderClassNames = {
7
+ root: 'fui-TableHeader',
8
+ };
9
+ var useFlexLayoutStyles = react_1.makeStyles({
10
+ root: {
11
+ display: 'block',
12
+ },
13
+ });
14
+ var useTableLayoutStyles = react_1.makeStyles({
15
+ root: {
16
+ display: 'table-row-group',
17
+ },
18
+ });
19
+ /**
20
+ * Apply styling to the TableHeader slots based on the state
21
+ */
22
+ var useTableHeaderStyles_unstable = function (state) {
23
+ var layoutStyles = {
24
+ table: useTableLayoutStyles(),
25
+ flex: useFlexLayoutStyles(),
26
+ };
27
+ state.root.className = react_1.mergeClasses(exports.tableHeaderClassName, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.root.className);
28
+ return state;
29
+ };
30
+ exports.useTableHeaderStyles_unstable = useTableHeaderStyles_unstable;
31
+ });
32
+ //# sourceMappingURL=useTableHeaderStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTableHeaderStyles.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableHeader/useTableHeaderStyles.ts"],"names":[],"mappings":";;;;IAIa,QAAA,oBAAoB,GAAG,iBAAiB,CAAC;IACzC,QAAA,qBAAqB,GAAqC;QACrE,IAAI,EAAE,iBAAiB;KACxB,CAAC;IAEF,IAAM,mBAAmB,GAAG,kBAAU,CAAC;QACrC,IAAI,EAAE;YACJ,OAAO,EAAE,OAAO;SACjB;KACF,CAAC,CAAC;IAEH,IAAM,oBAAoB,GAAG,kBAAU,CAAC;QACtC,IAAI,EAAE;YACJ,OAAO,EAAE,iBAAiB;SAC3B;KACF,CAAC,CAAC;IAEH;;OAEG;IACI,IAAM,6BAA6B,GAAG,UAAC,KAAuB;QACnE,IAAM,YAAY,GAAG;YACnB,KAAK,EAAE,oBAAoB,EAAE;YAC7B,IAAI,EAAE,mBAAmB,EAAE;SAC5B,CAAC;QACF,KAAK,CAAC,IAAI,CAAC,SAAS,GAAG,oBAAY,CACjC,4BAAoB,EACpB,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,EACzE,KAAK,CAAC,IAAI,CAAC,SAAS,CACrB,CAAC;QAEF,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAZW,QAAA,6BAA6B,iCAYxC","sourcesContent":["import { mergeClasses, makeStyles } from '@griffel/react';\nimport type { TableHeaderSlots, TableHeaderState } from './TableHeader.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableHeaderClassName = 'fui-TableHeader';\nexport const tableHeaderClassNames: SlotClassNames<TableHeaderSlots> = {\n root: 'fui-TableHeader',\n};\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'block',\n },\n});\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-row-group',\n },\n});\n\n/**\n * Apply styling to the TableHeader slots based on the state\n */\nexport const useTableHeaderStyles_unstable = (state: TableHeaderState): TableHeaderState => {\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableHeaderClassName,\n state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,\n state.root.className,\n );\n\n return state;\n};\n"]}
@@ -0,0 +1,15 @@
1
+ define(["require", "exports", "react", "./useTableHeaderCell", "./renderTableHeaderCell", "./useTableHeaderCellStyles"], function (require, exports, React, useTableHeaderCell_1, renderTableHeaderCell_1, useTableHeaderCellStyles_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.TableHeaderCell = void 0;
5
+ /**
6
+ * TableHeaderCell component
7
+ */
8
+ exports.TableHeaderCell = React.forwardRef(function (props, ref) {
9
+ var state = useTableHeaderCell_1.useTableHeaderCell_unstable(props, ref);
10
+ useTableHeaderCellStyles_1.useTableHeaderCellStyles_unstable(state);
11
+ return renderTableHeaderCell_1.renderTableHeaderCell_unstable(state);
12
+ });
13
+ exports.TableHeaderCell.displayName = 'TableHeaderCell';
14
+ });
15
+ //# sourceMappingURL=TableHeaderCell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableHeaderCell.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableHeaderCell/TableHeaderCell.tsx"],"names":[],"mappings":";;;;IAOA;;OAEG;IACU,QAAA,eAAe,GAA8C,KAAK,CAAC,UAAU,CAAC,UAAC,KAAK,EAAE,GAAG;QACpG,IAAM,KAAK,GAAG,gDAA2B,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAEtD,4DAAiC,CAAC,KAAK,CAAC,CAAC;QACzC,OAAO,sDAA8B,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,uBAAe,CAAC,WAAW,GAAG,iBAAiB,CAAC","sourcesContent":["import * as React from 'react';\nimport { useTableHeaderCell_unstable } from './useTableHeaderCell';\nimport { renderTableHeaderCell_unstable } from './renderTableHeaderCell';\nimport { useTableHeaderCellStyles_unstable } from './useTableHeaderCellStyles';\nimport type { TableHeaderCellProps } from './TableHeaderCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableHeaderCell component\n */\nexport const TableHeaderCell: ForwardRefComponent<TableHeaderCellProps> = React.forwardRef((props, ref) => {\n const state = useTableHeaderCell_unstable(props, ref);\n\n useTableHeaderCellStyles_unstable(state);\n return renderTableHeaderCell_unstable(state);\n});\n\nTableHeaderCell.displayName = 'TableHeaderCell';\n"]}
@@ -0,0 +1,5 @@
1
+ define(["require", "exports"], function (require, exports) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ });
5
+ //# sourceMappingURL=TableHeaderCell.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableHeaderCell.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableHeaderCell/TableHeaderCell.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { ARIAButtonSlotProps } from '@fluentui/react-aria';\nimport { SortDirection, TableContextValue } from '../Table/Table.types';\n\nexport type TableHeaderCellSlots = {\n root: Slot<'th', 'div'>;\n\n sortIcon: Slot<'span'>;\n\n /**\n * Button handles correct narration and interactions for sorting;\n */\n button: NonNullable<Slot<ARIAButtonSlotProps>>;\n /**\n * aside content for anything that should be after main content of the table header cell\n */\n aside: Slot<'span'>;\n};\n\n/**\n * TableHeaderCell Props\n */\nexport type TableHeaderCellProps = ComponentProps<Partial<TableHeaderCellSlots>> & {\n /**\n * @default undefined\n */\n sortDirection?: SortDirection;\n};\n\n/**\n * State used in rendering TableHeaderCell\n */\nexport type TableHeaderCellState = ComponentState<TableHeaderCellSlots> &\n Pick<TableContextValue, 'noNativeElements' | 'sortable'>;\n"]}
@@ -0,0 +1,10 @@
1
+ define(["require", "exports", "tslib", "./TableHeaderCell", "./TableHeaderCell.types", "./renderTableHeaderCell", "./useTableHeaderCell", "./useTableHeaderCellStyles"], function (require, exports, tslib_1, TableHeaderCell_1, TableHeaderCell_types_1, renderTableHeaderCell_1, useTableHeaderCell_1, useTableHeaderCellStyles_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ tslib_1.__exportStar(TableHeaderCell_1, exports);
5
+ tslib_1.__exportStar(TableHeaderCell_types_1, exports);
6
+ tslib_1.__exportStar(renderTableHeaderCell_1, exports);
7
+ tslib_1.__exportStar(useTableHeaderCell_1, exports);
8
+ tslib_1.__exportStar(useTableHeaderCellStyles_1, exports);
9
+ });
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableHeaderCell/index.ts"],"names":[],"mappings":";;;IAAA,iDAAkC;IAClC,uDAAwC;IACxC,uDAAwC;IACxC,oDAAqC;IACrC,0DAA2C","sourcesContent":["export * from './TableHeaderCell';\nexport * from './TableHeaderCell.types';\nexport * from './renderTableHeaderCell';\nexport * from './useTableHeaderCell';\nexport * from './useTableHeaderCellStyles';\n"]}
@@ -0,0 +1,18 @@
1
+ define(["require", "exports", "tslib", "react", "@fluentui/react-utilities"], function (require, exports, tslib_1, React, react_utilities_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.renderTableHeaderCell_unstable = void 0;
5
+ /**
6
+ * Render the final JSX of TableHeaderCell
7
+ */
8
+ var renderTableHeaderCell_unstable = function (state) {
9
+ var _a = react_utilities_1.getSlots(state), slots = _a.slots, slotProps = _a.slotProps;
10
+ return (React.createElement(slots.root, tslib_1.__assign({}, slotProps.root),
11
+ React.createElement(slots.button, tslib_1.__assign({}, slotProps.button),
12
+ slotProps.root.children,
13
+ slots.sortIcon && React.createElement(slots.sortIcon, tslib_1.__assign({}, slotProps.sortIcon))),
14
+ slots.aside && React.createElement(slots.aside, tslib_1.__assign({}, slotProps.aside))));
15
+ };
16
+ exports.renderTableHeaderCell_unstable = renderTableHeaderCell_unstable;
17
+ });
18
+ //# sourceMappingURL=renderTableHeaderCell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderTableHeaderCell.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableHeaderCell/renderTableHeaderCell.tsx"],"names":[],"mappings":";;;;IAIA;;OAEG;IACI,IAAM,8BAA8B,GAAG,UAAC,KAA2B;QAClE,IAAA,KAAuB,0BAAQ,CAAuB,KAAK,CAAC,EAA1D,KAAK,WAAA,EAAE,SAAS,eAA0C,CAAC;QAEnE,OAAO,CACL,oBAAC,KAAK,CAAC,IAAI,uBAAK,SAAS,CAAC,IAAI;YAC5B,oBAAC,KAAK,CAAC,MAAM,uBAAK,SAAS,CAAC,MAAM;gBAC/B,SAAS,CAAC,IAAI,CAAC,QAAQ;gBACvB,KAAK,CAAC,QAAQ,IAAI,oBAAC,KAAK,CAAC,QAAQ,uBAAK,SAAS,CAAC,QAAQ,EAAI,CAChD;YACd,KAAK,CAAC,KAAK,IAAI,oBAAC,KAAK,CAAC,KAAK,uBAAK,SAAS,CAAC,KAAK,EAAI,CACzC,CACd,CAAC;IACJ,CAAC,CAAC;IAZW,QAAA,8BAA8B,kCAYzC","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableHeaderCellState, TableHeaderCellSlots } from './TableHeaderCell.types';\n\n/**\n * Render the final JSX of TableHeaderCell\n */\nexport const renderTableHeaderCell_unstable = (state: TableHeaderCellState) => {\n const { slots, slotProps } = getSlots<TableHeaderCellSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n <slots.button {...slotProps.button}>\n {slotProps.root.children}\n {slots.sortIcon && <slots.sortIcon {...slotProps.sortIcon} />}\n </slots.button>\n {slots.aside && <slots.aside {...slotProps.aside} />}\n </slots.root>\n );\n};\n"]}
@@ -0,0 +1,48 @@
1
+ define(["require", "exports", "tslib", "react", "@fluentui/react-utilities", "@fluentui/react-tabster", "@fluentui/react-icons", "../../contexts/tableContext", "@fluentui/react-aria"], function (require, exports, tslib_1, React, react_utilities_1, react_tabster_1, react_icons_1, tableContext_1, react_aria_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.useTableHeaderCell_unstable = void 0;
5
+ var sortIcons = {
6
+ ascending: React.createElement(react_icons_1.ArrowUpRegular, { fontSize: 12 }),
7
+ descending: React.createElement(react_icons_1.ArrowDownRegular, { fontSize: 12 }),
8
+ };
9
+ /**
10
+ * Create the state required to render TableHeaderCell.
11
+ *
12
+ * The returned state can be modified with hooks such as useTableHeaderCellStyles_unstable,
13
+ * before being passed to renderTableHeaderCell_unstable.
14
+ *
15
+ * @param props - props from this instance of TableHeaderCell
16
+ * @param ref - reference to root HTMLElement of TableHeaderCell
17
+ */
18
+ var useTableHeaderCell_unstable = function (props, ref) {
19
+ var _a, _b;
20
+ var _c = tableContext_1.useTableContext(), noNativeElements = _c.noNativeElements, sortable = _c.sortable;
21
+ var rootComponent = ((_a = props.as) !== null && _a !== void 0 ? _a : noNativeElements) ? 'div' : 'th';
22
+ return {
23
+ components: {
24
+ root: rootComponent,
25
+ button: 'button',
26
+ sortIcon: 'span',
27
+ aside: 'span',
28
+ },
29
+ root: react_utilities_1.getNativeElementProps(rootComponent, tslib_1.__assign({ ref: react_utilities_1.useMergedRefs(ref, react_tabster_1.useFocusWithin()), role: rootComponent === 'div' ? 'columnheader' : undefined, 'aria-sort': sortable ? (_b = props.sortDirection) !== null && _b !== void 0 ? _b : 'none' : undefined }, props)),
30
+ aside: react_utilities_1.resolveShorthand(props.aside),
31
+ sortIcon: react_utilities_1.resolveShorthand(props.sortIcon, {
32
+ required: !!props.sortDirection,
33
+ defaultProps: { children: props.sortDirection ? sortIcons[props.sortDirection] : undefined },
34
+ }),
35
+ button: react_aria_1.useARIAButtonShorthand(props.button, {
36
+ required: true,
37
+ defaultProps: tslib_1.__assign({ role: 'presentation', tabIndex: -1, type: 'button' }, (sortable && {
38
+ role: undefined,
39
+ tabIndex: undefined,
40
+ })),
41
+ }),
42
+ sortable: sortable,
43
+ noNativeElements: noNativeElements,
44
+ };
45
+ };
46
+ exports.useTableHeaderCell_unstable = useTableHeaderCell_unstable;
47
+ });
48
+ //# sourceMappingURL=useTableHeaderCell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTableHeaderCell.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableHeaderCell/useTableHeaderCell.tsx"],"names":[],"mappings":";;;;IAQA,IAAM,SAAS,GAAG;QAChB,SAAS,EAAE,oBAAC,4BAAc,IAAC,QAAQ,EAAE,EAAE,GAAI;QAC3C,UAAU,EAAE,oBAAC,8BAAgB,IAAC,QAAQ,EAAE,EAAE,GAAI;KAC/C,CAAC;IAEF;;;;;;;;OAQG;IACI,IAAM,2BAA2B,GAAG,UACzC,KAA2B,EAC3B,GAA2B;;QAErB,IAAA,KAAiC,8BAAe,EAAE,EAAhD,gBAAgB,sBAAA,EAAE,QAAQ,cAAsB,CAAC;QAEzD,IAAM,aAAa,GAAG,CAAA,MAAA,KAAK,CAAC,EAAE,mCAAI,gBAAgB,EAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;QAClE,OAAO;YACL,UAAU,EAAE;gBACV,IAAI,EAAE,aAAa;gBACnB,MAAM,EAAE,QAAQ;gBAChB,QAAQ,EAAE,MAAM;gBAChB,KAAK,EAAE,MAAM;aACd;YACD,IAAI,EAAE,uCAAqB,CAAC,aAAa,qBACvC,GAAG,EAAE,+BAAa,CAAC,GAAG,EAAE,8BAAc,EAAE,CAAC,EACzC,IAAI,EAAE,aAAa,KAAK,KAAK,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,EAC1D,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,MAAA,KAAK,CAAC,aAAa,mCAAI,MAAM,CAAC,CAAC,CAAC,SAAS,IAC9D,KAAK,EACR;YACF,KAAK,EAAE,kCAAgB,CAAC,KAAK,CAAC,KAAK,CAAC;YACpC,QAAQ,EAAE,kCAAgB,CAAC,KAAK,CAAC,QAAQ,EAAE;gBACzC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,aAAa;gBAC/B,YAAY,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE;aAC7F,CAAC;YACF,MAAM,EAAE,mCAAsB,CAAC,KAAK,CAAC,MAAM,EAAE;gBAC3C,QAAQ,EAAE,IAAI;gBACd,YAAY,qBACV,IAAI,EAAE,cAAc,EACpB,QAAQ,EAAE,CAAC,CAAC,EACZ,IAAI,EAAE,QAAQ,IACX,CAAC,QAAQ,IAAI;oBACd,IAAI,EAAE,SAAS;oBACf,QAAQ,EAAE,SAAS;iBACpB,CAAC,CACH;aACF,CAAC;YACF,QAAQ,UAAA;YACR,gBAAgB,kBAAA;SACjB,CAAC;IACJ,CAAC,CAAC;IAxCW,QAAA,2BAA2B,+BAwCtC","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand, useMergedRefs } from '@fluentui/react-utilities';\nimport { useFocusWithin } from '@fluentui/react-tabster';\nimport { ArrowUpRegular, ArrowDownRegular } from '@fluentui/react-icons';\nimport type { TableHeaderCellProps, TableHeaderCellState } from './TableHeaderCell.types';\nimport { useTableContext } from '../../contexts/tableContext';\nimport { useARIAButtonShorthand } from '@fluentui/react-aria';\n\nconst sortIcons = {\n ascending: <ArrowUpRegular fontSize={12} />,\n descending: <ArrowDownRegular fontSize={12} />,\n};\n\n/**\n * Create the state required to render TableHeaderCell.\n *\n * The returned state can be modified with hooks such as useTableHeaderCellStyles_unstable,\n * before being passed to renderTableHeaderCell_unstable.\n *\n * @param props - props from this instance of TableHeaderCell\n * @param ref - reference to root HTMLElement of TableHeaderCell\n */\nexport const useTableHeaderCell_unstable = (\n props: TableHeaderCellProps,\n ref: React.Ref<HTMLElement>,\n): TableHeaderCellState => {\n const { noNativeElements, sortable } = useTableContext();\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'th';\n return {\n components: {\n root: rootComponent,\n button: 'button',\n sortIcon: 'span',\n aside: 'span',\n },\n root: getNativeElementProps(rootComponent, {\n ref: useMergedRefs(ref, useFocusWithin()),\n role: rootComponent === 'div' ? 'columnheader' : undefined,\n 'aria-sort': sortable ? props.sortDirection ?? 'none' : undefined,\n ...props,\n }),\n aside: resolveShorthand(props.aside),\n sortIcon: resolveShorthand(props.sortIcon, {\n required: !!props.sortDirection,\n defaultProps: { children: props.sortDirection ? sortIcons[props.sortDirection] : undefined },\n }),\n button: useARIAButtonShorthand(props.button, {\n required: true,\n defaultProps: {\n role: 'presentation',\n tabIndex: -1,\n type: 'button',\n ...(sortable && {\n role: undefined,\n tabIndex: undefined,\n }),\n },\n }),\n sortable,\n noNativeElements,\n };\n};\n"]}
@@ -0,0 +1,67 @@
1
+ define(["require", "exports", "tslib", "@griffel/react", "@fluentui/react-theme", "@fluentui/react-tabster"], function (require, exports, tslib_1, react_1, react_theme_1, react_tabster_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.useTableHeaderCellStyles_unstable = exports.tableHeaderCellClassNames = exports.tableHeaderCellClassName = void 0;
5
+ exports.tableHeaderCellClassName = 'fui-TableHeaderCell';
6
+ exports.tableHeaderCellClassNames = {
7
+ root: 'fui-TableHeaderCell',
8
+ button: 'fui-TableHeaderCell__button',
9
+ sortIcon: 'fui-TableHeaderCell__sortIcon',
10
+ aside: 'fui-TableHeaderCell__aside',
11
+ };
12
+ var useTableLayoutStyles = react_1.makeStyles({
13
+ root: {
14
+ display: 'table-cell',
15
+ verticalAlign: 'middle',
16
+ },
17
+ });
18
+ var useFlexLayoutStyles = react_1.makeStyles({
19
+ root: tslib_1.__assign(tslib_1.__assign({ display: 'flex' }, react_1.shorthands.flex(1, 1, '0px')), { minWidth: '0px' }),
20
+ });
21
+ /**
22
+ * Styles for the root slot
23
+ */
24
+ var useStyles = react_1.makeStyles({
25
+ root: tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, react_1.shorthands.padding('0px', react_theme_1.tokens.spacingHorizontalS)), react_tabster_1.createCustomFocusIndicatorStyle(tslib_1.__assign(tslib_1.__assign({}, react_1.shorthands.outline('2px', 'solid', react_theme_1.tokens.colorStrokeFocus2)), react_1.shorthands.borderRadius(react_theme_1.tokens.borderRadiusMedium)), { selector: 'focus-within', enableOutline: true })), { position: 'relative' }),
26
+ rootInteractive: {
27
+ ':hover': {
28
+ backgroundColor: react_theme_1.tokens.colorSubtleBackgroundHover,
29
+ },
30
+ ':active': {
31
+ backgroundColor: react_theme_1.tokens.colorSubtleBackgroundPressed,
32
+ },
33
+ },
34
+ resetButton: tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ resize: 'horizontal', boxSizing: 'content-box', backgroundColor: 'inherit', color: 'inherit', fontFamily: 'inherit', fontSize: 'inherit', lineHeight: 'normal' }, react_1.shorthands.overflow('visible')), react_1.shorthands.padding(0)), react_1.shorthands.borderStyle('none')), { WebkitAppearance: 'button', textAlign: 'unset' }),
35
+ button: tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ position: 'relative', width: '100%', display: 'flex', flexGrow: 1, height: '100%', alignItems: 'center' }, react_1.shorthands.gap(react_theme_1.tokens.spacingHorizontalXS)), { minHeight: '32px' }), react_1.shorthands.flex(1, 1, '0px')), { outlineStyle: 'none' }),
36
+ sortable: {
37
+ cursor: 'pointer',
38
+ },
39
+ sortIcon: {
40
+ display: 'flex',
41
+ alignItems: 'center',
42
+ paddingTop: react_theme_1.tokens.spacingVerticalXXS,
43
+ },
44
+ resizeHandle: {},
45
+ });
46
+ /**
47
+ * Apply styling to the TableHeaderCell slots based on the state
48
+ */
49
+ var useTableHeaderCellStyles_unstable = function (state) {
50
+ var styles = useStyles();
51
+ var layoutStyles = {
52
+ table: useTableLayoutStyles(),
53
+ flex: useFlexLayoutStyles(),
54
+ };
55
+ state.root.className = react_1.mergeClasses(exports.tableHeaderCellClassNames.root, styles.root, state.sortable && styles.rootInteractive, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.root.className);
56
+ state.button.className = react_1.mergeClasses(exports.tableHeaderCellClassNames.button, styles.resetButton, styles.button, state.sortable && styles.sortable, state.button.className);
57
+ if (state.sortIcon) {
58
+ state.sortIcon.className = react_1.mergeClasses(exports.tableHeaderCellClassNames.sortIcon, styles.sortIcon, state.sortIcon.className);
59
+ }
60
+ if (state.aside) {
61
+ state.aside.className = react_1.mergeClasses(exports.tableHeaderCellClassNames.aside, styles.resizeHandle, state.aside.className);
62
+ }
63
+ return state;
64
+ };
65
+ exports.useTableHeaderCellStyles_unstable = useTableHeaderCellStyles_unstable;
66
+ });
67
+ //# sourceMappingURL=useTableHeaderCellStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTableHeaderCellStyles.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableHeaderCell/useTableHeaderCellStyles.ts"],"names":[],"mappings":"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","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport type { TableHeaderCellSlots, TableHeaderCellState } from './TableHeaderCell.types';\n\nexport const tableHeaderCellClassName = 'fui-TableHeaderCell';\nexport const tableHeaderCellClassNames: SlotClassNames<TableHeaderCellSlots> = {\n root: 'fui-TableHeaderCell',\n button: 'fui-TableHeaderCell__button',\n sortIcon: 'fui-TableHeaderCell__sortIcon',\n aside: 'fui-TableHeaderCell__aside',\n};\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-cell',\n verticalAlign: 'middle',\n },\n});\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'flex',\n ...shorthands.flex(1, 1, '0px'),\n minWidth: '0px',\n },\n});\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n ...shorthands.padding('0px', tokens.spacingHorizontalS),\n ...createCustomFocusIndicatorStyle(\n {\n ...shorthands.outline('2px', 'solid', tokens.colorStrokeFocus2),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n },\n { selector: 'focus-within', enableOutline: true },\n ),\n position: 'relative',\n },\n\n rootInteractive: {\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n },\n },\n\n resetButton: {\n resize: 'horizontal',\n boxSizing: 'content-box',\n backgroundColor: 'inherit',\n color: 'inherit',\n fontFamily: 'inherit',\n fontSize: 'inherit',\n lineHeight: 'normal',\n ...shorthands.overflow('visible'),\n ...shorthands.padding(0),\n ...shorthands.borderStyle('none'),\n WebkitAppearance: 'button',\n textAlign: 'unset',\n },\n\n button: {\n position: 'relative',\n width: '100%',\n display: 'flex',\n flexGrow: 1,\n height: '100%',\n alignItems: 'center',\n ...shorthands.gap(tokens.spacingHorizontalXS),\n minHeight: '32px',\n ...shorthands.flex(1, 1, '0px'),\n outlineStyle: 'none',\n },\n\n sortable: {\n cursor: 'pointer',\n },\n\n sortIcon: {\n display: 'flex',\n alignItems: 'center',\n paddingTop: tokens.spacingVerticalXXS,\n },\n\n resizeHandle: {},\n});\n\n/**\n * Apply styling to the TableHeaderCell slots based on the state\n */\nexport const useTableHeaderCellStyles_unstable = (state: TableHeaderCellState): TableHeaderCellState => {\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableHeaderCellClassNames.root,\n styles.root,\n state.sortable && styles.rootInteractive,\n state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,\n state.root.className,\n );\n state.button.className = mergeClasses(\n tableHeaderCellClassNames.button,\n styles.resetButton,\n styles.button,\n state.sortable && styles.sortable,\n state.button.className,\n );\n\n if (state.sortIcon) {\n state.sortIcon.className = mergeClasses(\n tableHeaderCellClassNames.sortIcon,\n styles.sortIcon,\n state.sortIcon.className,\n );\n }\n\n if (state.aside) {\n state.aside.className = mergeClasses(tableHeaderCellClassNames.aside, styles.resizeHandle, state.aside.className);\n }\n\n return state;\n};\n"]}
@@ -0,0 +1,15 @@
1
+ define(["require", "exports", "react", "./useTableResizeHandle", "./renderTableResizeHandle", "./useTableResizeHandleStyles"], function (require, exports, React, useTableResizeHandle_1, renderTableResizeHandle_1, useTableResizeHandleStyles_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.TableResizeHandle = void 0;
5
+ /**
6
+ * TableResizeHandle component - TODO: add more docs
7
+ */
8
+ exports.TableResizeHandle = React.forwardRef(function (props, ref) {
9
+ var state = useTableResizeHandle_1.useTableResizeHandle_unstable(props, ref);
10
+ useTableResizeHandleStyles_1.useTableResizeHandleStyles_unstable(state);
11
+ return renderTableResizeHandle_1.renderTableResizeHandle_unstable(state);
12
+ });
13
+ exports.TableResizeHandle.displayName = 'TableResizeHandle';
14
+ });
15
+ //# sourceMappingURL=TableResizeHandle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableResizeHandle.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableResizeHandle/TableResizeHandle.tsx"],"names":[],"mappings":";;;;IAOA;;OAEG;IACU,QAAA,iBAAiB,GAAgD,KAAK,CAAC,UAAU,CAAC,UAAC,KAAK,EAAE,GAAG;QACxG,IAAM,KAAK,GAAG,oDAA6B,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAExD,gEAAmC,CAAC,KAAK,CAAC,CAAC;QAC3C,OAAO,0DAAgC,CAAC,KAAK,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;IAEH,yBAAiB,CAAC,WAAW,GAAG,mBAAmB,CAAC","sourcesContent":["import * as React from 'react';\nimport { useTableResizeHandle_unstable } from './useTableResizeHandle';\nimport { renderTableResizeHandle_unstable } from './renderTableResizeHandle';\nimport { useTableResizeHandleStyles_unstable } from './useTableResizeHandleStyles';\nimport type { TableResizeHandleProps } from './TableResizeHandle.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableResizeHandle component - TODO: add more docs\n */\nexport const TableResizeHandle: ForwardRefComponent<TableResizeHandleProps> = React.forwardRef((props, ref) => {\n const state = useTableResizeHandle_unstable(props, ref);\n\n useTableResizeHandleStyles_unstable(state);\n return renderTableResizeHandle_unstable(state);\n});\n\nTableResizeHandle.displayName = 'TableResizeHandle';\n"]}
@@ -0,0 +1,5 @@
1
+ define(["require", "exports"], function (require, exports) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ });
5
+ //# sourceMappingURL=TableResizeHandle.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableResizeHandle.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableResizeHandle/TableResizeHandle.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TableResizeHandleSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * TableResizeHandle Props\n */\nexport type TableResizeHandleProps = ComponentProps<TableResizeHandleSlots> & {};\n\n/**\n * State used in rendering TableResizeHandle\n */\nexport type TableResizeHandleState = ComponentState<TableResizeHandleSlots>;\n"]}
@@ -0,0 +1,10 @@
1
+ define(["require", "exports", "tslib", "./TableResizeHandle", "./TableResizeHandle.types", "./renderTableResizeHandle", "./useTableResizeHandle", "./useTableResizeHandleStyles"], function (require, exports, tslib_1, TableResizeHandle_1, TableResizeHandle_types_1, renderTableResizeHandle_1, useTableResizeHandle_1, useTableResizeHandleStyles_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ tslib_1.__exportStar(TableResizeHandle_1, exports);
5
+ tslib_1.__exportStar(TableResizeHandle_types_1, exports);
6
+ tslib_1.__exportStar(renderTableResizeHandle_1, exports);
7
+ tslib_1.__exportStar(useTableResizeHandle_1, exports);
8
+ tslib_1.__exportStar(useTableResizeHandleStyles_1, exports);
9
+ });
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableResizeHandle/index.ts"],"names":[],"mappings":";;;IAAA,mDAAoC;IACpC,yDAA0C;IAC1C,yDAA0C;IAC1C,sDAAuC;IACvC,4DAA6C","sourcesContent":["export * from './TableResizeHandle';\nexport * from './TableResizeHandle.types';\nexport * from './renderTableResizeHandle';\nexport * from './useTableResizeHandle';\nexport * from './useTableResizeHandleStyles';\n"]}
@@ -0,0 +1,14 @@
1
+ define(["require", "exports", "tslib", "react", "@fluentui/react-utilities"], function (require, exports, tslib_1, React, react_utilities_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.renderTableResizeHandle_unstable = void 0;
5
+ /**
6
+ * Render the final JSX of TableResizeHandle
7
+ */
8
+ var renderTableResizeHandle_unstable = function (state) {
9
+ var _a = react_utilities_1.getSlots(state), slots = _a.slots, slotProps = _a.slotProps;
10
+ return React.createElement(slots.root, tslib_1.__assign({}, slotProps.root));
11
+ };
12
+ exports.renderTableResizeHandle_unstable = renderTableResizeHandle_unstable;
13
+ });
14
+ //# sourceMappingURL=renderTableResizeHandle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderTableResizeHandle.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableResizeHandle/renderTableResizeHandle.tsx"],"names":[],"mappings":";;;;IAIA;;OAEG;IACI,IAAM,gCAAgC,GAAG,UAAC,KAA6B;QACtE,IAAA,KAAuB,0BAAQ,CAAyB,KAAK,CAAC,EAA5D,KAAK,WAAA,EAAE,SAAS,eAA4C,CAAC;QACrE,OAAO,oBAAC,KAAK,CAAC,IAAI,uBAAK,SAAS,CAAC,IAAI,EAAI,CAAC;IAC5C,CAAC,CAAC;IAHW,QAAA,gCAAgC,oCAG3C","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableResizeHandleState, TableResizeHandleSlots } from './TableResizeHandle.types';\n\n/**\n * Render the final JSX of TableResizeHandle\n */\nexport const renderTableResizeHandle_unstable = (state: TableResizeHandleState) => {\n const { slots, slotProps } = getSlots<TableResizeHandleSlots>(state);\n return <slots.root {...slotProps.root} />;\n};\n"]}
@@ -0,0 +1,29 @@
1
+ define(["require", "exports", "tslib", "@fluentui/react-utilities"], function (require, exports, tslib_1, react_utilities_1) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.useTableResizeHandle_unstable = void 0;
5
+ /**
6
+ * Create the state required to render TableResizeHandle.
7
+ *
8
+ * The returned state can be modified with hooks such as useTableResizeHandleStyles_unstable,
9
+ * before being passed to renderTableResizeHandle_unstable.
10
+ *
11
+ * @param props - props from this instance of TableResizeHandle
12
+ * @param ref - reference to root HTMLElement of TableResizeHandle
13
+ */
14
+ var useTableResizeHandle_unstable = function (props, ref) {
15
+ var onClick = react_utilities_1.useEventCallback(function (event) {
16
+ var _a;
17
+ (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, event);
18
+ event.stopPropagation();
19
+ });
20
+ return {
21
+ components: {
22
+ root: 'div',
23
+ },
24
+ root: react_utilities_1.getNativeElementProps('div', tslib_1.__assign(tslib_1.__assign({ ref: ref }, props), { onClick: onClick })),
25
+ };
26
+ };
27
+ exports.useTableResizeHandle_unstable = useTableResizeHandle_unstable;
28
+ });
29
+ //# sourceMappingURL=useTableResizeHandle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTableResizeHandle.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-table/src/components/TableResizeHandle/useTableResizeHandle.ts"],"names":[],"mappings":";;;;IAIA;;;;;;;;OAQG;IACI,IAAM,6BAA6B,GAAG,UAC3C,KAA6B,EAC7B,GAA2B;QAE3B,IAAM,OAAO,GAAG,kCAAgB,CAAC,UAAC,KAAuC;;YACvE,MAAA,KAAK,CAAC,OAAO,+CAAb,KAAK,EAAW,KAAK,CAAC,CAAC;YACvB,KAAK,CAAC,eAAe,EAAE,CAAC;QAC1B,CAAC,CAAC,CAAC;QACH,OAAO;YACL,UAAU,EAAE;gBACV,IAAI,EAAE,KAAK;aACZ;YACD,IAAI,EAAE,uCAAqB,CAAC,KAAK,sCAC/B,GAAG,KAAA,IACA,KAAK,KACR,OAAO,SAAA,IACP;SACH,CAAC;IACJ,CAAC,CAAC;IAlBW,QAAA,6BAA6B,iCAkBxC","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useEventCallback } from '@fluentui/react-utilities';\nimport type { TableResizeHandleProps, TableResizeHandleState } from './TableResizeHandle.types';\n\n/**\n * Create the state required to render TableResizeHandle.\n *\n * The returned state can be modified with hooks such as useTableResizeHandleStyles_unstable,\n * before being passed to renderTableResizeHandle_unstable.\n *\n * @param props - props from this instance of TableResizeHandle\n * @param ref - reference to root HTMLElement of TableResizeHandle\n */\nexport const useTableResizeHandle_unstable = (\n props: TableResizeHandleProps,\n ref: React.Ref<HTMLElement>,\n): TableResizeHandleState => {\n const onClick = useEventCallback((event: React.MouseEvent<HTMLDivElement>) => {\n props.onClick?.(event);\n event.stopPropagation();\n });\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref,\n ...props,\n onClick,\n }),\n };\n};\n"]}