@fluentui/react-table 9.10.0 → 9.10.2
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.
- package/CHANGELOG.json +132 -6
- package/CHANGELOG.md +41 -7
- package/lib/components/Table/useTable.js +6 -3
- package/lib/components/Table/useTable.js.map +1 -1
- package/lib/components/TableBody/useTableBody.js +6 -3
- package/lib/components/TableBody/useTableBody.js.map +1 -1
- package/lib/components/TableCell/useTableCell.js +6 -3
- package/lib/components/TableCell/useTableCell.js.map +1 -1
- package/lib/components/TableCellActions/useTableCellActions.js +6 -3
- package/lib/components/TableCellActions/useTableCellActions.js.map +1 -1
- package/lib/components/TableCellLayout/useTableCellLayout.js +6 -3
- package/lib/components/TableCellLayout/useTableCellLayout.js.map +1 -1
- package/lib/components/TableHeader/useTableHeader.js +6 -3
- package/lib/components/TableHeader/useTableHeader.js.map +1 -1
- package/lib/components/TableHeaderCell/useTableHeaderCell.js +5 -2
- package/lib/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
- package/lib/components/TableResizeHandle/useTableResizeHandle.js +6 -3
- package/lib/components/TableResizeHandle/useTableResizeHandle.js.map +1 -1
- package/lib/components/TableRow/useTableRow.js +5 -2
- package/lib/components/TableRow/useTableRow.js.map +1 -1
- package/lib/hooks/useMeasureElement.js +2 -3
- package/lib/hooks/useMeasureElement.js.map +1 -1
- package/lib-commonjs/components/Table/useTable.js +5 -2
- package/lib-commonjs/components/Table/useTable.js.map +1 -1
- package/lib-commonjs/components/TableBody/useTableBody.js +5 -2
- package/lib-commonjs/components/TableBody/useTableBody.js.map +1 -1
- package/lib-commonjs/components/TableCell/useTableCell.js +5 -2
- package/lib-commonjs/components/TableCell/useTableCell.js.map +1 -1
- package/lib-commonjs/components/TableCellActions/useTableCellActions.js +5 -2
- package/lib-commonjs/components/TableCellActions/useTableCellActions.js.map +1 -1
- package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js +5 -2
- package/lib-commonjs/components/TableCellLayout/useTableCellLayout.js.map +1 -1
- package/lib-commonjs/components/TableHeader/useTableHeader.js +5 -2
- package/lib-commonjs/components/TableHeader/useTableHeader.js.map +1 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js +4 -1
- package/lib-commonjs/components/TableHeaderCell/useTableHeaderCell.js.map +1 -1
- package/lib-commonjs/components/TableResizeHandle/useTableResizeHandle.js +5 -2
- package/lib-commonjs/components/TableResizeHandle/useTableResizeHandle.js.map +1 -1
- package/lib-commonjs/components/TableRow/useTableRow.js +4 -1
- package/lib-commonjs/components/TableRow/useTableRow.js.map +1 -1
- package/lib-commonjs/hooks/useMeasureElement.js +2 -3
- package/lib-commonjs/hooks/useMeasureElement.js.map +1 -1
- package/package.json +9 -9
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,133 @@
|
|
|
2
2
|
"name": "@fluentui/react-table",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Thu, 05 Oct 2023 15:17:59 GMT",
|
|
6
|
+
"tag": "@fluentui/react-table_v9.10.2",
|
|
7
|
+
"version": "9.10.2",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "bernardo.sunderhus@gmail.com",
|
|
12
|
+
"package": "@fluentui/react-table",
|
|
13
|
+
"commit": "86dd76990e3da5af1f2b6b04a3aec46141d5a653",
|
|
14
|
+
"comment": "chore: migrate from getNativeElementProps to getIntrinsicElementProps"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "lingfangao@hotmail.com",
|
|
18
|
+
"package": "@fluentui/react-table",
|
|
19
|
+
"commit": "1c0919a13a533014b70d6da64500f6bfe2ff14b3",
|
|
20
|
+
"comment": "fix(useTableColumnSizing): Removes the measuring div and measures parent"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@fluentui/react-table",
|
|
25
|
+
"comment": "Bump @fluentui/react-aria to v9.3.40",
|
|
26
|
+
"commit": "690590449dc3d65cd40b2b06a990fd920180919d"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@fluentui/react-table",
|
|
31
|
+
"comment": "Bump @fluentui/react-avatar to v9.5.37",
|
|
32
|
+
"commit": "690590449dc3d65cd40b2b06a990fd920180919d"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@fluentui/react-table",
|
|
37
|
+
"comment": "Bump @fluentui/react-checkbox to v9.1.47",
|
|
38
|
+
"commit": "690590449dc3d65cd40b2b06a990fd920180919d"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"author": "beachball",
|
|
42
|
+
"package": "@fluentui/react-table",
|
|
43
|
+
"comment": "Bump @fluentui/react-context-selector to v9.1.38",
|
|
44
|
+
"commit": "690590449dc3d65cd40b2b06a990fd920180919d"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"author": "beachball",
|
|
48
|
+
"package": "@fluentui/react-table",
|
|
49
|
+
"comment": "Bump @fluentui/react-radio to v9.1.47",
|
|
50
|
+
"commit": "690590449dc3d65cd40b2b06a990fd920180919d"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"author": "beachball",
|
|
54
|
+
"package": "@fluentui/react-table",
|
|
55
|
+
"comment": "Bump @fluentui/react-tabster to v9.13.4",
|
|
56
|
+
"commit": "690590449dc3d65cd40b2b06a990fd920180919d"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"author": "beachball",
|
|
60
|
+
"package": "@fluentui/react-table",
|
|
61
|
+
"comment": "Bump @fluentui/react-utilities to v9.14.1",
|
|
62
|
+
"commit": "690590449dc3d65cd40b2b06a990fd920180919d"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"author": "beachball",
|
|
66
|
+
"package": "@fluentui/react-table",
|
|
67
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.14",
|
|
68
|
+
"commit": "690590449dc3d65cd40b2b06a990fd920180919d"
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"date": "Wed, 04 Oct 2023 08:45:47 GMT",
|
|
75
|
+
"tag": "@fluentui/react-table_v9.10.1",
|
|
76
|
+
"version": "9.10.1",
|
|
77
|
+
"comments": {
|
|
78
|
+
"patch": [
|
|
79
|
+
{
|
|
80
|
+
"author": "beachball",
|
|
81
|
+
"package": "@fluentui/react-table",
|
|
82
|
+
"comment": "Bump @fluentui/react-aria to v9.3.39",
|
|
83
|
+
"commit": "67b6cc6534e684ed32704dc6c0faee632bb840dc"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"author": "beachball",
|
|
87
|
+
"package": "@fluentui/react-table",
|
|
88
|
+
"comment": "Bump @fluentui/react-avatar to v9.5.36",
|
|
89
|
+
"commit": "67b6cc6534e684ed32704dc6c0faee632bb840dc"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"author": "beachball",
|
|
93
|
+
"package": "@fluentui/react-table",
|
|
94
|
+
"comment": "Bump @fluentui/react-checkbox to v9.1.46",
|
|
95
|
+
"commit": "67b6cc6534e684ed32704dc6c0faee632bb840dc"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"author": "beachball",
|
|
99
|
+
"package": "@fluentui/react-table",
|
|
100
|
+
"comment": "Bump @fluentui/react-context-selector to v9.1.37",
|
|
101
|
+
"commit": "67b6cc6534e684ed32704dc6c0faee632bb840dc"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"author": "beachball",
|
|
105
|
+
"package": "@fluentui/react-table",
|
|
106
|
+
"comment": "Bump @fluentui/react-radio to v9.1.46",
|
|
107
|
+
"commit": "67b6cc6534e684ed32704dc6c0faee632bb840dc"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"author": "beachball",
|
|
111
|
+
"package": "@fluentui/react-table",
|
|
112
|
+
"comment": "Bump @fluentui/react-tabster to v9.13.3",
|
|
113
|
+
"commit": "67b6cc6534e684ed32704dc6c0faee632bb840dc"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"author": "beachball",
|
|
117
|
+
"package": "@fluentui/react-table",
|
|
118
|
+
"comment": "Bump @fluentui/react-utilities to v9.14.0",
|
|
119
|
+
"commit": "67b6cc6534e684ed32704dc6c0faee632bb840dc"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"author": "beachball",
|
|
123
|
+
"package": "@fluentui/react-table",
|
|
124
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.13",
|
|
125
|
+
"commit": "67b6cc6534e684ed32704dc6c0faee632bb840dc"
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"date": "Mon, 02 Oct 2023 08:56:05 GMT",
|
|
6
132
|
"tag": "@fluentui/react-table_v9.10.0",
|
|
7
133
|
"version": "9.10.0",
|
|
8
134
|
"comments": {
|
|
@@ -17,31 +143,31 @@
|
|
|
17
143
|
"author": "beachball",
|
|
18
144
|
"package": "@fluentui/react-table",
|
|
19
145
|
"comment": "Bump @fluentui/react-avatar to v9.5.35",
|
|
20
|
-
"commit": "
|
|
146
|
+
"commit": "da9a08817e5de95639e2dd7aa6d6709d47faa7f4"
|
|
21
147
|
},
|
|
22
148
|
{
|
|
23
149
|
"author": "beachball",
|
|
24
150
|
"package": "@fluentui/react-table",
|
|
25
151
|
"comment": "Bump @fluentui/react-checkbox to v9.1.45",
|
|
26
|
-
"commit": "
|
|
152
|
+
"commit": "da9a08817e5de95639e2dd7aa6d6709d47faa7f4"
|
|
27
153
|
},
|
|
28
154
|
{
|
|
29
155
|
"author": "beachball",
|
|
30
156
|
"package": "@fluentui/react-table",
|
|
31
157
|
"comment": "Bump @fluentui/react-radio to v9.1.45",
|
|
32
|
-
"commit": "
|
|
158
|
+
"commit": "da9a08817e5de95639e2dd7aa6d6709d47faa7f4"
|
|
33
159
|
},
|
|
34
160
|
{
|
|
35
161
|
"author": "beachball",
|
|
36
162
|
"package": "@fluentui/react-table",
|
|
37
163
|
"comment": "Bump @fluentui/react-shared-contexts to v9.9.2",
|
|
38
|
-
"commit": "
|
|
164
|
+
"commit": "da9a08817e5de95639e2dd7aa6d6709d47faa7f4"
|
|
39
165
|
},
|
|
40
166
|
{
|
|
41
167
|
"author": "beachball",
|
|
42
168
|
"package": "@fluentui/react-table",
|
|
43
169
|
"comment": "Bump @fluentui/react-tabster to v9.13.2",
|
|
44
|
-
"commit": "
|
|
170
|
+
"commit": "da9a08817e5de95639e2dd7aa6d6709d47faa7f4"
|
|
45
171
|
}
|
|
46
172
|
]
|
|
47
173
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,22 +1,56 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-table
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 05 Oct 2023 15:17:59 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.10.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.10.2)
|
|
8
|
+
|
|
9
|
+
Thu, 05 Oct 2023 15:17:59 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-table_v9.10.1..@fluentui/react-table_v9.10.2)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- chore: migrate from getNativeElementProps to getIntrinsicElementProps ([PR #29387](https://github.com/microsoft/fluentui/pull/29387) by bernardo.sunderhus@gmail.com)
|
|
15
|
+
- fix(useTableColumnSizing): Removes the measuring div and measures parent ([PR #29363](https://github.com/microsoft/fluentui/pull/29363) by lingfangao@hotmail.com)
|
|
16
|
+
- Bump @fluentui/react-aria to v9.3.40 ([PR #29412](https://github.com/microsoft/fluentui/pull/29412) by beachball)
|
|
17
|
+
- Bump @fluentui/react-avatar to v9.5.37 ([PR #29412](https://github.com/microsoft/fluentui/pull/29412) by beachball)
|
|
18
|
+
- Bump @fluentui/react-checkbox to v9.1.47 ([PR #29412](https://github.com/microsoft/fluentui/pull/29412) by beachball)
|
|
19
|
+
- Bump @fluentui/react-context-selector to v9.1.38 ([PR #29412](https://github.com/microsoft/fluentui/pull/29412) by beachball)
|
|
20
|
+
- Bump @fluentui/react-radio to v9.1.47 ([PR #29412](https://github.com/microsoft/fluentui/pull/29412) by beachball)
|
|
21
|
+
- Bump @fluentui/react-tabster to v9.13.4 ([PR #29412](https://github.com/microsoft/fluentui/pull/29412) by beachball)
|
|
22
|
+
- Bump @fluentui/react-utilities to v9.14.1 ([PR #29412](https://github.com/microsoft/fluentui/pull/29412) by beachball)
|
|
23
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.14 ([PR #29412](https://github.com/microsoft/fluentui/pull/29412) by beachball)
|
|
24
|
+
|
|
25
|
+
## [9.10.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.10.1)
|
|
26
|
+
|
|
27
|
+
Wed, 04 Oct 2023 08:45:47 GMT
|
|
28
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-table_v9.10.0..@fluentui/react-table_v9.10.1)
|
|
29
|
+
|
|
30
|
+
### Patches
|
|
31
|
+
|
|
32
|
+
- Bump @fluentui/react-aria to v9.3.39 ([commit](https://github.com/microsoft/fluentui/commit/67b6cc6534e684ed32704dc6c0faee632bb840dc) by beachball)
|
|
33
|
+
- Bump @fluentui/react-avatar to v9.5.36 ([commit](https://github.com/microsoft/fluentui/commit/67b6cc6534e684ed32704dc6c0faee632bb840dc) by beachball)
|
|
34
|
+
- Bump @fluentui/react-checkbox to v9.1.46 ([commit](https://github.com/microsoft/fluentui/commit/67b6cc6534e684ed32704dc6c0faee632bb840dc) by beachball)
|
|
35
|
+
- Bump @fluentui/react-context-selector to v9.1.37 ([commit](https://github.com/microsoft/fluentui/commit/67b6cc6534e684ed32704dc6c0faee632bb840dc) by beachball)
|
|
36
|
+
- Bump @fluentui/react-radio to v9.1.46 ([commit](https://github.com/microsoft/fluentui/commit/67b6cc6534e684ed32704dc6c0faee632bb840dc) by beachball)
|
|
37
|
+
- Bump @fluentui/react-tabster to v9.13.3 ([commit](https://github.com/microsoft/fluentui/commit/67b6cc6534e684ed32704dc6c0faee632bb840dc) by beachball)
|
|
38
|
+
- Bump @fluentui/react-utilities to v9.14.0 ([commit](https://github.com/microsoft/fluentui/commit/67b6cc6534e684ed32704dc6c0faee632bb840dc) by beachball)
|
|
39
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.13 ([commit](https://github.com/microsoft/fluentui/commit/67b6cc6534e684ed32704dc6c0faee632bb840dc) by beachball)
|
|
40
|
+
|
|
7
41
|
## [9.10.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.10.0)
|
|
8
42
|
|
|
9
|
-
Mon, 02 Oct 2023 08:
|
|
43
|
+
Mon, 02 Oct 2023 08:56:05 GMT
|
|
10
44
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-table_v9.9.1..@fluentui/react-table_v9.10.0)
|
|
11
45
|
|
|
12
46
|
### Minor changes
|
|
13
47
|
|
|
14
48
|
- feat; Add optional parameter to Table column renderHeaderCell callback ([PR #29285](https://github.com/microsoft/fluentui/pull/29285) by msnyder@microsoft.com)
|
|
15
|
-
- Bump @fluentui/react-avatar to v9.5.35 ([PR #
|
|
16
|
-
- Bump @fluentui/react-checkbox to v9.1.45 ([PR #
|
|
17
|
-
- Bump @fluentui/react-radio to v9.1.45 ([PR #
|
|
18
|
-
- Bump @fluentui/react-shared-contexts to v9.9.2 ([PR #
|
|
19
|
-
- Bump @fluentui/react-tabster to v9.13.2 ([PR #
|
|
49
|
+
- Bump @fluentui/react-avatar to v9.5.35 ([PR #29301](https://github.com/microsoft/fluentui/pull/29301) by beachball)
|
|
50
|
+
- Bump @fluentui/react-checkbox to v9.1.45 ([PR #29301](https://github.com/microsoft/fluentui/pull/29301) by beachball)
|
|
51
|
+
- Bump @fluentui/react-radio to v9.1.45 ([PR #29301](https://github.com/microsoft/fluentui/pull/29301) by beachball)
|
|
52
|
+
- Bump @fluentui/react-shared-contexts to v9.9.2 ([PR #29301](https://github.com/microsoft/fluentui/pull/29301) by beachball)
|
|
53
|
+
- Bump @fluentui/react-tabster to v9.13.2 ([PR #29301](https://github.com/microsoft/fluentui/pull/29301) by beachball)
|
|
20
54
|
|
|
21
55
|
## [9.9.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-table_v9.9.1)
|
|
22
56
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
|
|
3
3
|
/**
|
|
4
4
|
* Create the state required to render Table.
|
|
5
5
|
*
|
|
@@ -16,8 +16,11 @@ import { getNativeElementProps, slot } from '@fluentui/react-utilities';
|
|
|
16
16
|
components: {
|
|
17
17
|
root: rootComponent
|
|
18
18
|
},
|
|
19
|
-
root: slot.always(
|
|
20
|
-
|
|
19
|
+
root: slot.always(getIntrinsicElementProps(rootComponent, {
|
|
20
|
+
// FIXME:
|
|
21
|
+
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
|
|
22
|
+
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
|
|
23
|
+
ref: ref,
|
|
21
24
|
role: rootComponent === 'div' ? 'table' : undefined,
|
|
22
25
|
...props
|
|
23
26
|
}), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTable.ts"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["useTable.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, 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 getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\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","getIntrinsicElementProps","slot","useTable_unstable","props","ref","rootComponent","as","noNativeElements","components","root","always","role","undefined","elementType","size","sortable"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAG3E;;;;;;;;CAQC,GACD,OAAO,MAAMC,oBAAoB,CAACC,OAAmBC;QAC7BD;IAAtB,MAAME,gBAAgBF,CAAAA,CAAAA,YAAAA,MAAMG,EAAE,cAARH,uBAAAA,YAAYA,MAAMI,gBAAgB,AAAD,IAAI,QAAQ;QAiB3DJ,aACYA,yBACRA;IAjBZ,OAAO;QACLK,YAAY;YACVC,MAAMJ;QACR;QACAI,MAAMR,KAAKS,MAAM,CACfV,yBAAyBK,eAAe;YACtC,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FD,KAAKA;YACLO,MAAMN,kBAAkB,QAAQ,UAAUO;YAC1C,GAAGT,KAAK;QACV,IACA;YAAEU,aAAaR;QAAc;QAE/BS,MAAMX,CAAAA,cAAAA,MAAMW,IAAI,cAAVX,yBAAAA,cAAc;QACpBI,kBAAkBJ,CAAAA,0BAAAA,MAAMI,gBAAgB,cAAtBJ,qCAAAA,0BAA0B;QAC5CY,UAAUZ,CAAAA,kBAAAA,MAAMY,QAAQ,cAAdZ,6BAAAA,kBAAkB;IAC9B;AACF,EAAE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
|
|
3
3
|
import { useTableContext } from '../../contexts/tableContext';
|
|
4
4
|
/**
|
|
5
5
|
* Create the state required to render TableBody.
|
|
@@ -17,8 +17,11 @@ import { useTableContext } from '../../contexts/tableContext';
|
|
|
17
17
|
components: {
|
|
18
18
|
root: rootComponent
|
|
19
19
|
},
|
|
20
|
-
root: slot.always(
|
|
21
|
-
|
|
20
|
+
root: slot.always(getIntrinsicElementProps(rootComponent, {
|
|
21
|
+
// FIXME:
|
|
22
|
+
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
|
|
23
|
+
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
|
|
24
|
+
ref: ref,
|
|
22
25
|
role: rootComponent === 'div' ? 'rowgroup' : undefined,
|
|
23
26
|
...props
|
|
24
27
|
}), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTableBody.ts"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["useTableBody.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, 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 getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n role: rootComponent === 'div' ? 'rowgroup' : undefined,\n ...props,\n }),\n { elementType: rootComponent },\n ),\n noNativeElements,\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useTableContext","useTableBody_unstable","props","ref","noNativeElements","rootComponent","as","components","root","always","role","undefined","elementType"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAE3E,SAASC,eAAe,QAAQ,8BAA8B;AAE9D;;;;;;;;CAQC,GACD,OAAO,MAAMC,wBAAwB,CAACC,OAAuBC;IAC3D,MAAM,EAAEC,gBAAgB,EAAE,GAAGJ;QACPE;IAAtB,MAAMG,gBAAgBH,CAAAA,CAAAA,YAAAA,MAAMI,EAAE,cAARJ,uBAAAA,YAAYE,gBAAe,IAAI,QAAQ;IAE7D,OAAO;QACLG,YAAY;YACVC,MAAMH;QACR;QACAG,MAAMT,KAAKU,MAAM,CACfX,yBAAyBO,eAAe;YACtC,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FF,KAAKA;YACLO,MAAML,kBAAkB,QAAQ,aAAaM;YAC7C,GAAGT,KAAK;QACV,IACA;YAAEU,aAAaP;QAAc;QAE/BD;IACF;AACF,EAAE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
|
|
3
3
|
import { useTableContext } from '../../contexts/tableContext';
|
|
4
4
|
/**
|
|
5
5
|
* Create the state required to render TableCell.
|
|
@@ -17,8 +17,11 @@ import { useTableContext } from '../../contexts/tableContext';
|
|
|
17
17
|
components: {
|
|
18
18
|
root: rootComponent
|
|
19
19
|
},
|
|
20
|
-
root: slot.always(
|
|
21
|
-
|
|
20
|
+
root: slot.always(getIntrinsicElementProps(rootComponent, {
|
|
21
|
+
// FIXME:
|
|
22
|
+
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
|
|
23
|
+
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
|
|
24
|
+
ref: ref,
|
|
22
25
|
role: rootComponent === 'div' ? 'cell' : undefined,
|
|
23
26
|
...props
|
|
24
27
|
}), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTableCell.ts"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["useTableCell.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, 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 getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n role: rootComponent === 'div' ? 'cell' : undefined,\n ...props,\n }),\n { elementType: rootComponent },\n ),\n noNativeElements,\n size,\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useTableContext","useTableCell_unstable","props","ref","noNativeElements","size","rootComponent","as","components","root","always","role","undefined","elementType"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAE3E,SAASC,eAAe,QAAQ,8BAA8B;AAE9D;;;;;;;;CAQC,GACD,OAAO,MAAMC,wBAAwB,CAACC,OAAuBC;IAC3D,MAAM,EAAEC,gBAAgB,EAAEC,IAAI,EAAE,GAAGL;QAEbE;IAAtB,MAAMI,gBAAgBJ,CAAAA,CAAAA,YAAAA,MAAMK,EAAE,cAARL,uBAAAA,YAAYE,gBAAe,IAAI,QAAQ;IAE7D,OAAO;QACLI,YAAY;YACVC,MAAMH;QACR;QACAG,MAAMV,KAAKW,MAAM,CACfZ,yBAAyBQ,eAAe;YACtC,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FH,KAAKA;YACLQ,MAAML,kBAAkB,QAAQ,SAASM;YACzC,GAAGV,KAAK;QACV,IACA;YAAEW,aAAaP;QAAc;QAE/BF;QACAC;IACF;AACF,EAAE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
|
|
3
3
|
/**
|
|
4
4
|
* Create the state required to render TableCellActions.
|
|
5
5
|
*
|
|
@@ -14,8 +14,11 @@ import { getNativeElementProps, slot } from '@fluentui/react-utilities';
|
|
|
14
14
|
components: {
|
|
15
15
|
root: 'div'
|
|
16
16
|
},
|
|
17
|
-
root: slot.always(
|
|
18
|
-
|
|
17
|
+
root: slot.always(getIntrinsicElementProps('div', {
|
|
18
|
+
// FIXME:
|
|
19
|
+
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
|
|
20
|
+
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
|
|
21
|
+
ref: ref,
|
|
19
22
|
...props
|
|
20
23
|
}), {
|
|
21
24
|
elementType: 'div'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTableCellActions.ts"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["useTableCellActions.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, 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 getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n ...props,\n }),\n { elementType: 'div' },\n ),\n visible: props.visible ?? false,\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useTableCellActions_unstable","props","ref","components","root","always","elementType","visible"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAG3E;;;;;;;;CAQC,GACD,OAAO,MAAMC,+BAA+B,CAC1CC,OACAC;QAgBWD;IAdX,OAAO;QACLE,YAAY;YACVC,MAAM;QACR;QACAA,MAAML,KAAKM,MAAM,CACfP,yBAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FI,KAAKA;YACL,GAAGD,KAAK;QACV,IACA;YAAEK,aAAa;QAAM;QAEvBC,SAASN,CAAAA,iBAAAA,MAAMM,OAAO,cAAbN,4BAAAA,iBAAiB;IAC5B;AACF,EAAE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
|
|
3
3
|
import { useTableContext } from '../../contexts/tableContext';
|
|
4
4
|
const tableAvatarSizeMap = {
|
|
5
5
|
medium: 32,
|
|
@@ -24,8 +24,11 @@ const tableAvatarSizeMap = {
|
|
|
24
24
|
content: 'div',
|
|
25
25
|
media: 'span'
|
|
26
26
|
},
|
|
27
|
-
root: slot.always(
|
|
28
|
-
|
|
27
|
+
root: slot.always(getIntrinsicElementProps('div', {
|
|
28
|
+
// FIXME:
|
|
29
|
+
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
|
|
30
|
+
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
|
|
31
|
+
ref: ref,
|
|
29
32
|
...props
|
|
30
33
|
}), {
|
|
31
34
|
elementType: 'div'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTableCellLayout.ts"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["useTableCellLayout.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { TableCellLayoutProps, TableCellLayoutState } from './TableCellLayout.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\nconst tableAvatarSizeMap = {\n medium: 32,\n small: 24,\n 'extra-small': 20,\n} as const;\n\n/**\n * Create the state required to render TableCellLayout.\n *\n * The returned state can be modified with hooks such as useTableCellLayoutStyles_unstable,\n * before being passed to renderTableCellLayout_unstable.\n *\n * @param props - props from this instance of TableCellLayout\n * @param ref - reference to root HTMLElement of TableCellLayout\n */\nexport const useTableCellLayout_unstable = (\n props: TableCellLayoutProps,\n ref: React.Ref<HTMLElement>,\n): TableCellLayoutState => {\n const { size } = useTableContext();\n\n return {\n components: {\n root: 'div',\n main: 'span',\n description: 'span',\n content: 'div',\n media: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n ...props,\n }),\n { elementType: 'div' },\n ),\n appearance: props.appearance,\n truncate: props.truncate,\n main: slot.optional(props.main, { renderByDefault: true, elementType: 'span' }),\n media: slot.optional(props.media, { elementType: 'span' }),\n description: slot.optional(props.description, { elementType: 'span' }),\n content: slot.optional(props.content, {\n renderByDefault: !!props.description || !!props.children,\n elementType: 'div',\n }),\n avatarSize: tableAvatarSizeMap[size],\n size,\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useTableContext","tableAvatarSizeMap","medium","small","useTableCellLayout_unstable","props","ref","size","components","root","main","description","content","media","always","elementType","appearance","truncate","optional","renderByDefault","children","avatarSize"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAE3E,SAASC,eAAe,QAAQ,8BAA8B;AAE9D,MAAMC,qBAAqB;IACzBC,QAAQ;IACRC,OAAO;IACP,eAAe;AACjB;AAEA;;;;;;;;CAQC,GACD,OAAO,MAAMC,8BAA8B,CACzCC,OACAC;IAEA,MAAM,EAAEC,IAAI,EAAE,GAAGP;IAEjB,OAAO;QACLQ,YAAY;YACVC,MAAM;YACNC,MAAM;YACNC,aAAa;YACbC,SAAS;YACTC,OAAO;QACT;QACAJ,MAAMV,KAAKe,MAAM,CACfhB,yBAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FQ,KAAKA;YACL,GAAGD,KAAK;QACV,IACA;YAAEU,aAAa;QAAM;QAEvBC,YAAYX,MAAMW,UAAU;QAC5BC,UAAUZ,MAAMY,QAAQ;QACxBP,MAAMX,KAAKmB,QAAQ,CAACb,MAAMK,IAAI,EAAE;YAAES,iBAAiB;YAAMJ,aAAa;QAAO;QAC7EF,OAAOd,KAAKmB,QAAQ,CAACb,MAAMQ,KAAK,EAAE;YAAEE,aAAa;QAAO;QACxDJ,aAAaZ,KAAKmB,QAAQ,CAACb,MAAMM,WAAW,EAAE;YAAEI,aAAa;QAAO;QACpEH,SAASb,KAAKmB,QAAQ,CAACb,MAAMO,OAAO,EAAE;YACpCO,iBAAiB,CAAC,CAACd,MAAMM,WAAW,IAAI,CAAC,CAACN,MAAMe,QAAQ;YACxDL,aAAa;QACf;QACAM,YAAYpB,kBAAkB,CAACM,KAAK;QACpCA;IACF;AACF,EAAE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
|
|
3
3
|
import { useTableContext } from '../../contexts/tableContext';
|
|
4
4
|
/**
|
|
5
5
|
* Create the state required to render TableHeader.
|
|
@@ -17,8 +17,11 @@ import { useTableContext } from '../../contexts/tableContext';
|
|
|
17
17
|
components: {
|
|
18
18
|
root: rootComponent
|
|
19
19
|
},
|
|
20
|
-
root: slot.always(
|
|
21
|
-
|
|
20
|
+
root: slot.always(getIntrinsicElementProps(rootComponent, {
|
|
21
|
+
// FIXME:
|
|
22
|
+
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
|
|
23
|
+
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
|
|
24
|
+
ref: ref,
|
|
22
25
|
role: rootComponent === 'div' ? 'rowgroup' : undefined,
|
|
23
26
|
...props
|
|
24
27
|
}), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTableHeader.ts"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["useTableHeader.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { TableHeaderProps, TableHeaderState } from './TableHeader.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\n/**\n * Create the state required to render TableHeader.\n *\n * The returned state can be modified with hooks such as useTableHeaderStyles_unstable,\n * before being passed to renderTableHeader_unstable.\n *\n * @param props - props from this instance of TableHeader\n * @param ref - reference to root HTMLElement of TableHeader\n */\nexport const useTableHeader_unstable = (props: TableHeaderProps, ref: React.Ref<HTMLElement>): TableHeaderState => {\n const { noNativeElements } = useTableContext();\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'thead';\n return {\n components: {\n root: rootComponent,\n },\n root: slot.always(\n getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n role: rootComponent === 'div' ? 'rowgroup' : undefined,\n ...props,\n }),\n { elementType: rootComponent },\n ),\n noNativeElements,\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useTableContext","useTableHeader_unstable","props","ref","noNativeElements","rootComponent","as","components","root","always","role","undefined","elementType"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAE3E,SAASC,eAAe,QAAQ,8BAA8B;AAE9D;;;;;;;;CAQC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAyBC;IAC/D,MAAM,EAAEC,gBAAgB,EAAE,GAAGJ;QAEPE;IAAtB,MAAMG,gBAAgBH,CAAAA,CAAAA,YAAAA,MAAMI,EAAE,cAARJ,uBAAAA,YAAYE,gBAAe,IAAI,QAAQ;IAC7D,OAAO;QACLG,YAAY;YACVC,MAAMH;QACR;QACAG,MAAMT,KAAKU,MAAM,CACfX,yBAAyBO,eAAe;YACtC,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FF,KAAKA;YACLO,MAAML,kBAAkB,QAAQ,aAAaM;YAC7C,GAAGT,KAAK;QACV,IACA;YAAEU,aAAaP;QAAc;QAE/BD;IACF;AACF,EAAE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';
|
|
3
3
|
import { useFocusWithin } from '@fluentui/react-tabster';
|
|
4
4
|
import { ArrowUpRegular, ArrowDownRegular } from '@fluentui/react-icons';
|
|
5
5
|
import { useARIAButtonShorthand } from '@fluentui/react-aria';
|
|
@@ -33,7 +33,10 @@ const sortIcons = {
|
|
|
33
33
|
sortIcon: 'span',
|
|
34
34
|
aside: 'span'
|
|
35
35
|
},
|
|
36
|
-
root: slot.always(
|
|
36
|
+
root: slot.always(getIntrinsicElementProps(rootComponent, {
|
|
37
|
+
// FIXME:
|
|
38
|
+
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
|
|
39
|
+
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
|
|
37
40
|
ref: useMergedRefs(ref, useFocusWithin()),
|
|
38
41
|
role: rootComponent === 'div' ? 'columnheader' : undefined,
|
|
39
42
|
'aria-sort': sortable ? (_props_sortDirection = props.sortDirection) !== null && _props_sortDirection !== void 0 ? _props_sortDirection : 'none' : undefined,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTableHeaderCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["useTableHeaderCell.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useFocusWithin } from '@fluentui/react-tabster';\nimport { ArrowUpRegular, ArrowDownRegular } from '@fluentui/react-icons';\nimport { useARIAButtonShorthand } from '@fluentui/react-aria';\nimport type { TableHeaderCellProps, TableHeaderCellState } from './TableHeaderCell.types';\nimport { useTableContext } from '../../contexts/tableContext';\n\nconst sortIcons = {\n ascending: <ArrowUpRegular fontSize={12} />,\n descending: <ArrowDownRegular fontSize={12} />,\n};\n\n/**\n * Create the state required to render TableHeaderCell.\n *\n * The returned state can be modified with hooks such as useTableHeaderCellStyles_unstable,\n * before being passed to renderTableHeaderCell_unstable.\n *\n * @param props - props from this instance of TableHeaderCell\n * @param ref - reference to root HTMLElement of TableHeaderCell\n */\nexport const useTableHeaderCell_unstable = (\n props: TableHeaderCellProps,\n ref: React.Ref<HTMLElement>,\n): TableHeaderCellState => {\n const { noNativeElements, sortable: contextSortable } = useTableContext();\n const { sortable = contextSortable } = props;\n\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'th';\n\n return {\n components: {\n root: rootComponent,\n button: 'div',\n sortIcon: 'span',\n aside: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, useFocusWithin()) as React.Ref<HTMLDivElement>,\n role: rootComponent === 'div' ? 'columnheader' : undefined,\n 'aria-sort': sortable ? props.sortDirection ?? 'none' : undefined,\n ...props,\n } as const),\n { elementType: rootComponent },\n ),\n aside: slot.optional(props.aside, { elementType: 'span' }),\n sortIcon: slot.optional(props.sortIcon, {\n renderByDefault: !!props.sortDirection,\n defaultProps: { children: props.sortDirection ? sortIcons[props.sortDirection] : undefined },\n elementType: 'span',\n }),\n button: slot.always(\n useARIAButtonShorthand(props.button, {\n required: true,\n defaultProps: {\n as: 'div',\n ...(!sortable && {\n role: 'presentation',\n tabIndex: undefined,\n }),\n },\n }),\n { elementType: 'div' },\n ),\n sortable,\n noNativeElements,\n };\n};\n"],"names":["React","getIntrinsicElementProps","useMergedRefs","slot","useFocusWithin","ArrowUpRegular","ArrowDownRegular","useARIAButtonShorthand","useTableContext","sortIcons","ascending","fontSize","descending","useTableHeaderCell_unstable","props","ref","noNativeElements","sortable","contextSortable","rootComponent","as","components","root","button","sortIcon","aside","always","role","undefined","sortDirection","elementType","optional","renderByDefault","defaultProps","children","required","tabIndex"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,aAAa,EAAEC,IAAI,QAAQ,4BAA4B;AAC1F,SAASC,cAAc,QAAQ,0BAA0B;AACzD,SAASC,cAAc,EAAEC,gBAAgB,QAAQ,wBAAwB;AACzE,SAASC,sBAAsB,QAAQ,uBAAuB;AAE9D,SAASC,eAAe,QAAQ,8BAA8B;AAE9D,MAAMC,YAAY;IAChBC,yBAAW,oBAACL;QAAeM,UAAU;;IACrCC,0BAAY,oBAACN;QAAiBK,UAAU;;AAC1C;AAEA;;;;;;;;CAQC,GACD,OAAO,MAAME,8BAA8B,CACzCC,OACAC;IAEA,MAAM,EAAEC,gBAAgB,EAAEC,UAAUC,eAAe,EAAE,GAAGV;IACxD,MAAM,EAAES,WAAWC,eAAe,EAAE,GAAGJ;QAEjBA;IAAtB,MAAMK,gBAAgBL,CAAAA,CAAAA,YAAAA,MAAMM,EAAE,cAARN,uBAAAA,YAAYE,gBAAe,IAAI,QAAQ;QAgB/BF;IAd9B,OAAO;QACLO,YAAY;YACVC,MAAMH;YACNI,QAAQ;YACRC,UAAU;YACVC,OAAO;QACT;QACAH,MAAMnB,KAAKuB,MAAM,CACfzB,yBAAyBkB,eAAe;YACtC,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FJ,KAAKb,cAAca,KAAKX;YACxBuB,MAAMR,kBAAkB,QAAQ,iBAAiBS;YACjD,aAAaX,WAAWH,CAAAA,uBAAAA,MAAMe,aAAa,cAAnBf,kCAAAA,uBAAuB,SAASc;YACxD,GAAGd,KAAK;QACV,IACA;YAAEgB,aAAaX;QAAc;QAE/BM,OAAOtB,KAAK4B,QAAQ,CAACjB,MAAMW,KAAK,EAAE;YAAEK,aAAa;QAAO;QACxDN,UAAUrB,KAAK4B,QAAQ,CAACjB,MAAMU,QAAQ,EAAE;YACtCQ,iBAAiB,CAAC,CAAClB,MAAMe,aAAa;YACtCI,cAAc;gBAAEC,UAAUpB,MAAMe,aAAa,GAAGpB,SAAS,CAACK,MAAMe,aAAa,CAAC,GAAGD;YAAU;YAC3FE,aAAa;QACf;QACAP,QAAQpB,KAAKuB,MAAM,CACjBnB,uBAAuBO,MAAMS,MAAM,EAAE;YACnCY,UAAU;YACVF,cAAc;gBACZb,IAAI;gBACJ,GAAI,CAACH,YAAY;oBACfU,MAAM;oBACNS,UAAUR;gBACZ,CAAC;YACH;QACF,IACA;YAAEE,aAAa;QAAM;QAEvBb;QACAD;IACF;AACF,EAAE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { getIntrinsicElementProps, useEventCallback, slot } from '@fluentui/react-utilities';
|
|
3
3
|
/**
|
|
4
4
|
* Create the state required to render TableResizeHandle.
|
|
5
5
|
*
|
|
@@ -18,8 +18,11 @@ import { getNativeElementProps, useEventCallback, slot } from '@fluentui/react-u
|
|
|
18
18
|
components: {
|
|
19
19
|
root: 'div'
|
|
20
20
|
},
|
|
21
|
-
root: slot.always(
|
|
22
|
-
|
|
21
|
+
root: slot.always(getIntrinsicElementProps('div', {
|
|
22
|
+
// FIXME:
|
|
23
|
+
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
|
|
24
|
+
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
|
|
25
|
+
ref: ref,
|
|
23
26
|
...props,
|
|
24
27
|
onClick
|
|
25
28
|
}), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTableResizeHandle.ts"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["useTableResizeHandle.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useEventCallback, slot } from '@fluentui/react-utilities';\nimport type { TableResizeHandleProps, TableResizeHandleState } from './TableResizeHandle.types';\n\n/**\n * Create the state required to render TableResizeHandle.\n *\n * The returned state can be modified with hooks such as useTableResizeHandleStyles_unstable,\n * before being passed to renderTableResizeHandle_unstable.\n *\n * @param props - props from this instance of TableResizeHandle\n * @param ref - reference to root HTMLElement of TableResizeHandle\n */\nexport const useTableResizeHandle_unstable = (\n props: TableResizeHandleProps,\n ref: React.Ref<HTMLElement>,\n): TableResizeHandleState => {\n const onClick = useEventCallback((event: React.MouseEvent<HTMLDivElement>) => {\n props.onClick?.(event);\n event.stopPropagation();\n });\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n ...props,\n onClick,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["React","getIntrinsicElementProps","useEventCallback","slot","useTableResizeHandle_unstable","props","ref","onClick","event","stopPropagation","components","root","always","elementType"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,4BAA4B;AAG7F;;;;;;;;CAQC,GACD,OAAO,MAAMC,gCAAgC,CAC3CC,OACAC;IAEA,MAAMC,UAAUL,iBAAiB,CAACM;YAChCH;SAAAA,iBAAAA,MAAME,OAAO,cAAbF,qCAAAA,oBAAAA,OAAgBG;QAChBA,MAAMC,eAAe;IACvB;IACA,OAAO;QACLC,YAAY;YACVC,MAAM;QACR;QACAA,MAAMR,KAAKS,MAAM,CACfX,yBAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FK,KAAKA;YACL,GAAGD,KAAK;YACRE;QACF,IACA;YAAEM,aAAa;QAAM;IAEzB;AACF,EAAE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';
|
|
3
3
|
import { useFocusVisible, useFocusWithin } from '@fluentui/react-tabster';
|
|
4
4
|
import { useTableContext } from '../../contexts/tableContext';
|
|
5
5
|
import { useIsInTableHeader } from '../../contexts/tableHeaderContext';
|
|
@@ -23,7 +23,10 @@ import { useIsInTableHeader } from '../../contexts/tableHeaderContext';
|
|
|
23
23
|
components: {
|
|
24
24
|
root: rootComponent
|
|
25
25
|
},
|
|
26
|
-
root: slot.always(
|
|
26
|
+
root: slot.always(getIntrinsicElementProps(rootComponent, {
|
|
27
|
+
// FIXME:
|
|
28
|
+
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
|
|
29
|
+
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
|
|
27
30
|
ref: useMergedRefs(ref, focusVisibleRef, focusWithinRef),
|
|
28
31
|
role: rootComponent === 'div' ? 'row' : undefined,
|
|
29
32
|
...props
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTableRow.ts"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["useTableRow.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useFocusVisible, useFocusWithin } from '@fluentui/react-tabster';\nimport type { TableRowProps, TableRowState } from './TableRow.types';\nimport { useTableContext } from '../../contexts/tableContext';\nimport { useIsInTableHeader } from '../../contexts/tableHeaderContext';\n\n/**\n * Create the state required to render TableRow.\n *\n * The returned state can be modified with hooks such as useTableRowStyles_unstable,\n * before being passed to renderTableRow_unstable.\n *\n * @param props - props from this instance of TableRow\n * @param ref - reference to root HTMLElement of TableRow\n */\nexport const useTableRow_unstable = (props: TableRowProps, ref: React.Ref<HTMLElement>): TableRowState => {\n const { noNativeElements, size } = useTableContext();\n const rootComponent = props.as ?? noNativeElements ? 'div' : 'tr';\n const focusVisibleRef = useFocusVisible();\n const focusWithinRef = useFocusWithin();\n const isHeaderRow = useIsInTableHeader();\n\n return {\n components: {\n root: rootComponent,\n },\n root: slot.always(\n getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, focusVisibleRef, focusWithinRef) as React.Ref<HTMLDivElement>,\n role: rootComponent === 'div' ? 'row' : undefined,\n ...props,\n }),\n { elementType: rootComponent },\n ),\n size,\n noNativeElements,\n appearance: props.appearance ?? 'none',\n isHeaderRow,\n };\n};\n"],"names":["React","getIntrinsicElementProps","useMergedRefs","slot","useFocusVisible","useFocusWithin","useTableContext","useIsInTableHeader","useTableRow_unstable","props","ref","noNativeElements","size","rootComponent","as","focusVisibleRef","focusWithinRef","isHeaderRow","components","root","always","role","undefined","elementType","appearance"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,aAAa,EAAEC,IAAI,QAAQ,4BAA4B;AAC1F,SAASC,eAAe,EAAEC,cAAc,QAAQ,0BAA0B;AAE1E,SAASC,eAAe,QAAQ,8BAA8B;AAC9D,SAASC,kBAAkB,QAAQ,oCAAoC;AAEvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,uBAAuB,CAACC,OAAsBC;IACzD,MAAM,EAAEC,gBAAgB,EAAEC,IAAI,EAAE,GAAGN;QACbG;IAAtB,MAAMI,gBAAgBJ,CAAAA,CAAAA,YAAAA,MAAMK,EAAE,cAARL,uBAAAA,YAAYE,gBAAe,IAAI,QAAQ;IAC7D,MAAMI,kBAAkBX;IACxB,MAAMY,iBAAiBX;IACvB,MAAMY,cAAcV;QAmBNE;IAjBd,OAAO;QACLS,YAAY;YACVC,MAAMN;QACR;QACAM,MAAMhB,KAAKiB,MAAM,CACfnB,yBAAyBY,eAAe;YACtC,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FH,KAAKR,cAAcQ,KAAKK,iBAAiBC;YACzCK,MAAMR,kBAAkB,QAAQ,QAAQS;YACxC,GAAGb,KAAK;QACV,IACA;YAAEc,aAAaV;QAAc;QAE/BD;QACAD;QACAa,YAAYf,CAAAA,oBAAAA,MAAMe,UAAU,cAAhBf,+BAAAA,oBAAoB;QAChCQ;IACF;AACF,EAAE"}
|
|
@@ -27,9 +27,8 @@ import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts
|
|
|
27
27
|
resizeObserver.unobserve(container.current);
|
|
28
28
|
container.current.remove();
|
|
29
29
|
}
|
|
30
|
-
if (el) {
|
|
31
|
-
container.current =
|
|
32
|
-
el.insertAdjacentElement('beforebegin', container.current);
|
|
30
|
+
if (el === null || el === void 0 ? void 0 : el.parentElement) {
|
|
31
|
+
container.current = el.parentElement;
|
|
33
32
|
resizeObserver.observe(container.current);
|
|
34
33
|
handleResize();
|
|
35
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useMeasureElement.ts"],"sourcesContent":["import { canUseDOM } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n\n/**\n * Provides a way of reporting element width.\n * Returns\n * `width` - current element width (0 by default),\n * `measureElementRef` - a ref function to be passed as `ref` to the element you want to measure\n */\nexport function useMeasureElement<TElement extends HTMLElement = HTMLElement>() {\n const [width, setWidth] = React.useState(0);\n const container = React.useRef<HTMLElement | undefined>(undefined);\n\n const { targetDocument } = useFluent();\n\n // the handler for resize observer\n const handleResize = React.useCallback(() => {\n const containerWidth = container.current?.getBoundingClientRect().width;\n setWidth(containerWidth || 0);\n }, []);\n\n // Keep the reference of ResizeObserver in the state, as it should live through renders\n const [resizeObserver] = React.useState(canUseDOM() ? new ResizeObserver(handleResize) : undefined);\n const measureElementRef = React.useCallback(\n (el: TElement | null) => {\n if (!targetDocument || !resizeObserver) {\n return;\n }\n\n // cleanup previous container\n if (container.current) {\n resizeObserver.unobserve(container.current);\n container.current.remove();\n }\n\n if (el) {\n container.current =
|
|
1
|
+
{"version":3,"sources":["useMeasureElement.ts"],"sourcesContent":["import { canUseDOM } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n\n/**\n * Provides a way of reporting element width.\n * Returns\n * `width` - current element width (0 by default),\n * `measureElementRef` - a ref function to be passed as `ref` to the element you want to measure\n */\nexport function useMeasureElement<TElement extends HTMLElement = HTMLElement>() {\n const [width, setWidth] = React.useState(0);\n const container = React.useRef<HTMLElement | undefined>(undefined);\n\n const { targetDocument } = useFluent();\n\n // the handler for resize observer\n const handleResize = React.useCallback(() => {\n const containerWidth = container.current?.getBoundingClientRect().width;\n setWidth(containerWidth || 0);\n }, []);\n\n // Keep the reference of ResizeObserver in the state, as it should live through renders\n const [resizeObserver] = React.useState(canUseDOM() ? new ResizeObserver(handleResize) : undefined);\n const measureElementRef = React.useCallback(\n (el: TElement | null) => {\n if (!targetDocument || !resizeObserver) {\n return;\n }\n\n // cleanup previous container\n if (container.current) {\n resizeObserver.unobserve(container.current);\n container.current.remove();\n }\n\n if (el?.parentElement) {\n container.current = el.parentElement;\n resizeObserver.observe(container.current);\n handleResize();\n }\n },\n [targetDocument, resizeObserver, handleResize],\n );\n\n React.useEffect(() => {\n return () => resizeObserver?.disconnect();\n }, [resizeObserver]);\n\n return { width, measureElementRef };\n}\n"],"names":["canUseDOM","React","useFluent_unstable","useFluent","useMeasureElement","width","setWidth","useState","container","useRef","undefined","targetDocument","handleResize","useCallback","containerWidth","current","getBoundingClientRect","resizeObserver","ResizeObserver","measureElementRef","el","unobserve","remove","parentElement","observe","useEffect","disconnect"],"mappings":"AAAA,SAASA,SAAS,QAAQ,4BAA4B;AACtD,YAAYC,WAAW,QAAQ;AAC/B,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAElF;;;;;CAKC,GACD,OAAO,SAASC;IACd,MAAM,CAACC,OAAOC,SAAS,GAAGL,MAAMM,QAAQ,CAAC;IACzC,MAAMC,YAAYP,MAAMQ,MAAM,CAA0BC;IAExD,MAAM,EAAEC,cAAc,EAAE,GAAGR;IAE3B,kCAAkC;IAClC,MAAMS,eAAeX,MAAMY,WAAW,CAAC;YACdL;QAAvB,MAAMM,kBAAiBN,qBAAAA,UAAUO,OAAO,cAAjBP,yCAAAA,mBAAmBQ,qBAAqB,GAAGX,KAAK;QACvEC,SAASQ,kBAAkB;IAC7B,GAAG,EAAE;IAEL,uFAAuF;IACvF,MAAM,CAACG,eAAe,GAAGhB,MAAMM,QAAQ,CAACP,cAAc,IAAIkB,eAAeN,gBAAgBF;IACzF,MAAMS,oBAAoBlB,MAAMY,WAAW,CACzC,CAACO;QACC,IAAI,CAACT,kBAAkB,CAACM,gBAAgB;YACtC;QACF;QAEA,6BAA6B;QAC7B,IAAIT,UAAUO,OAAO,EAAE;YACrBE,eAAeI,SAAS,CAACb,UAAUO,OAAO;YAC1CP,UAAUO,OAAO,CAACO,MAAM;QAC1B;QAEA,IAAIF,eAAAA,yBAAAA,GAAIG,aAAa,EAAE;YACrBf,UAAUO,OAAO,GAAGK,GAAGG,aAAa;YACpCN,eAAeO,OAAO,CAAChB,UAAUO,OAAO;YACxCH;QACF;IACF,GACA;QAACD;QAAgBM;QAAgBL;KAAa;IAGhDX,MAAMwB,SAAS,CAAC;QACd,OAAO,IAAMR,2BAAAA,qCAAAA,eAAgBS,UAAU;IACzC,GAAG;QAACT;KAAe;IAEnB,OAAO;QAAEZ;QAAOc;IAAkB;AACpC"}
|
|
@@ -19,8 +19,11 @@ const useTable_unstable = (props, ref)=>{
|
|
|
19
19
|
components: {
|
|
20
20
|
root: rootComponent
|
|
21
21
|
},
|
|
22
|
-
root: _reactutilities.slot.always((0, _reactutilities.
|
|
23
|
-
|
|
22
|
+
root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)(rootComponent, {
|
|
23
|
+
// FIXME:
|
|
24
|
+
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
|
|
25
|
+
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
|
|
26
|
+
ref: ref,
|
|
24
27
|
role: rootComponent === 'div' ? 'table' : undefined,
|
|
25
28
|
...props
|
|
26
29
|
}), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTable.js"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["useTable.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\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 */ export const useTable_unstable = (props, ref)=>{\n var _props_as;\n const rootComponent = ((_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : props.noNativeElements) ? 'div' : 'table';\n var _props_size, _props_noNativeElements, _props_sortable;\n return {\n components: {\n root: rootComponent\n },\n root: slot.always(getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref,\n role: rootComponent === 'div' ? 'table' : undefined,\n ...props\n }), {\n elementType: rootComponent\n }),\n size: (_props_size = props.size) !== null && _props_size !== void 0 ? _props_size : 'medium',\n noNativeElements: (_props_noNativeElements = props.noNativeElements) !== null && _props_noNativeElements !== void 0 ? _props_noNativeElements : false,\n sortable: (_props_sortable = props.sortable) !== null && _props_sortable !== void 0 ? _props_sortable : false\n };\n};\n"],"names":["useTable_unstable","props","ref","_props_as","rootComponent","as","noNativeElements","_props_size","_props_noNativeElements","_props_sortable","components","root","slot","always","getIntrinsicElementProps","role","undefined","elementType","size","sortable"],"mappings":";;;;+BAUiBA;;;eAAAA;;;;iEAVM;gCACwB;AASpC,MAAMA,oBAAoB,CAACC,OAAOC;IACzC,IAAIC;IACJ,MAAMC,gBAAgB,AAAC,CAAA,AAACD,CAAAA,YAAYF,MAAMI,EAAE,AAAD,MAAO,QAAQF,cAAc,KAAK,IAAIA,YAAYF,MAAMK,gBAAgB,AAAD,IAAK,QAAQ;IAC/H,IAAIC,aAAaC,yBAAyBC;IAC1C,OAAO;QACHC,YAAY;YACRC,MAAMP;QACV;QACAO,MAAMC,oBAAI,CAACC,MAAM,CAACC,IAAAA,wCAAwB,EAACV,eAAe;YACtD,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FF,KAAKA;YACLa,MAAMX,kBAAkB,QAAQ,UAAUY;YAC1C,GAAGf,KAAK;QACZ,IAAI;YACAgB,aAAab;QACjB;QACAc,MAAM,AAACX,CAAAA,cAAcN,MAAMiB,IAAI,AAAD,MAAO,QAAQX,gBAAgB,KAAK,IAAIA,cAAc;QACpFD,kBAAkB,AAACE,CAAAA,0BAA0BP,MAAMK,gBAAgB,AAAD,MAAO,QAAQE,4BAA4B,KAAK,IAAIA,0BAA0B;QAChJW,UAAU,AAACV,CAAAA,kBAAkBR,MAAMkB,QAAQ,AAAD,MAAO,QAAQV,oBAAoB,KAAK,IAAIA,kBAAkB;IAC5G;AACJ"}
|
|
@@ -20,8 +20,11 @@ const useTableBody_unstable = (props, ref)=>{
|
|
|
20
20
|
components: {
|
|
21
21
|
root: rootComponent
|
|
22
22
|
},
|
|
23
|
-
root: _reactutilities.slot.always((0, _reactutilities.
|
|
24
|
-
|
|
23
|
+
root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)(rootComponent, {
|
|
24
|
+
// FIXME:
|
|
25
|
+
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
|
|
26
|
+
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
|
|
27
|
+
ref: ref,
|
|
25
28
|
role: rootComponent === 'div' ? 'rowgroup' : undefined,
|
|
26
29
|
...props
|
|
27
30
|
}), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTableBody.js"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["useTableBody.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport { useTableContext } from '../../contexts/tableContext';\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 */ export const useTableBody_unstable = (props, ref)=>{\n const { noNativeElements } = useTableContext();\n var _props_as;\n const rootComponent = ((_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : noNativeElements) ? 'div' : 'tbody';\n return {\n components: {\n root: rootComponent\n },\n root: slot.always(getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref,\n role: rootComponent === 'div' ? 'rowgroup' : undefined,\n ...props\n }), {\n elementType: rootComponent\n }),\n noNativeElements\n };\n};\n"],"names":["useTableBody_unstable","props","ref","noNativeElements","useTableContext","_props_as","rootComponent","as","components","root","slot","always","getIntrinsicElementProps","role","undefined","elementType"],"mappings":";;;;+BAWiBA;;;eAAAA;;;;iEAXM;gCACwB;8BACf;AASrB,MAAMA,wBAAwB,CAACC,OAAOC;IAC7C,MAAM,EAAEC,gBAAgB,EAAE,GAAGC,IAAAA,6BAAe;IAC5C,IAAIC;IACJ,MAAMC,gBAAgB,AAAC,CAAA,AAACD,CAAAA,YAAYJ,MAAMM,EAAE,AAAD,MAAO,QAAQF,cAAc,KAAK,IAAIA,YAAYF,gBAAe,IAAK,QAAQ;IACzH,OAAO;QACHK,YAAY;YACRC,MAAMH;QACV;QACAG,MAAMC,oBAAI,CAACC,MAAM,CAACC,IAAAA,wCAAwB,EAACN,eAAe;YACtD,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FJ,KAAKA;YACLW,MAAMP,kBAAkB,QAAQ,aAAaQ;YAC7C,GAAGb,KAAK;QACZ,IAAI;YACAc,aAAaT;QACjB;QACAH;IACJ;AACJ"}
|
|
@@ -20,8 +20,11 @@ const useTableCell_unstable = (props, ref)=>{
|
|
|
20
20
|
components: {
|
|
21
21
|
root: rootComponent
|
|
22
22
|
},
|
|
23
|
-
root: _reactutilities.slot.always((0, _reactutilities.
|
|
24
|
-
|
|
23
|
+
root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)(rootComponent, {
|
|
24
|
+
// FIXME:
|
|
25
|
+
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
|
|
26
|
+
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
|
|
27
|
+
ref: ref,
|
|
25
28
|
role: rootComponent === 'div' ? 'cell' : undefined,
|
|
26
29
|
...props
|
|
27
30
|
}), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTableCell.js"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["useTableCell.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport { useTableContext } from '../../contexts/tableContext';\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 */ export const useTableCell_unstable = (props, ref)=>{\n const { noNativeElements, size } = useTableContext();\n var _props_as;\n const rootComponent = ((_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : noNativeElements) ? 'div' : 'td';\n return {\n components: {\n root: rootComponent\n },\n root: slot.always(getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref,\n role: rootComponent === 'div' ? 'cell' : undefined,\n ...props\n }), {\n elementType: rootComponent\n }),\n noNativeElements,\n size\n };\n};\n"],"names":["useTableCell_unstable","props","ref","noNativeElements","size","useTableContext","_props_as","rootComponent","as","components","root","slot","always","getIntrinsicElementProps","role","undefined","elementType"],"mappings":";;;;+BAWiBA;;;eAAAA;;;;iEAXM;gCACwB;8BACf;AASrB,MAAMA,wBAAwB,CAACC,OAAOC;IAC7C,MAAM,EAAEC,gBAAgB,EAAEC,IAAI,EAAE,GAAGC,IAAAA,6BAAe;IAClD,IAAIC;IACJ,MAAMC,gBAAgB,AAAC,CAAA,AAACD,CAAAA,YAAYL,MAAMO,EAAE,AAAD,MAAO,QAAQF,cAAc,KAAK,IAAIA,YAAYH,gBAAe,IAAK,QAAQ;IACzH,OAAO;QACHM,YAAY;YACRC,MAAMH;QACV;QACAG,MAAMC,oBAAI,CAACC,MAAM,CAACC,IAAAA,wCAAwB,EAACN,eAAe;YACtD,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FL,KAAKA;YACLY,MAAMP,kBAAkB,QAAQ,SAASQ;YACzC,GAAGd,KAAK;QACZ,IAAI;YACAe,aAAaT;QACjB;QACAJ;QACAC;IACJ;AACJ"}
|
|
@@ -17,8 +17,11 @@ const useTableCellActions_unstable = (props, ref)=>{
|
|
|
17
17
|
components: {
|
|
18
18
|
root: 'div'
|
|
19
19
|
},
|
|
20
|
-
root: _reactutilities.slot.always((0, _reactutilities.
|
|
21
|
-
|
|
20
|
+
root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)('div', {
|
|
21
|
+
// FIXME:
|
|
22
|
+
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
|
|
23
|
+
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
|
|
24
|
+
ref: ref,
|
|
22
25
|
...props
|
|
23
26
|
}), {
|
|
24
27
|
elementType: 'div'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTableCellActions.js"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["useTableCellActions.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\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 */ export const useTableCellActions_unstable = (props, ref)=>{\n var _props_visible;\n return {\n components: {\n root: 'div'\n },\n root: slot.always(getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref,\n ...props\n }), {\n elementType: 'div'\n }),\n visible: (_props_visible = props.visible) !== null && _props_visible !== void 0 ? _props_visible : false\n };\n};\n"],"names":["useTableCellActions_unstable","props","ref","_props_visible","components","root","slot","always","getIntrinsicElementProps","elementType","visible"],"mappings":";;;;+BAUiBA;;;eAAAA;;;;iEAVM;gCACwB;AASpC,MAAMA,+BAA+B,CAACC,OAAOC;IACpD,IAAIC;IACJ,OAAO;QACHC,YAAY;YACRC,MAAM;QACV;QACAA,MAAMC,oBAAI,CAACC,MAAM,CAACC,IAAAA,wCAAwB,EAAC,OAAO;YAC9C,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FN,KAAKA;YACL,GAAGD,KAAK;QACZ,IAAI;YACAQ,aAAa;QACjB;QACAC,SAAS,AAACP,CAAAA,iBAAiBF,MAAMS,OAAO,AAAD,MAAO,QAAQP,mBAAmB,KAAK,IAAIA,iBAAiB;IACvG;AACJ"}
|
|
@@ -27,8 +27,11 @@ const useTableCellLayout_unstable = (props, ref)=>{
|
|
|
27
27
|
content: 'div',
|
|
28
28
|
media: 'span'
|
|
29
29
|
},
|
|
30
|
-
root: _reactutilities.slot.always((0, _reactutilities.
|
|
31
|
-
|
|
30
|
+
root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)('div', {
|
|
31
|
+
// FIXME:
|
|
32
|
+
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
|
|
33
|
+
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
|
|
34
|
+
ref: ref,
|
|
32
35
|
...props
|
|
33
36
|
}), {
|
|
34
37
|
elementType: 'div'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTableCellLayout.js"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["useTableCellLayout.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport { useTableContext } from '../../contexts/tableContext';\nconst tableAvatarSizeMap = {\n medium: 32,\n small: 24,\n 'extra-small': 20\n};\n/**\n * Create the state required to render TableCellLayout.\n *\n * The returned state can be modified with hooks such as useTableCellLayoutStyles_unstable,\n * before being passed to renderTableCellLayout_unstable.\n *\n * @param props - props from this instance of TableCellLayout\n * @param ref - reference to root HTMLElement of TableCellLayout\n */ export const useTableCellLayout_unstable = (props, ref)=>{\n const { size } = useTableContext();\n return {\n components: {\n root: 'div',\n main: 'span',\n description: 'span',\n content: 'div',\n media: 'span'\n },\n root: slot.always(getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref,\n ...props\n }), {\n elementType: 'div'\n }),\n appearance: props.appearance,\n truncate: props.truncate,\n main: slot.optional(props.main, {\n renderByDefault: true,\n elementType: 'span'\n }),\n media: slot.optional(props.media, {\n elementType: 'span'\n }),\n description: slot.optional(props.description, {\n elementType: 'span'\n }),\n content: slot.optional(props.content, {\n renderByDefault: !!props.description || !!props.children,\n elementType: 'div'\n }),\n avatarSize: tableAvatarSizeMap[size],\n size\n };\n};\n"],"names":["useTableCellLayout_unstable","tableAvatarSizeMap","medium","small","props","ref","size","useTableContext","components","root","main","description","content","media","slot","always","getIntrinsicElementProps","elementType","appearance","truncate","optional","renderByDefault","children","avatarSize"],"mappings":";;;;+BAgBiBA;;;eAAAA;;;;iEAhBM;gCACwB;8BACf;AAChC,MAAMC,qBAAqB;IACvBC,QAAQ;IACRC,OAAO;IACP,eAAe;AACnB;AASW,MAAMH,8BAA8B,CAACI,OAAOC;IACnD,MAAM,EAAEC,IAAI,EAAE,GAAGC,IAAAA,6BAAe;IAChC,OAAO;QACHC,YAAY;YACRC,MAAM;YACNC,MAAM;YACNC,aAAa;YACbC,SAAS;YACTC,OAAO;QACX;QACAJ,MAAMK,oBAAI,CAACC,MAAM,CAACC,IAAAA,wCAAwB,EAAC,OAAO;YAC9C,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FX,KAAKA;YACL,GAAGD,KAAK;QACZ,IAAI;YACAa,aAAa;QACjB;QACAC,YAAYd,MAAMc,UAAU;QAC5BC,UAAUf,MAAMe,QAAQ;QACxBT,MAAMI,oBAAI,CAACM,QAAQ,CAAChB,MAAMM,IAAI,EAAE;YAC5BW,iBAAiB;YACjBJ,aAAa;QACjB;QACAJ,OAAOC,oBAAI,CAACM,QAAQ,CAAChB,MAAMS,KAAK,EAAE;YAC9BI,aAAa;QACjB;QACAN,aAAaG,oBAAI,CAACM,QAAQ,CAAChB,MAAMO,WAAW,EAAE;YAC1CM,aAAa;QACjB;QACAL,SAASE,oBAAI,CAACM,QAAQ,CAAChB,MAAMQ,OAAO,EAAE;YAClCS,iBAAiB,CAAC,CAACjB,MAAMO,WAAW,IAAI,CAAC,CAACP,MAAMkB,QAAQ;YACxDL,aAAa;QACjB;QACAM,YAAYtB,kBAAkB,CAACK,KAAK;QACpCA;IACJ;AACJ"}
|
|
@@ -20,8 +20,11 @@ const useTableHeader_unstable = (props, ref)=>{
|
|
|
20
20
|
components: {
|
|
21
21
|
root: rootComponent
|
|
22
22
|
},
|
|
23
|
-
root: _reactutilities.slot.always((0, _reactutilities.
|
|
24
|
-
|
|
23
|
+
root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)(rootComponent, {
|
|
24
|
+
// FIXME:
|
|
25
|
+
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
|
|
26
|
+
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
|
|
27
|
+
ref: ref,
|
|
25
28
|
role: rootComponent === 'div' ? 'rowgroup' : undefined,
|
|
26
29
|
...props
|
|
27
30
|
}), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTableHeader.js"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["useTableHeader.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport { useTableContext } from '../../contexts/tableContext';\n/**\n * Create the state required to render TableHeader.\n *\n * The returned state can be modified with hooks such as useTableHeaderStyles_unstable,\n * before being passed to renderTableHeader_unstable.\n *\n * @param props - props from this instance of TableHeader\n * @param ref - reference to root HTMLElement of TableHeader\n */ export const useTableHeader_unstable = (props, ref)=>{\n const { noNativeElements } = useTableContext();\n var _props_as;\n const rootComponent = ((_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : noNativeElements) ? 'div' : 'thead';\n return {\n components: {\n root: rootComponent\n },\n root: slot.always(getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref,\n role: rootComponent === 'div' ? 'rowgroup' : undefined,\n ...props\n }), {\n elementType: rootComponent\n }),\n noNativeElements\n };\n};\n"],"names":["useTableHeader_unstable","props","ref","noNativeElements","useTableContext","_props_as","rootComponent","as","components","root","slot","always","getIntrinsicElementProps","role","undefined","elementType"],"mappings":";;;;+BAWiBA;;;eAAAA;;;;iEAXM;gCACwB;8BACf;AASrB,MAAMA,0BAA0B,CAACC,OAAOC;IAC/C,MAAM,EAAEC,gBAAgB,EAAE,GAAGC,IAAAA,6BAAe;IAC5C,IAAIC;IACJ,MAAMC,gBAAgB,AAAC,CAAA,AAACD,CAAAA,YAAYJ,MAAMM,EAAE,AAAD,MAAO,QAAQF,cAAc,KAAK,IAAIA,YAAYF,gBAAe,IAAK,QAAQ;IACzH,OAAO;QACHK,YAAY;YACRC,MAAMH;QACV;QACAG,MAAMC,oBAAI,CAACC,MAAM,CAACC,IAAAA,wCAAwB,EAACN,eAAe;YACtD,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FJ,KAAKA;YACLW,MAAMP,kBAAkB,QAAQ,aAAaQ;YAC7C,GAAGb,KAAK;QACZ,IAAI;YACAc,aAAaT;QACjB;QACAH;IACJ;AACJ"}
|
|
@@ -36,7 +36,10 @@ const useTableHeaderCell_unstable = (props, ref)=>{
|
|
|
36
36
|
sortIcon: 'span',
|
|
37
37
|
aside: 'span'
|
|
38
38
|
},
|
|
39
|
-
root: _reactutilities.slot.always((0, _reactutilities.
|
|
39
|
+
root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)(rootComponent, {
|
|
40
|
+
// FIXME:
|
|
41
|
+
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
|
|
42
|
+
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
|
|
40
43
|
ref: (0, _reactutilities.useMergedRefs)(ref, (0, _reacttabster.useFocusWithin)()),
|
|
41
44
|
role: rootComponent === 'div' ? 'columnheader' : undefined,
|
|
42
45
|
'aria-sort': sortable ? (_props_sortDirection = props.sortDirection) !== null && _props_sortDirection !== void 0 ? _props_sortDirection : 'none' : undefined,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTableHeaderCell.js"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["useTableHeaderCell.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useFocusWithin } from '@fluentui/react-tabster';\nimport { ArrowUpRegular, ArrowDownRegular } from '@fluentui/react-icons';\nimport { useARIAButtonShorthand } from '@fluentui/react-aria';\nimport { useTableContext } from '../../contexts/tableContext';\nconst sortIcons = {\n ascending: /*#__PURE__*/ React.createElement(ArrowUpRegular, {\n fontSize: 12\n }),\n descending: /*#__PURE__*/ React.createElement(ArrowDownRegular, {\n fontSize: 12\n })\n};\n/**\n * Create the state required to render TableHeaderCell.\n *\n * The returned state can be modified with hooks such as useTableHeaderCellStyles_unstable,\n * before being passed to renderTableHeaderCell_unstable.\n *\n * @param props - props from this instance of TableHeaderCell\n * @param ref - reference to root HTMLElement of TableHeaderCell\n */ export const useTableHeaderCell_unstable = (props, ref)=>{\n const { noNativeElements, sortable: contextSortable } = useTableContext();\n const { sortable = contextSortable } = props;\n var _props_as;\n const rootComponent = ((_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : noNativeElements) ? 'div' : 'th';\n var _props_sortDirection;\n return {\n components: {\n root: rootComponent,\n button: 'div',\n sortIcon: 'span',\n aside: 'span'\n },\n root: slot.always(getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, useFocusWithin()),\n role: rootComponent === 'div' ? 'columnheader' : undefined,\n 'aria-sort': sortable ? (_props_sortDirection = props.sortDirection) !== null && _props_sortDirection !== void 0 ? _props_sortDirection : 'none' : undefined,\n ...props\n }), {\n elementType: rootComponent\n }),\n aside: slot.optional(props.aside, {\n elementType: 'span'\n }),\n sortIcon: slot.optional(props.sortIcon, {\n renderByDefault: !!props.sortDirection,\n defaultProps: {\n children: props.sortDirection ? sortIcons[props.sortDirection] : undefined\n },\n elementType: 'span'\n }),\n button: slot.always(useARIAButtonShorthand(props.button, {\n required: true,\n defaultProps: {\n as: 'div',\n ...!sortable && {\n role: 'presentation',\n tabIndex: undefined\n }\n }\n }), {\n elementType: 'div'\n }),\n sortable,\n noNativeElements\n };\n};\n"],"names":["useTableHeaderCell_unstable","sortIcons","ascending","React","createElement","ArrowUpRegular","fontSize","descending","ArrowDownRegular","props","ref","noNativeElements","sortable","contextSortable","useTableContext","_props_as","rootComponent","as","_props_sortDirection","components","root","button","sortIcon","aside","slot","always","getIntrinsicElementProps","useMergedRefs","useFocusWithin","role","undefined","sortDirection","elementType","optional","renderByDefault","defaultProps","children","useARIAButtonShorthand","required","tabIndex"],"mappings":";;;;+BAsBiBA;;;eAAAA;;;;iEAtBM;gCACuC;8BAC/B;4BACkB;2BACV;8BACP;AAChC,MAAMC,YAAY;IACdC,WAAW,WAAW,GAAGC,OAAMC,aAAa,CAACC,0BAAc,EAAE;QACzDC,UAAU;IACd;IACAC,YAAY,WAAW,GAAGJ,OAAMC,aAAa,CAACI,4BAAgB,EAAE;QAC5DF,UAAU;IACd;AACJ;AASW,MAAMN,8BAA8B,CAACS,OAAOC;IACnD,MAAM,EAAEC,gBAAgB,EAAEC,UAAUC,eAAe,EAAE,GAAGC,IAAAA,6BAAe;IACvE,MAAM,EAAEF,WAAWC,eAAe,EAAE,GAAGJ;IACvC,IAAIM;IACJ,MAAMC,gBAAgB,AAAC,CAAA,AAACD,CAAAA,YAAYN,MAAMQ,EAAE,AAAD,MAAO,QAAQF,cAAc,KAAK,IAAIA,YAAYJ,gBAAe,IAAK,QAAQ;IACzH,IAAIO;IACJ,OAAO;QACHC,YAAY;YACRC,MAAMJ;YACNK,QAAQ;YACRC,UAAU;YACVC,OAAO;QACX;QACAH,MAAMI,oBAAI,CAACC,MAAM,CAACC,IAAAA,wCAAwB,EAACV,eAAe;YACtD,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FN,KAAKiB,IAAAA,6BAAa,EAACjB,KAAKkB,IAAAA,4BAAc;YACtCC,MAAMb,kBAAkB,QAAQ,iBAAiBc;YACjD,aAAalB,WAAW,AAACM,CAAAA,uBAAuBT,MAAMsB,aAAa,AAAD,MAAO,QAAQb,yBAAyB,KAAK,IAAIA,uBAAuB,SAASY;YACnJ,GAAGrB,KAAK;QACZ,IAAI;YACAuB,aAAahB;QACjB;QACAO,OAAOC,oBAAI,CAACS,QAAQ,CAACxB,MAAMc,KAAK,EAAE;YAC9BS,aAAa;QACjB;QACAV,UAAUE,oBAAI,CAACS,QAAQ,CAACxB,MAAMa,QAAQ,EAAE;YACpCY,iBAAiB,CAAC,CAACzB,MAAMsB,aAAa;YACtCI,cAAc;gBACVC,UAAU3B,MAAMsB,aAAa,GAAG9B,SAAS,CAACQ,MAAMsB,aAAa,CAAC,GAAGD;YACrE;YACAE,aAAa;QACjB;QACAX,QAAQG,oBAAI,CAACC,MAAM,CAACY,IAAAA,iCAAsB,EAAC5B,MAAMY,MAAM,EAAE;YACrDiB,UAAU;YACVH,cAAc;gBACVlB,IAAI;gBACJ,GAAG,CAACL,YAAY;oBACZiB,MAAM;oBACNU,UAAUT;gBACd,CAAC;YACL;QACJ,IAAI;YACAE,aAAa;QACjB;QACApB;QACAD;IACJ;AACJ"}
|
|
@@ -21,8 +21,11 @@ const useTableResizeHandle_unstable = (props, ref)=>{
|
|
|
21
21
|
components: {
|
|
22
22
|
root: 'div'
|
|
23
23
|
},
|
|
24
|
-
root: _reactutilities.slot.always((0, _reactutilities.
|
|
25
|
-
|
|
24
|
+
root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)('div', {
|
|
25
|
+
// FIXME:
|
|
26
|
+
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
|
|
27
|
+
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
|
|
28
|
+
ref: ref,
|
|
26
29
|
...props,
|
|
27
30
|
onClick
|
|
28
31
|
}), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTableResizeHandle.js"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["useTableResizeHandle.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useEventCallback, slot } from '@fluentui/react-utilities';\n/**\n * Create the state required to render TableResizeHandle.\n *\n * The returned state can be modified with hooks such as useTableResizeHandleStyles_unstable,\n * before being passed to renderTableResizeHandle_unstable.\n *\n * @param props - props from this instance of TableResizeHandle\n * @param ref - reference to root HTMLElement of TableResizeHandle\n */ export const useTableResizeHandle_unstable = (props, ref)=>{\n const onClick = useEventCallback((event)=>{\n var _props_onClick;\n (_props_onClick = props.onClick) === null || _props_onClick === void 0 ? void 0 : _props_onClick.call(props, event);\n event.stopPropagation();\n });\n return {\n components: {\n root: 'div'\n },\n root: slot.always(getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref,\n ...props,\n onClick\n }), {\n elementType: 'div'\n })\n };\n};\n"],"names":["useTableResizeHandle_unstable","props","ref","onClick","useEventCallback","event","_props_onClick","call","stopPropagation","components","root","slot","always","getIntrinsicElementProps","elementType"],"mappings":";;;;+BAUiBA;;;eAAAA;;;;iEAVM;gCAC0C;AAStD,MAAMA,gCAAgC,CAACC,OAAOC;IACrD,MAAMC,UAAUC,IAAAA,gCAAgB,EAAC,CAACC;QAC9B,IAAIC;QACHA,CAAAA,iBAAiBL,MAAME,OAAO,AAAD,MAAO,QAAQG,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAeC,IAAI,CAACN,OAAOI;QAC7GA,MAAMG,eAAe;IACzB;IACA,OAAO;QACHC,YAAY;YACRC,MAAM;QACV;QACAA,MAAMC,oBAAI,CAACC,MAAM,CAACC,IAAAA,wCAAwB,EAAC,OAAO;YAC9C,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FX,KAAKA;YACL,GAAGD,KAAK;YACRE;QACJ,IAAI;YACAW,aAAa;QACjB;IACJ;AACJ"}
|
|
@@ -26,7 +26,10 @@ const useTableRow_unstable = (props, ref)=>{
|
|
|
26
26
|
components: {
|
|
27
27
|
root: rootComponent
|
|
28
28
|
},
|
|
29
|
-
root: _reactutilities.slot.always((0, _reactutilities.
|
|
29
|
+
root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)(rootComponent, {
|
|
30
|
+
// FIXME:
|
|
31
|
+
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
|
|
32
|
+
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
|
|
30
33
|
ref: (0, _reactutilities.useMergedRefs)(ref, focusVisibleRef, focusWithinRef),
|
|
31
34
|
role: rootComponent === 'div' ? 'row' : undefined,
|
|
32
35
|
...props
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTableRow.js"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["useTableRow.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useFocusVisible, useFocusWithin } from '@fluentui/react-tabster';\nimport { useTableContext } from '../../contexts/tableContext';\nimport { useIsInTableHeader } from '../../contexts/tableHeaderContext';\n/**\n * Create the state required to render TableRow.\n *\n * The returned state can be modified with hooks such as useTableRowStyles_unstable,\n * before being passed to renderTableRow_unstable.\n *\n * @param props - props from this instance of TableRow\n * @param ref - reference to root HTMLElement of TableRow\n */ export const useTableRow_unstable = (props, ref)=>{\n const { noNativeElements, size } = useTableContext();\n var _props_as;\n const rootComponent = ((_props_as = props.as) !== null && _props_as !== void 0 ? _props_as : noNativeElements) ? 'div' : 'tr';\n const focusVisibleRef = useFocusVisible();\n const focusWithinRef = useFocusWithin();\n const isHeaderRow = useIsInTableHeader();\n var _props_appearance;\n return {\n components: {\n root: rootComponent\n },\n root: slot.always(getIntrinsicElementProps(rootComponent, {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, focusVisibleRef, focusWithinRef),\n role: rootComponent === 'div' ? 'row' : undefined,\n ...props\n }), {\n elementType: rootComponent\n }),\n size,\n noNativeElements,\n appearance: (_props_appearance = props.appearance) !== null && _props_appearance !== void 0 ? _props_appearance : 'none',\n isHeaderRow\n };\n};\n"],"names":["useTableRow_unstable","props","ref","noNativeElements","size","useTableContext","_props_as","rootComponent","as","focusVisibleRef","useFocusVisible","focusWithinRef","useFocusWithin","isHeaderRow","useIsInTableHeader","_props_appearance","components","root","slot","always","getIntrinsicElementProps","useMergedRefs","role","undefined","elementType","appearance"],"mappings":";;;;+BAaiBA;;;eAAAA;;;;iEAbM;gCACuC;8BACd;8BAChB;oCACG;AASxB,MAAMA,uBAAuB,CAACC,OAAOC;IAC5C,MAAM,EAAEC,gBAAgB,EAAEC,IAAI,EAAE,GAAGC,IAAAA,6BAAe;IAClD,IAAIC;IACJ,MAAMC,gBAAgB,AAAC,CAAA,AAACD,CAAAA,YAAYL,MAAMO,EAAE,AAAD,MAAO,QAAQF,cAAc,KAAK,IAAIA,YAAYH,gBAAe,IAAK,QAAQ;IACzH,MAAMM,kBAAkBC,IAAAA,6BAAe;IACvC,MAAMC,iBAAiBC,IAAAA,4BAAc;IACrC,MAAMC,cAAcC,IAAAA,sCAAkB;IACtC,IAAIC;IACJ,OAAO;QACHC,YAAY;YACRC,MAAMV;QACV;QACAU,MAAMC,oBAAI,CAACC,MAAM,CAACC,IAAAA,wCAAwB,EAACb,eAAe;YACtD,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FL,KAAKmB,IAAAA,6BAAa,EAACnB,KAAKO,iBAAiBE;YACzCW,MAAMf,kBAAkB,QAAQ,QAAQgB;YACxC,GAAGtB,KAAK;QACZ,IAAI;YACAuB,aAAajB;QACjB;QACAH;QACAD;QACAsB,YAAY,AAACV,CAAAA,oBAAoBd,MAAMwB,UAAU,AAAD,MAAO,QAAQV,sBAAsB,KAAK,IAAIA,oBAAoB;QAClHF;IACJ;AACJ"}
|
|
@@ -33,9 +33,8 @@ function useMeasureElement() {
|
|
|
33
33
|
resizeObserver.unobserve(container.current);
|
|
34
34
|
container.current.remove();
|
|
35
35
|
}
|
|
36
|
-
if (el) {
|
|
37
|
-
container.current =
|
|
38
|
-
el.insertAdjacentElement('beforebegin', container.current);
|
|
36
|
+
if (el === null || el === void 0 ? void 0 : el.parentElement) {
|
|
37
|
+
container.current = el.parentElement;
|
|
39
38
|
resizeObserver.observe(container.current);
|
|
40
39
|
handleResize();
|
|
41
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useMeasureElement.js"],"sourcesContent":["import { canUseDOM } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n/**\n * Provides a way of reporting element width.\n * Returns\n * `width` - current element width (0 by default),\n * `measureElementRef` - a ref function to be passed as `ref` to the element you want to measure\n */ export function useMeasureElement() {\n const [width, setWidth] = React.useState(0);\n const container = React.useRef(undefined);\n const { targetDocument } = useFluent();\n // the handler for resize observer\n const handleResize = React.useCallback(()=>{\n var _container_current;\n const containerWidth = (_container_current = container.current) === null || _container_current === void 0 ? void 0 : _container_current.getBoundingClientRect().width;\n setWidth(containerWidth || 0);\n }, []);\n // Keep the reference of ResizeObserver in the state, as it should live through renders\n const [resizeObserver] = React.useState(canUseDOM() ? new ResizeObserver(handleResize) : undefined);\n const measureElementRef = React.useCallback((el)=>{\n if (!targetDocument || !resizeObserver) {\n return;\n }\n // cleanup previous container\n if (container.current) {\n resizeObserver.unobserve(container.current);\n container.current.remove();\n }\n if (el) {\n container.current =
|
|
1
|
+
{"version":3,"sources":["useMeasureElement.js"],"sourcesContent":["import { canUseDOM } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\n/**\n * Provides a way of reporting element width.\n * Returns\n * `width` - current element width (0 by default),\n * `measureElementRef` - a ref function to be passed as `ref` to the element you want to measure\n */ export function useMeasureElement() {\n const [width, setWidth] = React.useState(0);\n const container = React.useRef(undefined);\n const { targetDocument } = useFluent();\n // the handler for resize observer\n const handleResize = React.useCallback(()=>{\n var _container_current;\n const containerWidth = (_container_current = container.current) === null || _container_current === void 0 ? void 0 : _container_current.getBoundingClientRect().width;\n setWidth(containerWidth || 0);\n }, []);\n // Keep the reference of ResizeObserver in the state, as it should live through renders\n const [resizeObserver] = React.useState(canUseDOM() ? new ResizeObserver(handleResize) : undefined);\n const measureElementRef = React.useCallback((el)=>{\n if (!targetDocument || !resizeObserver) {\n return;\n }\n // cleanup previous container\n if (container.current) {\n resizeObserver.unobserve(container.current);\n container.current.remove();\n }\n if (el === null || el === void 0 ? void 0 : el.parentElement) {\n container.current = el.parentElement;\n resizeObserver.observe(container.current);\n handleResize();\n }\n }, [\n targetDocument,\n resizeObserver,\n handleResize\n ]);\n React.useEffect(()=>{\n return ()=>resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect();\n }, [\n resizeObserver\n ]);\n return {\n width,\n measureElementRef\n };\n}\n"],"names":["useMeasureElement","width","setWidth","React","useState","container","useRef","undefined","targetDocument","useFluent","handleResize","useCallback","_container_current","containerWidth","current","getBoundingClientRect","resizeObserver","canUseDOM","ResizeObserver","measureElementRef","el","unobserve","remove","parentElement","observe","useEffect","disconnect"],"mappings":";;;;+BAQoBA;;;eAAAA;;;;gCARM;iEACH;qCACyB;AAMrC,SAASA;IAChB,MAAM,CAACC,OAAOC,SAAS,GAAGC,OAAMC,QAAQ,CAAC;IACzC,MAAMC,YAAYF,OAAMG,MAAM,CAACC;IAC/B,MAAM,EAAEC,cAAc,EAAE,GAAGC,IAAAA,uCAAS;IACpC,kCAAkC;IAClC,MAAMC,eAAeP,OAAMQ,WAAW,CAAC;QACnC,IAAIC;QACJ,MAAMC,iBAAiB,AAACD,CAAAA,qBAAqBP,UAAUS,OAAO,AAAD,MAAO,QAAQF,uBAAuB,KAAK,IAAI,KAAK,IAAIA,mBAAmBG,qBAAqB,GAAGd,KAAK;QACrKC,SAASW,kBAAkB;IAC/B,GAAG,EAAE;IACL,uFAAuF;IACvF,MAAM,CAACG,eAAe,GAAGb,OAAMC,QAAQ,CAACa,IAAAA,yBAAS,MAAK,IAAIC,eAAeR,gBAAgBH;IACzF,MAAMY,oBAAoBhB,OAAMQ,WAAW,CAAC,CAACS;QACzC,IAAI,CAACZ,kBAAkB,CAACQ,gBAAgB;YACpC;QACJ;QACA,6BAA6B;QAC7B,IAAIX,UAAUS,OAAO,EAAE;YACnBE,eAAeK,SAAS,CAAChB,UAAUS,OAAO;YAC1CT,UAAUS,OAAO,CAACQ,MAAM;QAC5B;QACA,IAAIF,OAAO,QAAQA,OAAO,KAAK,IAAI,KAAK,IAAIA,GAAGG,aAAa,EAAE;YAC1DlB,UAAUS,OAAO,GAAGM,GAAGG,aAAa;YACpCP,eAAeQ,OAAO,CAACnB,UAAUS,OAAO;YACxCJ;QACJ;IACJ,GAAG;QACCF;QACAQ;QACAN;KACH;IACDP,OAAMsB,SAAS,CAAC;QACZ,OAAO,IAAIT,mBAAmB,QAAQA,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAeU,UAAU;IACxG,GAAG;QACCV;KACH;IACD,OAAO;QACHf;QACAkB;IACJ;AACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-table",
|
|
3
|
-
"version": "9.10.
|
|
3
|
+
"version": "9.10.2",
|
|
4
4
|
"description": "React components for building web experiences",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@fluentui/keyboard-keys": "^9.0.6",
|
|
39
|
-
"@fluentui/react-aria": "^9.3.
|
|
40
|
-
"@fluentui/react-avatar": "^9.5.
|
|
41
|
-
"@fluentui/react-checkbox": "^9.1.
|
|
42
|
-
"@fluentui/react-context-selector": "^9.1.
|
|
39
|
+
"@fluentui/react-aria": "^9.3.40",
|
|
40
|
+
"@fluentui/react-avatar": "^9.5.37",
|
|
41
|
+
"@fluentui/react-checkbox": "^9.1.47",
|
|
42
|
+
"@fluentui/react-context-selector": "^9.1.38",
|
|
43
43
|
"@fluentui/react-icons": "^2.0.217",
|
|
44
|
-
"@fluentui/react-radio": "^9.1.
|
|
44
|
+
"@fluentui/react-radio": "^9.1.47",
|
|
45
45
|
"@fluentui/react-shared-contexts": "^9.9.2",
|
|
46
|
-
"@fluentui/react-tabster": "^9.13.
|
|
46
|
+
"@fluentui/react-tabster": "^9.13.4",
|
|
47
47
|
"@fluentui/react-theme": "^9.1.14",
|
|
48
|
-
"@fluentui/react-utilities": "^9.
|
|
49
|
-
"@fluentui/react-jsx-runtime": "^9.0.
|
|
48
|
+
"@fluentui/react-utilities": "^9.14.1",
|
|
49
|
+
"@fluentui/react-jsx-runtime": "^9.0.14",
|
|
50
50
|
"@griffel/react": "^1.5.14",
|
|
51
51
|
"@swc/helpers": "^0.5.1"
|
|
52
52
|
},
|