@fluentui/react-table 9.7.2 → 9.7.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 (114) hide show
  1. package/CHANGELOG.json +139 -1
  2. package/CHANGELOG.md +38 -2
  3. package/lib/components/DataGridBody/renderDataGridBody.js +3 -3
  4. package/lib/components/DataGridBody/renderDataGridBody.js.map +1 -1
  5. package/lib/components/DataGridRow/renderDataGridRow.js +3 -3
  6. package/lib/components/DataGridRow/renderDataGridRow.js.map +1 -1
  7. package/lib/components/DataGridRow/useDataGridRow.js +4 -3
  8. package/lib/components/DataGridRow/useDataGridRow.js.map +1 -1
  9. package/lib/components/Table/renderTable.js +3 -3
  10. package/lib/components/Table/renderTable.js.map +1 -1
  11. package/lib/components/Table/useTable.js +4 -2
  12. package/lib/components/Table/useTable.js.map +1 -1
  13. package/lib/components/TableBody/renderTableBody.js +3 -3
  14. package/lib/components/TableBody/renderTableBody.js.map +1 -1
  15. package/lib/components/TableBody/useTableBody.js +4 -2
  16. package/lib/components/TableBody/useTableBody.js.map +1 -1
  17. package/lib/components/TableCell/renderTableCell.js +3 -3
  18. package/lib/components/TableCell/renderTableCell.js.map +1 -1
  19. package/lib/components/TableCell/useTableCell.js +4 -2
  20. package/lib/components/TableCell/useTableCell.js.map +1 -1
  21. package/lib/components/TableCell/useTableCellStyles.styles.js +1 -1
  22. package/lib/components/TableCellActions/renderTableCellActions.js +3 -3
  23. package/lib/components/TableCellActions/renderTableCellActions.js.map +1 -1
  24. package/lib/components/TableCellActions/useTableCellActions.js +4 -2
  25. package/lib/components/TableCellActions/useTableCellActions.js.map +1 -1
  26. package/lib/components/TableCellActions/useTableCellActionsStyles.styles.js +1 -1
  27. package/lib/components/TableCellLayout/renderTableCellLayout.js +4 -4
  28. package/lib/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  29. package/lib/components/TableCellLayout/useTableCellLayout.js +16 -8
  30. package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  31. package/lib/components/TableCellLayout/useTableCellLayoutStyles.styles.js +1 -1
  32. package/lib/components/TableHeader/renderTableHeader.js +3 -3
  33. package/lib/components/TableHeader/renderTableHeader.js.map +1 -1
  34. package/lib/components/TableHeader/useTableHeader.js +4 -2
  35. package/lib/components/TableHeader/useTableHeader.js.map +1 -1
  36. package/lib/components/TableHeaderCell/renderTableHeaderCell.js +3 -3
  37. package/lib/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  38. package/lib/components/TableHeaderCell/useTableHeaderCell.js +14 -7
  39. package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  40. package/lib/components/TableHeaderCell/useTableHeaderCellStyles.styles.js +2 -2
  41. package/lib/components/TableResizeHandle/renderTableResizeHandle.js +3 -3
  42. package/lib/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -1
  43. package/lib/components/TableResizeHandle/useTableResizeHandle.js +4 -2
  44. package/lib/components/TableResizeHandle/useTableResizeHandle.js.map +1 -1
  45. package/lib/components/TableRow/renderTableRow.js +3 -3
  46. package/lib/components/TableRow/renderTableRow.js.map +1 -1
  47. package/lib/components/TableRow/useTableRow.js +4 -2
  48. package/lib/components/TableRow/useTableRow.js.map +1 -1
  49. package/lib/components/TableRow/useTableRowStyles.styles.js +1 -47
  50. package/lib/components/TableRow/useTableRowStyles.styles.js.map +1 -1
  51. package/lib/components/TableSelectionCell/renderTableSelectionCell.js +3 -3
  52. package/lib/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  53. package/lib/components/TableSelectionCell/useTableSelectionCell.js +9 -7
  54. package/lib/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  55. package/lib/components/TableSelectionCell/useTableSelectionCellStyles.styles.js +2 -2
  56. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js +2 -2
  57. package/lib-commonjs/components/DataGridBody/renderDataGridBody.js.map +1 -1
  58. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js +2 -2
  59. package/lib-commonjs/components/DataGridRow/renderDataGridRow.js.map +1 -1
  60. package/lib-commonjs/components/DataGridRow/useDataGridRow.js +3 -2
  61. package/lib-commonjs/components/DataGridRow/useDataGridRow.js.map +1 -1
  62. package/lib-commonjs/components/Table/renderTable.js +2 -2
  63. package/lib-commonjs/components/Table/renderTable.js.map +1 -1
  64. package/lib-commonjs/components/Table/useTable.js +3 -1
  65. package/lib-commonjs/components/Table/useTable.js.map +1 -1
  66. package/lib-commonjs/components/TableBody/renderTableBody.js +2 -2
  67. package/lib-commonjs/components/TableBody/renderTableBody.js.map +1 -1
  68. package/lib-commonjs/components/TableBody/useTableBody.js +3 -1
  69. package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
  70. package/lib-commonjs/components/TableCell/renderTableCell.js +2 -2
  71. package/lib-commonjs/components/TableCell/renderTableCell.js.map +1 -1
  72. package/lib-commonjs/components/TableCell/useTableCell.js +3 -1
  73. package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
  74. package/lib-commonjs/components/TableCell/useTableCellStyles.styles.js +5 -5
  75. package/lib-commonjs/components/TableCell/useTableCellStyles.styles.js.map +1 -1
  76. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js +2 -2
  77. package/lib-commonjs/components/TableCellActions/renderTableCellActions.js.map +1 -1
  78. package/lib-commonjs/components/TableCellActions/useTableCellActions.js +3 -1
  79. package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -1
  80. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.styles.js +1 -1
  81. package/lib-commonjs/components/TableCellActions/useTableCellActionsStyles.styles.js.map +1 -1
  82. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js +3 -3
  83. package/lib-commonjs/components/TableCellLayout/renderTableCellLayout.js.map +1 -1
  84. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +15 -7
  85. package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -1
  86. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.styles.js +7 -7
  87. package/lib-commonjs/components/TableCellLayout/useTableCellLayoutStyles.styles.js.map +1 -1
  88. package/lib-commonjs/components/TableHeader/renderTableHeader.js +2 -2
  89. package/lib-commonjs/components/TableHeader/renderTableHeader.js.map +1 -1
  90. package/lib-commonjs/components/TableHeader/useTableHeader.js +3 -1
  91. package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
  92. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js +2 -2
  93. package/lib-commonjs/components/TableHeaderCell/renderTableHeaderCell.js.map +1 -1
  94. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +13 -6
  95. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
  96. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.styles.js +10 -10
  97. package/lib-commonjs/components/TableHeaderCell/useTableHeaderCellStyles.styles.js.map +1 -1
  98. package/lib-commonjs/components/TableResizeHandle/renderTableResizeHandle.js +2 -2
  99. package/lib-commonjs/components/TableResizeHandle/renderTableResizeHandle.js.map +1 -1
  100. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandle.js +3 -1
  101. package/lib-commonjs/components/TableResizeHandle/useTableResizeHandle.js.map +1 -1
  102. package/lib-commonjs/components/TableRow/renderTableRow.js +2 -2
  103. package/lib-commonjs/components/TableRow/renderTableRow.js.map +1 -1
  104. package/lib-commonjs/components/TableRow/useTableRow.js +3 -1
  105. package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
  106. package/lib-commonjs/components/TableRow/useTableRowStyles.styles.js +2 -140
  107. package/lib-commonjs/components/TableRow/useTableRowStyles.styles.js.map +1 -1
  108. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js +2 -2
  109. package/lib-commonjs/components/TableSelectionCell/renderTableSelectionCell.js.map +1 -1
  110. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js +8 -6
  111. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCell.js.map +1 -1
  112. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.styles.js +9 -9
  113. package/lib-commonjs/components/TableSelectionCell/useTableSelectionCellStyles.styles.js.map +1 -1
  114. package/package.json +12 -12
package/CHANGELOG.json CHANGED
@@ -2,7 +2,145 @@
2
2
  "name": "@fluentui/react-table",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 01 Aug 2023 10:14:29 GMT",
