@fluentui/react-table 0.0.0-nightly-20221007-1237.1

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 (319) hide show
  1. package/CHANGELOG.json +354 -0
  2. package/CHANGELOG.md +104 -0
  3. package/LICENSE +15 -0
  4. package/README.md +5 -0
  5. package/Spec.md +63 -0
  6. package/dist/index.d.ts +647 -0
  7. package/lib/Table.js +2 -0
  8. package/lib/Table.js.map +1 -0
  9. package/lib/TableBody.js +2 -0
  10. package/lib/TableBody.js.map +1 -0
  11. package/lib/TableCell.js +2 -0
  12. package/lib/TableCell.js.map +1 -0
  13. package/lib/TableCellActions.js +2 -0
  14. package/lib/TableCellActions.js.map +1 -0
  15. package/lib/TableCellLayout.js +2 -0
  16. package/lib/TableCellLayout.js.map +1 -0
  17. package/lib/TableCellPrimaryLayout.js +2 -0
  18. package/lib/TableCellPrimaryLayout.js.map +1 -0
  19. package/lib/TableHeader.js +2 -0
  20. package/lib/TableHeader.js.map +1 -0
  21. package/lib/TableHeaderCell.js +2 -0
  22. package/lib/TableHeaderCell.js.map +1 -0
  23. package/lib/TableRow.js +2 -0
  24. package/lib/TableRow.js.map +1 -0
  25. package/lib/TableSelectionCell.js +2 -0
  26. package/lib/TableSelectionCell.js.map +1 -0
  27. package/lib/components/Table/Table.js +16 -0
  28. package/lib/components/Table/Table.js.map +1 -0
  29. package/lib/components/Table/Table.types.js +2 -0
  30. package/lib/components/Table/Table.types.js.map +1 -0
  31. package/lib/components/Table/index.js +6 -0
  32. package/lib/components/Table/index.js.map +1 -0
  33. package/lib/components/Table/renderTable.js +18 -0
  34. package/lib/components/Table/renderTable.js.map +1 -0
  35. package/lib/components/Table/useTable.js +30 -0
  36. package/lib/components/Table/useTable.js.map +1 -0
  37. package/lib/components/Table/useTableContextValues.js +17 -0
  38. package/lib/components/Table/useTableContextValues.js.map +1 -0
  39. package/lib/components/Table/useTableStyles.js +53 -0
  40. package/lib/components/Table/useTableStyles.js.map +1 -0
  41. package/lib/components/TableBody/TableBody.js +15 -0
  42. package/lib/components/TableBody/TableBody.js.map +1 -0
  43. package/lib/components/TableBody/TableBody.types.js +2 -0
  44. package/lib/components/TableBody/TableBody.types.js.map +1 -0
  45. package/lib/components/TableBody/index.js +6 -0
  46. package/lib/components/TableBody/index.js.map +1 -0
  47. package/lib/components/TableBody/renderTableBody.js +16 -0
  48. package/lib/components/TableBody/renderTableBody.js.map +1 -0
  49. package/lib/components/TableBody/useTableBody.js +32 -0
  50. package/lib/components/TableBody/useTableBody.js.map +1 -0
  51. package/lib/components/TableBody/useTableBodyStyles.js +35 -0
  52. package/lib/components/TableBody/useTableBodyStyles.js.map +1 -0
  53. package/lib/components/TableCell/TableCell.js +15 -0
  54. package/lib/components/TableCell/TableCell.js.map +1 -0
  55. package/lib/components/TableCell/TableCell.types.js +2 -0
  56. package/lib/components/TableCell/TableCell.types.js.map +1 -0
  57. package/lib/components/TableCell/index.js +6 -0
  58. package/lib/components/TableCell/index.js.map +1 -0
  59. package/lib/components/TableCell/renderTableCell.js +15 -0
  60. package/lib/components/TableCell/renderTableCell.js.map +1 -0
  61. package/lib/components/TableCell/useTableCell.js +32 -0
  62. package/lib/components/TableCell/useTableCell.js.map +1 -0
  63. package/lib/components/TableCell/useTableCellStyles.js +59 -0
  64. package/lib/components/TableCell/useTableCellStyles.js.map +1 -0
  65. package/lib/components/TableCellActions/TableCellActions.js +15 -0
  66. package/lib/components/TableCellActions/TableCellActions.js.map +1 -0
  67. package/lib/components/TableCellActions/TableCellActions.types.js +2 -0
  68. package/lib/components/TableCellActions/TableCellActions.types.js.map +1 -0
  69. package/lib/components/TableCellActions/index.js +6 -0
  70. package/lib/components/TableCellActions/index.js.map +1 -0
  71. package/lib/components/TableCellActions/renderTableCellActions.js +16 -0
  72. package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -0
  73. package/lib/components/TableCellActions/useTableCellActions.js +27 -0
  74. package/lib/components/TableCellActions/useTableCellActions.js.map +1 -0
  75. package/lib/components/TableCellActions/useTableCellActionsStyles.js +40 -0
  76. package/lib/components/TableCellActions/useTableCellActionsStyles.js.map +1 -0
  77. package/lib/components/TableCellLayout/TableCellLayout.js +16 -0
  78. package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -0
  79. package/lib/components/TableCellLayout/TableCellLayout.types.js +2 -0
  80. package/lib/components/TableCellLayout/TableCellLayout.types.js.map +1 -0
  81. package/lib/components/TableCellLayout/index.js +6 -0
  82. package/lib/components/TableCellLayout/index.js.map +1 -0
  83. package/lib/components/TableCellLayout/renderTableCellLayout.js +22 -0
  84. package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -0
  85. package/lib/components/TableCellLayout/useTableCellLayout.js +46 -0
  86. package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -0
  87. package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js +13 -0
  88. package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -0
  89. package/lib/components/TableCellLayout/useTableCellLayoutStyles.js +74 -0
  90. package/lib/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -0
  91. package/lib/components/TableHeader/TableHeader.js +15 -0
  92. package/lib/components/TableHeader/TableHeader.js.map +1 -0
  93. package/lib/components/TableHeader/TableHeader.types.js +2 -0
  94. package/lib/components/TableHeader/TableHeader.types.js.map +1 -0
  95. package/lib/components/TableHeader/index.js +6 -0
  96. package/lib/components/TableHeader/index.js.map +1 -0
  97. package/lib/components/TableHeader/renderTableHeader.js +15 -0
  98. package/lib/components/TableHeader/renderTableHeader.js.map +1 -0
  99. package/lib/components/TableHeader/useTableHeader.js +39 -0
  100. package/lib/components/TableHeader/useTableHeader.js.map +1 -0
  101. package/lib/components/TableHeader/useTableHeaderStyles.js +41 -0
  102. package/lib/components/TableHeader/useTableHeaderStyles.js.map +1 -0
  103. package/lib/components/TableHeaderCell/TableHeaderCell.js +15 -0
  104. package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -0
  105. package/lib/components/TableHeaderCell/TableHeaderCell.types.js +2 -0
  106. package/lib/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -0
  107. package/lib/components/TableHeaderCell/index.js +6 -0
  108. package/lib/components/TableHeaderCell/index.js.map +1 -0
  109. package/lib/components/TableHeaderCell/renderTableHeaderCell.js +17 -0
  110. package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -0
  111. package/lib/components/TableHeaderCell/useTableHeaderCell.js +62 -0
  112. package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -0
  113. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js +106 -0
  114. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -0
  115. package/lib/components/TableRow/TableRow.js +15 -0
  116. package/lib/components/TableRow/TableRow.js.map +1 -0
  117. package/lib/components/TableRow/TableRow.types.js +2 -0
  118. package/lib/components/TableRow/TableRow.types.js.map +1 -0
  119. package/lib/components/TableRow/index.js +6 -0
  120. package/lib/components/TableRow/index.js.map +1 -0
  121. package/lib/components/TableRow/renderTableRow.js +16 -0
  122. package/lib/components/TableRow/renderTableRow.js.map +1 -0
  123. package/lib/components/TableRow/useTableRow.js +34 -0
  124. package/lib/components/TableRow/useTableRow.js.map +1 -0
  125. package/lib/components/TableRow/useTableRowStyles.js +88 -0
  126. package/lib/components/TableRow/useTableRowStyles.js.map +1 -0
  127. package/lib/components/TableSelectionCell/TableSelectionCell.js +15 -0
  128. package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -0
  129. package/lib/components/TableSelectionCell/TableSelectionCell.types.js +2 -0
  130. package/lib/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -0
  131. package/lib/components/TableSelectionCell/index.js +6 -0
  132. package/lib/components/TableSelectionCell/index.js.map +1 -0
  133. package/lib/components/TableSelectionCell/renderTableSelectionCell.js +17 -0
  134. package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -0
  135. package/lib/components/TableSelectionCell/useTableSelectionCell.js +47 -0
  136. package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -0
  137. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js +81 -0
  138. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -0
  139. package/lib/contexts/tableContext.js +14 -0
  140. package/lib/contexts/tableContext.js.map +1 -0
  141. package/lib/hooks/index.js +5 -0
  142. package/lib/hooks/index.js.map +1 -0
  143. package/lib/hooks/selectionManager.js +89 -0
  144. package/lib/hooks/selectionManager.js.map +1 -0
  145. package/lib/hooks/types.js +2 -0
  146. package/lib/hooks/types.js.map +1 -0
  147. package/lib/hooks/useSelection.js +74 -0
  148. package/lib/hooks/useSelection.js.map +1 -0
  149. package/lib/hooks/useSort.js +94 -0
  150. package/lib/hooks/useSort.js.map +1 -0
  151. package/lib/hooks/useTable.js +32 -0
  152. package/lib/hooks/useTable.js.map +1 -0
  153. package/lib/index.js +12 -0
  154. package/lib/index.js.map +1 -0
  155. package/lib/navigationModes/cell.js +250 -0
  156. package/lib/navigationModes/cell.js.map +1 -0
  157. package/lib/navigationModes/composite.js +208 -0
  158. package/lib/navigationModes/composite.js.map +1 -0
  159. package/lib/navigationModes/index.js +3 -0
  160. package/lib/navigationModes/index.js.map +1 -0
  161. package/lib/navigationModes/useNavigationMode.js +42 -0
  162. package/lib/navigationModes/useNavigationMode.js.map +1 -0
  163. package/lib-commonjs/Table.js +10 -0
  164. package/lib-commonjs/Table.js.map +1 -0
  165. package/lib-commonjs/TableBody.js +10 -0
  166. package/lib-commonjs/TableBody.js.map +1 -0
  167. package/lib-commonjs/TableCell.js +10 -0
  168. package/lib-commonjs/TableCell.js.map +1 -0
  169. package/lib-commonjs/TableCellActions.js +10 -0
  170. package/lib-commonjs/TableCellActions.js.map +1 -0
  171. package/lib-commonjs/TableCellLayout.js +10 -0
  172. package/lib-commonjs/TableCellLayout.js.map +1 -0
  173. package/lib-commonjs/TableCellPrimaryLayout.js +10 -0
  174. package/lib-commonjs/TableCellPrimaryLayout.js.map +1 -0
  175. package/lib-commonjs/TableHeader.js +10 -0
  176. package/lib-commonjs/TableHeader.js.map +1 -0
  177. package/lib-commonjs/TableHeaderCell.js +10 -0
  178. package/lib-commonjs/TableHeaderCell.js.map +1 -0
  179. package/lib-commonjs/TableRow.js +10 -0
  180. package/lib-commonjs/TableRow.js.map +1 -0
  181. package/lib-commonjs/TableSelectionCell.js +10 -0
  182. package/lib-commonjs/TableSelectionCell.js.map +1 -0
  183. package/lib-commonjs/components/Table/Table.js +28 -0
  184. package/lib-commonjs/components/Table/Table.js.map +1 -0
  185. package/lib-commonjs/components/Table/Table.types.js +6 -0
  186. package/lib-commonjs/components/Table/Table.types.js.map +1 -0
  187. package/lib-commonjs/components/Table/index.js +18 -0
  188. package/lib-commonjs/components/Table/index.js.map +1 -0
  189. package/lib-commonjs/components/Table/renderTable.js +30 -0
  190. package/lib-commonjs/components/Table/renderTable.js.map +1 -0
  191. package/lib-commonjs/components/Table/useTable.js +40 -0
  192. package/lib-commonjs/components/Table/useTable.js.map +1 -0
  193. package/lib-commonjs/components/Table/useTableContextValues.js +27 -0
  194. package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -0
  195. package/lib-commonjs/components/Table/useTableStyles.js +64 -0
  196. package/lib-commonjs/components/Table/useTableStyles.js.map +1 -0
  197. package/lib-commonjs/components/TableBody/TableBody.js +26 -0
  198. package/lib-commonjs/components/TableBody/TableBody.js.map +1 -0
  199. package/lib-commonjs/components/TableBody/TableBody.types.js +6 -0
  200. package/lib-commonjs/components/TableBody/TableBody.types.js.map +1 -0
  201. package/lib-commonjs/components/TableBody/index.js +18 -0
  202. package/lib-commonjs/components/TableBody/index.js.map +1 -0
  203. package/lib-commonjs/components/TableBody/renderTableBody.js +27 -0
  204. package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -0
  205. package/lib-commonjs/components/TableBody/useTableBody.js +43 -0
  206. package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -0
  207. package/lib-commonjs/components/TableBody/useTableBodyStyles.js +44 -0
  208. package/lib-commonjs/components/TableBody/useTableBodyStyles.js.map +1 -0
  209. package/lib-commonjs/components/TableCell/TableCell.js +26 -0
  210. package/lib-commonjs/components/TableCell/TableCell.js.map +1 -0
  211. package/lib-commonjs/components/TableCell/TableCell.types.js +6 -0
  212. package/lib-commonjs/components/TableCell/TableCell.types.js.map +1 -0
  213. package/lib-commonjs/components/TableCell/index.js +18 -0
  214. package/lib-commonjs/components/TableCell/index.js.map +1 -0
  215. package/lib-commonjs/components/TableCell/renderTableCell.js +26 -0
  216. package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -0
  217. package/lib-commonjs/components/TableCell/useTableCell.js +43 -0
  218. package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -0
  219. package/lib-commonjs/components/TableCell/useTableCellStyles.js +70 -0
  220. package/lib-commonjs/components/TableCell/useTableCellStyles.js.map +1 -0
  221. package/lib-commonjs/components/TableCellActions/TableCellActions.js +26 -0
  222. package/lib-commonjs/components/TableCellActions/TableCellActions.js.map +1 -0
  223. package/lib-commonjs/components/TableCellActions/TableCellActions.types.js +6 -0
  224. package/lib-commonjs/components/TableCellActions/TableCellActions.types.js.map +1 -0
  225. package/lib-commonjs/components/TableCellActions/index.js +18 -0
  226. package/lib-commonjs/components/TableCellActions/index.js.map +1 -0
  227. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js +27 -0
  228. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -0
  229. package/lib-commonjs/components/TableCellActions/useTableCellActions.js +38 -0
  230. package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -0
  231. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js +51 -0
  232. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js.map +1 -0
  233. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js +28 -0
  234. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js.map +1 -0
  235. package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js +6 -0
  236. package/lib-commonjs/components/TableCellLayout/TableCellLayout.types.js.map +1 -0
  237. package/lib-commonjs/components/TableCellLayout/index.js +18 -0
  238. package/lib-commonjs/components/TableCellLayout/index.js.map +1 -0
  239. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js +34 -0
  240. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -0
  241. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +57 -0
  242. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -0
  243. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js +23 -0
  244. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -0
  245. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js +85 -0
  246. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -0
  247. package/lib-commonjs/components/TableHeader/TableHeader.js +26 -0
  248. package/lib-commonjs/components/TableHeader/TableHeader.js.map +1 -0
  249. package/lib-commonjs/components/TableHeader/TableHeader.types.js +6 -0
  250. package/lib-commonjs/components/TableHeader/TableHeader.types.js.map +1 -0
  251. package/lib-commonjs/components/TableHeader/index.js +18 -0
  252. package/lib-commonjs/components/TableHeader/index.js.map +1 -0
  253. package/lib-commonjs/components/TableHeader/renderTableHeader.js +26 -0
  254. package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -0
  255. package/lib-commonjs/components/TableHeader/useTableHeader.js +51 -0
  256. package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -0
  257. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js +51 -0
  258. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js.map +1 -0
  259. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js +26 -0
  260. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js.map +1 -0
  261. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js +6 -0
  262. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -0
  263. package/lib-commonjs/components/TableHeaderCell/index.js +18 -0
  264. package/lib-commonjs/components/TableHeaderCell/index.js.map +1 -0
  265. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js +28 -0
  266. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -0
  267. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +76 -0
  268. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -0
  269. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js +117 -0
  270. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -0
  271. package/lib-commonjs/components/TableRow/TableRow.js +26 -0
  272. package/lib-commonjs/components/TableRow/TableRow.js.map +1 -0
  273. package/lib-commonjs/components/TableRow/TableRow.types.js +6 -0
  274. package/lib-commonjs/components/TableRow/TableRow.types.js.map +1 -0
  275. package/lib-commonjs/components/TableRow/index.js +18 -0
  276. package/lib-commonjs/components/TableRow/index.js.map +1 -0
  277. package/lib-commonjs/components/TableRow/renderTableRow.js +27 -0
  278. package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -0
  279. package/lib-commonjs/components/TableRow/useTableRow.js +45 -0
  280. package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -0
  281. package/lib-commonjs/components/TableRow/useTableRowStyles.js +100 -0
  282. package/lib-commonjs/components/TableRow/useTableRowStyles.js.map +1 -0
  283. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js +26 -0
  284. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js.map +1 -0
  285. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js +6 -0
  286. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -0
  287. package/lib-commonjs/components/TableSelectionCell/index.js +18 -0
  288. package/lib-commonjs/components/TableSelectionCell/index.js.map +1 -0
  289. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js +28 -0
  290. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -0
  291. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js +62 -0
  292. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -0
  293. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js +91 -0
  294. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -0
  295. package/lib-commonjs/contexts/tableContext.js +25 -0
  296. package/lib-commonjs/contexts/tableContext.js.map +1 -0
  297. package/lib-commonjs/hooks/index.js +16 -0
  298. package/lib-commonjs/hooks/index.js.map +1 -0
  299. package/lib-commonjs/hooks/selectionManager.js +98 -0
  300. package/lib-commonjs/hooks/selectionManager.js.map +1 -0
  301. package/lib-commonjs/hooks/types.js +6 -0
  302. package/lib-commonjs/hooks/types.js.map +1 -0
  303. package/lib-commonjs/hooks/useSelection.js +89 -0
  304. package/lib-commonjs/hooks/useSelection.js.map +1 -0
  305. package/lib-commonjs/hooks/useSort.js +107 -0
  306. package/lib-commonjs/hooks/useSort.js.map +1 -0
  307. package/lib-commonjs/hooks/useTable.js +42 -0
  308. package/lib-commonjs/hooks/useTable.js.map +1 -0
  309. package/lib-commonjs/index.js +377 -0
  310. package/lib-commonjs/index.js.map +1 -0
  311. package/lib-commonjs/navigationModes/cell.js +259 -0
  312. package/lib-commonjs/navigationModes/cell.js.map +1 -0
  313. package/lib-commonjs/navigationModes/composite.js +217 -0
  314. package/lib-commonjs/navigationModes/composite.js.map +1 -0
  315. package/lib-commonjs/navigationModes/index.js +16 -0
  316. package/lib-commonjs/navigationModes/index.js.map +1 -0
  317. package/lib-commonjs/navigationModes/useNavigationMode.js +55 -0
  318. package/lib-commonjs/navigationModes/useNavigationMode.js.map +1 -0
  319. package/package.json +50 -0
