@fluentui/react-table 9.0.0-alpha.3 → 9.0.0-alpha.4

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 (186) hide show
  1. package/CHANGELOG.json +56 -3
  2. package/CHANGELOG.md +18 -4
  3. package/dist/index.d.ts +28 -12
  4. package/lib/Table.js.map +1 -1
  5. package/lib/TableBody.js.map +1 -1
  6. package/lib/TableCell.js.map +1 -1
  7. package/lib/TableCellActions.js.map +1 -1
  8. package/lib/TableCellLayout.js.map +1 -1
  9. package/lib/TableCellPrimaryLayout.js.map +1 -1
  10. package/lib/TableHeader.js.map +1 -1
  11. package/lib/TableHeaderCell.js.map +1 -1
  12. package/lib/TableRow.js.map +1 -1
  13. package/lib/TableSelectionCell.js.map +1 -1
  14. package/lib/components/Table/Table.js.map +1 -1
  15. package/lib/components/Table/Table.types.js.map +1 -1
  16. package/lib/components/Table/index.js.map +1 -1
  17. package/lib/components/Table/renderTable.js.map +1 -1
  18. package/lib/components/Table/useTable.js.map +1 -1
  19. package/lib/components/Table/useTableContextValues.js.map +1 -1
  20. package/lib/components/Table/useTableStyles.js +26 -5
  21. package/lib/components/Table/useTableStyles.js.map +1 -1
  22. package/lib/components/TableBody/TableBody.js.map +1 -1
  23. package/lib/components/TableBody/TableBody.types.js.map +1 -1
  24. package/lib/components/TableBody/index.js.map +1 -1
  25. package/lib/components/TableBody/renderTableBody.js.map +1 -1
  26. package/lib/components/TableBody/useTableBody.js +2 -1
  27. package/lib/components/TableBody/useTableBody.js.map +1 -1
  28. package/lib/components/TableBody/useTableBodyStyles.js +14 -3
  29. package/lib/components/TableBody/useTableBodyStyles.js.map +1 -1
  30. package/lib/components/TableCell/TableCell.js.map +1 -1
  31. package/lib/components/TableCell/TableCell.types.js.map +1 -1
  32. package/lib/components/TableCell/index.js.map +1 -1
  33. package/lib/components/TableCell/renderTableCell.js.map +1 -1
  34. package/lib/components/TableCell/useTableCell.js +2 -1
  35. package/lib/components/TableCell/useTableCell.js.map +1 -1
  36. package/lib/components/TableCell/useTableCellStyles.js +29 -4
  37. package/lib/components/TableCell/useTableCellStyles.js.map +1 -1
  38. package/lib/components/TableCellActions/TableCellActions.js.map +1 -1
  39. package/lib/components/TableCellActions/TableCellActions.types.js.map +1 -1
  40. package/lib/components/TableCellActions/index.js.map +1 -1
  41. package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -1
  42. package/lib/components/TableCellActions/useTableCellActions.js.map +1 -1
  43. package/lib/components/TableCellActions/useTableCellActionsStyles.js +2 -2
  44. package/lib/components/TableCellActions/useTableCellActionsStyles.js.map +1 -1
  45. package/lib/components/TableCellLayout/TableCellLayout.js +2 -1
  46. package/lib/components/TableCellLayout/TableCellLayout.js.map +1 -1
  47. package/lib/components/TableCellLayout/TableCellLayout.types.js.map +1 -1
  48. package/lib/components/TableCellLayout/index.js.map +1 -1
  49. package/lib/components/TableCellLayout/renderTableCellLayout.js +6 -3
  50. package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  51. package/lib/components/TableCellLayout/useTableCellLayout.js +11 -1
  52. package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  53. package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js +13 -0
  54. package/lib/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -0
  55. package/lib/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
  56. package/lib/components/TableHeader/TableHeader.js.map +1 -1
  57. package/lib/components/TableHeader/TableHeader.types.js.map +1 -1
  58. package/lib/components/TableHeader/index.js.map +1 -1
  59. package/lib/components/TableHeader/renderTableHeader.js.map +1 -1
  60. package/lib/components/TableHeader/useTableHeader.js +2 -1
  61. package/lib/components/TableHeader/useTableHeader.js.map +1 -1
  62. package/lib/components/TableHeader/useTableHeaderStyles.js +20 -3
  63. package/lib/components/TableHeader/useTableHeaderStyles.js.map +1 -1
  64. package/lib/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  65. package/lib/components/TableHeaderCell/TableHeaderCell.types.js.map +1 -1
  66. package/lib/components/TableHeaderCell/index.js.map +1 -1
  67. package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  68. package/lib/components/TableHeaderCell/useTableHeaderCell.js +2 -1
  69. package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  70. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js +28 -4
  71. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
  72. package/lib/components/TableRow/TableRow.js.map +1 -1
  73. package/lib/components/TableRow/TableRow.types.js.map +1 -1
  74. package/lib/components/TableRow/index.js.map +1 -1
  75. package/lib/components/TableRow/renderTableRow.js.map +1 -1
  76. package/lib/components/TableRow/useTableRow.js +2 -1
  77. package/lib/components/TableRow/useTableRow.js.map +1 -1
  78. package/lib/components/TableRow/useTableRowStyles.js +44 -7
  79. package/lib/components/TableRow/useTableRowStyles.js.map +1 -1
  80. package/lib/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  81. package/lib/components/TableSelectionCell/TableSelectionCell.types.js.map +1 -1
  82. package/lib/components/TableSelectionCell/index.js.map +1 -1
  83. package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  84. package/lib/components/TableSelectionCell/useTableSelectionCell.js +6 -1
  85. package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  86. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js +31 -5
  87. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
  88. package/lib/contexts/tableContext.js.map +1 -1
  89. package/lib/hooks/index.js.map +1 -1
  90. package/lib/hooks/selectionManager.js.map +1 -1
  91. package/lib/hooks/types.js.map +1 -1
  92. package/lib/hooks/useSelection.js.map +1 -1
  93. package/lib/hooks/useSort.js.map +1 -1
  94. package/lib/hooks/useTable.js.map +1 -1
  95. package/lib/index.js.map +1 -1
  96. package/lib/navigationModes/cell.js.map +1 -1
  97. package/lib/navigationModes/composite.js.map +1 -1
  98. package/lib/navigationModes/index.js.map +1 -1
  99. package/lib/navigationModes/useNavigationMode.js.map +1 -1
  100. package/lib-commonjs/Table.js.map +1 -1
  101. package/lib-commonjs/TableBody.js.map +1 -1
  102. package/lib-commonjs/TableCell.js.map +1 -1
  103. package/lib-commonjs/TableCellActions.js.map +1 -1
  104. package/lib-commonjs/TableCellLayout.js.map +1 -1
  105. package/lib-commonjs/TableCellPrimaryLayout.js.map +1 -1
  106. package/lib-commonjs/TableHeader.js.map +1 -1
  107. package/lib-commonjs/TableHeaderCell.js.map +1 -1
  108. package/lib-commonjs/TableRow.js.map +1 -1
  109. package/lib-commonjs/TableSelectionCell.js.map +1 -1
  110. package/lib-commonjs/components/Table/Table.js.map +1 -1
  111. package/lib-commonjs/components/Table/index.js.map +1 -1
  112. package/lib-commonjs/components/Table/renderTable.js.map +1 -1
  113. package/lib-commonjs/components/Table/useTable.js.map +1 -1
  114. package/lib-commonjs/components/Table/useTableContextValues.js.map +1 -1
  115. package/lib-commonjs/components/Table/useTableStyles.js +26 -5
  116. package/lib-commonjs/components/Table/useTableStyles.js.map +1 -1
  117. package/lib-commonjs/components/TableBody/TableBody.js.map +1 -1
  118. package/lib-commonjs/components/TableBody/index.js.map +1 -1
  119. package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -1
  120. package/lib-commonjs/components/TableBody/useTableBody.js +2 -1
  121. package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
  122. package/lib-commonjs/components/TableBody/useTableBodyStyles.js +14 -3
  123. package/lib-commonjs/components/TableBody/useTableBodyStyles.js.map +1 -1
  124. package/lib-commonjs/components/TableCell/TableCell.js.map +1 -1
  125. package/lib-commonjs/components/TableCell/index.js.map +1 -1
  126. package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -1
  127. package/lib-commonjs/components/TableCell/useTableCell.js +2 -1
  128. package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
  129. package/lib-commonjs/components/TableCell/useTableCellStyles.js +29 -4
  130. package/lib-commonjs/components/TableCell/useTableCellStyles.js.map +1 -1
  131. package/lib-commonjs/components/TableCellActions/TableCellActions.js.map +1 -1
  132. package/lib-commonjs/components/TableCellActions/index.js.map +1 -1
  133. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -1
  134. package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -1
  135. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js +2 -2
  136. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.js.map +1 -1
  137. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js +3 -1
  138. package/lib-commonjs/components/TableCellLayout/TableCellLayout.js.map +1 -1
  139. package/lib-commonjs/components/TableCellLayout/index.js.map +1 -1
  140. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js +7 -3
  141. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  142. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +13 -2
  143. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  144. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js +23 -0
  145. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutContextValues.js.map +1 -0
  146. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.js.map +1 -1
  147. package/lib-commonjs/components/TableHeader/TableHeader.js.map +1 -1
  148. package/lib-commonjs/components/TableHeader/index.js.map +1 -1
  149. package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -1
  150. package/lib-commonjs/components/TableHeader/useTableHeader.js +2 -1
  151. package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
  152. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js +20 -3
  153. package/lib-commonjs/components/TableHeader/useTableHeaderStyles.js.map +1 -1
  154. package/lib-commonjs/components/TableHeaderCell/TableHeaderCell.js.map +1 -1
  155. package/lib-commonjs/components/TableHeaderCell/index.js.map +1 -1
  156. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  157. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +2 -1
  158. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  159. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js +28 -4
  160. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.js.map +1 -1
  161. package/lib-commonjs/components/TableRow/TableRow.js.map +1 -1
  162. package/lib-commonjs/components/TableRow/index.js.map +1 -1
  163. package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -1
  164. package/lib-commonjs/components/TableRow/useTableRow.js +2 -1
  165. package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
  166. package/lib-commonjs/components/TableRow/useTableRowStyles.js +44 -7
  167. package/lib-commonjs/components/TableRow/useTableRowStyles.js.map +1 -1
  168. package/lib-commonjs/components/TableSelectionCell/TableSelectionCell.js.map +1 -1
  169. package/lib-commonjs/components/TableSelectionCell/index.js.map +1 -1
  170. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  171. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js +7 -1
  172. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  173. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js +31 -5
  174. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.js.map +1 -1
  175. package/lib-commonjs/contexts/tableContext.js.map +1 -1
  176. package/lib-commonjs/hooks/index.js.map +1 -1
  177. package/lib-commonjs/hooks/selectionManager.js.map +1 -1
  178. package/lib-commonjs/hooks/useSelection.js.map +1 -1
  179. package/lib-commonjs/hooks/useSort.js.map +1 -1
  180. package/lib-commonjs/hooks/useTable.js.map +1 -1
  181. package/lib-commonjs/index.js.map +1 -1
  182. package/lib-commonjs/navigationModes/cell.js.map +1 -1
  183. package/lib-commonjs/navigationModes/composite.js.map +1 -1
  184. package/lib-commonjs/navigationModes/index.js.map +1 -1
  185. package/lib-commonjs/navigationModes/useNavigationMode.js.map +1 -1
  186. package/package.json +7 -7
