@fluentui/react-table 9.15.20 → 9.15.22

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 (292) hide show
  1. package/CHANGELOG.md +34 -2
  2. package/lib/DataGrid.js.map +1 -1
  3. package/lib/DataGridBody.js.map +1 -1
  4. package/lib/DataGridCell.js.map +1 -1
  5. package/lib/DataGridHeader.js.map +1 -1
  6. package/lib/DataGridHeaderCell.js.map +1 -1
  7. package/lib/DataGridRow.js.map +1 -1
  8. package/lib/DataGridSelectionCell.js.map +1 -1
  9. package/lib/Table.js.map +1 -1
  10. package/lib/TableBody.js.map +1 -1
  11. package/lib/TableCell.js.map +1 -1
  12. package/lib/TableCellActions.js.map +1 -1
  13. package/lib/TableCellLayout.js.map +1 -1
  14. package/lib/TableCellPrimaryLayout.js.map +1 -1
  15. package/lib/TableHeader.js.map +1 -1
  16. package/lib/TableHeaderCell.js.map +1 -1
  17. package/lib/TableResizeHandle.js.map +1 -1
  18. package/lib/TableRow.js.map +1 -1
  19. package/lib/TableSelectionCell.js.map +1 -1
  20. package/lib/components/DataGrid/DataGrid.js.map +1 -1
  21. package/lib/components/DataGrid/DataGrid.types.js.map +1 -1
  22. package/lib/components/DataGrid/index.js.map +1 -1
  23. package/lib/components/DataGrid/renderDataGrid.js.map +1 -1
  24. package/lib/components/DataGrid/useDataGrid.js.map +1 -1
  25. package/lib/components/DataGrid/useDataGridContextValues.js.map +1 -1
  26. package/lib/components/DataGrid/useDataGridStyles.styles.js +1 -2
  27. package/lib/components/DataGridBody/DataGridBody.js.map +1 -1
  28. package/lib/components/DataGridBody/DataGridBody.types.js.map +1 -1
  29. package/lib/components/DataGridBody/index.js.map +1 -1
  30. package/lib/components/DataGridBody/renderDataGridBody.js.map +1 -1
  31. package/lib/components/DataGridBody/useDataGridBody.js.map +1 -1
  32. package/lib/components/DataGridBody/useDataGridBodyStyles.styles.js +1 -2
  33. package/lib/components/DataGridCell/DataGridCell.js.map +1 -1
  34. package/lib/components/DataGridCell/DataGridCell.types.js.map +1 -1
  35. package/lib/components/DataGridCell/index.js.map +1 -1
  36. package/lib/components/DataGridCell/renderDataGridCell.js.map +1 -1
  37. package/lib/components/DataGridCell/useDataGridCell.js.map +1 -1
  38. package/lib/components/DataGridCell/useDataGridCellStyles.styles.js +1 -2
  39. package/lib/components/DataGridHeader/DataGridHeader.js.map +1 -1
  40. package/lib/components/DataGridHeader/DataGridHeader.types.js.map +1 -1
  41. package/lib/components/DataGridHeader/index.js.map +1 -1
  42. package/lib/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
  43. package/lib/components/DataGridHeader/useDataGridHeader.js.map +1 -1
  44. package/lib/components/DataGridHeader/useDataGridHeaderStyles.styles.js +1 -2
  45. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
  46. package/lib/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -1
  47. package/lib/components/DataGridHeaderCell/index.js.map +1 -1
  48. package/lib/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
  49. package/lib/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
  50. package/lib/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.js +1 -2
  51. package/lib/components/DataGridRow/DataGridRow.js.map +1 -1
  52. package/lib/components/DataGridRow/DataGridRow.types.js.map +1 -1
  53. package/lib/components/DataGridRow/index.js.map +1 -1
  54. package/lib/components/DataGridRow/renderDataGridRow.js.map +1 -1
  55. package/lib/components/DataGridRow/useDataGridRow.js.map +1 -1
  56. package/lib/components/DataGridRow/useDataGridRowStyles.styles.js +1 -2
  57. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
  58. package/lib/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -1
  59. package/lib/components/DataGridSelectionCell/index.js.map +1 -1
  60. package/lib/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
  61. package/lib/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
  62. package/lib/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.js +1 -2
  63. package/lib/components/Table/Table.js.map +1 -1
  64. package/lib/components/Table/Table.types.js.map +1 -1
  65. package/lib/components/Table/index.js.map +1 -1
  66. package/lib/components/Table/renderTable.js.map +1 -1
  67. package/lib/components/Table/useTable.js.map +1 -1
  68. package/lib/components/Table/useTableContextValues.js.map +1 -1
  69. package/lib/components/Table/useTableStyles.styles.js +1 -2
  70. package/lib/components/TableBody/TableBody.js.map +1 -1
  71. package/lib/components/TableBody/TableBody.types.js.map +1 -1
  72. package/lib/components/TableBody/index.js.map +1 -1
  73. package/lib/components/TableBody/renderTableBody.js.map +1 -1
  74. package/lib/components/TableBody/useTableBody.js.map +1 -1
  75. package/lib/components/TableBody/useTableBodyStyles.styles.js +1 -2
  76. package/lib/components/TableCell/TableCell.js.map +1 -1
  77. package/lib/components/TableCell/TableCell.types.js.map +1 -1
  78. package/lib/components/TableCell/index.js.map +1 -1
  79. package/lib/components/TableCell/renderTableCell.js.map +1 -1
  80. package/lib/components/TableCell/useTableCell.js.map +1 -1
  81. package/lib/components/TableCell/useTableCellStyles.styles.js +1 -2
  82. package/lib/components/TableCellActions/TableCellActions.js.map +1 -1
  83. package/lib/components/TableCellActions/TableCellActions.types.js.map +1 -1
  84. package/lib/components/TableCellActions/index.js.map +1 -1
  85. package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -1
  86. package/lib/components/TableCellActions/useTableCellActions.js.map +1 -1
  87. package/lib/components/TableCellActions/useTableCellActionsStyles.styles.js +1 -2
  88. package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -1
  89. package/lib/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
  90. package/lib/components/TableCellLayout/index.js.map +1 -1
  91. package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  92. package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  93. package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
  94. package/lib/components/TableCellLayout/useTableCellLayoutStyles.styles.js +1 -2
  95. package/lib/components/TableHeader/TableHeader.js.map +1 -1
  96. package/lib/components/TableHeader/TableHeader.types.js.map +1 -1
  97. package/lib/components/TableHeader/index.js.map +1 -1
  98. package/lib/components/TableHeader/renderTableHeader.js.map +1 -1
  99. package/lib/components/TableHeader/useTableHeader.js.map +1 -1
  100. package/lib/components/TableHeader/useTableHeaderStyles.styles.js +1 -2
  101. package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  102. package/lib/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
  103. package/lib/components/TableHeaderCell/index.js.map +1 -1
  104. package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  105. package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  106. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.styles.js +1 -2
  107. package/lib/components/TableResizeHandle/TableResizeHandle.js.map +1 -1
  108. package/lib/components/TableResizeHandle/TableResizeHandle.types.js.map +1 -1
  109. package/lib/components/TableResizeHandle/index.js.map +1 -1
  110. package/lib/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -1
  111. package/lib/components/TableResizeHandle/useTableResizeHandle.js.map +1 -1
  112. package/lib/components/TableResizeHandle/useTableResizeHandleStyles.styles.js +1 -2
  113. package/lib/components/TableRow/TableRow.js.map +1 -1
  114. package/lib/components/TableRow/TableRow.types.js.map +1 -1
  115. package/lib/components/TableRow/index.js.map +1 -1
  116. package/lib/components/TableRow/renderTableRow.js.map +1 -1
  117. package/lib/components/TableRow/useTableRow.js.map +1 -1
  118. package/lib/components/TableRow/useTableRowStyles.styles.js +11 -11
  119. package/lib/components/TableRow/useTableRowStyles.styles.js.map +1 -1
  120. package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  121. package/lib/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
  122. package/lib/components/TableSelectionCell/index.js.map +1 -1
  123. package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  124. package/lib/components/TableSelectionCell/useTableSelectionCell.js +3 -2
  125. package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  126. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.styles.js +1 -2
  127. package/lib/contexts/columnIdContext.js.map +1 -1
  128. package/lib/contexts/dataGridContext.js.map +1 -1
  129. package/lib/contexts/rowIdContext.js.map +1 -1
  130. package/lib/contexts/tableContext.js.map +1 -1
  131. package/lib/contexts/tableHeaderContext.js.map +1 -1
  132. package/lib/hooks/createColumn.js.map +1 -1
  133. package/lib/hooks/index.js.map +1 -1
  134. package/lib/hooks/types.js.map +1 -1
  135. package/lib/hooks/useKeyboardResizing.js.map +1 -1
  136. package/lib/hooks/useMeasureElement.js.map +1 -1
  137. package/lib/hooks/useTableColumnResizeMouseHandler.js.map +1 -1
  138. package/lib/hooks/useTableColumnResizeState.js.map +1 -1
  139. package/lib/hooks/useTableColumnSizing.js.map +1 -1
  140. package/lib/hooks/useTableCompositeNavigation.js.map +1 -1
  141. package/lib/hooks/useTableFeatures.js.map +1 -1
  142. package/lib/hooks/useTableSelection.js.map +1 -1
  143. package/lib/hooks/useTableSort.js.map +1 -1
  144. package/lib/index.js.map +1 -1
  145. package/lib/utils/columnResizeUtils.js.map +1 -1
  146. package/lib/utils/isColumnSortable.js.map +1 -1
  147. package/lib-commonjs/DataGrid.js.map +1 -1
  148. package/lib-commonjs/DataGridBody.js.map +1 -1
  149. package/lib-commonjs/DataGridCell.js.map +1 -1
  150. package/lib-commonjs/DataGridHeader.js.map +1 -1
  151. package/lib-commonjs/DataGridHeaderCell.js.map +1 -1
  152. package/lib-commonjs/DataGridRow.js.map +1 -1
  153. package/lib-commonjs/DataGridSelectionCell.js.map +1 -1
  154. package/lib-commonjs/Table.js.map +1 -1
  155. package/lib-commonjs/TableBody.js.map +1 -1
  156. package/lib-commonjs/TableCell.js.map +1 -1
  157. package/lib-commonjs/TableCellActions.js.map +1 -1
  158. package/lib-commonjs/TableCellLayout.js.map +1 -1
  159. package/lib-commonjs/TableCellPrimaryLayout.js.map +1 -1
  160. package/lib-commonjs/TableHeader.js.map +1 -1
  161. package/lib-commonjs/TableHeaderCell.js.map +1 -1
  162. package/lib-commonjs/TableResizeHandle.js.map +1 -1
  163. package/lib-commonjs/TableRow.js.map +1 -1
  164. package/lib-commonjs/TableSelectionCell.js.map +1 -1
  165. package/lib-commonjs/components/DataGrid/DataGrid.js.map +1 -1
  166. package/lib-commonjs/components/DataGrid/DataGrid.types.js.map +1 -1
  167. package/lib-commonjs/components/DataGrid/index.js.map +1 -1
  168. package/lib-commonjs/components/DataGrid/renderDataGrid.js.map +1 -1
  169. package/lib-commonjs/components/DataGrid/useDataGrid.js.map +1 -1
  170. package/lib-commonjs/components/DataGrid/useDataGridContextValues.js.map +1 -1
  171. package/lib-commonjs/components/DataGrid/useDataGridStyles.styles.js +1 -1
  172. package/lib-commonjs/components/DataGridBody/DataGridBody.js.map +1 -1
  173. package/lib-commonjs/components/DataGridBody/DataGridBody.types.js.map +1 -1
  174. package/lib-commonjs/components/DataGridBody/index.js.map +1 -1
  175. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js.map +1 -1
  176. package/lib-commonjs/components/DataGridBody/useDataGridBody.js.map +1 -1
  177. package/lib-commonjs/components/DataGridBody/useDataGridBodyStyles.styles.js +1 -1
  178. package/lib-commonjs/components/DataGridCell/DataGridCell.js.map +1 -1
  179. package/lib-commonjs/components/DataGridCell/DataGridCell.types.js.map +1 -1
  180. package/lib-commonjs/components/DataGridCell/index.js.map +1 -1
  181. package/lib-commonjs/components/DataGridCell/renderDataGridCell.js.map +1 -1
  182. package/lib-commonjs/components/DataGridCell/useDataGridCell.js.map +1 -1
  183. package/lib-commonjs/components/DataGridCell/useDataGridCellStyles.styles.js +1 -1
  184. package/lib-commonjs/components/DataGridHeader/DataGridHeader.js.map +1 -1
  185. package/lib-commonjs/components/DataGridHeader/DataGridHeader.types.js.map +1 -1
  186. package/lib-commonjs/components/DataGridHeader/index.js.map +1 -1
  187. package/lib-commonjs/components/DataGridHeader/renderDataGridHeader.js.map +1 -1
  188. package/lib-commonjs/components/DataGridHeader/useDataGridHeader.js.map +1 -1
  189. package/lib-commonjs/components/DataGridHeader/useDataGridHeaderStyles.styles.js +1 -1
  190. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.js.map +1 -1
  191. package/lib-commonjs/components/DataGridHeaderCell/DataGridHeaderCell.types.js.map +1 -1
  192. package/lib-commonjs/components/DataGridHeaderCell/index.js.map +1 -1
  193. package/lib-commonjs/components/DataGridHeaderCell/renderDataGridHeaderCell.js.map +1 -1
  194. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCell.js.map +1 -1
  195. package/lib-commonjs/components/DataGridHeaderCell/useDataGridHeaderCellStyles.styles.js +1 -1
  196. package/lib-commonjs/components/DataGridRow/DataGridRow.js.map +1 -1
  197. package/lib-commonjs/components/DataGridRow/DataGridRow.types.js.map +1 -1
  198. package/lib-commonjs/components/DataGridRow/index.js.map +1 -1
  199. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js.map +1 -1
  200. package/lib-commonjs/components/DataGridRow/useDataGridRow.js.map +1 -1
  201. package/lib-commonjs/components/DataGridRow/useDataGridRowStyles.styles.js +1 -1
  202. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.js.map +1 -1
  203. package/lib-commonjs/components/DataGridSelectionCell/DataGridSelectionCell.types.js.map +1 -1
  204. package/lib-commonjs/components/DataGridSelectionCell/index.js.map +1 -1
  205. package/lib-commonjs/components/DataGridSelectionCell/renderDataGridSelectionCell.js.map +1 -1
  206. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCell.js.map +1 -1
  207. package/lib-commonjs/components/DataGridSelectionCell/useDataGridSelectionCellStyles.styles.js +1 -1
  208. package/lib-commonjs/components/Table/Table.js.map +1 -1
  209. package/lib-commonjs/components/Table/Table.types.js.map +1 -1
  210. package/lib-commonjs/components/Table/index.js.map +1 -1
  211. package/lib-commonjs/components/Table/renderTable.js.map +1 -1
  212. package/lib-commonjs/components/Table/useTable.js.map +1 -1
  213. package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -1
  214. package/lib-commonjs/components/Table/useTableStyles.styles.js +1 -1
  215. package/lib-commonjs/components/TableBody/TableBody.js.map +1 -1
  216. package/lib-commonjs/components/TableBody/TableBody.types.js.map +1 -1
  217. package/lib-commonjs/components/TableBody/index.js.map +1 -1
  218. package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -1
  219. package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
  220. package/lib-commonjs/components/TableBody/useTableBodyStyles.styles.js +1 -1
  221. package/lib-commonjs/components/TableCell/TableCell.js.map +1 -1
  222. package/lib-commonjs/components/TableCell/TableCell.types.js.map +1 -1
  223. package/lib-commonjs/components/TableCell/index.js.map +1 -1
  224. package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -1
  225. package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
  226. package/lib-commonjs/components/TableCell/useTableCellStyles.styles.js +1 -1
  227. package/lib-commonjs/components/TableCellActions/TableCellActions.js.map +1 -1
  228. package/lib-commonjs/components/TableCellActions/TableCellActions.types.js.map +1 -1
  229. package/lib-commonjs/components/TableCellActions/index.js.map +1 -1
  230. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -1
  231. package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -1
  232. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.styles.js +1 -1
  233. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js.map +1 -1
  234. package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
  235. package/lib-commonjs/components/TableCellLayout/index.js.map +1 -1
  236. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  237. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  238. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -1
  239. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.styles.js +1 -1
  240. package/lib-commonjs/components/TableHeader/TableHeader.js.map +1 -1
  241. package/lib-commonjs/components/TableHeader/TableHeader.types.js.map +1 -1
  242. package/lib-commonjs/components/TableHeader/index.js.map +1 -1
  243. package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -1
  244. package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
  245. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.styles.js +1 -1
  246. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  247. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
  248. package/lib-commonjs/components/TableHeaderCell/index.js.map +1 -1
  249. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  250. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  251. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.styles.js +1 -1
  252. package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.js.map +1 -1
  253. package/lib-commonjs/components/TableResizeHandle/TableResizeHandle.types.js.map +1 -1
  254. package/lib-commonjs/components/TableResizeHandle/index.js.map +1 -1
  255. package/lib-commonjs/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -1
  256. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandle.js.map +1 -1
  257. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandleStyles.styles.js +1 -1
  258. package/lib-commonjs/components/TableRow/TableRow.js.map +1 -1
  259. package/lib-commonjs/components/TableRow/TableRow.types.js.map +1 -1
  260. package/lib-commonjs/components/TableRow/index.js.map +1 -1
  261. package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -1
  262. package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
  263. package/lib-commonjs/components/TableRow/useTableRowStyles.styles.js +16 -16
  264. package/lib-commonjs/components/TableRow/useTableRowStyles.styles.js.map +1 -1
  265. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  266. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
  267. package/lib-commonjs/components/TableSelectionCell/index.js.map +1 -1
  268. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  269. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js +2 -1
  270. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  271. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.styles.js +1 -1
  272. package/lib-commonjs/contexts/columnIdContext.js.map +1 -1
  273. package/lib-commonjs/contexts/dataGridContext.js.map +1 -1
  274. package/lib-commonjs/contexts/rowIdContext.js.map +1 -1
  275. package/lib-commonjs/contexts/tableContext.js.map +1 -1
  276. package/lib-commonjs/contexts/tableHeaderContext.js.map +1 -1
  277. package/lib-commonjs/hooks/createColumn.js.map +1 -1
  278. package/lib-commonjs/hooks/index.js.map +1 -1
  279. package/lib-commonjs/hooks/types.js.map +1 -1
  280. package/lib-commonjs/hooks/useKeyboardResizing.js.map +1 -1
  281. package/lib-commonjs/hooks/useMeasureElement.js.map +1 -1
  282. package/lib-commonjs/hooks/useTableColumnResizeMouseHandler.js.map +1 -1
  283. package/lib-commonjs/hooks/useTableColumnResizeState.js.map +1 -1
  284. package/lib-commonjs/hooks/useTableColumnSizing.js.map +1 -1
  285. package/lib-commonjs/hooks/useTableCompositeNavigation.js.map +1 -1
  286. package/lib-commonjs/hooks/useTableFeatures.js.map +1 -1
  287. package/lib-commonjs/hooks/useTableSelection.js.map +1 -1
  288. package/lib-commonjs/hooks/useTableSort.js.map +1 -1
  289. package/lib-commonjs/index.js.map +1 -1
  290. package/lib-commonjs/utils/columnResizeUtils.js.map +1 -1
  291. package/lib-commonjs/utils/isColumnSortable.js.map +1 -1
  292. package/package.json +12 -28
