@fluentui/react-table 9.0.0-rc.4 → 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 (396) hide show
  1. package/CHANGELOG.json +124 -8
  2. package/CHANGELOG.md +44 -9
  3. package/dist/index.d.ts +114 -3
  4. package/lib/TableResizeHandle.js +2 -0
  5. package/lib/TableResizeHandle.js.map +1 -0
  6. package/lib/components/DataGrid/DataGrid.types.js.map +1 -1
  7. package/lib/components/DataGrid/index.js +1 -0
  8. package/lib/components/DataGrid/index.js.map +1 -1
  9. package/lib/components/DataGrid/useDataGrid.js +16 -4
  10. package/lib/components/DataGrid/useDataGrid.js.map +1 -1
  11. package/lib/components/DataGrid/useDataGridContextValues.js +2 -1
  12. package/lib/components/DataGrid/useDataGridContextValues.js.map +1 -1
  13. package/lib/components/DataGridCell/useDataGridCell.js +5 -0
  14. package/lib/components/DataGridCell/useDataGridCell.js.map +1 -1
  15. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js +3 -0
  16. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
  17. package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +5 -1
  18. package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -1
  19. package/lib/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
  20. package/lib/components/TableCellLayout/useTableCellLayout.js +1 -0
  21. package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  22. package/lib/components/TableCellLayout/useTableCellLayoutStyles.js +18 -4
  23. package/lib/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
  24. package/lib/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
  25. package/lib/components/TableHeaderCell/renderTableHeaderCell.js +3 -1
  26. package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  27. package/lib/components/TableHeaderCell/useTableHeaderCell.js +3 -1
  28. package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  29. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js +10 -4
  30. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
  31. package/lib/components/TableResizeHandle/TableResizeHandle.js +14 -0
  32. package/lib/components/TableResizeHandle/TableResizeHandle.js.map +1 -0
  33. package/lib/components/TableResizeHandle/TableResizeHandle.types.js +2 -0
  34. package/lib/components/TableResizeHandle/TableResizeHandle.types.js.map +1 -0
  35. package/lib/components/TableResizeHandle/index.js +6 -0
  36. package/lib/components/TableResizeHandle/index.js.map +1 -0
  37. package/lib/components/TableResizeHandle/renderTableResizeHandle.js +15 -0
  38. package/lib/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -0
  39. package/lib/components/TableResizeHandle/useTableResizeHandle.js +28 -0
  40. package/lib/components/TableResizeHandle/useTableResizeHandle.js.map +1 -0
  41. package/lib/components/TableResizeHandle/useTableResizeHandleStyles.js +49 -0
  42. package/lib/components/TableResizeHandle/useTableResizeHandleStyles.js.map +1 -0
  43. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js +1 -0
  44. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
  45. package/lib/hooks/index.js +1 -0
  46. package/lib/hooks/index.js.map +1 -1
  47. package/lib/hooks/types.js.map +1 -1
  48. package/lib/hooks/useMeasureElement.js +48 -0
  49. package/lib/hooks/useMeasureElement.js.map +1 -0
  50. package/lib/hooks/useTableColumnResizeMouseHandler.js +50 -0
  51. package/lib/hooks/useTableColumnResizeMouseHandler.js.map +1 -0
  52. package/lib/hooks/useTableColumnResizeState.js +112 -0
  53. package/lib/hooks/useTableColumnResizeState.js.map +1 -0
  54. package/lib/hooks/useTableColumnSizing.js +77 -0
  55. package/lib/hooks/useTableColumnSizing.js.map +1 -0
  56. package/lib/hooks/useTableFeatures.js +10 -2
  57. package/lib/hooks/useTableFeatures.js.map +1 -1
  58. package/lib/index.js +3 -2
  59. package/lib/index.js.map +1 -1
  60. package/lib/utils/columnResizeUtils.js +158 -0
  61. package/lib/utils/columnResizeUtils.js.map +1 -0
  62. package/lib-amd/DataGrid.js +6 -0
  63. package/lib-amd/DataGrid.js.map +1 -0
  64. package/lib-amd/DataGridBody.js +6 -0
  65. package/lib-amd/DataGridBody.js.map +1 -0
  66. package/lib-amd/DataGridCell.js +6 -0
  67. package/lib-amd/DataGridCell.js.map +1 -0
  68. package/lib-amd/DataGridHeader.js +6 -0
  69. package/lib-amd/DataGridHeader.js.map +1 -0
  70. package/lib-amd/DataGridHeaderCell.js +6 -0
  71. package/lib-amd/DataGridHeaderCell.js.map +1 -0
  72. package/lib-amd/DataGridRow.js +6 -0
  73. package/lib-amd/DataGridRow.js.map +1 -0
  74. package/lib-amd/DataGridSelectionCell.js +6 -0
  75. package/lib-amd/DataGridSelectionCell.js.map +1 -0
  76. package/lib-amd/Table.js +6 -0
  77. package/lib-amd/Table.js.map +1 -0
  78. package/lib-amd/TableBody.js +6 -0
  79. package/lib-amd/TableBody.js.map +1 -0
  80. package/lib-amd/TableCell.js +6 -0
  81. package/lib-amd/TableCell.js.map +1 -0
  82. package/lib-amd/TableCellActions.js +6 -0
  83. package/lib-amd/TableCellActions.js.map +1 -0
  84. package/lib-amd/TableCellLayout.js +6 -0
  85. package/lib-amd/TableCellLayout.js.map +1 -0
  86. package/lib-amd/TableHeader.js +6 -0
  87. package/lib-amd/TableHeader.js.map +1 -0
  88. package/lib-amd/TableHeaderCell.js +6 -0
  89. package/lib-amd/TableHeaderCell.js.map +1 -0
  90. package/lib-amd/TableResizeHandle.js +6 -0
  91. package/lib-amd/TableResizeHandle.js.map +1 -0
  92. package/lib-amd/TableRow.js +6 -0
  93. package/lib-amd/TableRow.js.map +1 -0
  94. package/lib-amd/TableSelectionCell.js +6 -0
  95. package/lib-amd/TableSelectionCell.js.map +1 -0
  96. package/lib-amd/components/DataGrid/DataGrid.js +15 -0
  97. package/lib-amd/components/DataGrid/DataGrid.js.map +1 -0
  98. package/lib-amd/components/DataGrid/DataGrid.types.js +5 -0
  99. package/lib-amd/components/DataGrid/DataGrid.types.js.map +1 -0
  100. package/lib-amd/components/DataGrid/index.js +11 -0
  101. package/lib-amd/components/DataGrid/index.js.map +1 -0
  102. package/lib-amd/components/DataGrid/renderDataGrid.js +13 -0
  103. package/lib-amd/components/DataGrid/renderDataGrid.js.map +1 -0
  104. package/lib-amd/components/DataGrid/useDataGrid.js +43 -0
  105. package/lib-amd/components/DataGrid/useDataGrid.js.map +1 -0
  106. package/lib-amd/components/DataGrid/useDataGridContextValues.js +11 -0
  107. package/lib-amd/components/DataGrid/useDataGridContextValues.js.map +1 -0
  108. package/lib-amd/components/DataGrid/useDataGridStyles.js +18 -0
  109. package/lib-amd/components/DataGrid/useDataGridStyles.js.map +1 -0
  110. package/lib-amd/components/DataGridBody/DataGridBody.js +15 -0
  111. package/lib-amd/components/DataGridBody/DataGridBody.js.map +1 -0
  112. package/lib-amd/components/DataGridBody/DataGridBody.types.js +5 -0
  113. package/lib-amd/components/DataGridBody/DataGridBody.types.js.map +1 -0
  114. package/lib-amd/components/DataGridBody/index.js +10 -0
  115. package/lib-amd/components/DataGridBody/index.js.map +1 -0
  116. package/lib-amd/components/DataGridBody/renderDataGridBody.js +14 -0
  117. package/lib-amd/components/DataGridBody/renderDataGridBody.js.map +1 -0
  118. package/lib-amd/components/DataGridBody/useDataGridBody.js +24 -0
  119. package/lib-amd/components/DataGridBody/useDataGridBody.js.map +1 -0
  120. package/lib-amd/components/DataGridBody/useDataGridBodyStyles.js +18 -0
  121. package/lib-amd/components/DataGridBody/useDataGridBodyStyles.js.map +1 -0
  122. package/lib-amd/components/DataGridCell/DataGridCell.js +15 -0
  123. package/lib-amd/components/DataGridCell/DataGridCell.js.map +1 -0
  124. package/lib-amd/components/DataGridCell/DataGridCell.types.js +5 -0
  125. package/lib-amd/components/DataGridCell/DataGridCell.types.js.map +1 -0
  126. package/lib-amd/components/DataGridCell/index.js +10 -0
  127. package/lib-amd/components/DataGridCell/index.js.map +1 -0
  128. package/lib-amd/components/DataGridCell/renderDataGridCell.js +13 -0
  129. package/lib-amd/components/DataGridCell/renderDataGridCell.js.map +1 -0
  130. package/lib-amd/components/DataGridCell/useDataGridCell.js +23 -0
  131. package/lib-amd/components/DataGridCell/useDataGridCell.js.map +1 -0
  132. package/lib-amd/components/DataGridCell/useDataGridCellStyles.js +18 -0
  133. package/lib-amd/components/DataGridCell/useDataGridCellStyles.js.map +1 -0
  134. package/lib-amd/components/DataGridHeader/DataGridHeader.js +15 -0
  135. package/lib-amd/components/DataGridHeader/DataGridHeader.js.map +1 -0
  136. package/lib-amd/components/DataGridHeader/DataGridHeader.types.js +5 -0
  137. package/lib-amd/components/DataGridHeader/DataGridHeader.types.js.map +1 -0
  138. package/lib-amd/components/DataGridHeader/index.js +10 -0
  139. package/lib-amd/components/DataGridHeader/index.js.map +1 -0
  140. package/lib-amd/components/DataGridHeader/renderDataGridHeader.js +13 -0
  141. package/lib-amd/components/DataGridHeader/renderDataGridHeader.js.map +1 -0
  142. package/lib-amd/components/DataGridHeader/useDataGridHeader.js +19 -0
  143. package/lib-amd/components/DataGridHeader/useDataGridHeader.js.map +1 -0
  144. package/lib-amd/components/DataGridHeader/useDataGridHeaderStyles.js +18 -0
  145. package/lib-amd/components/DataGridHeader/useDataGridHeaderStyles.js.map +1 -0
  146. package/lib-amd/components/DataGridHeaderCell/DataGridHeaderCell.js +15 -0
  147. package/lib-amd/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -0
  148. package/lib-amd/components/DataGridHeaderCell/DataGridHeaderCell.types.js +5 -0
  149. package/lib-amd/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -0
  150. package/lib-amd/components/DataGridHeaderCell/index.js +10 -0
  151. package/lib-amd/components/DataGridHeaderCell/index.js.map +1 -0
  152. package/lib-amd/components/DataGridHeaderCell/renderDataGridHeaderCell.js +13 -0
  153. package/lib-amd/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -0
  154. package/lib-amd/components/DataGridHeaderCell/useDataGridHeaderCell.js +34 -0
  155. package/lib-amd/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -0
  156. package/lib-amd/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +30 -0
  157. package/lib-amd/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -0
  158. package/lib-amd/components/DataGridRow/DataGridRow.js +15 -0
  159. package/lib-amd/components/DataGridRow/DataGridRow.js.map +1 -0
  160. package/lib-amd/components/DataGridRow/DataGridRow.types.js +5 -0
  161. package/lib-amd/components/DataGridRow/DataGridRow.types.js.map +1 -0
  162. package/lib-amd/components/DataGridRow/index.js +10 -0
  163. package/lib-amd/components/DataGridRow/index.js.map +1 -0
  164. package/lib-amd/components/DataGridRow/renderDataGridRow.js +16 -0
  165. package/lib-amd/components/DataGridRow/renderDataGridRow.js.map +1 -0
  166. package/lib-amd/components/DataGridRow/useDataGridRow.js +49 -0
  167. package/lib-amd/components/DataGridRow/useDataGridRow.js.map +1 -0
  168. package/lib-amd/components/DataGridRow/useDataGridRowStyles.js +22 -0
  169. package/lib-amd/components/DataGridRow/useDataGridRowStyles.js.map +1 -0
  170. package/lib-amd/components/DataGridSelectionCell/DataGridSelectionCell.js +15 -0
  171. package/lib-amd/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -0
  172. package/lib-amd/components/DataGridSelectionCell/DataGridSelectionCell.types.js +5 -0
  173. package/lib-amd/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -0
  174. package/lib-amd/components/DataGridSelectionCell/index.js +10 -0
  175. package/lib-amd/components/DataGridSelectionCell/index.js.map +1 -0
  176. package/lib-amd/components/DataGridSelectionCell/renderDataGridSelectionCell.js +13 -0
  177. package/lib-amd/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -0
  178. package/lib-amd/components/DataGridSelectionCell/useDataGridSelectionCell.js +39 -0
  179. package/lib-amd/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -0
  180. package/lib-amd/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js +26 -0
  181. package/lib-amd/components/DataGridSelectionCell/useDataGridSelectionCellStyles.js.map +1 -0
  182. package/lib-amd/components/Table/Table.js +15 -0
  183. package/lib-amd/components/Table/Table.js.map +1 -0
  184. package/lib-amd/components/Table/Table.types.js +5 -0
  185. package/lib-amd/components/Table/Table.types.js.map +1 -0
  186. package/lib-amd/components/Table/index.js +10 -0
  187. package/lib-amd/components/Table/index.js.map +1 -0
  188. package/lib-amd/components/Table/renderTable.js +15 -0
  189. package/lib-amd/components/Table/renderTable.js.map +1 -0
  190. package/lib-amd/components/Table/useTable.js +29 -0
  191. package/lib-amd/components/Table/useTable.js.map +1 -0
  192. package/lib-amd/components/Table/useTableContextValues.js +18 -0
  193. package/lib-amd/components/Table/useTableContextValues.js.map +1 -0
  194. package/lib-amd/components/Table/useTableStyles.js +45 -0
  195. package/lib-amd/components/Table/useTableStyles.js.map +1 -0
  196. package/lib-amd/components/TableBody/TableBody.js +15 -0
  197. package/lib-amd/components/TableBody/TableBody.js.map +1 -0
  198. package/lib-amd/components/TableBody/TableBody.types.js +5 -0
  199. package/lib-amd/components/TableBody/TableBody.types.js.map +1 -0
  200. package/lib-amd/components/TableBody/index.js +10 -0
  201. package/lib-amd/components/TableBody/index.js.map +1 -0
  202. package/lib-amd/components/TableBody/renderTableBody.js +14 -0
  203. package/lib-amd/components/TableBody/renderTableBody.js.map +1 -0
  204. package/lib-amd/components/TableBody/useTableBody.js +28 -0
  205. package/lib-amd/components/TableBody/useTableBody.js.map +1 -0
  206. package/lib-amd/components/TableBody/useTableBodyStyles.js +32 -0
  207. package/lib-amd/components/TableBody/useTableBodyStyles.js.map +1 -0
  208. package/lib-amd/components/TableCell/TableCell.js +15 -0
  209. package/lib-amd/components/TableCell/TableCell.js.map +1 -0
  210. package/lib-amd/components/TableCell/TableCell.types.js +5 -0
  211. package/lib-amd/components/TableCell/TableCell.types.js.map +1 -0
  212. package/lib-amd/components/TableCell/index.js +10 -0
  213. package/lib-amd/components/TableCell/index.js.map +1 -0
  214. package/lib-amd/components/TableCell/renderTableCell.js +14 -0
  215. package/lib-amd/components/TableCell/renderTableCell.js.map +1 -0
  216. package/lib-amd/components/TableCell/useTableCell.js +29 -0
  217. package/lib-amd/components/TableCell/useTableCell.js.map +1 -0
  218. package/lib-amd/components/TableCell/useTableCellStyles.js +56 -0
  219. package/lib-amd/components/TableCell/useTableCellStyles.js.map +1 -0
  220. package/lib-amd/components/TableCellActions/TableCellActions.js +15 -0
  221. package/lib-amd/components/TableCellActions/TableCellActions.js.map +1 -0
  222. package/lib-amd/components/TableCellActions/TableCellActions.types.js +5 -0
  223. package/lib-amd/components/TableCellActions/TableCellActions.types.js.map +1 -0
  224. package/lib-amd/components/TableCellActions/index.js +10 -0
  225. package/lib-amd/components/TableCellActions/index.js.map +1 -0
  226. package/lib-amd/components/TableCellActions/renderTableCellActions.js +14 -0
  227. package/lib-amd/components/TableCellActions/renderTableCellActions.js.map +1 -0
  228. package/lib-amd/components/TableCellActions/useTableCellActions.js +26 -0
  229. package/lib-amd/components/TableCellActions/useTableCellActions.js.map +1 -0
  230. package/lib-amd/components/TableCellActions/useTableCellActionsStyles.js +35 -0
  231. package/lib-amd/components/TableCellActions/useTableCellActionsStyles.js.map +1 -0
  232. package/lib-amd/components/TableCellLayout/TableCellLayout.js +15 -0
  233. package/lib-amd/components/TableCellLayout/TableCellLayout.js.map +1 -0
  234. package/lib-amd/components/TableCellLayout/TableCellLayout.types.js +5 -0
  235. package/lib-amd/components/TableCellLayout/TableCellLayout.types.js.map +1 -0
  236. package/lib-amd/components/TableCellLayout/index.js +10 -0
  237. package/lib-amd/components/TableCellLayout/index.js.map +1 -0
  238. package/lib-amd/components/TableCellLayout/renderTableCellLayout.js +19 -0
  239. package/lib-amd/components/TableCellLayout/renderTableCellLayout.js.map +1 -0
  240. package/lib-amd/components/TableCellLayout/useTableCellLayout.js +42 -0
  241. package/lib-amd/components/TableCellLayout/useTableCellLayout.js.map +1 -0
  242. package/lib-amd/components/TableCellLayout/useTableCellLayoutContextValues.js +16 -0
  243. package/lib-amd/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -0
  244. package/lib-amd/components/TableCellLayout/useTableCellLayoutStyles.js +79 -0
  245. package/lib-amd/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -0
  246. package/lib-amd/components/TableHeader/TableHeader.js +15 -0
  247. package/lib-amd/components/TableHeader/TableHeader.js.map +1 -0
  248. package/lib-amd/components/TableHeader/TableHeader.types.js +5 -0
  249. package/lib-amd/components/TableHeader/TableHeader.types.js.map +1 -0
  250. package/lib-amd/components/TableHeader/index.js +10 -0
  251. package/lib-amd/components/TableHeader/index.js.map +1 -0
  252. package/lib-amd/components/TableHeader/renderTableHeader.js +15 -0
  253. package/lib-amd/components/TableHeader/renderTableHeader.js.map +1 -0
  254. package/lib-amd/components/TableHeader/useTableHeader.js +28 -0
  255. package/lib-amd/components/TableHeader/useTableHeader.js.map +1 -0
  256. package/lib-amd/components/TableHeader/useTableHeaderStyles.js +32 -0
  257. package/lib-amd/components/TableHeader/useTableHeaderStyles.js.map +1 -0
  258. package/lib-amd/components/TableHeaderCell/TableHeaderCell.js +15 -0
  259. package/lib-amd/components/TableHeaderCell/TableHeaderCell.js.map +1 -0
  260. package/lib-amd/components/TableHeaderCell/TableHeaderCell.types.js +5 -0
  261. package/lib-amd/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -0
  262. package/lib-amd/components/TableHeaderCell/index.js +10 -0
  263. package/lib-amd/components/TableHeaderCell/index.js.map +1 -0
  264. package/lib-amd/components/TableHeaderCell/renderTableHeaderCell.js +18 -0
  265. package/lib-amd/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -0
  266. package/lib-amd/components/TableHeaderCell/useTableHeaderCell.js +48 -0
  267. package/lib-amd/components/TableHeaderCell/useTableHeaderCell.js.map +1 -0
  268. package/lib-amd/components/TableHeaderCell/useTableHeaderCellStyles.js +67 -0
  269. package/lib-amd/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -0
  270. package/lib-amd/components/TableResizeHandle/TableResizeHandle.js +15 -0
  271. package/lib-amd/components/TableResizeHandle/TableResizeHandle.js.map +1 -0
  272. package/lib-amd/components/TableResizeHandle/TableResizeHandle.types.js +5 -0
  273. package/lib-amd/components/TableResizeHandle/TableResizeHandle.types.js.map +1 -0
  274. package/lib-amd/components/TableResizeHandle/index.js +10 -0
  275. package/lib-amd/components/TableResizeHandle/index.js.map +1 -0
  276. package/lib-amd/components/TableResizeHandle/renderTableResizeHandle.js +14 -0
  277. package/lib-amd/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -0
  278. package/lib-amd/components/TableResizeHandle/useTableResizeHandle.js +29 -0
  279. package/lib-amd/components/TableResizeHandle/useTableResizeHandle.js.map +1 -0
  280. package/lib-amd/components/TableResizeHandle/useTableResizeHandleStyles.js +37 -0
  281. package/lib-amd/components/TableResizeHandle/useTableResizeHandleStyles.js.map +1 -0
  282. package/lib-amd/components/TableRow/TableRow.js +15 -0
  283. package/lib-amd/components/TableRow/TableRow.js.map +1 -0
  284. package/lib-amd/components/TableRow/TableRow.types.js +5 -0
  285. package/lib-amd/components/TableRow/TableRow.types.js.map +1 -0
  286. package/lib-amd/components/TableRow/index.js +10 -0
  287. package/lib-amd/components/TableRow/index.js.map +1 -0
  288. package/lib-amd/components/TableRow/renderTableRow.js +14 -0
  289. package/lib-amd/components/TableRow/renderTableRow.js.map +1 -0
  290. package/lib-amd/components/TableRow/useTableRow.js +34 -0
  291. package/lib-amd/components/TableRow/useTableRow.js.map +1 -0
  292. package/lib-amd/components/TableRow/useTableRowStyles.js +98 -0
  293. package/lib-amd/components/TableRow/useTableRowStyles.js.map +1 -0
  294. package/lib-amd/components/TableSelectionCell/TableSelectionCell.js +15 -0
  295. package/lib-amd/components/TableSelectionCell/TableSelectionCell.js.map +1 -0
  296. package/lib-amd/components/TableSelectionCell/TableSelectionCell.types.js +5 -0
  297. package/lib-amd/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -0
  298. package/lib-amd/components/TableSelectionCell/index.js +10 -0
  299. package/lib-amd/components/TableSelectionCell/index.js.map +1 -0
  300. package/lib-amd/components/TableSelectionCell/renderTableSelectionCell.js +16 -0
  301. package/lib-amd/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -0
  302. package/lib-amd/components/TableSelectionCell/useTableSelectionCell.js +28 -0
  303. package/lib-amd/components/TableSelectionCell/useTableSelectionCell.js.map +1 -0
  304. package/lib-amd/components/TableSelectionCell/useTableSelectionCellStyles.js +58 -0
  305. package/lib-amd/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -0
  306. package/lib-amd/contexts/columnIdContext.js +11 -0
  307. package/lib-amd/contexts/columnIdContext.js.map +1 -0
  308. package/lib-amd/contexts/dataGridContext.js +16 -0
  309. package/lib-amd/contexts/dataGridContext.js.map +1 -0
  310. package/lib-amd/contexts/rowIdContext.js +11 -0
  311. package/lib-amd/contexts/rowIdContext.js.map +1 -0
  312. package/lib-amd/contexts/tableContext.js +15 -0
  313. package/lib-amd/contexts/tableContext.js.map +1 -0
  314. package/lib-amd/contexts/tableHeaderContext.js +11 -0
  315. package/lib-amd/contexts/tableHeaderContext.js.map +1 -0
  316. package/lib-amd/hooks/createColumn.js +36 -0
  317. package/lib-amd/hooks/createColumn.js.map +1 -0
  318. package/lib-amd/hooks/index.js +11 -0
  319. package/lib-amd/hooks/index.js.map +1 -0
  320. package/lib-amd/hooks/selectionManager.js +82 -0
  321. package/lib-amd/hooks/selectionManager.js.map +1 -0
  322. package/lib-amd/hooks/types.js +5 -0
  323. package/lib-amd/hooks/types.js.map +1 -0
  324. package/lib-amd/hooks/useMeasureElement.js +46 -0
  325. package/lib-amd/hooks/useMeasureElement.js.map +1 -0
  326. package/lib-amd/hooks/useTableColumnResizeMouseHandler.js +50 -0
  327. package/lib-amd/hooks/useTableColumnResizeMouseHandler.js.map +1 -0
  328. package/lib-amd/hooks/useTableColumnResizeState.js +73 -0
  329. package/lib-amd/hooks/useTableColumnResizeState.js.map +1 -0
  330. package/lib-amd/hooks/useTableColumnSizing.js +56 -0
  331. package/lib-amd/hooks/useTableColumnSizing.js.map +1 -0
  332. package/lib-amd/hooks/useTableFeatures.js +39 -0
  333. package/lib-amd/hooks/useTableFeatures.js.map +1 -0
  334. package/lib-amd/hooks/useTableSelection.js +70 -0
  335. package/lib-amd/hooks/useTableSelection.js.map +1 -0
  336. package/lib-amd/hooks/useTableSort.js +74 -0
  337. package/lib-amd/hooks/useTableSort.js.map +1 -0
  338. package/lib-amd/index.js +107 -0
  339. package/lib-amd/index.js.map +1 -0
  340. package/lib-amd/utils/columnResizeUtils.js +158 -0
  341. package/lib-amd/utils/columnResizeUtils.js.map +1 -0
  342. package/lib-commonjs/TableResizeHandle.js +8 -0
  343. package/lib-commonjs/TableResizeHandle.js.map +1 -0
  344. package/lib-commonjs/components/DataGrid/index.js +1 -0
  345. package/lib-commonjs/components/DataGrid/index.js.map +1 -1
  346. package/lib-commonjs/components/DataGrid/useDataGrid.js +15 -3
  347. package/lib-commonjs/components/DataGrid/useDataGrid.js.map +1 -1
  348. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js +2 -1
  349. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js.map +1 -1
  350. package/lib-commonjs/components/DataGridCell/useDataGridCell.js +5 -0
  351. package/lib-commonjs/components/DataGridCell/useDataGridCell.js.map +1 -1
  352. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js +3 -0
  353. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
  354. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js +5 -1
  355. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.js.map +1 -1
  356. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +1 -0
  357. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  358. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js +18 -4
  359. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
  360. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js +3 -1
  361. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  362. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +3 -1
  363. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  364. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js +10 -4
  365. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
  366. package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.js +20 -0
  367. package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.js.map +1 -0
  368. package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.types.js +6 -0
  369. package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.types.js.map +1 -0
  370. package/lib-commonjs/components/TableResizeHandle/index.js +12 -0
  371. package/lib-commonjs/components/TableResizeHandle/index.js.map +1 -0
  372. package/lib-commonjs/components/TableResizeHandle/renderTableResizeHandle.js +22 -0
  373. package/lib-commonjs/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -0
  374. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandle.js +35 -0
  375. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandle.js.map +1 -0
  376. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandleStyles.js +56 -0
  377. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandleStyles.js.map +1 -0
  378. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js +2 -1
  379. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
  380. package/lib-commonjs/hooks/index.js +1 -0
  381. package/lib-commonjs/hooks/index.js.map +1 -1
  382. package/lib-commonjs/hooks/useMeasureElement.js +55 -0
  383. package/lib-commonjs/hooks/useMeasureElement.js.map +1 -0
  384. package/lib-commonjs/hooks/useTableColumnResizeMouseHandler.js +57 -0
  385. package/lib-commonjs/hooks/useTableColumnResizeMouseHandler.js.map +1 -0
  386. package/lib-commonjs/hooks/useTableColumnResizeState.js +119 -0
  387. package/lib-commonjs/hooks/useTableColumnResizeState.js.map +1 -0
  388. package/lib-commonjs/hooks/useTableColumnSizing.js +84 -0
  389. package/lib-commonjs/hooks/useTableColumnSizing.js.map +1 -0
  390. package/lib-commonjs/hooks/useTableFeatures.js +10 -2
  391. package/lib-commonjs/hooks/useTableFeatures.js.map +1 -1
  392. package/lib-commonjs/index.js +46 -2
  393. package/lib-commonjs/index.js.map +1 -1
  394. package/lib-commonjs/utils/columnResizeUtils.js +172 -0
  395. package/lib-commonjs/utils/columnResizeUtils.js.map +1 -0
  396. package/package.json +10 -11