5
+ "date": "Wed, 09 Aug 2023 13:11:47 GMT",
6
+ "tag": "@fluentui/react-table_v9.7.4",
7
+ "version": "9.7.4",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "olfedias@microsoft.com",
12
+ "package": "@fluentui/react-table",
13
+ "commit": "b090c0339983847a62b9dc6187d08dc8c4b1d55f",
14
+ "comment": "chore: Update Griffel to latest version"
15
+ },
16
+ {
17
+ "author": "bernardo.sunderhus@gmail.com",
18
+ "package": "@fluentui/react-table",
19
+ "commit": "e615f12c54c8a4acad49930a02c3b703fd64692b",
20
+ "comment": "chore(teams-prg): migrate to new slot API"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui/react-table",
25
+ "comment": "Bump @fluentui/react-aria to v9.3.29",
26
+ "commit": "d0e28b405dc91c4682aec72dd784767a3ce95c78"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui/react-table",
31
+ "comment": "Bump @fluentui/react-avatar to v9.5.18",
32
+ "commit": "d0e28b405dc91c4682aec72dd784767a3ce95c78"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@fluentui/react-table",
37
+ "comment": "Bump @fluentui/react-checkbox to v9.1.29",
38
+ "commit": "d0e28b405dc91c4682aec72dd784767a3ce95c78"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@fluentui/react-table",
43
+ "comment": "Bump @fluentui/react-radio to v9.1.29",
44
+ "commit": "d0e28b405dc91c4682aec72dd784767a3ce95c78"
45
+ },
46
+ {
47
+ "author": "beachball",
48
+ "package": "@fluentui/react-table",
49
+ "comment": "Bump @fluentui/react-shared-contexts to v9.7.2",
50
+ "commit": "d0e28b405dc91c4682aec72dd784767a3ce95c78"
51
+ },
52
+ {
53
+ "author": "beachball",
54
+ "package": "@fluentui/react-table",
55
+ "comment": "Bump @fluentui/react-tabster to v9.12.1",
56
+ "commit": "d0e28b405dc91c4682aec72dd784767a3ce95c78"
57
+ },
58
+ {
59
+ "author": "beachball",
60
+ "package": "@fluentui/react-table",
61
+ "comment": "Bump @fluentui/react-theme to v9.1.11",
62
+ "commit": "d0e28b405dc91c4682aec72dd784767a3ce95c78"
63
+ },
64
+ {
65
+ "author": "beachball",
66
+ "package": "@fluentui/react-table",
67
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.14",
68
+ "commit": "d0e28b405dc91c4682aec72dd784767a3ce95c78"
69
+ }
70
+ ]
71
+ }
72
+ },
73
+ {
74
+ "date": "Fri, 04 Aug 2023 08:52:58 GMT",
75
+ "tag": "@fluentui/react-table_v9.7.3",
76
+ "version": "9.7.3",
77
+ "comments": {
78
+ "patch": [
79
+ {
80
+ "author": "beachball",
81
+ "package": "@fluentui/react-table",
82
+ "comment": "Bump @fluentui/react-aria to v9.3.28",
83
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
84
+ },
85
+ {
86
+ "author": "beachball",
87
+ "package": "@fluentui/react-table",
88
+ "comment": "Bump @fluentui/react-avatar to v9.5.17",
89
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
90
+ },
91
+ {
92
+ "author": "beachball",
93
+ "package": "@fluentui/react-table",
94
+ "comment": "Bump @fluentui/react-checkbox to v9.1.28",
95
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
96
+ },
97
+ {
98
+ "author": "beachball",
99
+ "package": "@fluentui/react-table",
100
+ "comment": "Bump @fluentui/react-context-selector to v9.1.27",
101
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
102
+ },
103
+ {
104
+ "author": "beachball",
105
+ "package": "@fluentui/react-table",
106
+ "comment": "Bump @fluentui/react-radio to v9.1.28",
107
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
108
+ },
109
+ {
110
+ "author": "beachball",
111
+ "package": "@fluentui/react-table",
112
+ "comment": "Bump @fluentui/react-shared-contexts to v9.7.1",
113
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
114
+ },
115
+ {
116
+ "author": "beachball",
117
+ "package": "@fluentui/react-table",
118
+ "comment": "Bump @fluentui/react-tabster to v9.12.0",
119
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
120
+ },
121
+ {
122
+ "author": "beachball",
123
+ "package": "@fluentui/react-table",
124
+ "comment": "Bump @fluentui/react-theme to v9.1.10",
125
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
126
+ },
127
+ {
128
+ "author": "beachball",
129
+ "package": "@fluentui/react-table",
130
+ "comment": "Bump @fluentui/react-utilities to v9.11.0",
131
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
132
+ },
133
+ {
134
+ "author": "beachball",
135
+ "package": "@fluentui/react-table",
136
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.13",
137
+ "commit": "0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca"
138
+ }
139
+ ]
140
+ }
141
+ },
142
+ {
143
+ "date": "Tue, 01 Aug 2023 10:17:21 GMT",
6
144
  "tag": "@fluentui/react-table_v9.7.2",
7
145
  "version": "9.7.2",
8
146
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,48 @@
1
1
  # Change Log - @fluentui/react-table
2
2
 
3
- This log was last generated on Tue, 01 Aug 2023 10:14:29 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 09 Aug 2023 13:11:47 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.7.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.7.4)
8
+
9
+ Wed, 09 Aug 2023 13:11:47 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-table_v9.7.3..@fluentui/react-table_v9.7.4)
11
+
12
+ ### Patches
13
+
14
+ - chore: Update Griffel to latest version ([PR #28684](https://github.com/microsoft/fluentui/pull/28684) by olfedias@microsoft.com)
15
+ - chore(teams-prg): migrate to new slot API ([PR #28751](https://github.com/microsoft/fluentui/pull/28751) by bernardo.sunderhus@gmail.com)
16
+ - Bump @fluentui/react-aria to v9.3.29 ([commit](https://github.com/microsoft/fluentui/commit/d0e28b405dc91c4682aec72dd784767a3ce95c78) by beachball)
17
+ - Bump @fluentui/react-avatar to v9.5.18 ([commit](https://github.com/microsoft/fluentui/commit/d0e28b405dc91c4682aec72dd784767a3ce95c78) by beachball)
18
+ - Bump @fluentui/react-checkbox to v9.1.29 ([commit](https://github.com/microsoft/fluentui/commit/d0e28b405dc91c4682aec72dd784767a3ce95c78) by beachball)
19
+ - Bump @fluentui/react-radio to v9.1.29 ([commit](https://github.com/microsoft/fluentui/commit/d0e28b405dc91c4682aec72dd784767a3ce95c78) by beachball)
20
+ - Bump @fluentui/react-shared-contexts to v9.7.2 ([commit](https://github.com/microsoft/fluentui/commit/d0e28b405dc91c4682aec72dd784767a3ce95c78) by beachball)
21
+ - Bump @fluentui/react-tabster to v9.12.1 ([commit](https://github.com/microsoft/fluentui/commit/d0e28b405dc91c4682aec72dd784767a3ce95c78) by beachball)
22
+ - Bump @fluentui/react-theme to v9.1.11 ([commit](https://github.com/microsoft/fluentui/commit/d0e28b405dc91c4682aec72dd784767a3ce95c78) by beachball)
23
+ - Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.14 ([commit](https://github.com/microsoft/fluentui/commit/d0e28b405dc91c4682aec72dd784767a3ce95c78) by beachball)
24
+
25
+ ## [9.7.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.7.3)
26
+
27
+ Fri, 04 Aug 2023 08:52:58 GMT
28
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-table_v9.7.2..@fluentui/react-table_v9.7.3)
29
+
30
+ ### Patches
31
+
32
+ - Bump @fluentui/react-aria to v9.3.28 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
33
+ - Bump @fluentui/react-avatar to v9.5.17 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
34
+ - Bump @fluentui/react-checkbox to v9.1.28 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
35
+ - Bump @fluentui/react-context-selector to v9.1.27 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
36
+ - Bump @fluentui/react-radio to v9.1.28 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
37
+ - Bump @fluentui/react-shared-contexts to v9.7.1 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
38
+ - Bump @fluentui/react-tabster to v9.12.0 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
39
+ - Bump @fluentui/react-theme to v9.1.10 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
40
+ - Bump @fluentui/react-utilities to v9.11.0 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
41
+ - Bump @fluentui/react-jsx-runtime to v9.0.0-alpha.13 ([commit](https://github.com/microsoft/fluentui/commit/0bf7d9438c1d0ff90cd2b28bc4cceb4f807afbca) by beachball)
42
+
7
43
  ## [9.7.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.7.2)
8
44
 
9
- Tue, 01 Aug 2023 10:14:29 GMT
45
+ Tue, 01 Aug 2023 10:17:21 GMT
10
46
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-table_v9.7.1..@fluentui/react-table_v9.7.2)
11
47
 
12
48
  ### Patches
@@ -1,11 +1,11 @@
1
1
  /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
2
- import { getSlotsNext } from '@fluentui/react-utilities';
2
+ import { assertSlots } from '@fluentui/react-utilities';
3
3
  import { TableRowIdContextProvider } from '../../contexts/rowIdContext';
4
4
  /**
5
5
  * Render the final JSX of DataGridBody
6
6
  */ export const renderDataGridBody_unstable = (state)=>{
7
- const { slots , slotProps } = getSlotsNext(state);
8
- return /*#__PURE__*/ createElement(slots.root, slotProps.root, state.rows.map((row)=>/*#__PURE__*/ createElement(TableRowIdContextProvider, {
7
+ assertSlots(state);
8
+ return /*#__PURE__*/ createElement(state.root, null, state.rows.map((row)=>/*#__PURE__*/ createElement(TableRowIdContextProvider, {
9
9
  key: row.rowId,
10
10
  value: row.rowId
11
11
  }, state.renderRow(row))));
@@ -1 +1 @@
1
- {"version":3,"sources":["renderDataGridBody.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport type { DataGridBodyState, DataGridBodySlots } from './DataGridBody.types';\nimport { TableRowIdContextProvider } from '../../contexts/rowIdContext';\n\n/**\n * Render the final JSX of DataGridBody\n */\nexport const renderDataGridBody_unstable = (state: DataGridBodyState) => {\n const { slots, slotProps } = getSlotsNext<DataGridBodySlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {state.rows.map(row => (\n <TableRowIdContextProvider key={row.rowId} value={row.rowId}>\n {state.renderRow(row)}\n </TableRowIdContextProvider>\n ))}\n </slots.root>\n );\n};\n"],"names":["createElement","getSlotsNext","TableRowIdContextProvider","renderDataGridBody_unstable","state","slots","slotProps","root","rows","map","row","key","rowId","value","renderRow"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,YAAY,QAAQ,4BAA4B;AAEzD,SAASC,yBAAyB,QAAQ,8BAA8B;AAExE;;CAEC,GACD,OAAO,MAAMC,8BAA8B,CAACC,QAA6B;IACvE,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGL,aAAgCG;IAE7D,qBACE,AAdJ,cAcKC,MAAME,IAAI,EAAKD,UAAUC,IAAI,EAC3BH,MAAMI,IAAI,CAACC,GAAG,CAACC,CAAAA,oBACd,AAhBR,cAgBSR;YAA0BS,KAAKD,IAAIE,KAAK;YAAEC,OAAOH,IAAIE,KAAK;WACxDR,MAAMU,SAAS,CAACJ;AAK3B,EAAE"}
1
+ {"version":3,"sources":["renderDataGridBody.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { DataGridBodyState, DataGridBodySlots } from './DataGridBody.types';\nimport { TableRowIdContextProvider } from '../../contexts/rowIdContext';\n\n/**\n * Render the final JSX of DataGridBody\n */\nexport const renderDataGridBody_unstable = (state: DataGridBodyState) => {\n assertSlots<DataGridBodySlots>(state);\n\n return (\n <state.root>\n {state.rows.map(row => (\n <TableRowIdContextProvider key={row.rowId} value={row.rowId}>\n {state.renderRow(row)}\n </TableRowIdContextProvider>\n ))}\n </state.root>\n );\n};\n"],"names":["createElement","assertSlots","TableRowIdContextProvider","renderDataGridBody_unstable","state","root","rows","map","row","key","rowId","value","renderRow"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,WAAW,QAAQ,4BAA4B;AAExD,SAASC,yBAAyB,QAAQ,8BAA8B;AAExE;;CAEC,GACD,OAAO,MAAMC,8BAA8B,CAACC,QAA6B;IACvEH,YAA+BG;IAE/B,qBACE,AAdJ,cAcKA,MAAMC,IAAI,QACRD,MAAME,IAAI,CAACC,GAAG,CAACC,CAAAA,oBACd,AAhBR,cAgBSN;YAA0BO,KAAKD,IAAIE,KAAK;YAAEC,OAAOH,IAAIE,KAAK;WACxDN,MAAMQ,SAAS,CAACJ;AAK3B,EAAE"}
@@ -1,11 +1,11 @@
1
1
  /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
2
- import { getSlotsNext } from '@fluentui/react-utilities';
2
+ import { assertSlots } from '@fluentui/react-utilities';
3
3
  import { ColumnIdContextProvider } from '../../contexts/columnIdContext';
4
4
  /**
5
5
  * Render the final JSX of DataGridRow
6
6
  */ export const renderDataGridRow_unstable = (state)=>{
7
- const { slots , slotProps } = getSlotsNext(state);
8
- return /*#__PURE__*/ createElement(slots.root, slotProps.root, slots.selectionCell && /*#__PURE__*/ createElement(slots.selectionCell, slotProps.selectionCell), state.columnDefs.map((columnDef)=>/*#__PURE__*/ createElement(ColumnIdContextProvider, {
7
+ assertSlots(state);
8
+ return /*#__PURE__*/ createElement(state.root, null, state.selectionCell && /*#__PURE__*/ createElement(state.selectionCell, null), state.columnDefs.map((columnDef)=>/*#__PURE__*/ createElement(ColumnIdContextProvider, {
9
9
  value: columnDef.columnId,
10
10
  key: columnDef.columnId
11
11
  }, state.renderCell(columnDef, state.dataGridContextValue))));
@@ -1 +1 @@
1
- {"version":3,"sources":["renderDataGridRow.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport type { DataGridRowState, DataGridRowSlots } from './DataGridRow.types';\nimport { ColumnIdContextProvider } from '../../contexts/columnIdContext';\n\n/**\n * Render the final JSX of DataGridRow\n */\nexport const renderDataGridRow_unstable = (state: DataGridRowState) => {\n const { slots, slotProps } = getSlotsNext<DataGridRowSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slots.selectionCell && <slots.selectionCell {...slotProps.selectionCell} />}\n {state.columnDefs.map(columnDef => (\n <ColumnIdContextProvider value={columnDef.columnId} key={columnDef.columnId}>\n {state.renderCell(columnDef, state.dataGridContextValue)}\n </ColumnIdContextProvider>\n ))}\n </slots.root>\n );\n};\n"],"names":["createElement","getSlotsNext","ColumnIdContextProvider","renderDataGridRow_unstable","state","slots","slotProps","root","selectionCell","columnDefs","map","columnDef","value","columnId","key","renderCell","dataGridContextValue"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,YAAY,QAAQ,4BAA4B;AAEzD,SAASC,uBAAuB,QAAQ,iCAAiC;AAEzE;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC,QAA4B;IACrE,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGL,aAA+BG;IAE5D,qBACE,AAdJ,cAcKC,MAAME,IAAI,EAAKD,UAAUC,IAAI,EAC3BF,MAAMG,aAAa,kBAAI,AAf9B,cAe+BH,MAAMG,aAAa,EAAKF,UAAUE,aAAa,GACvEJ,MAAMK,UAAU,CAACC,GAAG,CAACC,CAAAA,0BACpB,AAjBR,cAiBST;YAAwBU,OAAOD,UAAUE,QAAQ;YAAEC,KAAKH,UAAUE,QAAQ;WACxET,MAAMW,UAAU,CAACJ,WAAWP,MAAMY,oBAAoB;AAKjE,EAAE"}
1
+ {"version":3,"sources":["renderDataGridRow.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { DataGridRowState, DataGridRowSlots } from './DataGridRow.types';\nimport { ColumnIdContextProvider } from '../../contexts/columnIdContext';\n\n/**\n * Render the final JSX of DataGridRow\n */\nexport const renderDataGridRow_unstable = (state: DataGridRowState) => {\n assertSlots<DataGridRowSlots>(state);\n\n return (\n <state.root>\n {state.selectionCell && <state.selectionCell />}\n {state.columnDefs.map(columnDef => (\n <ColumnIdContextProvider value={columnDef.columnId} key={columnDef.columnId}>\n {state.renderCell(columnDef, state.dataGridContextValue)}\n </ColumnIdContextProvider>\n ))}\n </state.root>\n );\n};\n"],"names":["createElement","assertSlots","ColumnIdContextProvider","renderDataGridRow_unstable","state","root","selectionCell","columnDefs","map","columnDef","value","columnId","key","renderCell","dataGridContextValue"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,WAAW,QAAQ,4BAA4B;AAExD,SAASC,uBAAuB,QAAQ,iCAAiC;AAEzE;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC,QAA4B;IACrEH,YAA8BG;IAE9B,qBACE,AAdJ,cAcKA,MAAMC,IAAI,QACRD,MAAME,aAAa,kBAAI,AAf9B,cAe+BF,MAAME,aAAa,SAC3CF,MAAMG,UAAU,CAACC,GAAG,CAACC,CAAAA,0BACpB,AAjBR,cAiBSP;YAAwBQ,OAAOD,UAAUE,QAAQ;YAAEC,KAAKH,UAAUE,QAAQ;WACxEP,MAAMS,UAAU,CAACJ,WAAWL,MAAMU,oBAAoB;AAKjE,EAAE"}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { isInteractiveHTMLElement, useEventCallback, resolveShorthand } from '@fluentui/react-utilities';
2
+ import { isInteractiveHTMLElement, useEventCallback, slot } from '@fluentui/react-utilities';
3
3
  import { Space } from '@fluentui/keyboard-keys';
4
4
  import { useTableRow_unstable } from '../TableRow/useTableRow';
5
5
  import { useDataGridContext_unstable } from '../../contexts/dataGridContext';
@@ -64,8 +64,9 @@ import { useIsInTableHeader } from '../../contexts/tableHeaderContext';
64
64
  ...baseState.components,
65
65
  selectionCell: DataGridSelectionCell
66
66
  },
67
- selectionCell: resolveShorthand(props.selectionCell, {
68
- required: selectable
67
+ selectionCell: slot.optional(props.selectionCell, {
68
+ renderByDefault: selectable,
69
+ elementType: DataGridSelectionCell
69
70
  }),
70
71
  renderCell: props.children,
71
72
  columnDefs,
@@ -1 +1 @@
1
- {"version":3,"sources":["useDataGridRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport { isInteractiveHTMLElement, useEventCallback, resolveShorthand } from '@fluentui/react-utilities';\nimport { Space } from '@fluentui/keyboard-keys';\nimport type { DataGridRowProps, DataGridRowState } from './DataGridRow.types';\nimport { useTableRow_unstable } from '../TableRow/useTableRow';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { DataGridSelectionCell } from '../DataGridSelectionCell/DataGridSelectionCell';\nimport { useTableRowIdContext } from '../../contexts/rowIdContext';\nimport { useIsInTableHeader } from '../../contexts/tableHeaderContext';\n\n/**\n * Create the state required to render DataGridRow.\n *\n * The returned state can be modified with hooks such as useDataGridRowStyles_unstable,\n * before being passed to renderDataGridRow_unstable.\n *\n * @param props - props from this instance of DataGridRow\n * @param ref - reference to root HTMLElement of DataGridRow\n */\nexport const useDataGridRow_unstable = (props: DataGridRowProps, ref: React.Ref<HTMLElement>): DataGridRowState => {\n const rowId = useTableRowIdContext();\n const isHeader = useIsInTableHeader();\n const columnDefs = useDataGridContext_unstable(ctx => ctx.columns);\n const selectable = useDataGridContext_unstable(ctx => ctx.selectableRows);\n const selected = useDataGridContext_unstable(ctx => ctx.selection.isRowSelected(rowId));\n const focusMode = useDataGridContext_unstable(ctx => ctx.focusMode);\n const compositeRowTabsterAttribute = useDataGridContext_unstable(ctx => ctx.compositeRowTabsterAttribute);\n const tabbable = focusMode === 'row_unstable' || focusMode === 'composite';\n const appearance = useDataGridContext_unstable(ctx => {\n if (!isHeader && selectable && ctx.selection.isRowSelected(rowId)) {\n return ctx.selectionAppearance;\n }\n\n return 'none';\n });\n const toggleRow = useDataGridContext_unstable(ctx => ctx.selection.toggleRow);\n const dataGridContextValue = useDataGridContext_unstable(ctx => ctx);\n\n const onClick = useEventCallback((e: React.MouseEvent<HTMLTableRowElement>) => {\n if (selectable && !isHeader) {\n toggleRow(e, rowId);\n }\n\n props.onClick?.(e);\n });\n\n const onKeyDown = useEventCallback((e: React.KeyboardEvent<HTMLTableRowElement>) => {\n if (selectable && !isHeader && e.key === Space && !isInteractiveHTMLElement(e.target as HTMLElement)) {\n // stop scrolling\n e.preventDefault();\n toggleRow(e, rowId);\n }\n\n props.onKeyDown?.(e);\n });\n\n const baseState = useTableRow_unstable(\n {\n appearance,\n 'aria-selected': selectable ? selected : undefined,\n tabIndex: tabbable && !isHeader ? 0 : undefined,\n ...(focusMode === 'composite' && !isHeader && compositeRowTabsterAttribute),\n ...props,\n onClick,\n onKeyDown,\n children: null,\n as: 'div',\n },\n ref,\n );\n\n return {\n ...baseState,\n components: {\n ...baseState.components,\n selectionCell: DataGridSelectionCell,\n },\n selectionCell: resolveShorthand(props.selectionCell, { required: selectable }),\n renderCell: props.children,\n columnDefs,\n dataGridContextValue,\n };\n};\n"],"names":["React","isInteractiveHTMLElement","useEventCallback","resolveShorthand","Space","useTableRow_unstable","useDataGridContext_unstable","DataGridSelectionCell","useTableRowIdContext","useIsInTableHeader","useDataGridRow_unstable","props","ref","rowId","isHeader","columnDefs","ctx","columns","selectable","selectableRows","selected","selection","isRowSelected","focusMode","compositeRowTabsterAttribute","tabbable","appearance","selectionAppearance","toggleRow","dataGridContextValue","onClick","e","onKeyDown","key","target","preventDefault","baseState","undefined","tabIndex","children","as","components","selectionCell","required","renderCell"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,gBAAgB,EAAEC,gBAAgB,QAAQ,4BAA4B;AACzG,SAASC,KAAK,QAAQ,0BAA0B;AAEhD,SAASC,oBAAoB,QAAQ,0BAA0B;AAC/D,SAASC,2BAA2B,QAAQ,iCAAiC;AAC7E,SAASC,qBAAqB,QAAQ,iDAAiD;AACvF,SAASC,oBAAoB,QAAQ,8BAA8B;AACnE,SAASC,kBAAkB,QAAQ,oCAAoC;AAEvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAyBC,MAAkD;IACjH,MAAMC,QAAQL;IACd,MAAMM,WAAWL;IACjB,MAAMM,aAAaT,4BAA4BU,CAAAA,MAAOA,IAAIC,OAAO;IACjE,MAAMC,aAAaZ,4BAA4BU,CAAAA,MAAOA,IAAIG,cAAc;IACxE,MAAMC,WAAWd,4BAA4BU,CAAAA,MAAOA,IAAIK,SAAS,CAACC,aAAa,CAACT;IAChF,MAAMU,YAAYjB,4BAA4BU,CAAAA,MAAOA,IAAIO,SAAS;IAClE,MAAMC,+BAA+BlB,4BAA4BU,CAAAA,MAAOA,IAAIQ,4BAA4B;IACxG,MAAMC,WAAWF,cAAc,kBAAkBA,cAAc;IAC/D,MAAMG,aAAapB,4BAA4BU,CAAAA,MAAO;QACpD,IAAI,CAACF,YAAYI,cAAcF,IAAIK,SAAS,CAACC,aAAa,CAACT,QAAQ;YACjE,OAAOG,IAAIW,mBAAmB;QAChC,CAAC;QAED,OAAO;IACT;IACA,MAAMC,YAAYtB,4BAA4BU,CAAAA,MAAOA,IAAIK,SAAS,CAACO,SAAS;IAC5E,MAAMC,uBAAuBvB,4BAA4BU,CAAAA,MAAOA;IAEhE,MAAMc,UAAU5B,iBAAiB,CAAC6B,IAA6C;YAK7EpB;QAJA,IAAIO,cAAc,CAACJ,UAAU;YAC3Bc,UAAUG,GAAGlB;QACf,CAAC;QAEDF,CAAAA,iBAAAA,MAAMmB,OAAO,cAAbnB,4BAAAA,KAAAA,IAAAA,eAAAA,KAAAA,OAAgBoB;IAClB;IAEA,MAAMC,YAAY9B,iBAAiB,CAAC6B,IAAgD;YAOlFpB;QANA,IAAIO,cAAc,CAACJ,YAAYiB,EAAEE,GAAG,KAAK7B,SAAS,CAACH,yBAAyB8B,EAAEG,MAAM,GAAkB;YACpG,iBAAiB;YACjBH,EAAEI,cAAc;YAChBP,UAAUG,GAAGlB;QACf,CAAC;QAEDF,CAAAA,mBAAAA,MAAMqB,SAAS,cAAfrB,8BAAAA,KAAAA,IAAAA,iBAAAA,KAAAA,OAAkBoB;IACpB;IAEA,MAAMK,YAAY/B,qBAChB;QACEqB;QACA,iBAAiBR,aAAaE,WAAWiB,SAAS;QAClDC,UAAUb,YAAY,CAACX,WAAW,IAAIuB,SAAS;QAC/C,GAAId,cAAc,eAAe,CAACT,YAAYU,4BAA4B;QAC1E,GAAGb,KAAK;QACRmB;QACAE;QACAO,UAAU,IAAI;QACdC,IAAI;IACN,GACA5B;IAGF,OAAO;QACL,GAAGwB,SAAS;QACZK,YAAY;YACV,GAAGL,UAAUK,UAAU;YACvBC,eAAenC;QACjB;QACAmC,eAAevC,iBAAiBQ,MAAM+B,aAAa,EAAE;YAAEC,UAAUzB;QAAW;QAC5E0B,YAAYjC,MAAM4B,QAAQ;QAC1BxB;QACAc;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["useDataGridRow.tsx"],"sourcesContent":["import * as React from 'react';\nimport { isInteractiveHTMLElement, useEventCallback, slot } from '@fluentui/react-utilities';\nimport { Space } from '@fluentui/keyboard-keys';\nimport type { DataGridRowProps, DataGridRowState } from './DataGridRow.types';\nimport { useTableRow_unstable } from '../TableRow/useTableRow';\nimport { useDataGridContext_unstable } from '../../contexts/dataGridContext';\nimport { DataGridSelectionCell } from '../DataGridSelectionCell/DataGridSelectionCell';\nimport { useTableRowIdContext } from '../../contexts/rowIdContext';\nimport { useIsInTableHeader } from '../../contexts/tableHeaderContext';\n\n/**\n * Create the state required to render DataGridRow.\n *\n * The returned state can be modified with hooks such as useDataGridRowStyles_unstable,\n * before being passed to renderDataGridRow_unstable.\n *\n * @param props - props from this instance of DataGridRow\n * @param ref - reference to root HTMLElement of DataGridRow\n */\nexport const useDataGridRow_unstable = (props: DataGridRowProps, ref: React.Ref<HTMLElement>): DataGridRowState => {\n const rowId = useTableRowIdContext();\n const isHeader = useIsInTableHeader();\n const columnDefs = useDataGridContext_unstable(ctx => ctx.columns);\n const selectable = useDataGridContext_unstable(ctx => ctx.selectableRows);\n const selected = useDataGridContext_unstable(ctx => ctx.selection.isRowSelected(rowId));\n const focusMode = useDataGridContext_unstable(ctx => ctx.focusMode);\n const compositeRowTabsterAttribute = useDataGridContext_unstable(ctx => ctx.compositeRowTabsterAttribute);\n const tabbable = focusMode === 'row_unstable' || focusMode === 'composite';\n const appearance = useDataGridContext_unstable(ctx => {\n if (!isHeader && selectable && ctx.selection.isRowSelected(rowId)) {\n return ctx.selectionAppearance;\n }\n\n return 'none';\n });\n const toggleRow = useDataGridContext_unstable(ctx => ctx.selection.toggleRow);\n const dataGridContextValue = useDataGridContext_unstable(ctx => ctx);\n\n const onClick = useEventCallback((e: React.MouseEvent<HTMLTableRowElement>) => {\n if (selectable && !isHeader) {\n toggleRow(e, rowId);\n }\n\n props.onClick?.(e);\n });\n\n const onKeyDown = useEventCallback((e: React.KeyboardEvent<HTMLTableRowElement>) => {\n if (selectable && !isHeader && e.key === Space && !isInteractiveHTMLElement(e.target as HTMLElement)) {\n // stop scrolling\n e.preventDefault();\n toggleRow(e, rowId);\n }\n\n props.onKeyDown?.(e);\n });\n\n const baseState = useTableRow_unstable(\n {\n appearance,\n 'aria-selected': selectable ? selected : undefined,\n tabIndex: tabbable && !isHeader ? 0 : undefined,\n ...(focusMode === 'composite' && !isHeader && compositeRowTabsterAttribute),\n ...props,\n onClick,\n onKeyDown,\n children: null,\n as: 'div',\n },\n ref,\n );\n\n return {\n ...baseState,\n components: {\n ...baseState.components,\n selectionCell: DataGridSelectionCell,\n },\n selectionCell: slot.optional(props.selectionCell, {\n renderByDefault: selectable,\n elementType: DataGridSelectionCell,\n }),\n renderCell: props.children,\n columnDefs,\n dataGridContextValue,\n };\n};\n"],"names":["React","isInteractiveHTMLElement","useEventCallback","slot","Space","useTableRow_unstable","useDataGridContext_unstable","DataGridSelectionCell","useTableRowIdContext","useIsInTableHeader","useDataGridRow_unstable","props","ref","rowId","isHeader","columnDefs","ctx","columns","selectable","selectableRows","selected","selection","isRowSelected","focusMode","compositeRowTabsterAttribute","tabbable","appearance","selectionAppearance","toggleRow","dataGridContextValue","onClick","e","onKeyDown","key","target","preventDefault","baseState","undefined","tabIndex","children","as","components","selectionCell","optional","renderByDefault","elementType","renderCell"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,4BAA4B;AAC7F,SAASC,KAAK,QAAQ,0BAA0B;AAEhD,SAASC,oBAAoB,QAAQ,0BAA0B;AAC/D,SAASC,2BAA2B,QAAQ,iCAAiC;AAC7E,SAASC,qBAAqB,QAAQ,iDAAiD;AACvF,SAASC,oBAAoB,QAAQ,8BAA8B;AACnE,SAASC,kBAAkB,QAAQ,oCAAoC;AAEvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAyBC,MAAkD;IACjH,MAAMC,QAAQL;IACd,MAAMM,WAAWL;IACjB,MAAMM,aAAaT,4BAA4BU,CAAAA,MAAOA,IAAIC,OAAO;IACjE,MAAMC,aAAaZ,4BAA4BU,CAAAA,MAAOA,IAAIG,cAAc;IACxE,MAAMC,WAAWd,4BAA4BU,CAAAA,MAAOA,IAAIK,SAAS,CAACC,aAAa,CAACT;IAChF,MAAMU,YAAYjB,4BAA4BU,CAAAA,MAAOA,IAAIO,SAAS;IAClE,MAAMC,+BAA+BlB,4BAA4BU,CAAAA,MAAOA,IAAIQ,4BAA4B;IACxG,MAAMC,WAAWF,cAAc,kBAAkBA,cAAc;IAC/D,MAAMG,aAAapB,4BAA4BU,CAAAA,MAAO;QACpD,IAAI,CAACF,YAAYI,cAAcF,IAAIK,SAAS,CAACC,aAAa,CAACT,QAAQ;YACjE,OAAOG,IAAIW,mBAAmB;QAChC,CAAC;QAED,OAAO;IACT;IACA,MAAMC,YAAYtB,4BAA4BU,CAAAA,MAAOA,IAAIK,SAAS,CAACO,SAAS;IAC5E,MAAMC,uBAAuBvB,4BAA4BU,CAAAA,MAAOA;IAEhE,MAAMc,UAAU5B,iBAAiB,CAAC6B,IAA6C;YAK7EpB;QAJA,IAAIO,cAAc,CAACJ,UAAU;YAC3Bc,UAAUG,GAAGlB;QACf,CAAC;QAEDF,CAAAA,iBAAAA,MAAMmB,OAAO,cAAbnB,4BAAAA,KAAAA,IAAAA,eAAAA,KAAAA,OAAgBoB;IAClB;IAEA,MAAMC,YAAY9B,iBAAiB,CAAC6B,IAAgD;YAOlFpB;QANA,IAAIO,cAAc,CAACJ,YAAYiB,EAAEE,GAAG,KAAK7B,SAAS,CAACH,yBAAyB8B,EAAEG,MAAM,GAAkB;YACpG,iBAAiB;YACjBH,EAAEI,cAAc;YAChBP,UAAUG,GAAGlB;QACf,CAAC;QAEDF,CAAAA,mBAAAA,MAAMqB,SAAS,cAAfrB,8BAAAA,KAAAA,IAAAA,iBAAAA,KAAAA,OAAkBoB;IACpB;IAEA,MAAMK,YAAY/B,qBAChB;QACEqB;QACA,iBAAiBR,aAAaE,WAAWiB,SAAS;QAClDC,UAAUb,YAAY,CAACX,WAAW,IAAIuB,SAAS;QAC/C,GAAId,cAAc,eAAe,CAACT,YAAYU,4BAA4B;QAC1E,GAAGb,KAAK;QACRmB;QACAE;QACAO,UAAU,IAAI;QACdC,IAAI;IACN,GACA5B;IAGF,OAAO;QACL,GAAGwB,SAAS;QACZK,YAAY;YACV,GAAGL,UAAUK,UAAU;YACvBC,eAAenC;QACjB;QACAmC,eAAevC,KAAKwC,QAAQ,CAAChC,MAAM+B,aAAa,EAAE;YAChDE,iBAAiB1B;YACjB2B,aAAatC;QACf;QACAuC,YAAYnC,MAAM4B,QAAQ;QAC1BxB;QACAc;IACF;AACF,EAAE"}
@@ -1,11 +1,11 @@
1
1
  /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
2
- import { getSlotsNext } from '@fluentui/react-utilities';
2
+ import { assertSlots } from '@fluentui/react-utilities';
3
3
  import { TableContextProvider } from '../../contexts/tableContext';
4
4
  /**
5
5
  * Render the final JSX of Table
6
6
  */ export const renderTable_unstable = (state, contextValues)=>{
7
- const { slots , slotProps } = getSlotsNext(state);
7
+ assertSlots(state);
8
8
  return /*#__PURE__*/ createElement(TableContextProvider, {
9
9
  value: contextValues.table
10
- }, /*#__PURE__*/ createElement(slots.root, slotProps.root));
10
+ }, /*#__PURE__*/ createElement(state.root, null));
11
11
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderTable.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } 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 } = getSlotsNext<TableSlots>(state);\n\n return (\n <TableContextProvider value={contextValues.table}>\n <slots.root {...slotProps.root} />\n </TableContextProvider>\n );\n};\n"],"names":["createElement","getSlotsNext","TableContextProvider","renderTable_unstable","state","contextValues","slots","slotProps","value","table","root"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,YAAY,QAAQ,4BAA4B;AAEzD,SAASC,oBAAoB,QAAQ,8BAA8B;AAEnE;;CAEC,GACD,OAAO,MAAMC,uBAAuB,CAACC,OAAmBC,gBAAsC;IAC5F,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGN,aAAyBG;IAEtD,qBACE,AAdJ,cAcKF;QAAqBM,OAAOH,cAAcI,KAAK;qBAC9C,AAfN,cAeOH,MAAMI,IAAI,EAAKH,UAAUG,IAAI;AAGpC,EAAE"}
1
+ {"version":3,"sources":["renderTable.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } 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 assertSlots<TableSlots>(state);\n\n return (\n <TableContextProvider value={contextValues.table}>\n <state.root />\n </TableContextProvider>\n );\n};\n"],"names":["createElement","assertSlots","TableContextProvider","renderTable_unstable","state","contextValues","value","table","root"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,WAAW,QAAQ,4BAA4B;AAExD,SAASC,oBAAoB,QAAQ,8BAA8B;AAEnE;;CAEC,GACD,OAAO,MAAMC,uBAAuB,CAACC,OAAmBC,gBAAsC;IAC5FJ,YAAwBG;IAExB,qBACE,AAdJ,cAcKF;QAAqBI,OAAOD,cAAcE,KAAK;qBAC9C,AAfN,cAeOH,MAAMI,IAAI;AAGjB,EAAE"}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { getNativeElementProps } from '@fluentui/react-utilities';
2
+ import { getNativeElementProps, slot } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Create the state required to render Table.
5
5
  *
@@ -16,10 +16,12 @@ import { getNativeElementProps } from '@fluentui/react-utilities';
16
16
  components: {
17
17
  root: rootComponent
18
18
  },
19
- root: getNativeElementProps(rootComponent, {
19
+ root: slot.always(getNativeElementProps(rootComponent, {
20
20
  ref,
21
21
  role: rootComponent === 'div' ? 'table' : undefined,
22
22
  ...props
23
+ }), {
24
+ elementType: rootComponent
23
25
  }),
24
26
  size: (_props_size = props.size) !== null && _props_size !== void 0 ? _props_size : 'medium',
25
27
  noNativeElements: (_props_noNativeElements = props.noNativeElements) !== null && _props_noNativeElements !== void 0 ? _props_noNativeElements : false,
@@ -1 +1 @@
1
- {"version":3,"sources":["useTable.ts"],"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"],"names":["React","getNativeElementProps","useTable_unstable","props","ref","rootComponent","as","noNativeElements","components","root","role","undefined","size","sortable"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,4BAA4B;AAGlE;;;;;;;;CAQC,GACD,OAAO,MAAMC,oBAAoB,CAACC,OAAmBC,MAA4C;QACzED;IAAtB,MAAME,gBAAgBF,CAAAA,CAAAA,YAAAA,MAAMG,EAAE,cAARH,uBAAAA,YAAYA,MAAMI,gBAAgB,AAAD,IAAI,QAAQ,OAAO;QAWlEJ,aACYA,yBACRA;IAXZ,OAAO;QACLK,YAAY;YACVC,MAAMJ;QACR;QACAI,MAAMR,sBAAsBI,eAAe;YACzCD;YACAM,MAAML,kBAAkB,QAAQ,UAAUM,SAAS;YACnD,GAAGR,KAAK;QACV;QACAS,MAAMT,CAAAA,cAAAA,MAAMS,IAAI,cAAVT,yBAAAA,cAAc,QAAQ;QAC5BI,kBAAkBJ,CAAAA,0BAAAA,MAAMI,gBAAgB,cAAtBJ,qCAAAA,0BAA0B,KAAK;QACjDU,UAAUV,CAAAA,kBAAAA,MAAMU,QAAQ,cAAdV,6BAAAA,kBAAkB,KAAK;IACnC;AACF,EAAE"}
1
+ {"version":3,"sources":["useTable.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, slot } 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: slot.always(\n getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'table' : undefined,\n ...props,\n }),\n { elementType: rootComponent },\n ),\n size: props.size ?? 'medium',\n noNativeElements: props.noNativeElements ?? false,\n sortable: props.sortable ?? false,\n };\n};\n"],"names":["React","getNativeElementProps","slot","useTable_unstable","props","ref","rootComponent","as","noNativeElements","components","root","always","role","undefined","elementType","size","sortable"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,IAAI,QAAQ,4BAA4B;AAGxE;;;;;;;;CAQC,GACD,OAAO,MAAMC,oBAAoB,CAACC,OAAmBC,MAA4C;QACzED;IAAtB,MAAME,gBAAgBF,CAAAA,CAAAA,YAAAA,MAAMG,EAAE,cAARH,uBAAAA,YAAYA,MAAMI,gBAAgB,AAAD,IAAI,QAAQ,OAAO;QAclEJ,aACYA,yBACRA;IAdZ,OAAO;QACLK,YAAY;YACVC,MAAMJ;QACR;QACAI,MAAMR,KAAKS,MAAM,CACfV,sBAAsBK,eAAe;YACnCD;YACAO,MAAMN,kBAAkB,QAAQ,UAAUO,SAAS;YACnD,GAAGT,KAAK;QACV,IACA;YAAEU,aAAaR;QAAc;QAE/BS,MAAMX,CAAAA,cAAAA,MAAMW,IAAI,cAAVX,yBAAAA,cAAc,QAAQ;QAC5BI,kBAAkBJ,CAAAA,0BAAAA,MAAMI,gBAAgB,cAAtBJ,qCAAAA,0BAA0B,KAAK;QACjDY,UAAUZ,CAAAA,kBAAAA,MAAMY,QAAQ,cAAdZ,6BAAAA,kBAAkB,KAAK;IACnC;AACF,EAAE"}
@@ -1,8 +1,8 @@
1
1
  /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
2
- import { getSlotsNext } from '@fluentui/react-utilities';
2
+ import { assertSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Render the final JSX of TableBody
5
5
  */ export const renderTableBody_unstable = (state)=>{
6
- const { slots , slotProps } = getSlotsNext(state);
7
- return /*#__PURE__*/ createElement(slots.root, slotProps.root);
6
+ assertSlots(state);
7
+ return /*#__PURE__*/ createElement(state.root, null);
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderTableBody.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } 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 } = getSlotsNext<TableBodySlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"names":["createElement","getSlotsNext","renderTableBody_unstable","state","slots","slotProps","root"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,YAAY,QAAQ,4BAA4B;AAGzD;;CAEC,GACD,OAAO,MAAMC,2BAA2B,CAACC,QAA0B;IACjE,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGJ,aAA6BE;IAE1D,qBAAO,AAZT,cAYUC,MAAME,IAAI,EAAKD,UAAUC,IAAI;AACvC,EAAE"}
1
+ {"version":3,"sources":["renderTableBody.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } 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 assertSlots<TableBodySlots>(state);\n\n return <state.root />;\n};\n"],"names":["createElement","assertSlots","renderTableBody_unstable","state","root"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,2BAA2B,CAACC,QAA0B;IACjEF,YAA4BE;IAE5B,qBAAO,AAZT,cAYUA,MAAMC,IAAI;AACpB,EAAE"}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { getNativeElementProps } from '@fluentui/react-utilities';
2
+ import { getNativeElementProps, slot } from '@fluentui/react-utilities';
3
3
  import { useTableContext } from '../../contexts/tableContext';
4
4
  /**
5
5
  * Create the state required to render TableBody.
@@ -17,10 +17,12 @@ import { useTableContext } from '../../contexts/tableContext';
17
17
  components: {
18
18
  root: rootComponent
19
19
  },
20
- root: getNativeElementProps(rootComponent, {
20
+ root: slot.always(getNativeElementProps(rootComponent, {
21
21
  ref,
22
22
  role: rootComponent === 'div' ? 'rowgroup' : undefined,
23
23
  ...props
24
+ }), {
25
+ elementType: rootComponent
24
26
  }),
25
27
  noNativeElements
26
28
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["useTableBody.ts"],"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"],"names":["React","getNativeElementProps","useTableContext","useTableBody_unstable","props","ref","noNativeElements","rootComponent","as","components","root","role","undefined"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,4BAA4B;AAElE,SAASC,eAAe,QAAQ,8BAA8B;AAE9D;;;;;;;;CAQC,GACD,OAAO,MAAMC,wBAAwB,CAACC,OAAuBC,MAAgD;IAC3G,MAAM,EAAEC,iBAAgB,EAAE,GAAGJ;QACPE;IAAtB,MAAMG,gBAAgBH,CAAAA,CAAAA,YAAAA,MAAMI,EAAE,cAARJ,uBAAAA,YAAYE,gBAAgB,AAAD,IAAI,QAAQ,OAAO;IAEpE,OAAO;QACLG,YAAY;YACVC,MAAMH;QACR;QACAG,MAAMT,sBAAsBM,eAAe;YACzCF;YACAM,MAAMJ,kBAAkB,QAAQ,aAAaK,SAAS;YACtD,GAAGR,KAAK;QACV;QACAE;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["useTableBody.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, slot } 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: slot.always(\n getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'rowgroup' : undefined,\n ...props,\n }),\n { elementType: rootComponent },\n ),\n noNativeElements,\n };\n};\n"],"names":["React","getNativeElementProps","slot","useTableContext","useTableBody_unstable","props","ref","noNativeElements","rootComponent","as","components","root","always","role","undefined","elementType"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,IAAI,QAAQ,4BAA4B;AAExE,SAASC,eAAe,QAAQ,8BAA8B;AAE9D;;;;;;;;CAQC,GACD,OAAO,MAAMC,wBAAwB,CAACC,OAAuBC,MAAgD;IAC3G,MAAM,EAAEC,iBAAgB,EAAE,GAAGJ;QACPE;IAAtB,MAAMG,gBAAgBH,CAAAA,CAAAA,YAAAA,MAAMI,EAAE,cAARJ,uBAAAA,YAAYE,gBAAgB,AAAD,IAAI,QAAQ,OAAO;IAEpE,OAAO;QACLG,YAAY;YACVC,MAAMH;QACR;QACAG,MAAMT,KAAKU,MAAM,CACfX,sBAAsBO,eAAe;YACnCF;YACAO,MAAML,kBAAkB,QAAQ,aAAaM,SAAS;YACtD,GAAGT,KAAK;QACV,IACA;YAAEU,aAAaP;QAAc;QAE/BD;IACF;AACF,EAAE"}
@@ -1,8 +1,8 @@
1
1
  /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
2
- import { getSlotsNext } from '@fluentui/react-utilities';
2
+ import { assertSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Render the final JSX of TableCell
5
5
  */ export const renderTableCell_unstable = (state)=>{
6
- const { slots , slotProps } = getSlotsNext(state);
7
- return /*#__PURE__*/ createElement(slots.root, slotProps.root);
6
+ assertSlots(state);
7
+ return /*#__PURE__*/ createElement(state.root, null);
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderTableCell.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } 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 } = getSlotsNext<TableCellSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"names":["createElement","getSlotsNext","renderTableCell_unstable","state","slots","slotProps","root"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,YAAY,QAAQ,4BAA4B;AAGzD;;CAEC,GACD,OAAO,MAAMC,2BAA2B,CAACC,QAA0B;IACjE,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGJ,aAA6BE;IAE1D,qBAAO,AAZT,cAYUC,MAAME,IAAI,EAAKD,UAAUC,IAAI;AACvC,EAAE"}
1
+ {"version":3,"sources":["renderTableCell.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } 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 assertSlots<TableCellSlots>(state);\n\n return <state.root />;\n};\n"],"names":["createElement","assertSlots","renderTableCell_unstable","state","root"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,2BAA2B,CAACC,QAA0B;IACjEF,YAA4BE;IAE5B,qBAAO,AAZT,cAYUA,MAAMC,IAAI;AACpB,EAAE"}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { getNativeElementProps } from '@fluentui/react-utilities';
2
+ import { getNativeElementProps, slot } from '@fluentui/react-utilities';
3
3
  import { useTableContext } from '../../contexts/tableContext';
4
4
  /**
5
5
  * Create the state required to render TableCell.
@@ -17,10 +17,12 @@ import { useTableContext } from '../../contexts/tableContext';
17
17
  components: {
18
18
  root: rootComponent
19
19
  },
20
- root: getNativeElementProps(rootComponent, {
20
+ root: slot.always(getNativeElementProps(rootComponent, {
21
21
  ref,
22
22
  role: rootComponent === 'div' ? 'cell' : undefined,
23
23
  ...props
24
+ }), {
25
+ elementType: rootComponent
24
26
  }),
25
27
  noNativeElements,
26
28
  size
@@ -1 +1 @@
1
- {"version":3,"sources":["useTableCell.ts"],"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, size } = 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 size,\n };\n};\n"],"names":["React","getNativeElementProps","useTableContext","useTableCell_unstable","props","ref","noNativeElements","size","rootComponent","as","components","root","role","undefined"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,4BAA4B;AAElE,SAASC,eAAe,QAAQ,8BAA8B;AAE9D;;;;;;;;CAQC,GACD,OAAO,MAAMC,wBAAwB,CAACC,OAAuBC,MAAgD;IAC3G,MAAM,EAAEC,iBAAgB,EAAEC,KAAI,EAAE,GAAGL;QAEbE;IAAtB,MAAMI,gBAAgBJ,CAAAA,CAAAA,YAAAA,MAAMK,EAAE,cAARL,uBAAAA,YAAYE,gBAAgB,AAAD,IAAI,QAAQ,IAAI;IAEjE,OAAO;QACLI,YAAY;YACVC,MAAMH;QACR;QACAG,MAAMV,sBAAsBO,eAAe;YACzCH;YACAO,MAAMJ,kBAAkB,QAAQ,SAASK,SAAS;YAClD,GAAGT,KAAK;QACV;QACAE;QACAC;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["useTableCell.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, slot } 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, size } = useTableContext();\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'td';\n\n return {\n components: {\n root: rootComponent,\n },\n root: slot.always(\n getNativeElementProps(rootComponent, {\n ref,\n role: rootComponent === 'div' ? 'cell' : undefined,\n ...props,\n }),\n { elementType: rootComponent },\n ),\n noNativeElements,\n size,\n };\n};\n"],"names":["React","getNativeElementProps","slot","useTableContext","useTableCell_unstable","props","ref","noNativeElements","size","rootComponent","as","components","root","always","role","undefined","elementType"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,IAAI,QAAQ,4BAA4B;AAExE,SAASC,eAAe,QAAQ,8BAA8B;AAE9D;;;;;;;;CAQC,GACD,OAAO,MAAMC,wBAAwB,CAACC,OAAuBC,MAAgD;IAC3G,MAAM,EAAEC,iBAAgB,EAAEC,KAAI,EAAE,GAAGL;QAEbE;IAAtB,MAAMI,gBAAgBJ,CAAAA,CAAAA,YAAAA,MAAMK,EAAE,cAARL,uBAAAA,YAAYE,gBAAgB,AAAD,IAAI,QAAQ,IAAI;IAEjE,OAAO;QACLI,YAAY;YACVC,MAAMH;QACR;QACAG,MAAMV,KAAKW,MAAM,CACfZ,sBAAsBQ,eAAe;YACnCH;YACAQ,MAAML,kBAAkB,QAAQ,SAASM,SAAS;YAClD,GAAGV,KAAK;QACV,IACA;YAAEW,aAAaP;QAAc;QAE/BF;QACAC;IACF;AACF,EAAE"}
@@ -41,7 +41,7 @@ const useFlexLayoutStyles = /*#__PURE__*/__styles({
41
41
  sshi5w: "f1pha7fy"
42
42
  }
43
43
  }, {
44
- d: [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f10tiqix{min-width:0px;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".f1neuvcm{-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;}", ".fkjuxzh{-webkit-flex-basis:0px;-ms-flex-preferred-size:0px;flex-basis:0px;}", ".f5pgtk9{min-height:44px;}", ".fcep9tg{min-height:34px;}", ".f1pha7fy{min-height:24px;}"]
44
+ d: [".f22iagw{display:flex;}", ".f10tiqix{min-width:0px;}", ".f122n59{align-items:center;}", ".fqerorx{flex-grow:1;}", ".f1neuvcm{flex-shrink:1;}", ".fkjuxzh{flex-basis:0px;}", ".f5pgtk9{min-height:44px;}", ".fcep9tg{min-height:34px;}", ".f1pha7fy{min-height:24px;}"]
45
45
  });
46
46
  /**
47
47
  * Styles for the root slot
@@ -1,8 +1,8 @@
1
1
  /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
2
- import { getSlotsNext } from '@fluentui/react-utilities';
2
+ import { assertSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Render the final JSX of TableCellActions
5
5
  */ export const renderTableCellActions_unstable = (state)=>{
6
- const { slots , slotProps } = getSlotsNext(state);
7
- return /*#__PURE__*/ createElement(slots.root, slotProps.root);
6
+ assertSlots(state);
7
+ return /*#__PURE__*/ createElement(state.root, null);
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderTableCellActions.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport type { TableCellActionsState, TableCellActionsSlots } from './TableCellActions.types';\n\n/**\n * Render the final JSX of TableCellActions\n */\nexport const renderTableCellActions_unstable = (state: TableCellActionsState) => {\n const { slots, slotProps } = getSlotsNext<TableCellActionsSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"names":["createElement","getSlotsNext","renderTableCellActions_unstable","state","slots","slotProps","root"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,YAAY,QAAQ,4BAA4B;AAGzD;;CAEC,GACD,OAAO,MAAMC,kCAAkC,CAACC,QAAiC;IAC/E,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGJ,aAAoCE;IAEjE,qBAAO,AAZT,cAYUC,MAAME,IAAI,EAAKD,UAAUC,IAAI;AACvC,EAAE"}
1
+ {"version":3,"sources":["renderTableCellActions.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { TableCellActionsState, TableCellActionsSlots } from './TableCellActions.types';\n\n/**\n * Render the final JSX of TableCellActions\n */\nexport const renderTableCellActions_unstable = (state: TableCellActionsState) => {\n assertSlots<TableCellActionsSlots>(state);\n\n return <state.root />;\n};\n"],"names":["createElement","assertSlots","renderTableCellActions_unstable","state","root"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,kCAAkC,CAACC,QAAiC;IAC/EF,YAAmCE;IAEnC,qBAAO,AAZT,cAYUA,MAAMC,IAAI;AACpB,EAAE"}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { getNativeElementProps } from '@fluentui/react-utilities';
2
+ import { getNativeElementProps, slot } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Create the state required to render TableCellActions.
5
5
  *
@@ -14,9 +14,11 @@ import { getNativeElementProps } from '@fluentui/react-utilities';
14
14
  components: {
15
15
  root: 'div'
16
16
  },
17
- root: getNativeElementProps('div', {
17
+ root: slot.always(getNativeElementProps('div', {
18
18
  ref,
19
19
  ...props
20
+ }), {
21
+ elementType: 'div'
20
22
  }),
21
23
  visible: (_props_visible = props.visible) !== null && _props_visible !== void 0 ? _props_visible : false
22
24
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["useTableCellActions.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { TableCellActionsProps, TableCellActionsState } from './TableCellActions.types';\n\n/**\n * Create the state required to render TableCellActions.\n *\n * The returned state can be modified with hooks such as useTableCellActionsStyles_unstable,\n * before being passed to renderTableCellActions_unstable.\n *\n * @param props - props from this instance of TableCellActions\n * @param ref - reference to root HTMLElement of TableCellActions\n */\nexport const useTableCellActions_unstable = (\n props: TableCellActionsProps,\n ref: React.Ref<HTMLElement>,\n): TableCellActionsState => {\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n visible: props.visible ?? false,\n };\n};\n"],"names":["React","getNativeElementProps","useTableCellActions_unstable","props","ref","components","root","visible"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,4BAA4B;AAGlE;;;;;;;;CAQC,GACD,OAAO,MAAMC,+BAA+B,CAC1CC,OACAC,MAC0B;QASfD;IARX,OAAO;QACLE,YAAY;YACVC,MAAM;QACR;QACAA,MAAML,sBAAsB,OAAO;YACjCG;YACA,GAAGD,KAAK;QACV;QACAI,SAASJ,CAAAA,iBAAAA,MAAMI,OAAO,cAAbJ,4BAAAA,iBAAiB,KAAK;IACjC;AACF,EAAE"}
1
+ {"version":3,"sources":["useTableCellActions.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport type { TableCellActionsProps, TableCellActionsState } from './TableCellActions.types';\n\n/**\n * Create the state required to render TableCellActions.\n *\n * The returned state can be modified with hooks such as useTableCellActionsStyles_unstable,\n * before being passed to renderTableCellActions_unstable.\n *\n * @param props - props from this instance of TableCellActions\n * @param ref - reference to root HTMLElement of TableCellActions\n */\nexport const useTableCellActions_unstable = (\n props: TableCellActionsProps,\n ref: React.Ref<HTMLElement>,\n): TableCellActionsState => {\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getNativeElementProps('div', {\n ref,\n ...props,\n }),\n { elementType: 'div' },\n ),\n visible: props.visible ?? false,\n };\n};\n"],"names":["React","getNativeElementProps","slot","useTableCellActions_unstable","props","ref","components","root","always","elementType","visible"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,IAAI,QAAQ,4BAA4B;AAGxE;;;;;;;;CAQC,GACD,OAAO,MAAMC,+BAA+B,CAC1CC,OACAC,MAC0B;QAYfD;IAXX,OAAO;QACLE,YAAY;YACVC,MAAM;QACR;QACAA,MAAML,KAAKM,MAAM,CACfP,sBAAsB,OAAO;YAC3BI;YACA,GAAGD,KAAK;QACV,IACA;YAAEK,aAAa;QAAM;QAEvBC,SAASN,CAAAA,iBAAAA,MAAMM,OAAO,cAAbN,4BAAAA,iBAAiB,KAAK;IACjC;AACF,EAAE"}
@@ -19,7 +19,7 @@ const useStyles = /*#__PURE__*/__styles({
19
19
  abs64n: "f5p0z4x"
20
20
  }
21
21
  }, {
22
- d: [".f1u2r49w{background-color:inherit;}", ".f1euv43f{position:absolute;}", ".f10k790i{right:0px;}", ".f1xynx9j{left:0px;}", ".f1i1t8d1{top:50%;}", ".f188r07x{-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);}", ".fk73vx1{opacity:0;}", ".fcgxt0o{margin-left:auto;}", ".f1ujusj6{margin-right:auto;}", ".f5p0z4x{opacity:1;}"]
22
+ d: [".f1u2r49w{background-color:inherit;}", ".f1euv43f{position:absolute;}", ".f10k790i{right:0px;}", ".f1xynx9j{left:0px;}", ".f1i1t8d1{top:50%;}", ".f188r07x{transform:translateY(-50%);}", ".fk73vx1{opacity:0;}", ".fcgxt0o{margin-left:auto;}", ".f1ujusj6{margin-right:auto;}", ".f5p0z4x{opacity:1;}"]
23
23
  });
24
24
  /**
25
25
  * Apply styling to the TableCellActions slots based on the state
@@ -1,11 +1,11 @@
1
1
  /** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
2
- import { getSlotsNext } from '@fluentui/react-utilities';
2
+ import { assertSlots } from '@fluentui/react-utilities';
3
3
  import { AvatarContextProvider } from '@fluentui/react-avatar';
4
4
  /**
5
5
  * Render the final JSX of TableCellLayout
6
6
  */ export const renderTableCellLayout_unstable = (state, contextValues)=>{
7
- const { slots , slotProps } = getSlotsNext(state);
8
- return /*#__PURE__*/ createElement(slots.root, slotProps.root, slots.media && /*#__PURE__*/ createElement(AvatarContextProvider, {
7
+ assertSlots(state);
8
+ return /*#__PURE__*/ createElement(state.root, null, state.media && /*#__PURE__*/ createElement(AvatarContextProvider, {
9
9
  value: contextValues.avatar
10
- }, /*#__PURE__*/ createElement(slots.media, slotProps.media)), slots.content && /*#__PURE__*/ createElement(slots.content, slotProps.content, slots.main && /*#__PURE__*/ createElement(slots.main, slotProps.main, slotProps.root.children), slots.description && /*#__PURE__*/ createElement(slots.description, slotProps.description)));
10
+ }, /*#__PURE__*/ createElement(state.media, null)), state.content && /*#__PURE__*/ createElement(state.content, null, state.main && /*#__PURE__*/ createElement(state.main, null, state.root.children), state.description && /*#__PURE__*/ createElement(state.description, null)));
11
11
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderTableCellLayout.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport { AvatarContextProvider } from '@fluentui/react-avatar';\nimport type { TableCellLayoutState, TableCellLayoutSlots, TableCellLayoutContextValues } from './TableCellLayout.types';\n\n/**\n * Render the final JSX of TableCellLayout\n */\nexport const renderTableCellLayout_unstable = (\n state: TableCellLayoutState,\n contextValues: TableCellLayoutContextValues,\n) => {\n const { slots, slotProps } = getSlotsNext<TableCellLayoutSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slots.media && (\n <AvatarContextProvider value={contextValues.avatar}>\n <slots.media {...slotProps.media} />\n </AvatarContextProvider>\n )}\n {slots.content && (\n <slots.content {...slotProps.content}>\n {slots.main && <slots.main {...slotProps.main}>{slotProps.root.children}</slots.main>}\n {slots.description && <slots.description {...slotProps.description} />}\n </slots.content>\n )}\n </slots.root>\n );\n};\n"],"names":["createElement","getSlotsNext","AvatarContextProvider","renderTableCellLayout_unstable","state","contextValues","slots","slotProps","root","media","value","avatar","content","main","children","description"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,YAAY,QAAQ,4BAA4B;AACzD,SAASC,qBAAqB,QAAQ,yBAAyB;AAG/D;;CAEC,GACD,OAAO,MAAMC,iCAAiC,CAC5CC,OACAC,gBACG;IACH,MAAM,EAAEC,MAAK,EAAEC,UAAS,EAAE,GAAGN,aAAmCG;IAEhE,qBACE,AAjBJ,cAiBKE,MAAME,IAAI,EAAKD,UAAUC,IAAI,EAC3BF,MAAMG,KAAK,kBACV,AAnBR,cAmBSP;QAAsBQ,OAAOL,cAAcM,MAAM;qBAChD,AApBV,cAoBWL,MAAMG,KAAK,EAAKF,UAAUE,KAAK,IAGnCH,MAAMM,OAAO,kBACZ,AAxBR,cAwBSN,MAAMM,OAAO,EAAKL,UAAUK,OAAO,EACjCN,MAAMO,IAAI,kBAAI,AAzBzB,cAyB0BP,MAAMO,IAAI,EAAKN,UAAUM,IAAI,EAAGN,UAAUC,IAAI,CAACM,QAAQ,GACtER,MAAMS,WAAW,kBAAI,AA1BhC,cA0BiCT,MAAMS,WAAW,EAAKR,UAAUQ,WAAW;AAK5E,EAAE"}
1
+ {"version":3,"sources":["renderTableCellLayout.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { AvatarContextProvider } from '@fluentui/react-avatar';\nimport type { TableCellLayoutState, TableCellLayoutSlots, TableCellLayoutContextValues } from './TableCellLayout.types';\n\n/**\n * Render the final JSX of TableCellLayout\n */\nexport const renderTableCellLayout_unstable = (\n state: TableCellLayoutState,\n contextValues: TableCellLayoutContextValues,\n) => {\n assertSlots<TableCellLayoutSlots>(state);\n\n return (\n <state.root>\n {state.media && (\n <AvatarContextProvider value={contextValues.avatar}>\n <state.media />\n </AvatarContextProvider>\n )}\n\n {state.content && (\n <state.content>\n {state.main && <state.main>{state.root.children}</state.main>}\n {state.description && <state.description />}\n </state.content>\n )}\n </state.root>\n );\n};\n"],"names":["createElement","assertSlots","AvatarContextProvider","renderTableCellLayout_unstable","state","contextValues","root","media","value","avatar","content","main","children","description"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAC5D,SAASC,WAAW,QAAQ,4BAA4B;AACxD,SAASC,qBAAqB,QAAQ,yBAAyB;AAG/D;;CAEC,GACD,OAAO,MAAMC,iCAAiC,CAC5CC,OACAC,gBACG;IACHJ,YAAkCG;IAElC,qBACE,AAjBJ,cAiBKA,MAAME,IAAI,QACRF,MAAMG,KAAK,kBACV,AAnBR,cAmBSL;QAAsBM,OAAOH,cAAcI,MAAM;qBAChD,AApBV,cAoBWL,MAAMG,KAAK,UAIfH,MAAMM,OAAO,kBACZ,AAzBR,cAyBSN,MAAMM,OAAO,QACXN,MAAMO,IAAI,kBAAI,AA1BzB,cA0B0BP,MAAMO,IAAI,QAAEP,MAAME,IAAI,CAACM,QAAQ,GAC9CR,MAAMS,WAAW,kBAAI,AA3BhC,cA2BiCT,MAAMS,WAAW;AAKlD,EAAE"}