@@ -1 +1 @@
1
- {"version":3,"sources":["useTableHeaderCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useFocusWithin } from '@fluentui/react-tabster';\nimport { ArrowUpRegular, ArrowDownRegular } from '@fluentui/react-icons';\nimport { ARIAButtonSlotProps, useARIAButtonProps } from '@fluentui/react-aria';\nimport type { TableHeaderCellProps, TableHeaderCellState } from './TableHeaderCell.types';\nimport { useTableContext } from '../../contexts/tableContext';\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: contextSortable } = useTableContext();\n const { sortable = contextSortable } = props;\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'th';\n\n const buttonSlot = slot.always<ARIAButtonSlotProps>(props.button, {\n elementType: 'div',\n defaultProps: {\n as: 'div',\n ...(!sortable && {\n role: 'presentation',\n tabIndex: undefined,\n }),\n },\n });\n\n return {\n components: {\n root: rootComponent,\n button: 'div',\n sortIcon: 'span',\n aside: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, useFocusWithin()) as React.Ref<HTMLDivElement>,\n role: rootComponent === 'div' ? 'columnheader' : undefined,\n 'aria-sort': sortable ? props.sortDirection ?? 'none' : undefined,\n ...props,\n } as const),\n { elementType: rootComponent },\n ),\n aside: slot.optional(props.aside, { elementType: 'span' }),\n sortIcon: slot.optional(props.sortIcon, {\n renderByDefault: !!props.sortDirection,\n defaultProps: { children: props.sortDirection ? sortIcons[props.sortDirection] : undefined },\n elementType: 'span',\n }),\n button: useARIAButtonProps(buttonSlot.as, buttonSlot),\n sortable,\n noNativeElements,\n };\n};\n"],"names":["React","getIntrinsicElementProps","useMergedRefs","slot","useFocusWithin","ArrowUpRegular","ArrowDownRegular","useARIAButtonProps","useTableContext","sortIcons","ascending","fontSize","descending","useTableHeaderCell_unstable","props","ref","noNativeElements","sortable","contextSortable","rootComponent","as","buttonSlot","always","button","elementType","defaultProps","role","tabIndex","undefined","components","root","sortIcon","aside","sortDirection","optional","renderByDefault","children"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,aAAa,EAAEC,IAAI,QAAQ,4BAA4B;AAC1F,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,cAAc,EAAEC,gBAAgB,QAAQ,wBAAwB;AACzE,SAA8BC,kBAAkB,QAAQ,uBAAuB;AAE/E,SAASC,eAAe,QAAQ,8BAA8B;AAE9D,MAAMC,YAAY;IAChBC,yBAAW,oBAACL;QAAeM,UAAU;;IACrCC,0BAAY,oBAACN;QAAiBK,UAAU;;AAC1C;AAEA;;;;;;;;CAQC,GACD,OAAO,MAAME,8BAA8B,CACzCC,OACAC;IAEA,MAAM,EAAEC,gBAAgB,EAAEC,UAAUC,eAAe,EAAE,GAAGV;IACxD,MAAM,EAAES,WAAWC,eAAe,EAAE,GAAGJ;QAEjBA;IAAtB,MAAMK,gBAAgBL,CAAAA,CAAAA,YAAAA,MAAMM,EAAE,cAARN,uBAAAA,YAAYE,gBAAe,IAAI,QAAQ;IAE7D,MAAMK,aAAalB,KAAKmB,MAAM,CAAsBR,MAAMS,MAAM,EAAE;QAChEC,aAAa;QACbC,cAAc;YACZL,IAAI;YACJ,GAAI,CAACH,YAAY;gBACfS,MAAM;gBACNC,UAAUC;YACZ,CAAC;QACH;IACF;QAgB8Bd;IAd9B,OAAO;QACLe,YAAY;YACVC,MAAMX;YACNI,QAAQ;YACRQ,UAAU;YACVC,OAAO;QACT;QACAF,MAAM3B,KAAKmB,MAAM,CACfrB,yBAAyBkB,eAAe;YACtC,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FJ,KAAKb,cAAca,KAAKX;YACxBsB,MAAMP,kBAAkB,QAAQ,iBAAiBS;YACjD,aAAaX,WAAWH,CAAAA,uBAAAA,MAAMmB,aAAa,cAAnBnB,kCAAAA,uBAAuB,SAASc;YACxD,GAAGd,KAAK;QACV,IACA;YAAEU,aAAaL;QAAc;QAE/Ba,OAAO7B,KAAK+B,QAAQ,CAACpB,MAAMkB,KAAK,EAAE;YAAER,aAAa;QAAO;QACxDO,UAAU5B,KAAK+B,QAAQ,CAACpB,MAAMiB,QAAQ,EAAE;YACtCI,iBAAiB,CAAC,CAACrB,MAAMmB,aAAa;YACtCR,cAAc;gBAAEW,UAAUtB,MAAMmB,aAAa,GAAGxB,SAAS,CAACK,MAAMmB,aAAa,CAAC,GAAGL;YAAU;YAC3FJ,aAAa;QACf;QACAD,QAAQhB,mBAAmBc,WAAWD,EAAE,EAAEC;QAC1CJ;QACAD;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/TableHeaderCell/useTableHeaderCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useFocusWithin } from '@fluentui/react-tabster';\nimport { ArrowUpRegular, ArrowDownRegular } from '@fluentui/react-icons';\nimport { ARIAButtonSlotProps, useARIAButtonProps } from '@fluentui/react-aria';\nimport type { TableHeaderCellProps, TableHeaderCellState } from './TableHeaderCell.types';\nimport { useTableContext } from '../../contexts/tableContext';\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: contextSortable } = useTableContext();\n const { sortable = contextSortable } = props;\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'th';\n\n const buttonSlot = slot.always<ARIAButtonSlotProps>(props.button, {\n elementType: 'div',\n defaultProps: {\n as: 'div',\n ...(!sortable && {\n role: 'presentation',\n tabIndex: undefined,\n }),\n },\n });\n\n return {\n components: {\n root: rootComponent,\n button: 'div',\n sortIcon: 'span',\n aside: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, useFocusWithin()) as React.Ref<HTMLDivElement>,\n role: rootComponent === 'div' ? 'columnheader' : undefined,\n 'aria-sort': sortable ? props.sortDirection ?? 'none' : undefined,\n ...props,\n } as const),\n { elementType: rootComponent },\n ),\n aside: slot.optional(props.aside, { elementType: 'span' }),\n sortIcon: slot.optional(props.sortIcon, {\n renderByDefault: !!props.sortDirection,\n defaultProps: { children: props.sortDirection ? sortIcons[props.sortDirection] : undefined },\n elementType: 'span',\n }),\n button: useARIAButtonProps(buttonSlot.as, buttonSlot),\n sortable,\n noNativeElements,\n };\n};\n"],"names":["React","getIntrinsicElementProps","useMergedRefs","slot","useFocusWithin","ArrowUpRegular","ArrowDownRegular","useARIAButtonProps","useTableContext","sortIcons","ascending","fontSize","descending","useTableHeaderCell_unstable","props","ref","noNativeElements","sortable","contextSortable","rootComponent","as","buttonSlot","always","button","elementType","defaultProps","role","tabIndex","undefined","components","root","sortIcon","aside","sortDirection","optional","renderByDefault","children"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,aAAa,EAAEC,IAAI,QAAQ,4BAA4B;AAC1F,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,cAAc,EAAEC,gBAAgB,QAAQ,wBAAwB;AACzE,SAA8BC,kBAAkB,QAAQ,uBAAuB;AAE/E,SAASC,eAAe,QAAQ,8BAA8B;AAE9D,MAAMC,YAAY;IAChBC,yBAAW,oBAACL;QAAeM,UAAU;;IACrCC,0BAAY,oBAACN;QAAiBK,UAAU;;AAC1C;AAEA;;;;;;;;CAQC,GACD,OAAO,MAAME,8BAA8B,CACzCC,OACAC;IAEA,MAAM,EAAEC,gBAAgB,EAAEC,UAAUC,eAAe,EAAE,GAAGV;IACxD,MAAM,EAAES,WAAWC,eAAe,EAAE,GAAGJ;QAEjBA;IAAtB,MAAMK,gBAAgBL,CAAAA,CAAAA,YAAAA,MAAMM,EAAE,cAARN,uBAAAA,YAAYE,gBAAe,IAAI,QAAQ;IAE7D,MAAMK,aAAalB,KAAKmB,MAAM,CAAsBR,MAAMS,MAAM,EAAE;QAChEC,aAAa;QACbC,cAAc;YACZL,IAAI;YACJ,GAAI,CAACH,YAAY;gBACfS,MAAM;gBACNC,UAAUC;YACZ,CAAC;QACH;IACF;QAgB8Bd;IAd9B,OAAO;QACLe,YAAY;YACVC,MAAMX;YACNI,QAAQ;YACRQ,UAAU;YACVC,OAAO;QACT;QACAF,MAAM3B,KAAKmB,MAAM,CACfrB,yBAAyBkB,eAAe;YACtC,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FJ,KAAKb,cAAca,KAAKX;YACxBsB,MAAMP,kBAAkB,QAAQ,iBAAiBS;YACjD,aAAaX,WAAWH,CAAAA,uBAAAA,MAAMmB,aAAa,cAAnBnB,kCAAAA,uBAAuB,SAASc;YACxD,GAAGd,KAAK;QACV,IACA;YAAEU,aAAaL;QAAc;QAE/Ba,OAAO7B,KAAK+B,QAAQ,CAACpB,MAAMkB,KAAK,EAAE;YAAER,aAAa;QAAO;QACxDO,UAAU5B,KAAK+B,QAAQ,CAACpB,MAAMiB,QAAQ,EAAE;YACtCI,iBAAiB,CAAC,CAACrB,MAAMmB,aAAa;YACtCR,cAAc;gBAAEW,UAAUtB,MAAMmB,aAAa,GAAGxB,SAAS,CAACK,MAAMmB,aAAa,CAAC,GAAGL;YAAU;YAC3FJ,aAAa;QACf;QACAD,QAAQhB,mBAAmBc,WAAWD,EAAE,EAAEC;QAC1CJ;QACAD;IACF;AACF,EAAE"}
@@ -159,5 +159,4 @@ export const useTableHeaderCellStyles_unstable = state => {
159
159
  state.aside.className = mergeClasses(tableHeaderCellClassNames.aside, styles.resizeHandle, state.aside.className);
160
160
  }
161
161
  return state;
