@fluentui/react-utilities 0.0.0-nightly-20220503-0421.1 → 0.0.0-nightly-20220506-0417.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +49 -5
- package/CHANGELOG.md +95 -76
- package/lib/utils/getNativeElementProps.js +3 -2
- package/lib/utils/getNativeElementProps.js.map +1 -1
- package/lib/utils/properties.d.ts +6 -0
- package/lib/utils/properties.js +8 -0
- package/lib/utils/properties.js.map +1 -1
- package/lib-commonjs/utils/getNativeElementProps.js +2 -1
- package/lib-commonjs/utils/getNativeElementProps.js.map +1 -1
- package/lib-commonjs/utils/properties.d.ts +6 -0
- package/lib-commonjs/utils/properties.js +9 -1
- package/lib-commonjs/utils/properties.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.json
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
"name": "@fluentui/react-utilities",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
6
|
-
"tag": "@fluentui/react-utilities_v0.0.0-nightly-
|
7
|
-
"version": "0.0.0-nightly-
|
5
|
+
"date": "Fri, 06 May 2022 04:27:25 GMT",
|
6
|
+
"tag": "@fluentui/react-utilities_v0.0.0-nightly-20220506-0417.1",
|
7
|
+
"version": "0.0.0-nightly-20220506-0417.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
@@ -16,8 +16,52 @@
|
|
16
16
|
{
|
17
17
|
"author": "beachball",
|
18
18
|
"package": "@fluentui/react-utilities",
|
19
|
-
"comment": "Bump @fluentui/keyboard-keys to v0.0.0-nightly-
|
20
|
-
"commit": "
|
19
|
+
"comment": "Bump @fluentui/keyboard-keys to v0.0.0-nightly-20220506-0417.1",
|
20
|
+
"commit": "1dbdfe3544ed01dff3baaf5d6b96d3cc8ec5e559"
|
21
|
+
}
|
22
|
+
]
|
23
|
+
}
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"date": "Thu, 05 May 2022 18:26:28 GMT",
|
27
|
+
"tag": "@fluentui/react-utilities_v9.0.0-rc.8",
|
28
|
+
"version": "9.0.0-rc.8",
|
29
|
+
"comments": {
|
30
|
+
"prerelease": [
|
31
|
+
{
|
32
|
+
"author": "bsunderhus@microsoft.com",
|
33
|
+
"package": "@fluentui/react-utilities",
|
34
|
+
"commit": "378e25474622fdeb0891bb3c0a644e88098d8c3f",
|
35
|
+
"comment": "feat: add time element on nativeElementMap"
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"author": "beachball",
|
39
|
+
"package": "@fluentui/react-utilities",
|
40
|
+
"comment": "Bump @fluentui/keyboard-keys to v9.0.0-rc.6",
|
41
|
+
"commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
|
42
|
+
}
|
43
|
+
]
|
44
|
+
}
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"date": "Wed, 04 May 2022 13:26:36 GMT",
|
48
|
+
"tag": "@fluentui/react-utilities_v9.0.0-rc.7",
|
49
|
+
"version": "9.0.0-rc.7",
|
50
|
+
"comments": {
|
51
|
+
"none": [
|
52
|
+
{
|
53
|
+
"author": "tristan.watanabe@gmail.com",
|
54
|
+
"package": "@fluentui/react-utilities",
|
55
|
+
"commit": "8ec3d32fa26e6cf803ab9d18671fd51ba06c74ab",
|
56
|
+
"comment": "react-utilities: Move to new common folder."
|
57
|
+
}
|
58
|
+
],
|
59
|
+
"prerelease": [
|
60
|
+
{
|
61
|
+
"author": "beachball",
|
62
|
+
"package": "@fluentui/react-utilities",
|
63
|
+
"comment": "Bump @fluentui/keyboard-keys to v9.0.0-rc.5",
|
64
|
+
"commit": "65f94192ed3b2cde7e52b9c7e12d6f38b81965dd"
|
21
65
|
}
|
22
66
|
]
|
23
67
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,22 +1,41 @@
|
|
1
1
|
# Change Log - @fluentui/react-utilities
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Fri, 06 May 2022 04:27:25 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
-
## [0.0.0-nightly-
|
7
|
+
## [0.0.0-nightly-20220506-0417.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v0.0.0-nightly-20220506-0417.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-rc.
|
9
|
+
Fri, 06 May 2022 04:27:25 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-rc.8..@fluentui/react-utilities_v0.0.0-nightly-20220506-0417.1)
|
11
11
|
|
12
12
|
### Changes
|
13
13
|
|
14
14
|
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by email not defined)
|
15
|
-
- Bump @fluentui/keyboard-keys to v0.0.0-nightly-
|
15
|
+
- Bump @fluentui/keyboard-keys to v0.0.0-nightly-20220506-0417.1 ([commit](https://github.com/microsoft/fluentui/commit/1dbdfe3544ed01dff3baaf5d6b96d3cc8ec5e559) by beachball)
|
16
|
+
|
17
|
+
## [9.0.0-rc.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-rc.8)
|
18
|
+
|
19
|
+
Thu, 05 May 2022 18:26:28 GMT
|
20
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-rc.7..@fluentui/react-utilities_v9.0.0-rc.8)
|
21
|
+
|
22
|
+
### Changes
|
23
|
+
|
24
|
+
- feat: add time element on nativeElementMap ([PR #22848](https://github.com/microsoft/fluentui/pull/22848) by bsunderhus@microsoft.com)
|
25
|
+
- Bump @fluentui/keyboard-keys to v9.0.0-rc.6 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
|
26
|
+
|
27
|
+
## [9.0.0-rc.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-rc.7)
|
28
|
+
|
29
|
+
Wed, 04 May 2022 13:26:36 GMT
|
30
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-rc.6..@fluentui/react-utilities_v9.0.0-rc.7)
|
31
|
+
|
32
|
+
### Changes
|
33
|
+
|
34
|
+
- Bump @fluentui/keyboard-keys to v9.0.0-rc.5 ([PR #22786](https://github.com/microsoft/fluentui/pull/22786) by beachball)
|
16
35
|
|
17
36
|
## [9.0.0-rc.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-rc.6)
|
18
37
|
|
19
|
-
Tue, 19 Apr 2022 19:17:05 GMT
|
38
|
+
Tue, 19 Apr 2022 19:17:05 GMT
|
20
39
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-rc.5..@fluentui/react-utilities_v9.0.0-rc.6)
|
21
40
|
|
22
41
|
### Changes
|
@@ -25,7 +44,7 @@ Tue, 19 Apr 2022 19:17:05 GMT
|
|
25
44
|
|
26
45
|
## [9.0.0-rc.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-rc.5)
|
27
46
|
|
28
|
-
Fri, 04 Mar 2022 05:17:32 GMT
|
47
|
+
Fri, 04 Mar 2022 05:17:32 GMT
|
29
48
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-rc.4..@fluentui/react-utilities_v9.0.0-rc.5)
|
30
49
|
|
31
50
|
### Changes
|
@@ -37,7 +56,7 @@ Fri, 04 Mar 2022 05:17:32 GMT
|
|
37
56
|
|
38
57
|
## [9.0.0-rc.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-rc.4)
|
39
58
|
|
40
|
-
Tue, 01 Mar 2022 02:17:39 GMT
|
59
|
+
Tue, 01 Mar 2022 02:17:39 GMT
|
41
60
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-rc.3..@fluentui/react-utilities_v9.0.0-rc.4)
|
42
61
|
|
43
62
|
### Changes
|
@@ -47,7 +66,7 @@ Tue, 01 Mar 2022 02:17:39 GMT
|
|
47
66
|
|
48
67
|
## [9.0.0-rc.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-rc.3)
|
49
68
|
|
50
|
-
Fri, 18 Feb 2022 13:35:37 GMT
|
69
|
+
Fri, 18 Feb 2022 13:35:37 GMT
|
51
70
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-rc.1..@fluentui/react-utilities_v9.0.0-rc.3)
|
52
71
|
|
53
72
|
### Changes
|
@@ -57,7 +76,7 @@ Fri, 18 Feb 2022 13:35:37 GMT
|
|
57
76
|
|
58
77
|
## [9.0.0-rc.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-rc.1)
|
59
78
|
|
60
|
-
Thu, 10 Feb 2022 08:50:32 GMT
|
79
|
+
Thu, 10 Feb 2022 08:50:32 GMT
|
61
80
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-beta.4..@fluentui/react-utilities_v9.0.0-rc.1)
|
62
81
|
|
63
82
|
### Changes
|
@@ -77,7 +96,7 @@ Thu, 10 Feb 2022 08:50:32 GMT
|
|
77
96
|
|
78
97
|
## [9.0.0-beta.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-beta.4)
|
79
98
|
|
80
|
-
Thu, 25 Nov 2021 08:34:09 GMT
|
99
|
+
Thu, 25 Nov 2021 08:34:09 GMT
|
81
100
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-beta.3..@fluentui/react-utilities_v9.0.0-beta.4)
|
82
101
|
|
83
102
|
### Changes
|
@@ -86,7 +105,7 @@ Thu, 25 Nov 2021 08:34:09 GMT
|
|
86
105
|
|
87
106
|
## [9.0.0-beta.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-beta.3)
|
88
107
|
|
89
|
-
Fri, 12 Nov 2021 13:25:10 GMT
|
108
|
+
Fri, 12 Nov 2021 13:25:10 GMT
|
90
109
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-beta.2..@fluentui/react-utilities_v9.0.0-beta.3)
|
91
110
|
|
92
111
|
### Changes
|
@@ -95,7 +114,7 @@ Fri, 12 Nov 2021 13:25:10 GMT
|
|
95
114
|
|
96
115
|
## [9.0.0-beta.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-beta.2)
|
97
116
|
|
98
|
-
Wed, 27 Oct 2021 12:14:24 GMT
|
117
|
+
Wed, 27 Oct 2021 12:14:24 GMT
|
99
118
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-beta.1..@fluentui/react-utilities_v9.0.0-beta.2)
|
100
119
|
|
101
120
|
### Changes
|
@@ -105,7 +124,7 @@ Wed, 27 Oct 2021 12:14:24 GMT
|
|
105
124
|
|
106
125
|
## [9.0.0-beta.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-beta.1)
|
107
126
|
|
108
|
-
Wed, 06 Oct 2021 10:37:22 GMT
|
127
|
+
Wed, 06 Oct 2021 10:37:22 GMT
|
109
128
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.56..@fluentui/react-utilities_v9.0.0-beta.1)
|
110
129
|
|
111
130
|
### Changes
|
@@ -115,7 +134,7 @@ Wed, 06 Oct 2021 10:37:22 GMT
|
|
115
134
|
|
116
135
|
## [9.0.0-alpha.56](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.56)
|
117
136
|
|
118
|
-
Tue, 05 Oct 2021 09:28:07 GMT
|
137
|
+
Tue, 05 Oct 2021 09:28:07 GMT
|
119
138
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.55..@fluentui/react-utilities_v9.0.0-alpha.56)
|
120
139
|
|
121
140
|
### Changes
|
@@ -124,7 +143,7 @@ Tue, 05 Oct 2021 09:28:07 GMT
|
|
124
143
|
|
125
144
|
## [9.0.0-alpha.55](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.55)
|
126
145
|
|
127
|
-
Fri, 01 Oct 2021 14:13:08 GMT
|
146
|
+
Fri, 01 Oct 2021 14:13:08 GMT
|
128
147
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.53..@fluentui/react-utilities_v9.0.0-alpha.55)
|
129
148
|
|
130
149
|
### Changes
|
@@ -134,7 +153,7 @@ Fri, 01 Oct 2021 14:13:08 GMT
|
|
134
153
|
|
135
154
|
## [9.0.0-alpha.53](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.53)
|
136
155
|
|
137
|
-
Mon, 27 Sep 2021 08:06:00 GMT
|
156
|
+
Mon, 27 Sep 2021 08:06:00 GMT
|
138
157
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.52..@fluentui/react-utilities_v9.0.0-alpha.53)
|
139
158
|
|
140
159
|
### Changes
|
@@ -143,7 +162,7 @@ Mon, 27 Sep 2021 08:06:00 GMT
|
|
143
162
|
|
144
163
|
## [9.0.0-alpha.52](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.52)
|
145
164
|
|
146
|
-
Fri, 24 Sep 2021 09:17:17 GMT
|
165
|
+
Fri, 24 Sep 2021 09:17:17 GMT
|
147
166
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.51..@fluentui/react-utilities_v9.0.0-alpha.52)
|
148
167
|
|
149
168
|
### Changes
|
@@ -152,7 +171,7 @@ Fri, 24 Sep 2021 09:17:17 GMT
|
|
152
171
|
|
153
172
|
## [9.0.0-alpha.51](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.51)
|
154
173
|
|
155
|
-
Thu, 23 Sep 2021 08:21:34 GMT
|
174
|
+
Thu, 23 Sep 2021 08:21:34 GMT
|
156
175
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.50..@fluentui/react-utilities_v9.0.0-alpha.51)
|
157
176
|
|
158
177
|
### Changes
|
@@ -161,7 +180,7 @@ Thu, 23 Sep 2021 08:21:34 GMT
|
|
161
180
|
|
162
181
|
## [9.0.0-alpha.50](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.50)
|
163
182
|
|
164
|
-
Wed, 22 Sep 2021 10:10:07 GMT
|
183
|
+
Wed, 22 Sep 2021 10:10:07 GMT
|
165
184
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.49..@fluentui/react-utilities_v9.0.0-alpha.50)
|
166
185
|
|
167
186
|
### Changes
|
@@ -170,7 +189,7 @@ Wed, 22 Sep 2021 10:10:07 GMT
|
|
170
189
|
|
171
190
|
## [9.0.0-alpha.49](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.49)
|
172
191
|
|
173
|
-
Fri, 17 Sep 2021 07:35:26 GMT
|
192
|
+
Fri, 17 Sep 2021 07:35:26 GMT
|
174
193
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.48..@fluentui/react-utilities_v9.0.0-alpha.49)
|
175
194
|
|
176
195
|
### Changes
|
@@ -180,7 +199,7 @@ Fri, 17 Sep 2021 07:35:26 GMT
|
|
180
199
|
|
181
200
|
## [9.0.0-alpha.48](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.48)
|
182
201
|
|
183
|
-
Thu, 16 Sep 2021 07:38:39 GMT
|
202
|
+
Thu, 16 Sep 2021 07:38:39 GMT
|
184
203
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.47..@fluentui/react-utilities_v9.0.0-alpha.48)
|
185
204
|
|
186
205
|
### Changes
|
@@ -189,7 +208,7 @@ Thu, 16 Sep 2021 07:38:39 GMT
|
|
189
208
|
|
190
209
|
## [9.0.0-alpha.47](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.47)
|
191
210
|
|
192
|
-
Tue, 14 Sep 2021 20:09:02 GMT
|
211
|
+
Tue, 14 Sep 2021 20:09:02 GMT
|
193
212
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.46..@fluentui/react-utilities_v9.0.0-alpha.47)
|
194
213
|
|
195
214
|
### Changes
|
@@ -198,7 +217,7 @@ Tue, 14 Sep 2021 20:09:02 GMT
|
|
198
217
|
|
199
218
|
## [9.0.0-alpha.46](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.46)
|
200
219
|
|
201
|
-
Fri, 10 Sep 2021 16:31:53 GMT
|
220
|
+
Fri, 10 Sep 2021 16:31:53 GMT
|
202
221
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.45..@fluentui/react-utilities_v9.0.0-alpha.46)
|
203
222
|
|
204
223
|
### Changes
|
@@ -207,7 +226,7 @@ Fri, 10 Sep 2021 16:31:53 GMT
|
|
207
226
|
|
208
227
|
## [9.0.0-alpha.45](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.45)
|
209
228
|
|
210
|
-
Fri, 10 Sep 2021 07:39:51 GMT
|
229
|
+
Fri, 10 Sep 2021 07:39:51 GMT
|
211
230
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.44..@fluentui/react-utilities_v9.0.0-alpha.45)
|
212
231
|
|
213
232
|
### Changes
|
@@ -216,7 +235,7 @@ Fri, 10 Sep 2021 07:39:51 GMT
|
|
216
235
|
|
217
236
|
## [9.0.0-alpha.44](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.44)
|
218
237
|
|
219
|
-
Mon, 06 Sep 2021 07:34:53 GMT
|
238
|
+
Mon, 06 Sep 2021 07:34:53 GMT
|
220
239
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.43..@fluentui/react-utilities_v9.0.0-alpha.44)
|
221
240
|
|
222
241
|
### Changes
|
@@ -225,7 +244,7 @@ Mon, 06 Sep 2021 07:34:53 GMT
|
|
225
244
|
|
226
245
|
## [9.0.0-alpha.43](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.43)
|
227
246
|
|
228
|
-
Wed, 01 Sep 2021 07:39:56 GMT
|
247
|
+
Wed, 01 Sep 2021 07:39:56 GMT
|
229
248
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.42..@fluentui/react-utilities_v9.0.0-alpha.43)
|
230
249
|
|
231
250
|
### Changes
|
@@ -234,7 +253,7 @@ Wed, 01 Sep 2021 07:39:56 GMT
|
|
234
253
|
|
235
254
|
## [9.0.0-alpha.42](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.42)
|
236
255
|
|
237
|
-
Tue, 31 Aug 2021 07:37:47 GMT
|
256
|
+
Tue, 31 Aug 2021 07:37:47 GMT
|
238
257
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.41..@fluentui/react-utilities_v9.0.0-alpha.42)
|
239
258
|
|
240
259
|
### Changes
|
@@ -243,7 +262,7 @@ Tue, 31 Aug 2021 07:37:47 GMT
|
|
243
262
|
|
244
263
|
## [9.0.0-alpha.41](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.41)
|
245
264
|
|
246
|
-
Tue, 24 Aug 2021 07:34:48 GMT
|
265
|
+
Tue, 24 Aug 2021 07:34:48 GMT
|
247
266
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.40..@fluentui/react-utilities_v9.0.0-alpha.41)
|
248
267
|
|
249
268
|
### Changes
|
@@ -252,7 +271,7 @@ Tue, 24 Aug 2021 07:34:48 GMT
|
|
252
271
|
|
253
272
|
## [9.0.0-alpha.40](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.40)
|
254
273
|
|
255
|
-
Fri, 20 Aug 2021 07:37:28 GMT
|
274
|
+
Fri, 20 Aug 2021 07:37:28 GMT
|
256
275
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.39..@fluentui/react-utilities_v9.0.0-alpha.40)
|
257
276
|
|
258
277
|
### Changes
|
@@ -261,7 +280,7 @@ Fri, 20 Aug 2021 07:37:28 GMT
|
|
261
280
|
|
262
281
|
## [9.0.0-alpha.39](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.39)
|
263
282
|
|
264
|
-
Thu, 19 Aug 2021 07:41:35 GMT
|
283
|
+
Thu, 19 Aug 2021 07:41:35 GMT
|
265
284
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.38..@fluentui/react-utilities_v9.0.0-alpha.39)
|
266
285
|
|
267
286
|
### Changes
|
@@ -270,7 +289,7 @@ Thu, 19 Aug 2021 07:41:35 GMT
|
|
270
289
|
|
271
290
|
## [9.0.0-alpha.38](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.38)
|
272
291
|
|
273
|
-
Fri, 06 Aug 2021 07:35:14 GMT
|
292
|
+
Fri, 06 Aug 2021 07:35:14 GMT
|
274
293
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.37..@fluentui/react-utilities_v9.0.0-alpha.38)
|
275
294
|
|
276
295
|
### Changes
|
@@ -279,7 +298,7 @@ Fri, 06 Aug 2021 07:35:14 GMT
|
|
279
298
|
|
280
299
|
## [9.0.0-alpha.37](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.37)
|
281
300
|
|
282
|
-
Tue, 03 Aug 2021 07:39:30 GMT
|
301
|
+
Tue, 03 Aug 2021 07:39:30 GMT
|
283
302
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.36..@fluentui/react-utilities_v9.0.0-alpha.37)
|
284
303
|
|
285
304
|
### Patches
|
@@ -294,7 +313,7 @@ Tue, 03 Aug 2021 07:39:30 GMT
|
|
294
313
|
|
295
314
|
## [9.0.0-alpha.36](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.36)
|
296
315
|
|
297
|
-
Mon, 02 Aug 2021 07:36:20 GMT
|
316
|
+
Mon, 02 Aug 2021 07:36:20 GMT
|
298
317
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.35..@fluentui/react-utilities_v9.0.0-alpha.36)
|
299
318
|
|
300
319
|
### Changes
|
@@ -303,7 +322,7 @@ Mon, 02 Aug 2021 07:36:20 GMT
|
|
303
322
|
|
304
323
|
## [9.0.0-alpha.35](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.35)
|
305
324
|
|
306
|
-
Fri, 23 Jul 2021 07:38:19 GMT
|
325
|
+
Fri, 23 Jul 2021 07:38:19 GMT
|
307
326
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.34..@fluentui/react-utilities_v9.0.0-alpha.35)
|
308
327
|
|
309
328
|
### Changes
|
@@ -312,7 +331,7 @@ Fri, 23 Jul 2021 07:38:19 GMT
|
|
312
331
|
|
313
332
|
## [9.0.0-alpha.34](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.34)
|
314
333
|
|
315
|
-
Thu, 22 Jul 2021 07:36:55 GMT
|
334
|
+
Thu, 22 Jul 2021 07:36:55 GMT
|
316
335
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.33..@fluentui/react-utilities_v9.0.0-alpha.34)
|
317
336
|
|
318
337
|
### Changes
|
@@ -321,7 +340,7 @@ Thu, 22 Jul 2021 07:36:55 GMT
|
|
321
340
|
|
322
341
|
## [9.0.0-alpha.33](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.33)
|
323
342
|
|
324
|
-
Thu, 15 Jul 2021 07:36:18 GMT
|
343
|
+
Thu, 15 Jul 2021 07:36:18 GMT
|
325
344
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.32..@fluentui/react-utilities_v9.0.0-alpha.33)
|
326
345
|
|
327
346
|
### Changes
|
@@ -331,7 +350,7 @@ Thu, 15 Jul 2021 07:36:18 GMT
|
|
331
350
|
|
332
351
|
## [9.0.0-alpha.32](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.32)
|
333
352
|
|
334
|
-
Fri, 09 Jul 2021 07:39:31 GMT
|
353
|
+
Fri, 09 Jul 2021 07:39:31 GMT
|
335
354
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.31..@fluentui/react-utilities_v9.0.0-alpha.32)
|
336
355
|
|
337
356
|
### Patches
|
@@ -342,7 +361,7 @@ Fri, 09 Jul 2021 07:39:31 GMT
|
|
342
361
|
|
343
362
|
## [9.0.0-alpha.31](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.31)
|
344
363
|
|
345
|
-
Fri, 02 Jul 2021 23:15:55 GMT
|
364
|
+
Fri, 02 Jul 2021 23:15:55 GMT
|
346
365
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.30..@fluentui/react-utilities_v9.0.0-alpha.31)
|
347
366
|
|
348
367
|
### Changes
|
@@ -352,7 +371,7 @@ Fri, 02 Jul 2021 23:15:55 GMT
|
|
352
371
|
|
353
372
|
## [9.0.0-alpha.30](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.30)
|
354
373
|
|
355
|
-
Fri, 02 Jul 2021 07:37:06 GMT
|
374
|
+
Fri, 02 Jul 2021 07:37:06 GMT
|
356
375
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.29..@fluentui/react-utilities_v9.0.0-alpha.30)
|
357
376
|
|
358
377
|
### Changes
|
@@ -361,7 +380,7 @@ Fri, 02 Jul 2021 07:37:06 GMT
|
|
361
380
|
|
362
381
|
## [9.0.0-alpha.29](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.29)
|
363
382
|
|
364
|
-
Tue, 15 Jun 2021 07:40:20 GMT
|
383
|
+
Tue, 15 Jun 2021 07:40:20 GMT
|
365
384
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.28..@fluentui/react-utilities_v9.0.0-alpha.29)
|
366
385
|
|
367
386
|
### Changes
|
@@ -370,7 +389,7 @@ Tue, 15 Jun 2021 07:40:20 GMT
|
|
370
389
|
|
371
390
|
## [9.0.0-alpha.28](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.28)
|
372
391
|
|
373
|
-
Mon, 07 Jun 2021 07:38:15 GMT
|
392
|
+
Mon, 07 Jun 2021 07:38:15 GMT
|
374
393
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.27..@fluentui/react-utilities_v9.0.0-alpha.28)
|
375
394
|
|
376
395
|
### Patches
|
@@ -381,7 +400,7 @@ Mon, 07 Jun 2021 07:38:15 GMT
|
|
381
400
|
|
382
401
|
## [9.0.0-alpha.27](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.27)
|
383
402
|
|
384
|
-
Fri, 04 Jun 2021 07:37:23 GMT
|
403
|
+
Fri, 04 Jun 2021 07:37:23 GMT
|
385
404
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.26..@fluentui/react-utilities_v9.0.0-alpha.27)
|
386
405
|
|
387
406
|
### Changes
|
@@ -390,7 +409,7 @@ Fri, 04 Jun 2021 07:37:23 GMT
|
|
390
409
|
|
391
410
|
## [9.0.0-alpha.26](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.26)
|
392
411
|
|
393
|
-
Fri, 28 May 2021 07:33:57 GMT
|
412
|
+
Fri, 28 May 2021 07:33:57 GMT
|
394
413
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.25..@fluentui/react-utilities_v9.0.0-alpha.26)
|
395
414
|
|
396
415
|
### Changes
|
@@ -399,7 +418,7 @@ Fri, 28 May 2021 07:33:57 GMT
|
|
399
418
|
|
400
419
|
## [9.0.0-alpha.25](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.25)
|
401
420
|
|
402
|
-
Wed, 26 May 2021 07:35:43 GMT
|
421
|
+
Wed, 26 May 2021 07:35:43 GMT
|
403
422
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.24..@fluentui/react-utilities_v9.0.0-alpha.25)
|
404
423
|
|
405
424
|
### Changes
|
@@ -408,7 +427,7 @@ Wed, 26 May 2021 07:35:43 GMT
|
|
408
427
|
|
409
428
|
## [9.0.0-alpha.24](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.24)
|
410
429
|
|
411
|
-
Fri, 21 May 2021 07:34:54 GMT
|
430
|
+
Fri, 21 May 2021 07:34:54 GMT
|
412
431
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.23..@fluentui/react-utilities_v9.0.0-alpha.24)
|
413
432
|
|
414
433
|
### Changes
|
@@ -417,7 +436,7 @@ Fri, 21 May 2021 07:34:54 GMT
|
|
417
436
|
|
418
437
|
## [9.0.0-alpha.23](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.23)
|
419
438
|
|
420
|
-
Thu, 20 May 2021 07:41:54 GMT
|
439
|
+
Thu, 20 May 2021 07:41:54 GMT
|
421
440
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.22..@fluentui/react-utilities_v9.0.0-alpha.23)
|
422
441
|
|
423
442
|
### Patches
|
@@ -432,7 +451,7 @@ Thu, 20 May 2021 07:41:54 GMT
|
|
432
451
|
|
433
452
|
## [9.0.0-alpha.22](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.22)
|
434
453
|
|
435
|
-
Wed, 19 May 2021 07:34:20 GMT
|
454
|
+
Wed, 19 May 2021 07:34:20 GMT
|
436
455
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.21..@fluentui/react-utilities_v9.0.0-alpha.22)
|
437
456
|
|
438
457
|
### Changes
|
@@ -442,7 +461,7 @@ Wed, 19 May 2021 07:34:20 GMT
|
|
442
461
|
|
443
462
|
## [9.0.0-alpha.21](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.21)
|
444
463
|
|
445
|
-
Mon, 03 May 2021 07:45:19 GMT
|
464
|
+
Mon, 03 May 2021 07:45:19 GMT
|
446
465
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.20..@fluentui/react-utilities_v9.0.0-alpha.21)
|
447
466
|
|
448
467
|
### Changes
|
@@ -451,7 +470,7 @@ Mon, 03 May 2021 07:45:19 GMT
|
|
451
470
|
|
452
471
|
## [9.0.0-alpha.20](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.20)
|
453
472
|
|
454
|
-
Fri, 30 Apr 2021 07:42:23 GMT
|
473
|
+
Fri, 30 Apr 2021 07:42:23 GMT
|
455
474
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.19..@fluentui/react-utilities_v9.0.0-alpha.20)
|
456
475
|
|
457
476
|
### Patches
|
@@ -467,7 +486,7 @@ Fri, 30 Apr 2021 07:42:23 GMT
|
|
467
486
|
|
468
487
|
## [9.0.0-alpha.19](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.19)
|
469
488
|
|
470
|
-
Fri, 23 Apr 2021 07:37:10 GMT
|
489
|
+
Fri, 23 Apr 2021 07:37:10 GMT
|
471
490
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.18..@fluentui/react-utilities_v9.0.0-alpha.19)
|
472
491
|
|
473
492
|
### Patches
|
@@ -478,7 +497,7 @@ Fri, 23 Apr 2021 07:37:10 GMT
|
|
478
497
|
|
479
498
|
## [9.0.0-alpha.18](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.18)
|
480
499
|
|
481
|
-
Thu, 22 Apr 2021 07:33:28 GMT
|
500
|
+
Thu, 22 Apr 2021 07:33:28 GMT
|
482
501
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.17..@fluentui/react-utilities_v9.0.0-alpha.18)
|
483
502
|
|
484
503
|
### Changes
|
@@ -488,7 +507,7 @@ Thu, 22 Apr 2021 07:33:28 GMT
|
|
488
507
|
|
489
508
|
## [9.0.0-alpha.17](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.17)
|
490
509
|
|
491
|
-
Wed, 21 Apr 2021 07:31:50 GMT
|
510
|
+
Wed, 21 Apr 2021 07:31:50 GMT
|
492
511
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.16..@fluentui/react-utilities_v9.0.0-alpha.17)
|
493
512
|
|
494
513
|
### Changes
|
@@ -497,7 +516,7 @@ Wed, 21 Apr 2021 07:31:50 GMT
|
|
497
516
|
|
498
517
|
## [9.0.0-alpha.16](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.16)
|
499
518
|
|
500
|
-
Fri, 16 Apr 2021 18:08:21 GMT
|
519
|
+
Fri, 16 Apr 2021 18:08:21 GMT
|
501
520
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.15..@fluentui/react-utilities_v9.0.0-alpha.16)
|
502
521
|
|
503
522
|
### Changes
|
@@ -506,7 +525,7 @@ Fri, 16 Apr 2021 18:08:21 GMT
|
|
506
525
|
|
507
526
|
## [9.0.0-alpha.15](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.15)
|
508
527
|
|
509
|
-
Thu, 01 Apr 2021 20:13:37 GMT
|
528
|
+
Thu, 01 Apr 2021 20:13:37 GMT
|
510
529
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.14..@fluentui/react-utilities_v9.0.0-alpha.15)
|
511
530
|
|
512
531
|
### Changes
|
@@ -515,7 +534,7 @@ Thu, 01 Apr 2021 20:13:37 GMT
|
|
515
534
|
|
516
535
|
## [9.0.0-alpha.14](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.14)
|
517
536
|
|
518
|
-
Wed, 31 Mar 2021 00:53:43 GMT
|
537
|
+
Wed, 31 Mar 2021 00:53:43 GMT
|
519
538
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.13..@fluentui/react-utilities_v9.0.0-alpha.14)
|
520
539
|
|
521
540
|
### Patches
|
@@ -531,7 +550,7 @@ Wed, 31 Mar 2021 00:53:43 GMT
|
|
531
550
|
|
532
551
|
## [9.0.0-alpha.13](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.13)
|
533
552
|
|
534
|
-
Tue, 30 Mar 2021 07:34:45 GMT
|
553
|
+
Tue, 30 Mar 2021 07:34:45 GMT
|
535
554
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.12..@fluentui/react-utilities_v9.0.0-alpha.13)
|
536
555
|
|
537
556
|
### Changes
|
@@ -540,7 +559,7 @@ Tue, 30 Mar 2021 07:34:45 GMT
|
|
540
559
|
|
541
560
|
## [9.0.0-alpha.12](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.12)
|
542
561
|
|
543
|
-
Fri, 26 Mar 2021 07:32:34 GMT
|
562
|
+
Fri, 26 Mar 2021 07:32:34 GMT
|
544
563
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.11..@fluentui/react-utilities_v9.0.0-alpha.12)
|
545
564
|
|
546
565
|
### Changes
|
@@ -549,7 +568,7 @@ Fri, 26 Mar 2021 07:32:34 GMT
|
|
549
568
|
|
550
569
|
## [9.0.0-alpha.11](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.11)
|
551
570
|
|
552
|
-
Thu, 25 Mar 2021 07:33:24 GMT
|
571
|
+
Thu, 25 Mar 2021 07:33:24 GMT
|
553
572
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.10..@fluentui/react-utilities_v9.0.0-alpha.11)
|
554
573
|
|
555
574
|
### Changes
|
@@ -558,7 +577,7 @@ Thu, 25 Mar 2021 07:33:24 GMT
|
|
558
577
|
|
559
578
|
## [9.0.0-alpha.10](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.10)
|
560
579
|
|
561
|
-
Tue, 23 Mar 2021 07:31:43 GMT
|
580
|
+
Tue, 23 Mar 2021 07:31:43 GMT
|
562
581
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.9..@fluentui/react-utilities_v9.0.0-alpha.10)
|
563
582
|
|
564
583
|
### Changes
|
@@ -567,7 +586,7 @@ Tue, 23 Mar 2021 07:31:43 GMT
|
|
567
586
|
|
568
587
|
## [9.0.0-alpha.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.9)
|
569
588
|
|
570
|
-
Thu, 18 Mar 2021 20:15:34 GMT
|
589
|
+
Thu, 18 Mar 2021 20:15:34 GMT
|
571
590
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.8..@fluentui/react-utilities_v9.0.0-alpha.9)
|
572
591
|
|
573
592
|
### Changes
|
@@ -576,7 +595,7 @@ Thu, 18 Mar 2021 20:15:34 GMT
|
|
576
595
|
|
577
596
|
## [9.0.0-alpha.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.8)
|
578
597
|
|
579
|
-
Mon, 15 Mar 2021 07:36:20 GMT
|
598
|
+
Mon, 15 Mar 2021 07:36:20 GMT
|
580
599
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.7..@fluentui/react-utilities_v9.0.0-alpha.8)
|
581
600
|
|
582
601
|
### Changes
|
@@ -585,7 +604,7 @@ Mon, 15 Mar 2021 07:36:20 GMT
|
|
585
604
|
|
586
605
|
## [9.0.0-alpha.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.7)
|
587
606
|
|
588
|
-
Wed, 10 Mar 2021 07:34:39 GMT
|
607
|
+
Wed, 10 Mar 2021 07:34:39 GMT
|
589
608
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.6..@fluentui/react-utilities_v9.0.0-alpha.7)
|
590
609
|
|
591
610
|
### Changes
|
@@ -594,7 +613,7 @@ Wed, 10 Mar 2021 07:34:39 GMT
|
|
594
613
|
|
595
614
|
## [9.0.0-alpha.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.6)
|
596
615
|
|
597
|
-
Fri, 05 Mar 2021 20:30:59 GMT
|
616
|
+
Fri, 05 Mar 2021 20:30:59 GMT
|
598
617
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.5..@fluentui/react-utilities_v9.0.0-alpha.6)
|
599
618
|
|
600
619
|
### Changes
|
@@ -603,7 +622,7 @@ Fri, 05 Mar 2021 20:30:59 GMT
|
|
603
622
|
|
604
623
|
## [9.0.0-alpha.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.5)
|
605
624
|
|
606
|
-
Wed, 03 Mar 2021 00:10:09 GMT
|
625
|
+
Wed, 03 Mar 2021 00:10:09 GMT
|
607
626
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.4..@fluentui/react-utilities_v9.0.0-alpha.5)
|
608
627
|
|
609
628
|
### Patches
|
@@ -616,7 +635,7 @@ Wed, 03 Mar 2021 00:10:09 GMT
|
|
616
635
|
|
617
636
|
## [9.0.0-alpha.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.4)
|
618
637
|
|
619
|
-
Tue, 02 Mar 2021 07:24:27 GMT
|
638
|
+
Tue, 02 Mar 2021 07:24:27 GMT
|
620
639
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.3..@fluentui/react-utilities_v9.0.0-alpha.4)
|
621
640
|
|
622
641
|
### Changes
|
@@ -625,7 +644,7 @@ Tue, 02 Mar 2021 07:24:27 GMT
|
|
625
644
|
|
626
645
|
## [9.0.0-alpha.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.3)
|
627
646
|
|
628
|
-
Fri, 26 Feb 2021 01:16:27 GMT
|
647
|
+
Fri, 26 Feb 2021 01:16:27 GMT
|
629
648
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.2..@fluentui/react-utilities_v9.0.0-alpha.3)
|
630
649
|
|
631
650
|
### Patches
|
@@ -642,7 +661,7 @@ Fri, 26 Feb 2021 01:16:27 GMT
|
|
642
661
|
|
643
662
|
## [9.0.0-alpha.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.2)
|
644
663
|
|
645
|
-
Thu, 25 Feb 2021 01:15:27 GMT
|
664
|
+
Thu, 25 Feb 2021 01:15:27 GMT
|
646
665
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.1..@fluentui/react-utilities_v9.0.0-alpha.2)
|
647
666
|
|
648
667
|
### Changes
|
@@ -651,7 +670,7 @@ Thu, 25 Feb 2021 01:15:27 GMT
|
|
651
670
|
|
652
671
|
## [9.0.0-alpha.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.1)
|
653
672
|
|
654
|
-
Wed, 24 Feb 2021 00:05:29 GMT
|
673
|
+
Wed, 24 Feb 2021 00:05:29 GMT
|
655
674
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v0.4.0..@fluentui/react-utilities_v9.0.0-alpha.1)
|
656
675
|
|
657
676
|
### Changes
|
@@ -660,7 +679,7 @@ Wed, 24 Feb 2021 00:05:29 GMT
|
|
660
679
|
|
661
680
|
## [0.4.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v0.4.0)
|
662
681
|
|
663
|
-
Mon, 22 Feb 2021 12:26:22 GMT
|
682
|
+
Mon, 22 Feb 2021 12:26:22 GMT
|
664
683
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v0.3.1..@fluentui/react-utilities_v0.4.0)
|
665
684
|
|
666
685
|
### Minor changes
|
@@ -678,7 +697,7 @@ Mon, 22 Feb 2021 12:26:22 GMT
|
|
678
697
|
|
679
698
|
## [0.3.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v0.3.1)
|
680
699
|
|
681
|
-
Thu, 18 Feb 2021 19:38:50 GMT
|
700
|
+
Thu, 18 Feb 2021 19:38:50 GMT
|
682
701
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v0.3.0..@fluentui/react-utilities_v0.3.1)
|
683
702
|
|
684
703
|
### Patches
|
@@ -691,7 +710,7 @@ Thu, 18 Feb 2021 19:38:50 GMT
|
|
691
710
|
|
692
711
|
## [0.3.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v0.3.0)
|
693
712
|
|
694
|
-
Thu, 18 Feb 2021 12:27:34 GMT
|
713
|
+
Thu, 18 Feb 2021 12:27:34 GMT
|
695
714
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v0.2.4..@fluentui/react-utilities_v0.3.0)
|
696
715
|
|
697
716
|
### Minor changes
|
@@ -708,7 +727,7 @@ Thu, 18 Feb 2021 12:27:34 GMT
|
|
708
727
|
|
709
728
|
## [0.2.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v0.2.4)
|
710
729
|
|
711
|
-
Mon, 01 Feb 2021 12:23:48 GMT
|
730
|
+
Mon, 01 Feb 2021 12:23:48 GMT
|
712
731
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v0.2.4-4..@fluentui/react-utilities_v0.2.4)
|
713
732
|
|
714
733
|
### Patches
|
@@ -717,7 +736,7 @@ Mon, 01 Feb 2021 12:23:48 GMT
|
|
717
736
|
|
718
737
|
## [0.2.4-4](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v0.2.4-4)
|
719
738
|
|
720
|
-
Thu, 28 Jan 2021 12:25:56 GMT
|
739
|
+
Thu, 28 Jan 2021 12:25:56 GMT
|
721
740
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v0.2.4-3..@fluentui/react-utilities_v0.2.4-4)
|
722
741
|
|
723
742
|
### Changes
|
@@ -726,7 +745,7 @@ Thu, 28 Jan 2021 12:25:56 GMT
|
|
726
745
|
|
727
746
|
## [0.2.4-3](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v0.2.4-3)
|
728
747
|
|
729
|
-
Thu, 21 Jan 2021 12:36:12 GMT
|
748
|
+
Thu, 21 Jan 2021 12:36:12 GMT
|
730
749
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v0.2.3..@fluentui/react-utilities_v0.2.4-3)
|
731
750
|
|
732
751
|
### Changes
|
@@ -735,7 +754,7 @@ Thu, 21 Jan 2021 12:36:12 GMT
|
|
735
754
|
|
736
755
|
## [0.2.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v0.2.3)
|
737
756
|
|
738
|
-
Fri, 23 Oct 2020 03:26:15 GMT
|
757
|
+
Fri, 23 Oct 2020 03:26:15 GMT
|
739
758
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v0.2.2..@fluentui/react-utilities_v0.2.3)
|
740
759
|
|
741
760
|
### Patches
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { labelProperties, audioProperties, videoProperties, olProperties, liProperties, anchorProperties, buttonProperties, inputProperties, textAreaProperties, selectProperties, optionProperties, tableProperties, trProperties, thProperties, tdProperties, colGroupProperties, colProperties, fieldsetProperties, formProperties, iframeProperties, imgProperties, htmlElementProperties, getNativeProps } from './properties';
|
1
|
+
import { labelProperties, audioProperties, videoProperties, olProperties, liProperties, anchorProperties, buttonProperties, inputProperties, textAreaProperties, selectProperties, optionProperties, tableProperties, trProperties, thProperties, tdProperties, colGroupProperties, colProperties, fieldsetProperties, formProperties, iframeProperties, imgProperties, htmlElementProperties, getNativeProps, timeProperties } from './properties';
|
2
2
|
const nativeElementMap = {
|
3
3
|
label: labelProperties,
|
4
4
|
audio: audioProperties,
|
@@ -20,7 +20,8 @@ const nativeElementMap = {
|
|
20
20
|
fieldset: fieldsetProperties,
|
21
21
|
form: formProperties,
|
22
22
|
iframe: iframeProperties,
|
23
|
-
img: imgProperties
|
23
|
+
img: imgProperties,
|
24
|
+
time: timeProperties
|
24
25
|
};
|
25
26
|
/**
|
26
27
|
* Given an element tagname and user props, filters the props to only allowed props for the given
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["utils/getNativeElementProps.ts"],"names":[],"mappings":"AACA,SACE,eADF,EAEE,eAFF,EAGE,eAHF,EAIE,YAJF,EAKE,YALF,EAME,gBANF,EAOE,gBAPF,EAQE,eARF,EASE,kBATF,EAUE,gBAVF,EAWE,gBAXF,EAYE,eAZF,EAaE,YAbF,EAcE,YAdF,EAeE,YAfF,EAgBE,kBAhBF,EAiBE,aAjBF,EAkBE,kBAlBF,EAmBE,cAnBF,EAoBE,gBApBF,EAqBE,aArBF,EAsBE,qBAtBF,EAuBE,cAvBF,
|
1
|
+
{"version":3,"sources":["utils/getNativeElementProps.ts"],"names":[],"mappings":"AACA,SACE,eADF,EAEE,eAFF,EAGE,eAHF,EAIE,YAJF,EAKE,YALF,EAME,gBANF,EAOE,gBAPF,EAQE,eARF,EASE,kBATF,EAUE,gBAVF,EAWE,gBAXF,EAYE,eAZF,EAaE,YAbF,EAcE,YAdF,EAeE,YAfF,EAgBE,kBAhBF,EAiBE,aAjBF,EAkBE,kBAlBF,EAmBE,cAnBF,EAoBE,gBApBF,EAqBE,aArBF,EAsBE,qBAtBF,EAuBE,cAvBF,EAwBE,cAxBF,QAyBO,cAzBP;AA2BA,MAAM,gBAAgB,GAA2C;AAC/D,EAAA,KAAK,EAAE,eADwD;AAE/D,EAAA,KAAK,EAAE,eAFwD;AAG/D,EAAA,KAAK,EAAE,eAHwD;AAI/D,EAAA,EAAE,EAAE,YAJ2D;AAK/D,EAAA,EAAE,EAAE,YAL2D;AAM/D,EAAA,CAAC,EAAE,gBAN4D;AAO/D,EAAA,MAAM,EAAE,gBAPuD;AAQ/D,EAAA,KAAK,EAAE,eARwD;AAS/D,EAAA,QAAQ,EAAE,kBATqD;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\n liProperties,\n anchorProperties,\n buttonProperties,\n inputProperties,\n textAreaProperties,\n selectProperties,\n optionProperties,\n tableProperties,\n trProperties,\n thProperties,\n tdProperties,\n colGroupProperties,\n colProperties,\n fieldsetProperties,\n formProperties,\n iframeProperties,\n imgProperties,\n htmlElementProperties,\n getNativeProps,\n timeProperties,\n} from './properties';\n\nconst nativeElementMap: Record<string, Record<string, number>> = {\n label: labelProperties,\n audio: audioProperties,\n video: videoProperties,\n ol: olProperties,\n li: liProperties,\n a: anchorProperties,\n button: buttonProperties,\n input: inputProperties,\n textarea: textAreaProperties,\n select: selectProperties,\n option: optionProperties,\n table: tableProperties,\n tr: trProperties,\n th: thProperties,\n td: tdProperties,\n colGroup: colGroupProperties,\n col: colProperties,\n fieldset: fieldsetProperties,\n form: formProperties,\n iframe: iframeProperties,\n img: imgProperties,\n time: timeProperties,\n};\n\n/**\n * Given an element tagname and user props, filters the props to only allowed props for the given\n * element type.\n * @param tagName - Tag name (e.g. \"div\")\n * @param props - Props object\n * @param excludedPropNames - List of props to disallow\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getNativeElementProps<TAttributes extends React.HTMLAttributes<any>>(\n tagName: string,\n props: {},\n excludedPropNames?: string[],\n): TAttributes {\n const allowedPropNames = (tagName && nativeElementMap[tagName]) || htmlElementProperties;\n allowedPropNames.as = 1;\n\n return getNativeProps(props, allowedPropNames, excludedPropNames);\n}\n\n/**\n * Splits the native props into ones that go to the `root` slot, and ones that go to the primary slot.\n *\n * This function is only for use with components that have a primary slot other than `root`.\n * Most components should use {@link getNativeElementProps} for their root slot if it is the primary slot.\n *\n * @returns An object containing the native props for the `root` and primary slots.\n */\nexport const getPartitionedNativeProps = <\n Props extends Pick<React.HTMLAttributes<HTMLElement>, 'style' | 'className'>,\n ExcludedPropKeys extends Extract<keyof Props, string> = never\n>({\n primarySlotTagName,\n props,\n excludedPropNames,\n}: {\n /** The primary slot's element type (e.g. 'div') */\n primarySlotTagName: keyof JSX.IntrinsicElements;\n\n /** The component's props object */\n props: Props;\n\n /** List of native props to exclude from the returned value */\n excludedPropNames?: ExcludedPropKeys[];\n}) => {\n return {\n root: { style: props.style, className: props.className },\n primary: getNativeElementProps<Omit<Props, ExcludedPropKeys>>(primarySlotTagName, props, [\n ...(excludedPropNames || []),\n 'style',\n 'className',\n ]),\n };\n};\n"],"sourceRoot":"../src/"}
|
@@ -52,6 +52,12 @@ export declare const liProperties: Record<string, number>;
|
|
52
52
|
* @public
|
53
53
|
*/
|
54
54
|
export declare const anchorProperties: Record<string, number>;
|
55
|
+
/**
|
56
|
+
* An array of TIME tag properties and events.
|
57
|
+
*
|
58
|
+
* @public
|
59
|
+
*/
|
60
|
+
export declare const timeProperties: Record<string, number>;
|
55
61
|
/**
|
56
62
|
* An array of BUTTON tag properties and events.
|
57
63
|
*
|
package/lib/utils/properties.js
CHANGED
@@ -82,6 +82,14 @@ export const liProperties = /*#__PURE__*/toObjectMap(htmlElementProperties, ['va
|
|
82
82
|
|
83
83
|
export const anchorProperties = /*#__PURE__*/toObjectMap(htmlElementProperties, ['download', 'href', 'hrefLang', 'media', 'rel', 'target', 'type' // a, button, input, link, menu, object, script, source, style
|
84
84
|
]);
|
85
|
+
/**
|
86
|
+
* An array of TIME tag properties and events.
|
87
|
+
*
|
88
|
+
* @public
|
89
|
+
*/
|
90
|
+
|
91
|
+
export const timeProperties = /*#__PURE__*/toObjectMap(htmlElementProperties, ['dateTime' // time
|
92
|
+
]);
|
85
93
|
/**
|
86
94
|
* An array of BUTTON tag properties and events.
|
87
95
|
*
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["utils/properties.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG,CAAC,GAAG,KAAJ,KAAoD;AACtE,QAAM,MAAM,GAA2B,EAAvC;;AAEA,OAAK,MAAM,IAAX,IAAmB,KAAnB,EAA0B;AACxB,UAAM,IAAI,GAAG,KAAK,CAAC,OAAN,CAAc,IAAd,IAAsB,IAAtB,G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,KAA8C,CAD3D,IAEA,GAAG,CAAC,OAAJ,CAAY,OAAZ,MAAyB,CAFzB,IAGA,GAAG,CAAC,OAAJ,CAAY,OAAZ,MAAyB,CAJ3B;;AAMA,QAAI,YAAY,KAAK,CAAC,iBAAD,IAAsB,CAAA,iBAAiB,KAAA,IAAjB,IAAA,iBAAiB,KAAA,KAAA,CAAjB,GAAiB,KAAA,CAAjB,GAAA,iBAAiB,CAAE,OAAnB,CAA2B,GAA3B,CAAA,MAAoC,CAAC,CAAhE,CAAhB,EAAoF;AAClF;AACA,MAAA,MAAM,CAAC,GAAD,CAAN,GAAc,KAAM,CAAC,GAAD,CAApB;AACD;AACF;;AAED,SAAO,MAAP;AACD","sourcesContent":["const toObjectMap = (...items: (string[] | Record<string, number>)[]) => {\n const result: Record<string, number> = {};\n\n for (const item of items) {\n const keys = Array.isArray(item) ? item : Object.keys(item);\n\n for (const key of keys) {\n result[key] = 1;\n }\n }\n\n return result;\n};\n\n/**\n * An array of events that are allowed on every html element type.\n *\n * @public\n */\nexport const baseElementEvents = toObjectMap([\n 'onAuxClick',\n 'onCopy',\n 'onCut',\n 'onPaste',\n 'onCompositionEnd',\n 'onCompositionStart',\n 'onCompositionUpdate',\n 'onFocus',\n 'onFocusCapture',\n 'onBlur',\n 'onBlurCapture',\n 'onChange',\n 'onInput',\n 'onSubmit',\n 'onLoad',\n 'onError',\n 'onKeyDown',\n 'onKeyDownCapture',\n 'onKeyPress',\n 'onKeyUp',\n 'onAbort',\n 'onCanPlay',\n 'onCanPlayThrough',\n 'onDurationChange',\n 'onEmptied',\n 'onEncrypted',\n 'onEnded',\n 'onLoadedData',\n 'onLoadedMetadata',\n 'onLoadStart',\n 'onPause',\n 'onPlay',\n 'onPlaying',\n 'onProgress',\n 'onRateChange',\n 'onSeeked',\n 'onSeeking',\n 'onStalled',\n 'onSuspend',\n 'onTimeUpdate',\n 'onVolumeChange',\n 'onWaiting',\n 'onClick',\n 'onClickCapture',\n 'onContextMenu',\n 'onDoubleClick',\n 'onDrag',\n 'onDragEnd',\n 'onDragEnter',\n 'onDragExit',\n 'onDragLeave',\n 'onDragOver',\n 'onDragStart',\n 'onDrop',\n 'onMouseDown',\n 'onMouseDownCapture',\n 'onMouseEnter',\n 'onMouseLeave',\n 'onMouseMove',\n 'onMouseOut',\n 'onMouseOver',\n 'onMouseUp',\n 'onMouseUpCapture',\n 'onSelect',\n 'onTouchCancel',\n 'onTouchEnd',\n 'onTouchMove',\n 'onTouchStart',\n 'onScroll',\n 'onWheel',\n 'onPointerCancel',\n 'onPointerDown',\n 'onPointerEnter',\n 'onPointerLeave',\n 'onPointerMove',\n 'onPointerOut',\n 'onPointerOver',\n 'onPointerUp',\n 'onGotPointerCapture',\n 'onLostPointerCapture',\n]);\n\n/**\n * An array of element attributes which are allowed on every html element type.\n *\n * @public\n */\nexport const baseElementProperties = toObjectMap([\n 'accessKey', // global\n 'children', // global\n 'className', // global\n 'contentEditable', // global\n 'dir', // global\n 'draggable', // global\n 'hidden', // global\n 'htmlFor', // global\n 'id', // global\n 'lang', // global\n 'ref', // global\n 'role', // global\n 'style', // global\n 'tabIndex', // global\n 'title', // global\n 'translate', // global\n 'spellCheck', // global\n 'name', // global\n]);\n\n/**\n * An array of HTML element properties and events.\n *\n * @public\n */\nexport const htmlElementProperties = toObjectMap(baseElementProperties, baseElementEvents);\n\n/**\n * An array of LABEL tag properties and events.\n *\n * @public\n */\nexport const labelProperties = toObjectMap(htmlElementProperties, [\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n]);\n\n/**\n * An array of AUDIO tag properties and events.\n\n * @public\n */\nexport const audioProperties = toObjectMap(htmlElementProperties, [\n 'height', // canvas, embed, iframe, img, input, object, video\n 'loop', // audio, video\n 'muted', // audio, video\n 'preload', // audio, video\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'width', // canvas, embed, iframe, img, input, object, video\n]);\n\n/**\n * An array of VIDEO tag properties and events.\n *\n * @public\n */\nexport const videoProperties = toObjectMap(audioProperties, [\n 'poster', // video\n]);\n\n/**\n * An array of OL tag properties and events.\n *\n * @public\n */\nexport const olProperties = toObjectMap(htmlElementProperties, [\n 'start', // ol\n]);\n\n/**\n * An array of LI tag properties and events.\n *\n * @public\n */\nexport const liProperties = toObjectMap(htmlElementProperties, [\n 'value', // button, input, li, option, meter, progress, param\n]);\n\n/**\n * An array of A tag properties and events.\n *\n * @public\n */\nexport const anchorProperties = toObjectMap(htmlElementProperties, [\n 'download', // a, area\n 'href', // a, area, base, link\n 'hrefLang', // a, area, link\n 'media', // a, area, link, source, style\n 'rel', // a, area, link\n 'target', // a, area, base, form\n 'type', // a, button, input, link, menu, object, script, source, style\n]);\n\n/**\n * An array of BUTTON tag properties and events.\n *\n * @public\n */\nexport const buttonProperties = toObjectMap(htmlElementProperties, [\n 'autoFocus', // button, input, select, textarea\n 'disabled', // button, fieldset, input, optgroup, option, select, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'formAction', // input, button\n 'formEncType', // input, button\n 'formMethod', // input, button\n 'formNoValidate', // input, button\n 'formTarget', // input, button\n 'type', // a, button, input, link, menu, object, script, source, style\n 'value', // button, input, li, option, meter, progress, param,\n]);\n\n/**\n * An array of INPUT tag properties and events.\n *\n * @public\n */\nexport const inputProperties = toObjectMap(buttonProperties, [\n 'accept', // input\n 'alt', // area, img, input\n 'autoCapitalize', // input, textarea\n 'autoComplete', // form, input\n 'checked', // input\n 'dirname', // input, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'height', // canvas, embed, iframe, img, input, object, video\n 'inputMode', // input\n 'list', // input\n 'max', // input, meter\n 'maxLength', // input, textarea\n 'min', // input, meter\n 'multiple', // input, select\n 'pattern', // input\n 'placeholder', // input, textarea\n 'readOnly', // input, textarea\n 'required', // input, select, textarea\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'step', // input\n 'size', // input\n 'type', // a, button, input, link, menu, object, script, source, style\n 'value', // button, input, li, option, meter, progress, param\n 'width', // canvas, embed, iframe, img, input, object, video\n]);\n\n/**\n * An array of TEXTAREA tag properties and events.\n *\n * @public\n */\nexport const textAreaProperties = toObjectMap(buttonProperties, [\n 'autoCapitalize', // input, textarea\n 'cols', // textarea\n 'dirname', // input, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'maxLength', // input, textarea\n 'placeholder', // input, textarea\n 'readOnly', // input, textarea\n 'required', // input, select, textarea\n 'rows', // textarea\n 'wrap', // textarea\n]);\n\n/**\n * An array of SELECT tag properties and events.\n *\n * @public\n */\nexport const selectProperties = toObjectMap(buttonProperties, [\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'multiple', // input, select\n 'required', // input, select, textarea\n]);\n\nexport const optionProperties = toObjectMap(htmlElementProperties, [\n 'selected', // option\n 'value', // button, input, li, option, meter, progress, param\n]);\n\n/**\n * An array of TABLE tag properties and events.\n *\n * @public\n */\nexport const tableProperties = toObjectMap(htmlElementProperties, [\n 'cellPadding', // table\n 'cellSpacing', // table\n]);\n\n/**\n * An array of TR tag properties and events.\n *\n * @public\n */\nexport const trProperties = htmlElementProperties;\n\n/**\n * An array of TH tag properties and events.\n *\n * @public\n */\nexport const thProperties = toObjectMap(htmlElementProperties, [\n 'rowSpan', // td, th\n 'scope', // th\n]);\n\n/**\n * An array of TD tag properties and events.\n *\n * @public\n */\nexport const tdProperties = toObjectMap(htmlElementProperties, [\n 'colSpan', // td\n 'headers', // td\n 'rowSpan', // td, th\n 'scope', // th\n]);\n\nexport const colGroupProperties = toObjectMap(htmlElementProperties, [\n 'span', // col, colgroup\n]);\n\nexport const colProperties = toObjectMap(htmlElementProperties, [\n 'span', // col, colgroup\n]);\n\n/**\n * An array of FIELDSET tag properties and events.\n *\n * @public\n */\nexport const fieldsetProperties = toObjectMap(htmlElementProperties, [\n 'disabled', // button, fieldset, input, optgroup, option, select, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n]);\n\n/**\n * An array of FORM tag properties and events.\n *\n * @public\n */\nexport const formProperties = toObjectMap(htmlElementProperties, [\n 'acceptCharset', // form\n 'action', // form\n 'encType', // form\n 'encType', // form\n 'method', // form\n 'noValidate', // form\n 'target', // form\n]);\n\n/**\n * An array of IFRAME tag properties and events.\n *\n * @public\n */\nexport const iframeProperties = toObjectMap(htmlElementProperties, [\n 'allow', // iframe\n 'allowFullScreen', // iframe\n 'allowPaymentRequest', // iframe\n 'allowTransparency', // iframe\n 'csp', // iframe\n 'height', // canvas, embed, iframe, img, input, object, video\n 'importance', // iframe\n 'referrerPolicy', // iframe\n 'sandbox', // iframe\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'srcDoc', // iframe\n 'width', // canvas, embed, iframe, img, input, object, video,\n]);\n\n/**\n * An array of IMAGE tag properties and events.\n *\n * @public\n */\nexport const imgProperties = toObjectMap(htmlElementProperties, [\n 'alt', // area, img, input\n 'crossOrigin', // img\n 'height', // canvas, embed, iframe, img, input, object, video\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'srcSet', // img, source\n 'useMap', // img, object,\n 'width', // canvas, embed, iframe, img, input, object, video\n]);\n\n/**\n * @deprecated Use imgProperties for img elements.\n */\nexport const imageProperties = imgProperties;\n\n/**\n * An array of DIV tag properties and events.\n *\n * @public\n */\nexport const divProperties = htmlElementProperties;\n\n/**\n * Gets native supported props for an html element provided the allowance set. Use one of the property\n * sets defined (divProperties, buttonPropertes, etc) to filter out supported properties from a given\n * props set. Note that all data- and aria- prefixed attributes will be allowed.\n * NOTE: getNativeProps should always be applied first when adding props to a react component. The\n * non-native props should be applied second. This will prevent getNativeProps from overriding your custom props.\n * For example, if props passed to getNativeProps has an onClick function and getNativeProps is added to\n * the component after an onClick function is added, then the getNativeProps onClick will override it.\n *\n * @public\n * @param props - The unfiltered input props\n * @param allowedPropsNames - The array or record of allowed prop names.\n * @returns The filtered props\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getNativeProps<T extends Record<string, any>>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n props: Record<string, any>,\n allowedPropNames: string[] | Record<string, number>,\n excludedPropNames?: string[],\n): T {\n // It'd be great to properly type this while allowing 'aria-` and 'data-' attributes like TypeScript does for\n // JSX attributes, but that ability is hardcoded into the TS compiler with no analog in TypeScript typings.\n // Then we'd be able to enforce props extends native props (including aria- and data- attributes), and then\n // return native props.\n // We should be able to do this once this PR is merged: https://github.com/microsoft/TypeScript/pull/26797\n\n const isArray = Array.isArray(allowedPropNames);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const result: Record<string, any> = {};\n const keys = Object.keys(props);\n\n for (const key of keys) {\n const isNativeProp =\n (!isArray && (allowedPropNames as Record<string, number>)[key]) ||\n (isArray && (allowedPropNames as string[]).indexOf(key) >= 0) ||\n key.indexOf('data-') === 0 ||\n key.indexOf('aria-') === 0;\n\n if (isNativeProp && (!excludedPropNames || excludedPropNames?.indexOf(key) === -1)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n result[key] = props![key] as any;\n }\n }\n\n return result as T;\n}\n"],"sourceRoot":"../src/"}
|
1
|
+
{"version":3,"sources":["utils/properties.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG,CAAC,GAAG,KAAJ,KAAoD;AACtE,QAAM,MAAM,GAA2B,EAAvC;;AAEA,OAAK,MAAM,IAAX,IAAmB,KAAnB,EAA0B;AACxB,UAAM,IAAI,GAAG,KAAK,CAAC,OAAN,CAAc,IAAd,IAAsB,IAAtB,GAA6B,MAAM,CAAC,IAAP,CAAY,IAAZ,CAA1C;;AAEA,SAAK,MAAM,GAAX,IAAkB,IAAlB,EAAwB;AACtB,MAAA,MAAM,CAAC,GAAD,CAAN,GAAc,CAAd;AACD;AACF;;AAED,SAAO,MAAP;AACD,CAZD;AAcA;;;;AAIG;;;AACH,OAAO,MAAM,iBAAiB,gBAAG,WAAW,CAAC,CAC3C,YAD2C,EAE3C,QAF2C,EAG3C,OAH2C,EAI3C,SAJ2C,EAK3C,kBAL2C,EAM3C,oBA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AAA,KAAA,CAAjB,GAAiB,KAAA,CAAjB,GAAA,iBAAiB,CAAE,OAAnB,CAA2B,GAA3B,CAAA,MAAoC,CAAC,CAAhE,CAAhB,EAAoF;AAClF;AACA,MAAA,MAAM,CAAC,GAAD,CAAN,GAAc,KAAM,CAAC,GAAD,CAApB;AACD;AACF;;AAED,SAAO,MAAP;AACD","sourcesContent":["const toObjectMap = (...items: (string[] | Record<string, number>)[]) => {\n const result: Record<string, number> = {};\n\n for (const item of items) {\n const keys = Array.isArray(item) ? item : Object.keys(item);\n\n for (const key of keys) {\n result[key] = 1;\n }\n }\n\n return result;\n};\n\n/**\n * An array of events that are allowed on every html element type.\n *\n * @public\n */\nexport const baseElementEvents = toObjectMap([\n 'onAuxClick',\n 'onCopy',\n 'onCut',\n 'onPaste',\n 'onCompositionEnd',\n 'onCompositionStart',\n 'onCompositionUpdate',\n 'onFocus',\n 'onFocusCapture',\n 'onBlur',\n 'onBlurCapture',\n 'onChange',\n 'onInput',\n 'onSubmit',\n 'onLoad',\n 'onError',\n 'onKeyDown',\n 'onKeyDownCapture',\n 'onKeyPress',\n 'onKeyUp',\n 'onAbort',\n 'onCanPlay',\n 'onCanPlayThrough',\n 'onDurationChange',\n 'onEmptied',\n 'onEncrypted',\n 'onEnded',\n 'onLoadedData',\n 'onLoadedMetadata',\n 'onLoadStart',\n 'onPause',\n 'onPlay',\n 'onPlaying',\n 'onProgress',\n 'onRateChange',\n 'onSeeked',\n 'onSeeking',\n 'onStalled',\n 'onSuspend',\n 'onTimeUpdate',\n 'onVolumeChange',\n 'onWaiting',\n 'onClick',\n 'onClickCapture',\n 'onContextMenu',\n 'onDoubleClick',\n 'onDrag',\n 'onDragEnd',\n 'onDragEnter',\n 'onDragExit',\n 'onDragLeave',\n 'onDragOver',\n 'onDragStart',\n 'onDrop',\n 'onMouseDown',\n 'onMouseDownCapture',\n 'onMouseEnter',\n 'onMouseLeave',\n 'onMouseMove',\n 'onMouseOut',\n 'onMouseOver',\n 'onMouseUp',\n 'onMouseUpCapture',\n 'onSelect',\n 'onTouchCancel',\n 'onTouchEnd',\n 'onTouchMove',\n 'onTouchStart',\n 'onScroll',\n 'onWheel',\n 'onPointerCancel',\n 'onPointerDown',\n 'onPointerEnter',\n 'onPointerLeave',\n 'onPointerMove',\n 'onPointerOut',\n 'onPointerOver',\n 'onPointerUp',\n 'onGotPointerCapture',\n 'onLostPointerCapture',\n]);\n\n/**\n * An array of element attributes which are allowed on every html element type.\n *\n * @public\n */\nexport const baseElementProperties = toObjectMap([\n 'accessKey', // global\n 'children', // global\n 'className', // global\n 'contentEditable', // global\n 'dir', // global\n 'draggable', // global\n 'hidden', // global\n 'htmlFor', // global\n 'id', // global\n 'lang', // global\n 'ref', // global\n 'role', // global\n 'style', // global\n 'tabIndex', // global\n 'title', // global\n 'translate', // global\n 'spellCheck', // global\n 'name', // global\n]);\n\n/**\n * An array of HTML element properties and events.\n *\n * @public\n */\nexport const htmlElementProperties = toObjectMap(baseElementProperties, baseElementEvents);\n\n/**\n * An array of LABEL tag properties and events.\n *\n * @public\n */\nexport const labelProperties = toObjectMap(htmlElementProperties, [\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n]);\n\n/**\n * An array of AUDIO tag properties and events.\n\n * @public\n */\nexport const audioProperties = toObjectMap(htmlElementProperties, [\n 'height', // canvas, embed, iframe, img, input, object, video\n 'loop', // audio, video\n 'muted', // audio, video\n 'preload', // audio, video\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'width', // canvas, embed, iframe, img, input, object, video\n]);\n\n/**\n * An array of VIDEO tag properties and events.\n *\n * @public\n */\nexport const videoProperties = toObjectMap(audioProperties, [\n 'poster', // video\n]);\n\n/**\n * An array of OL tag properties and events.\n *\n * @public\n */\nexport const olProperties = toObjectMap(htmlElementProperties, [\n 'start', // ol\n]);\n\n/**\n * An array of LI tag properties and events.\n *\n * @public\n */\nexport const liProperties = toObjectMap(htmlElementProperties, [\n 'value', // button, input, li, option, meter, progress, param\n]);\n\n/**\n * An array of A tag properties and events.\n *\n * @public\n */\nexport const anchorProperties = toObjectMap(htmlElementProperties, [\n 'download', // a, area\n 'href', // a, area, base, link\n 'hrefLang', // a, area, link\n 'media', // a, area, link, source, style\n 'rel', // a, area, link\n 'target', // a, area, base, form\n 'type', // a, button, input, link, menu, object, script, source, style\n]);\n\n/**\n * An array of TIME tag properties and events.\n *\n * @public\n */\nexport const timeProperties = toObjectMap(htmlElementProperties, [\n 'dateTime', // time\n]);\n\n/**\n * An array of BUTTON tag properties and events.\n *\n * @public\n */\nexport const buttonProperties = toObjectMap(htmlElementProperties, [\n 'autoFocus', // button, input, select, textarea\n 'disabled', // button, fieldset, input, optgroup, option, select, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'formAction', // input, button\n 'formEncType', // input, button\n 'formMethod', // input, button\n 'formNoValidate', // input, button\n 'formTarget', // input, button\n 'type', // a, button, input, link, menu, object, script, source, style\n 'value', // button, input, li, option, meter, progress, param,\n]);\n\n/**\n * An array of INPUT tag properties and events.\n *\n * @public\n */\nexport const inputProperties = toObjectMap(buttonProperties, [\n 'accept', // input\n 'alt', // area, img, input\n 'autoCapitalize', // input, textarea\n 'autoComplete', // form, input\n 'checked', // input\n 'dirname', // input, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'height', // canvas, embed, iframe, img, input, object, video\n 'inputMode', // input\n 'list', // input\n 'max', // input, meter\n 'maxLength', // input, textarea\n 'min', // input, meter\n 'multiple', // input, select\n 'pattern', // input\n 'placeholder', // input, textarea\n 'readOnly', // input, textarea\n 'required', // input, select, textarea\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'step', // input\n 'size', // input\n 'type', // a, button, input, link, menu, object, script, source, style\n 'value', // button, input, li, option, meter, progress, param\n 'width', // canvas, embed, iframe, img, input, object, video\n]);\n\n/**\n * An array of TEXTAREA tag properties and events.\n *\n * @public\n */\nexport const textAreaProperties = toObjectMap(buttonProperties, [\n 'autoCapitalize', // input, textarea\n 'cols', // textarea\n 'dirname', // input, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'maxLength', // input, textarea\n 'placeholder', // input, textarea\n 'readOnly', // input, textarea\n 'required', // input, select, textarea\n 'rows', // textarea\n 'wrap', // textarea\n]);\n\n/**\n * An array of SELECT tag properties and events.\n *\n * @public\n */\nexport const selectProperties = toObjectMap(buttonProperties, [\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'multiple', // input, select\n 'required', // input, select, textarea\n]);\n\nexport const optionProperties = toObjectMap(htmlElementProperties, [\n 'selected', // option\n 'value', // button, input, li, option, meter, progress, param\n]);\n\n/**\n * An array of TABLE tag properties and events.\n *\n * @public\n */\nexport const tableProperties = toObjectMap(htmlElementProperties, [\n 'cellPadding', // table\n 'cellSpacing', // table\n]);\n\n/**\n * An array of TR tag properties and events.\n *\n * @public\n */\nexport const trProperties = htmlElementProperties;\n\n/**\n * An array of TH tag properties and events.\n *\n * @public\n */\nexport const thProperties = toObjectMap(htmlElementProperties, [\n 'rowSpan', // td, th\n 'scope', // th\n]);\n\n/**\n * An array of TD tag properties and events.\n *\n * @public\n */\nexport const tdProperties = toObjectMap(htmlElementProperties, [\n 'colSpan', // td\n 'headers', // td\n 'rowSpan', // td, th\n 'scope', // th\n]);\n\nexport const colGroupProperties = toObjectMap(htmlElementProperties, [\n 'span', // col, colgroup\n]);\n\nexport const colProperties = toObjectMap(htmlElementProperties, [\n 'span', // col, colgroup\n]);\n\n/**\n * An array of FIELDSET tag properties and events.\n *\n * @public\n */\nexport const fieldsetProperties = toObjectMap(htmlElementProperties, [\n 'disabled', // button, fieldset, input, optgroup, option, select, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n]);\n\n/**\n * An array of FORM tag properties and events.\n *\n * @public\n */\nexport const formProperties = toObjectMap(htmlElementProperties, [\n 'acceptCharset', // form\n 'action', // form\n 'encType', // form\n 'encType', // form\n 'method', // form\n 'noValidate', // form\n 'target', // form\n]);\n\n/**\n * An array of IFRAME tag properties and events.\n *\n * @public\n */\nexport const iframeProperties = toObjectMap(htmlElementProperties, [\n 'allow', // iframe\n 'allowFullScreen', // iframe\n 'allowPaymentRequest', // iframe\n 'allowTransparency', // iframe\n 'csp', // iframe\n 'height', // canvas, embed, iframe, img, input, object, video\n 'importance', // iframe\n 'referrerPolicy', // iframe\n 'sandbox', // iframe\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'srcDoc', // iframe\n 'width', // canvas, embed, iframe, img, input, object, video,\n]);\n\n/**\n * An array of IMAGE tag properties and events.\n *\n * @public\n */\nexport const imgProperties = toObjectMap(htmlElementProperties, [\n 'alt', // area, img, input\n 'crossOrigin', // img\n 'height', // canvas, embed, iframe, img, input, object, video\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'srcSet', // img, source\n 'useMap', // img, object,\n 'width', // canvas, embed, iframe, img, input, object, video\n]);\n\n/**\n * @deprecated Use imgProperties for img elements.\n */\nexport const imageProperties = imgProperties;\n\n/**\n * An array of DIV tag properties and events.\n *\n * @public\n */\nexport const divProperties = htmlElementProperties;\n\n/**\n * Gets native supported props for an html element provided the allowance set. Use one of the property\n * sets defined (divProperties, buttonPropertes, etc) to filter out supported properties from a given\n * props set. Note that all data- and aria- prefixed attributes will be allowed.\n * NOTE: getNativeProps should always be applied first when adding props to a react component. The\n * non-native props should be applied second. This will prevent getNativeProps from overriding your custom props.\n * For example, if props passed to getNativeProps has an onClick function and getNativeProps is added to\n * the component after an onClick function is added, then the getNativeProps onClick will override it.\n *\n * @public\n * @param props - The unfiltered input props\n * @param allowedPropsNames - The array or record of allowed prop names.\n * @returns The filtered props\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getNativeProps<T extends Record<string, any>>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n props: Record<string, any>,\n allowedPropNames: string[] | Record<string, number>,\n excludedPropNames?: string[],\n): T {\n // It'd be great to properly type this while allowing 'aria-` and 'data-' attributes like TypeScript does for\n // JSX attributes, but that ability is hardcoded into the TS compiler with no analog in TypeScript typings.\n // Then we'd be able to enforce props extends native props (including aria- and data- attributes), and then\n // return native props.\n // We should be able to do this once this PR is merged: https://github.com/microsoft/TypeScript/pull/26797\n\n const isArray = Array.isArray(allowedPropNames);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const result: Record<string, any> = {};\n const keys = Object.keys(props);\n\n for (const key of keys) {\n const isNativeProp =\n (!isArray && (allowedPropNames as Record<string, number>)[key]) ||\n (isArray && (allowedPropNames as string[]).indexOf(key) >= 0) ||\n key.indexOf('data-') === 0 ||\n key.indexOf('aria-') === 0;\n\n if (isNativeProp && (!excludedPropNames || excludedPropNames?.indexOf(key) === -1)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n result[key] = props![key] as any;\n }\n }\n\n return result as T;\n}\n"],"sourceRoot":"../src/"}
|
@@ -28,7 +28,8 @@ const nativeElementMap = {
|
|
28
28
|
fieldset: properties_1.fieldsetProperties,
|
29
29
|
form: properties_1.formProperties,
|
30
30
|
iframe: properties_1.iframeProperties,
|
31
|
-
img: properties_1.imgProperties
|
31
|
+
img: properties_1.imgProperties,
|
32
|
+
time: properties_1.timeProperties
|
32
33
|
};
|
33
34
|
/**
|
34
35
|
* Given an element tagname and user props, filters the props to only allowed props for the given
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["utils/getNativeElementProps.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,YAAA,gBAAA,OAAA,CAAA,cAAA,CAAA;;
|
1
|
+
{"version":3,"sources":["utils/getNativeElementProps.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,YAAA,gBAAA,OAAA,CAAA,cAAA,CAAA;;AA2BA,MAAM,gBAAgB,GAA2C;AAC/D,EAAA,KAAK,EAAE,YAAA,CAAA,eADwD;AAE/D,EAAA,KAAK,EAAE,YAAA,CAAA,eAFwD;AAG/D,EAAA,KAAK,EAAE,YAAA,CAAA,eAHwD;AAI/D,EAAA,EAAE,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AACI,MAAM,yBAAyB,GAAG,CAGvC;AACA,EAAA,kBADA;AAEA,EAAA,KAFA;AAGA,EAAA;AAHA,CAHuC,KAgBpC;AACH,SAAO;AACL,IAAA,IAAI,EAAE;AAAE,MAAA,KAAK,EAAE,KAAK,CAAC,KAAf;AAAsB,MAAA,SAAS,EAAE,KAAK,CAAC;AAAvC,KADD;AAEL,IAAA,OAAO,EAAE,qBAAqB,CAAgC,kBAAhC,EAAoD,KAApD,EAA2D,CACvF,IAAI,iBAAiB,IAAI,EAAzB,CADuF,EAEvF,OAFuF,EAGvF,WAHuF,CAA3D;AAFzB,GAAP;AAQD,CAzBM;;AAAM,OAAA,CAAA,yBAAA,GAAyB,yBAAzB","sourcesContent":["import * as React from 'react';\nimport {\n labelProperties,\n audioProperties,\n videoProperties,\n olProperties,\n liProperties,\n anchorProperties,\n buttonProperties,\n inputProperties,\n textAreaProperties,\n selectProperties,\n optionProperties,\n tableProperties,\n trProperties,\n thProperties,\n tdProperties,\n colGroupProperties,\n colProperties,\n fieldsetProperties,\n formProperties,\n iframeProperties,\n imgProperties,\n htmlElementProperties,\n getNativeProps,\n timeProperties,\n} from './properties';\n\nconst nativeElementMap: Record<string, Record<string, number>> = {\n label: labelProperties,\n audio: audioProperties,\n video: videoProperties,\n ol: olProperties,\n li: liProperties,\n a: anchorProperties,\n button: buttonProperties,\n input: inputProperties,\n textarea: textAreaProperties,\n select: selectProperties,\n option: optionProperties,\n table: tableProperties,\n tr: trProperties,\n th: thProperties,\n td: tdProperties,\n colGroup: colGroupProperties,\n col: colProperties,\n fieldset: fieldsetProperties,\n form: formProperties,\n iframe: iframeProperties,\n img: imgProperties,\n time: timeProperties,\n};\n\n/**\n * Given an element tagname and user props, filters the props to only allowed props for the given\n * element type.\n * @param tagName - Tag name (e.g. \"div\")\n * @param props - Props object\n * @param excludedPropNames - List of props to disallow\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getNativeElementProps<TAttributes extends React.HTMLAttributes<any>>(\n tagName: string,\n props: {},\n excludedPropNames?: string[],\n): TAttributes {\n const allowedPropNames = (tagName && nativeElementMap[tagName]) || htmlElementProperties;\n allowedPropNames.as = 1;\n\n return getNativeProps(props, allowedPropNames, excludedPropNames);\n}\n\n/**\n * Splits the native props into ones that go to the `root` slot, and ones that go to the primary slot.\n *\n * This function is only for use with components that have a primary slot other than `root`.\n * Most components should use {@link getNativeElementProps} for their root slot if it is the primary slot.\n *\n * @returns An object containing the native props for the `root` and primary slots.\n */\nexport const getPartitionedNativeProps = <\n Props extends Pick<React.HTMLAttributes<HTMLElement>, 'style' | 'className'>,\n ExcludedPropKeys extends Extract<keyof Props, string> = never\n>({\n primarySlotTagName,\n props,\n excludedPropNames,\n}: {\n /** The primary slot's element type (e.g. 'div') */\n primarySlotTagName: keyof JSX.IntrinsicElements;\n\n /** The component's props object */\n props: Props;\n\n /** List of native props to exclude from the returned value */\n excludedPropNames?: ExcludedPropKeys[];\n}) => {\n return {\n root: { style: props.style, className: props.className },\n primary: getNativeElementProps<Omit<Props, ExcludedPropKeys>>(primarySlotTagName, props, [\n ...(excludedPropNames || []),\n 'style',\n 'className',\n ]),\n };\n};\n"],"sourceRoot":"../src/"}
|
@@ -52,6 +52,12 @@ export declare const liProperties: Record<string, number>;
|
|
52
52
|
* @public
|
53
53
|
*/
|
54
54
|
export declare const anchorProperties: Record<string, number>;
|
55
|
+
/**
|
56
|
+
* An array of TIME tag properties and events.
|
57
|
+
*
|
58
|
+
* @public
|
59
|
+
*/
|
60
|
+
export declare const timeProperties: Record<string, number>;
|
55
61
|
/**
|
56
62
|
* An array of BUTTON tag properties and events.
|
57
63
|
*
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.getNativeProps = exports.divProperties = exports.imageProperties = exports.imgProperties = exports.iframeProperties = exports.formProperties = exports.fieldsetProperties = exports.colProperties = exports.colGroupProperties = exports.tdProperties = exports.thProperties = exports.trProperties = exports.tableProperties = exports.optionProperties = exports.selectProperties = exports.textAreaProperties = exports.inputProperties = exports.buttonProperties = exports.anchorProperties = exports.liProperties = exports.olProperties = exports.videoProperties = exports.audioProperties = exports.labelProperties = exports.htmlElementProperties = exports.baseElementProperties = exports.baseElementEvents = void 0;
|
6
|
+
exports.getNativeProps = exports.divProperties = exports.imageProperties = exports.imgProperties = exports.iframeProperties = exports.formProperties = exports.fieldsetProperties = exports.colProperties = exports.colGroupProperties = exports.tdProperties = exports.thProperties = exports.trProperties = exports.tableProperties = exports.optionProperties = exports.selectProperties = exports.textAreaProperties = exports.inputProperties = exports.buttonProperties = exports.timeProperties = exports.anchorProperties = exports.liProperties = exports.olProperties = exports.videoProperties = exports.audioProperties = exports.labelProperties = exports.htmlElementProperties = exports.baseElementProperties = exports.baseElementEvents = void 0;
|
7
7
|
|
8
8
|
const toObjectMap = (...items) => {
|
9
9
|
const result = {};
|
@@ -89,6 +89,14 @@ exports.liProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, [
|
|
89
89
|
|
90
90
|
exports.anchorProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['download', 'href', 'hrefLang', 'media', 'rel', 'target', 'type' // a, button, input, link, menu, object, script, source, style
|
91
91
|
]);
|
92
|
+
/**
|
93
|
+
* An array of TIME tag properties and events.
|
94
|
+
*
|
95
|
+
* @public
|
96
|
+
*/
|
97
|
+
|
98
|
+
exports.timeProperties = /*#__PURE__*/toObjectMap(exports.htmlElementProperties, ['dateTime' // time
|
99
|
+
]);
|
92
100
|
/**
|
93
101
|
* An array of BUTTON tag properties and events.
|
94
102
|
*
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["utils/properties.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAM,WAAW,GAAG,CAAC,GAAG,KAAJ,KAAoD;AACtE,QAAM,MAAM,GAA2B,EAAvC;;AAEA,OAAK,MAAM,IAAX,IAAmB,KAAnB,EAA0B;AACxB,UAAM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,EAI8B;AAE5B;AACA;AACA;AACA;AACA;AAEA,QAAM,OAAO,GAAG,KAAK,CAAC,OAAN,CAAc,gBAAd,CAAhB,CAR4B,CAS5B;;AACA,QAAM,MAAM,GAAwB,EAApC;AACA,QAAM,IAAI,GAAG,MAAM,CAAC,IAAP,CAAY,KAAZ,CAAb;;AAEA,OAAK,MAAM,GAAX,IAAkB,IAAlB,EAAwB;AACtB,UAAM,YAAY,GACf,CAAC,OAAD,IAAa,gBAA2C,CAAC,GAAD,CAAzD,IACC,OAAO,IAAK,gBAA6B,CAAC,OAA9B,CAAsC,GAAtC,KAA8C,CAD3D,IAEA,GAAG,CAAC,OAAJ,CAAY,OAAZ,MAAyB,CAFzB,IAGA,GAAG,CAAC,OAAJ,CAAY,OAAZ,MAAyB,CAJ3B;;AAMA,QAAI,YAAY,KAAK,CAAC,iBAAD,IAAsB,CAAA,iBAAiB,KAAA,IAAjB,IAAA,iBAAiB,KAAA,KAAA,CAAjB,GAAiB,KAAA,CAAjB,GAAA,iBAAiB,CAAE,OAAnB,CAA2B,GAA3B,CAAA,MAAoC,CAAC,CAAhE,CAAhB,EAAoF;AAClF;AACA,MAAA,MAAM,CAAC,GAAD,CAAN,GAAc,KAAM,CAAC,GAAD,CAApB;AACD;AACF;;AAED,SAAO,MAAP;AACD;;AA/BD,OAAA,CAAA,cAAA,GAAA,cAAA","sourcesContent":["const toObjectMap = (...items: (string[] | Record<string, number>)[]) => {\n const result: Record<string, number> = {};\n\n for (const item of items) {\n const keys = Array.isArray(item) ? item : Object.keys(item);\n\n for (const key of keys) {\n result[key] = 1;\n }\n }\n\n return result;\n};\n\n/**\n * An array of events that are allowed on every html element type.\n *\n * @public\n */\nexport const baseElementEvents = toObjectMap([\n 'onAuxClick',\n 'onCopy',\n 'onCut',\n 'onPaste',\n 'onCompositionEnd',\n 'onCompositionStart',\n 'onCompositionUpdate',\n 'onFocus',\n 'onFocusCapture',\n 'onBlur',\n 'onBlurCapture',\n 'onChange',\n 'onInput',\n 'onSubmit',\n 'onLoad',\n 'onError',\n 'onKeyDown',\n 'onKeyDownCapture',\n 'onKeyPress',\n 'onKeyUp',\n 'onAbort',\n 'onCanPlay',\n 'onCanPlayThrough',\n 'onDurationChange',\n 'onEmptied',\n 'onEncrypted',\n 'onEnded',\n 'onLoadedData',\n 'onLoadedMetadata',\n 'onLoadStart',\n 'onPause',\n 'onPlay',\n 'onPlaying',\n 'onProgress',\n 'onRateChange',\n 'onSeeked',\n 'onSeeking',\n 'onStalled',\n 'onSuspend',\n 'onTimeUpdate',\n 'onVolumeChange',\n 'onWaiting',\n 'onClick',\n 'onClickCapture',\n 'onContextMenu',\n 'onDoubleClick',\n 'onDrag',\n 'onDragEnd',\n 'onDragEnter',\n 'onDragExit',\n 'onDragLeave',\n 'onDragOver',\n 'onDragStart',\n 'onDrop',\n 'onMouseDown',\n 'onMouseDownCapture',\n 'onMouseEnter',\n 'onMouseLeave',\n 'onMouseMove',\n 'onMouseOut',\n 'onMouseOver',\n 'onMouseUp',\n 'onMouseUpCapture',\n 'onSelect',\n 'onTouchCancel',\n 'onTouchEnd',\n 'onTouchMove',\n 'onTouchStart',\n 'onScroll',\n 'onWheel',\n 'onPointerCancel',\n 'onPointerDown',\n 'onPointerEnter',\n 'onPointerLeave',\n 'onPointerMove',\n 'onPointerOut',\n 'onPointerOver',\n 'onPointerUp',\n 'onGotPointerCapture',\n 'onLostPointerCapture',\n]);\n\n/**\n * An array of element attributes which are allowed on every html element type.\n *\n * @public\n */\nexport const baseElementProperties = toObjectMap([\n 'accessKey', // global\n 'children', // global\n 'className', // global\n 'contentEditable', // global\n 'dir', // global\n 'draggable', // global\n 'hidden', // global\n 'htmlFor', // global\n 'id', // global\n 'lang', // global\n 'ref', // global\n 'role', // global\n 'style', // global\n 'tabIndex', // global\n 'title', // global\n 'translate', // global\n 'spellCheck', // global\n 'name', // global\n]);\n\n/**\n * An array of HTML element properties and events.\n *\n * @public\n */\nexport const htmlElementProperties = toObjectMap(baseElementProperties, baseElementEvents);\n\n/**\n * An array of LABEL tag properties and events.\n *\n * @public\n */\nexport const labelProperties = toObjectMap(htmlElementProperties, [\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n]);\n\n/**\n * An array of AUDIO tag properties and events.\n\n * @public\n */\nexport const audioProperties = toObjectMap(htmlElementProperties, [\n 'height', // canvas, embed, iframe, img, input, object, video\n 'loop', // audio, video\n 'muted', // audio, video\n 'preload', // audio, video\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'width', // canvas, embed, iframe, img, input, object, video\n]);\n\n/**\n * An array of VIDEO tag properties and events.\n *\n * @public\n */\nexport const videoProperties = toObjectMap(audioProperties, [\n 'poster', // video\n]);\n\n/**\n * An array of OL tag properties and events.\n *\n * @public\n */\nexport const olProperties = toObjectMap(htmlElementProperties, [\n 'start', // ol\n]);\n\n/**\n * An array of LI tag properties and events.\n *\n * @public\n */\nexport const liProperties = toObjectMap(htmlElementProperties, [\n 'value', // button, input, li, option, meter, progress, param\n]);\n\n/**\n * An array of A tag properties and events.\n *\n * @public\n */\nexport const anchorProperties = toObjectMap(htmlElementProperties, [\n 'download', // a, area\n 'href', // a, area, base, link\n 'hrefLang', // a, area, link\n 'media', // a, area, link, source, style\n 'rel', // a, area, link\n 'target', // a, area, base, form\n 'type', // a, button, input, link, menu, object, script, source, style\n]);\n\n/**\n * An array of BUTTON tag properties and events.\n *\n * @public\n */\nexport const buttonProperties = toObjectMap(htmlElementProperties, [\n 'autoFocus', // button, input, select, textarea\n 'disabled', // button, fieldset, input, optgroup, option, select, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'formAction', // input, button\n 'formEncType', // input, button\n 'formMethod', // input, button\n 'formNoValidate', // input, button\n 'formTarget', // input, button\n 'type', // a, button, input, link, menu, object, script, source, style\n 'value', // button, input, li, option, meter, progress, param,\n]);\n\n/**\n * An array of INPUT tag properties and events.\n *\n * @public\n */\nexport const inputProperties = toObjectMap(buttonProperties, [\n 'accept', // input\n 'alt', // area, img, input\n 'autoCapitalize', // input, textarea\n 'autoComplete', // form, input\n 'checked', // input\n 'dirname', // input, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'height', // canvas, embed, iframe, img, input, object, video\n 'inputMode', // input\n 'list', // input\n 'max', // input, meter\n 'maxLength', // input, textarea\n 'min', // input, meter\n 'multiple', // input, select\n 'pattern', // input\n 'placeholder', // input, textarea\n 'readOnly', // input, textarea\n 'required', // input, select, textarea\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'step', // input\n 'size', // input\n 'type', // a, button, input, link, menu, object, script, source, style\n 'value', // button, input, li, option, meter, progress, param\n 'width', // canvas, embed, iframe, img, input, object, video\n]);\n\n/**\n * An array of TEXTAREA tag properties and events.\n *\n * @public\n */\nexport const textAreaProperties = toObjectMap(buttonProperties, [\n 'autoCapitalize', // input, textarea\n 'cols', // textarea\n 'dirname', // input, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'maxLength', // input, textarea\n 'placeholder', // input, textarea\n 'readOnly', // input, textarea\n 'required', // input, select, textarea\n 'rows', // textarea\n 'wrap', // textarea\n]);\n\n/**\n * An array of SELECT tag properties and events.\n *\n * @public\n */\nexport const selectProperties = toObjectMap(buttonProperties, [\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'multiple', // input, select\n 'required', // input, select, textarea\n]);\n\nexport const optionProperties = toObjectMap(htmlElementProperties, [\n 'selected', // option\n 'value', // button, input, li, option, meter, progress, param\n]);\n\n/**\n * An array of TABLE tag properties and events.\n *\n * @public\n */\nexport const tableProperties = toObjectMap(htmlElementProperties, [\n 'cellPadding', // table\n 'cellSpacing', // table\n]);\n\n/**\n * An array of TR tag properties and events.\n *\n * @public\n */\nexport const trProperties = htmlElementProperties;\n\n/**\n * An array of TH tag properties and events.\n *\n * @public\n */\nexport const thProperties = toObjectMap(htmlElementProperties, [\n 'rowSpan', // td, th\n 'scope', // th\n]);\n\n/**\n * An array of TD tag properties and events.\n *\n * @public\n */\nexport const tdProperties = toObjectMap(htmlElementProperties, [\n 'colSpan', // td\n 'headers', // td\n 'rowSpan', // td, th\n 'scope', // th\n]);\n\nexport const colGroupProperties = toObjectMap(htmlElementProperties, [\n 'span', // col, colgroup\n]);\n\nexport const colProperties = toObjectMap(htmlElementProperties, [\n 'span', // col, colgroup\n]);\n\n/**\n * An array of FIELDSET tag properties and events.\n *\n * @public\n */\nexport const fieldsetProperties = toObjectMap(htmlElementProperties, [\n 'disabled', // button, fieldset, input, optgroup, option, select, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n]);\n\n/**\n * An array of FORM tag properties and events.\n *\n * @public\n */\nexport const formProperties = toObjectMap(htmlElementProperties, [\n 'acceptCharset', // form\n 'action', // form\n 'encType', // form\n 'encType', // form\n 'method', // form\n 'noValidate', // form\n 'target', // form\n]);\n\n/**\n * An array of IFRAME tag properties and events.\n *\n * @public\n */\nexport const iframeProperties = toObjectMap(htmlElementProperties, [\n 'allow', // iframe\n 'allowFullScreen', // iframe\n 'allowPaymentRequest', // iframe\n 'allowTransparency', // iframe\n 'csp', // iframe\n 'height', // canvas, embed, iframe, img, input, object, video\n 'importance', // iframe\n 'referrerPolicy', // iframe\n 'sandbox', // iframe\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'srcDoc', // iframe\n 'width', // canvas, embed, iframe, img, input, object, video,\n]);\n\n/**\n * An array of IMAGE tag properties and events.\n *\n * @public\n */\nexport const imgProperties = toObjectMap(htmlElementProperties, [\n 'alt', // area, img, input\n 'crossOrigin', // img\n 'height', // canvas, embed, iframe, img, input, object, video\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'srcSet', // img, source\n 'useMap', // img, object,\n 'width', // canvas, embed, iframe, img, input, object, video\n]);\n\n/**\n * @deprecated Use imgProperties for img elements.\n */\nexport const imageProperties = imgProperties;\n\n/**\n * An array of DIV tag properties and events.\n *\n * @public\n */\nexport const divProperties = htmlElementProperties;\n\n/**\n * Gets native supported props for an html element provided the allowance set. Use one of the property\n * sets defined (divProperties, buttonPropertes, etc) to filter out supported properties from a given\n * props set. Note that all data- and aria- prefixed attributes will be allowed.\n * NOTE: getNativeProps should always be applied first when adding props to a react component. The\n * non-native props should be applied second. This will prevent getNativeProps from overriding your custom props.\n * For example, if props passed to getNativeProps has an onClick function and getNativeProps is added to\n * the component after an onClick function is added, then the getNativeProps onClick will override it.\n *\n * @public\n * @param props - The unfiltered input props\n * @param allowedPropsNames - The array or record of allowed prop names.\n * @returns The filtered props\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getNativeProps<T extends Record<string, any>>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n props: Record<string, any>,\n allowedPropNames: string[] | Record<string, number>,\n excludedPropNames?: string[],\n): T {\n // It'd be great to properly type this while allowing 'aria-` and 'data-' attributes like TypeScript does for\n // JSX attributes, but that ability is hardcoded into the TS compiler with no analog in TypeScript typings.\n // Then we'd be able to enforce props extends native props (including aria- and data- attributes), and then\n // return native props.\n // We should be able to do this once this PR is merged: https://github.com/microsoft/TypeScript/pull/26797\n\n const isArray = Array.isArray(allowedPropNames);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const result: Record<string, any> = {};\n const keys = Object.keys(props);\n\n for (const key of keys) {\n const isNativeProp =\n (!isArray && (allowedPropNames as Record<string, number>)[key]) ||\n (isArray && (allowedPropNames as string[]).indexOf(key) >= 0) ||\n key.indexOf('data-') === 0 ||\n key.indexOf('aria-') === 0;\n\n if (isNativeProp && (!excludedPropNames || excludedPropNames?.indexOf(key) === -1)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n result[key] = props![key] as any;\n }\n }\n\n return result as T;\n}\n"],"sourceRoot":"../src/"}
|
1
|
+
{"version":3,"sources":["utils/properties.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAM,WAAW,GAAG,CAAC,GAAG,KAAJ,KAAoD;AACtE,QAAM,MAAM,GAA2B,EAAvC;;AAEA,OAAK,MAAM,IAAX,I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AEb;;;;AAIG;;AACU,OAAA,CAAA,aAAA,GAAgB,OAAA,CAAA,qBAAhB;AAEb;;;;;;;;;;;;;AAaG;AACH;;AACA,SAAgB,cAAhB,EACE;AACA,KAFF,EAGE,gBAHF,EAIE,iBAJF,EAI8B;AAE5B;AACA;AACA;AACA;AACA;AAEA,QAAM,OAAO,GAAG,KAAK,CAAC,OAAN,CAAc,gBAAd,CAAhB,CAR4B,CAS5B;;AACA,QAAM,MAAM,GAAwB,EAApC;AACA,QAAM,IAAI,GAAG,MAAM,CAAC,IAAP,CAAY,KAAZ,CAAb;;AAEA,OAAK,MAAM,GAAX,IAAkB,IAAlB,EAAwB;AACtB,UAAM,YAAY,GACf,CAAC,OAAD,IAAa,gBAA2C,CAAC,GAAD,CAAzD,IACC,OAAO,IAAK,gBAA6B,CAAC,OAA9B,CAAsC,GAAtC,KAA8C,CAD3D,IAEA,GAAG,CAAC,OAAJ,CAAY,OAAZ,MAAyB,CAFzB,IAGA,GAAG,CAAC,OAAJ,CAAY,OAAZ,MAAyB,CAJ3B;;AAMA,QAAI,YAAY,KAAK,CAAC,iBAAD,IAAsB,CAAA,iBAAiB,KAAA,IAAjB,IAAA,iBAAiB,KAAA,KAAA,CAAjB,GAAiB,KAAA,CAAjB,GAAA,iBAAiB,CAAE,OAAnB,CAA2B,GAA3B,CAAA,MAAoC,CAAC,CAAhE,CAAhB,EAAoF;AAClF;AACA,MAAA,MAAM,CAAC,GAAD,CAAN,GAAc,KAAM,CAAC,GAAD,CAApB;AACD;AACF;;AAED,SAAO,MAAP;AACD;;AA/BD,OAAA,CAAA,cAAA,GAAA,cAAA","sourcesContent":["const toObjectMap = (...items: (string[] | Record<string, number>)[]) => {\n const result: Record<string, number> = {};\n\n for (const item of items) {\n const keys = Array.isArray(item) ? item : Object.keys(item);\n\n for (const key of keys) {\n result[key] = 1;\n }\n }\n\n return result;\n};\n\n/**\n * An array of events that are allowed on every html element type.\n *\n * @public\n */\nexport const baseElementEvents = toObjectMap([\n 'onAuxClick',\n 'onCopy',\n 'onCut',\n 'onPaste',\n 'onCompositionEnd',\n 'onCompositionStart',\n 'onCompositionUpdate',\n 'onFocus',\n 'onFocusCapture',\n 'onBlur',\n 'onBlurCapture',\n 'onChange',\n 'onInput',\n 'onSubmit',\n 'onLoad',\n 'onError',\n 'onKeyDown',\n 'onKeyDownCapture',\n 'onKeyPress',\n 'onKeyUp',\n 'onAbort',\n 'onCanPlay',\n 'onCanPlayThrough',\n 'onDurationChange',\n 'onEmptied',\n 'onEncrypted',\n 'onEnded',\n 'onLoadedData',\n 'onLoadedMetadata',\n 'onLoadStart',\n 'onPause',\n 'onPlay',\n 'onPlaying',\n 'onProgress',\n 'onRateChange',\n 'onSeeked',\n 'onSeeking',\n 'onStalled',\n 'onSuspend',\n 'onTimeUpdate',\n 'onVolumeChange',\n 'onWaiting',\n 'onClick',\n 'onClickCapture',\n 'onContextMenu',\n 'onDoubleClick',\n 'onDrag',\n 'onDragEnd',\n 'onDragEnter',\n 'onDragExit',\n 'onDragLeave',\n 'onDragOver',\n 'onDragStart',\n 'onDrop',\n 'onMouseDown',\n 'onMouseDownCapture',\n 'onMouseEnter',\n 'onMouseLeave',\n 'onMouseMove',\n 'onMouseOut',\n 'onMouseOver',\n 'onMouseUp',\n 'onMouseUpCapture',\n 'onSelect',\n 'onTouchCancel',\n 'onTouchEnd',\n 'onTouchMove',\n 'onTouchStart',\n 'onScroll',\n 'onWheel',\n 'onPointerCancel',\n 'onPointerDown',\n 'onPointerEnter',\n 'onPointerLeave',\n 'onPointerMove',\n 'onPointerOut',\n 'onPointerOver',\n 'onPointerUp',\n 'onGotPointerCapture',\n 'onLostPointerCapture',\n]);\n\n/**\n * An array of element attributes which are allowed on every html element type.\n *\n * @public\n */\nexport const baseElementProperties = toObjectMap([\n 'accessKey', // global\n 'children', // global\n 'className', // global\n 'contentEditable', // global\n 'dir', // global\n 'draggable', // global\n 'hidden', // global\n 'htmlFor', // global\n 'id', // global\n 'lang', // global\n 'ref', // global\n 'role', // global\n 'style', // global\n 'tabIndex', // global\n 'title', // global\n 'translate', // global\n 'spellCheck', // global\n 'name', // global\n]);\n\n/**\n * An array of HTML element properties and events.\n *\n * @public\n */\nexport const htmlElementProperties = toObjectMap(baseElementProperties, baseElementEvents);\n\n/**\n * An array of LABEL tag properties and events.\n *\n * @public\n */\nexport const labelProperties = toObjectMap(htmlElementProperties, [\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n]);\n\n/**\n * An array of AUDIO tag properties and events.\n\n * @public\n */\nexport const audioProperties = toObjectMap(htmlElementProperties, [\n 'height', // canvas, embed, iframe, img, input, object, video\n 'loop', // audio, video\n 'muted', // audio, video\n 'preload', // audio, video\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'width', // canvas, embed, iframe, img, input, object, video\n]);\n\n/**\n * An array of VIDEO tag properties and events.\n *\n * @public\n */\nexport const videoProperties = toObjectMap(audioProperties, [\n 'poster', // video\n]);\n\n/**\n * An array of OL tag properties and events.\n *\n * @public\n */\nexport const olProperties = toObjectMap(htmlElementProperties, [\n 'start', // ol\n]);\n\n/**\n * An array of LI tag properties and events.\n *\n * @public\n */\nexport const liProperties = toObjectMap(htmlElementProperties, [\n 'value', // button, input, li, option, meter, progress, param\n]);\n\n/**\n * An array of A tag properties and events.\n *\n * @public\n */\nexport const anchorProperties = toObjectMap(htmlElementProperties, [\n 'download', // a, area\n 'href', // a, area, base, link\n 'hrefLang', // a, area, link\n 'media', // a, area, link, source, style\n 'rel', // a, area, link\n 'target', // a, area, base, form\n 'type', // a, button, input, link, menu, object, script, source, style\n]);\n\n/**\n * An array of TIME tag properties and events.\n *\n * @public\n */\nexport const timeProperties = toObjectMap(htmlElementProperties, [\n 'dateTime', // time\n]);\n\n/**\n * An array of BUTTON tag properties and events.\n *\n * @public\n */\nexport const buttonProperties = toObjectMap(htmlElementProperties, [\n 'autoFocus', // button, input, select, textarea\n 'disabled', // button, fieldset, input, optgroup, option, select, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'formAction', // input, button\n 'formEncType', // input, button\n 'formMethod', // input, button\n 'formNoValidate', // input, button\n 'formTarget', // input, button\n 'type', // a, button, input, link, menu, object, script, source, style\n 'value', // button, input, li, option, meter, progress, param,\n]);\n\n/**\n * An array of INPUT tag properties and events.\n *\n * @public\n */\nexport const inputProperties = toObjectMap(buttonProperties, [\n 'accept', // input\n 'alt', // area, img, input\n 'autoCapitalize', // input, textarea\n 'autoComplete', // form, input\n 'checked', // input\n 'dirname', // input, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'height', // canvas, embed, iframe, img, input, object, video\n 'inputMode', // input\n 'list', // input\n 'max', // input, meter\n 'maxLength', // input, textarea\n 'min', // input, meter\n 'multiple', // input, select\n 'pattern', // input\n 'placeholder', // input, textarea\n 'readOnly', // input, textarea\n 'required', // input, select, textarea\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'step', // input\n 'size', // input\n 'type', // a, button, input, link, menu, object, script, source, style\n 'value', // button, input, li, option, meter, progress, param\n 'width', // canvas, embed, iframe, img, input, object, video\n]);\n\n/**\n * An array of TEXTAREA tag properties and events.\n *\n * @public\n */\nexport const textAreaProperties = toObjectMap(buttonProperties, [\n 'autoCapitalize', // input, textarea\n 'cols', // textarea\n 'dirname', // input, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'maxLength', // input, textarea\n 'placeholder', // input, textarea\n 'readOnly', // input, textarea\n 'required', // input, select, textarea\n 'rows', // textarea\n 'wrap', // textarea\n]);\n\n/**\n * An array of SELECT tag properties and events.\n *\n * @public\n */\nexport const selectProperties = toObjectMap(buttonProperties, [\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n 'multiple', // input, select\n 'required', // input, select, textarea\n]);\n\nexport const optionProperties = toObjectMap(htmlElementProperties, [\n 'selected', // option\n 'value', // button, input, li, option, meter, progress, param\n]);\n\n/**\n * An array of TABLE tag properties and events.\n *\n * @public\n */\nexport const tableProperties = toObjectMap(htmlElementProperties, [\n 'cellPadding', // table\n 'cellSpacing', // table\n]);\n\n/**\n * An array of TR tag properties and events.\n *\n * @public\n */\nexport const trProperties = htmlElementProperties;\n\n/**\n * An array of TH tag properties and events.\n *\n * @public\n */\nexport const thProperties = toObjectMap(htmlElementProperties, [\n 'rowSpan', // td, th\n 'scope', // th\n]);\n\n/**\n * An array of TD tag properties and events.\n *\n * @public\n */\nexport const tdProperties = toObjectMap(htmlElementProperties, [\n 'colSpan', // td\n 'headers', // td\n 'rowSpan', // td, th\n 'scope', // th\n]);\n\nexport const colGroupProperties = toObjectMap(htmlElementProperties, [\n 'span', // col, colgroup\n]);\n\nexport const colProperties = toObjectMap(htmlElementProperties, [\n 'span', // col, colgroup\n]);\n\n/**\n * An array of FIELDSET tag properties and events.\n *\n * @public\n */\nexport const fieldsetProperties = toObjectMap(htmlElementProperties, [\n 'disabled', // button, fieldset, input, optgroup, option, select, textarea\n 'form', // button, fieldset, input, label, meter, object, output, select, textarea\n]);\n\n/**\n * An array of FORM tag properties and events.\n *\n * @public\n */\nexport const formProperties = toObjectMap(htmlElementProperties, [\n 'acceptCharset', // form\n 'action', // form\n 'encType', // form\n 'encType', // form\n 'method', // form\n 'noValidate', // form\n 'target', // form\n]);\n\n/**\n * An array of IFRAME tag properties and events.\n *\n * @public\n */\nexport const iframeProperties = toObjectMap(htmlElementProperties, [\n 'allow', // iframe\n 'allowFullScreen', // iframe\n 'allowPaymentRequest', // iframe\n 'allowTransparency', // iframe\n 'csp', // iframe\n 'height', // canvas, embed, iframe, img, input, object, video\n 'importance', // iframe\n 'referrerPolicy', // iframe\n 'sandbox', // iframe\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'srcDoc', // iframe\n 'width', // canvas, embed, iframe, img, input, object, video,\n]);\n\n/**\n * An array of IMAGE tag properties and events.\n *\n * @public\n */\nexport const imgProperties = toObjectMap(htmlElementProperties, [\n 'alt', // area, img, input\n 'crossOrigin', // img\n 'height', // canvas, embed, iframe, img, input, object, video\n 'src', // audio, embed, iframe, img, input, script, source, track, video\n 'srcSet', // img, source\n 'useMap', // img, object,\n 'width', // canvas, embed, iframe, img, input, object, video\n]);\n\n/**\n * @deprecated Use imgProperties for img elements.\n */\nexport const imageProperties = imgProperties;\n\n/**\n * An array of DIV tag properties and events.\n *\n * @public\n */\nexport const divProperties = htmlElementProperties;\n\n/**\n * Gets native supported props for an html element provided the allowance set. Use one of the property\n * sets defined (divProperties, buttonPropertes, etc) to filter out supported properties from a given\n * props set. Note that all data- and aria- prefixed attributes will be allowed.\n * NOTE: getNativeProps should always be applied first when adding props to a react component. The\n * non-native props should be applied second. This will prevent getNativeProps from overriding your custom props.\n * For example, if props passed to getNativeProps has an onClick function and getNativeProps is added to\n * the component after an onClick function is added, then the getNativeProps onClick will override it.\n *\n * @public\n * @param props - The unfiltered input props\n * @param allowedPropsNames - The array or record of allowed prop names.\n * @returns The filtered props\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function getNativeProps<T extends Record<string, any>>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n props: Record<string, any>,\n allowedPropNames: string[] | Record<string, number>,\n excludedPropNames?: string[],\n): T {\n // It'd be great to properly type this while allowing 'aria-` and 'data-' attributes like TypeScript does for\n // JSX attributes, but that ability is hardcoded into the TS compiler with no analog in TypeScript typings.\n // Then we'd be able to enforce props extends native props (including aria- and data- attributes), and then\n // return native props.\n // We should be able to do this once this PR is merged: https://github.com/microsoft/TypeScript/pull/26797\n\n const isArray = Array.isArray(allowedPropNames);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const result: Record<string, any> = {};\n const keys = Object.keys(props);\n\n for (const key of keys) {\n const isNativeProp =\n (!isArray && (allowedPropNames as Record<string, number>)[key]) ||\n (isArray && (allowedPropNames as string[]).indexOf(key) >= 0) ||\n key.indexOf('data-') === 0 ||\n key.indexOf('aria-') === 0;\n\n if (isNativeProp && (!excludedPropNames || excludedPropNames?.indexOf(key) === -1)) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n result[key] = props![key] as any;\n }\n }\n\n return result as T;\n}\n"],"sourceRoot":"../src/"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-utilities",
|
3
|
-
"version": "0.0.0-nightly-
|
3
|
+
"version": "0.0.0-nightly-20220506-0417.1",
|
4
4
|
"description": "A set of general React-specific utilities.",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -20,7 +20,7 @@
|
|
20
20
|
"lint": "just-scripts lint",
|
21
21
|
"test": "jest --passWithNoTests",
|
22
22
|
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
|
23
|
-
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node
|
23
|
+
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../../scripts/typescript/normalize-import --output ./dist/packages/react-components/react-utilities/src && yarn docs",
|
24
24
|
"start": "yarn storybook",
|
25
25
|
"type-check": "tsc -b tsconfig.json"
|
26
26
|
},
|
@@ -29,7 +29,7 @@
|
|
29
29
|
"@fluentui/scripts": "^1.0.0"
|
30
30
|
},
|
31
31
|
"dependencies": {
|
32
|
-
"@fluentui/keyboard-keys": "0.0.0-nightly-
|
32
|
+
"@fluentui/keyboard-keys": "0.0.0-nightly-20220506-0417.1",
|
33
33
|
"tslib": "^2.1.0"
|
34
34
|
},
|
35
35
|
"peerDependencies": {
|