package/CHANGELOG.json CHANGED
@@ -2,7 +2,60 @@
2
2
  "name": "@fluentui/react-table",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 20 Sep 2022 20:54:05 GMT",
5
+ "date": "Mon, 03 Oct 2022 22:22:51 GMT",
6
+ "tag": "@fluentui/react-table_v9.0.0-alpha.4",
7
+ "version": "9.0.0-alpha.4",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "lingfangao@hotmail.com",
12
+ "package": "@fluentui/react-table",
13
+ "commit": "0bece748c51ef324f23ddce3e83f0f796bfced5f",
14
+ "comment": "feat: `noNativeElements` renders a flex layout"
15
+ },
16
+ {
17
+ "author": "lingfangao@hotmail.com",
18
+ "package": "@fluentui/react-table",
19
+ "commit": "9357de4af136dfb5e5ed37b68318024235aa4ba3",
20
+ "comment": "feat: Use AvatarContext to override avatar size"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui/react-table",
25
+ "comment": "Bump @fluentui/react-aria to v9.2.1",
26
+ "commit": "b0b7f99bbbb05b0bd136432983a74fea252c7163"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui/react-table",
31
+ "comment": "Bump @fluentui/react-avatar to v9.2.0",
32
+ "commit": "b0b7f99bbbb05b0bd136432983a74fea252c7163"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@fluentui/react-table",
37
+ "comment": "Bump @fluentui/react-checkbox to v9.0.7",
38
+ "commit": "b0b7f99bbbb05b0bd136432983a74fea252c7163"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@fluentui/react-table",
43
+ "comment": "Bump @fluentui/react-tabster to v9.1.2",
44
+ "commit": "b0b7f99bbbb05b0bd136432983a74fea252c7163"
45
+ }
46
+ ],
47
+ "none": [
48
+ {
49
+ "author": "lingfangao@hotmail.com",
50
+ "package": "@fluentui/react-table",
51
+ "commit": "cd88ecf2e2407c308c8364b9167440b9bac171f3",
52
+ "comment": "chore: Migrate react-table to use new build"
53
+ }
54
+ ]
55
+ }
56
+ },
57
+ {
58
+ "date": "Tue, 20 Sep 2022 20:55:42 GMT",
6
59
  "tag": "@fluentui/react-table_v9.0.0-alpha.3",
7
60
  "version": "9.0.0-alpha.3",
8
61
  "comments": {
@@ -23,13 +76,13 @@
23
76
  "author": "beachball",
24
77
  "package": "@fluentui/react-table",
25
78
  "comment": "Bump @fluentui/react-checkbox to v9.0.6",
26
- "commit": "9617a5a46ef4c5e310a066a5374ff2ed61db3c66"
79
+ "commit": "4ceba844c804a2f49b0465389100e7a3dabf116e"
27
80
  },
28
81
  {
29
82
  "author": "beachball",
30
83
  "package": "@fluentui/react-table",
31
84
  "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.14",
32
- "commit": "9617a5a46ef4c5e310a066a5374ff2ed61db3c66"
85
+ "commit": "4ceba844c804a2f49b0465389100e7a3dabf116e"
33
86
  }
34
87
  ]
