@fluentui/react-table 9.0.0-alpha.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 (188) hide show
  1. package/CHANGELOG.json +80 -0
  2. package/CHANGELOG.md +36 -0
  3. package/LICENSE +15 -0
  4. package/README.md +5 -0
  5. package/Spec.md +63 -0
  6. package/dist/index.d.ts +321 -0
  7. package/dist/tsdoc-metadata.json +11 -0
  8. package/lib/Table.js +2 -0
  9. package/lib/Table.js.map +1 -0
  10. package/lib/TableBody.js +2 -0
  11. package/lib/TableBody.js.map +1 -0
  12. package/lib/TableCell.js +2 -0
  13. package/lib/TableCell.js.map +1 -0
  14. package/lib/TableHeader.js +2 -0
  15. package/lib/TableHeader.js.map +1 -0
  16. package/lib/TableHeaderCell.js +2 -0
  17. package/lib/TableHeaderCell.js.map +1 -0
  18. package/lib/TableRow.js +2 -0
  19. package/lib/TableRow.js.map +1 -0
  20. package/lib/components/Table/Table.js +16 -0
  21. package/lib/components/Table/Table.js.map +1 -0
  22. package/lib/components/Table/Table.types.js +2 -0
  23. package/lib/components/Table/Table.types.js.map +1 -0
  24. package/lib/components/Table/index.js +6 -0
  25. package/lib/components/Table/index.js.map +1 -0
  26. package/lib/components/Table/renderTable.js +18 -0
  27. package/lib/components/Table/renderTable.js.map +1 -0
  28. package/lib/components/Table/useTable.js +30 -0
  29. package/lib/components/Table/useTable.js.map +1 -0
  30. package/lib/components/Table/useTableContextValues.js +15 -0
  31. package/lib/components/Table/useTableContextValues.js.map +1 -0
  32. package/lib/components/Table/useTableStyles.js +27 -0
  33. package/lib/components/Table/useTableStyles.js.map +1 -0
  34. package/lib/components/TableBody/TableBody.js +15 -0
  35. package/lib/components/TableBody/TableBody.js.map +1 -0
  36. package/lib/components/TableBody/TableBody.types.js +2 -0
  37. package/lib/components/TableBody/TableBody.types.js.map +1 -0
  38. package/lib/components/TableBody/index.js +6 -0
  39. package/lib/components/TableBody/index.js.map +1 -0
  40. package/lib/components/TableBody/renderTableBody.js +16 -0
  41. package/lib/components/TableBody/renderTableBody.js.map +1 -0
  42. package/lib/components/TableBody/useTableBody.js +29 -0
  43. package/lib/components/TableBody/useTableBody.js.map +1 -0
  44. package/lib/components/TableBody/useTableBodyStyles.js +14 -0
  45. package/lib/components/TableBody/useTableBodyStyles.js.map +1 -0
  46. package/lib/components/TableCell/TableCell.js +15 -0
  47. package/lib/components/TableCell/TableCell.js.map +1 -0
  48. package/lib/components/TableCell/TableCell.types.js +2 -0
  49. package/lib/components/TableCell/TableCell.types.js.map +1 -0
  50. package/lib/components/TableCell/index.js +6 -0
  51. package/lib/components/TableCell/index.js.map +1 -0
  52. package/lib/components/TableCell/renderTableCell.js +17 -0
  53. package/lib/components/TableCell/renderTableCell.js.map +1 -0
  54. package/lib/components/TableCell/useTableCell.js +31 -0
  55. package/lib/components/TableCell/useTableCell.js.map +1 -0
  56. package/lib/components/TableCell/useTableCellStyles.js +48 -0
  57. package/lib/components/TableCell/useTableCellStyles.js.map +1 -0
  58. package/lib/components/TableHeader/TableHeader.js +15 -0
  59. package/lib/components/TableHeader/TableHeader.js.map +1 -0
  60. package/lib/components/TableHeader/TableHeader.types.js +2 -0
  61. package/lib/components/TableHeader/TableHeader.types.js.map +1 -0
  62. package/lib/components/TableHeader/index.js +6 -0
  63. package/lib/components/TableHeader/index.js.map +1 -0
  64. package/lib/components/TableHeader/renderTableHeader.js +15 -0
  65. package/lib/components/TableHeader/renderTableHeader.js.map +1 -0
  66. package/lib/components/TableHeader/useTableHeader.js +36 -0
  67. package/lib/components/TableHeader/useTableHeader.js.map +1 -0
  68. package/lib/components/TableHeader/useTableHeaderStyles.js +14 -0
  69. package/lib/components/TableHeader/useTableHeaderStyles.js.map +1 -0
  70. package/lib/components/TableHeaderCell/TableHeaderCell.js +15 -0
  71. package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -0
  72. package/lib/components/TableHeaderCell/TableHeaderCell.types.js +2 -0
  73. package/lib/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -0
  74. package/lib/components/TableHeaderCell/index.js +6 -0
  75. package/lib/components/TableHeaderCell/index.js.map +1 -0
  76. package/lib/components/TableHeaderCell/renderTableHeaderCell.js +17 -0
  77. package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -0
  78. package/lib/components/TableHeaderCell/useTableHeaderCell.js +59 -0
  79. package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -0
  80. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js +80 -0
  81. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -0
  82. package/lib/components/TableRow/TableRow.js +15 -0
  83. package/lib/components/TableRow/TableRow.js.map +1 -0
  84. package/lib/components/TableRow/TableRow.types.js +2 -0
  85. package/lib/components/TableRow/TableRow.types.js.map +1 -0
  86. package/lib/components/TableRow/index.js +6 -0
  87. package/lib/components/TableRow/index.js.map +1 -0
  88. package/lib/components/TableRow/renderTableRow.js +16 -0
  89. package/lib/components/TableRow/renderTableRow.js.map +1 -0
  90. package/lib/components/TableRow/useTableRow.js +31 -0
  91. package/lib/components/TableRow/useTableRow.js.map +1 -0
  92. package/lib/components/TableRow/useTableRowStyles.js +47 -0
  93. package/lib/components/TableRow/useTableRowStyles.js.map +1 -0
  94. package/lib/contexts/tableContext.js +10 -0
  95. package/lib/contexts/tableContext.js.map +1 -0
  96. package/lib/index.js +8 -0
  97. package/lib/index.js.map +1 -0
  98. package/lib-commonjs/Table.js +10 -0
  99. package/lib-commonjs/Table.js.map +1 -0
  100. package/lib-commonjs/TableBody.js +10 -0
  101. package/lib-commonjs/TableBody.js.map +1 -0
  102. package/lib-commonjs/TableCell.js +10 -0
  103. package/lib-commonjs/TableCell.js.map +1 -0
  104. package/lib-commonjs/TableHeader.js +10 -0
  105. package/lib-commonjs/TableHeader.js.map +1 -0
  106. package/lib-commonjs/TableHeaderCell.js +10 -0
  107. package/lib-commonjs/TableHeaderCell.js.map +1 -0
  108. package/lib-commonjs/TableRow.js +10 -0
  109. package/lib-commonjs/TableRow.js.map +1 -0
  110. package/lib-commonjs/components/Table/Table.js +28 -0
  111. package/lib-commonjs/components/Table/Table.js.map +1 -0
  112. package/lib-commonjs/components/Table/Table.types.js +6 -0
  113. package/lib-commonjs/components/Table/Table.types.js.map +1 -0
  114. package/lib-commonjs/components/Table/index.js +18 -0
  115. package/lib-commonjs/components/Table/index.js.map +1 -0
  116. package/lib-commonjs/components/Table/renderTable.js +30 -0
  117. package/lib-commonjs/components/Table/renderTable.js.map +1 -0
  118. package/lib-commonjs/components/Table/useTable.js +40 -0
  119. package/lib-commonjs/components/Table/useTable.js.map +1 -0
  120. package/lib-commonjs/components/Table/useTableContextValues.js +24 -0
  121. package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -0
  122. package/lib-commonjs/components/Table/useTableStyles.js +37 -0
  123. package/lib-commonjs/components/Table/useTableStyles.js.map +1 -0
  124. package/lib-commonjs/components/TableBody/TableBody.js +26 -0
  125. package/lib-commonjs/components/TableBody/TableBody.js.map +1 -0
  126. package/lib-commonjs/components/TableBody/TableBody.types.js +6 -0
  127. package/lib-commonjs/components/TableBody/TableBody.types.js.map +1 -0
  128. package/lib-commonjs/components/TableBody/index.js +18 -0
  129. package/lib-commonjs/components/TableBody/index.js.map +1 -0
  130. package/lib-commonjs/components/TableBody/renderTableBody.js +27 -0
  131. package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -0
  132. package/lib-commonjs/components/TableBody/useTableBody.js +40 -0
  133. package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -0
  134. package/lib-commonjs/components/TableBody/useTableBodyStyles.js +24 -0
  135. package/lib-commonjs/components/TableBody/useTableBodyStyles.js.map +1 -0
  136. package/lib-commonjs/components/TableCell/TableCell.js +26 -0
  137. package/lib-commonjs/components/TableCell/TableCell.js.map +1 -0
  138. package/lib-commonjs/components/TableCell/TableCell.types.js +6 -0
  139. package/lib-commonjs/components/TableCell/TableCell.types.js.map +1 -0
  140. package/lib-commonjs/components/TableCell/index.js +18 -0
  141. package/lib-commonjs/components/TableCell/index.js.map +1 -0
  142. package/lib-commonjs/components/TableCell/renderTableCell.js +28 -0
  143. package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -0
  144. package/lib-commonjs/components/TableCell/useTableCell.js +42 -0
  145. package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -0
  146. package/lib-commonjs/components/TableCell/useTableCellStyles.js +59 -0
  147. package/lib-commonjs/components/TableCell/useTableCellStyles.js.map +1 -0
  148. package/lib-commonjs/components/TableHeader/TableHeader.js +26 -0
  149. package/lib-commonjs/components/TableHeader/TableHeader.js.map +1 -0
  150. package/lib-commonjs/components/TableHeader/TableHeader.types.js +6 -0
  151. package/lib-commonjs/components/TableHeader/TableHeader.types.js.map +1 -0
  152. package/lib-commonjs/components/TableHeader/index.js +18 -0
  153. package/lib-commonjs/components/TableHeader/index.js.map +1 -0
  154. package/lib-commonjs/components/TableHeader/renderTableHeader.js +26 -0
  155. package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -0
  156. package/lib-commonjs/components/TableHeader/useTableHeader.js +48 -0
  157. package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -0
  158. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js +24 -0
  159. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js.map +1 -0
  160. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js +26 -0
  161. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js.map +1 -0
  162. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js +6 -0
  163. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -0
  164. package/lib-commonjs/components/TableHeaderCell/index.js +18 -0
  165. package/lib-commonjs/components/TableHeaderCell/index.js.map +1 -0
  166. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js +28 -0
  167. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -0
  168. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +73 -0
  169. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -0
  170. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js +91 -0
  171. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -0
  172. package/lib-commonjs/components/TableRow/TableRow.js +26 -0
  173. package/lib-commonjs/components/TableRow/TableRow.js.map +1 -0
  174. package/lib-commonjs/components/TableRow/TableRow.types.js +6 -0
  175. package/lib-commonjs/components/TableRow/TableRow.types.js.map +1 -0
  176. package/lib-commonjs/components/TableRow/index.js +18 -0
  177. package/lib-commonjs/components/TableRow/index.js.map +1 -0
  178. package/lib-commonjs/components/TableRow/renderTableRow.js +27 -0
  179. package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -0
  180. package/lib-commonjs/components/TableRow/useTableRow.js +42 -0
  181. package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -0
  182. package/lib-commonjs/components/TableRow/useTableRowStyles.js +58 -0
  183. package/lib-commonjs/components/TableRow/useTableRowStyles.js.map +1 -0
  184. package/lib-commonjs/contexts/tableContext.js +21 -0
  185. package/lib-commonjs/contexts/tableContext.js.map +1 -0
  186. package/lib-commonjs/index.js +256 -0
  187. package/lib-commonjs/index.js.map +1 -0
  188. package/package.json +56 -0