@@ -0,0 +1,208 @@
1
+ export function applyCompositeNavigation(element) {
2
+ const container = element;
3
+ let mode = 'row';
4
+ let movingOut = false;
5
+ const pre = document.createElement('div');
6
+ const post = document.createElement('div');
7
+
8
+ if (!pre || !post) {
9
+ return;
10
+ }
11
+
12
+ pre.tabIndex = 0;
13
+ post.tabIndex = 0;
14
+ pre.addEventListener('focus', () => {
15
+ if (movingOut) {
16
+ movingOut = false;
17
+ return;
18
+ } else {
19
+ treeWalker.currentNode = container;
20
+ mode = 'row';
21
+ const candidate = treeWalker.nextNode();
22
+
23
+ if (isHTMLElement(candidate)) {
24
+ candidate.focus();
25
+ }
26
+ }
27
+ });
28
+ post.addEventListener('focus', () => {
29
+ if (movingOut) {
30
+ movingOut = false;
31
+ return;
32
+ } else {
33
+ treeWalker.currentNode = post;
34
+ mode = 'row';
35
+ const candidate = treeWalker.previousNode();
36
+
37
+ if (isHTMLElement(candidate)) {
38
+ candidate.focus();
39
+ }
40
+ }
41
+ });
42
+ container.before(pre);
43
+ container.after(post);
44
+
45
+ const acceptNode = node => {
46
+ if (!isHTMLElement(node)) {
47
+ return NodeFilter.FILTER_SKIP;
48
+ }
49
+
50
+ if (!isCell(node) && !isRow(node)) {
51
+ return NodeFilter.FILTER_SKIP;
52
+ }
53
+
54
+ if (mode === 'column' && isRow(node)) {
55
+ return NodeFilter.FILTER_REJECT;
56
+ }
57
+
58
+ if (mode === 'row' && isCell(node)) {
59
+ return NodeFilter.FILTER_REJECT;
60
+ }
61
+
62
+ if (node.tabIndex < 0) {
63
+ return NodeFilter.FILTER_SKIP;
64
+ }
65
+
66
+ return NodeFilter.FILTER_ACCEPT;
67
+ };
68
+
69
+ const treeWalker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
70
+ acceptNode
71
+ });
72
+
73
+ const up = current => {
74
+ const prevMode = mode;
75
+ mode = 'row';
76
+ treeWalker.currentNode = current;
77
+
78
+ if (prevMode === 'column') {
79
+ treeWalker.previousNode();
80
+ }
81
+
82
+ const node = treeWalker.previousNode();
83
+
84
+ if (isHTMLElement(node)) {
85
+ return node;
86
+ }
87
+
88
+ return null;
89
+ };
90
+
91
+ const down = current => {
92
+ mode = 'row';
93
+ treeWalker.currentNode = current;
94
+ const node = treeWalker.nextNode();
95
+
96
+ if (isHTMLElement(node)) {
97
+ return node;
98
+ }
99
+
100
+ return null;
101
+ };
102
+
103
+ const left = current => {
104
+ treeWalker.currentNode = current;
105
+ const prevMode = mode;
106
+ mode = 'column';
107
+ let node = null;
108
+
109
+ if (prevMode === 'row') {
110
+ let tmp = null;
111
+
112
+ while (tmp = treeWalker.nextNode()) {
113
+ node = tmp;
114
+ }
115
+ } else {
116
+ node = treeWalker.previousNode();
117
+ }
118
+
119
+ if (isHTMLElement(node)) {
120
+ return node;
121
+ }
122
+
123
+ return null;
124
+ };
125
+
126
+ const right = current => {
127
+ mode = 'column';
128
+ treeWalker.currentNode = current;
129
+ const node = treeWalker.nextNode();
130
+
131
+ if (isHTMLElement(node)) {
132
+ return node;
133
+ }
134
+
135
+ return null;
136
+ };
137
+
138
+ const onKeyDown = e => {
139
+ const target = e.target;
140
+
141
+ if (!target || !isHTMLElement(target)) {
142
+ return;
143
+ }
144
+
145
+ let next = null;
146
+
147
+ switch (e.key) {
148
+ case 'ArrowDown':
149
+ next = down(target);
150
+ break;
151
+
152
+ case 'ArrowUp':
153
+ next = up(target);
154
+ break;
155
+
156
+ case 'ArrowLeft':
157
+ next = left(target);
158
+ break;
159
+
160
+ case 'ArrowRight':
161
+ next = right(target);
162
+ break;
163
+
164
+ case 'Tab':
165
+ movingOut = true;
166
+
167
+ if (e.shiftKey) {
168
+ pre.focus();
169
+ } else {
170
+ post.focus();
171
+ }
172
+
173
+ break;
174
+
175
+ default:
176
+ break;
177
+ }
178
+
179
+ if (next) {
180
+ e.preventDefault();
181
+ next.focus();
182
+ }
183
+ };
184
+
185
+ container.addEventListener('keydown', onKeyDown);
186
+ return () => container.removeEventListener('keydown', onKeyDown);
187
+ }
188
+
189
+ function isHTMLElement(node) {
190
+ return node instanceof HTMLElement;
191
+ }
192
+
193
+ function isRow(element) {
194
+ if (element.getAttribute('role') === 'row' || element.tagName === 'TR') {
195
+ return true;
196
+ }
197
+
198
+ return false;
199
+ }
200
+
201
+ function isCell(element) {
202
+ if (element.getAttribute('role') === 'cell' || element.getAttribute('role') === 'gridcell' || element.tagName === 'TD') {
203
+ return true;
204
+ }
205
+
206
+ return false;
207
+ }
208
+ //# sourceMappingURL=composite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../packages/react-components/react-table/src/navigationModes/composite.ts"],"names":[],"mappings":"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","sourcesContent":["export function applyCompositeNavigation(element: HTMLElement) {\n const container = element;\n let mode: 'row' | 'column' = 'row';\n let movingOut = false;\n\n const pre = document.createElement('div');\n const post = document.createElement('div');\n\n if (!pre || !post) {\n return;\n }\n\n pre.tabIndex = 0;\n post.tabIndex = 0;\n\n pre.addEventListener('focus', () => {\n if (movingOut) {\n movingOut = false;\n return;\n } else {\n treeWalker.currentNode = container;\n mode = 'row';\n const candidate = treeWalker.nextNode();\n if (isHTMLElement(candidate)) {\n candidate.focus();\n }\n }\n });\n\n post.addEventListener('focus', () => {\n if (movingOut) {\n movingOut = false;\n return;\n } else {\n treeWalker.currentNode = post;\n mode = 'row';\n const candidate = treeWalker.previousNode();\n if (isHTMLElement(candidate)) {\n candidate.focus();\n }\n }\n });\n\n container.before(pre);\n container.after(post);\n\n const acceptNode = (node: Node) => {\n if (!isHTMLElement(node)) {\n return NodeFilter.FILTER_SKIP;\n }\n\n if (!isCell(node) && !isRow(node)) {\n return NodeFilter.FILTER_SKIP;\n }\n\n if (mode === 'column' && isRow(node)) {\n return NodeFilter.FILTER_REJECT;\n }\n\n if (mode === 'row' && isCell(node)) {\n return NodeFilter.FILTER_REJECT;\n }\n\n if (node.tabIndex < 0) {\n return NodeFilter.FILTER_SKIP;\n }\n\n return NodeFilter.FILTER_ACCEPT;\n };\n\n const treeWalker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, { acceptNode });\n\n const up = (current: HTMLElement) => {\n const prevMode = mode;\n mode = 'row';\n treeWalker.currentNode = current;\n\n if (prevMode === 'column') {\n treeWalker.previousNode();\n }\n\n const node = treeWalker.previousNode();\n if (isHTMLElement(node)) {\n return node;\n }\n return null;\n };\n\n const down = (current: HTMLElement) => {\n mode = 'row';\n treeWalker.currentNode = current;\n const node = treeWalker.nextNode();\n if (isHTMLElement(node)) {\n return node;\n }\n return null;\n };\n\n const left = (current: HTMLElement) => {\n treeWalker.currentNode = current;\n const prevMode = mode;\n mode = 'column';\n let node: Node | null = null;\n\n if (prevMode === 'row') {\n let tmp: Node | null = null;\n while ((tmp = treeWalker.nextNode())) {\n node = tmp;\n }\n } else {\n node = treeWalker.previousNode();\n }\n\n if (isHTMLElement(node)) {\n return node;\n }\n return null;\n };\n\n const right = (current: HTMLElement) => {\n mode = 'column';\n treeWalker.currentNode = current;\n const node = treeWalker.nextNode();\n if (isHTMLElement(node)) {\n return node;\n }\n return null;\n };\n\n const onKeyDown = (e: KeyboardEvent) => {\n const target = e.target;\n if (!target || !isHTMLElement(target)) {\n return;\n }\n\n let next: HTMLElement | null = null;\n\n switch (e.key) {\n case 'ArrowDown':\n next = down(target);\n break;\n case 'ArrowUp':\n next = up(target);\n break;\n case 'ArrowLeft':\n next = left(target);\n break;\n case 'ArrowRight':\n next = right(target);\n break;\n case 'Tab':\n movingOut = true;\n if (e.shiftKey) {\n pre.focus();\n } else {\n post.focus();\n }\n\n break;\n default:\n break;\n }\n\n if (next) {\n e.preventDefault();\n next.focus();\n }\n };\n\n container.addEventListener('keydown', onKeyDown);\n return () => container.removeEventListener('keydown', onKeyDown);\n}\n\nfunction isHTMLElement(node: unknown): node is HTMLElement {\n return node instanceof HTMLElement;\n}\n\nfunction isRow(element: HTMLElement) {\n if (element.getAttribute('role') === 'row' || element.tagName === 'TR') {\n return true;\n }\n\n return false;\n}\n\nfunction isCell(element: HTMLElement) {\n if (\n element.getAttribute('role') === 'cell' ||\n element.getAttribute('role') === 'gridcell' ||\n element.tagName === 'TD'\n ) {\n return true;\n }\n\n return false;\n}\n"],"sourceRoot":""}
@@ -0,0 +1,3 @@
1
+ // eslint-disable-next-line deprecation/deprecation
2
+ export { useNavigationMode } from './useNavigationMode';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/react-components/react-table/src/navigationModes/index.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC","sourcesContent":["// eslint-disable-next-line deprecation/deprecation\nexport { useNavigationMode } from './useNavigationMode';\n"]}
@@ -0,0 +1,42 @@
1
+ import * as React from 'react';
2
+ import { useArrowNavigationGroup } from '@fluentui/react-tabster';
3
+ import { applyCompositeNavigation } from './composite';
4
+ import { applyCellNavigation } from './cell';
5
+ /**
6
+ * THIS HOOK WILL NOT EXIST IN STABLE RELEASE
7
+ * Just a quick workaround before tabster fully supports these navigation modes with grid mode
8
+ * https://github.com/microsoft/fluentui/issues/24382
9
+ * @internal
10
+ * @deprecated
11
+ */
12
+
13
+ export function useNavigationMode(mode) {
14
+ const rowNavigationAttr = useArrowNavigationGroup({
15
+ axis: 'vertical'
16
+ });
17
+ const ref = React.useRef(null);
18
+ React.useEffect(() => {
19
+ if (!ref.current) {
20
+ return;
21
+ }
22
+
23
+ switch (mode) {
24
+ case 'cell':
25
+ applyCellNavigation(ref.current);
26
+ break;
27
+
28
+ case 'composite':
29
+ applyCompositeNavigation(ref.current);
30
+ break;
31
+
32
+ case 'row':
33
+ if (rowNavigationAttr['data-tabster']) {
34
+ ref.current.setAttribute('data-tabster', rowNavigationAttr['data-tabster']);
35
+ }
36
+
37
+ break;
38
+ }
39
+ }, [rowNavigationAttr, mode]);
40
+ return ref;
41
+ }
42
+ //# sourceMappingURL=useNavigationMode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../packages/react-components/react-table/src/navigationModes/useNavigationMode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,uBAAT,QAAwC,yBAAxC;AACA,SAAS,wBAAT,QAAyC,aAAzC;AACA,SAAS,mBAAT,QAAoC,QAApC;AAIA;;;;;;AAMG;;AACH,OAAM,SAAU,iBAAV,CAA0D,IAA1D,EAA8E;EAClF,MAAM,iBAAiB,GAAG,uBAAuB,CAAC;IAAE,IAAI,EAAE;EAAR,CAAD,CAAjD;EACA,MAAM,GAAG,GAAG,KAAK,CAAC,MAAN,CAAuB,IAAvB,CAAZ;EAEA,KAAK,CAAC,SAAN,CAAgB,MAAK;IACnB,IAAI,CAAC,GAAG,CAAC,OAAT,EAAkB;MAChB;IACD;;IAED,QAAQ,IAAR;MACE,KAAK,MAAL;QACE,mBAAmB,CAAC,GAAG,CAAC,OAAL,CAAnB;QACA;;MACF,KAAK,WAAL;QACE,wBAAwB,CAAC,GAAG,CAAC,OAAL,CAAxB;QACA;;MACF,KAAK,KAAL;QACE,IAAI,iBAAiB,CAAC,cAAD,CAArB,EAAuC;UACrC,GAAG,CAAC,OAAJ,CAAY,YAAZ,CAAyB,cAAzB,EAAyC,iBAAiB,CAAC,cAAD,CAA1D;QACD;;QACD;IAXJ;EAaD,CAlBD,EAkBG,CAAC,iBAAD,EAAoB,IAApB,CAlBH;EAoBA,OAAO,GAAP;AACD","sourcesContent":["import * as React from 'react';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport { applyCompositeNavigation } from './composite';\nimport { applyCellNavigation } from './cell';\n\nexport type NavigationMode = 'row' | 'cell' | 'composite';\n\n/**\n * THIS HOOK WILL NOT EXIST IN STABLE RELEASE\n * Just a quick workaround before tabster fully supports these navigation modes with grid mode\n * https://github.com/microsoft/fluentui/issues/24382\n * @internal\n * @deprecated\n */\nexport function useNavigationMode<TElement extends HTMLElement>(mode: NavigationMode) {\n const rowNavigationAttr = useArrowNavigationGroup({ axis: 'vertical' });\n const ref = React.useRef<TElement>(null);\n\n React.useEffect(() => {\n if (!ref.current) {\n return;\n }\n\n switch (mode) {\n case 'cell':\n applyCellNavigation(ref.current);\n break;\n case 'composite':\n applyCompositeNavigation(ref.current);\n break;\n case 'row':\n if (rowNavigationAttr['data-tabster']) {\n ref.current.setAttribute('data-tabster', rowNavigationAttr['data-tabster']);\n }\n break;\n }\n }, [rowNavigationAttr, mode]);\n\n return ref;\n}\n"],"sourceRoot":""}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
+
9
+ tslib_1.__exportStar(require("./components/Table/index"), exports);
10
+ //# sourceMappingURL=Table.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../packages/react-components/react-table/src/Table.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/Table/index';\n"],"sourceRoot":""}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
+
9
+ tslib_1.__exportStar(require("./components/TableBody/index"), exports);
10
+ //# sourceMappingURL=TableBody.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../packages/react-components/react-table/src/TableBody.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,8BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableBody/index';\n"],"sourceRoot":""}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
+
9
+ tslib_1.__exportStar(require("./components/TableCell/index"), exports);
10
+ //# sourceMappingURL=TableCell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../packages/react-components/react-table/src/TableCell.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,8BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableCell/index';\n"],"sourceRoot":""}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
+
9
+ tslib_1.__exportStar(require("./components/TableCellActions/index"), exports);
10
+ //# sourceMappingURL=TableCellActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../packages/react-components/react-table/src/TableCellActions.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableCellActions/index';\n"],"sourceRoot":""}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
+
9
+ tslib_1.__exportStar(require("./components/TableCellLayout/index"), exports);
10
+ //# sourceMappingURL=TableCellLayout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../packages/react-components/react-table/src/TableCellLayout.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableCellLayout/index';\n"],"sourceRoot":""}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
+
9
+ tslib_1.__exportStar(require("./components/TableCellLayout/index"), exports);
10
+ //# sourceMappingURL=TableCellPrimaryLayout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../packages/react-components/react-table/src/TableCellPrimaryLayout.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableCellLayout/index';\n"],"sourceRoot":""}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
+
9
+ tslib_1.__exportStar(require("./components/TableHeader/index"), exports);
10
+ //# sourceMappingURL=TableHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../packages/react-components/react-table/src/TableHeader.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableHeader/index';\n"],"sourceRoot":""}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
+
9
+ tslib_1.__exportStar(require("./components/TableHeaderCell/index"), exports);
10
+ //# sourceMappingURL=TableHeaderCell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../packages/react-components/react-table/src/TableHeaderCell.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableHeaderCell/index';\n"],"sourceRoot":""}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
+
9
+ tslib_1.__exportStar(require("./components/TableRow/index"), exports);
10
+ //# sourceMappingURL=TableRow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../packages/react-components/react-table/src/TableRow.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,6BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableRow/index';\n"],"sourceRoot":""}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
+
9
+ tslib_1.__exportStar(require("./components/TableSelectionCell/index"), exports);
10
+ //# sourceMappingURL=TableSelectionCell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../packages/react-components/react-table/src/TableSelectionCell.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,uCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/TableSelectionCell/index';\n"],"sourceRoot":""}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Table = void 0;
7
+
8
+ const React = /*#__PURE__*/require("react");
9
+
10
+ const useTable_1 = /*#__PURE__*/require("./useTable");
11
+
12
+ const renderTable_1 = /*#__PURE__*/require("./renderTable");
13
+
14
+ const useTableStyles_1 = /*#__PURE__*/require("./useTableStyles");
15
+
16
+ const useTableContextValues_1 = /*#__PURE__*/require("./useTableContextValues");
17
+ /**
18
+ * Table component - TODO: add more docs
19
+ */
20
+
21
+
22
+ exports.Table = /*#__PURE__*/React.forwardRef((props, ref) => {
23
+ const state = useTable_1.useTable_unstable(props, ref);
24
+ useTableStyles_1.useTableStyles_unstable(state);
25
+ return renderTable_1.renderTable_unstable(state, useTableContextValues_1.useTableContextValues_unstable(state));
26
+ });
27
+ exports.Table.displayName = 'Table';
28
+ //# sourceMappingURL=Table.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../../packages/react-components/react-table/src/components/Table/Table.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,UAAA,gBAAA,OAAA,CAAA,YAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AAGA,MAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAEA;;AAEG;;;AACU,OAAA,CAAA,KAAA,gBAAyC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACpF,MAAM,KAAK,GAAG,UAAA,CAAA,iBAAA,CAAkB,KAAlB,EAAyB,GAAzB,CAAd;EAEA,gBAAA,CAAA,uBAAA,CAAwB,KAAxB;EACA,OAAO,aAAA,CAAA,oBAAA,CAAqB,KAArB,EAA4B,uBAAA,CAAA,8BAAA,CAA+B,KAA/B,CAA5B,CAAP;AACD,CALqD,CAAzC;AAOb,OAAA,CAAA,KAAA,CAAM,WAAN,GAAoB,OAApB","sourcesContent":["import * as React from 'react';\nimport { useTable_unstable } from './useTable';\nimport { renderTable_unstable } from './renderTable';\nimport { useTableStyles_unstable } from './useTableStyles';\nimport type { TableProps } from './Table.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useTableContextValues_unstable } from './useTableContextValues';\n\n/**\n * Table component - TODO: add more docs\n */\nexport const Table: ForwardRefComponent<TableProps> = React.forwardRef((props, ref) => {\n const state = useTable_unstable(props, ref);\n\n useTableStyles_unstable(state);\n return renderTable_unstable(state, useTableContextValues_unstable(state));\n});\n\nTable.displayName = 'Table';\n"],"sourceRoot":""}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=Table.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
+
9
+ tslib_1.__exportStar(require("./Table"), exports);
10
+
11
+ tslib_1.__exportStar(require("./Table.types"), exports);
12
+
13
+ tslib_1.__exportStar(require("./renderTable"), exports);
14
+
15
+ tslib_1.__exportStar(require("./useTable"), exports);
16
+
17
+ tslib_1.__exportStar(require("./useTableStyles"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../../packages/react-components/react-table/src/components/Table/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,SAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './Table';\nexport * from './Table.types';\nexport * from './renderTable';\nexport * from './useTable';\nexport * from './useTableStyles';\n"],"sourceRoot":""}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.renderTable_unstable = void 0;
7
+
8
+ const React = /*#__PURE__*/require("react");
9
+
10
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
+
12
+ const tableContext_1 = /*#__PURE__*/require("../../contexts/tableContext");
13
+ /**
14
+ * Render the final JSX of Table
15
+ */
16
+
17
+
18
+ const renderTable_unstable = (state, contextValues) => {
19
+ const {
20
+ slots,
21
+ slotProps
22
+ } = react_utilities_1.getSlots(state);
23
+ return React.createElement(tableContext_1.TableContextProvider, {
24
+ value: contextValues.table
25
+ }, React.createElement(slots.root, { ...slotProps.root
26
+ }));
27
+ };
28
+
29
+ exports.renderTable_unstable = renderTable_unstable;
30
+ //# sourceMappingURL=renderTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../../packages/react-components/react-table/src/components/Table/renderTable.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEA,MAAA,cAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;AAEA;;AAEG;;;AACI,MAAM,oBAAoB,GAAG,CAAC,KAAD,EAAoB,aAApB,KAAyD;EAC3F,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,iBAAA,CAAA,QAAA,CAAqB,KAArB,CAA7B;EAEA,OACE,KAAA,CAAA,aAAA,CAAC,cAAA,CAAA,oBAAD,EAAqB;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAArB,EACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CADF,CADF;AAKD,CARM;;AAAM,OAAA,CAAA,oBAAA,GAAoB,oBAApB","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableState, TableSlots, TableContextValues } from './Table.types';\nimport { TableContextProvider } from '../../contexts/tableContext';\n\n/**\n * Render the final JSX of Table\n */\nexport const renderTable_unstable = (state: TableState, contextValues: TableContextValues) => {\n const { slots, slotProps } = getSlots<TableSlots>(state);\n\n return (\n <TableContextProvider value={contextValues.table}>\n <slots.root {...slotProps.root} />\n </TableContextProvider>\n );\n};\n"],"sourceRoot":""}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useTable_unstable = void 0;
7
+
8
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
9
+ /**
10
+ * Create the state required to render Table.
11
+ *
12
+ * The returned state can be modified with hooks such as useTableStyles_unstable,
13
+ * before being passed to renderTable_unstable.
14
+ *
15
+ * @param props - props from this instance of Table
16
+ * @param ref - reference to root HTMLElement of Table
17
+ */
18
+
19
+
20
+ const useTable_unstable = (props, ref) => {
21
+ var _a, _b, _c, _d;
22
+
23
+ const rootComponent = ((_a = props.as) !== null && _a !== void 0 ? _a : props.noNativeElements) ? 'div' : 'table';
24
+ return {
25
+ components: {
26
+ root: rootComponent
27
+ },
28
+ root: react_utilities_1.getNativeElementProps(rootComponent, {
29
+ ref,
30
+ role: rootComponent === 'div' ? 'table' : undefined,
31
+ ...props
32
+ }),
33
+ size: (_b = props.size) !== null && _b !== void 0 ? _b : 'medium',
34
+ noNativeElements: (_c = props.noNativeElements) !== null && _c !== void 0 ? _c : false,
35
+ sortable: (_d = props.sortable) !== null && _d !== void 0 ? _d : false
36
+ };
37
+ };
38
+
39
+ exports.useTable_unstable = useTable_unstable;
40
+ //# sourceMappingURL=useTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../../packages/react-components/react-table/src/components/Table/useTable.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;;;;;;;AAQG;;;AACI,MAAM,iBAAiB,GAAG,CAAC,KAAD,EAAoB,GAApB,KAA+D;;;EAC9F,MAAM,aAAa,GAAG,CAAA,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,KAAK,CAAC,gBAAlB,IAAqC,KAArC,GAA6C,OAAnE;EAEA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,aAAtB,EAAqC;MACzC,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,OAA1B,GAAoC,SAFD;MAGzC,GAAG;IAHsC,CAArC,CAJD;IASL,IAAI,EAAE,CAAA,EAAA,GAAA,KAAK,CAAC,IAAN,MAAU,IAAV,IAAU,EAAA,KAAA,KAAA,CAAV,GAAU,EAAV,GAAc,QATf;IAUL,gBAAgB,EAAE,CAAA,EAAA,GAAA,KAAK,CAAC,gBAAN,MAAsB,IAAtB,IAAsB,EAAA,KAAA,KAAA,CAAtB,GAAsB,EAAtB,GAA0B,KAVvC;IAWL,QAAQ,EAAE,CAAA,EAAA,GAAA,KAAK,CAAC,QAAN,MAAc,IAAd,IAAc,EAAA,KAAA,KAAA,CAAd,GAAc,EAAd,GAAkB;EAXvB,CAAP;AAaD,CAhBM;;AAAM,OAAA,CAAA,iBAAA,GAAiB,iBAAjB","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { TableProps, TableState } from './Table.types';\n\n/**\n * Create the state required to render Table.\n *\n * The returned state can be modified with hooks such as useTableStyles_unstable,\n * before being passed to renderTable_unstable.\n *\n * @param props - props from this instance of Table\n * @param ref - reference to root HTMLElement of Table\n */\nexport const useTable_unstable = (props: TableProps, ref: React.Ref<HTMLElement>): TableState => {\n const rootComponent = props.as ?? props.noNativeElements ? 'div' : 'table';\n\n return {\n components: {\n root: rootComponent,\n },\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'table' : undefined,\n ...props,\n }),\n size: props.size ?? 'medium',\n noNativeElements: props.noNativeElements ?? false,\n sortable: props.sortable ?? false,\n };\n};\n"],"sourceRoot":""}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useTableContextValues_unstable = void 0;
7
+
8
+ const React = /*#__PURE__*/require("react");
9
+
10
+ function useTableContextValues_unstable(state) {
11
+ const {
12
+ size,
13
+ noNativeElements,
14
+ sortable
15
+ } = state;
16
+ const tableContext = React.useMemo(() => ({
17
+ noNativeElements,
18
+ size,
19
+ sortable
20
+ }), [noNativeElements, size, sortable]);
21
+ return {
22
+ table: tableContext
23
+ };
24
+ }
25
+
26
+ exports.useTableContextValues_unstable = useTableContextValues_unstable;
27
+ //# sourceMappingURL=useTableContextValues.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../../packages/react-components/react-table/src/components/Table/useTableContextValues.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAGA,SAAgB,8BAAhB,CAA+C,KAA/C,EAAgE;EAC9D,MAAM;IAAE,IAAF;IAAQ,gBAAR;IAA0B;EAA1B,IAAuC,KAA7C;EAEA,MAAM,YAAY,GAAG,KAAK,CAAC,OAAN,CACnB,OAAO;IACL,gBADK;IAEL,IAFK;IAGL;EAHK,CAAP,CADmB,EAMnB,CAAC,gBAAD,EAAmB,IAAnB,EAAyB,QAAzB,CANmB,CAArB;EASA,OAAO;IACL,KAAK,EAAE;EADF,CAAP;AAGD;;AAfD,OAAA,CAAA,8BAAA,GAAA,8BAAA","sourcesContent":["import * as React from 'react';\nimport { TableContextValues, TableState } from './Table.types';\n\nexport function useTableContextValues_unstable(state: TableState): TableContextValues {\n const { size, noNativeElements, sortable } = state;\n\n const tableContext = React.useMemo(\n () => ({\n noNativeElements,\n size,\n sortable,\n }),\n [noNativeElements, size, sortable],\n );\n\n return {\n table: tableContext,\n };\n}\n"],"sourceRoot":""}