35
88
  }
package/CHANGELOG.md CHANGED
@@ -1,20 +1,34 @@
1
1
  # Change Log - @fluentui/react-table
2
2
 
3
- This log was last generated on Tue, 20 Sep 2022 20:54:05 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 03 Oct 2022 22:22:51 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.0-alpha.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.0.0-alpha.4)
8
+
9
+ Mon, 03 Oct 2022 22:22:51 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-table_v9.0.0-alpha.3..@fluentui/react-table_v9.0.0-alpha.4)
11
+
12
+ ### Changes
13
+
14
+ - feat: `noNativeElements` renders a flex layout ([PR #24913](https://github.com/microsoft/fluentui/pull/24913) by lingfangao@hotmail.com)
15
+ - feat: Use AvatarContext to override avatar size ([PR #24807](https://github.com/microsoft/fluentui/pull/24807) by lingfangao@hotmail.com)
16
+ - Bump @fluentui/react-aria to v9.2.1 ([PR #25016](https://github.com/microsoft/fluentui/pull/25016) by beachball)
17
+ - Bump @fluentui/react-avatar to v9.2.0 ([PR #25016](https://github.com/microsoft/fluentui/pull/25016) by beachball)
18
+ - Bump @fluentui/react-checkbox to v9.0.7 ([PR #25016](https://github.com/microsoft/fluentui/pull/25016) by beachball)
19
+ - Bump @fluentui/react-tabster to v9.1.2 ([PR #25016](https://github.com/microsoft/fluentui/pull/25016) by beachball)
20
+
7
21
  ## [9.0.0-alpha.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.0.0-alpha.3)
8
22
 
9
- Tue, 20 Sep 2022 20:54:05 GMT
23
+ Tue, 20 Sep 2022 20:55:42 GMT
10
24
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-table_v9.0.0-alpha.2..@fluentui/react-table_v9.0.0-alpha.3)
11
25
 
12
26
  ### Changes
13
27
 
14
28
  - feat: Adds `visible` prop to `TableCellActions` ([PR #24831](https://github.com/microsoft/fluentui/pull/24831) by lingfangao@hotmail.com)
15
29
  - fix: `TableCellActions` displays correctly inside `TableHeaderCell` ([PR #24829](https://github.com/microsoft/fluentui/pull/24829) by lingfangao@hotmail.com)
16
- - Bump @fluentui/react-checkbox to v9.0.6 ([PR #24870](https://github.com/microsoft/fluentui/pull/24870) by beachball)
17
- - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.14 ([PR #24870](https://github.com/microsoft/fluentui/pull/24870) by beachball)
30
+ - Bump @fluentui/react-checkbox to v9.0.6 ([PR #24869](https://github.com/microsoft/fluentui/pull/24869) by beachball)
31
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.14 ([PR #24869](https://github.com/microsoft/fluentui/pull/24869) by beachball)
18
32
 
19
33
  ## [9.0.0-alpha.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.0.0-alpha.2)
20
34
 
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
 
3
3
  import { ARIAButtonSlotProps } from '@fluentui/react-aria';
4
+ import type { AvatarSizes } from '@fluentui/react-avatar';
4
5
  import type { Checkbox } from '@fluentui/react-checkbox';
5
6
  import type { CheckboxProps } from '@fluentui/react-checkbox';
6
7
  import type { ComponentProps } from '@fluentui/react-utilities';
@@ -47,7 +48,7 @@ export declare const renderTableCellActions_unstable: (state: TableCellActionsSt
47
48
  /**
48
49
  * Render the final JSX of TableCellLayout
49
50
  */
50
- export declare const renderTableCellLayout_unstable: (state: TableCellLayoutState) => JSX.Element;
51
+ export declare const renderTableCellLayout_unstable: (state: TableCellLayoutState, contextValues: TableCellLayoutContextValues) => JSX.Element;
51
52
 
52
53
  /**
53
54
  * Render the final JSX of TableHeader
@@ -122,7 +123,7 @@ export declare type TableBodySlots = {
122
123
  /**
123
124
  * State used in rendering TableBody
124
125
  */
125
- export declare type TableBodyState = ComponentState<TableBodySlots>;
126
+ export declare type TableBodyState = ComponentState<TableBodySlots> & Pick<TableContextValue, 'noNativeElements'>;
126
127
 
127
128
  /**
128
129
  * TableCell component - TODO: add more docs
@@ -167,6 +168,12 @@ export declare const TableCellLayout: ForwardRefComponent<TableCellLayoutProps>;
167
168
 
168
169
  export declare const tableCellLayoutClassNames: SlotClassNames<TableCellLayoutSlots>;
169
170
 
171
+ declare type TableCellLayoutContextValues = {
172
+ avatar: {
173
+ size?: AvatarSizes;
174
+ };
175
+ };
176
+
170
177
  /**
171
178
  * TableCellLayout Props
172
179
  */
@@ -197,7 +204,9 @@ export declare type TableCellLayoutSlots = {
197
204
  /**
198
205
  * State used in rendering TableCellLayout
199
206
  */
200
- export declare type TableCellLayoutState = ComponentState<TableCellLayoutSlots> & Pick<TableCellLayoutProps, 'appearance'>;
207
+ export declare type TableCellLayoutState = ComponentState<TableCellLayoutSlots> & Pick<TableCellLayoutProps, 'appearance'> & {
208
+ avatarSize: AvatarSizes | undefined;
209
+ };
201
210
 
202
211
  /**
203
212
  * TableCell Props
@@ -211,7 +220,7 @@ export declare type TableCellSlots = {
211
220
  /**
212
221
  * State used in rendering TableCell
213
222
  */
214
- export declare type TableCellState = ComponentState<TableCellSlots>;
223
+ export declare type TableCellState = ComponentState<TableCellSlots> & Pick<TableContextValue, 'noNativeElements'>;
215
224
 
216
225
  export declare const tableClassName = "fui-Table";
217
226
 
@@ -220,8 +229,19 @@ export declare const tableClassNames: SlotClassNames<TableSlots>;
220
229
  export declare const TableContextProvider: React_2.Provider<TableContextValue | undefined>;
221
230
 
222
231
  export declare type TableContextValue = {
232
+ /**
233
+ * Affects the sizes of all table subcomponents
234
+ * @default medium
235
+ */
223
236
  size: 'small' | 'smaller' | 'medium';
237
+ /**
238
+ * Render all table elements as divs intead of semantic table elements
239
+ * Using divs no longer uses `display: table` layout but `display: flex`
240
+ */
224
241
  noNativeElements: boolean;
242
+ /**
243
+ * Whether the table is sortable
244
+ */
225
245
  sortable: boolean;
226
246
  };
227
247
 
@@ -262,9 +282,7 @@ export declare type TableHeaderCellSlots = {
262
282
  /**
263
283
  * State used in rendering TableHeaderCell
264
284
  */
265
- export declare type TableHeaderCellState = ComponentState<TableHeaderCellSlots> & {
266
- sortable: boolean;
267
- };
285
+ export declare type TableHeaderCellState = ComponentState<TableHeaderCellSlots> & Pick<TableContextValue, 'noNativeElements' | 'sortable'>;
268
286
 
269
287
  export declare const tableHeaderClassName = "fui-TableHeader";
270
288
 
@@ -282,7 +300,7 @@ export declare type TableHeaderSlots = {
282
300
  /**
283
301
  * State used in rendering TableHeader
284
302
  */
285
- export declare type TableHeaderState = ComponentState<TableHeaderSlots>;
303
+ export declare type TableHeaderState = ComponentState<TableHeaderSlots> & Pick<TableContextValue, 'noNativeElements'>;
286
304
 
287
305
  /**
288
306
  * Table Props
@@ -310,9 +328,7 @@ export declare type TableRowSlots = {
310
328
  /**
311
329
  * State used in rendering TableRow
312
330
  */
313
- export declare type TableRowState = ComponentState<TableRowSlots> & {
314
- size: TableState['size'];
315
- };
331
+ export declare type TableRowState = ComponentState<TableRowSlots> & Pick<TableContextValue, 'noNativeElements' | 'size'>;
316
332
 
317
333
  /**
318
334
  * TableSelectionCell component - TODO: add more docs
@@ -346,7 +362,7 @@ export declare type TableSelectionCellSlots = {
346
362
  /**
347
363
  * State used in rendering TableSelectionCell
348
364
  */
349
- export declare type TableSelectionCellState = ComponentState<TableSelectionCellSlots> & Pick<Required<TableSelectionCellProps>, 'type' | 'checked'>;
365
+ export declare type TableSelectionCellState = ComponentState<TableSelectionCellSlots> & Pick<Required<TableSelectionCellProps>, 'type' | 'checked'> & Pick<TableContextValue, 'noNativeElements'>;
350
366
 
351
367
  export declare interface TableSelectionState {
352
368
  /**
package/lib/Table.js.map CHANGED
@@ -1 +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"]}
1
+ {"version":3,"file":"Table.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/Table.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC","sourcesContent":["export * from './components/Table/index';\n"]}
@@ -1 +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"]}
1
+ {"version":3,"file":"TableBody.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/TableBody.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC","sourcesContent":["export * from './components/TableBody/index';\n"]}
@@ -1 +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"]}
1
+ {"version":3,"file":"TableCell.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/TableCell.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC","sourcesContent":["export * from './components/TableCell/index';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TableCellActions.js","sourceRoot":"../src/","sources":["TableCellActions.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC","sourcesContent":["export * from './components/TableCellActions/index';\n"]}
1
+ {"version":3,"file":"TableCellActions.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/TableCellActions.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC","sourcesContent":["export * from './components/TableCellActions/index';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TableCellLayout.js","sourceRoot":"../src/","sources":["TableCellLayout.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC","sourcesContent":["export * from './components/TableCellLayout/index';\n"]}
1
+ {"version":3,"file":"TableCellLayout.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/TableCellLayout.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC","sourcesContent":["export * from './components/TableCellLayout/index';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TableCellPrimaryLayout.js","sourceRoot":"../src/","sources":["TableCellPrimaryLayout.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC","sourcesContent":["export * from './components/TableCellLayout/index';\n"]}
1
+ {"version":3,"file":"TableCellPrimaryLayout.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/TableCellPrimaryLayout.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC","sourcesContent":["export * from './components/TableCellLayout/index';\n"]}
@@ -1 +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"]}
1
+ {"version":3,"file":"TableHeader.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/TableHeader.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC","sourcesContent":["export * from './components/TableHeader/index';\n"]}
@@ -1 +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"]}
1
+ {"version":3,"file":"TableHeaderCell.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/TableHeaderCell.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC","sourcesContent":["export * from './components/TableHeaderCell/index';\n"]}
@@ -1 +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"]}
1
+ {"version":3,"file":"TableRow.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/TableRow.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC","sourcesContent":["export * from './components/TableRow/index';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TableSelectionCell.js","sourceRoot":"../src/","sources":["TableSelectionCell.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC","sourcesContent":["export * from './components/TableSelectionCell/index';\n"]}
1
+ {"version":3,"file":"TableSelectionCell.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/TableSelectionCell.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC","sourcesContent":["export * from './components/TableSelectionCell/index';\n"]}
@@ -1 +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/"}
1
+ {"version":3,"sources":["packages/react-components/react-table/src/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/"}
@@ -1 +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';\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';\n\nexport type TableContextValues = {\n table: TableContextValue;\n};\n\n/**\n * Table Props\n */\nexport type TableProps = ComponentProps<TableSlots> & Partial<TableContextValue>;\n\n/**\n * State used in rendering Table\n */\nexport type TableState = ComponentState<TableSlots> &\n Pick<Required<TableProps>, 'size' | 'noNativeElements'> &\n TableContextValue;\n"]}
1
+ {"version":3,"file":"Table.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/Table/Table.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TableSlots = {\n root: Slot<'table', 'div'>;\n};\n\nexport type TableContextValue = {\n /**\n * Affects the sizes of all table subcomponents\n * @default medium\n */\n size: 'small' | 'smaller' | 'medium';\n\n /**\n * Render all table elements as divs intead of semantic table elements\n * Using divs no longer uses `display: table` layout but `display: flex`\n */\n noNativeElements: boolean;\n\n /**\n * Whether the table is sortable\n */\n sortable: boolean;\n};\n\nexport type SortDirection = 'ascending' | 'descending';\n\nexport type TableContextValues = {\n table: TableContextValue;\n};\n\n/**\n * Table Props\n */\nexport type TableProps = ComponentProps<TableSlots> & Partial<TableContextValue>;\n\n/**\n * State used in rendering Table\n */\nexport type TableState = ComponentState<TableSlots> &\n Pick<Required<TableProps>, 'size' | 'noNativeElements'> &\n TableContextValue;\n"]}
@@ -1 +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"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/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"]}
@@ -1 +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/"}
1
+ {"version":3,"sources":["packages/react-components/react-table/src/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/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Table/useTable.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAGA;;;;;;;;AAQG;;AACH,OAAO,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,qBAAqB,CAAC,aAAD,EAAgB;MACzC,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,OAA1B,GAAoC,SAFD;MAGzC,GAAG;IAHsC,CAAhB,CAJtB;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","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":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-table/src/components/Table/useTable.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAGA;;;;;;;;AAQG;;AACH,OAAO,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,qBAAqB,CAAC,aAAD,EAAgB;MACzC,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,OAA1B,GAAoC,SAFD;MAGzC,GAAG;IAHsC,CAAhB,CAJtB;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","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":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Table/useTableContextValues.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA,OAAM,SAAU,8BAAV,CAAyC,KAAzC,EAA0D;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","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":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-table/src/components/Table/useTableContextValues.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA,OAAM,SAAU,8BAAV,CAAyC,KAAzC,EAA0D;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","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":"../src/"}
@@ -4,20 +4,37 @@ export const tableClassName = 'fui-Table';
4
4
  export const tableClassNames = {
5
5
  root: 'fui-Table'
6
6
  };
7
+
8
+ const useTableLayoutStyles = /*#__PURE__*/__styles({
9
+ "root": {
10
+ "mc9l5x": "f1w4nmp0",
11
+ "ha4doy": "fmrv4ls",
12
+ "a9b677": "fly5x3f",
13
+ "B73mfa3": "f14m3nip"
14
+ }
15
+ }, {
16
+ "d": [".f1w4nmp0{display:table;}", ".fmrv4ls{vertical-align:middle;}", ".fly5x3f{width:100%;}", ".f14m3nip{table-layout:fixed;}"]
17
+ });
18
+
19
+ const useFlexLayoutStyles = /*#__PURE__*/__styles({
20
+ "root": {
21
+ "mc9l5x": "ftgm304"
22
+ }
23
+ }, {
24
+ "d": [".ftgm304{display:block;}"]
25
+ });
7
26
  /**
8
27
  * Styles for the root slot
9
28
  */
10
29
 
30
+
11
31
  const useStyles = /*#__PURE__*/__styles({
12
32
  "root": {
13
- "ha4doy": "fmrv4ls",
14
33
  "po53p8": "fgkb47j",
15
- "a9b677": "fly5x3f",
16
- "mc9l5x": "f1w4nmp0",
17
34
  "De3pzq": "fxugw4r"
18
35
  }
19
36
  }, {
20
- "d": [".fmrv4ls{vertical-align:middle;}", ".fgkb47j{border-collapse:collapse;}", ".fly5x3f{width:100%;}", ".f1w4nmp0{display:table;}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}"]
37
+ "d": [".fgkb47j{border-collapse:collapse;}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}"]
21
38
  });
22
39
  /**
23
40
  * Apply styling to the Table slots based on the state
@@ -26,7 +43,11 @@ const useStyles = /*#__PURE__*/__styles({
26
43
 
27
44
  export const useTableStyles_unstable = state => {
28
45
  const styles = useStyles();
29
- state.root.className = mergeClasses(tableClassName, styles.root, state.root.className);
46
+ const layoutStyles = {
47
+ table: useTableLayoutStyles(),
48
+ flex: useFlexLayoutStyles()
49
+ };
50
+ state.root.className = mergeClasses(tableClassName, styles.root, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.root.className);
30
51
  return state;
31
52
  };
32
53
  //# sourceMappingURL=useTableStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Table/useTableStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,QAAyC,gBAAzC;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAIA,OAAO,MAAM,cAAc,GAAG,WAAvB;AACP,OAAO,MAAM,eAAe,GAA+B;EACzD,IAAI,EAAE;AADmD,CAApD;AAIP;;AAEG;;AACH,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AAUA;;AAEG;;;AACH,OAAO,MAAM,uBAAuB,GAAI,KAAD,IAAkC;EACvE,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,cAAD,EAAiB,MAAM,CAAC,IAAxB,EAA8B,KAAK,CAAC,IAAN,CAAW,SAAzC,CAAnC;EAEA,OAAO,KAAP;AACD,CALM","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { TableSlots, TableState } from './Table.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableClassName = 'fui-Table';\nexport const tableClassNames: SlotClassNames<TableSlots> = {\n root: 'fui-Table',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n verticalAlign: 'middle',\n borderCollapse: 'collapse',\n width: '100%',\n display: 'table',\n backgroundColor: tokens.colorNeutralBackground1,\n },\n});\n\n/**\n * Apply styling to the Table slots based on the state\n */\nexport const useTableStyles_unstable = (state: TableState): TableState => {\n const styles = useStyles();\n state.root.className = mergeClasses(tableClassName, styles.root, state.root.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-table/src/components/Table/useTableStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,QAAyC,gBAAzC;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAIA,OAAO,MAAM,cAAc,GAAG,WAAvB;AACP,OAAO,MAAM,eAAe,GAA+B;EACzD,IAAI,EAAE;AADmD,CAApD;;AAIP,MAAM,oBAAoB,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA7B;;AASA,MAAM,mBAAmB,gBAAG;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA5B;AAMA;;AAEG;;;AACH,MAAM,SAAS,gBAAG;EAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;AAOA;;AAEG;;;AACH,OAAO,MAAM,uBAAuB,GAAI,KAAD,IAAkC;EACvE,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,MAAM,YAAY,GAAG;IACnB,KAAK,EAAE,oBAAoB,EADR;IAEnB,IAAI,EAAE,mBAAmB;EAFN,CAArB;EAIA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,cADiC,EAEjC,MAAM,CAAC,IAF0B,EAGjC,KAAK,CAAC,gBAAN,GAAyB,YAAY,CAAC,IAAb,CAAkB,IAA3C,GAAkD,YAAY,CAAC,KAAb,CAAmB,IAHpC,EAIjC,KAAK,CAAC,IAAN,CAAW,SAJsB,CAAnC;EAOA,OAAO,KAAP;AACD,CAdM","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { TableSlots, TableState } from './Table.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const tableClassName = 'fui-Table';\nexport const tableClassNames: SlotClassNames<TableSlots> = {\n root: 'fui-Table',\n};\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table',\n verticalAlign: 'middle',\n width: '100%',\n tableLayout: 'fixed',\n },\n});\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'block',\n },\n});\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n borderCollapse: 'collapse',\n backgroundColor: tokens.colorNeutralBackground1,\n },\n});\n\n/**\n * Apply styling to the Table slots based on the state\n */\nexport const useTableStyles_unstable = (state: TableState): TableState => {\n const styles = useStyles();\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableClassName,\n styles.root,\n state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableBody/TableBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AACA,SAAS,wBAAT,QAAyC,mBAAzC;AACA,SAAS,2BAAT,QAA4C,sBAA5C;AAIA;;AAEG;;AACH,OAAO,MAAM,SAAS,gBAAwC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC5F,MAAM,KAAK,GAAG,qBAAqB,CAAC,KAAD,EAAQ,GAAR,CAAnC;EAEA,2BAA2B,CAAC,KAAD,CAA3B;EACA,OAAO,wBAAwB,CAAC,KAAD,CAA/B;AACD,CAL6D,CAAvD;AAOP,SAAS,CAAC,WAAV,GAAwB,WAAxB","sourcesContent":["import * as React from 'react';\nimport { useTableBody_unstable } from './useTableBody';\nimport { renderTableBody_unstable } from './renderTableBody';\nimport { useTableBodyStyles_unstable } from './useTableBodyStyles';\nimport type { TableBodyProps } from './TableBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableBody component - TODO: add more docs\n */\nexport const TableBody: ForwardRefComponent<TableBodyProps> = React.forwardRef((props, ref) => {\n const state = useTableBody_unstable(props, ref);\n\n useTableBodyStyles_unstable(state);\n return renderTableBody_unstable(state);\n});\n\nTableBody.displayName = 'TableBody';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-table/src/components/TableBody/TableBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AACA,SAAS,wBAAT,QAAyC,mBAAzC;AACA,SAAS,2BAAT,QAA4C,sBAA5C;AAIA;;AAEG;;AACH,OAAO,MAAM,SAAS,gBAAwC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC5F,MAAM,KAAK,GAAG,qBAAqB,CAAC,KAAD,EAAQ,GAAR,CAAnC;EAEA,2BAA2B,CAAC,KAAD,CAA3B;EACA,OAAO,wBAAwB,CAAC,KAAD,CAA/B;AACD,CAL6D,CAAvD;AAOP,SAAS,CAAC,WAAV,GAAwB,WAAxB","sourcesContent":["import * as React from 'react';\nimport { useTableBody_unstable } from './useTableBody';\nimport { renderTableBody_unstable } from './renderTableBody';\nimport { useTableBodyStyles_unstable } from './useTableBodyStyles';\nimport type { TableBodyProps } from './TableBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableBody component - TODO: add more docs\n */\nexport const TableBody: ForwardRefComponent<TableBodyProps> = React.forwardRef((props, ref) => {\n const state = useTableBody_unstable(props, ref);\n\n useTableBodyStyles_unstable(state);\n return renderTableBody_unstable(state);\n});\n\nTableBody.displayName = 'TableBody';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"file":"TableBody.types.js","sourceRoot":"../src/","sources":["components/TableBody/TableBody.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TableBodySlots = {\n root: Slot<'tbody', 'div'>;\n};\n\n/**\n * TableBody Props\n */\nexport type TableBodyProps = ComponentProps<TableBodySlots>;\n\n/**\n * State used in rendering TableBody\n */\nexport type TableBodyState = ComponentState<TableBodySlots>;\n"]}
1
+ {"version":3,"file":"TableBody.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableBody/TableBody.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableBodySlots = {\n root: Slot<'tbody', 'div'>;\n};\n\n/**\n * TableBody Props\n */\nexport type TableBodyProps = ComponentProps<TableBodySlots>;\n\n/**\n * State used in rendering TableBody\n */\nexport type TableBodyState = ComponentState<TableBodySlots> & Pick<TableContextValue, 'noNativeElements'>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/TableBody/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC","sourcesContent":["export * from './TableBody';\nexport * from './TableBody.types';\nexport * from './renderTableBody';\nexport * from './useTableBody';\nexport * from './useTableBodyStyles';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableBody/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC","sourcesContent":["export * from './TableBody';\nexport * from './TableBody.types';\nexport * from './renderTableBody';\nexport * from './useTableBody';\nexport * from './useTableBodyStyles';\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableBody/renderTableBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,wBAAwB,GAAI,KAAD,IAA0B;EAChE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAiB,KAAjB,CAArC,CADgE,CAGhE;;EACA,oBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CALM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableBodyState, TableBodySlots } from './TableBody.types';\n\n/**\n * Render the final JSX of TableBody\n */\nexport const renderTableBody_unstable = (state: TableBodyState) => {\n const { slots, slotProps } = getSlots<TableBodySlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-table/src/components/TableBody/renderTableBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,wBAAwB,GAAI,KAAD,IAA0B;EAChE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAiB,KAAjB,CAArC,CADgE,CAGhE;;EACA,oBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CALM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableBodyState, TableBodySlots } from './TableBody.types';\n\n/**\n * Render the final JSX of TableBody\n */\nexport const renderTableBody_unstable = (state: TableBodyState) => {\n const { slots, slotProps } = getSlots<TableBodySlots>(state);\n\n // TODO Add additional slots in the appropriate place\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
@@ -25,7 +25,8 @@ export const useTableBody_unstable = (props, ref) => {
25
25
  ref,
26
26
  role: rootComponent === 'div' ? 'rowgroup' : undefined,
27
27
  ...props
28
- })
28
+ }),
29
+ noNativeElements
29
30
  };
30
31
  };
31
32
  //# sourceMappingURL=useTableBody.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableBody/useTableBody.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAEA,SAAS,eAAT,QAAgC,6BAAhC;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,qBAAqB,GAAG,CAAC,KAAD,EAAwB,GAAxB,KAAuE;;;EAC1G,MAAM;IAAE;EAAF,IAAuB,eAAe,EAA5C;EACA,MAAM,aAAa,GAAG,CAAA,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,gBAAZ,IAA+B,KAA/B,GAAuC,OAA7D;EAEA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,qBAAqB,CAAC,aAAD,EAAgB;MACzC,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,UAA1B,GAAuC,SAFJ;MAGzC,GAAG;IAHsC,CAAhB;EAJtB,CAAP;AAUD,CAdM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { TableBodyProps, TableBodyState } from './TableBody.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableBody.\n *\n * The returned state can be modified with hooks such as useTableBodyStyles_unstable,\n * before being passed to renderTableBody_unstable.\n *\n * @param props - props from this instance of TableBody\n * @param ref - reference to root HTMLElement of TableBody\n */\nexport const useTableBody_unstable = (props: TableBodyProps, ref: React.Ref<HTMLElement>): TableBodyState => {\n const { noNativeElements } = useTableContext();\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'tbody';\n\n return {\n components: {\n root: rootComponent,\n },\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'rowgroup' : undefined,\n ...props,\n }),\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-table/src/components/TableBody/useTableBody.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAEA,SAAS,eAAT,QAAgC,6BAAhC;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,qBAAqB,GAAG,CAAC,KAAD,EAAwB,GAAxB,KAAuE;;;EAC1G,MAAM;IAAE;EAAF,IAAuB,eAAe,EAA5C;EACA,MAAM,aAAa,GAAG,CAAA,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,gBAAZ,IAA+B,KAA/B,GAAuC,OAA7D;EAEA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,qBAAqB,CAAC,aAAD,EAAgB;MACzC,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,UAA1B,GAAuC,SAFJ;MAGzC,GAAG;IAHsC,CAAhB,CAJtB;IASL;EATK,CAAP;AAWD,CAfM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { TableBodyProps, TableBodyState } from './TableBody.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableBody.\n *\n * The returned state can be modified with hooks such as useTableBodyStyles_unstable,\n * before being passed to renderTableBody_unstable.\n *\n * @param props - props from this instance of TableBody\n * @param ref - reference to root HTMLElement of TableBody\n */\nexport const useTableBody_unstable = (props: TableBodyProps, ref: React.Ref<HTMLElement>): TableBodyState => {\n const { noNativeElements } = useTableContext();\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'tbody';\n\n return {\n components: {\n root: rootComponent,\n },\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'rowgroup' : undefined,\n ...props,\n }),\n noNativeElements,\n };\n};\n"],"sourceRoot":"../src/"}
@@ -1,6 +1,6 @@
1
1
  import { mergeClasses, __styles } from '@griffel/react';
2
2
 
3
- const useStyles = /*#__PURE__*/__styles({
3
+ const useTableLayoutStyles = /*#__PURE__*/__styles({
4
4
  "root": {
5
5
  "mc9l5x": "f1tp1avn"
6
6
  }
@@ -8,6 +8,14 @@ const useStyles = /*#__PURE__*/__styles({
8
8
  "d": [".f1tp1avn{display:table-row-group;}"]
9
9
  });
10
10
 
11
+ const useFlexLayoutStyles = /*#__PURE__*/__styles({
12
+ "root": {
13
+ "mc9l5x": "ftgm304"
14
+ }
15
+ }, {
16
+ "d": [".ftgm304{display:block;}"]
17
+ });
18
+
11
19
  export const tableBodyClassName = 'fui-TableBody';
12
20
  export const tableBodyClassNames = {
13
21
  root: 'fui-TableBody'
@@ -17,8 +25,11 @@ export const tableBodyClassNames = {
17
25
  */
18
26
 
19
27
  export const useTableBodyStyles_unstable = state => {
20
- const styles = useStyles();
21
- state.root.className = mergeClasses(tableBodyClassName, styles.root, state.root.className);
28
+ const layoutStyles = {
29
+ table: useTableLayoutStyles(),
30
+ flex: useFlexLayoutStyles()
31
+ };
32
+ state.root.className = mergeClasses(tableBodyClassName, state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root, state.root.className);
22
33
  return state;
23
34
  };
24
35
  //# sourceMappingURL=useTableBodyStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableBody/useTableBodyStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,gBAAzC;;AAIA,MAAM,SAAS,gBAAG;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAlB;;AAMA,OAAO,MAAM,kBAAkB,GAAG,eAA3B;AACP,OAAO,MAAM,mBAAmB,GAAmC;EACjE,IAAI,EAAE;AAD2D,CAA5D;AAIP;;AAEG;;AACH,OAAO,MAAM,2BAA2B,GAAI,KAAD,IAA0C;EACnF,MAAM,MAAM,GAAG,SAAS,EAAxB;EACA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,kBAAD,EAAqB,MAAM,CAAC,IAA5B,EAAkC,KAAK,CAAC,IAAN,CAAW,SAA7C,CAAnC;EAEA,OAAO,KAAP;AACD,CALM","sourcesContent":["import { mergeClasses, makeStyles } from '@griffel/react';\nimport type { TableBodySlots, TableBodyState } from './TableBody.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nconst useStyles = makeStyles({\n root: {\n display: 'table-row-group',\n },\n});\n\nexport const tableBodyClassName = 'fui-TableBody';\nexport const tableBodyClassNames: SlotClassNames<TableBodySlots> = {\n root: 'fui-TableBody',\n};\n\n/**\n * Apply styling to the TableBody slots based on the state\n */\nexport const useTableBodyStyles_unstable = (state: TableBodyState): TableBodyState => {\n const styles = useStyles();\n state.root.className = mergeClasses(tableBodyClassName, styles.root, state.root.className);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-table/src/components/TableBody/useTableBodyStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,gBAAzC;;AAIA,MAAM,oBAAoB,gBAAG;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA7B;;AAMA,MAAM,mBAAmB,gBAAG;EAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAA5B;;AAMA,OAAO,MAAM,kBAAkB,GAAG,eAA3B;AACP,OAAO,MAAM,mBAAmB,GAAmC;EACjE,IAAI,EAAE;AAD2D,CAA5D;AAIP;;AAEG;;AACH,OAAO,MAAM,2BAA2B,GAAI,KAAD,IAA0C;EACnF,MAAM,YAAY,GAAG;IACnB,KAAK,EAAE,oBAAoB,EADR;IAEnB,IAAI,EAAE,mBAAmB;EAFN,CAArB;EAIA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,kBADiC,EAEjC,KAAK,CAAC,gBAAN,GAAyB,YAAY,CAAC,IAAb,CAAkB,IAA3C,GAAkD,YAAY,CAAC,KAAb,CAAmB,IAFpC,EAGjC,KAAK,CAAC,IAAN,CAAW,SAHsB,CAAnC;EAMA,OAAO,KAAP;AACD,CAZM","sourcesContent":["import { mergeClasses, makeStyles } from '@griffel/react';\nimport type { TableBodySlots, TableBodyState } from './TableBody.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nconst useTableLayoutStyles = makeStyles({\n root: {\n display: 'table-row-group',\n },\n});\n\nconst useFlexLayoutStyles = makeStyles({\n root: {\n display: 'block',\n },\n});\n\nexport const tableBodyClassName = 'fui-TableBody';\nexport const tableBodyClassNames: SlotClassNames<TableBodySlots> = {\n root: 'fui-TableBody',\n};\n\n/**\n * Apply styling to the TableBody slots based on the state\n */\nexport const useTableBodyStyles_unstable = (state: TableBodyState): TableBodyState => {\n const layoutStyles = {\n table: useTableLayoutStyles(),\n flex: useFlexLayoutStyles(),\n };\n state.root.className = mergeClasses(\n tableBodyClassName,\n state.noNativeElements ? layoutStyles.flex.root : layoutStyles.table.root,\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableCell/TableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AACA,SAAS,wBAAT,QAAyC,mBAAzC;AACA,SAAS,2BAAT,QAA4C,sBAA5C;AAIA;;AAEG;;AACH,OAAO,MAAM,SAAS,gBAAwC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC5F,MAAM,KAAK,GAAG,qBAAqB,CAAC,KAAD,EAAQ,GAAR,CAAnC;EAEA,2BAA2B,CAAC,KAAD,CAA3B;EACA,OAAO,wBAAwB,CAAC,KAAD,CAA/B;AACD,CAL6D,CAAvD;AAOP,SAAS,CAAC,WAAV,GAAwB,WAAxB","sourcesContent":["import * as React from 'react';\nimport { useTableCell_unstable } from './useTableCell';\nimport { renderTableCell_unstable } from './renderTableCell';\nimport { useTableCellStyles_unstable } from './useTableCellStyles';\nimport type { TableCellProps } from './TableCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableCell component - TODO: add more docs\n */\nexport const TableCell: ForwardRefComponent<TableCellProps> = React.forwardRef((props, ref) => {\n const state = useTableCell_unstable(props, ref);\n\n useTableCellStyles_unstable(state);\n return renderTableCell_unstable(state);\n});\n\nTableCell.displayName = 'TableCell';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-table/src/components/TableCell/TableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AACA,SAAS,wBAAT,QAAyC,mBAAzC;AACA,SAAS,2BAAT,QAA4C,sBAA5C;AAIA;;AAEG;;AACH,OAAO,MAAM,SAAS,gBAAwC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAC5F,MAAM,KAAK,GAAG,qBAAqB,CAAC,KAAD,EAAQ,GAAR,CAAnC;EAEA,2BAA2B,CAAC,KAAD,CAA3B;EACA,OAAO,wBAAwB,CAAC,KAAD,CAA/B;AACD,CAL6D,CAAvD;AAOP,SAAS,CAAC,WAAV,GAAwB,WAAxB","sourcesContent":["import * as React from 'react';\nimport { useTableCell_unstable } from './useTableCell';\nimport { renderTableCell_unstable } from './renderTableCell';\nimport { useTableCellStyles_unstable } from './useTableCellStyles';\nimport type { TableCellProps } from './TableCell.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * TableCell component - TODO: add more docs\n */\nexport const TableCell: ForwardRefComponent<TableCellProps> = React.forwardRef((props, ref) => {\n const state = useTableCell_unstable(props, ref);\n\n useTableCellStyles_unstable(state);\n return renderTableCell_unstable(state);\n});\n\nTableCell.displayName = 'TableCell';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"file":"TableCell.types.js","sourceRoot":"../src/","sources":["components/TableCell/TableCell.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type TableCellSlots = {\n root: Slot<'td', 'div'>;\n};\n\n/**\n * TableCell Props\n */\nexport type TableCellProps = ComponentProps<TableCellSlots> & {};\n\n/**\n * State used in rendering TableCell\n */\nexport type TableCellState = ComponentState<TableCellSlots>;\n"]}
1
+ {"version":3,"file":"TableCell.types.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCell/TableCell.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { TableContextValue } from '../Table/Table.types';\n\nexport type TableCellSlots = {\n root: Slot<'td', 'div'>;\n};\n\n/**\n * TableCell Props\n */\nexport type TableCellProps = ComponentProps<TableCellSlots> & {};\n\n/**\n * State used in rendering TableCell\n */\nexport type TableCellState = ComponentState<TableCellSlots> & Pick<TableContextValue, 'noNativeElements'>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/TableCell/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC","sourcesContent":["export * from './TableCell';\nexport * from './TableCell.types';\nexport * from './renderTableCell';\nexport * from './useTableCell';\nexport * from './useTableCellStyles';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["packages/react-components/react-table/src/components/TableCell/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC","sourcesContent":["export * from './TableCell';\nexport * from './TableCell.types';\nexport * from './renderTableCell';\nexport * from './useTableCell';\nexport * from './useTableCellStyles';\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableCell/renderTableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,wBAAwB,GAAI,KAAD,IAA0B;EAChE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAiB,KAAjB,CAArC;EAEA,oBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CAJM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableCellState, TableCellSlots } from './TableCell.types';\n\n/**\n * Render the final JSX of TableCell\n */\nexport const renderTableCell_unstable = (state: TableCellState) => {\n const { slots, slotProps } = getSlots<TableCellSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-table/src/components/TableCell/renderTableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,wBAAwB,GAAI,KAAD,IAA0B;EAChE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAiB,KAAjB,CAArC;EAEA,oBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CAJM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { TableCellState, TableCellSlots } from './TableCell.types';\n\n/**\n * Render the final JSX of TableCell\n */\nexport const renderTableCell_unstable = (state: TableCellState) => {\n const { slots, slotProps } = getSlots<TableCellSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
@@ -25,7 +25,8 @@ export const useTableCell_unstable = (props, ref) => {
25
25
  ref,
26
26
  role: rootComponent === 'div' ? 'cell' : undefined,
27
27
  ...props
28
- })
28
+ }),
29
+ noNativeElements
29
30
  };
30
31
  };
31
32
  //# sourceMappingURL=useTableCell.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/TableCell/useTableCell.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAEA,SAAS,eAAT,QAAgC,6BAAhC;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,qBAAqB,GAAG,CAAC,KAAD,EAAwB,GAAxB,KAAuE;;;EAC1G,MAAM;IAAE;EAAF,IAAuB,eAAe,EAA5C;EAEA,MAAM,aAAa,GAAG,CAAA,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,gBAAZ,IAA+B,KAA/B,GAAuC,IAA7D;EAEA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,qBAAqB,CAAC,aAAD,EAAgB;MACzC,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,MAA1B,GAAmC,SAFA;MAGzC,GAAG;IAHsC,CAAhB;EAJtB,CAAP;AAUD,CAfM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { TableCellProps, TableCellState } from './TableCell.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableCell.\n *\n * The returned state can be modified with hooks such as useTableCellStyles_unstable,\n * before being passed to renderTableCell_unstable.\n *\n * @param props - props from this instance of TableCell\n * @param ref - reference to root HTMLElement of TableCell\n */\nexport const useTableCell_unstable = (props: TableCellProps, ref: React.Ref<HTMLElement>): TableCellState => {\n const { noNativeElements } = useTableContext();\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'td';\n\n return {\n components: {\n root: rootComponent,\n },\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'cell' : undefined,\n ...props,\n }),\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["packages/react-components/react-table/src/components/TableCell/useTableCell.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAEA,SAAS,eAAT,QAAgC,6BAAhC;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,qBAAqB,GAAG,CAAC,KAAD,EAAwB,GAAxB,KAAuE;;;EAC1G,MAAM;IAAE;EAAF,IAAuB,eAAe,EAA5C;EAEA,MAAM,aAAa,GAAG,CAAA,CAAA,EAAA,GAAA,KAAK,CAAC,EAAN,MAAQ,IAAR,IAAQ,EAAA,KAAA,KAAA,CAAR,GAAQ,EAAR,GAAY,gBAAZ,IAA+B,KAA/B,GAAuC,IAA7D;EAEA,OAAO;IACL,UAAU,EAAE;MACV,IAAI,EAAE;IADI,CADP;IAIL,IAAI,EAAE,qBAAqB,CAAC,aAAD,EAAgB;MACzC,GADyC;MAEzC,IAAI,EAAE,aAAa,KAAK,KAAlB,GAA0B,MAA1B,GAAmC,SAFA;MAGzC,GAAG;IAHsC,CAAhB,CAJtB;IASL;EATK,CAAP;AAWD,CAhBM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { TableCellProps, TableCellState } from './TableCell.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableCell.\n *\n * The returned state can be modified with hooks such as useTableCellStyles_unstable,\n * before being passed to renderTableCell_unstable.\n *\n * @param props - props from this instance of TableCell\n * @param ref - reference to root HTMLElement of TableCell\n */\nexport const useTableCell_unstable = (props: TableCellProps, ref: React.Ref<HTMLElement>): TableCellState => {\n const { noNativeElements } = useTableContext();\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'td';\n\n return {\n components: {\n root: rootComponent,\n },\n root: getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'cell' : undefined,\n ...props,\n }),\n noNativeElements,\n };\n};\n"],"sourceRoot":"../src/"}