package/CHANGELOG.json ADDED
@@ -0,0 +1,80 @@
1
+ {
2
+ "name": "@fluentui/react-table",
3
+ "entries": [
4
+ {
5
+ "date": "Wed, 03 Aug 2022 16:00:30 GMT",
6
+ "tag": "@fluentui/react-table_v9.0.0-alpha.1",
7
+ "version": "9.0.0-alpha.1",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "lingfangao@hotmail.com",
12
+ "package": "@fluentui/react-table",
13
+ "commit": "c8e1d465e52dca6aef141437bdd0cc5a927a4d7c",
14
+ "comment": "feat: Make sorting more primitive"
15
+ },
16
+ {
17
+ "author": "lingfangao@hotmail.com",
18
+ "package": "@fluentui/react-table",
19
+ "commit": "0e1784cd430525e023a458564d232ac689e0f50a",
20
+ "comment": "feat: Release package in `alpha`"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui/react-table",
25
+ "comment": "Bump @fluentui/react-aria to v9.1.0",
26
+ "commit": "54bc6105c5c9c9023da35d4670239e44117ed4a5"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui/react-table",
31
+ "comment": "Bump @fluentui/react-tabster to v9.1.0",
32
+ "commit": "54bc6105c5c9c9023da35d4670239e44117ed4a5"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@fluentui/react-table",
37
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.12",
38
+ "commit": "54bc6105c5c9c9023da35d4670239e44117ed4a5"
39
+ }
40
+ ]
41
+ }
42
+ },
43
+ {
44
+ "date": "Thu, 14 Jul 2022 21:21:13 GMT",
45
+ "tag": "@fluentui/react-table_v9.0.0-alpha.0",
46
+ "version": "9.0.0-alpha.0",
47
+ "comments": {
48
+ "patch": [
49
+ {
50
+ "author": "beachball",
51
+ "package": "@fluentui/react-table",
52
+ "comment": "Bump @fluentui/react-utilities to v9.0.2",
53
+ "commit": "79b513146194367544160f364b0a7dd749ed93e4"
54
+ }
55
+ ]
56
+ }
57
+ },
58
+ {
59
+ "date": "Thu, 14 Jul 2022 17:06:26 GMT",
60
+ "tag": "@fluentui/react-table_v9.0.0-alpha.0",
61
+ "version": "9.0.0-alpha.0",
62
+ "comments": {
63
+ "patch": [
64
+ {
65
+ "author": "beachball",
66
+ "package": "@fluentui/react-table",
67
+ "comment": "Bump @fluentui/react-utilities to v9.0.1-0",
68
+ "commit": "35237381e941c8935b1892c9217096cea3e5601f"
69
+ },
70
+ {
71
+ "author": "beachball",
72
+ "package": "@fluentui/react-table",
73
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.11",
74
+ "commit": "35237381e941c8935b1892c9217096cea3e5601f"
75
+ }
76
+ ]
77
+ }
78
+ }
79
+ ]
80
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,36 @@
1
+ # Change Log - @fluentui/react-table
2
+
3
+ This log was last generated on Wed, 03 Aug 2022 16:00:30 GMT and should not be manually modified.
4
+
5
+ <!-- Start content -->
6
+
7
+ ## [9.0.0-alpha.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.0.0-alpha.1)
8
+
9
+ Wed, 03 Aug 2022 16:00:30 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-table_v9.0.0-alpha.0..@fluentui/react-table_v9.0.0-alpha.1)
11
+
12
+ ### Changes
13
+
14
+ - feat: Make sorting more primitive ([PR #24198](https://github.com/microsoft/fluentui/pull/24198) by lingfangao@hotmail.com)
15
+ - feat: Release package in `alpha` ([PR #24182](https://github.com/microsoft/fluentui/pull/24182) by lingfangao@hotmail.com)
16
+ - Bump @fluentui/react-aria to v9.1.0 ([PR #24201](https://github.com/microsoft/fluentui/pull/24201) by beachball)
17
+ - Bump @fluentui/react-tabster to v9.1.0 ([PR #24201](https://github.com/microsoft/fluentui/pull/24201) by beachball)
18
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.12 ([PR #24201](https://github.com/microsoft/fluentui/pull/24201) by beachball)
19
+
20
+ ## [9.0.0-alpha.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.0.0-alpha.0)
21
+
22
+ Thu, 14 Jul 2022 21:21:13 GMT
23
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-table_v9.0.0-alpha.0..@fluentui/react-table_v9.0.0-alpha.0)
24
+
25
+ ### Patches
26
+
27
+ - Bump @fluentui/react-utilities to v9.0.2 ([PR #23918](https://github.com/microsoft/fluentui/pull/23918) by beachball)
28
+
29
+ ## [9.0.0-alpha.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.0.0-alpha.0)
30
+
31
+ Thu, 14 Jul 2022 17:06:26 GMT
32
+
33
+ ### Patches
34
+
35
+ - Bump @fluentui/react-utilities to v9.0.1-0 ([PR #23897](https://github.com/microsoft/fluentui/pull/23897) by beachball)
36
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.11 ([PR #23897](https://github.com/microsoft/fluentui/pull/23897) by beachball)
package/LICENSE ADDED
@@ -0,0 +1,15 @@
1
+ @fluentui/react-table
2
+
3
+ Copyright (c) Microsoft Corporation
4
+
5
+ All rights reserved.
6
+
7
+ MIT License
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14
+
15
+ Note: Usage of the fonts and icons referenced in Fluent UI React is subject to the terms listed at https://aka.ms/fluentui-assets-license
package/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # @fluentui/react-table
2
+
3
+ **React Table components for [Fluent UI React](https://react.fluentui.dev/)**
4
+
5
+ These are not production-ready components and **should never be used in product**. This space is useful for testing new components whose APIs might change before final release.
package/Spec.md ADDED
@@ -0,0 +1,63 @@
1
+ # @fluentui/react-table Spec
2
+
3
+ ## Background
4
+
5
+ _Description and use cases of this component_
6
+
7
+ ## Prior Art
8
+
9
+ _Include background research done for this component_
10
+
11
+ - _Link to Open UI research_
12
+ - _Link to comparison of v7 and v0_
13
+ - _Link to GitHub epic issue for the converged component_
14
+
15
+ ## Sample Code
16
+
17
+ _Provide some representative example code that uses the proposed API for the component_
18
+
19
+ ## Variants
20
+
21
+ _Describe visual or functional variants of this control, if applicable. For example, a slider could have a 2D variant._
22
+
23
+ ## API
24
+
25
+ _List the **Props** and **Slots** proposed for the component. Ideally this would just be a link to the component's `.types.ts` file_
26
+
27
+ ## Structure
28
+
29
+ - _**Public**_
30
+ - _**Internal**_
31
+ - _**DOM** - how the component will be rendered as HTML elements_
32
+
33
+ ## Migration
34
+
35
+ _Describe what will need to be done to upgrade from the existing implementations:_
36
+
37
+ - _Migration from v8_
38
+ - _Migration from v0_
39
+
40
+ ## Behaviors
41
+
42
+ _Explain how the component will behave in use, including:_
43
+
44
+ - _Component States_
45
+ - _Interaction_
46
+ - _Keyboard_
47
+ - _Cursor_
48
+ - _Touch_
49
+ - _Screen readers_
50
+
51
+ ## Accessibility
52
+
53
+ Base accessibility information is included in the design document. After the spec is filled and review, outcomes from it need to be communicated to design and incorporated in the design document.
54
+
55
+ - Decide whether to use **native element** or folow **ARIA** and provide reasons
56
+ - Identify the **[ARIA](https://www.w3.org/TR/wai-aria-practices-1.2/) pattern** and, if the component is listed there, follow its specification as possible.
57
+ - Identify accessibility **variants**, the `role` ([ARIA roles](https://www.w3.org/TR/wai-aria-1.1/#role_definitions)) of the component, its `slots` and `aria-*` props.
58
+ - Describe the **keyboard navigation**: Tab Oder and Arrow Key Navigation. Describe any other keyboard **shortcuts** used
59
+ - Specify texts for **state change announcements** - [ARIA live regions
60
+ ](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions) (number of available items in dropdown, error messages, confirmations, ...)
61
+ - Identify UI parts that appear on **hover or focus** and specify keyboard and screen reader interaction with them
62
+ - List cases when **focus** needs to be **trapped** in sections of the UI (for dialogs and popups or for hierarchical navigation)
63
+ - List cases when **focus** needs to be **moved programatically** (if parts of the UI are appearing/disappearing or other cases)
@@ -0,0 +1,321 @@
1
+ /// <reference types="react" />
2
+
3
+ import { ARIAButtonSlotProps } from '@fluentui/react-aria';
4
+ import type { ComponentProps } from '@fluentui/react-utilities';
5
+ import type { ComponentState } from '@fluentui/react-utilities';
6
+ import { ContextSelector } from '@fluentui/react-context-selector';
7
+ import { FC } from 'react';
8
+ import type { ForwardRefComponent } from '@fluentui/react-utilities';
9
+ import { Provider } from 'react';
10
+ import { ProviderProps } from 'react';
11
+ import * as React_2 from 'react';
12
+ import type { Slot } from '@fluentui/react-utilities';
13
+ import type { SlotClassNames } from '@fluentui/react-utilities';
14
+
15
+ /**
16
+ * Render the final JSX of Table
17
+ */
18
+ export declare const renderTable_unstable: (state: TableState, contextValues: TableContextValues) => JSX.Element;
19
+
20
+ /**
21
+ * Render the final JSX of TableBody
22
+ */
23
+ export declare const renderTableBody_unstable: (state: TableBodyState) => JSX.Element;
24
+
25
+ /**
26
+ * Render the final JSX of TableCell
27
+ */
28
+ export declare const renderTableCell_unstable: (state: TableCellState) => JSX.Element;
29
+
30
+ /**
31
+ * Render the final JSX of TableHeader
32
+ */
33
+ export declare const renderTableHeader_unstable: (state: TableHeaderState) => JSX.Element;
34
+
35
+ /**
36
+ * Render the final JSX of TableHeaderCell
37
+ */
38
+ export declare const renderTableHeaderCell_unstable: (state: TableHeaderCellState) => JSX.Element;
39
+
40
+ /**
41
+ * Render the final JSX of TableRow
42
+ */
43
+ export declare const renderTableRow_unstable: (state: TableRowState) => JSX.Element;
44
+
45
+ export declare type SortDirection = 'ascending' | 'descending';
46
+
47
+ declare type SortState = {
48
+ sortColumn: string | undefined;
49
+ sortDirection: 'ascending' | 'descending';
50
+ };
51
+
52
+ /**
53
+ * Table component - TODO: add more docs
54
+ */
55
+ export declare const Table: ForwardRefComponent<TableProps>;
56
+
57
+ /**
58
+ * TableBody component - TODO: add more docs
59
+ */
60
+ export declare const TableBody: ForwardRefComponent<TableBodyProps>;
61
+
62
+ export declare const tableBodyClassName = "fui-TableBody";
63
+
64
+ export declare const tableBodyClassNames: SlotClassNames<TableBodySlots>;
65
+
66
+ /**
67
+ * TableBody Props
68
+ */
69
+ export declare type TableBodyProps = ComponentProps<TableBodySlots>;
70
+
71
+ export declare type TableBodySlots = {
72
+ root: Slot<'tbody', 'div'>;
73
+ };
74
+
75
+ /**
76
+ * State used in rendering TableBody
77
+ */
78
+ export declare type TableBodyState = ComponentState<TableBodySlots>;
79
+
80
+ /**
81
+ * TableCell component - TODO: add more docs
82
+ */
83
+ export declare const TableCell: ForwardRefComponent<TableCellProps>;
84
+
85
+ export declare const tableCellClassName = "fui-TableCell";
86
+
87
+ export declare const tableCellClassNames: SlotClassNames<TableCellSlots>;
88
+
89
+ /**
90
+ * TableCell Props
91
+ */
92
+ export declare type TableCellProps = ComponentProps<TableCellSlots> & {};
93
+
94
+ export declare type TableCellSlots = {
95
+ root: Slot<'td', 'div'>;
96
+ media?: Slot<'span'>;
97
+ };
98
+
99
+ /**
100
+ * State used in rendering TableCell
101
+ */
102
+ export declare type TableCellState = ComponentState<TableCellSlots>;
103
+
104
+ export declare const tableClassName = "fui-Table";
105
+
106
+ export declare const tableClassNames: SlotClassNames<TableSlots>;
107
+
108
+ export declare const TableContextProvider: Provider<TableContextValue | undefined> & FC<ProviderProps<TableContextValue | undefined>>;
109
+
110
+ export declare type TableContextValue = {
111
+ size: 'small' | 'smaller' | 'medium';
112
+ noNativeElements: boolean;
113
+ sortable: boolean;
114
+ };
115
+
116
+ export declare type TableContextValues = {
117
+ table: TableContextValue;
118
+ };
119
+
120
+ /**
121
+ * TableHeader component - TODO: add more docs
122
+ */
123
+ export declare const TableHeader: ForwardRefComponent<TableHeaderProps>;
124
+
125
+ /**
126
+ * TableHeaderCell component - TODO: add more docs
127
+ */
128
+ export declare const TableHeaderCell: ForwardRefComponent<TableHeaderCellProps>;
129
+
130
+ export declare const tableHeaderCellClassName = "fui-TableHeaderCell";
131
+
132
+ export declare const tableHeaderCellClassNames: SlotClassNames<TableHeaderCellSlots>;
133
+
134
+ /**
135
+ * TableHeaderCell Props
136
+ */
137
+ export declare type TableHeaderCellProps = ComponentProps<Partial<TableHeaderCellSlots>> & {
138
+ sortDirection?: SortDirection;
139
+ };
140
+
141
+ export declare type TableHeaderCellSlots = {
142
+ root: Slot<'th', 'div'>;
143
+ sortIcon: Slot<'span'>;
144
+ /**
145
+ * Button handles correct narration and interactions for sorting;
146
+ */
147
+ button: NonNullable<Slot<ARIAButtonSlotProps>>;
148
+ };
149
+
150
+ /**
151
+ * State used in rendering TableHeaderCell
152
+ */
153
+ export declare type TableHeaderCellState = ComponentState<TableHeaderCellSlots> & {
154
+ sortable: boolean;
155
+ };
156
+
157
+ export declare const tableHeaderClassName = "fui-TableHeader";
158
+
159
+ export declare const tableHeaderClassNames: SlotClassNames<TableHeaderSlots>;
160
+
161
+ /**
162
+ * TableHeader Props
163
+ */
164
+ export declare type TableHeaderProps = ComponentProps<TableHeaderSlots> & {};
165
+
166
+ export declare type TableHeaderSlots = {
167
+ root: Slot<'thead', 'div'>;
168
+ };
169
+
170
+ /**
171
+ * State used in rendering TableHeader
172
+ */
173
+ export declare type TableHeaderState = ComponentState<TableHeaderSlots>;
174
+
175
+ /**
176
+ * Table Props
177
+ */
178
+ export declare type TableProps = ComponentProps<TableSlots> & {} & Partial<TableContextValue> & {
179
+ /**
180
+ * Called when the sorted column changes
181
+ */
182
+ onSortColumnChange?: (e: React_2.MouseEvent<HTMLElement> | React_2.KeyboardEvent<HTMLElement>, data: {
183
+ sortState: SortState;
184
+ }) => void;
185
+ sortState?: SortState;
186
+ defaultSortState?: SortState;
187
+ };
188
+
189
+ /**
190
+ * TableRow component - TODO: add more docs
191
+ */
192
+ export declare const TableRow: ForwardRefComponent<TableRowProps>;
193
+
194
+ export declare const tableRowClassName = "fui-TableRow";
195
+
196
+ export declare const tableRowClassNames: SlotClassNames<TableRowSlots>;
197
+
198
+ /**
199
+ * TableRow Props
200
+ */
201
+ export declare type TableRowProps = ComponentProps<TableRowSlots> & {};
202
+
203
+ export declare type TableRowSlots = {
204
+ root: Slot<'tr', 'div'>;
205
+ };
206
+
207
+ /**
208
+ * State used in rendering TableRow
209
+ */
210
+ export declare type TableRowState = ComponentState<TableRowSlots> & {
211
+ size: TableState['size'];
212
+ };
213
+
214
+ export declare type TableSlots = {
215
+ root: Slot<'table', 'div'>;
216
+ };
217
+
218
+ /**
219
+ * State used in rendering Table
220
+ */
221
+ export declare type TableState = ComponentState<TableSlots> & Pick<Required<TableProps>, 'size' | 'noNativeElements'> & TableContextValue;
222
+
223
+ /**
224
+ * Create the state required to render Table.
225
+ *
226
+ * The returned state can be modified with hooks such as useTableStyles_unstable,
227
+ * before being passed to renderTable_unstable.
228
+ *
229
+ * @param props - props from this instance of Table
230
+ * @param ref - reference to root HTMLElement of Table
231
+ */
232
+ export declare const useTable_unstable: (props: TableProps, ref: React_2.Ref<HTMLElement>) => TableState;
233
+
234
+ /**
235
+ * Create the state required to render TableBody.
236
+ *
237
+ * The returned state can be modified with hooks such as useTableBodyStyles_unstable,
238
+ * before being passed to renderTableBody_unstable.
239
+ *
240
+ * @param props - props from this instance of TableBody
241
+ * @param ref - reference to root HTMLElement of TableBody
242
+ */
243
+ export declare const useTableBody_unstable: (props: TableBodyProps, ref: React_2.Ref<HTMLElement>) => TableBodyState;
244
+
245
+ /**
246
+ * Apply styling to the TableBody slots based on the state
247
+ */
248
+ export declare const useTableBodyStyles_unstable: (state: TableBodyState) => TableBodyState;
249
+
250
+ /**
251
+ * Create the state required to render TableCell.
252
+ *
253
+ * The returned state can be modified with hooks such as useTableCellStyles_unstable,
254
+ * before being passed to renderTableCell_unstable.
255
+ *
256
+ * @param props - props from this instance of TableCell
257
+ * @param ref - reference to root HTMLElement of TableCell
258
+ */
259
+ export declare const useTableCell_unstable: (props: TableCellProps, ref: React_2.Ref<HTMLElement>) => TableCellState;
260
+
261
+ /**
262
+ * Apply styling to the TableCell slots based on the state
263
+ */
264
+ export declare const useTableCellStyles_unstable: (state: TableCellState) => TableCellState;
265
+
266
+ export declare const useTableContext: <T>(selector: ContextSelector<TableContextValue, T>) => T;
267
+
268
+ /**
269
+ * Create the state required to render TableHeader.
270
+ *
271
+ * The returned state can be modified with hooks such as useTableHeaderStyles_unstable,
272
+ * before being passed to renderTableHeader_unstable.
273
+ *
274
+ * @param props - props from this instance of TableHeader
275
+ * @param ref - reference to root HTMLElement of TableHeader
276
+ */
277
+ export declare const useTableHeader_unstable: (props: TableHeaderProps, ref: React_2.Ref<HTMLElement>) => TableHeaderState;
278
+
279
+ /**
280
+ * Create the state required to render TableHeaderCell.
281
+ *
282
+ * The returned state can be modified with hooks such as useTableHeaderCellStyles_unstable,
283
+ * before being passed to renderTableHeaderCell_unstable.
284
+ *
285
+ * @param props - props from this instance of TableHeaderCell
286
+ * @param ref - reference to root HTMLElement of TableHeaderCell
287
+ */
288
+ export declare const useTableHeaderCell_unstable: (props: TableHeaderCellProps, ref: React_2.Ref<HTMLElement>) => TableHeaderCellState;
289
+
290
+ /**
291
+ * Apply styling to the TableHeaderCell slots based on the state
292
+ */
293
+ export declare const useTableHeaderCellStyles_unstable: (state: TableHeaderCellState) => TableHeaderCellState;
294
+
295
+ /**
296
+ * Apply styling to the TableHeader slots based on the state
297
+ */
298
+ export declare const useTableHeaderStyles_unstable: (state: TableHeaderState) => TableHeaderState;
299
+
300
+ /**
301
+ * Create the state required to render TableRow.
302
+ *
303
+ * The returned state can be modified with hooks such as useTableRowStyles_unstable,
304
+ * before being passed to renderTableRow_unstable.
305
+ *
306
+ * @param props - props from this instance of TableRow
307
+ * @param ref - reference to root HTMLElement of TableRow
308
+ */
309
+ export declare const useTableRow_unstable: (props: TableRowProps, ref: React_2.Ref<HTMLElement>) => TableRowState;
310
+
311
+ /**
312
+ * Apply styling to the TableRow slots based on the state
313
+ */
314
+ export declare const useTableRowStyles_unstable: (state: TableRowState) => TableRowState;
315
+
316
+ /**
317
+ * Apply styling to the Table slots based on the state
318
+ */
319
+ export declare const useTableStyles_unstable: (state: TableState) => TableState;
320
+
321
+ export { }
@@ -0,0 +1,11 @@
1
+ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
+ // It should be published with your NPM package. It should not be tracked by Git.
3
+ {
4
+ "tsdocVersion": "0.12",
5
+ "toolPackages": [
6
+ {
7
+ "packageName": "@microsoft/api-extractor",
8
+ "packageVersion": "7.18.1"
9
+ }
10
+ ]
11
+ }
package/lib/Table.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from './components/Table/index';
2
+ //# sourceMappingURL=Table.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Table.js","sourceRoot":"../src/","sources":["Table.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC","sourcesContent":["export * from './components/Table/index';\n"]}
@@ -0,0 +1,2 @@
1
+ export * from './components/TableBody/index';
2
+ //# sourceMappingURL=TableBody.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableBody.js","sourceRoot":"../src/","sources":["TableBody.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC","sourcesContent":["export * from './components/TableBody/index';\n"]}
@@ -0,0 +1,2 @@
1
+ export * from './components/TableCell/index';
2
+ //# sourceMappingURL=TableCell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableCell.js","sourceRoot":"../src/","sources":["TableCell.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC","sourcesContent":["export * from './components/TableCell/index';\n"]}
@@ -0,0 +1,2 @@
1
+ export * from './components/TableHeader/index';
2
+ //# sourceMappingURL=TableHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableHeader.js","sourceRoot":"../src/","sources":["TableHeader.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC","sourcesContent":["export * from './components/TableHeader/index';\n"]}
@@ -0,0 +1,2 @@
1
+ export * from './components/TableHeaderCell/index';
2
+ //# sourceMappingURL=TableHeaderCell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableHeaderCell.js","sourceRoot":"../src/","sources":["TableHeaderCell.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC","sourcesContent":["export * from './components/TableHeaderCell/index';\n"]}
@@ -0,0 +1,2 @@
1
+ export * from './components/TableRow/index';
2
+ //# sourceMappingURL=TableRow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableRow.js","sourceRoot":"../src/","sources":["TableRow.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC","sourcesContent":["export * from './components/TableRow/index';\n"]}
@@ -0,0 +1,16 @@
1
+ import * as React from 'react';
2
+ import { useTable_unstable } from './useTable';
3
+ import { renderTable_unstable } from './renderTable';
4
+ import { useTableStyles_unstable } from './useTableStyles';
5
+ import { useTableContextValues_unstable } from './useTableContextValues';
6
+ /**
7
+ * Table component - TODO: add more docs
8
+ */
9
+
10
+ export const Table = /*#__PURE__*/React.forwardRef((props, ref) => {
11
+ const state = useTable_unstable(props, ref);
12
+ useTableStyles_unstable(state);
13
+ return renderTable_unstable(state, useTableContextValues_unstable(state));
14
+ });
15
+ Table.displayName = 'Table';
16
+ //# sourceMappingURL=Table.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/Table/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,iBAAT,QAAkC,YAAlC;AACA,SAAS,oBAAT,QAAqC,eAArC;AACA,SAAS,uBAAT,QAAwC,kBAAxC;AAGA,SAAS,8BAAT,QAA+C,yBAA/C;AAEA;;AAEG;;AACH,OAAO,MAAM,KAAK,gBAAoC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACpF,MAAM,KAAK,GAAG,iBAAiB,CAAC,KAAD,EAAQ,GAAR,CAA/B;EAEA,uBAAuB,CAAC,KAAD,CAAvB;EACA,OAAO,oBAAoB,CAAC,KAAD,EAAQ,8BAA8B,CAAC,KAAD,CAAtC,CAA3B;AACD,CALqD,CAA/C;AAOP,KAAK,CAAC,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":"../src/"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Table.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Table.types.js","sourceRoot":"../src/","sources":["components/Table/Table.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport * as React from 'react';\n\nexport type TableSlots = {\n root: Slot<'table', 'div'>;\n};\n\nexport type TableContextValue = {\n size: 'small' | 'smaller' | 'medium';\n\n noNativeElements: boolean;\n\n sortable: boolean;\n};\n\nexport type SortDirection = 'ascending' | 'descending';\nexport type SortState = {\n sortColumn: string | undefined;\n sortDirection: 'ascending' | 'descending';\n};\n\nexport type TableContextValues = {\n table: TableContextValue;\n};\n\n/**\n * Table Props\n */\nexport type TableProps = ComponentProps<TableSlots> & {} & Partial<TableContextValue> & {\n /**\n * Called when the sorted column changes\n */\n onSortColumnChange?: (\n e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n data: { sortState: SortState },\n ) => void;\n\n sortState?: SortState;\n\n defaultSortState?: SortState;\n };\n\n/**\n * State used in rendering Table\n */\nexport type TableState = ComponentState<TableSlots> &\n Pick<Required<TableProps>, 'size' | 'noNativeElements'> &\n TableContextValue;\n"]}
@@ -0,0 +1,6 @@
1
+ export * from './Table';
2
+ export * from './Table.types';
3
+ export * from './renderTable';
4
+ export * from './useTable';
5
+ export * from './useTableStyles';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/Table/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC","sourcesContent":["export * from './Table';\nexport * from './Table.types';\nexport * from './renderTable';\nexport * from './useTable';\nexport * from './useTableStyles';\n"]}
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import { getSlots } from '@fluentui/react-utilities';
3
+ import { TableContextProvider } from '../../contexts/tableContext';
4
+ /**
5
+ * Render the final JSX of Table
6
+ */
7
+
8
+ export const renderTable_unstable = (state, contextValues) => {
9
+ const {
10
+ slots,
11
+ slotProps
12
+ } = getSlots(state);
13
+ return /*#__PURE__*/React.createElement(TableContextProvider, {
14
+ value: contextValues.table
15
+ }, /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
16
+ }));
17
+ };
18
+ //# sourceMappingURL=renderTable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/Table/renderTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAEA,SAAS,oBAAT,QAAqC,6BAArC;AAEA;;AAEG;;AACH,OAAO,MAAM,oBAAoB,GAAG,CAAC,KAAD,EAAoB,aAApB,KAAyD;EAC3F,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAa,KAAb,CAArC;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,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","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":"../src/"}