@@ -19,6 +19,8 @@ export const useDataGridHeaderCell_unstable = (props, ref) => {
19
19
  } = useTableContext();
20
20
  const toggleColumnSort = useDataGridContext_unstable(ctx => ctx.sort.toggleColumnSort);
21
21
  const sortDirection = useDataGridContext_unstable(ctx => sortable ? ctx.sort.getSortDirection(columnId) : undefined);
22
+ const resizableColumns = useDataGridContext_unstable(ctx => ctx.resizableColumns);
23
+ const columnSizing = useDataGridContext_unstable(ctx => ctx.columnSizing_unstable);
22
24
  const onClick = useEventCallback(e => {
23
25
  var _a;
24
26
  if (sortable) {
@@ -30,6 +32,7 @@ export const useDataGridHeaderCell_unstable = (props, ref) => {
30
32
  sortDirection,
31
33
  as: 'div',
32
34
  tabIndex: sortable ? undefined : 0,
35
+ ...(resizableColumns ? columnSizing.getTableHeaderCellProps(columnId) : {}),
33
36
  ...props,
34
37
  onClick
35
38
  }, ref);
@@ -1 +1 @@
1
- {"version":3,"mappings":"AACA,SAASA,gBAAgB,QAAQ,2BAA2B;AAE5D,SAASC,2BAA2B,QAAQ,uCAAuC;AACnF,SAASC,2BAA2B,QAAQ,gCAAgC;AAC5E,SAASC,kBAAkB,QAAQ,gCAAgC;AACnE,SAASC,eAAe,QAAQ,6BAA6B;AAE7D;;;;;;;;;AASA,OAAO,MAAMC,8BAA8B,GAAG,CAC5CC,KAA8B,EAC9BC,GAA2B,KACA;EAC3B,MAAMC,QAAQ,GAAGL,kBAAkB,EAAE;EACrC,MAAM;IAAEM;EAAQ,CAAE,GAAGL,eAAe,EAAE;EACtC,MAAMM,gBAAgB,GAAGR,2BAA2B,CAACS,GAAG,IAAIA,GAAG,CAACC,IAAI,CAACF,gBAAgB,CAAC;EACtF,MAAMG,aAAa,GAAGX,2BAA2B,CAACS,GAAG,IACnDF,QAAQ,GAAGE,GAAG,CAACC,IAAI,CAACE,gBAAgB,CAACN,QAAQ,CAAC,GAAGO,SAAS,CAC3D;EACD,MAAMC,OAAO,GAAGhB,gBAAgB,CAAEiB,CAA+C,IAAI;;IACnF,IAAIR,QAAQ,EAAE;MACZC,gBAAgB,CAACO,CAAC,EAAET,QAAQ,CAAC;;IAE/B,WAAK,CAACQ,OAAO,+CAAbV,KAAK,EAAWW,CAAC,CAAC;EACpB,CAAC,CAAC;EAEF,OAAOhB,2BAA2B,CAChC;IAAEY,aAAa;IAAEK,EAAE,EAAE,KAAK;IAAEC,QAAQ,EAAEV,QAAQ,GAAGM,SAAS,GAAG,CAAC;IAAE,GAAGT,KAAK;IAAEU;EAAO,CAAE,EACnFT,GAAG,CACJ;AACH,CAAC","names":["useEventCallback","useTableHeaderCell_unstable","useDataGridContext_unstable","useColumnIdContext","useTableContext","useDataGridHeaderCell_unstable","props","ref","columnId","sortable","toggleColumnSort","ctx","sort","sortDirection","getSortDirection","undefined","onClick","e","as","tabIndex"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/DataGridHeaderCell/useDataGridHeaderCell.ts"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport type { DataGridHeaderCellProps, DataGridHeaderCellState } from './DataGridHeaderCell.types';\nimport { useTableHeaderCell_unstable } from '../TableHeaderCell/useTableHeaderCell';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useColumnIdContext } from '../../contexts/columnIdContext';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render DataGridHeaderCell.\n *\n * The returned state can be modified with hooks such as useDataGridHeaderCellStyles_unstable,\n * before being passed to renderDataGridHeaderCell_unstable.\n *\n * @param props - props from this instance of DataGridHeaderCell\n * @param ref - reference to root HTMLElement of DataGridHeaderCell\n */\nexport const useDataGridHeaderCell_unstable = (\n props: DataGridHeaderCellProps,\n ref: React.Ref<HTMLElement>,\n): DataGridHeaderCellState => {\n const columnId = useColumnIdContext();\n const { sortable } = useTableContext();\n const toggleColumnSort = useDataGridContext_unstable(ctx => ctx.sort.toggleColumnSort);\n const sortDirection = useDataGridContext_unstable(ctx =>\n sortable ? ctx.sort.getSortDirection(columnId) : undefined,\n );\n const onClick = useEventCallback((e: React.MouseEvent<HTMLTableHeaderCellElement>) => {\n if (sortable) {\n toggleColumnSort(e, columnId);\n }\n props.onClick?.(e);\n });\n\n return useTableHeaderCell_unstable(\n { sortDirection, as: 'div', tabIndex: sortable ? undefined : 0, ...props, onClick },\n ref,\n );\n};\n"]}
1
+ {"version":3,"mappings":"AACA,SAASA,gBAAgB,QAAQ,2BAA2B;AAE5D,SAASC,2BAA2B,QAAQ,uCAAuC;AACnF,SAASC,2BAA2B,QAAQ,gCAAgC;AAC5E,SAASC,kBAAkB,QAAQ,gCAAgC;AACnE,SAASC,eAAe,QAAQ,6BAA6B;AAE7D;;;;;;;;;AASA,OAAO,MAAMC,8BAA8B,GAAG,CAC5CC,KAA8B,EAC9BC,GAA2B,KACA;EAC3B,MAAMC,QAAQ,GAAGL,kBAAkB,EAAE;EACrC,MAAM;IAAEM;EAAQ,CAAE,GAAGL,eAAe,EAAE;EACtC,MAAMM,gBAAgB,GAAGR,2BAA2B,CAACS,GAAG,IAAIA,GAAG,CAACC,IAAI,CAACF,gBAAgB,CAAC;EACtF,MAAMG,aAAa,GAAGX,2BAA2B,CAACS,GAAG,IACnDF,QAAQ,GAAGE,GAAG,CAACC,IAAI,CAACE,gBAAgB,CAACN,QAAQ,CAAC,GAAGO,SAAS,CAC3D;EAED,MAAMC,gBAAgB,GAAGd,2BAA2B,CAACS,GAAG,IAAIA,GAAG,CAACK,gBAAgB,CAAC;EACjF,MAAMC,YAAY,GAAGf,2BAA2B,CAACS,GAAG,IAAIA,GAAG,CAACO,qBAAqB,CAAC;EAElF,MAAMC,OAAO,GAAGnB,gBAAgB,CAAEoB,CAA+C,IAAI;;IACnF,IAAIX,QAAQ,EAAE;MACZC,gBAAgB,CAACU,CAAC,EAAEZ,QAAQ,CAAC;;IAE/B,WAAK,CAACW,OAAO,+CAAbb,KAAK,EAAWc,CAAC,CAAC;EACpB,CAAC,CAAC;EAEF,OAAOnB,2BAA2B,CAChC;IACEY,aAAa;IACbQ,EAAE,EAAE,KAAK;IACTC,QAAQ,EAAEb,QAAQ,GAAGM,SAAS,GAAG,CAAC;IAClC,IAAIC,gBAAgB,GAAGC,YAAY,CAACM,uBAAuB,CAACf,QAAQ,CAAC,GAAG,EAAE,CAAC;IAC3E,GAAGF,KAAK;IACRa;GACD,EACDZ,GAAG,CACJ;AACH,CAAC","names":["useEventCallback","useTableHeaderCell_unstable","useDataGridContext_unstable","useColumnIdContext","useTableContext","useDataGridHeaderCell_unstable","props","ref","columnId","sortable","toggleColumnSort","ctx","sort","sortDirection","getSortDirection","undefined","resizableColumns","columnSizing","columnSizing_unstable","onClick","e","as","tabIndex","getTableHeaderCellProps"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/DataGridHeaderCell/useDataGridHeaderCell.ts"],"sourcesContent":["import * as React from 'react';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport type { DataGridHeaderCellProps, DataGridHeaderCellState } from './DataGridHeaderCell.types';\nimport { useTableHeaderCell_unstable } from '../TableHeaderCell/useTableHeaderCell';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { useColumnIdContext } from '../../contexts/columnIdContext';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render DataGridHeaderCell.\n *\n * The returned state can be modified with hooks such as useDataGridHeaderCellStyles_unstable,\n * before being passed to renderDataGridHeaderCell_unstable.\n *\n * @param props - props from this instance of DataGridHeaderCell\n * @param ref - reference to root HTMLElement of DataGridHeaderCell\n */\nexport const useDataGridHeaderCell_unstable = (\n props: DataGridHeaderCellProps,\n ref: React.Ref<HTMLElement>,\n): DataGridHeaderCellState => {\n const columnId = useColumnIdContext();\n const { sortable } = useTableContext();\n const toggleColumnSort = useDataGridContext_unstable(ctx => ctx.sort.toggleColumnSort);\n const sortDirection = useDataGridContext_unstable(ctx =>\n sortable ? ctx.sort.getSortDirection(columnId) : undefined,\n );\n\n const resizableColumns = useDataGridContext_unstable(ctx => ctx.resizableColumns);\n const columnSizing = useDataGridContext_unstable(ctx => ctx.columnSizing_unstable);\n\n const onClick = useEventCallback((e: React.MouseEvent<HTMLTableHeaderCellElement>) => {\n if (sortable) {\n toggleColumnSort(e, columnId);\n }\n props.onClick?.(e);\n });\n\n return useTableHeaderCell_unstable(\n {\n sortDirection,\n as: 'div',\n tabIndex: sortable ? undefined : 0,\n ...(resizableColumns ? columnSizing.getTableHeaderCellProps(columnId) : {}),\n ...props,\n onClick,\n },\n ref,\n );\n};\n"]}
@@ -3,7 +3,8 @@ import { useTableHeaderCellStyles_unstable } from '../TableHeaderCell/useTableHe
3
3
  export const dataGridHeaderCellClassNames = {
4
4
  root: 'fui-DataGridHeaderCell',
5
5
  button: 'fui-DataGridHeaderCell__button',
6
- sortIcon: 'fui-DataGridHeaderCell__sortIcon'
6
+ sortIcon: 'fui-DataGridHeaderCell__sortIcon',
7
+ aside: 'fui-DataGridHeaderCell__aside'
7
8
  };
8
9
  /**
9
10
  * Apply styling to the DataGridHeaderCell slots based on the state
@@ -17,6 +18,9 @@ export const useDataGridHeaderCellStyles_unstable = state => {
17
18
  if (state.sortIcon) {
18
19
  state.sortIcon.className = mergeClasses(dataGridHeaderCellClassNames.sortIcon, state.sortIcon.className);
19
20
  }
21
+ if (state.aside) {
22
+ state.aside.className = mergeClasses(dataGridHeaderCellClassNames.aside, state.aside.className);
23
+ }
20
24
  return state;
21
25
  };
22
26
  //# sourceMappingURL=useDataGridHeaderCellStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB;AAG7C,SAASC,iCAAiC,QAAQ,6CAA6C;AAE/F,OAAO,MAAMC,4BAA4B,GAA4C;EACnFC,IAAI,EAAE,wBAAwB;EAC9BC,MAAM,EAAE,gCAAgC;EACxCC,QAAQ,EAAE;CACX;AAED;;;AAGA,OAAO,MAAMC,oCAAoC,GAAIC,KAA8B,IAA6B;EAC9GN,iCAAiC,CAACM,KAAK,CAAC;EACxCA,KAAK,CAACJ,IAAI,CAACK,SAAS,GAAGR,YAAY,CAACE,4BAA4B,CAACC,IAAI,EAAEI,KAAK,CAACJ,IAAI,CAACK,SAAS,CAAC;EAE5F,IAAID,KAAK,CAACH,MAAM,EAAE;IAChBG,KAAK,CAACH,MAAM,CAACI,SAAS,GAAGR,YAAY,CAACE,4BAA4B,CAACE,MAAM,EAAEG,KAAK,CAACH,MAAM,CAACI,SAAS,CAAC;;EAGpG,IAAID,KAAK,CAACF,QAAQ,EAAE;IAClBE,KAAK,CAACF,QAAQ,CAACG,SAAS,GAAGR,YAAY,CAACE,4BAA4B,CAACG,QAAQ,EAAEE,KAAK,CAACF,QAAQ,CAACG,SAAS,CAAC;;EAG1G,OAAOD,KAAK;AACd,CAAC","names":["mergeClasses","useTableHeaderCellStyles_unstable","dataGridHeaderCellClassNames","root","button","sortIcon","useDataGridHeaderCellStyles_unstable","state","className"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/DataGridHeaderCell/useDataGridHeaderCellStyles.ts"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport type { DataGridHeaderCellSlots, DataGridHeaderCellState } from './DataGridHeaderCell.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { useTableHeaderCellStyles_unstable } from '../TableHeaderCell/useTableHeaderCellStyles';\n\nexport const dataGridHeaderCellClassNames: SlotClassNames<DataGridHeaderCellSlots> = {\n root: 'fui-DataGridHeaderCell',\n button: 'fui-DataGridHeaderCell__button',\n sortIcon: 'fui-DataGridHeaderCell__sortIcon',\n};\n\n/**\n * Apply styling to the DataGridHeaderCell slots based on the state\n */\nexport const useDataGridHeaderCellStyles_unstable = (state: DataGridHeaderCellState): DataGridHeaderCellState => {\n useTableHeaderCellStyles_unstable(state);\n state.root.className = mergeClasses(dataGridHeaderCellClassNames.root, state.root.className);\n\n if (state.button) {\n state.button.className = mergeClasses(dataGridHeaderCellClassNames.button, state.button.className);\n }\n\n if (state.sortIcon) {\n state.sortIcon.className = mergeClasses(dataGridHeaderCellClassNames.sortIcon, state.sortIcon.className);\n }\n\n return state;\n};\n"]}
1
+ {"version":3,"mappings":"AAAA,SAASA,YAAY,QAAQ,gBAAgB;AAG7C,SAASC,iCAAiC,QAAQ,6CAA6C;AAE/F,OAAO,MAAMC,4BAA4B,GAA4C;EACnFC,IAAI,EAAE,wBAAwB;EAC9BC,MAAM,EAAE,gCAAgC;EACxCC,QAAQ,EAAE,kCAAkC;EAC5CC,KAAK,EAAE;CACR;AAED;;;AAGA,OAAO,MAAMC,oCAAoC,GAAIC,KAA8B,IAA6B;EAC9GP,iCAAiC,CAACO,KAAK,CAAC;EACxCA,KAAK,CAACL,IAAI,CAACM,SAAS,GAAGT,YAAY,CAACE,4BAA4B,CAACC,IAAI,EAAEK,KAAK,CAACL,IAAI,CAACM,SAAS,CAAC;EAE5F,IAAID,KAAK,CAACJ,MAAM,EAAE;IAChBI,KAAK,CAACJ,MAAM,CAACK,SAAS,GAAGT,YAAY,CAACE,4BAA4B,CAACE,MAAM,EAAEI,KAAK,CAACJ,MAAM,CAACK,SAAS,CAAC;;EAGpG,IAAID,KAAK,CAACH,QAAQ,EAAE;IAClBG,KAAK,CAACH,QAAQ,CAACI,SAAS,GAAGT,YAAY,CAACE,4BAA4B,CAACG,QAAQ,EAAEG,KAAK,CAACH,QAAQ,CAACI,SAAS,CAAC;;EAG1G,IAAID,KAAK,CAACF,KAAK,EAAE;IACfE,KAAK,CAACF,KAAK,CAACG,SAAS,GAAGT,YAAY,CAACE,4BAA4B,CAACI,KAAK,EAAEE,KAAK,CAACF,KAAK,CAACG,SAAS,CAAC;;EAGjG,OAAOD,KAAK;AACd,CAAC","names":["mergeClasses","useTableHeaderCellStyles_unstable","dataGridHeaderCellClassNames","root","button","sortIcon","aside","useDataGridHeaderCellStyles_unstable","state","className"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/DataGridHeaderCell/useDataGridHeaderCellStyles.ts"],"sourcesContent":["import { mergeClasses } from '@griffel/react';\nimport type { DataGridHeaderCellSlots, DataGridHeaderCellState } from './DataGridHeaderCell.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { useTableHeaderCellStyles_unstable } from '../TableHeaderCell/useTableHeaderCellStyles';\n\nexport const dataGridHeaderCellClassNames: SlotClassNames<DataGridHeaderCellSlots> = {\n root: 'fui-DataGridHeaderCell',\n button: 'fui-DataGridHeaderCell__button',\n sortIcon: 'fui-DataGridHeaderCell__sortIcon',\n aside: 'fui-DataGridHeaderCell__aside',\n};\n\n/**\n * Apply styling to the DataGridHeaderCell slots based on the state\n */\nexport const useDataGridHeaderCellStyles_unstable = (state: DataGridHeaderCellState): DataGridHeaderCellState => {\n useTableHeaderCellStyles_unstable(state);\n state.root.className = mergeClasses(dataGridHeaderCellClassNames.root, state.root.className);\n\n if (state.button) {\n state.button.className = mergeClasses(dataGridHeaderCellClassNames.button, state.button.className);\n }\n\n if (state.sortIcon) {\n state.sortIcon.className = mergeClasses(dataGridHeaderCellClassNames.sortIcon, state.sortIcon.className);\n }\n\n if (state.aside) {\n state.aside.className = mergeClasses(dataGridHeaderCellClassNames.aside, state.aside.className);\n }\n\n return state;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TableCellLayout.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCellLayout/TableCellLayout.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { AvatarSize } from '@fluentui/react-avatar';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableCellLayoutContextValues = {\n avatar: {\n size?: AvatarSize;\n };\n};\n\nexport type TableCellLayoutSlots = {\n root: Slot<'div'>;\n\n /**\n * Slot for an icon or other visual element\n */\n media: Slot<'span'>;\n\n /**\n * Main text for the table cell. Children of the root slot are automatically rendered here\n */\n main: Slot<'span'>;\n\n /**\n * Secondary text that describes or complements the main text\n */\n description: Slot<'span'>;\n\n /**\n * A layout wrapper for the main and description slots\n */\n content: Slot<'div'>;\n};\n\n/**\n * TableCellLayout Props\n */\nexport type TableCellLayoutProps = ComponentProps<Partial<TableCellLayoutSlots>> & {\n /**\n * Renders design variants of the table cell\n * @default undefined\n */\n appearance?: 'primary';\n};\n\n/**\n * State used in rendering TableCellLayout\n */\nexport type TableCellLayoutState = ComponentState<TableCellLayoutSlots> &\n Pick<TableCellLayoutProps, 'appearance'> & { avatarSize: AvatarSize | undefined } & Pick<TableContextValue, 'size'>;\n"]}
1
+ {"version":3,"file":"TableCellLayout.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCellLayout/TableCellLayout.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { AvatarSize } from '@fluentui/react-avatar';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableCellLayoutContextValues = {\n avatar: {\n size?: AvatarSize;\n };\n};\n\nexport type TableCellLayoutSlots = {\n root: Slot<'div'>;\n\n /**\n * Slot for an icon or other visual element\n */\n media: Slot<'span'>;\n\n /**\n * Main text for the table cell. Children of the root slot are automatically rendered here\n */\n main: Slot<'span'>;\n\n /**\n * Secondary text that describes or complements the main text\n */\n description: Slot<'span'>;\n\n /**\n * A layout wrapper for the main and description slots\n */\n content: Slot<'div'>;\n};\n\n/**\n * TableCellLayout Props\n */\nexport type TableCellLayoutProps = ComponentProps<Partial<TableCellLayoutSlots>> & {\n /**\n * Renders design variants of the table cell\n * @default undefined\n */\n appearance?: 'primary';\n\n /**\n * Renders content with overflow: hidden and text-overflow: ellipsis\n */\n truncate?: boolean;\n};\n\n/**\n * State used in rendering TableCellLayout\n */\nexport type TableCellLayoutState = ComponentState<TableCellLayoutSlots> &\n Pick<TableCellLayoutProps, 'appearance' | 'truncate'> & { avatarSize: AvatarSize | undefined } & Pick<\n TableContextValue,\n 'size'\n >;\n"]}
@@ -31,6 +31,7 @@ export const useTableCellLayout_unstable = (props, ref) => {
31
31
  ...props
32
32
  }),
33
33
  appearance: props.appearance,
34
+ truncate: props.truncate,
34
35
  main: resolveShorthand(props.main, {
35
36
  required: true
36
37
  }),
@@ -1 +1 @@
1
- {"version":3,"mappings":"AACA,SAASA,qBAAqB,EAAEC,gBAAgB,QAAQ,2BAA2B;AAEnF,SAASC,eAAe,QAAQ,6BAA6B;AAE7D,MAAMC,kBAAkB,GAAG;EACzBC,MAAM,EAAE,EAAE;EACVC,KAAK,EAAE,EAAE;EACT,aAAa,EAAE;CACP;AAEV;;;;;;;;;AASA,OAAO,MAAMC,2BAA2B,GAAG,CACzCC,KAA2B,EAC3BC,GAA2B,KACH;EACxB,MAAM;IAAEC;EAAI,CAAE,GAAGP,eAAe,EAAE;EAElC,OAAO;IACLQ,UAAU,EAAE;MACVC,IAAI,EAAE,KAAK;MACXC,IAAI,EAAE,MAAM;MACZC,WAAW,EAAE,MAAM;MACnBC,OAAO,EAAE,KAAK;MACdC,KAAK,EAAE;KACR;IACDJ,IAAI,EAAEX,qBAAqB,CAAC,KAAK,EAAE;MAAEQ,GAAG;MAAE,GAAGD;IAAK,CAAE,CAAC;IACrDS,UAAU,EAAET,KAAK,CAACS,UAAU;IAC5BJ,IAAI,EAAEX,gBAAgB,CAACM,KAAK,CAACK,IAAI,EAAE;MAAEK,QAAQ,EAAE;IAAI,CAAE,CAAC;IACtDF,KAAK,EAAEd,gBAAgB,CAACM,KAAK,CAACQ,KAAK,CAAC;IACpCF,WAAW,EAAEZ,gBAAgB,CAACM,KAAK,CAACM,WAAW,CAAC;IAChDC,OAAO,EAAEb,gBAAgB,CAACM,KAAK,CAACO,OAAO,EAAE;MAAEG,QAAQ,EAAE,CAAC,CAACV,KAAK,CAACM,WAAW,IAAI,CAAC,CAACN,KAAK,CAACW;IAAQ,CAAE,CAAC;IAC/FC,UAAU,EAAEhB,kBAAkB,CAACM,IAAI,CAAC;IACpCA;GACD;AACH,CAAC","names":["getNativeElementProps","resolveShorthand","useTableContext","tableAvatarSizeMap","medium","small","useTableCellLayout_unstable","props","ref","size","components","root","main","description","content","media","appearance","required","children","avatarSize"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCellLayout/useTableCellLayout.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport type { TableCellLayoutProps, TableCellLayoutState } from './TableCellLayout.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\nconst tableAvatarSizeMap = {\n medium: 32,\n small: 24,\n 'extra-small': 20,\n} as const;\n\n/**\n * Create the state required to render TableCellLayout.\n *\n * The returned state can be modified with hooks such as useTableCellLayoutStyles_unstable,\n * before being passed to renderTableCellLayout_unstable.\n *\n * @param props - props from this instance of TableCellLayout\n * @param ref - reference to root HTMLElement of TableCellLayout\n */\nexport const useTableCellLayout_unstable = (\n props: TableCellLayoutProps,\n ref: React.Ref<HTMLElement>,\n): TableCellLayoutState => {\n const { size } = useTableContext();\n\n return {\n components: {\n root: 'div',\n main: 'span',\n description: 'span',\n content: 'div',\n media: 'span',\n },\n root: getNativeElementProps('div', { ref, ...props }),\n appearance: props.appearance,\n main: resolveShorthand(props.main, { required: true }),\n media: resolveShorthand(props.media),\n description: resolveShorthand(props.description),\n content: resolveShorthand(props.content, { required: !!props.description || !!props.children }),\n avatarSize: tableAvatarSizeMap[size],\n size,\n };\n};\n"]}
1
+ {"version":3,"mappings":"AACA,SAASA,qBAAqB,EAAEC,gBAAgB,QAAQ,2BAA2B;AAEnF,SAASC,eAAe,QAAQ,6BAA6B;AAE7D,MAAMC,kBAAkB,GAAG;EACzBC,MAAM,EAAE,EAAE;EACVC,KAAK,EAAE,EAAE;EACT,aAAa,EAAE;CACP;AAEV;;;;;;;;;AASA,OAAO,MAAMC,2BAA2B,GAAG,CACzCC,KAA2B,EAC3BC,GAA2B,KACH;EACxB,MAAM;IAAEC;EAAI,CAAE,GAAGP,eAAe,EAAE;EAElC,OAAO;IACLQ,UAAU,EAAE;MACVC,IAAI,EAAE,KAAK;MACXC,IAAI,EAAE,MAAM;MACZC,WAAW,EAAE,MAAM;MACnBC,OAAO,EAAE,KAAK;MACdC,KAAK,EAAE;KACR;IACDJ,IAAI,EAAEX,qBAAqB,CAAC,KAAK,EAAE;MAAEQ,GAAG;MAAE,GAAGD;IAAK,CAAE,CAAC;IACrDS,UAAU,EAAET,KAAK,CAACS,UAAU;IAC5BC,QAAQ,EAAEV,KAAK,CAACU,QAAQ;IACxBL,IAAI,EAAEX,gBAAgB,CAACM,KAAK,CAACK,IAAI,EAAE;MAAEM,QAAQ,EAAE;IAAI,CAAE,CAAC;IACtDH,KAAK,EAAEd,gBAAgB,CAACM,KAAK,CAACQ,KAAK,CAAC;IACpCF,WAAW,EAAEZ,gBAAgB,CAACM,KAAK,CAACM,WAAW,CAAC;IAChDC,OAAO,EAAEb,gBAAgB,CAACM,KAAK,CAACO,OAAO,EAAE;MAAEI,QAAQ,EAAE,CAAC,CAACX,KAAK,CAACM,WAAW,IAAI,CAAC,CAACN,KAAK,CAACY;IAAQ,CAAE,CAAC;IAC/FC,UAAU,EAAEjB,kBAAkB,CAACM,IAAI,CAAC;IACpCA;GACD;AACH,CAAC","names":["getNativeElementProps","resolveShorthand","useTableContext","tableAvatarSizeMap","medium","small","useTableCellLayout_unstable","props","ref","size","components","root","main","description","content","media","appearance","truncate","required","children","avatarSize"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCellLayout/useTableCellLayout.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport type { TableCellLayoutProps, TableCellLayoutState } from './TableCellLayout.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\nconst tableAvatarSizeMap = {\n medium: 32,\n small: 24,\n 'extra-small': 20,\n} as const;\n\n/**\n * Create the state required to render TableCellLayout.\n *\n * The returned state can be modified with hooks such as useTableCellLayoutStyles_unstable,\n * before being passed to renderTableCellLayout_unstable.\n *\n * @param props - props from this instance of TableCellLayout\n * @param ref - reference to root HTMLElement of TableCellLayout\n */\nexport const useTableCellLayout_unstable = (\n props: TableCellLayoutProps,\n ref: React.Ref<HTMLElement>,\n): TableCellLayoutState => {\n const { size } = useTableContext();\n\n return {\n components: {\n root: 'div',\n main: 'span',\n description: 'span',\n content: 'div',\n media: 'span',\n },\n root: getNativeElementProps('div', { ref, ...props }),\n appearance: props.appearance,\n truncate: props.truncate,\n main: resolveShorthand(props.main, { required: true }),\n media: resolveShorthand(props.media),\n description: resolveShorthand(props.description),\n content: resolveShorthand(props.content, { required: !!props.description || !!props.children }),\n avatarSize: tableAvatarSizeMap[size],\n size,\n };\n};\n"]}
@@ -21,10 +21,16 @@ const useStyles = /*#__PURE__*/__styles({
21
21
  Bnnss6s: "f1neuvcm",
22
22
  xawz: "fkjuxzh"
23
23
  },
24
+ rootTruncate: {
25
+ B68tc82: "f1p9o1ba"
26
+ },
24
27
  content: {
25
28
  mc9l5x: "f22iagw",
26
29
  Beiy3e4: "f1vx9l62"
27
30
  },
31
+ contentTruncate: {
32
+ B68tc82: "f1p9o1ba"
33
+ },
28
34
  media: {
29
35
  mc9l5x: "f22iagw",
30
36
  Bt984gj: "f122n59"
@@ -41,6 +47,11 @@ const useStyles = /*#__PURE__*/__styles({
41
47
  mainPrimary: {
42
48
  Bhrd7zp: "fl43uef"
43
49
  },
50
+ mainTruncate: {
51
+ B68tc82: "f1p9o1ba",
52
+ Huce71: "fz5stix",
53
+ ygn44y: "f1cmbuwj"
54
+ },
44
55
  description: {
45
56
  sj55zd: "fkfq4zb",
46
57
  Bahqtrf: "fk6fouc",
@@ -49,14 +60,17 @@ const useStyles = /*#__PURE__*/__styles({
49
60
  Bg96gwp: "fwrc4pm"
50
61
  }
51
62
  }, {
52
- d: [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fsnqrgy{-webkit-column-gap:var(--spacingHorizontalS);column-gap:var(--spacingHorizontalS);}", ".fylz90v{row-gap:var(--spacingHorizontalS);}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f1neuvcm{-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;}", ".fkjuxzh{-webkit-flex-basis:0px;-ms-flex-preferred-size:0px;flex-basis:0px;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".f4ybsrx{font-size:16px;}", ".fe5j1ua{font-size:20px;}", ".f1rt2boy{font-size:24px;}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fkfq4zb{color:var(--colorNeutralForeground2);}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}"]
63
+ d: [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fsnqrgy{-webkit-column-gap:var(--spacingHorizontalS);column-gap:var(--spacingHorizontalS);}", ".fylz90v{row-gap:var(--spacingHorizontalS);}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f1neuvcm{-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;}", ".fkjuxzh{-webkit-flex-basis:0px;-ms-flex-preferred-size:0px;flex-basis:0px;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".f4ybsrx{font-size:16px;}", ".fe5j1ua{font-size:20px;}", ".f1rt2boy{font-size:24px;}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fz5stix{white-space:nowrap;}", ".f1cmbuwj{text-overflow:ellipsis;}", ".fkfq4zb{color:var(--colorNeutralForeground2);}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}"]
53
64
  });
54
65
  /**
55
66
  * Apply styling to the TableCellLayout slots based on the state
56
67
  */
57
68
  export const useTableCellLayoutStyles_unstable = state => {
58
69
  const styles = useStyles();
59
- state.root.className = mergeClasses(tableCellLayoutClassNames.root, styles.root, state.root.className);
70
+ const {
71
+ truncate
72
+ } = state;
73
+ state.root.className = mergeClasses(tableCellLayoutClassNames.root, styles.root, truncate && styles.rootTruncate, state.root.className);
60
74
  const primary = state.appearance === 'primary';
61
75
  if (state.media) {
62
76
  const mediaSizedStyles = {
@@ -67,13 +81,13 @@ export const useTableCellLayoutStyles_unstable = state => {
67
81
  state.media.className = mergeClasses(tableCellLayoutClassNames.media, styles.media, mediaSizedStyles[state.size], primary && styles.mediaPrimary, state.media.className);
68
82
  }
69
83
  if (state.main) {
70
- state.main.className = mergeClasses(tableCellLayoutClassNames.main, primary && styles.mainPrimary, state.main.className);
84
+ state.main.className = mergeClasses(tableCellLayoutClassNames.main, truncate && styles.mainTruncate, primary && styles.mainPrimary, state.main.className);
71
85
  }
72
86
  if (state.description) {
73
87
  state.description.className = mergeClasses(tableCellLayoutClassNames.description, styles.description, state.description.className);
74
88
  }
75
89
  if (state.content) {
76
- state.content.className = mergeClasses(tableCellLayoutClassNames.content, styles.content, state.content.className);
90
+ state.content.className = mergeClasses(tableCellLayoutClassNames.content, styles.content, truncate && styles.contentTruncate, state.content.className);
77
91
  }
78
92
  return state;
79
93
  };
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,mBAAqBA,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,QAAQ,uBAAuB;AAG9C,SAASC,gBAAgB,QAAQ,uBAAuB;AAExD,OAAO,MAAMC,yBAAyB,GAAyC;EAC7EC,IAAI,EAAE,qBAAqB;EAC3BC,KAAK,EAAE,4BAA4B;EACnCC,IAAI,EAAE,2BAA2B;EACjCC,WAAW,EAAE,kCAAkC;EAC/CC,OAAO,EAAE;CACV;AAED;;;AAGA,MAAMC,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAqChB;AAEF;;;AAGA,OAAO,MAAMC,iCAAiC,GAAIC,KAA2B,IAA0B;EACrG,MAAMC,MAAM,GAAGH,SAAS,EAAE;EAC1BE,KAAK,CAACP,IAAI,CAACS,SAAS,GAAGd,YAAY,CAACI,yBAAyB,CAACC,IAAI,EAAEQ,MAAM,CAACR,IAAI,EAAEO,KAAK,CAACP,IAAI,CAACS,SAAS,CAAC;EACtG,MAAMC,OAAO,GAAGH,KAAK,CAACI,UAAU,KAAK,SAAS;EAE9C,IAAIJ,KAAK,CAACN,KAAK,EAAE;IACf,MAAMW,gBAAgB,GAAG;MACvBC,KAAK,EAAEL,MAAM,CAACM,mBAAmB;MACjCC,MAAM,EAAEP,MAAM,CAACM,mBAAmB;MAClC,aAAa,EAAEN,MAAM,CAACQ;KACvB;IAEDT,KAAK,CAACN,KAAK,CAACQ,SAAS,GAAGd,YAAY,CAClCI,yBAAyB,CAACE,KAAK,EAC/BO,MAAM,CAACP,KAAK,EACZW,gBAAgB,CAACL,KAAK,CAACU,IAAI,CAAC,EAC5BP,OAAO,IAAIF,MAAM,CAACU,YAAY,EAC9BX,KAAK,CAACN,KAAK,CAACQ,SAAS,CACtB;;EAGH,IAAIF,KAAK,CAACL,IAAI,EAAE;IACdK,KAAK,CAACL,IAAI,CAACO,SAAS,GAAGd,YAAY,CACjCI,yBAAyB,CAACG,IAAI,EAC9BQ,OAAO,IAAIF,MAAM,CAACW,WAAW,EAC7BZ,KAAK,CAACL,IAAI,CAACO,SAAS,CACrB;;EAGH,IAAIF,KAAK,CAACJ,WAAW,EAAE;IACrBI,KAAK,CAACJ,WAAW,CAACM,SAAS,GAAGd,YAAY,CACxCI,yBAAyB,CAACI,WAAW,EACrCK,MAAM,CAACL,WAAW,EAClBI,KAAK,CAACJ,WAAW,CAACM,SAAS,CAC5B;;EAGH,IAAIF,KAAK,CAACH,OAAO,EAAE;IACjBG,KAAK,CAACH,OAAO,CAACK,SAAS,GAAGd,YAAY,CAACI,yBAAyB,CAACK,OAAO,EAAEI,MAAM,CAACJ,OAAO,EAAEG,KAAK,CAACH,OAAO,CAACK,SAAS,CAAC;;EAGpH,OAAOF,KAAK;AACd,CAAC","names":["mergeClasses","shorthands","tokens","typographyStyles","tableCellLayoutClassNames","root","media","main","description","content","useStyles","useTableCellLayoutStyles_unstable","state","styles","className","primary","appearance","mediaSizedStyles","small","mediaSmallAndMedium","medium","mediaExtraSmall","size","mediaPrimary","mainPrimary"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCellLayout/useTableCellLayoutStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { TableCellLayoutSlots, TableCellLayoutState } from './TableCellLayout.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { typographyStyles } from '@fluentui/react-theme';\n\nexport const tableCellLayoutClassNames: SlotClassNames<TableCellLayoutSlots> = {\n root: 'fui-TableCellLayout',\n media: 'fui-TableCellLayout__media',\n main: 'fui-TableCellLayout__main',\n description: 'fui-TableCellLayout__description',\n content: 'fui-TableCellLayout__content',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n ...shorthands.gap(tokens.spacingHorizontalS),\n ...shorthands.flex(1, 1, '0px'),\n },\n content: {\n display: 'flex',\n flexDirection: 'column',\n },\n\n media: {\n display: 'flex',\n alignItems: 'center',\n },\n\n mediaExtraSmall: {\n fontSize: '16px',\n },\n\n mediaSmallAndMedium: {\n fontSize: '20px',\n },\n\n mediaPrimary: {\n fontSize: '24px',\n },\n\n mainPrimary: {\n fontWeight: tokens.fontWeightSemibold,\n },\n\n description: {\n color: tokens.colorNeutralForeground2,\n ...typographyStyles.caption1,\n },\n});\n\n/**\n * Apply styling to the TableCellLayout slots based on the state\n */\nexport const useTableCellLayoutStyles_unstable = (state: TableCellLayoutState): TableCellLayoutState => {\n const styles = useStyles();\n state.root.className = mergeClasses(tableCellLayoutClassNames.root, styles.root, state.root.className);\n const primary = state.appearance === 'primary';\n\n if (state.media) {\n const mediaSizedStyles = {\n small: styles.mediaSmallAndMedium,\n medium: styles.mediaSmallAndMedium,\n 'extra-small': styles.mediaExtraSmall,\n };\n\n state.media.className = mergeClasses(\n tableCellLayoutClassNames.media,\n styles.media,\n mediaSizedStyles[state.size],\n primary && styles.mediaPrimary,\n state.media.className,\n );\n }\n\n if (state.main) {\n state.main.className = mergeClasses(\n tableCellLayoutClassNames.main,\n primary && styles.mainPrimary,\n state.main.className,\n );\n }\n\n if (state.description) {\n state.description.className = mergeClasses(\n tableCellLayoutClassNames.description,\n styles.description,\n state.description.className,\n );\n }\n\n if (state.content) {\n state.content.className = mergeClasses(tableCellLayoutClassNames.content, styles.content, state.content.className);\n }\n\n return state;\n};\n"]}
1
+ {"version":3,"mappings":"AAAA,mBAAqBA,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,QAAQ,uBAAuB;AAG9C,SAASC,gBAAgB,QAAQ,uBAAuB;AAExD,OAAO,MAAMC,yBAAyB,GAAyC;EAC7EC,IAAI,EAAE,qBAAqB;EAC3BC,KAAK,EAAE,4BAA4B;EACnCC,IAAI,EAAE,2BAA2B;EACjCC,WAAW,EAAE,kCAAkC;EAC/CC,OAAO,EAAE;CACV;AAED;;;AAGA,MAAMC,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAoDhB;AAEF;;;AAGA,OAAO,MAAMC,iCAAiC,GAAIC,KAA2B,IAA0B;EACrG,MAAMC,MAAM,GAAGH,SAAS,EAAE;EAC1B,MAAM;IAAEI;EAAQ,CAAE,GAAGF,KAAK;EAE1BA,KAAK,CAACP,IAAI,CAACU,SAAS,GAAGf,YAAY,CACjCI,yBAAyB,CAACC,IAAI,EAC9BQ,MAAM,CAACR,IAAI,EACXS,QAAQ,IAAID,MAAM,CAACG,YAAY,EAC/BJ,KAAK,CAACP,IAAI,CAACU,SAAS,CACrB;EACD,MAAME,OAAO,GAAGL,KAAK,CAACM,UAAU,KAAK,SAAS;EAE9C,IAAIN,KAAK,CAACN,KAAK,EAAE;IACf,MAAMa,gBAAgB,GAAG;MACvBC,KAAK,EAAEP,MAAM,CAACQ,mBAAmB;MACjCC,MAAM,EAAET,MAAM,CAACQ,mBAAmB;MAClC,aAAa,EAAER,MAAM,CAACU;KACvB;IAEDX,KAAK,CAACN,KAAK,CAACS,SAAS,GAAGf,YAAY,CAClCI,yBAAyB,CAACE,KAAK,EAC/BO,MAAM,CAACP,KAAK,EACZa,gBAAgB,CAACP,KAAK,CAACY,IAAI,CAAC,EAC5BP,OAAO,IAAIJ,MAAM,CAACY,YAAY,EAC9Bb,KAAK,CAACN,KAAK,CAACS,SAAS,CACtB;;EAGH,IAAIH,KAAK,CAACL,IAAI,EAAE;IACdK,KAAK,CAACL,IAAI,CAACQ,SAAS,GAAGf,YAAY,CACjCI,yBAAyB,CAACG,IAAI,EAC9BO,QAAQ,IAAID,MAAM,CAACa,YAAY,EAC/BT,OAAO,IAAIJ,MAAM,CAACc,WAAW,EAC7Bf,KAAK,CAACL,IAAI,CAACQ,SAAS,CACrB;;EAGH,IAAIH,KAAK,CAACJ,WAAW,EAAE;IACrBI,KAAK,CAACJ,WAAW,CAACO,SAAS,GAAGf,YAAY,CACxCI,yBAAyB,CAACI,WAAW,EACrCK,MAAM,CAACL,WAAW,EAClBI,KAAK,CAACJ,WAAW,CAACO,SAAS,CAC5B;;EAGH,IAAIH,KAAK,CAACH,OAAO,EAAE;IACjBG,KAAK,CAACH,OAAO,CAACM,SAAS,GAAGf,YAAY,CACpCI,yBAAyB,CAACK,OAAO,EACjCI,MAAM,CAACJ,OAAO,EACdK,QAAQ,IAAID,MAAM,CAACe,eAAe,EAClChB,KAAK,CAACH,OAAO,CAACM,SAAS,CACxB;;EAGH,OAAOH,KAAK;AACd,CAAC","names":["mergeClasses","shorthands","tokens","typographyStyles","tableCellLayoutClassNames","root","media","main","description","content","useStyles","useTableCellLayoutStyles_unstable","state","styles","truncate","className","rootTruncate","primary","appearance","mediaSizedStyles","small","mediaSmallAndMedium","medium","mediaExtraSmall","size","mediaPrimary","mainTruncate","mainPrimary","contentTruncate"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCellLayout/useTableCellLayoutStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { TableCellLayoutSlots, TableCellLayoutState } from './TableCellLayout.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { typographyStyles } from '@fluentui/react-theme';\n\nexport const tableCellLayoutClassNames: SlotClassNames<TableCellLayoutSlots> = {\n root: 'fui-TableCellLayout',\n media: 'fui-TableCellLayout__media',\n main: 'fui-TableCellLayout__main',\n description: 'fui-TableCellLayout__description',\n content: 'fui-TableCellLayout__content',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center',\n ...shorthands.gap(tokens.spacingHorizontalS),\n ...shorthands.flex(1, 1, '0px'),\n },\n\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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TableHeaderCell.types.js","sourceRoot":"../src/","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\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"]}
1
+ {"version":3,"file":"TableHeaderCell.types.js","sourceRoot":"../src/","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"]}
@@ -14,6 +14,8 @@ export const renderTableHeaderCell_unstable = state => {
14
14
  ...slotProps.button
15
15
  }, slotProps.root.children, slots.sortIcon && /*#__PURE__*/React.createElement(slots.sortIcon, {
16
16
  ...slotProps.sortIcon
17
- })));
17
+ })), slots.aside && /*#__PURE__*/React.createElement(slots.aside, {
18
+ ...slotProps.aside
19
+ }));
18
20
  };
19
21
  //# sourceMappingURL=renderTableHeaderCell.js.map
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;AAGA,OAAO,MAAMC,8BAA8B,GAAIC,KAA2B,IAAI;EAC5E,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAuBE,KAAK,CAAC;EAElE,oBACEH,oBAACI,KAAK,CAACE,IAAI;IAAA,GAAKD,SAAS,CAACC;EAAI,gBAC5BN,oBAACI,KAAK,CAACG,MAAM;IAAA,GAAKF,SAAS,CAACE;EAAM,GAC/BF,SAAS,CAACC,IAAI,CAACE,QAAQ,EACvBJ,KAAK,CAACK,QAAQ,iBAAIT,oBAACI,KAAK,CAACK,QAAQ;IAAA,GAAKJ,SAAS,CAACI;EAAQ,EAAI,CAChD,CACJ;AAEjB,CAAC","names":["React","getSlots","renderTableHeaderCell_unstable","state","slots","slotProps","root","button","children","sortIcon"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableHeaderCell/renderTableHeaderCell.tsx"],"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.root>\n );\n};\n"]}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;AAGA,OAAO,MAAMC,8BAA8B,GAAIC,KAA2B,IAAI;EAC5E,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAuBE,KAAK,CAAC;EAElE,oBACEH,oBAACI,KAAK,CAACE,IAAI;IAAA,GAAKD,SAAS,CAACC;EAAI,gBAC5BN,oBAACI,KAAK,CAACG,MAAM;IAAA,GAAKF,SAAS,CAACE;EAAM,GAC/BF,SAAS,CAACC,IAAI,CAACE,QAAQ,EACvBJ,KAAK,CAACK,QAAQ,iBAAIT,oBAACI,KAAK,CAACK,QAAQ;IAAA,GAAKJ,SAAS,CAACI;EAAQ,EAAI,CAChD,EACdL,KAAK,CAACM,KAAK,iBAAIV,oBAACI,KAAK,CAACM,KAAK;IAAA,GAAKL,SAAS,CAACK;EAAK,EAAI,CACzC;AAEjB,CAAC","names":["React","getSlots","renderTableHeaderCell_unstable","state","slots","slotProps","root","button","children","sortIcon","aside"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableHeaderCell/renderTableHeaderCell.tsx"],"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"]}
@@ -32,7 +32,8 @@ export const useTableHeaderCell_unstable = (props, ref) => {
32
32
  components: {
33
33
  root: rootComponent,
34
34
  button: 'button',
35
- sortIcon: 'span'
35
+ sortIcon: 'span',
36
+ aside: 'span'
36
37
  },
37
38
  root: getNativeElementProps(rootComponent, {
38
39
  ref: useMergedRefs(ref, useFocusWithin()),
@@ -40,6 +41,7 @@ export const useTableHeaderCell_unstable = (props, ref) => {
40
41
  'aria-sort': sortable ? (_b = props.sortDirection) !== null && _b !== void 0 ? _b : 'none' : undefined,
41
42
  ...props
42
43
  }),
44
+ aside: resolveShorthand(props.aside),
43
45
  sortIcon: resolveShorthand(props.sortIcon, {
44
46
  required: !!props.sortDirection,
45
47
  defaultProps: {
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,qBAAqB,EAAEC,gBAAgB,EAAEC,aAAa,QAAQ,2BAA2B;AAClG,SAASC,cAAc,QAAQ,yBAAyB;AACxD,SAASC,cAAc,EAAEC,gBAAgB,QAAQ,uBAAuB;AAExE,SAASC,eAAe,QAAQ,6BAA6B;AAC7D,SAASC,sBAAsB,QAAQ,sBAAsB;AAE7D,MAAMC,SAAS,GAAG;EAChBC,SAAS,eAAEV,oBAACK,cAAc;IAACM,QAAQ,EAAE;EAAE,EAAI;EAC3CC,UAAU,eAAEZ,oBAACM,gBAAgB;IAACK,QAAQ,EAAE;EAAE;CAC3C;AAED;;;;;;;;;AASA,OAAO,MAAME,2BAA2B,GAAG,CACzCC,KAA2B,EAC3BC,GAA2B,KACH;;EACxB,MAAM;IAAEC,gBAAgB;IAAEC;EAAQ,CAAE,GAAGV,eAAe,EAAE;EAExD,MAAMW,aAAa,GAAG,YAAK,CAACC,EAAE,mCAAIH,gBAAgB,IAAG,KAAK,GAAG,IAAI;EACjE,OAAO;IACLI,UAAU,EAAE;MACVC,IAAI,EAAEH,aAAa;MACnBI,MAAM,EAAE,QAAQ;MAChBC,QAAQ,EAAE;KACX;IACDF,IAAI,EAAEpB,qBAAqB,CAACiB,aAAa,EAAE;MACzCH,GAAG,EAAEZ,aAAa,CAACY,GAAG,EAAEX,cAAc,EAAE,CAAC;MACzCoB,IAAI,EAAEN,aAAa,KAAK,KAAK,GAAG,cAAc,GAAGO,SAAS;MAC1D,WAAW,EAAER,QAAQ,GAAG,WAAK,CAACS,aAAa,mCAAI,MAAM,GAAGD,SAAS;MACjE,GAAGX;KACJ,CAAC;IACFS,QAAQ,EAAErB,gBAAgB,CAACY,KAAK,CAACS,QAAQ,EAAE;MACzCI,QAAQ,EAAE,CAAC,CAACb,KAAK,CAACY,aAAa;MAC/BE,YAAY,EAAE;QAAEC,QAAQ,EAAEf,KAAK,CAACY,aAAa,GAAGjB,SAAS,CAACK,KAAK,CAACY,aAAa,CAAC,GAAGD;MAAS;KAC3F,CAAC;IACFH,MAAM,EAAEd,sBAAsB,CAACM,KAAK,CAACQ,MAAM,EAAE;MAC3CK,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZJ,IAAI,EAAE,cAAc;QACpBM,QAAQ,EAAE,CAAC,CAAC;QACZC,IAAI,EAAE,QAAQ;QACd,IAAId,QAAQ,IAAI;UACdO,IAAI,EAAEC,SAAS;UACfK,QAAQ,EAAEL;SACX;;KAEJ,CAAC;IACFR,QAAQ;IACRD;GACD;AACH,CAAC","names":["React","getNativeElementProps","resolveShorthand","useMergedRefs","useFocusWithin","ArrowUpRegular","ArrowDownRegular","useTableContext","useARIAButtonShorthand","sortIcons","ascending","fontSize","descending","useTableHeaderCell_unstable","props","ref","noNativeElements","sortable","rootComponent","as","components","root","button","sortIcon","role","undefined","sortDirection","required","defaultProps","children","tabIndex","type"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableHeaderCell/useTableHeaderCell.tsx"],"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 },\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 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"]}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,qBAAqB,EAAEC,gBAAgB,EAAEC,aAAa,QAAQ,2BAA2B;AAClG,SAASC,cAAc,QAAQ,yBAAyB;AACxD,SAASC,cAAc,EAAEC,gBAAgB,QAAQ,uBAAuB;AAExE,SAASC,eAAe,QAAQ,6BAA6B;AAC7D,SAASC,sBAAsB,QAAQ,sBAAsB;AAE7D,MAAMC,SAAS,GAAG;EAChBC,SAAS,eAAEV,oBAACK,cAAc;IAACM,QAAQ,EAAE;EAAE,EAAI;EAC3CC,UAAU,eAAEZ,oBAACM,gBAAgB;IAACK,QAAQ,EAAE;EAAE;CAC3C;AAED;;;;;;;;;AASA,OAAO,MAAME,2BAA2B,GAAG,CACzCC,KAA2B,EAC3BC,GAA2B,KACH;;EACxB,MAAM;IAAEC,gBAAgB;IAAEC;EAAQ,CAAE,GAAGV,eAAe,EAAE;EAExD,MAAMW,aAAa,GAAG,YAAK,CAACC,EAAE,mCAAIH,gBAAgB,IAAG,KAAK,GAAG,IAAI;EACjE,OAAO;IACLI,UAAU,EAAE;MACVC,IAAI,EAAEH,aAAa;MACnBI,MAAM,EAAE,QAAQ;MAChBC,QAAQ,EAAE,MAAM;MAChBC,KAAK,EAAE;KACR;IACDH,IAAI,EAAEpB,qBAAqB,CAACiB,aAAa,EAAE;MACzCH,GAAG,EAAEZ,aAAa,CAACY,GAAG,EAAEX,cAAc,EAAE,CAAC;MACzCqB,IAAI,EAAEP,aAAa,KAAK,KAAK,GAAG,cAAc,GAAGQ,SAAS;MAC1D,WAAW,EAAET,QAAQ,GAAG,WAAK,CAACU,aAAa,mCAAI,MAAM,GAAGD,SAAS;MACjE,GAAGZ;KACJ,CAAC;IACFU,KAAK,EAAEtB,gBAAgB,CAACY,KAAK,CAACU,KAAK,CAAC;IACpCD,QAAQ,EAAErB,gBAAgB,CAACY,KAAK,CAACS,QAAQ,EAAE;MACzCK,QAAQ,EAAE,CAAC,CAACd,KAAK,CAACa,aAAa;MAC/BE,YAAY,EAAE;QAAEC,QAAQ,EAAEhB,KAAK,CAACa,aAAa,GAAGlB,SAAS,CAACK,KAAK,CAACa,aAAa,CAAC,GAAGD;MAAS;KAC3F,CAAC;IACFJ,MAAM,EAAEd,sBAAsB,CAACM,KAAK,CAACQ,MAAM,EAAE;MAC3CM,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZJ,IAAI,EAAE,cAAc;QACpBM,QAAQ,EAAE,CAAC,CAAC;QACZC,IAAI,EAAE,QAAQ;QACd,IAAIf,QAAQ,IAAI;UACdQ,IAAI,EAAEC,SAAS;UACfK,QAAQ,EAAEL;SACX;;KAEJ,CAAC;IACFT,QAAQ;IACRD;GACD;AACH,CAAC","names":["React","getNativeElementProps","resolveShorthand","useMergedRefs","useFocusWithin","ArrowUpRegular","ArrowDownRegular","useTableContext","useARIAButtonShorthand","sortIcons","ascending","fontSize","descending","useTableHeaderCell_unstable","props","ref","noNativeElements","sortable","rootComponent","as","components","root","button","sortIcon","aside","role","undefined","sortDirection","required","defaultProps","children","tabIndex","type"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableHeaderCell/useTableHeaderCell.tsx"],"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"]}
@@ -5,7 +5,8 @@ export const tableHeaderCellClassName = 'fui-TableHeaderCell';
5
5
  export const tableHeaderCellClassNames = {
6
6
  root: 'fui-TableHeaderCell',
7
7
  button: 'fui-TableHeaderCell__button',
8
- sortIcon: 'fui-TableHeaderCell__sortIcon'
8
+ sortIcon: 'fui-TableHeaderCell__sortIcon',
9
+ aside: 'fui-TableHeaderCell__aside'
9
10
  };