162
- };
163
- //# sourceMappingURL=useTableHeaderCellStyles.styles.js.map
162
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["TableResizeHandle.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTableResizeHandle_unstable } from './useTableResizeHandle';\nimport { renderTableResizeHandle_unstable } from './renderTableResizeHandle';\nimport { useTableResizeHandleStyles_unstable } from './useTableResizeHandleStyles.styles';\nimport type { TableResizeHandleProps } from './TableResizeHandle.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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\n useCustomStyleHook_unstable('useTableResizeHandleStyles_unstable')(state);\n\n return renderTableResizeHandle_unstable(state);\n});\n\nTableResizeHandle.displayName = 'TableResizeHandle';\n"],"names":["React","useTableResizeHandle_unstable","renderTableResizeHandle_unstable","useTableResizeHandleStyles_unstable","useCustomStyleHook_unstable","TableResizeHandle","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,4BAA4B;AAC7E,SAASC,mCAAmC,QAAQ,sCAAsC;AAG1F,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,kCAAiEL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACrG,MAAMC,QAAQR,8BAA8BM,OAAOC;IAEnDL,oCAAoCM;IAEpCL,4BAA4B,uCAAuCK;IAEnE,OAAOP,iCAAiCO;AAC1C,GAAG;AAEHJ,kBAAkBK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../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.styles';\nimport type { TableResizeHandleProps } from './TableResizeHandle.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\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\n useCustomStyleHook_unstable('useTableResizeHandleStyles_unstable')(state);\n\n return renderTableResizeHandle_unstable(state);\n});\n\nTableResizeHandle.displayName = 'TableResizeHandle';\n"],"names":["React","useTableResizeHandle_unstable","renderTableResizeHandle_unstable","useTableResizeHandleStyles_unstable","useCustomStyleHook_unstable","TableResizeHandle","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,4BAA4B;AAC7E,SAASC,mCAAmC,QAAQ,sCAAsC;AAG1F,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,kCAAiEL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACrG,MAAMC,QAAQR,8BAA8BM,OAAOC;IAEnDL,oCAAoCM;IAEpCL,4BAA4B,uCAAuCK;IAEnE,OAAOP,iCAAiCO;AAC1C,GAAG;AAEHJ,kBAAkBK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["TableResizeHandle.types.ts"],"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"],"names":[],"rangeMappings":";;","mappings":"AAWA;;CAEC,GACD,WAA4E"}
1
+ {"version":3,"sources":["../src/components/TableResizeHandle/TableResizeHandle.types.ts"],"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"],"names":[],"rangeMappings":";;","mappings":"AAWA;;CAEC,GACD,WAA4E"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './TableResizeHandle';\nexport * from './TableResizeHandle.types';\nexport * from './renderTableResizeHandle';\nexport * from './useTableResizeHandle';\nexport * from './useTableResizeHandleStyles.styles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,sBAAsB;AACpC,cAAc,4BAA4B;AAC1C,cAAc,4BAA4B;AAC1C,cAAc,yBAAyB;AACvC,cAAc,sCAAsC"}
1
+ {"version":3,"sources":["../src/components/TableResizeHandle/index.ts"],"sourcesContent":["export * from './TableResizeHandle';\nexport * from './TableResizeHandle.types';\nexport * from './renderTableResizeHandle';\nexport * from './useTableResizeHandle';\nexport * from './useTableResizeHandleStyles.styles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,sBAAsB;AACpC,cAAc,4BAA4B;AAC1C,cAAc,4BAA4B;AAC1C,cAAc,yBAAyB;AACvC,cAAc,sCAAsC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["renderTableResizeHandle.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } 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 assertSlots<TableResizeHandleSlots>(state);\n return <state.root />;\n};\n"],"names":["assertSlots","renderTableResizeHandle_unstable","state","root"],"rangeMappings":";;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,mCAAmC,CAACC;IAC/CF,YAAoCE;IACpC,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
1
+ {"version":3,"sources":["../src/components/TableResizeHandle/renderTableResizeHandle.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } 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 assertSlots<TableResizeHandleSlots>(state);\n return <state.root />;\n};\n"],"names":["assertSlots","renderTableResizeHandle_unstable","state","root"],"rangeMappings":";;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,mCAAmC,CAACC;IAC/CF,YAAoCE;IACpC,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useTableResizeHandle.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useEventCallback, slot } 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: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n ...props,\n onClick,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["React","getIntrinsicElementProps","useEventCallback","slot","useTableResizeHandle_unstable","props","ref","onClick","event","stopPropagation","components","root","always","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,4BAA4B;AAG7F;;;;;;;;CAQC,GACD,OAAO,MAAMC,gCAAgC,CAC3CC,OACAC;IAEA,MAAMC,UAAUL,iBAAiB,CAACM;YAChCH;SAAAA,iBAAAA,MAAME,OAAO,cAAbF,qCAAAA,oBAAAA,OAAgBG;QAChBA,MAAMC,eAAe;IACvB;IACA,OAAO;QACLC,YAAY;YACVC,MAAM;QACR;QACAA,MAAMR,KAAKS,MAAM,CACfX,yBAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FK,KAAKA;YACL,GAAGD,KAAK;YACRE;QACF,IACA;YAAEM,aAAa;QAAM;IAEzB;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/TableResizeHandle/useTableResizeHandle.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useEventCallback, slot } 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: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n ...props,\n onClick,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["React","getIntrinsicElementProps","useEventCallback","slot","useTableResizeHandle_unstable","props","ref","onClick","event","stopPropagation","components","root","always","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,4BAA4B;AAG7F;;;;;;;;CAQC,GACD,OAAO,MAAMC,gCAAgC,CAC3CC,OACAC;IAEA,MAAMC,UAAUL,iBAAiB,CAACM;YAChCH;SAAAA,iBAAAA,MAAME,OAAO,cAAbF,qCAAAA,oBAAAA,OAAgBG;QAChBA,MAAMC,eAAe;IACvB;IACA,OAAO;QACLC,YAAY;YACVC,MAAM;QACR;QACAA,MAAMR,KAAKS,MAAM,CACfX,yBAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FK,KAAKA;YACL,GAAGD,KAAK;YACRE;QACF,IACA;YAAEM,aAAa;QAAM;IAEzB;AACF,EAAE"}
@@ -51,5 +51,4 @@ export const useTableResizeHandleStyles_unstable = state => {
51
51
  const styles = useStyles();
52
52
  state.root.className = mergeClasses(tableResizeHandleClassNames.root, styles.root, state.root.className);
53
53
  return state;
54
- };
55
- //# sourceMappingURL=useTableResizeHandleStyles.styles.js.map
54
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["TableRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTableRow_unstable } from './useTableRow';\nimport { renderTableRow_unstable } from './renderTableRow';\nimport { useTableRowStyles_unstable } from './useTableRowStyles.styles';\nimport type { TableRowProps } from './TableRow.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TableRow component\n */\nexport const TableRow: ForwardRefComponent<TableRowProps> = React.forwardRef((props, ref) => {\n const state = useTableRow_unstable(props, ref);\n\n useTableRowStyles_unstable(state);\n\n useCustomStyleHook_unstable('useTableRowStyles_unstable')(state);\n\n return renderTableRow_unstable(state);\n});\n\nTableRow.displayName = 'TableRow';\n"],"names":["React","useTableRow_unstable","renderTableRow_unstable","useTableRowStyles_unstable","useCustomStyleHook_unstable","TableRow","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,6BAA6B;AAGxE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,yBAA+CL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACnF,MAAMC,QAAQR,qBAAqBM,OAAOC;IAE1CL,2BAA2BM;IAE3BL,4BAA4B,8BAA8BK;IAE1D,OAAOP,wBAAwBO;AACjC,GAAG;AAEHJ,SAASK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/TableRow/TableRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTableRow_unstable } from './useTableRow';\nimport { renderTableRow_unstable } from './renderTableRow';\nimport { useTableRowStyles_unstable } from './useTableRowStyles.styles';\nimport type { TableRowProps } from './TableRow.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TableRow component\n */\nexport const TableRow: ForwardRefComponent<TableRowProps> = React.forwardRef((props, ref) => {\n const state = useTableRow_unstable(props, ref);\n\n useTableRowStyles_unstable(state);\n\n useCustomStyleHook_unstable('useTableRowStyles_unstable')(state);\n\n return renderTableRow_unstable(state);\n});\n\nTableRow.displayName = 'TableRow';\n"],"names":["React","useTableRow_unstable","renderTableRow_unstable","useTableRowStyles_unstable","useCustomStyleHook_unstable","TableRow","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,6BAA6B;AAGxE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,yBAA+CL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACnF,MAAMC,QAAQR,qBAAqBM,OAAOC;IAE1CL,2BAA2BM;IAE3BL,4BAA4B,8BAA8BK;IAE1D,OAAOP,wBAAwBO;AACjC,GAAG;AAEHJ,SAASK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["TableRow.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableRowSlots = {\n root: Slot<'tr', 'div'>;\n};\n\n/**\n * TableRow Props\n */\nexport type TableRowProps = ComponentProps<TableRowSlots> & {\n /**\n * A table row can have different variants. These appearances are\n * intended to be used with selection.\n * @default none\n */\n appearance?: 'brand' | 'neutral' | 'none';\n};\n\n/**\n * State used in rendering TableRow\n */\nexport type TableRowState = ComponentState<TableRowSlots> &\n Pick<TableContextValue, 'noNativeElements' | 'size'> &\n Pick<Required<TableRowProps>, 'appearance'> & {\n isHeaderRow: boolean;\n };\n"],"names":[],"rangeMappings":";;","mappings":"AAmBA;;CAEC,GACD,WAII"}
1
+ {"version":3,"sources":["../src/components/TableRow/TableRow.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableRowSlots = {\n root: Slot<'tr', 'div'>;\n};\n\n/**\n * TableRow Props\n */\nexport type TableRowProps = ComponentProps<TableRowSlots> & {\n /**\n * A table row can have different variants. These appearances are\n * intended to be used with selection.\n * @default none\n */\n appearance?: 'brand' | 'neutral' | 'none';\n};\n\n/**\n * State used in rendering TableRow\n */\nexport type TableRowState = ComponentState<TableRowSlots> &\n Pick<TableContextValue, 'noNativeElements' | 'size'> &\n Pick<Required<TableRowProps>, 'appearance'> & {\n isHeaderRow: boolean;\n };\n"],"names":[],"rangeMappings":";;","mappings":"AAmBA;;CAEC,GACD,WAII"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './TableRow';\nexport * from './TableRow.types';\nexport * from './renderTableRow';\nexport * from './useTableRow';\nexport * from './useTableRowStyles.styles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,aAAa;AAC3B,cAAc,mBAAmB;AACjC,cAAc,mBAAmB;AACjC,cAAc,gBAAgB;AAC9B,cAAc,6BAA6B"}
1
+ {"version":3,"sources":["../src/components/TableRow/index.ts"],"sourcesContent":["export * from './TableRow';\nexport * from './TableRow.types';\nexport * from './renderTableRow';\nexport * from './useTableRow';\nexport * from './useTableRowStyles.styles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,aAAa;AAC3B,cAAc,mBAAmB;AACjC,cAAc,mBAAmB;AACjC,cAAc,gBAAgB;AAC9B,cAAc,6BAA6B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["renderTableRow.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TableRowState, TableRowSlots } from './TableRow.types';\n\n/**\n * Render the final JSX of TableRow\n */\nexport const renderTableRow_unstable = (state: TableRowState) => {\n assertSlots<TableRowSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderTableRow_unstable","state","root"],"rangeMappings":";;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,0BAA0B,CAACC;IACtCF,YAA2BE;IAE3B,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
1
+ {"version":3,"sources":["../src/components/TableRow/renderTableRow.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TableRowState, TableRowSlots } from './TableRow.types';\n\n/**\n * Render the final JSX of TableRow\n */\nexport const renderTableRow_unstable = (state: TableRowState) => {\n assertSlots<TableRowSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderTableRow_unstable","state","root"],"rangeMappings":";;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,0BAA0B,CAACC;IACtCF,YAA2BE;IAE3B,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useTableRow.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useFocusVisible, useFocusWithin } from '@fluentui/react-tabster';\nimport type { TableRowProps, TableRowState } from './TableRow.types';\nimport { useTableContext } from '../../contexts/tableContext';\nimport { useIsInTableHeader } from '../../contexts/tableHeaderContext';\n\n/**\n * Create the state required to render TableRow.\n *\n * The returned state can be modified with hooks such as useTableRowStyles_unstable,\n * before being passed to renderTableRow_unstable.\n *\n * @param props - props from this instance of TableRow\n * @param ref - reference to root HTMLElement of TableRow\n */\nexport const useTableRow_unstable = (props: TableRowProps, ref: React.Ref<HTMLElement>): TableRowState => {\n const { noNativeElements, size } = useTableContext();\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'tr';\n const focusVisibleRef = useFocusVisible();\n const focusWithinRef = useFocusWithin();\n const isHeaderRow = useIsInTableHeader();\n\n return {\n components: {\n root: rootComponent,\n },\n root: slot.always(\n getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, focusVisibleRef, focusWithinRef) as React.Ref<HTMLDivElement>,\n role: rootComponent === 'div' ? 'row' : undefined,\n ...props,\n }),\n { elementType: rootComponent },\n ),\n size,\n noNativeElements,\n appearance: props.appearance ?? 'none',\n isHeaderRow,\n };\n};\n"],"names":["React","getIntrinsicElementProps","useMergedRefs","slot","useFocusVisible","useFocusWithin","useTableContext","useIsInTableHeader","useTableRow_unstable","props","ref","noNativeElements","size","rootComponent","as","focusVisibleRef","focusWithinRef","isHeaderRow","components","root","always","role","undefined","elementType","appearance"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,aAAa,EAAEC,IAAI,QAAQ,4BAA4B;AAC1F,SAASC,eAAe,EAAEC,cAAc,QAAQ,0BAA0B;AAE1E,SAASC,eAAe,QAAQ,8BAA8B;AAC9D,SAASC,kBAAkB,QAAQ,oCAAoC;AAEvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,uBAAuB,CAACC,OAAsBC;IACzD,MAAM,EAAEC,gBAAgB,EAAEC,IAAI,EAAE,GAAGN;QACbG;IAAtB,MAAMI,gBAAgBJ,CAAAA,CAAAA,YAAAA,MAAMK,EAAE,cAARL,uBAAAA,YAAYE,gBAAe,IAAI,QAAQ;IAC7D,MAAMI,kBAAkBX;IACxB,MAAMY,iBAAiBX;IACvB,MAAMY,cAAcV;QAmBNE;IAjBd,OAAO;QACLS,YAAY;YACVC,MAAMN;QACR;QACAM,MAAMhB,KAAKiB,MAAM,CACfnB,yBAAyBY,eAAe;YACtC,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FH,KAAKR,cAAcQ,KAAKK,iBAAiBC;YACzCK,MAAMR,kBAAkB,QAAQ,QAAQS;YACxC,GAAGb,KAAK;QACV,IACA;YAAEc,aAAaV;QAAc;QAE/BD;QACAD;QACAa,YAAYf,CAAAA,oBAAAA,MAAMe,UAAU,cAAhBf,+BAAAA,oBAAoB;QAChCQ;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/TableRow/useTableRow.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useFocusVisible, useFocusWithin } from '@fluentui/react-tabster';\nimport type { TableRowProps, TableRowState } from './TableRow.types';\nimport { useTableContext } from '../../contexts/tableContext';\nimport { useIsInTableHeader } from '../../contexts/tableHeaderContext';\n\n/**\n * Create the state required to render TableRow.\n *\n * The returned state can be modified with hooks such as useTableRowStyles_unstable,\n * before being passed to renderTableRow_unstable.\n *\n * @param props - props from this instance of TableRow\n * @param ref - reference to root HTMLElement of TableRow\n */\nexport const useTableRow_unstable = (props: TableRowProps, ref: React.Ref<HTMLElement>): TableRowState => {\n const { noNativeElements, size } = useTableContext();\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'tr';\n const focusVisibleRef = useFocusVisible();\n const focusWithinRef = useFocusWithin();\n const isHeaderRow = useIsInTableHeader();\n\n return {\n components: {\n root: rootComponent,\n },\n root: slot.always(\n getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, focusVisibleRef, focusWithinRef) as React.Ref<HTMLDivElement>,\n role: rootComponent === 'div' ? 'row' : undefined,\n ...props,\n }),\n { elementType: rootComponent },\n ),\n size,\n noNativeElements,\n appearance: props.appearance ?? 'none',\n isHeaderRow,\n };\n};\n"],"names":["React","getIntrinsicElementProps","useMergedRefs","slot","useFocusVisible","useFocusWithin","useTableContext","useIsInTableHeader","useTableRow_unstable","props","ref","noNativeElements","size","rootComponent","as","focusVisibleRef","focusWithinRef","isHeaderRow","components","root","always","role","undefined","elementType","appearance"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,aAAa,EAAEC,IAAI,QAAQ,4BAA4B;AAC1F,SAASC,eAAe,EAAEC,cAAc,QAAQ,0BAA0B;AAE1E,SAASC,eAAe,QAAQ,8BAA8B;AAC9D,SAASC,kBAAkB,QAAQ,oCAAoC;AAEvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,uBAAuB,CAACC,OAAsBC;IACzD,MAAM,EAAEC,gBAAgB,EAAEC,IAAI,EAAE,GAAGN;QACbG;IAAtB,MAAMI,gBAAgBJ,CAAAA,CAAAA,YAAAA,MAAMK,EAAE,cAARL,uBAAAA,YAAYE,gBAAe,IAAI,QAAQ;IAC7D,MAAMI,kBAAkBX;IACxB,MAAMY,iBAAiBX;IACvB,MAAMY,cAAcV;QAmBNE;IAjBd,OAAO;QACLS,YAAY;YACVC,MAAMN;QACR;QACAM,MAAMhB,KAAKiB,MAAM,CACfnB,yBAAyBY,eAAe;YACtC,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FH,KAAKR,cAAcQ,KAAKK,iBAAiBC;YACzCK,MAAMR,kBAAkB,QAAQ,QAAQS;YACxC,GAAGb,KAAK;QACV,IACA;YAAEc,aAAaV;QAAc;QAE/BD;QACAD;QACAa,YAAYf,CAAAA,oBAAAA,MAAMe,UAAU,cAAhBf,+BAAAA,oBAAoB;QAChCQ;IACF;AACF,EAAE"}
@@ -29,8 +29,6 @@ const useStyles = /*#__PURE__*/__styles({
29
29
  root: {
30
30
  sj55zd: "f19n0e5",
31
31
  B7ck84d: "f1ewtqcl",
32
- Bconypa: "f1jazu75",
33
- B6guboy: "f1xeqee6",
34
32
  Bfpq7zp: 0,
35
33
  g9k6zt: 0,
36
34
  Bn4voq9: 0,
@@ -41,15 +39,18 @@ const useStyles = /*#__PURE__*/__styles({
41
39
  B6xbmo0: 0,
42
40
  B3whbx2: "f2krc9w"
43
41
  },
42
+ rootSubtleSelection: {
43
+ Bconypa: "f1jazu75",
44
+ ff6mpl: "fw60kww"
45
+ },
44
46
  rootInteractive: {
47
+ B6guboy: "f1xeqee6",
45
48
  ecr2s2: "f1wfn5kd",
46
49
  lj723h: "f1g4hkjv",
47
50
  B43xm9u: "f15ngxrw",
48
- i921ia: "fjbbrdp",
49
51
  Jwef8y: "f1t94bn6",
50
52
  Bi91k9c: "feu1g3u",
51
53
  Bpt6rm4: "f1uorfem",
52
- ff6mpl: "fw60kww",
53
54
  ze5xyy: "f4xjyn1",
54
55
  pgvf35: "ff1wgvm",
55
56
  Bh7lczh: ["fiob0tu", "f1x4h75k"],
@@ -140,17 +141,17 @@ const useStyles = /*#__PURE__*/__styles({
140
141
  },
141
142
  none: {}
142
143
  }, {
143
- d: [".f19n0e5{color:var(--colorNeutralForeground1);}", ".f1ewtqcl{box-sizing:border-box;}", ".f1jazu75[data-fui-focus-within]:focus-within .fui-TableSelectionCell{opacity:1;}", ".f1xeqee6[data-fui-focus-within]:focus-within .fui-TableCellActions{opacity:1;}", [".f1dxfoyt[data-fui-focus-visible]{outline:2px solid var(--colorStrokeFocus2);}", {
144
+ d: [".f19n0e5{color:var(--colorNeutralForeground1);}", ".f1ewtqcl{box-sizing:border-box;}", [".f1dxfoyt[data-fui-focus-visible]{outline:2px solid var(--colorStrokeFocus2);}", {
144
145
  p: -1
145
146
  }], [".f2krc9w[data-fui-focus-visible]{border-radius:var(--borderRadiusMedium);}", {
146
147
  p: -1
147
- }], [".f1facbz3{border-bottom:var(--strokeWidthThin) solid var(--colorNeutralStroke2);}", {
148
+ }], ".f1jazu75[data-fui-focus-within]:focus-within .fui-TableSelectionCell{opacity:1;}", ".f1xeqee6[data-fui-focus-within]:focus-within .fui-TableCellActions{opacity:1;}", [".f1facbz3{border-bottom:var(--strokeWidthThin) solid var(--colorNeutralStroke2);}", {
148
149
  p: -1
149
150
  }], [".f1facbz3{border-bottom:var(--strokeWidthThin) solid var(--colorNeutralStroke2);}", {
150
151
  p: -1
151
152
  }], ".fy9rknc{font-size:var(--fontSizeBase200);}", ".f16xkysk{background-color:var(--colorBrandBackground2);}", ".f1bh3yvw{border-top-color:var(--colorTransparentStrokeInteractive);}", ".fmi79ni{border-right-color:var(--colorTransparentStrokeInteractive);}", ".f11fozsx{border-left-color:var(--colorTransparentStrokeInteractive);}", ".fnzw4c6{border-bottom-color:var(--colorTransparentStrokeInteractive);}", ".fq5gl1p{background-color:var(--colorSubtleBackgroundSelected);}", ".f1cgsbmv{color:var(--colorNeutralForeground1Hover);}", ".frmsihh{border-top-color:var(--colorNeutralStrokeOnBrand);}", ".frttxa5{border-right-color:var(--colorNeutralStrokeOnBrand);}", ".f11o2r7f{border-left-color:var(--colorNeutralStrokeOnBrand);}", ".fem5et0{border-bottom-color:var(--colorNeutralStrokeOnBrand);}"],
152
- a: [".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}", ".f1g4hkjv:active{color:var(--colorNeutralForeground1Pressed);}", ".f15ngxrw:active .fui-TableCellActions{opacity:1;}", ".fjbbrdp:active .fui-TableSelectionCell{opacity:1;}", ".f7tkmfy:active{background-color:var(--colorBrandBackground2);}", ".f1r2dosr:active{color:var(--colorNeutralForeground1);}", ".fa9o754:active{background-color:var(--colorSubtleBackgroundSelected);}"],
153
- h: [".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}", ".feu1g3u:hover{color:var(--colorNeutralForeground1Hover);}", ".f1uorfem:hover .fui-TableCellActions{opacity:1;}", ".fw60kww:hover .fui-TableSelectionCell{opacity:1;}", ".f1uqaxdt:hover{background-color:var(--colorSubtleBackgroundSelected);}"],
153
+ h: [".fw60kww:hover .fui-TableSelectionCell{opacity:1;}", ".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}", ".feu1g3u:hover{color:var(--colorNeutralForeground1Hover);}", ".f1uorfem:hover .fui-TableCellActions{opacity:1;}", ".f1uqaxdt:hover{background-color:var(--colorSubtleBackgroundSelected);}"],
154
+ a: [".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}", ".f1g4hkjv:active{color:var(--colorNeutralForeground1Pressed);}", ".f15ngxrw:active .fui-TableCellActions{opacity:1;}", ".f7tkmfy:active{background-color:var(--colorBrandBackground2);}", ".f1r2dosr:active{color:var(--colorNeutralForeground1);}", ".fa9o754:active{background-color:var(--colorSubtleBackgroundSelected);}"],
154
155
  m: [["@media (forced-colors: active){.f4xjyn1:hover{color:Highlight;}}", {
155
156
  m: "(forced-colors: active)"
156
157
  }], ["@media (forced-colors: active){.ff1wgvm:hover{border-top-color:Highlight;}}", {
@@ -182,7 +183,6 @@ export const useTableRowStyles_unstable = state => {
182
183
  table: useTableLayoutStyles(),
183
184
  flex: useFlexLayoutStyles()
184
185
  };
185
- state.root.className = mergeClasses(tableRowClassNames.root, styles.root, !state.isHeaderRow && styles.rootInteractive, styles[state.size], state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, styles[state.appearance], state.root.className);
186
+ state.root.className = mergeClasses(tableRowClassNames.root, styles.root, styles.rootSubtleSelection, !state.isHeaderRow && styles.rootInteractive, styles[state.size], state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, styles[state.appearance], state.root.className);
186
187
  return state;
187
- };
188
- //# sourceMappingURL=useTableRowStyles.styles.js.map
188
+ };
@@ -1 +1 @@
1
- {"version":3,"names":["__styles","mergeClasses","shorthands","tokens","tableCellActionsClassNames","tableSelectionCellClassNames","createCustomFocusIndicatorStyle","tableRowClassName","tableRowClassNames","root","useTableLayoutStyles","mc9l5x","d","useFlexLayoutStyles","Bt984gj","useStyles","sj55zd","B7ck84d","Bconypa","B6guboy","Bfpq7zp","g9k6zt","Bn4voq9","giviqs","Bw81rd7","kdpuga","dm238s","B6xbmo0","B3whbx2","rootInteractive","ecr2s2","lj723h","B43xm9u","i921ia","Jwef8y","Bi91k9c","Bpt6rm4","ff6mpl","ze5xyy","pgvf35","Bh7lczh","dpv3f4","Bpnjhaq","medium","B9xav0g","oivjwe","Bn0qgzm","Bgfg5da","small","Be2twd7","brand","De3pzq","g2u3we","h3c5rm","zhjwy3","uu68id","Bxeuatn","felo30","Bc736ss","Bhz882k","n51gp8","Eshu5l","Bk6ri7n","v49c4f","Bn1d65q","c4eypz","v3aym","hft9gk","Bjwas2f","Bk5ld8o","gwxt9v","B6k8go","h6lo6r","Beo2b4z","w1pwid","Btyw6ap","Hkxhyr","Brwvgy3","yadkgm","neutral","none","p","a","h","m","useTableRowStyles_unstable","state","styles","layoutStyles","table","flex","className","isHeaderRow","size","noNativeElements","appearance"],"sources":["useTableRowStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { tableCellActionsClassNames } from '../TableCellActions/useTableCellActionsStyles.styles';\nimport { tableSelectionCellClassNames } from '../TableSelectionCell/useTableSelectionCellStyles.styles';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nexport const tableRowClassName = 'fui-TableRow';\nexport const tableRowClassNames = {\n root: tableRowClassName\n};\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-row'\n }\n});\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center'\n }\n});\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForeground1,\n boxSizing: 'border-box',\n ...createCustomFocusIndicatorStyle({\n [`& .${tableSelectionCellClassNames.root}`]: {\n opacity: 1\n },\n [`& .${tableCellActionsClassNames.root}`]: {\n opacity: 1\n }\n }, {\n selector: 'focus-within'\n }),\n ...createCustomFocusIndicatorStyle({\n outline: `2px solid ${tokens.colorStrokeFocus2}`,\n borderRadius: tokens.borderRadiusMedium\n }, {\n selector: 'focus'\n })\n },\n rootInteractive: {\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n color: tokens.colorNeutralForeground1Pressed,\n [`& .${tableCellActionsClassNames.root}`]: {\n opacity: 1\n },\n [`& .${tableSelectionCellClassNames.root}`]: {\n opacity: 1\n }\n },\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n color: tokens.colorNeutralForeground1Hover,\n [`& .${tableCellActionsClassNames.root}`]: {\n opacity: 1\n },\n [`& .${tableSelectionCellClassNames.root}`]: {\n opacity: 1\n }\n },\n // High contrast styles\n '@media (forced-colors: active)': {\n ':hover': {\n color: 'Highlight',\n ...shorthands.borderColor('Highlight')\n }\n }\n },\n medium: {\n borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke2}`\n },\n small: {\n borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke2}`\n },\n 'extra-small': {\n fontSize: tokens.fontSizeBase200\n },\n brand: {\n backgroundColor: tokens.colorBrandBackground2,\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n ':active': {\n backgroundColor: tokens.colorBrandBackground2,\n color: tokens.colorNeutralForeground1\n },\n '@media(forced-colors: active)': {\n border: '2px solid transparent',\n borderRadius: tokens.borderRadiusMedium,\n boxSizing: 'border-box',\n ':focus-visible': {\n outlineOffset: '-4px'\n }\n }\n },\n neutral: {\n '@media(forced-colors: active)': {\n border: '2px solid transparent',\n borderRadius: tokens.borderRadiusMedium,\n boxSizing: 'border-box',\n ':focus-visible': {\n outlineOffset: '-4px'\n }\n },\n backgroundColor: tokens.colorSubtleBackgroundSelected,\n color: tokens.colorNeutralForeground1Hover,\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundSelected\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundSelected\n },\n ...shorthands.borderColor(tokens.colorNeutralStrokeOnBrand)\n },\n none: {}\n});\n/**\n * Apply styling to the TableRow slots based on the state\n */ export const useTableRowStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles()\n };\n state.root.className = mergeClasses(tableRowClassNames.root, styles.root, !state.isHeaderRow && styles.rootInteractive, styles[state.size], state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, styles[state.appearance], state.root.className);\n return state;\n};\n"],"mappings":"AAAA,SAAAA,QAAA,EAAqBC,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,0BAA0B,QAAQ,sDAAsD;AACjG,SAASC,4BAA4B,QAAQ,0DAA0D;AACvG,SAASC,+BAA+B,QAAQ,yBAAyB;AACzE,OAAO,MAAMC,iBAAiB,GAAG,cAAc;AAC/C,OAAO,MAAMC,kBAAkB,GAAG;EAC9BC,IAAI,EAAEF;AACV,CAAC;AACD,MAAMG,oBAAoB,gBAAGV,QAAA;EAAAS,IAAA;IAAAE,MAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,CAI5B,CAAC;AACF,MAAMC,mBAAmB,gBAAGb,QAAA;EAAAS,IAAA;IAAAE,MAAA;IAAAG,OAAA;EAAA;AAAA;EAAAF,CAAA;AAAA,CAK3B,CAAC;AACF;AACA;AACA;AAAI,MAAMG,SAAS,gBAAGf,QAAA;EAAAS,IAAA;IAAAO,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAC,eAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;EAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAAC,KAAA;IAAAJ,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;EAAA;EAAA;IA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AAA,CA+FrB,CAAC;AACF;AACA;AACA;AAAI,OAAO,MAAMC,0BAA0B,GAAIC,KAAK,IAAG;EACnD,aAAa;;EACb,MAAMC,MAAM,GAAGxE,SAAS,CAAC,CAAC;EAC1B,MAAMyE,YAAY,GAAG;IACjBC,KAAK,EAAE/E,oBAAoB,CAAC,CAAC;IAC7BgF,IAAI,EAAE7E,mBAAmB,CAAC;EAC9B,CAAC;EACDyE,KAAK,CAAC7E,IAAI,CAACkF,SAAS,GAAG1F,YAAY,CAACO,kBAAkB,CAACC,IAAI,EAAE8E,MAAM,CAAC9E,IAAI,EAAE,CAAC6E,KAAK,CAACM,WAAW,IAAIL,MAAM,CAAC1D,eAAe,EAAE0D,MAAM,CAACD,KAAK,CAACO,IAAI,CAAC,EAAEP,KAAK,CAACQ,gBAAgB,GAAGN,YAAY,CAACE,IAAI,CAACjF,IAAI,GAAG+E,YAAY,CAACC,KAAK,CAAChF,IAAI,EAAE8E,MAAM,CAACD,KAAK,CAACS,UAAU,CAAC,EAAET,KAAK,CAAC7E,IAAI,CAACkF,SAAS,CAAC;EACtQ,OAAOL,KAAK;AAChB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["__styles","mergeClasses","shorthands","tokens","tableCellActionsClassNames","tableSelectionCellClassNames","createCustomFocusIndicatorStyle","tableRowClassName","tableRowClassNames","root","useTableLayoutStyles","mc9l5x","d","useFlexLayoutStyles","Bt984gj","useStyles","sj55zd","B7ck84d","Bfpq7zp","g9k6zt","Bn4voq9","giviqs","Bw81rd7","kdpuga","dm238s","B6xbmo0","B3whbx2","rootSubtleSelection","Bconypa","ff6mpl","rootInteractive","B6guboy","ecr2s2","lj723h","B43xm9u","Jwef8y","Bi91k9c","Bpt6rm4","ze5xyy","pgvf35","Bh7lczh","dpv3f4","Bpnjhaq","medium","B9xav0g","oivjwe","Bn0qgzm","Bgfg5da","small","Be2twd7","brand","De3pzq","g2u3we","h3c5rm","zhjwy3","uu68id","Bxeuatn","felo30","Bc736ss","Bhz882k","n51gp8","Eshu5l","Bk6ri7n","v49c4f","Bn1d65q","c4eypz","v3aym","hft9gk","Bjwas2f","Bk5ld8o","gwxt9v","B6k8go","h6lo6r","Beo2b4z","w1pwid","Btyw6ap","Hkxhyr","Brwvgy3","yadkgm","neutral","none","p","h","a","m","useTableRowStyles_unstable","state","styles","layoutStyles","table","flex","className","isHeaderRow","size","noNativeElements","appearance"],"sources":["useTableRowStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { tableCellActionsClassNames } from '../TableCellActions/useTableCellActionsStyles.styles';\nimport { tableSelectionCellClassNames } from '../TableSelectionCell/useTableSelectionCellStyles.styles';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nexport const tableRowClassName = 'fui-TableRow';\nexport const tableRowClassNames = {\n root: tableRowClassName\n};\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-row'\n }\n});\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'flex',\n alignItems: 'center'\n }\n});\n/**\n * Styles for the root slot\n */ const useStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForeground1,\n boxSizing: 'border-box',\n ...createCustomFocusIndicatorStyle({\n outline: `2px solid ${tokens.colorStrokeFocus2}`,\n borderRadius: tokens.borderRadiusMedium\n }, {\n selector: 'focus'\n })\n },\n rootSubtleSelection: {\n ...createCustomFocusIndicatorStyle({\n [`& .${tableSelectionCellClassNames.root}`]: {\n opacity: 1\n }\n }, {\n selector: 'focus-within'\n }),\n ':hover': {\n [`& .${tableSelectionCellClassNames.root}`]: {\n opacity: 1\n }\n }\n },\n rootInteractive: {\n ...createCustomFocusIndicatorStyle({\n [`& .${tableCellActionsClassNames.root}`]: {\n opacity: 1\n }\n }, {\n selector: 'focus-within'\n }),\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n color: tokens.colorNeutralForeground1Pressed,\n [`& .${tableCellActionsClassNames.root}`]: {\n opacity: 1\n }\n },\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n color: tokens.colorNeutralForeground1Hover,\n [`& .${tableCellActionsClassNames.root}`]: {\n opacity: 1\n }\n },\n // High contrast styles\n '@media (forced-colors: active)': {\n ':hover': {\n color: 'Highlight',\n ...shorthands.borderColor('Highlight')\n }\n }\n },\n medium: {\n borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke2}`\n },\n small: {\n borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke2}`\n },\n 'extra-small': {\n fontSize: tokens.fontSizeBase200\n },\n brand: {\n backgroundColor: tokens.colorBrandBackground2,\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n ':active': {\n backgroundColor: tokens.colorBrandBackground2,\n color: tokens.colorNeutralForeground1\n },\n '@media(forced-colors: active)': {\n border: '2px solid transparent',\n borderRadius: tokens.borderRadiusMedium,\n boxSizing: 'border-box',\n ':focus-visible': {\n outlineOffset: '-4px'\n }\n }\n },\n neutral: {\n '@media(forced-colors: active)': {\n border: '2px solid transparent',\n borderRadius: tokens.borderRadiusMedium,\n boxSizing: 'border-box',\n ':focus-visible': {\n outlineOffset: '-4px'\n }\n },\n backgroundColor: tokens.colorSubtleBackgroundSelected,\n color: tokens.colorNeutralForeground1Hover,\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundSelected\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundSelected\n },\n ...shorthands.borderColor(tokens.colorNeutralStrokeOnBrand)\n },\n none: {}\n});\n/**\n * Apply styling to the TableRow slots based on the state\n */ export const useTableRowStyles_unstable = (state)=>{\n 'use no memo';\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles()\n };\n state.root.className = mergeClasses(tableRowClassNames.root, styles.root, styles.rootSubtleSelection, !state.isHeaderRow && styles.rootInteractive, styles[state.size], state.noNativeElements ? layoutStyles.flex.root : layoutStyles.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B,GAAIC,KAAK,IAAG;EACnD,aAAa;;EACb,MAAMC,MAAM,GAAGxE,SAAS,CAAC,CAAC;EAC1B,MAAMyE,YAAY,GAAG;IACjBC,KAAK,EAAE/E,oBAAoB,CAAC,CAAC;IAC7BgF,IAAI,EAAE7E,mBAAmB,CAAC;EAC9B,CAAC;EACDyE,KAAK,CAAC7E,IAAI,CAACkF,SAAS,GAAG1F,YAAY,CAACO,kBAAkB,CAACC,IAAI,EAAE8E,MAAM,CAAC9E,IAAI,EAAE8E,MAAM,CAAC5D,mBAAmB,EAAE,CAAC2D,KAAK,CAACM,WAAW,IAAIL,MAAM,CAACzD,eAAe,EAAEyD,MAAM,CAACD,KAAK,CAACO,IAAI,CAAC,EAAEP,KAAK,CAACQ,gBAAgB,GAAGN,YAAY,CAACE,IAAI,CAACjF,IAAI,GAAG+E,YAAY,CAACC,KAAK,CAAChF,IAAI,EAAE8E,MAAM,CAACD,KAAK,CAACS,UAAU,CAAC,EAAET,KAAK,CAAC7E,IAAI,CAACkF,SAAS,CAAC;EAClS,OAAOL,KAAK;AAChB,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["TableSelectionCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTableSelectionCell_unstable } from './useTableSelectionCell';\nimport { renderTableSelectionCell_unstable } from './renderTableSelectionCell';\nimport { useTableSelectionCellStyles_unstable } from './useTableSelectionCellStyles.styles';\nimport type { TableSelectionCellProps } from './TableSelectionCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TableSelectionCell component\n */\nexport const TableSelectionCell: ForwardRefComponent<TableSelectionCellProps> = React.forwardRef((props, ref) => {\n const state = useTableSelectionCell_unstable(props, ref);\n\n useTableSelectionCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useTableSelectionCellStyles_unstable')(state);\n\n return renderTableSelectionCell_unstable(state);\n});\n\nTableSelectionCell.displayName = 'TableSelectionCell';\n"],"names":["React","useTableSelectionCell_unstable","renderTableSelectionCell_unstable","useTableSelectionCellStyles_unstable","useCustomStyleHook_unstable","TableSelectionCell","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,8BAA8B,QAAQ,0BAA0B;AACzE,SAASC,iCAAiC,QAAQ,6BAA6B;AAC/E,SAASC,oCAAoC,QAAQ,uCAAuC;AAG5F,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,mCAAmEL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACvG,MAAMC,QAAQR,+BAA+BM,OAAOC;IAEpDL,qCAAqCM;IAErCL,4BAA4B,wCAAwCK;IAEpE,OAAOP,kCAAkCO;AAC3C,GAAG;AAEHJ,mBAAmBK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/TableSelectionCell/TableSelectionCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useTableSelectionCell_unstable } from './useTableSelectionCell';\nimport { renderTableSelectionCell_unstable } from './renderTableSelectionCell';\nimport { useTableSelectionCellStyles_unstable } from './useTableSelectionCellStyles.styles';\nimport type { TableSelectionCellProps } from './TableSelectionCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * TableSelectionCell component\n */\nexport const TableSelectionCell: ForwardRefComponent<TableSelectionCellProps> = React.forwardRef((props, ref) => {\n const state = useTableSelectionCell_unstable(props, ref);\n\n useTableSelectionCellStyles_unstable(state);\n\n useCustomStyleHook_unstable('useTableSelectionCellStyles_unstable')(state);\n\n return renderTableSelectionCell_unstable(state);\n});\n\nTableSelectionCell.displayName = 'TableSelectionCell';\n"],"names":["React","useTableSelectionCell_unstable","renderTableSelectionCell_unstable","useTableSelectionCellStyles_unstable","useCustomStyleHook_unstable","TableSelectionCell","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,8BAA8B,QAAQ,0BAA0B;AACzE,SAASC,iCAAiC,QAAQ,6BAA6B;AAC/E,SAASC,oCAAoC,QAAQ,uCAAuC;AAG5F,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,mCAAmEL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACvG,MAAMC,QAAQR,+BAA+BM,OAAOC;IAEpDL,qCAAqCM;IAErCL,4BAA4B,wCAAwCK;IAEpE,OAAOP,kCAAkCO;AAC3C,GAAG;AAEHJ,mBAAmBK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["TableSelectionCell.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { Checkbox, CheckboxProps } from '@fluentui/react-checkbox';\nimport type { Radio } from '@fluentui/react-radio';\nimport { TableCellSlots } from '../TableCell/TableCell.types';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableSelectionCellSlots = {\n /**\n * Selection indicator if selection type is checkbox\n */\n checkboxIndicator: Slot<typeof Checkbox>;\n /**\n * Selection indicator if selection type is radio\n */\n radioIndicator: Slot<typeof Radio>;\n} & Pick<TableCellSlots, 'root'>;\n\n/**\n * TableSelectionCell Props\n */\nexport type TableSelectionCellProps = ComponentProps<Partial<TableSelectionCellSlots>> & {\n /**\n * A table can have two kinds of selection modes.\n * @default checkbox\n */\n type?: 'checkbox' | 'radio';\n\n /**\n * @default false\n */\n checked?: CheckboxProps['checked'];\n\n /**\n * Only visible when checked or the parent row is hovered/focused\n * @default false\n */\n subtle?: boolean;\n\n /**\n * Completely hides the selection cell\n * @deprecated cells should never use hidden, since doing so breaks table structure and screen reader navigation. Use `invisible` instead.\n */\n hidden?: boolean;\n\n /**\n * Hides the selection cell visually but takes up the same space\n * @default false\n */\n invisible?: boolean;\n};\n\n/**\n * State used in rendering TableSelectionCell\n */\nexport type TableSelectionCellState = ComponentState<TableSelectionCellSlots> &\n Pick<Required<TableSelectionCellProps>, 'type' | 'checked' | 'subtle'> &\n Pick<TableContextValue, 'noNativeElements'> & {\n /* Visually hides the selection cell; not deprecated on state */\n hidden: boolean;\n };\n"],"names":[],"rangeMappings":";;","mappings":"AAmDA;;CAEC,GACD,WAKI"}
1
+ {"version":3,"sources":["../src/components/TableSelectionCell/TableSelectionCell.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { Checkbox, CheckboxProps } from '@fluentui/react-checkbox';\nimport type { Radio } from '@fluentui/react-radio';\nimport { TableCellSlots } from '../TableCell/TableCell.types';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableSelectionCellSlots = {\n /**\n * Selection indicator if selection type is checkbox\n */\n checkboxIndicator: Slot<typeof Checkbox>;\n /**\n * Selection indicator if selection type is radio\n */\n radioIndicator: Slot<typeof Radio>;\n} & Pick<TableCellSlots, 'root'>;\n\n/**\n * TableSelectionCell Props\n */\nexport type TableSelectionCellProps = ComponentProps<Partial<TableSelectionCellSlots>> & {\n /**\n * A table can have two kinds of selection modes.\n * @default checkbox\n */\n type?: 'checkbox' | 'radio';\n\n /**\n * @default false\n */\n checked?: CheckboxProps['checked'];\n\n /**\n * Only visible when checked or the parent row is hovered/focused\n * @default false\n */\n subtle?: boolean;\n\n /**\n * Completely hides the selection cell\n * @deprecated cells should never use hidden, since doing so breaks table structure and screen reader navigation. Use `invisible` instead.\n */\n hidden?: boolean;\n\n /**\n * Hides the selection cell visually but takes up the same space\n * @default false\n */\n invisible?: boolean;\n};\n\n/**\n * State used in rendering TableSelectionCell\n */\nexport type TableSelectionCellState = ComponentState<TableSelectionCellSlots> &\n Pick<Required<TableSelectionCellProps>, 'type' | 'checked' | 'subtle'> &\n Pick<TableContextValue, 'noNativeElements'> & {\n /* Visually hides the selection cell; not deprecated on state */\n hidden: boolean;\n };\n"],"names":[],"rangeMappings":";;","mappings":"AAmDA;;CAEC,GACD,WAKI"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './TableSelectionCell';\nexport * from './TableSelectionCell.types';\nexport * from './renderTableSelectionCell';\nexport * from './useTableSelectionCell';\nexport * from './useTableSelectionCellStyles.styles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,uBAAuB;AACrC,cAAc,6BAA6B;AAC3C,cAAc,6BAA6B;AAC3C,cAAc,0BAA0B;AACxC,cAAc,uCAAuC"}
1
+ {"version":3,"sources":["../src/components/TableSelectionCell/index.ts"],"sourcesContent":["export * from './TableSelectionCell';\nexport * from './TableSelectionCell.types';\nexport * from './renderTableSelectionCell';\nexport * from './useTableSelectionCell';\nexport * from './useTableSelectionCellStyles.styles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,uBAAuB;AACrC,cAAc,6BAA6B;AAC3C,cAAc,6BAA6B;AAC3C,cAAc,0BAA0B;AACxC,cAAc,uCAAuC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["renderTableSelectionCell.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TableSelectionCellState, TableSelectionCellSlots } from './TableSelectionCell.types';\n\n/**\n * Render the final JSX of TableSelectionCell\n */\nexport const renderTableSelectionCell_unstable = (state: TableSelectionCellState) => {\n assertSlots<TableSelectionCellSlots>(state);\n\n return (\n <state.root>\n {state.type === 'checkbox' && state.checkboxIndicator && <state.checkboxIndicator />}\n\n {state.type === 'radio' && state.radioIndicator && <state.radioIndicator />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderTableSelectionCell_unstable","state","root","type","checkboxIndicator","radioIndicator"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,oCAAoC,CAACC;IAChDF,YAAqCE;IAErC,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,IAAI,KAAK,cAAcF,MAAMG,iBAAiB,kBAAI,KAACH,MAAMG,iBAAiB;YAEhFH,MAAME,IAAI,KAAK,WAAWF,MAAMI,cAAc,kBAAI,KAACJ,MAAMI,cAAc;;;AAG9E,EAAE"}
1
+ {"version":3,"sources":["../src/components/TableSelectionCell/renderTableSelectionCell.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TableSelectionCellState, TableSelectionCellSlots } from './TableSelectionCell.types';\n\n/**\n * Render the final JSX of TableSelectionCell\n */\nexport const renderTableSelectionCell_unstable = (state: TableSelectionCellState) => {\n assertSlots<TableSelectionCellSlots>(state);\n\n return (\n <state.root>\n {state.type === 'checkbox' && state.checkboxIndicator && <state.checkboxIndicator />}\n\n {state.type === 'radio' && state.radioIndicator && <state.radioIndicator />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderTableSelectionCell_unstable","state","root","type","checkboxIndicator","radioIndicator"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AACjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,oCAAoC,CAACC;IAChDF,YAAqCE;IAErC,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,IAAI,KAAK,cAAcF,MAAMG,iBAAiB,kBAAI,KAACH,MAAMG,iBAAiB;YAEhFH,MAAME,IAAI,KAAK,WAAWF,MAAMI,cAAc,kBAAI,KAACJ,MAAMI,cAAc;;;AAG9E,EAAE"}
@@ -1,9 +1,10 @@
1
1
  import * as React from 'react';
2
- import { useId, slot } from '@fluentui/react-utilities';
2
+ import { useId, slot, useMergedRefs } from '@fluentui/react-utilities';
3
3
  import { Checkbox } from '@fluentui/react-checkbox';
4
4
  import { Radio } from '@fluentui/react-radio';
5
5
  import { useTableCell_unstable } from '../TableCell/useTableCell';
6
6
  import { useTableContext } from '../../contexts/tableContext';
7
+ import { useFocusWithin } from '@fluentui/react-tabster';
7
8
  /**
8
9
  * Create the state required to render TableSelectionCell.
9
10
  *
@@ -13,7 +14,7 @@ import { useTableContext } from '../../contexts/tableContext';
13
14
  * @param props - props from this instance of TableSelectionCell
14
15
  * @param ref - reference to root HTMLElement of TableSelectionCell
15
16
  */ export const useTableSelectionCell_unstable = (props, ref)=>{
16
- const tableCellState = useTableCell_unstable(props, ref);
17
+ const tableCellState = useTableCell_unstable(props, useMergedRefs(ref, useFocusWithin()));
17
18
  const { noNativeElements } = useTableContext();
18
19
  const { type = 'checkbox', checked = false, subtle = false, // eslint-disable-next-line deprecation/deprecation
19
20
  hidden = false, invisible = false } = props;
@@ -1 +1 @@
1
- {"version":3,"sources":["useTableSelectionCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useId, slot } from '@fluentui/react-utilities';\nimport { Checkbox } from '@fluentui/react-checkbox';\nimport { Radio } from '@fluentui/react-radio';\nimport type { TableSelectionCellProps, TableSelectionCellState } from './TableSelectionCell.types';\nimport { useTableCell_unstable } from '../TableCell/useTableCell';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableSelectionCell.\n *\n * The returned state can be modified with hooks such as useTableSelectionCellStyles_unstable,\n * before being passed to renderTableSelectionCell_unstable.\n *\n * @param props - props from this instance of TableSelectionCell\n * @param ref - reference to root HTMLElement of TableSelectionCell\n */\nexport const useTableSelectionCell_unstable = (\n props: TableSelectionCellProps,\n ref: React.Ref<HTMLElement>,\n): TableSelectionCellState => {\n const tableCellState = useTableCell_unstable(props, ref);\n const { noNativeElements } = useTableContext();\n const {\n type = 'checkbox',\n checked = false,\n subtle = false,\n // eslint-disable-next-line deprecation/deprecation\n hidden = false,\n invisible = false,\n } = props;\n\n return {\n ...tableCellState,\n components: {\n ...tableCellState.components,\n checkboxIndicator: Checkbox,\n radioIndicator: Radio,\n },\n checkboxIndicator: slot.optional(props.checkboxIndicator, {\n renderByDefault: type === 'checkbox',\n defaultProps: { checked: props.checked },\n elementType: Checkbox,\n }),\n radioIndicator: slot.optional(props.radioIndicator, {\n renderByDefault: type === 'radio',\n defaultProps: { checked: !!checked, input: { name: useId('table-selection-radio') } },\n elementType: Radio,\n }),\n type,\n checked,\n noNativeElements,\n subtle,\n hidden: invisible || hidden,\n };\n};\n"],"names":["React","useId","slot","Checkbox","Radio","useTableCell_unstable","useTableContext","useTableSelectionCell_unstable","props","ref","tableCellState","noNativeElements","type","checked","subtle","hidden","invisible","components","checkboxIndicator","radioIndicator","optional","renderByDefault","defaultProps","elementType","input","name"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,KAAK,EAAEC,IAAI,QAAQ,4BAA4B;AACxD,SAASC,QAAQ,QAAQ,2BAA2B;AACpD,SAASC,KAAK,QAAQ,wBAAwB;AAE9C,SAASC,qBAAqB,QAAQ,4BAA4B;AAClE,SAASC,eAAe,QAAQ,8BAA8B;AAE9D;;;;;;;;CAQC,GACD,OAAO,MAAMC,iCAAiC,CAC5CC,OACAC;IAEA,MAAMC,iBAAiBL,sBAAsBG,OAAOC;IACpD,MAAM,EAAEE,gBAAgB,EAAE,GAAGL;IAC7B,MAAM,EACJM,OAAO,UAAU,EACjBC,UAAU,KAAK,EACfC,SAAS,KAAK,EACd,mDAAmD;IACnDC,SAAS,KAAK,EACdC,YAAY,KAAK,EAClB,GAAGR;IAEJ,OAAO;QACL,GAAGE,cAAc;QACjBO,YAAY;YACV,GAAGP,eAAeO,UAAU;YAC5BC,mBAAmBf;YACnBgB,gBAAgBf;QAClB;QACAc,mBAAmBhB,KAAKkB,QAAQ,CAACZ,MAAMU,iBAAiB,EAAE;YACxDG,iBAAiBT,SAAS;YAC1BU,cAAc;gBAAET,SAASL,MAAMK,OAAO;YAAC;YACvCU,aAAapB;QACf;QACAgB,gBAAgBjB,KAAKkB,QAAQ,CAACZ,MAAMW,cAAc,EAAE;YAClDE,iBAAiBT,SAAS;YAC1BU,cAAc;gBAAET,SAAS,CAAC,CAACA;gBAASW,OAAO;oBAAEC,MAAMxB,MAAM;gBAAyB;YAAE;YACpFsB,aAAanB;QACf;QACAQ;QACAC;QACAF;QACAG;QACAC,QAAQC,aAAaD;IACvB;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/TableSelectionCell/useTableSelectionCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useId, slot, useMergedRefs } from '@fluentui/react-utilities';\nimport { Checkbox } from '@fluentui/react-checkbox';\nimport { Radio } from '@fluentui/react-radio';\nimport type { TableSelectionCellProps, TableSelectionCellState } from './TableSelectionCell.types';\nimport { useTableCell_unstable } from '../TableCell/useTableCell';\nimport { useTableContext } from '../../contexts/tableContext';\nimport { useFocusWithin } from '@fluentui/react-tabster';\n\n/**\n * Create the state required to render TableSelectionCell.\n *\n * The returned state can be modified with hooks such as useTableSelectionCellStyles_unstable,\n * before being passed to renderTableSelectionCell_unstable.\n *\n * @param props - props from this instance of TableSelectionCell\n * @param ref - reference to root HTMLElement of TableSelectionCell\n */\nexport const useTableSelectionCell_unstable = (\n props: TableSelectionCellProps,\n ref: React.Ref<HTMLElement>,\n): TableSelectionCellState => {\n const tableCellState = useTableCell_unstable(props, useMergedRefs(ref, useFocusWithin()));\n const { noNativeElements } = useTableContext();\n const {\n type = 'checkbox',\n checked = false,\n subtle = false,\n // eslint-disable-next-line deprecation/deprecation\n hidden = false,\n invisible = false,\n } = props;\n\n return {\n ...tableCellState,\n components: {\n ...tableCellState.components,\n checkboxIndicator: Checkbox,\n radioIndicator: Radio,\n },\n checkboxIndicator: slot.optional(props.checkboxIndicator, {\n renderByDefault: type === 'checkbox',\n defaultProps: { checked: props.checked },\n elementType: Checkbox,\n }),\n radioIndicator: slot.optional(props.radioIndicator, {\n renderByDefault: type === 'radio',\n defaultProps: { checked: !!checked, input: { name: useId('table-selection-radio') } },\n elementType: Radio,\n }),\n type,\n checked,\n noNativeElements,\n subtle,\n hidden: invisible || hidden,\n };\n};\n"],"names":["React","useId","slot","useMergedRefs","Checkbox","Radio","useTableCell_unstable","useTableContext","useFocusWithin","useTableSelectionCell_unstable","props","ref","tableCellState","noNativeElements","type","checked","subtle","hidden","invisible","components","checkboxIndicator","radioIndicator","optional","renderByDefault","defaultProps","elementType","input","name"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,KAAK,EAAEC,IAAI,EAAEC,aAAa,QAAQ,4BAA4B;AACvE,SAASC,QAAQ,QAAQ,2BAA2B;AACpD,SAASC,KAAK,QAAQ,wBAAwB;AAE9C,SAASC,qBAAqB,QAAQ,4BAA4B;AAClE,SAASC,eAAe,QAAQ,8BAA8B;AAC9D,SAASC,cAAc,QAAQ,0BAA0B;AAEzD;;;;;;;;CAQC,GACD,OAAO,MAAMC,iCAAiC,CAC5CC,OACAC;IAEA,MAAMC,iBAAiBN,sBAAsBI,OAAOP,cAAcQ,KAAKH;IACvE,MAAM,EAAEK,gBAAgB,EAAE,GAAGN;IAC7B,MAAM,EACJO,OAAO,UAAU,EACjBC,UAAU,KAAK,EACfC,SAAS,KAAK,EACd,mDAAmD;IACnDC,SAAS,KAAK,EACdC,YAAY,KAAK,EAClB,GAAGR;IAEJ,OAAO;QACL,GAAGE,cAAc;QACjBO,YAAY;YACV,GAAGP,eAAeO,UAAU;YAC5BC,mBAAmBhB;YACnBiB,gBAAgBhB;QAClB;QACAe,mBAAmBlB,KAAKoB,QAAQ,CAACZ,MAAMU,iBAAiB,EAAE;YACxDG,iBAAiBT,SAAS;YAC1BU,cAAc;gBAAET,SAASL,MAAMK,OAAO;YAAC;YACvCU,aAAarB;QACf;QACAiB,gBAAgBnB,KAAKoB,QAAQ,CAACZ,MAAMW,cAAc,EAAE;YAClDE,iBAAiBT,SAAS;YAC1BU,cAAc;gBAAET,SAAS,CAAC,CAACA;gBAASW,OAAO;oBAAEC,MAAM1B,MAAM;gBAAyB;YAAE;YACpFwB,aAAapB;QACf;QACAS;QACAC;QACAF;QACAG;QACAC,QAAQC,aAAaD;IACvB;AACF,EAAE"}
@@ -94,5 +94,4 @@ export const useTableSelectionCellStyles_unstable = state => {
94
94
  state.radioIndicator.className = mergeClasses(tableSelectionCellClassNames.radioIndicator, styles.radioIndicator, state.radioIndicator.className);
95
95
  }
96
96
  return state;
97
- };
98
- //# sourceMappingURL=useTableSelectionCellStyles.styles.js.map
97
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["columnIdContext.ts"],"sourcesContent":["import * as React from 'react';\nimport type { TableColumnId } from '../hooks/';\n\nconst columnIdContext = React.createContext<TableColumnId | undefined>(undefined);\n\nexport const columnIdContextDefaultValue = '';\n\nexport const useColumnIdContext = () => React.useContext(columnIdContext) ?? columnIdContextDefaultValue;\n\nexport const ColumnIdContextProvider = columnIdContext.Provider;\n"],"names":["React","columnIdContext","createContext","undefined","columnIdContextDefaultValue","useColumnIdContext","useContext","ColumnIdContextProvider","Provider"],"rangeMappings":";;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,MAAMC,kBAAkBD,MAAME,aAAa,CAA4BC;AAEvE,OAAO,MAAMC,8BAA8B,GAAG;AAE9C,OAAO,MAAMC,qBAAqB;QAAML;WAAAA,CAAAA,oBAAAA,MAAMM,UAAU,CAACL,8BAAjBD,+BAAAA,oBAAqCI;AAA0B,EAAE;AAEzG,OAAO,MAAMG,0BAA0BN,gBAAgBO,QAAQ,CAAC"}
1
+ {"version":3,"sources":["../src/contexts/columnIdContext.ts"],"sourcesContent":["import * as React from 'react';\nimport type { TableColumnId } from '../hooks/';\n\nconst columnIdContext = React.createContext<TableColumnId | undefined>(undefined);\n\nexport const columnIdContextDefaultValue = '';\n\nexport const useColumnIdContext = () => React.useContext(columnIdContext) ?? columnIdContextDefaultValue;\n\nexport const ColumnIdContextProvider = columnIdContext.Provider;\n"],"names":["React","columnIdContext","createContext","undefined","columnIdContextDefaultValue","useColumnIdContext","useContext","ColumnIdContextProvider","Provider"],"rangeMappings":";;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,MAAMC,kBAAkBD,MAAME,aAAa,CAA4BC;AAEvE,OAAO,MAAMC,8BAA8B,GAAG;AAE9C,OAAO,MAAMC,qBAAqB;QAAML;WAAAA,CAAAA,oBAAAA,MAAMM,UAAU,CAACL,8BAAjBD,+BAAAA,oBAAqCI;AAA0B,EAAE;AAEzG,OAAO,MAAMG,0BAA0BN,gBAAgBO,QAAQ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["dataGridContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { ContextSelector } from '@fluentui/react-context-selector';\nimport { TabsterDOMAttribute } from '@fluentui/react-tabster';\nimport { DataGridContextValue } from '../components/DataGrid/DataGrid.types';\nimport { defaultTableState } from '../hooks';\n\nconst dataGridContext = createContext<DataGridContextValue | undefined>(undefined);\n\nexport const dataGridContextDefaultValue: DataGridContextValue = {\n ...defaultTableState,\n subtleSelection: false,\n selectableRows: false,\n selectionAppearance: 'brand',\n focusMode: 'none',\n compositeRowTabsterAttribute: {} as TabsterDOMAttribute,\n};\n\nexport const DataGridContextProvider = dataGridContext.Provider;\n\nexport const useDataGridContext_unstable = <T>(selector: ContextSelector<DataGridContextValue, T>) =>\n useContextSelector(dataGridContext, (ctx = dataGridContextDefaultValue) => selector(ctx));\n"],"names":["createContext","useContextSelector","defaultTableState","dataGridContext","undefined","dataGridContextDefaultValue","subtleSelection","selectableRows","selectionAppearance","focusMode","compositeRowTabsterAttribute","DataGridContextProvider","Provider","useDataGridContext_unstable","selector","ctx"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAAA,SAASA,aAAa,EAAEC,kBAAkB,QAAQ,mCAAmC;AAIrF,SAASC,iBAAiB,QAAQ,WAAW;AAE7C,MAAMC,kBAAkBH,cAAgDI;AAExE,OAAO,MAAMC,8BAAoD;IAC/D,GAAGH,iBAAiB;IACpBI,iBAAiB;IACjBC,gBAAgB;IAChBC,qBAAqB;IACrBC,WAAW;IACXC,8BAA8B,CAAC;AACjC,EAAE;AAEF,OAAO,MAAMC,0BAA0BR,gBAAgBS,QAAQ,CAAC;AAEhE,OAAO,MAAMC,8BAA8B,CAAIC,WAC7Cb,mBAAmBE,iBAAiB,CAACY,MAAMV,2BAA2B,GAAKS,SAASC,MAAM"}
1
+ {"version":3,"sources":["../src/contexts/dataGridContext.ts"],"sourcesContent":["import { createContext, useContextSelector } from '@fluentui/react-context-selector';\nimport type { ContextSelector } from '@fluentui/react-context-selector';\nimport { TabsterDOMAttribute } from '@fluentui/react-tabster';\nimport { DataGridContextValue } from '../components/DataGrid/DataGrid.types';\nimport { defaultTableState } from '../hooks';\n\nconst dataGridContext = createContext<DataGridContextValue | undefined>(undefined);\n\nexport const dataGridContextDefaultValue: DataGridContextValue = {\n ...defaultTableState,\n subtleSelection: false,\n selectableRows: false,\n selectionAppearance: 'brand',\n focusMode: 'none',\n compositeRowTabsterAttribute: {} as TabsterDOMAttribute,\n};\n\nexport const DataGridContextProvider = dataGridContext.Provider;\n\nexport const useDataGridContext_unstable = <T>(selector: ContextSelector<DataGridContextValue, T>) =>\n useContextSelector(dataGridContext, (ctx = dataGridContextDefaultValue) => selector(ctx));\n"],"names":["createContext","useContextSelector","defaultTableState","dataGridContext","undefined","dataGridContextDefaultValue","subtleSelection","selectableRows","selectionAppearance","focusMode","compositeRowTabsterAttribute","DataGridContextProvider","Provider","useDataGridContext_unstable","selector","ctx"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAAA,SAASA,aAAa,EAAEC,kBAAkB,QAAQ,mCAAmC;AAIrF,SAASC,iBAAiB,QAAQ,WAAW;AAE7C,MAAMC,kBAAkBH,cAAgDI;AAExE,OAAO,MAAMC,8BAAoD;IAC/D,GAAGH,iBAAiB;IACpBI,iBAAiB;IACjBC,gBAAgB;IAChBC,qBAAqB;IACrBC,WAAW;IACXC,8BAA8B,CAAC;AACjC,EAAE;AAEF,OAAO,MAAMC,0BAA0BR,gBAAgBS,QAAQ,CAAC;AAEhE,OAAO,MAAMC,8BAA8B,CAAIC,WAC7Cb,mBAAmBE,iBAAiB,CAACY,MAAMV,2BAA2B,GAAKS,SAASC,MAAM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["rowIdContext.ts"],"sourcesContent":["import * as React from 'react';\nimport type { TableRowId } from '../hooks/';\n\nconst rowIdContext = React.createContext<TableRowId | undefined>(undefined);\n\nexport const tableRowIdContextDefaultValue = '';\n\nexport const useTableRowIdContext = () => React.useContext(rowIdContext) ?? tableRowIdContextDefaultValue;\n\nexport const TableRowIdContextProvider = rowIdContext.Provider;\n"],"names":["React","rowIdContext","createContext","undefined","tableRowIdContextDefaultValue","useTableRowIdContext","useContext","TableRowIdContextProvider","Provider"],"rangeMappings":";;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,MAAMC,eAAeD,MAAME,aAAa,CAAyBC;AAEjE,OAAO,MAAMC,gCAAgC,GAAG;AAEhD,OAAO,MAAMC,uBAAuB;QAAML;WAAAA,CAAAA,oBAAAA,MAAMM,UAAU,CAACL,2BAAjBD,+BAAAA,oBAAkCI;AAA4B,EAAE;AAE1G,OAAO,MAAMG,4BAA4BN,aAAaO,QAAQ,CAAC"}
1
+ {"version":3,"sources":["../src/contexts/rowIdContext.ts"],"sourcesContent":["import * as React from 'react';\nimport type { TableRowId } from '../hooks/';\n\nconst rowIdContext = React.createContext<TableRowId | undefined>(undefined);\n\nexport const tableRowIdContextDefaultValue = '';\n\nexport const useTableRowIdContext = () => React.useContext(rowIdContext) ?? tableRowIdContextDefaultValue;\n\nexport const TableRowIdContextProvider = rowIdContext.Provider;\n"],"names":["React","rowIdContext","createContext","undefined","tableRowIdContextDefaultValue","useTableRowIdContext","useContext","TableRowIdContextProvider","Provider"],"rangeMappings":";;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,MAAMC,eAAeD,MAAME,aAAa,CAAyBC;AAEjE,OAAO,MAAMC,gCAAgC,GAAG;AAEhD,OAAO,MAAMC,uBAAuB;QAAML;WAAAA,CAAAA,oBAAAA,MAAMM,UAAU,CAACL,2BAAjBD,+BAAAA,oBAAkCI;AAA4B,EAAE;AAE1G,OAAO,MAAMG,4BAA4BN,aAAaO,QAAQ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["tableContext.ts"],"sourcesContent":["import * as React from 'react';\nimport { TableContextValue } from '../components/Table/Table.types';\n\nconst tableContext = React.createContext<TableContextValue | undefined>(undefined);\n\nexport const tableContextDefaultValue: TableContextValue = {\n size: 'medium',\n noNativeElements: false,\n sortable: false,\n};\n\nexport const TableContextProvider = tableContext.Provider;\nexport const useTableContext = () => React.useContext(tableContext) ?? tableContextDefaultValue;\n"],"names":["React","tableContext","createContext","undefined","tableContextDefaultValue","size","noNativeElements","sortable","TableContextProvider","Provider","useTableContext","useContext"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,MAAMC,eAAeD,MAAME,aAAa,CAAgCC;AAExE,OAAO,MAAMC,2BAA8C;IACzDC,MAAM;IACNC,kBAAkB;IAClBC,UAAU;AACZ,EAAE;AAEF,OAAO,MAAMC,uBAAuBP,aAAaQ,QAAQ,CAAC;AAC1D,OAAO,MAAMC,kBAAkB;QAAMV;WAAAA,CAAAA,oBAAAA,MAAMW,UAAU,CAACV,2BAAjBD,+BAAAA,oBAAkCI;AAAuB,EAAE"}
1
+ {"version":3,"sources":["../src/contexts/tableContext.ts"],"sourcesContent":["import * as React from 'react';\nimport { TableContextValue } from '../components/Table/Table.types';\n\nconst tableContext = React.createContext<TableContextValue | undefined>(undefined);\n\nexport const tableContextDefaultValue: TableContextValue = {\n size: 'medium',\n noNativeElements: false,\n sortable: false,\n};\n\nexport const TableContextProvider = tableContext.Provider;\nexport const useTableContext = () => React.useContext(tableContext) ?? tableContextDefaultValue;\n"],"names":["React","tableContext","createContext","undefined","tableContextDefaultValue","size","noNativeElements","sortable","TableContextProvider","Provider","useTableContext","useContext"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,MAAMC,eAAeD,MAAME,aAAa,CAAgCC;AAExE,OAAO,MAAMC,2BAA8C;IACzDC,MAAM;IACNC,kBAAkB;IAClBC,UAAU;AACZ,EAAE;AAEF,OAAO,MAAMC,uBAAuBP,aAAaQ,QAAQ,CAAC;AAC1D,OAAO,MAAMC,kBAAkB;QAAMV;WAAAA,CAAAA,oBAAAA,MAAMW,UAAU,CAACV,2BAAjBD,+BAAAA,oBAAkCI;AAAuB,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["tableHeaderContext.ts"],"sourcesContent":["import * as React from 'react';\n\nconst tableHeaderContext = React.createContext<string | undefined>(undefined);\n\nconst tableHeaderContextDefaultValue = '';\n\nexport const TableHeaderContextProvider = tableHeaderContext.Provider;\nexport const useIsInTableHeader = () => React.useContext(tableHeaderContext) === tableHeaderContextDefaultValue;\n"],"names":["React","tableHeaderContext","createContext","undefined","tableHeaderContextDefaultValue","TableHeaderContextProvider","Provider","useIsInTableHeader","useContext"],"rangeMappings":";;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,MAAMC,qBAAqBD,MAAME,aAAa,CAAqBC;AAEnE,MAAMC,iCAAiC;AAEvC,OAAO,MAAMC,6BAA6BJ,mBAAmBK,QAAQ,CAAC;AACtE,OAAO,MAAMC,qBAAqB,IAAMP,MAAMQ,UAAU,CAACP,wBAAwBG,+BAA+B"}
1
+ {"version":3,"sources":["../src/contexts/tableHeaderContext.ts"],"sourcesContent":["import * as React from 'react';\n\nconst tableHeaderContext = React.createContext<string | undefined>(undefined);\n\nconst tableHeaderContextDefaultValue = '';\n\nexport const TableHeaderContextProvider = tableHeaderContext.Provider;\nexport const useIsInTableHeader = () => React.useContext(tableHeaderContext) === tableHeaderContextDefaultValue;\n"],"names":["React","tableHeaderContext","createContext","undefined","tableHeaderContextDefaultValue","TableHeaderContextProvider","Provider","useIsInTableHeader","useContext"],"rangeMappings":";;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,MAAMC,qBAAqBD,MAAME,aAAa,CAAqBC;AAEnE,MAAMC,iCAAiC;AAEvC,OAAO,MAAMC,6BAA6BJ,mBAAmBK,QAAQ,CAAC;AACtE,OAAO,MAAMC,qBAAqB,IAAMP,MAAMQ,UAAU,CAACP,wBAAwBG,+BAA+B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["createColumn.ts"],"sourcesContent":["import { CreateTableColumnOptions } from './types';\n\nconst defaultCompare = () => 0;\n\nconst defaultRenderCell = () => {\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn('@fluentui/react-table: You are using the default column renderCell function that renders null');\n }\n\n return null;\n};\n\nconst defaultRenderHeaderCell = () => {\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn('@fluentui/react-table: You are using the default column renderHeaderCell function that renders null');\n }\n\n return null;\n};\n\n/**\n * Helper function to create column definition with defaults\n * @param options - column definition options\n * @returns - column definition with defaults\n */\nexport function createTableColumn<TItem>(options: CreateTableColumnOptions<TItem>) {\n const {\n columnId,\n renderCell = defaultRenderCell,\n renderHeaderCell = defaultRenderHeaderCell,\n compare = defaultCompare,\n } = options;\n\n return {\n columnId,\n renderCell,\n renderHeaderCell,\n compare,\n };\n}\n"],"names":["defaultCompare","defaultRenderCell","process","env","NODE_ENV","console","warn","defaultRenderHeaderCell","createTableColumn","options","columnId","renderCell","renderHeaderCell","compare"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,MAAMA,iBAAiB,IAAM;AAE7B,MAAMC,oBAAoB;IACxB,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,sCAAsC;QACtCC,QAAQC,IAAI,CAAC;IACf;IAEA,OAAO;AACT;AAEA,MAAMC,0BAA0B;IAC9B,IAAIL,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,sCAAsC;QACtCC,QAAQC,IAAI,CAAC;IACf;IAEA,OAAO;AACT;AAEA;;;;CAIC,GACD,OAAO,SAASE,kBAAyBC,OAAwC;IAC/E,MAAM,EACJC,QAAQ,EACRC,aAAaV,iBAAiB,EAC9BW,mBAAmBL,uBAAuB,EAC1CM,UAAUb,cAAc,EACzB,GAAGS;IAEJ,OAAO;QACLC;QACAC;QACAC;QACAC;IACF;AACF"}
1
+ {"version":3,"sources":["../src/hooks/createColumn.ts"],"sourcesContent":["import { CreateTableColumnOptions } from './types';\n\nconst defaultCompare = () => 0;\n\nconst defaultRenderCell = () => {\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn('@fluentui/react-table: You are using the default column renderCell function that renders null');\n }\n\n return null;\n};\n\nconst defaultRenderHeaderCell = () => {\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn('@fluentui/react-table: You are using the default column renderHeaderCell function that renders null');\n }\n\n return null;\n};\n\n/**\n * Helper function to create column definition with defaults\n * @param options - column definition options\n * @returns - column definition with defaults\n */\nexport function createTableColumn<TItem>(options: CreateTableColumnOptions<TItem>) {\n const {\n columnId,\n renderCell = defaultRenderCell,\n renderHeaderCell = defaultRenderHeaderCell,\n compare = defaultCompare,\n } = options;\n\n return {\n columnId,\n renderCell,\n renderHeaderCell,\n compare,\n };\n}\n"],"names":["defaultCompare","defaultRenderCell","process","env","NODE_ENV","console","warn","defaultRenderHeaderCell","createTableColumn","options","columnId","renderCell","renderHeaderCell","compare"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAEA,MAAMA,iBAAiB,IAAM;AAE7B,MAAMC,oBAAoB;IACxB,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,sCAAsC;QACtCC,QAAQC,IAAI,CAAC;IACf;IAEA,OAAO;AACT;AAEA,MAAMC,0BAA0B;IAC9B,IAAIL,QAAQC,GAAG,CAACC,QAAQ,KAAK,cAAc;QACzC,sCAAsC;QACtCC,QAAQC,IAAI,CAAC;IACf;IAEA,OAAO;AACT;AAEA;;;;CAIC,GACD,OAAO,SAASE,kBAAyBC,OAAwC;IAC/E,MAAM,EACJC,QAAQ,EACRC,aAAaV,iBAAiB,EAC9BW,mBAAmBL,uBAAuB,EAC1CM,UAAUb,cAAc,EACzB,GAAGS;IAEJ,OAAO;QACLC;QACAC;QACAC;QACAC;IACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './types';\nexport * from './useTableFeatures';\nexport * from './useTableSort';\nexport * from './useTableSelection';\nexport * from './createColumn';\nexport * from './useTableColumnSizing';\nexport * from './useTableCompositeNavigation';\n"],"names":[],"rangeMappings":";;;;;;","mappings":"AAAA,cAAc,UAAU;AACxB,cAAc,qBAAqB;AACnC,cAAc,iBAAiB;AAC/B,cAAc,sBAAsB;AACpC,cAAc,iBAAiB;AAC/B,cAAc,yBAAyB;AACvC,cAAc,gCAAgC"}
1
+ {"version":3,"sources":["../src/hooks/index.ts"],"sourcesContent":["export * from './types';\nexport * from './useTableFeatures';\nexport * from './useTableSort';\nexport * from './useTableSelection';\nexport * from './createColumn';\nexport * from './useTableColumnSizing';\nexport * from './useTableCompositeNavigation';\n"],"names":[],"rangeMappings":";;;;;;","mappings":"AAAA,cAAc,UAAU;AACxB,cAAc,qBAAqB;AACnC,cAAc,iBAAiB;AAC/B,cAAc,sBAAsB;AACpC,cAAc,iBAAiB;AAC/B,cAAc,yBAAyB;AACvC,cAAc,gCAAgC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["types.ts"],"sourcesContent":["import * as React from 'react';\nimport { SortDirection, TableProps } from '../components/Table/Table.types';\nimport { TableHeaderCellProps } from '../components/TableHeaderCell/TableHeaderCell.types';\nimport { SelectionMode } from '@fluentui/react-utilities';\n\nexport type TableRowId = string | number;\nexport type TableColumnId = string | number;\n\nexport interface SortState {\n sortColumn: TableColumnId | undefined;\n sortDirection: SortDirection;\n}\n\nexport interface OnSelectionChangeData {\n selectedItems: Set<TableRowId>;\n}\n\nexport interface CreateTableColumnOptions<TItem> extends Partial<TableColumnDefinition<TItem>> {\n columnId: TableColumnId;\n}\n\nexport interface TableColumnDefinition<TItem> {\n columnId: TableColumnId;\n compare: (a: TItem, b: TItem) => number;\n renderHeaderCell: (data?: unknown) => React.ReactNode;\n renderCell: (item: TItem) => React.ReactNode;\n}\n\nexport type RowEnhancer<TItem, TRowState extends TableRowData<TItem> = TableRowData<TItem>> = (\n row: TableRowData<TItem>,\n) => TRowState;\n\nexport interface TableSortState<TItem> {\n /**\n * Current sort direction\n */\n sortDirection: SortDirection;\n /**\n * Column id of the currently sorted column\n */\n sortColumn: TableColumnId | undefined;\n /**\n * Set the sort direction for the specified column\n */\n setColumnSort: (event: React.SyntheticEvent, columnId: TableColumnId, sortDirection: SortDirection) => void;\n /**\n * Toggles the sort direction for specified column\n */\n toggleColumnSort: (event: React.SyntheticEvent, columnId: TableColumnId) => void;\n /**\n * Returns the sort direction if a column is sorted,\n * returns undefined if the column is not sorted\n */\n getSortDirection: (columnId: TableColumnId) => SortDirection | undefined;\n\n /**\n * Sorts rows and returns a **shallow** copy of original items\n */\n sort: <TRowState extends TableRowData<TItem>>(rows: TRowState[]) => TRowState[];\n}\n\nexport interface TableSelectionState {\n /**\n * Clears all selected rows\n */\n clearRows: (e: React.SyntheticEvent) => void;\n /**\n * Selects single row\n */\n selectRow: (e: React.SyntheticEvent, rowId: TableRowId) => void;\n /**\n * De-selects single row\n */\n deselectRow: (e: React.SyntheticEvent, rowId: TableRowId) => void;\n /**\n * Toggle selection of all rows\n */\n toggleAllRows: (e: React.SyntheticEvent) => void;\n /**\n * Toggle selection of single row\n */\n toggleRow: (e: React.SyntheticEvent, rowId: TableRowId) => void;\n /**\n * Collection of row ids corresponding to selected rows\n */\n selectedRows: Set<TableRowId>;\n /**\n * Whether all rows are selected\n */\n allRowsSelected: boolean;\n /**\n * Whether some rows are selected\n */\n someRowsSelected: boolean;\n\n /**\n * Checks if a given rowId is selected\n */\n isRowSelected: (rowId: TableRowId) => boolean;\n\n selectionMode: SelectionMode;\n}\n\nexport interface TableRowData<TItem> {\n /**\n * User provided data\n */\n item: TItem;\n /**\n * The row id, defaults to index position in the collection\n */\n rowId: TableRowId;\n}\n\nexport interface TableFeaturesState<TItem> extends Pick<UseTableFeaturesOptions<TItem>, 'items' | 'getRowId'> {\n /**\n * The row data for rendering\n * @param rowEnhancer - Enhances the row with extra user data\n */\n getRows: <TRowState extends TableRowData<TItem> = TableRowData<TItem>>(\n rowEnhancer?: RowEnhancer<TItem, TRowState>,\n ) => TRowState[];\n\n /**\n * State and actions to manage row selection\n */\n selection: TableSelectionState;\n /**\n * State and actions to manage row sorting\n */\n sort: TableSortState<TItem>;\n /**\n * Table columns\n */\n columns: TableColumnDefinition<TItem>[];\n /**\n * State and actions to manage column resizing\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n columnSizing_unstable: TableColumnSizingState;\n /**\n * A React.Ref object to be set as a ref for the table.\n * Used with column resizing.\n */\n tableRef: React.Ref<HTMLDivElement>;\n}\n\nexport interface UseTableSortOptions {\n /**\n * Used to control sorting\n */\n sortState?: SortState;\n /**\n * Used in uncontrolled mode to set initial sort column and direction on mount\n */\n defaultSortState?: SortState;\n /**\n * Called when sort changes\n */\n onSortChange?(e: React.SyntheticEvent, state: SortState): void;\n}\n\nexport interface UseTableFeaturesOptions<TItem> {\n columns: TableColumnDefinition<TItem>[];\n items: TItem[];\n getRowId?: (item: TItem) => TableRowId;\n}\n\nexport type TableFeaturePlugin = <TItem>(tableState: TableFeaturesState<TItem>) => TableFeaturesState<TItem>;\n\nexport interface ColumnWidthState {\n columnId: TableColumnId;\n width: number;\n minWidth: number;\n idealWidth: number;\n padding: number;\n}\n\nexport type ColumnSizingTableProps = TableProps;\nexport type ColumnSizingTableHeaderCellProps = Pick<TableHeaderCellProps, 'style' | 'aside'>;\nexport type ColumnSizingTableCellProps = Pick<TableHeaderCellProps, 'style'>;\n\nexport type EnableKeyboardModeOnChangeCallback = (columnId: TableColumnId, isKeyboardMode: boolean) => void;\n\nexport interface TableColumnSizingState {\n getOnMouseDown: (columnId: TableColumnId) => (e: React.MouseEvent | React.TouchEvent) => void;\n setColumnWidth: (columnId: TableColumnId, newSize: number) => void;\n getColumnWidths: () => ColumnWidthState[];\n getTableProps: (props?: TableProps) => ColumnSizingTableProps;\n getTableHeaderCellProps: (columnId: TableColumnId) => ColumnSizingTableHeaderCellProps;\n getTableCellProps: (columnId: TableColumnId) => ColumnSizingTableCellProps;\n enableKeyboardMode: (\n columnId: TableColumnId,\n onChange?: EnableKeyboardModeOnChangeCallback,\n ) => (e: React.MouseEvent | React.TouchEvent) => void;\n}\n\nexport type ColumnResizeState = {\n getColumnWidth: (columnId: TableColumnId) => number;\n setColumnWidth: (\n e: KeyboardEvent | TouchEvent | MouseEvent | undefined,\n data: { columnId: TableColumnId; width: number },\n ) => void;\n getColumnById: (columnId: TableColumnId) => ColumnWidthState | undefined;\n getColumns: () => ColumnWidthState[];\n};\n\nexport type TableColumnSizingOptions = Record<\n TableColumnId,\n Partial<Pick<ColumnWidthState, 'minWidth' | 'idealWidth' | 'padding'>> & {\n defaultWidth?: number;\n autoFitColumns?: boolean;\n }\n>;\n\nexport type UseTableColumnSizingParams = {\n columnSizingOptions?: TableColumnSizingOptions;\n onColumnResize?: (\n e: KeyboardEvent | TouchEvent | MouseEvent | undefined,\n data: { columnId: TableColumnId; width: number },\n ) => void;\n containerWidthOffset?: number;\n autoFitColumns?: boolean;\n};\n"],"names":["React"],"rangeMappings":"","mappings":"AAAA,YAAYA,WAAW,QAAQ"}
1
+ {"version":3,"sources":["../src/hooks/types.ts"],"sourcesContent":["import * as React from 'react';\nimport { SortDirection, TableProps } from '../components/Table/Table.types';\nimport { TableHeaderCellProps } from '../components/TableHeaderCell/TableHeaderCell.types';\nimport { SelectionMode } from '@fluentui/react-utilities';\n\nexport type TableRowId = string | number;\nexport type TableColumnId = string | number;\n\nexport interface SortState {\n sortColumn: TableColumnId | undefined;\n sortDirection: SortDirection;\n}\n\nexport interface OnSelectionChangeData {\n selectedItems: Set<TableRowId>;\n}\n\nexport interface CreateTableColumnOptions<TItem> extends Partial<TableColumnDefinition<TItem>> {\n columnId: TableColumnId;\n}\n\nexport interface TableColumnDefinition<TItem> {\n columnId: TableColumnId;\n compare: (a: TItem, b: TItem) => number;\n renderHeaderCell: (data?: unknown) => React.ReactNode;\n renderCell: (item: TItem) => React.ReactNode;\n}\n\nexport type RowEnhancer<TItem, TRowState extends TableRowData<TItem> = TableRowData<TItem>> = (\n row: TableRowData<TItem>,\n) => TRowState;\n\nexport interface TableSortState<TItem> {\n /**\n * Current sort direction\n */\n sortDirection: SortDirection;\n /**\n * Column id of the currently sorted column\n */\n sortColumn: TableColumnId | undefined;\n /**\n * Set the sort direction for the specified column\n */\n setColumnSort: (event: React.SyntheticEvent, columnId: TableColumnId, sortDirection: SortDirection) => void;\n /**\n * Toggles the sort direction for specified column\n */\n toggleColumnSort: (event: React.SyntheticEvent, columnId: TableColumnId) => void;\n /**\n * Returns the sort direction if a column is sorted,\n * returns undefined if the column is not sorted\n */\n getSortDirection: (columnId: TableColumnId) => SortDirection | undefined;\n\n /**\n * Sorts rows and returns a **shallow** copy of original items\n */\n sort: <TRowState extends TableRowData<TItem>>(rows: TRowState[]) => TRowState[];\n}\n\nexport interface TableSelectionState {\n /**\n * Clears all selected rows\n */\n clearRows: (e: React.SyntheticEvent) => void;\n /**\n * Selects single row\n */\n selectRow: (e: React.SyntheticEvent, rowId: TableRowId) => void;\n /**\n * De-selects single row\n */\n deselectRow: (e: React.SyntheticEvent, rowId: TableRowId) => void;\n /**\n * Toggle selection of all rows\n */\n toggleAllRows: (e: React.SyntheticEvent) => void;\n /**\n * Toggle selection of single row\n */\n toggleRow: (e: React.SyntheticEvent, rowId: TableRowId) => void;\n /**\n * Collection of row ids corresponding to selected rows\n */\n selectedRows: Set<TableRowId>;\n /**\n * Whether all rows are selected\n */\n allRowsSelected: boolean;\n /**\n * Whether some rows are selected\n */\n someRowsSelected: boolean;\n\n /**\n * Checks if a given rowId is selected\n */\n isRowSelected: (rowId: TableRowId) => boolean;\n\n selectionMode: SelectionMode;\n}\n\nexport interface TableRowData<TItem> {\n /**\n * User provided data\n */\n item: TItem;\n /**\n * The row id, defaults to index position in the collection\n */\n rowId: TableRowId;\n}\n\nexport interface TableFeaturesState<TItem> extends Pick<UseTableFeaturesOptions<TItem>, 'items' | 'getRowId'> {\n /**\n * The row data for rendering\n * @param rowEnhancer - Enhances the row with extra user data\n */\n getRows: <TRowState extends TableRowData<TItem> = TableRowData<TItem>>(\n rowEnhancer?: RowEnhancer<TItem, TRowState>,\n ) => TRowState[];\n\n /**\n * State and actions to manage row selection\n */\n selection: TableSelectionState;\n /**\n * State and actions to manage row sorting\n */\n sort: TableSortState<TItem>;\n /**\n * Table columns\n */\n columns: TableColumnDefinition<TItem>[];\n /**\n * State and actions to manage column resizing\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n columnSizing_unstable: TableColumnSizingState;\n /**\n * A React.Ref object to be set as a ref for the table.\n * Used with column resizing.\n */\n tableRef: React.Ref<HTMLDivElement>;\n}\n\nexport interface UseTableSortOptions {\n /**\n * Used to control sorting\n */\n sortState?: SortState;\n /**\n * Used in uncontrolled mode to set initial sort column and direction on mount\n */\n defaultSortState?: SortState;\n /**\n * Called when sort changes\n */\n onSortChange?(e: React.SyntheticEvent, state: SortState): void;\n}\n\nexport interface UseTableFeaturesOptions<TItem> {\n columns: TableColumnDefinition<TItem>[];\n items: TItem[];\n getRowId?: (item: TItem) => TableRowId;\n}\n\nexport type TableFeaturePlugin = <TItem>(tableState: TableFeaturesState<TItem>) => TableFeaturesState<TItem>;\n\nexport interface ColumnWidthState {\n columnId: TableColumnId;\n width: number;\n minWidth: number;\n idealWidth: number;\n padding: number;\n}\n\nexport type ColumnSizingTableProps = TableProps;\nexport type ColumnSizingTableHeaderCellProps = Pick<TableHeaderCellProps, 'style' | 'aside'>;\nexport type ColumnSizingTableCellProps = Pick<TableHeaderCellProps, 'style'>;\n\nexport type EnableKeyboardModeOnChangeCallback = (columnId: TableColumnId, isKeyboardMode: boolean) => void;\n\nexport interface TableColumnSizingState {\n getOnMouseDown: (columnId: TableColumnId) => (e: React.MouseEvent | React.TouchEvent) => void;\n setColumnWidth: (columnId: TableColumnId, newSize: number) => void;\n getColumnWidths: () => ColumnWidthState[];\n getTableProps: (props?: TableProps) => ColumnSizingTableProps;\n getTableHeaderCellProps: (columnId: TableColumnId) => ColumnSizingTableHeaderCellProps;\n getTableCellProps: (columnId: TableColumnId) => ColumnSizingTableCellProps;\n enableKeyboardMode: (\n columnId: TableColumnId,\n onChange?: EnableKeyboardModeOnChangeCallback,\n ) => (e: React.MouseEvent | React.TouchEvent) => void;\n}\n\nexport type ColumnResizeState = {\n getColumnWidth: (columnId: TableColumnId) => number;\n setColumnWidth: (\n e: KeyboardEvent | TouchEvent | MouseEvent | undefined,\n data: { columnId: TableColumnId; width: number },\n ) => void;\n getColumnById: (columnId: TableColumnId) => ColumnWidthState | undefined;\n getColumns: () => ColumnWidthState[];\n};\n\nexport type TableColumnSizingOptions = Record<\n TableColumnId,\n Partial<Pick<ColumnWidthState, 'minWidth' | 'idealWidth' | 'padding'>> & {\n defaultWidth?: number;\n autoFitColumns?: boolean;\n }\n>;\n\nexport type UseTableColumnSizingParams = {\n columnSizingOptions?: TableColumnSizingOptions;\n onColumnResize?: (\n e: KeyboardEvent | TouchEvent | MouseEvent | undefined,\n data: { columnId: TableColumnId; width: number },\n ) => void;\n containerWidthOffset?: number;\n autoFitColumns?: boolean;\n};\n"],"names":["React"],"rangeMappings":"","mappings":"AAAA,YAAYA,WAAW,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useKeyboardResizing.ts"],"sourcesContent":["import * as React from 'react';\nimport { ArrowLeft, ArrowRight, Enter, Escape, Shift, Space } from '@fluentui/keyboard-keys';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport { ColumnResizeState, EnableKeyboardModeOnChangeCallback, TableColumnId } from './types';\nimport { useFocusFinders, useTabsterAttributes } from '@fluentui/react-tabster';\n\nconst STEP = 20;\nconst PRECISION_MODIFIER = Shift;\nconst PRECISION_FACTOR = 1 / 4;\n\nexport function useKeyboardResizing(columnResizeState: ColumnResizeState) {\n const [columnId, setColumnId] = React.useState<TableColumnId>();\n const onChangeRef = React.useRef<EnableKeyboardModeOnChangeCallback>();\n const { findPrevFocusable } = useFocusFinders();\n\n const columnResizeStateRef = React.useRef<ColumnResizeState>(columnResizeState);\n React.useEffect(() => {\n columnResizeStateRef.current = columnResizeState;\n }, [columnResizeState]);\n\n const [resizeHandleRefs] = React.useState(() => new Map<TableColumnId, React.RefObject<HTMLDivElement>>());\n\n const keyboardHandler = useEventCallback((event: React.KeyboardEvent) => {\n if (!columnId) {\n return;\n }\n\n const width = columnResizeStateRef.current.getColumnWidth(columnId);\n const precisionModifier = event.getModifierState(PRECISION_MODIFIER);\n\n const stopEvent = () => {\n event.preventDefault();\n event.stopPropagation();\n };\n\n switch (event.key) {\n case ArrowLeft:\n stopEvent();\n columnResizeStateRef.current.setColumnWidth(event.nativeEvent, {\n columnId,\n width: width - (precisionModifier ? STEP * PRECISION_FACTOR : STEP),\n });\n return;\n\n case ArrowRight:\n stopEvent();\n columnResizeStateRef.current.setColumnWidth(event.nativeEvent, {\n columnId,\n width: width + (precisionModifier ? STEP * PRECISION_FACTOR : STEP),\n });\n return;\n\n case Space:\n case Enter:\n case Escape:\n stopEvent();\n // Just blur here, the onBlur handler will take care of the rest (disableInteractiveMode).\n resizeHandleRefs.get(columnId)?.current?.blur();\n break;\n }\n });\n\n const enableInteractiveMode = React.useCallback(\n (colId: TableColumnId) => {\n setColumnId(colId);\n onChangeRef.current?.(colId, true);\n\n const handle = resizeHandleRefs.get(colId)?.current;\n if (handle) {\n handle.setAttribute('tabindex', '-1');\n handle.tabIndex = -1;\n handle.focus();\n }\n },\n [resizeHandleRefs],\n );\n\n const disableInteractiveMode = React.useCallback(() => {\n if (!columnId) {\n return;\n }\n // Notify the onChange listener that we are disabling interactive mode.\n onChangeRef.current?.(columnId, false);\n // Find the previous focusable element (table header button) and focus it.\n const el = resizeHandleRefs.get(columnId)?.current;\n if (el) {\n findPrevFocusable(el)?.focus(); // Focus the previous focusable element (header button).\n el.removeAttribute('tabindex');\n }\n\n setColumnId(undefined);\n }, [columnId, findPrevFocusable, resizeHandleRefs]);\n\n const toggleInteractiveMode = (colId: TableColumnId, onChange?: EnableKeyboardModeOnChangeCallback) => {\n onChangeRef.current = onChange;\n if (!columnId) {\n enableInteractiveMode(colId);\n } else if (colId && columnId !== colId) {\n enableInteractiveMode(colId);\n setColumnId(colId);\n } else {\n disableInteractiveMode();\n }\n };\n\n const getKeyboardResizingRef = React.useCallback(\n (colId: TableColumnId) => {\n const ref = resizeHandleRefs.get(colId) || React.createRef<HTMLDivElement>();\n resizeHandleRefs.set(colId, ref);\n return ref;\n },\n [resizeHandleRefs],\n );\n\n // This makes sure the left and right arrow keys are ignored in tabster,\n // so that they can be used for resizing.\n const tabsterAttrs = useTabsterAttributes({\n focusable: {\n ignoreKeydown: {\n ArrowLeft: true,\n ArrowRight: true,\n },\n },\n });\n\n return {\n toggleInteractiveMode,\n columnId,\n getKeyboardResizingProps: React.useCallback(\n (colId: TableColumnId, currentWidth: number) => ({\n onKeyDown: keyboardHandler,\n onBlur: disableInteractiveMode,\n ref: getKeyboardResizingRef(colId),\n role: 'separator',\n 'aria-label': 'Resize column',\n 'aria-valuetext': `${currentWidth} pixels`,\n 'aria-hidden': colId === columnId ? false : true,\n tabIndex: colId === columnId ? 0 : undefined,\n ...tabsterAttrs,\n }),\n [columnId, disableInteractiveMode, getKeyboardResizingRef, keyboardHandler, tabsterAttrs],\n ),\n };\n}\n"],"names":["React","ArrowLeft","ArrowRight","Enter","Escape","Shift","Space","useEventCallback","useFocusFinders","useTabsterAttributes","STEP","PRECISION_MODIFIER","PRECISION_FACTOR","useKeyboardResizing","columnResizeState","columnId","setColumnId","useState","onChangeRef","useRef","findPrevFocusable","columnResizeStateRef","useEffect","current","resizeHandleRefs","Map","keyboardHandler","event","width","getColumnWidth","precisionModifier","getModifierState","stopEvent","preventDefault","stopPropagation","key","setColumnWidth","nativeEvent","get","blur","enableInteractiveMode","useCallback","colId","handle","setAttribute","tabIndex","focus","disableInteractiveMode","el","removeAttribute","undefined","toggleInteractiveMode","onChange","getKeyboardResizingRef","ref","createRef","set","tabsterAttrs","focusable","ignoreKeydown","getKeyboardResizingProps","currentWidth","onKeyDown","onBlur","role"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,SAAS,EAAEC,UAAU,EAAEC,KAAK,EAAEC,MAAM,EAAEC,KAAK,EAAEC,KAAK,QAAQ,0BAA0B;AAC7F,SAASC,gBAAgB,QAAQ,4BAA4B;AAE7D,SAASC,eAAe,EAAEC,oBAAoB,QAAQ,0BAA0B;AAEhF,MAAMC,OAAO;AACb,MAAMC,qBAAqBN;AAC3B,MAAMO,mBAAmB,IAAI;AAE7B,OAAO,SAASC,oBAAoBC,iBAAoC;IACtE,MAAM,CAACC,UAAUC,YAAY,GAAGhB,MAAMiB,QAAQ;IAC9C,MAAMC,cAAclB,MAAMmB,MAAM;IAChC,MAAM,EAAEC,iBAAiB,EAAE,GAAGZ;IAE9B,MAAMa,u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,CAACC,OAAsBmB,eAA0B,CAAA;gBAC/CC,WAAWpC;gBACXqC,QAAQhB;gBACRO,KAAKD,uBAAuBX;gBAC5BsB,MAAM;gBACN,cAAc;gBACd,kBAAkB,CAAC,EAAEH,aAAa,OAAO,CAAC;gBAC1C,eAAenB,UAAU3B,WAAW,QAAQ;gBAC5C8B,UAAUH,UAAU3B,WAAW,IAAImC;gBACnC,GAAGO,YAAY;YACjB,CAAA,GACA;YAAC1C;YAAUgC;YAAwBM;YAAwB3B;YAAiB+B;SAAa;IAE7F;AACF"}
1
+ {"version":3,"sources":["../src/hooks/useKeyboardResizing.ts"],"sourcesContent":["import * as React from 'react';\nimport { ArrowLeft, ArrowRight, Enter, Escape, Shift, Space } from '@fluentui/keyboard-keys';\nimport { useEventCallback } from '@fluentui/react-utilities';\nimport { ColumnResizeState, EnableKeyboardModeOnChangeCallback, TableColumnId } from './types';\nimport { useFocusFinders, useTabsterAttributes } from '@fluentui/react-tabster';\n\nconst STEP = 20;\nconst PRECISION_MODIFIER = Shift;\nconst PRECISION_FACTOR = 1 / 4;\n\nexport function useKeyboardResizing(columnResizeState: ColumnResizeState) {\n const [columnId, setColumnId] = React.useState<TableColumnId>();\n const onChangeRef = React.useRef<EnableKeyboardModeOnChangeCallback>();\n const { findPrevFocusable } = useFocusFinders();\n\n const columnResizeStateRef = React.useRef<ColumnResizeState>(columnResizeState);\n React.useEffect(() => {\n columnResizeStateRef.current = columnResizeState;\n }, [columnResizeState]);\n\n const [resizeHandleRefs] = React.useState(() => new Map<TableColumnId, React.RefObject<HTMLDivElement>>());\n\n const keyboardHandler = useEventCallback((event: React.KeyboardEvent) => {\n if (!columnId) {\n return;\n }\n\n const width = columnResizeStateRef.current.getColumnWidth(columnId);\n const precisionModifier = event.getModifierState(PRECISION_MODIFIER);\n\n const stopEvent = () => {\n event.preventDefault();\n event.stopPropagation();\n };\n\n switch (event.key) {\n case ArrowLeft:\n stopEvent();\n columnResizeStateRef.current.setColumnWidth(event.nativeEvent, {\n columnId,\n width: width - (precisionModifier ? STEP * PRECISION_FACTOR : STEP),\n });\n return;\n\n case ArrowRight:\n stopEvent();\n columnResizeStateRef.current.setColumnWidth(event.nativeEvent, {\n columnId,\n width: width + (precisionModifier ? STEP * PRECISION_FACTOR : STEP),\n });\n return;\n\n case Space:\n case Enter:\n case Escape:\n stopEvent();\n // Just blur here, the onBlur handler will take care of the rest (disableInteractiveMode).\n resizeHandleRefs.get(columnId)?.current?.blur();\n break;\n }\n });\n\n const enableInteractiveMode = React.useCallback(\n (colId: TableColumnId) => {\n setColumnId(colId);\n onChangeRef.current?.(colId, true);\n\n const handle = resizeHandleRefs.get(colId)?.current;\n if (handle) {\n handle.setAttribute('tabindex', '-1');\n handle.tabIndex = -1;\n handle.focus();\n }\n },\n [resizeHandleRefs],\n );\n\n const disableInteractiveMode = React.useCallback(() => {\n if (!columnId) {\n return;\n }\n // Notify the onChange listener that we are disabling interactive mode.\n onChangeRef.current?.(columnId, false);\n // Find the previous focusable element (table header button) and focus it.\n const el = resizeHandleRefs.get(columnId)?.current;\n if (el) {\n findPrevFocusable(el)?.focus(); // Focus the previous focusable element (header button).\n el.removeAttribute('tabindex');\n }\n\n setColumnId(undefined);\n }, [columnId, findPrevFocusable, resizeHandleRefs]);\n\n const toggleInteractiveMode = (colId: TableColumnId, onChange?: EnableKeyboardModeOnChangeCallback) => {\n onChangeRef.current = onChange;\n if (!columnId) {\n enableInteractiveMode(colId);\n } else if (colId && columnId !== colId) {\n enableInteractiveMode(colId);\n setColumnId(colId);\n } else {\n disableInteractiveMode();\n }\n };\n\n const getKeyboardResizingRef = React.useCallback(\n (colId: TableColumnId) => {\n const ref = resizeHandleRefs.get(colId) || React.createRef<HTMLDivElement>();\n resizeHandleRefs.set(colId, ref);\n return ref;\n },\n [resizeHandleRefs],\n );\n\n // This makes sure the left and right arrow keys are ignored in tabster,\n // so that they can be used for resizing.\n const tabsterAttrs = useTabsterAttributes({\n focusable: {\n ignoreKeydown: {\n ArrowLeft: true,\n ArrowRight: true,\n },\n },\n });\n\n return {\n toggleInteractiveMode,\n columnId,\n getKeyboardResizingProps: React.useCallback(\n (colId: TableColumnId, currentWidth: number) => ({\n onKeyDown: keyboardHandler,\n onBlur: disableInteractiveMode,\n ref: getKeyboardResizingRef(colId),\n role: 'separator',\n 'aria-label': 'Resize column',\n 'aria-valuetext': `${currentWidth} pixels`,\n 'aria-hidden': colId === columnId ? false : true,\n tabIndex: colId === columnId ? 0 : undefined,\n ...tabsterAttrs,\n }),\n [columnId, disableInteractiveMode, getKeyboardResizingRef, keyboardHandler, tabsterAttrs],\n ),\n };\n}\n"],"names":["React","ArrowLeft","ArrowRight","Enter","Escape","Shift","Space","useEventCallback","useFocusFinders","useTabsterAttributes","STEP","PRECISION_MODIFIER","PRECISION_FACTOR","useKeyboardResizing","columnResizeState","columnId","setColumnId","useState","onChangeRef","useRef","findPrevFocusable","columnResizeStateRef","useEffect","current","resizeHandleRefs","Map","keyboardHandler","event","width","getColumnWidth","precisionModifier","getModifierState","stopEvent","preventDefault","stopPropagation","key","setColumnWidth","nativeEvent","get","blur","enableInteractiveMode","useCallback","colId","handle","setAttribute","tabIndex","focus","disableInteractiveMode","el","removeAttribute","undefined","toggleInteractiveMode","onChange","getKeyboardResizingRef","ref","createRef","set","tabsterAttrs","focusable","ignoreKeydown","getKeyboardResizingProps","currentWidth","onKeyDown","onBlur","role"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,SAAS,EAAEC,UAAU,EAAEC,KAAK,EAAEC,MAAM,EAAEC,KAAK,EAAEC,KAAK,QAAQ,0BAA0B;AAC7F,SAASC,gBAAgB,QAAQ,4BAA4B;AAE7D,SAASC,eAAe,EAAEC,o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uD,SAAS;QAC1D/B,iBAAiBgC,GAAG,CAACd,OAAOY;QAC5B,OAAOA;IACT,GACA;QAAC9B;KAAiB;IAGpB,wEAAwE;IACxE,yCAAyC;IACzC,MAAMiC,eAAehD,qBAAqB;QACxCiD,WAAW;YACTC,eAAe;gBACb1D,WAAW;gBACXC,YAAY;YACd;QACF;IACF;IAEA,OAAO;QACLiD;QACApC;QACA6C,0BAA0B5D,MAAMyC,WAAW,CACzC,CAACC,OAAsBmB,eAA0B,CAAA;gBAC/CC,WAAWpC;gBACXqC,QAAQhB;gBACRO,KAAKD,uBAAuBX;gBAC5BsB,MAAM;gBACN,cAAc;gBACd,kBAAkB,CAAC,EAAEH,aAAa,OAAO,CAAC;gBAC1C,eAAenB,UAAU3B,WAAW,QAAQ;gBAC5C8B,UAAUH,UAAU3B,WAAW,IAAImC;gBACnC,GAAGO,YAAY;YACjB,CAAA,GACA;YAAC1C;YAAUgC;YAAwBM;YAAwB3B;YAAiB+B;SAAa;IAE7F;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useMeasureElement.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n\n/**\n * Provides a way of reporting element width.\n * Returns\n * `width` - current element width (0 by default),\n * `measureElementRef` - a ref function to be passed as `ref` to the element you want to measure\n */\nexport function useMeasureElement<TElement extends HTMLElement = HTMLElement>() {\n const [width, setWidth] = React.useState(0);\n\n const container = React.useRef<HTMLElement | undefined>(undefined);\n\n const resizeObserverRef = React.useRef<ResizeObserver | null>(null);\n\n const { targetDocument } = useFluent();\n\n // the handler for resize observer\n const handleResize = React.useCallback(() => {\n const containerWidth = container.current?.getBoundingClientRect().width;\n setWidth(containerWidth || 0);\n }, []);\n\n const measureElementRef = React.useCallback(\n (el: TElement | null) => {\n if (!targetDocument) {\n return;\n }\n\n // if the element is removed, stop observing it\n if (!el && resizeObserverRef.current && container.current) {\n resizeObserverRef.current.unobserve(container.current);\n }\n\n container.current = undefined;\n\n if (el?.parentElement) {\n container.current = el.parentElement;\n handleResize();\n resizeObserverRef.current?.observe(container.current);\n }\n },\n [targetDocument, handleResize],\n );\n\n React.useEffect(() => {\n resizeObserverRef.current = createResizeObserverFromDocument(targetDocument, handleResize);\n\n if (!container.current || !resizeObserverRef.current) {\n return;\n }\n\n resizeObserverRef.current.observe(container.current);\n\n return () => {\n resizeObserverRef.current?.disconnect();\n };\n }, [handleResize, targetDocument]);\n\n return { width, measureElementRef };\n}\n\n/**\n * FIXME - TS 3.8/3.9 don't have ResizeObserver types by default, move this to a shared utility once we bump the minbar\n * A utility method that creates a ResizeObserver from a target document\n * @param targetDocument - document to use to create the ResizeObserver\n * @param callback - https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver#callback\n * @returns a ResizeObserver instance or null if the global does not exist on the document\n */\nexport function createResizeObserverFromDocument(\n targetDocument: Document | null | undefined,\n callback: ResizeObserverCallback,\n) {\n if (!targetDocument?.defaultView?.ResizeObserver) {\n return null;\n }\n\n return new targetDocument.defaultView.ResizeObserver(callback);\n}\n"],"names":["React","useFluent_unstable","useFluent","useMeasureElement","width","setWidth","useState","container","useRef","undefined","resizeObserverRef","targetDocument","handleResize","useCallback","containerWidth","current","getBoundingClientRect","measureElementRef","el","unobserve","parentElement","observe","useEffect","createResizeObserverFromDocument","disconnect","callback","defaultView","ResizeObserver"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAElF;;;;;CAKC,GACD,OAAO,SAASC;IACd,MAAM,CAACC,OAAOC,SAAS,GAAGL,MAAMM,QAAQ,CAAC;IAEzC,MAAMC,YAAYP,MAAMQ,MAAM,CAA0BC;IAExD,MAAMC,oBAAoBV,MAAMQ,MAAM,CAAwB;IAE9D,MAAM,EAAEG,cAA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AAA,4BAA6BgB,cAAc,GAAE;QAChD,OAAO;IACT;IAEA,OAAO,IAAIhB,eAAee,WAAW,CAACC,cAAc,CAACF;AACvD"}
1
+ {"version":3,"sources":["../src/hooks/useMeasureElement.ts"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n\n/**\n * Provides a way of reporting element width.\n * Returns\n * `width` - current element width (0 by default),\n * `measureElementRef` - a ref function to be passed as `ref` to the element you want to measure\n */\nexport function useMeasureElement<TElement extends HTMLElement = HTMLElement>() {\n const [width, setWidth] = React.useState(0);\n\n const container = React.useRef<HTMLElement | undefined>(undefined);\n\n const resizeObserverRef = React.useRef<ResizeObserver | null>(null);\n\n const { targetDocument } = useFluent();\n\n // the handler for resize observer\n const handleResize = React.useCallback(() => {\n const containerWidth = container.current?.getBoundingClientRect().width;\n setWidth(containerWidth || 0);\n }, []);\n\n const measureElementRef = React.useCallback(\n (el: TElement | null) => {\n if (!targetDocument) {\n return;\n }\n\n // if the element is removed, stop observing it\n if (!el && resizeObserverRef.current && container.current) {\n resizeObserverRef.current.unobserve(container.current);\n }\n\n container.current = undefined;\n\n if (el?.parentElement) {\n container.current = el.parentElement;\n handleResize();\n resizeObserverRef.current?.observe(container.current);\n }\n },\n [targetDocument, handleResize],\n );\n\n React.useEffect(() => {\n resizeObserverRef.current = createResizeObserverFromDocument(targetDocument, handleResize);\n\n if (!container.current || !resizeObserverRef.current) {\n return;\n }\n\n resizeObserverRef.current.observe(container.current);\n\n return () => {\n resizeObserverRef.current?.disconnect();\n };\n }, [handleResize, targetDocument]);\n\n return { width, measureElementRef };\n}\n\n/**\n * FIXME - TS 3.8/3.9 don't have ResizeObserver types by default, move this to a shared utility once we bump the minbar\n * A utility method that creates a ResizeObserver from a target document\n * @param targetDocument - document to use to create the ResizeObserver\n * @param callback - https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver/ResizeObserver#callback\n * @returns a ResizeObserver instance or null if the global does not exist on the document\n */\nexport function createResizeObserverFromDocument(\n targetDocument: Document | null | undefined,\n callback: ResizeObserverCallback,\n) {\n if (!targetDocument?.defaultView?.ResizeObserver) {\n return null;\n }\n\n return new targetDocument.defaultView.ResizeObserver(callback);\n}\n"],"names":["React","useFluent_unstable","useFluent","useMeasureElement","width","setWidth","useState","container","useRef","undefined","resizeObserverRef","targetDocument","handleResize","useCallback","containerWidth","current","getBoundingClientRect","measureElementRef","el","unobserve","parentElement","observe","useEffect","createResizeObserverFromDocument","disconnect","callback","defaultView","ResizeObserver"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAElF;;;;;CAKC,GACD,OAAO,SAASC;IACd,MAAM,CAACC,OAAOC,SAAS,GAAGL,MAAMM,QAAQ,CAAC;IAEzC,MAAMC,YAAYP,MAAMQ,MAAM,CAA0BC;IAExD,MAAMC,oBAAoBV,MAAMQ,MAAM,CAAwB;IAE9D,MAAM,EAAEG,cAAc,EAAE,GAAGT;IAE3B,kCAAkC;IAClC,MAAMU,eAAeZ,MAAMa,WAAW,CAAC;YACdN;QAAvB,MAAMO,kBAAiBP,qBAAAA,UAAUQ,OAAO,cAAjBR,yCAAAA,mBAAmBS,qBAAqB,GAAGZ,KAAK;QACvEC,SAASS,kBAAkB;IAC7B,GAAG,EAAE;IAEL,MAAMG,oBAAoBjB,MAAMa,WAAW,CACzC,CAACK;QACC,IAAI,CAACP,gBAAgB;YACnB;QACF;QAEA,+CAA+C;QAC/C,IAAI,CAACO,MAAMR,kBAAkBK,OAAO,IAAIR,UAAUQ,OAAO,EAAE;YACzDL,kBAAkBK,OAAO,CAACI,SAAS,CAACZ,UAAUQ,OAAO;QACvD;QAEAR,UAAUQ,OAAO,GAAGN;QAEpB,IAAIS,eAAAA,yBAAAA,GAAIE,aAAa,EAAE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