10
11
  const useTableLayoutStyles = /*#__PURE__*/__styles({
11
12
  root: {
@@ -41,7 +42,8 @@ const useStyles = /*#__PURE__*/__styles({
41
42
  pehzd3: ["fs9qmxf", "f187m4uq"],
42
43
  B8osjzx: ["f187m4uq", "fs9qmxf"],
43
44
  u7xebq: ["f145mzao", "f1uha7eq"],
44
- Blsv9te: ["f1uha7eq", "f145mzao"]
45
+ Blsv9te: ["f1uha7eq", "f145mzao"],
46
+ qhf8xq: "f10pi13n"
45
47
  },
46
48
  rootInteractive: {
47
49
  Jwef8y: "f1t94bn6",
@@ -89,9 +91,10 @@ const useStyles = /*#__PURE__*/__styles({
89
91
  mc9l5x: "f22iagw",
90
92
  Bt984gj: "f122n59",
91
93
  z8tnut: "fclwglc"
92
- }
94
+ },
95
+ resizeHandle: {}
93
96
  }, {
94
- d: [".f1nbblvp{padding-top:0px;}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".f1ov4xf1{padding-bottom:0px;}", ".fhix6mv[data-fui-focus-within]:focus-within{outline-width:2px;}", ".fha7anx[data-fui-focus-within]:focus-within{outline-style:solid;}", ".f1fmzww4[data-fui-focus-within]:focus-within{outline-color:var(--colorStrokeFocus2);}", ".fs9qmxf[data-fui-focus-within]:focus-within{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f187m4uq[data-fui-focus-within]:focus-within{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f145mzao[data-fui-focus-within]:focus-within{border-top-right-radius:var(--borderRadiusMedium);}", ".f1uha7eq[data-fui-focus-within]:focus-within{border-top-left-radius:var(--borderRadiusMedium);}", ".fq6nmtn{resize:horizontal;}", ".f1e4lqlz{box-sizing:content-box;}", ".f1u2r49w{background-color:inherit;}", ".f1ym3bx4{color:inherit;}", ".f1mo0ibp{font-family:inherit;}", ".fjoy568{font-size:inherit;}", ".fytdu2e{line-height:normal;}", ".f1mtd64y{overflow-x:visible;}", ".f1y7q3j9{overflow-y:visible;}", ".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".f1ern45e{border-top-style:none;}", ".f1n71otn{border-right-style:none;}", ".f1deefiw{border-left-style:none;}", ".f1h8hb77{border-bottom-style:none;}", ".f37px4s{-webkit-appearance:button;}", ".fgusgyc{text-align:unset;}", ".f10pi13n{position:relative;}", ".fly5x3f{width:100%;}", ".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;}", ".f1l02sjl{height:100%;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f1ufnopg{-webkit-column-gap:var(--spacingHorizontalXS);column-gap:var(--spacingHorizontalXS);}", ".f14sijuj{row-gap:var(--spacingHorizontalXS);}", ".f1nxs5xn{min-height:32px;}", ".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;}", ".f1s6fcnf{outline-style:none;}", ".f1k6fduh{cursor:pointer;}", ".fclwglc{padding-top:var(--spacingVerticalXXS);}"],
97
+ d: [".f1nbblvp{padding-top:0px;}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".f1ov4xf1{padding-bottom:0px;}", ".fhix6mv[data-fui-focus-within]:focus-within{outline-width:2px;}", ".fha7anx[data-fui-focus-within]:focus-within{outline-style:solid;}", ".f1fmzww4[data-fui-focus-within]:focus-within{outline-color:var(--colorStrokeFocus2);}", ".fs9qmxf[data-fui-focus-within]:focus-within{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f187m4uq[data-fui-focus-within]:focus-within{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f145mzao[data-fui-focus-within]:focus-within{border-top-right-radius:var(--borderRadiusMedium);}", ".f1uha7eq[data-fui-focus-within]:focus-within{border-top-left-radius:var(--borderRadiusMedium);}", ".f10pi13n{position:relative;}", ".fq6nmtn{resize:horizontal;}", ".f1e4lqlz{box-sizing:content-box;}", ".f1u2r49w{background-color:inherit;}", ".f1ym3bx4{color:inherit;}", ".f1mo0ibp{font-family:inherit;}", ".fjoy568{font-size:inherit;}", ".fytdu2e{line-height:normal;}", ".f1mtd64y{overflow-x:visible;}", ".f1y7q3j9{overflow-y:visible;}", ".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".f1ern45e{border-top-style:none;}", ".f1n71otn{border-right-style:none;}", ".f1deefiw{border-left-style:none;}", ".f1h8hb77{border-bottom-style:none;}", ".f37px4s{-webkit-appearance:button;}", ".fgusgyc{text-align:unset;}", ".fly5x3f{width:100%;}", ".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;}", ".f1l02sjl{height:100%;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f1ufnopg{-webkit-column-gap:var(--spacingHorizontalXS);column-gap:var(--spacingHorizontalXS);}", ".f14sijuj{row-gap:var(--spacingHorizontalXS);}", ".f1nxs5xn{min-height:32px;}", ".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;}", ".f1s6fcnf{outline-style:none;}", ".f1k6fduh{cursor:pointer;}", ".fclwglc{padding-top:var(--spacingVerticalXXS);}"],
95
98
  h: [".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}"],
96
99
  a: [".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}"]
97
100
  });
@@ -109,6 +112,9 @@ export const useTableHeaderCellStyles_unstable = state => {
109
112
  if (state.sortIcon) {
110
113
  state.sortIcon.className = mergeClasses(tableHeaderCellClassNames.sortIcon, styles.sortIcon, state.sortIcon.className);
111
114
  }
115
+ if (state.aside) {
116
+ state.aside.className = mergeClasses(tableHeaderCellClassNames.aside, styles.resizeHandle, state.aside.className);
117
+ }
112
118
  return state;
113
119
  };
114
120
  //# sourceMappingURL=useTableHeaderCellStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"mappings":"AAAA,mBAAqBA,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,QAAQ,uBAAuB;AAE9C,SAASC,+BAA+B,QAAQ,yBAAyB;AAGzE,OAAO,MAAMC,wBAAwB,GAAG,qBAAqB;AAC7D,OAAO,MAAMC,yBAAyB,GAAyC;EAC7EC,IAAI,EAAE,qBAAqB;EAC3BC,MAAM,EAAE,6BAA6B;EACrCC,QAAQ,EAAE;CACX;AAED,MAAMC,oBAAoB,gBAAG;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAK3B;AAEF,MAAMC,mBAAmB,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAM1B;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;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;EAAA;EAAA;AAAA,EAwDhB;AAEF;;;AAGA,OAAO,MAAMC,iCAAiC,GAAIC,KAA2B,IAA0B;EACrG,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,GAAGlB,YAAY,CACjCK,yBAAyB,CAACC,IAAI,EAC9BQ,MAAM,CAACR,IAAI,EACXO,KAAK,CAACM,QAAQ,IAAIL,MAAM,CAACM,eAAe,EACxCP,KAAK,CAACQ,gBAAgB,GAAGN,YAAY,CAACE,IAAI,CAACX,IAAI,GAAGS,YAAY,CAACC,KAAK,CAACV,IAAI,EACzEO,KAAK,CAACP,IAAI,CAACY,SAAS,CACrB;EACDL,KAAK,CAACN,MAAM,CAACW,SAAS,GAAGlB,YAAY,CACnCK,yBAAyB,CAACE,MAAM,EAChCO,MAAM,CAACQ,WAAW,EAClBR,MAAM,CAACP,MAAM,EACbM,KAAK,CAACM,QAAQ,IAAIL,MAAM,CAACK,QAAQ,EACjCN,KAAK,CAACN,MAAM,CAACW,SAAS,CACvB;EAED,IAAIL,KAAK,CAACL,QAAQ,EAAE;IAClBK,KAAK,CAACL,QAAQ,CAACU,SAAS,GAAGlB,YAAY,CACrCK,yBAAyB,CAACG,QAAQ,EAClCM,MAAM,CAACN,QAAQ,EACfK,KAAK,CAACL,QAAQ,CAACU,SAAS,CACzB;;EAGH,OAAOL,KAAK;AACd,CAAC","names":["mergeClasses","shorthands","tokens","createCustomFocusIndicatorStyle","tableHeaderCellClassName","tableHeaderCellClassNames","root","button","sortIcon","useTableLayoutStyles","useFlexLayoutStyles","useStyles","useTableHeaderCellStyles_unstable","state","styles","layoutStyles","table","flex","className","sortable","rootInteractive","noNativeElements","resetButton"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableHeaderCell/useTableHeaderCellStyles.ts"],"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};\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 },\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 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 sortable: {\n cursor: 'pointer',\n },\n\n sortIcon: {\n display: 'flex',\n alignItems: 'center',\n paddingTop: tokens.spacingVerticalXXS,\n },\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 return state;\n};\n"]}
1
+ {"version":3,"mappings":"AAAA,mBAAqBA,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,QAAQ,uBAAuB;AAE9C,SAASC,+BAA+B,QAAQ,yBAAyB;AAGzE,OAAO,MAAMC,wBAAwB,GAAG,qBAAqB;AAC7D,OAAO,MAAMC,yBAAyB,GAAyC;EAC7EC,IAAI,EAAE,qBAAqB;EAC3BC,MAAM,EAAE,6BAA6B;EACrCC,QAAQ,EAAE,+BAA+B;EACzCC,KAAK,EAAE;CACR;AAED,MAAMC,oBAAoB,gBAAG;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAK3B;AAEF,MAAMC,mBAAmB,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAM1B;AAEF;;;AAGA,MAAMC,SAAS,gBAAG;EAAA;IAAA;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;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;EAAA;EAAA;AAAA;EAAA;EAAA;EAAA;AAAA,EA6DhB;AAEF;;;AAGA,OAAO,MAAMC,iCAAiC,GAAIC,KAA2B,IAA0B;EACrG,MAAMC,MAAM,GAAGH,SAAS,EAAE;EAC1B,MAAMI,YAAY,GAAG;IACnBC,KAAK,EAAEP,oBAAoB,EAAE;IAC7BQ,IAAI,EAAEP,mBAAmB;GAC1B;EACDG,KAAK,CAACR,IAAI,CAACa,SAAS,GAAGnB,YAAY,CACjCK,yBAAyB,CAACC,IAAI,EAC9BS,MAAM,CAACT,IAAI,EACXQ,KAAK,CAACM,QAAQ,IAAIL,MAAM,CAACM,eAAe,EACxCP,KAAK,CAACQ,gBAAgB,GAAGN,YAAY,CAACE,IAAI,CAACZ,IAAI,GAAGU,YAAY,CAACC,KAAK,CAACX,IAAI,EACzEQ,KAAK,CAACR,IAAI,CAACa,SAAS,CACrB;EACDL,KAAK,CAACP,MAAM,CAACY,SAAS,GAAGnB,YAAY,CACnCK,yBAAyB,CAACE,MAAM,EAChCQ,MAAM,CAACQ,WAAW,EAClBR,MAAM,CAACR,MAAM,EACbO,KAAK,CAACM,QAAQ,IAAIL,MAAM,CAACK,QAAQ,EACjCN,KAAK,CAACP,MAAM,CAACY,SAAS,CACvB;EAED,IAAIL,KAAK,CAACN,QAAQ,EAAE;IAClBM,KAAK,CAACN,QAAQ,CAACW,SAAS,GAAGnB,YAAY,CACrCK,yBAAyB,CAACG,QAAQ,EAClCO,MAAM,CAACP,QAAQ,EACfM,KAAK,CAACN,QAAQ,CAACW,SAAS,CACzB;;EAGH,IAAIL,KAAK,CAACL,KAAK,EAAE;IACfK,KAAK,CAACL,KAAK,CAACU,SAAS,GAAGnB,YAAY,CAACK,yBAAyB,CAACI,KAAK,EAAEM,MAAM,CAACS,YAAY,EAAEV,KAAK,CAACL,KAAK,CAACU,SAAS,CAAC;;EAGnH,OAAOL,KAAK;AACd,CAAC","names":["mergeClasses","shorthands","tokens","createCustomFocusIndicatorStyle","tableHeaderCellClassName","tableHeaderCellClassNames","root","button","sortIcon","aside","useTableLayoutStyles","useFlexLayoutStyles","useStyles","useTableHeaderCellStyles_unstable","state","styles","layoutStyles","table","flex","className","sortable","rootInteractive","noNativeElements","resetButton","resizeHandle"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableHeaderCell/useTableHeaderCellStyles.ts"],"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,14 @@
1
+ import * as React from 'react';
2
+ import { useTableResizeHandle_unstable } from './useTableResizeHandle';
3
+ import { renderTableResizeHandle_unstable } from './renderTableResizeHandle';
4
+ import { useTableResizeHandleStyles_unstable } from './useTableResizeHandleStyles';
5
+ /**
6
+ * TableResizeHandle component - TODO: add more docs
7
+ */
8
+ export const TableResizeHandle = /*#__PURE__*/React.forwardRef((props, ref) => {
9
+ const state = useTableResizeHandle_unstable(props, ref);
10
+ useTableResizeHandleStyles_unstable(state);
11
+ return renderTableResizeHandle_unstable(state);
12
+ });
13
+ TableResizeHandle.displayName = 'TableResizeHandle';
14
+ //# sourceMappingURL=TableResizeHandle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,6BAA6B,QAAQ,wBAAwB;AACtE,SAASC,gCAAgC,QAAQ,2BAA2B;AAC5E,SAASC,mCAAmC,QAAQ,8BAA8B;AAIlF;;;AAGA,OAAO,MAAMC,iBAAiB,gBAAgDJ,KAAK,CAACK,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EAC5G,MAAMC,KAAK,GAAGP,6BAA6B,CAACK,KAAK,EAAEC,GAAG,CAAC;EAEvDJ,mCAAmC,CAACK,KAAK,CAAC;EAC1C,OAAON,gCAAgC,CAACM,KAAK,CAAC;AAChD,CAAC,CAAC;AAEFJ,iBAAiB,CAACK,WAAW,GAAG,mBAAmB","names":["React","useTableResizeHandle_unstable","renderTableResizeHandle_unstable","useTableResizeHandleStyles_unstable","TableResizeHandle","forwardRef","props","ref","state","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableResizeHandle/TableResizeHandle.tsx"],"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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TableResizeHandle.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableResizeHandle.types.js","sourceRoot":"../src/","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,6 @@
1
+ export * from './TableResizeHandle';
2
+ export * from './TableResizeHandle.types';
3
+ export * from './renderTableResizeHandle';
4
+ export * from './useTableResizeHandle';
5
+ export * from './useTableResizeHandleStyles';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableResizeHandle/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC","sourcesContent":["export * from './TableResizeHandle';\nexport * from './TableResizeHandle.types';\nexport * from './renderTableResizeHandle';\nexport * from './useTableResizeHandle';\nexport * from './useTableResizeHandleStyles';\n"]}
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import { getSlots } from '@fluentui/react-utilities';
3
+ /**
4
+ * Render the final JSX of TableResizeHandle
5
+ */
6
+ export const renderTableResizeHandle_unstable = state => {
7
+ const {
8
+ slots,
9
+ slotProps
10
+ } = getSlots(state);
11
+ return /*#__PURE__*/React.createElement(slots.root, {
12
+ ...slotProps.root
13
+ });
14
+ };
15
+ //# sourceMappingURL=renderTableResizeHandle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;AAGA,OAAO,MAAMC,gCAAgC,GAAIC,KAA6B,IAAI;EAChF,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAyBE,KAAK,CAAC;EACpE,oBAAOH,oBAACI,KAAK,CAACE,IAAI;IAAA,GAAKD,SAAS,CAACC;EAAI,EAAI;AAC3C,CAAC","names":["React","getSlots","renderTableResizeHandle_unstable","state","slots","slotProps","root"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableResizeHandle/renderTableResizeHandle.tsx"],"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,28 @@
1
+ import { getNativeElementProps, useEventCallback } from '@fluentui/react-utilities';
2
+ /**
3
+ * Create the state required to render TableResizeHandle.
4
+ *
5
+ * The returned state can be modified with hooks such as useTableResizeHandleStyles_unstable,
6
+ * before being passed to renderTableResizeHandle_unstable.
7
+ *
8
+ * @param props - props from this instance of TableResizeHandle
9
+ * @param ref - reference to root HTMLElement of TableResizeHandle
10
+ */
11
+ export const useTableResizeHandle_unstable = (props, ref) => {
12
+ const onClick = useEventCallback(event => {
13
+ var _a;
14
+ (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, event);
15
+ event.stopPropagation();
16
+ });
17
+ return {
18
+ components: {
19
+ root: 'div'
20
+ },
21
+ root: getNativeElementProps('div', {
22
+ ref,
23
+ ...props,
24
+ onClick
25
+ })
26
+ };
27
+ };
28
+ //# sourceMappingURL=useTableResizeHandle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"mappings":"AACA,SAASA,qBAAqB,EAAEC,gBAAgB,QAAQ,2BAA2B;AAGnF;;;;;;;;;AASA,OAAO,MAAMC,6BAA6B,GAAG,CAC3CC,KAA6B,EAC7BC,GAA2B,KACD;EAC1B,MAAMC,OAAO,GAAGJ,gBAAgB,CAAEK,KAAuC,IAAI;;IAC3E,WAAK,CAACD,OAAO,+CAAbF,KAAK,EAAWG,KAAK,CAAC;IACtBA,KAAK,CAACC,eAAe,EAAE;EACzB,CAAC,CAAC;EACF,OAAO;IACLC,UAAU,EAAE;MACVC,IAAI,EAAE;KACP;IACDA,IAAI,EAAET,qBAAqB,CAAC,KAAK,EAAE;MACjCI,GAAG;MACH,GAAGD,KAAK;MACRE;KACD;GACF;AACH,CAAC","names":["getNativeElementProps","useEventCallback","useTableResizeHandle_unstable","props","ref","onClick","event","stopPropagation","components","root"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableResizeHandle/useTableResizeHandle.ts"],"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"]}
@@ -0,0 +1,49 @@
1
+ import { __styles, mergeClasses, shorthands } from '@griffel/react';
2
+ import { tokens } from '@fluentui/react-theme';
3
+ export const tableResizeHandleClassNames = {
4
+ root: 'fui-TableResizeHandle'
5
+ // TODO: add class names for all slots on TableResizeHandleSlots.
6
+ // Should be of the form `<slotName>: 'fui-TableResizeHandle__<slotName>`
7
+ };
8
+ /**
9
+ * Styles for the root slot
10
+ */
11
+ const useStyles = /*#__PURE__*/__styles({
12
+ root: {
13
+ qhf8xq: "f1euv43f",
14
+ j35jbq: ["f1e31b4d", "f1vgc2s3"],
15
+ Bhzewxz: "f15twtuk",
16
+ B5kzvoi: "f1yab3r1",
17
+ a9b677: "fjw5fx7",
18
+ B6of3ja: "f1hu3pq6",
19
+ t21cq0: ["fn2i5td", "f1eybr6b"],
20
+ jrapky: "f19f4twv",
21
+ Frg6f3: ["f1eybr6b", "fn2i5td"],
22
+ Bceei9c: "fc3en1c",
23
+ abs64n: "fk73vx1",
24
+ Bmy1vo4: "f13u1uyl",
25
+ B3o57yi: "fezquic",
26
+ Bj3rh1h: "f19g0ac",
27
+ B7zu5sd: "f15pjodv",
28
+ Bs6t6z0: "ftgrb5f",
29
+ Fdvyjd: "f2df6js",
30
+ Biobvvw: "fshsryb",
31
+ Hdbjpj: "f11ef69",
32
+ jc51t6: ["f12lb1dx", "f13tbxeo"],
33
+ u6d25: "fu4ulse",
34
+ Bj55yzk: "fw2wsqs",
35
+ Bkbwdz4: "f1swzn7y"
36
+ }
37
+ }, {
38
+ d: [".f1euv43f{position:absolute;}", ".f1e31b4d{right:0;}", ".f1vgc2s3{left:0;}", ".f15twtuk{top:0;}", ".f1yab3r1{bottom:0;}", ".fjw5fx7{width:16px;}", ".f1hu3pq6{margin-top:0;}", ".fn2i5td{margin-right:-8px;}", ".f1eybr6b{margin-left:-8px;}", ".f19f4twv{margin-bottom:0;}", ".fc3en1c{cursor:col-resize;}", ".fk73vx1{opacity:0;}", ".f13u1uyl{transition-property:opacity;}", ".fezquic{transition-duration:.2s;}", ".f19g0ac{z-index:1;}", ".ftgrb5f:after{content:\" \";}", ".f2df6js:after{display:block;}", ".fshsryb:after{width:1px;}", ".f11ef69:after{position:absolute;}", ".f12lb1dx:after{left:50%;}", ".f13tbxeo:after{right:50%;}", ".fu4ulse:after{top:0;}", ".fw2wsqs:after{bottom:0;}", ".f1swzn7y:after{background-color:var(--colorNeutralStroke1);}"],
39
+ h: [".f15pjodv:hover{opacity:1;}"]
40
+ });
41
+ /**
42
+ * Apply styling to the TableResizeHandle slots based on the state
43
+ */
44
+ export const useTableResizeHandleStyles_unstable = state => {
45
+ const styles = useStyles();
46
+ state.root.className = mergeClasses(tableResizeHandleClassNames.root, styles.root, state.root.className);
47
+ return state;
48
+ };
49
+ //# sourceMappingURL=useTableResizeHandleStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"mappings":"AAAA,mBAAqBA,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AAGrE,SAASC,MAAM,QAAQ,uBAAuB;AAE9C,OAAO,MAAMC,2BAA2B,GAA2C;EACjFC,IAAI,EAAE;EACN;EACA;CACD;AAED;;;AAGA,MAAMC,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;EAAA;AAAA,EA6BhB;AAEF;;;AAGA,OAAO,MAAMC,mCAAmC,GAAIC,KAA6B,IAA4B;EAC3G,MAAMC,MAAM,GAAGH,SAAS,EAAE;EAC1BE,KAAK,CAACH,IAAI,CAACK,SAAS,GAAGT,YAAY,CAACG,2BAA2B,CAACC,IAAI,EAAEI,MAAM,CAACJ,IAAI,EAAEG,KAAK,CAACH,IAAI,CAACK,SAAS,CAAC;EACxG,OAAOF,KAAK;AACd,CAAC","names":["mergeClasses","shorthands","tokens","tableResizeHandleClassNames","root","useStyles","useTableResizeHandleStyles_unstable","state","styles","className"],"sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableResizeHandle/useTableResizeHandleStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { TableResizeHandleSlots, TableResizeHandleState } from './TableResizeHandle.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens } from '@fluentui/react-theme';\n\nexport const tableResizeHandleClassNames: SlotClassNames<TableResizeHandleSlots> = {\n root: 'fui-TableResizeHandle',\n // TODO: add class names for all slots on TableResizeHandleSlots.\n // Should be of the form `<slotName>: 'fui-TableResizeHandle__<slotName>`\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n position: 'absolute',\n right: 0,\n top: 0,\n bottom: 0,\n width: '16px',\n ...shorthands.margin(0, '-8px'),\n cursor: 'col-resize',\n opacity: 0,\n transitionProperty: 'opacity',\n transitionDuration: '.2s',\n zIndex: 1,\n\n ':hover': {\n opacity: 1,\n },\n\n ':after': {\n content: '\" \"',\n display: 'block',\n width: '1px',\n position: 'absolute',\n left: '50%',\n top: 0,\n bottom: 0,\n backgroundColor: tokens.colorNeutralStroke1,\n },\n },\n});\n\n/**\n * Apply styling to the TableResizeHandle slots based on the state\n */\nexport const useTableResizeHandleStyles_unstable = (state: TableResizeHandleState): TableResizeHandleState => {\n const styles = useStyles();\n state.root.className = mergeClasses(tableResizeHandleClassNames.root, styles.root, state.root.className);\n return state;\n};\n"]}
@@ -1,6 +1,7 @@
1
1
  import { __styles, mergeClasses, shorthands } from '@griffel/react';
2
2
  import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';
3
3
  import { tokens } from '@fluentui/react-theme';
4
+ export const CELL_WIDTH = 44;
4
5
  export const tableSelectionCellClassNames = {
5
6
  root: 'fui-TableSelectionCell',
6
7
  checkboxIndicator: 'fui-TableSelectionCell__checkboxIndicator',
@@ -1 +1 @@
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"]}
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,UAAU,GAAG,EAAE;AAE5B,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,GAAGlB,YAAY,CACjCK,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,GAAGlB,YAAY,CAC9CK,4BAA4B,CAACE,iBAAiB,EAC9CM,KAAK,CAACN,iBAAiB,CAACW,SAAS,CAClC;;EAGH,IAAIL,KAAK,CAACL,cAAc,EAAE;IACxBK,KAAK,CAACL,cAAc,CAACU,SAAS,GAAGlB,YAAY,CAC3CK,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","CELL_WIDTH","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 CELL_WIDTH = 44;\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: `${CELL_WIDTH}px`,\n },\n});\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'flex',\n ...shorthands.flex(1, 1, '0px'),\n minWidth: `${CELL_WIDTH}px`,\n maxWidth: `${CELL_WIDTH}px`,\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"]}
@@ -3,4 +3,5 @@ export * from './useTableFeatures';
3
3
  export * from './useTableSort';
4
4
  export * from './useTableSelection';
5
5
  export * from './createColumn';
6
+ export * from './useTableColumnSizing';
6
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './types';\nexport * from './useTableFeatures';\nexport * from './useTableSort';\nexport * from './useTableSelection';\nexport * from './createColumn';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC","sourcesContent":["export * from './types';\nexport * from './useTableFeatures';\nexport * from './useTableSort';\nexport * from './useTableSelection';\nexport * from './createColumn';\nexport * from './useTableColumnSizing';\n"]}