@fluentui/react-switch 9.0.0-nightly.46b9ea7036.0 → 9.0.0-rc.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 +265 -30
- package/CHANGELOG.md +69 -17
- package/Spec.md +4 -4
- package/dist/react-switch.d.ts +14 -17
- package/lib/components/Switch/Switch.js +7 -7
- package/lib/components/Switch/Switch.js.map +1 -1
- package/lib/components/Switch/Switch.types.d.ts +10 -9
- package/lib/components/Switch/renderSwitch.d.ts +1 -1
- package/lib/components/Switch/renderSwitch.js +12 -8
- package/lib/components/Switch/renderSwitch.js.map +1 -1
- package/lib/components/Switch/useSwitch.d.ts +2 -6
- package/lib/components/Switch/useSwitch.js +21 -25
- package/lib/components/Switch/useSwitch.js.map +1 -1
- package/lib/components/Switch/useSwitchState.js +48 -56
- package/lib/components/Switch/useSwitchState.js.map +1 -1
- package/lib/components/Switch/useSwitchStyles.d.ts +2 -1
- package/lib/components/Switch/useSwitchStyles.js +69 -63
- package/lib/components/Switch/useSwitchStyles.js.map +1 -1
- package/lib-commonjs/Switch.js +1 -1
- package/lib-commonjs/components/Switch/Switch.js +8 -8
- package/lib-commonjs/components/Switch/Switch.js.map +1 -1
- package/lib-commonjs/components/Switch/Switch.types.d.ts +10 -9
- package/lib-commonjs/components/Switch/index.js +1 -1
- package/lib-commonjs/components/Switch/renderSwitch.d.ts +1 -1
- package/lib-commonjs/components/Switch/renderSwitch.js +16 -14
- package/lib-commonjs/components/Switch/renderSwitch.js.map +1 -1
- package/lib-commonjs/components/Switch/useSwitch.d.ts +2 -6
- package/lib-commonjs/components/Switch/useSwitch.js +26 -31
- package/lib-commonjs/components/Switch/useSwitch.js.map +1 -1
- package/lib-commonjs/components/Switch/useSwitchState.js +51 -59
- package/lib-commonjs/components/Switch/useSwitchState.js.map +1 -1
- package/lib-commonjs/components/Switch/useSwitchStyles.d.ts +2 -1
- package/lib-commonjs/components/Switch/useSwitchStyles.js +78 -71
- package/lib-commonjs/components/Switch/useSwitchStyles.js.map +1 -1
- package/lib-commonjs/index.js +1 -1
- package/package.json +10 -15
- package/lib/common/isConformant.d.ts +0 -4
- package/lib/common/isConformant.js +0 -12
- package/lib/common/isConformant.js.map +0 -1
- package/lib-commonjs/common/isConformant.d.ts +0 -4
- package/lib-commonjs/common/isConformant.js +0 -23
- package/lib-commonjs/common/isConformant.js.map +0 -1
package/CHANGELOG.json
CHANGED
@@ -2,88 +2,323 @@
|
|
2
2
|
"name": "@fluentui/react-switch",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
6
|
-
"tag": "@fluentui/react-switch_v9.0.0-
|
7
|
-
"version": "9.0.0-
|
5
|
+
"date": "Thu, 10 Feb 2022 08:44:05 GMT",
|
6
|
+
"tag": "@fluentui/react-switch_v9.0.0-rc.1",
|
7
|
+
"version": "9.0.0-rc.1",
|
8
8
|
"comments": {
|
9
|
+
"none": [
|
10
|
+
{
|
11
|
+
"author": "martinhochel@microsoft.com",
|
12
|
+
"package": "@fluentui/react-switch",
|
13
|
+
"commit": "8dfa712156b70414205b87b5b6d099367b0c297d",
|
14
|
+
"comment": "chore: use storybook runner for all vNext packages"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"author": "andredias@microsoft.com",
|
18
|
+
"package": "@fluentui/react-switch",
|
19
|
+
"commit": "bf950e951b102fd8be046993dbb604073fc4ea9e",
|
20
|
+
"comment": "Migrate package to use solution tsconfigs"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"author": "martinhochel@microsoft.com",
|
24
|
+
"package": "@fluentui/react-switch",
|
25
|
+
"commit": "28ceaaa83cd92a0389c466f0b15b283e3d9b08e4",
|
26
|
+
"comment": "test(react-switch): update snapshots to match new JSDOM"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"author": "olfedias@microsoft.com",
|
30
|
+
"package": "@fluentui/react-switch",
|
31
|
+
"commit": "c061e98be4b4a718c72a144a1f60bb5515824612",
|
32
|
+
"comment": "remove inline-style-expand-shorthand from tsconfigs"
|
33
|
+
}
|
34
|
+
],
|
9
35
|
"prerelease": [
|
10
36
|
{
|
11
|
-
"author": "
|
37
|
+
"author": "olfedias@microsoft.com",
|
38
|
+
"package": "@fluentui/react-switch",
|
39
|
+
"commit": "1df1d6e85bd3a6ab2a7b13e96a9aac324bb6d00c",
|
40
|
+
"comment": "Replace make-styles packages with griffel equivalents."
|
41
|
+
},
|
42
|
+
{
|
43
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
44
|
+
"package": "@fluentui/react-switch",
|
45
|
+
"commit": "e0b8e1fa6980077e7b311fd1c72c28d3e4305db0",
|
46
|
+
"comment": "Updating based on changes to composition types."
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"author": "behowell@microsoft.com",
|
50
|
+
"package": "@fluentui/react-switch",
|
51
|
+
"commit": "7cc28ed8320b00f42d91c63882f10316db2205c5",
|
52
|
+
"comment": "Remove component's shorthandProps array"
|
53
|
+
},
|
54
|
+
{
|
55
|
+
"author": "behowell@microsoft.com",
|
56
|
+
"package": "@fluentui/react-switch",
|
57
|
+
"commit": "53b01d71e335715fda91b33e3d7bbd9d471d5ed3",
|
58
|
+
"comment": "Refactor component Slot typings"
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"author": "mgodbolt@microsoft.com",
|
62
|
+
"package": "@fluentui/react-switch",
|
63
|
+
"commit": "839ec14849e112b85aa321d034739ec421199141",
|
64
|
+
"comment": "remove export of commons types"
|
65
|
+
},
|
66
|
+
{
|
67
|
+
"author": "olfedias@microsoft.com",
|
68
|
+
"package": "@fluentui/react-switch",
|
69
|
+
"commit": "029a7f2fe40e5abe21d8992ad9d92bf2b04d0e97",
|
70
|
+
"comment": "update styles to not use CSS shorthands"
|
71
|
+
},
|
72
|
+
{
|
73
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
74
|
+
"package": "@fluentui/react-switch",
|
75
|
+
"commit": "b52ebbbf185a2ddc4de814238f9438fd04bfba02",
|
76
|
+
"comment": "Replacing use of functions in makeStyles with direct use of tokens."
|
77
|
+
},
|
78
|
+
{
|
79
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
80
|
+
"package": "@fluentui/react-switch",
|
81
|
+
"commit": "38c8bed2c707014688ae2ae689033fa36ef23075",
|
82
|
+
"comment": "Updating packages based on changes to focusIndicator functions to remove functions from makeStyles in @fluentui/react-tabster."
|
83
|
+
},
|
84
|
+
{
|
85
|
+
"author": "behowell@microsoft.com",
|
86
|
+
"package": "@fluentui/react-switch",
|
87
|
+
"commit": "317209bb5cd57c40f35bc42060acb7e3cce5ec95",
|
88
|
+
"comment": "BREAKING: Rename component hooks add the suffix _unstable, as their API has not been finalized yet"
|
89
|
+
},
|
90
|
+
{
|
91
|
+
"author": "lingfangao@hotmail.com",
|
92
|
+
"package": "@fluentui/react-switch",
|
93
|
+
"commit": "c00913d50e2dd15bbfbb0757cefe43b192ff1d7f",
|
94
|
+
"comment": "Bump Fluent UI dependencies to 9.0.0-rc"
|
95
|
+
},
|
96
|
+
{
|
97
|
+
"author": "beachball",
|
98
|
+
"package": "@fluentui/react-switch",
|
99
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.0.0-rc.1",
|
100
|
+
"commit": "e6c855f6d9019d6c73668d15fc9bc3a13291a6c8"
|
101
|
+
},
|
102
|
+
{
|
103
|
+
"author": "beachball",
|
104
|
+
"package": "@fluentui/react-switch",
|
105
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-rc.1",
|
106
|
+
"commit": "e6c855f6d9019d6c73668d15fc9bc3a13291a6c8"
|
107
|
+
},
|
108
|
+
{
|
109
|
+
"author": "beachball",
|
110
|
+
"package": "@fluentui/react-switch",
|
111
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-rc.1",
|
112
|
+
"commit": "e6c855f6d9019d6c73668d15fc9bc3a13291a6c8"
|
113
|
+
},
|
114
|
+
{
|
115
|
+
"author": "beachball",
|
116
|
+
"package": "@fluentui/react-switch",
|
117
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.1",
|
118
|
+
"commit": "e6c855f6d9019d6c73668d15fc9bc3a13291a6c8"
|
119
|
+
}
|
120
|
+
]
|
121
|
+
}
|
122
|
+
},
|
123
|
+
{
|
124
|
+
"date": "Thu, 25 Nov 2021 08:34:17 GMT",
|
125
|
+
"tag": "@fluentui/react-switch_v9.0.0-beta.5",
|
126
|
+
"version": "9.0.0-beta.5",
|
127
|
+
"comments": {
|
128
|
+
"prerelease": [
|
129
|
+
{
|
130
|
+
"author": "beachball",
|
12
131
|
"package": "@fluentui/react-switch",
|
13
|
-
"comment": "
|
14
|
-
"commit": "
|
132
|
+
"comment": "Bump @fluentui/react-make-styles to v9.0.0-beta.4",
|
133
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
15
134
|
},
|
135
|
+
{
|
136
|
+
"author": "beachball",
|
137
|
+
"package": "@fluentui/react-switch",
|
138
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.0.0-beta.4",
|
139
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
140
|
+
},
|
141
|
+
{
|
142
|
+
"author": "beachball",
|
143
|
+
"package": "@fluentui/react-switch",
|
144
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-beta.5",
|
145
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
146
|
+
},
|
147
|
+
{
|
148
|
+
"author": "beachball",
|
149
|
+
"package": "@fluentui/react-switch",
|
150
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-beta.4",
|
151
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
152
|
+
},
|
153
|
+
{
|
154
|
+
"author": "beachball",
|
155
|
+
"package": "@fluentui/react-switch",
|
156
|
+
"comment": "Bump @fluentui/babel-make-styles to v9.0.0-beta.4",
|
157
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
158
|
+
},
|
159
|
+
{
|
160
|
+
"author": "beachball",
|
161
|
+
"package": "@fluentui/react-switch",
|
162
|
+
"comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.4",
|
163
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
164
|
+
},
|
165
|
+
{
|
166
|
+
"author": "beachball",
|
167
|
+
"package": "@fluentui/react-switch",
|
168
|
+
"comment": "Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.4",
|
169
|
+
"commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
|
170
|
+
}
|
171
|
+
]
|
172
|
+
}
|
173
|
+
},
|
174
|
+
{
|
175
|
+
"date": "Fri, 12 Nov 2021 13:25:33 GMT",
|
176
|
+
"tag": "@fluentui/react-switch_v9.0.0-beta.4",
|
177
|
+
"version": "9.0.0-beta.4",
|
178
|
+
"comments": {
|
179
|
+
"none": [
|
180
|
+
{
|
181
|
+
"author": "olfedias@microsoft.com",
|
182
|
+
"package": "@fluentui/react-switch",
|
183
|
+
"commit": "9e6977945782df1cc997c92804a1b214cc4e4f43",
|
184
|
+
"comment": "do not use other packages in devDependencies"
|
185
|
+
},
|
186
|
+
{
|
187
|
+
"author": "lingfangao@hotmail.com",
|
188
|
+
"package": "@fluentui/react-switch",
|
189
|
+
"commit": "00f70581480b536e723fb69edf0ae617beac4807",
|
190
|
+
"comment": "Remove beta release tag"
|
191
|
+
}
|
192
|
+
],
|
193
|
+
"prerelease": [
|
194
|
+
{
|
195
|
+
"author": "olfedias@microsoft.com",
|
196
|
+
"package": "@fluentui/react-switch",
|
197
|
+
"commit": "9186578324773f95f4d61be3d70e67752159d843",
|
198
|
+
"comment": "export static classes for components"
|
199
|
+
},
|
200
|
+
{
|
201
|
+
"author": "beachball",
|
202
|
+
"package": "@fluentui/react-switch",
|
203
|
+
"comment": "Bump @fluentui/react-make-styles to v9.0.0-beta.3",
|
204
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
205
|
+
},
|
206
|
+
{
|
207
|
+
"author": "beachball",
|
208
|
+
"package": "@fluentui/react-switch",
|
209
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.0.0-beta.3",
|
210
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
211
|
+
},
|
212
|
+
{
|
213
|
+
"author": "beachball",
|
214
|
+
"package": "@fluentui/react-switch",
|
215
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-beta.4",
|
216
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
217
|
+
},
|
218
|
+
{
|
219
|
+
"author": "beachball",
|
220
|
+
"package": "@fluentui/react-switch",
|
221
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-beta.3",
|
222
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
223
|
+
},
|
224
|
+
{
|
225
|
+
"author": "beachball",
|
226
|
+
"package": "@fluentui/react-switch",
|
227
|
+
"comment": "Bump @fluentui/babel-make-styles to v9.0.0-beta.3",
|
228
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
229
|
+
},
|
230
|
+
{
|
231
|
+
"author": "beachball",
|
232
|
+
"package": "@fluentui/react-switch",
|
233
|
+
"comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.3",
|
234
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
235
|
+
},
|
236
|
+
{
|
237
|
+
"author": "beachball",
|
238
|
+
"package": "@fluentui/react-switch",
|
239
|
+
"comment": "Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.3",
|
240
|
+
"commit": "742342e52c65066f779232e4e1302fedf0dd460d"
|
241
|
+
}
|
242
|
+
]
|
243
|
+
}
|
244
|
+
},
|
245
|
+
{
|
246
|
+
"date": "Wed, 27 Oct 2021 12:14:22 GMT",
|
247
|
+
"tag": "@fluentui/react-switch_v9.0.0-beta.3",
|
248
|
+
"version": "9.0.0-beta.3",
|
249
|
+
"comments": {
|
250
|
+
"prerelease": [
|
16
251
|
{
|
17
252
|
"author": "czearing@outlook.com",
|
18
253
|
"package": "@fluentui/react-switch",
|
19
|
-
"
|
20
|
-
"
|
254
|
+
"commit": "ae512f66872beea9d95a168d759406d42281d835",
|
255
|
+
"comment": "Changing the Switch's onKeyDown event to onKeyUp."
|
21
256
|
},
|
22
257
|
{
|
23
258
|
"author": "peter@draxler.ml",
|
24
259
|
"package": "@fluentui/react-switch",
|
25
|
-
"
|
26
|
-
"
|
260
|
+
"commit": "f6db7c8d6b7db0902775e7857b62b745be35b59a",
|
261
|
+
"comment": "added styling of documentation"
|
27
262
|
},
|
28
263
|
{
|
29
264
|
"author": "beachball",
|
30
265
|
"package": "@fluentui/react-switch",
|
31
|
-
"comment": "Bump @fluentui/react-make-styles to v9.0.0-
|
32
|
-
"commit": "
|
266
|
+
"comment": "Bump @fluentui/react-make-styles to v9.0.0-beta.2",
|
267
|
+
"commit": "0f8f1ae7c2d908e51e29dd342d79e041f86fac08"
|
33
268
|
},
|
34
269
|
{
|
35
270
|
"author": "beachball",
|
36
271
|
"package": "@fluentui/react-switch",
|
37
|
-
"comment": "Bump @fluentui/react-shared-contexts to v9.0.0-
|
38
|
-
"commit": "
|
272
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.0.0-beta.2",
|
273
|
+
"commit": "0f8f1ae7c2d908e51e29dd342d79e041f86fac08"
|
39
274
|
},
|
40
275
|
{
|
41
276
|
"author": "beachball",
|
42
277
|
"package": "@fluentui/react-switch",
|
43
|
-
"comment": "Bump @fluentui/react-tabster to v9.0.0-
|
44
|
-
"commit": "
|
278
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-beta.3",
|
279
|
+
"commit": "0f8f1ae7c2d908e51e29dd342d79e041f86fac08"
|
45
280
|
},
|
46
281
|
{
|
47
282
|
"author": "beachball",
|
48
283
|
"package": "@fluentui/react-switch",
|
49
|
-
"comment": "Bump @fluentui/react-utilities to v9.0.0-
|
50
|
-
"commit": "
|
284
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-beta.2",
|
285
|
+
"commit": "0f8f1ae7c2d908e51e29dd342d79e041f86fac08"
|
51
286
|
},
|
52
287
|
{
|
53
288
|
"author": "beachball",
|
54
289
|
"package": "@fluentui/react-switch",
|
55
|
-
"comment": "Bump @fluentui/babel-make-styles to v9.0.0-
|
56
|
-
"commit": "
|
290
|
+
"comment": "Bump @fluentui/babel-make-styles to v9.0.0-beta.2",
|
291
|
+
"commit": "0f8f1ae7c2d908e51e29dd342d79e041f86fac08"
|
57
292
|
},
|
58
293
|
{
|
59
294
|
"author": "beachball",
|
60
295
|
"package": "@fluentui/react-switch",
|
61
|
-
"comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-
|
62
|
-
"commit": "
|
296
|
+
"comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.2",
|
297
|
+
"commit": "0f8f1ae7c2d908e51e29dd342d79e041f86fac08"
|
63
298
|
},
|
64
299
|
{
|
65
300
|
"author": "beachball",
|
66
301
|
"package": "@fluentui/react-switch",
|
67
|
-
"comment": "Bump @fluentui/react-conformance-make-styles to v9.0.0-
|
68
|
-
"commit": "
|
302
|
+
"comment": "Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.2",
|
303
|
+
"commit": "0f8f1ae7c2d908e51e29dd342d79e041f86fac08"
|
69
304
|
},
|
70
305
|
{
|
71
306
|
"author": "beachball",
|
72
307
|
"package": "@fluentui/react-switch",
|
73
|
-
"comment": "Bump @fluentui/react-label to v9.0.0-
|
74
|
-
"commit": "
|
308
|
+
"comment": "Bump @fluentui/react-label to v9.0.0-beta.2",
|
309
|
+
"commit": "0f8f1ae7c2d908e51e29dd342d79e041f86fac08"
|
75
310
|
},
|
76
311
|
{
|
77
312
|
"author": "beachball",
|
78
313
|
"package": "@fluentui/react-switch",
|
79
|
-
"comment": "Bump @fluentui/react-provider to v9.0.0-
|
80
|
-
"commit": "
|
314
|
+
"comment": "Bump @fluentui/react-provider to v9.0.0-beta.3",
|
315
|
+
"commit": "0f8f1ae7c2d908e51e29dd342d79e041f86fac08"
|
81
316
|
},
|
82
317
|
{
|
83
318
|
"author": "beachball",
|
84
319
|
"package": "@fluentui/react-switch",
|
85
|
-
"comment": "Bump @fluentui/react-theme to v9.0.0-
|
86
|
-
"commit": "
|
320
|
+
"comment": "Bump @fluentui/react-theme to v9.0.0-beta.2",
|
321
|
+
"commit": "0f8f1ae7c2d908e51e29dd342d79e041f86fac08"
|
87
322
|
}
|
88
323
|
]
|
89
324
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,29 +1,81 @@
|
|
1
1
|
# Change Log - @fluentui/react-switch
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Thu, 10 Feb 2022 08:44:05 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
-
## [9.0.0-
|
7
|
+
## [9.0.0-rc.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-rc.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-beta.
|
9
|
+
Thu, 10 Feb 2022 08:44:05 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-beta.5..@fluentui/react-switch_v9.0.0-rc.1)
|
11
11
|
|
12
12
|
### Changes
|
13
13
|
|
14
|
-
-
|
15
|
-
-
|
16
|
-
-
|
17
|
-
-
|
18
|
-
-
|
19
|
-
-
|
20
|
-
-
|
21
|
-
-
|
22
|
-
-
|
23
|
-
- Bump
|
24
|
-
- Bump @fluentui/react-
|
25
|
-
- Bump @fluentui/react-
|
26
|
-
- Bump @fluentui/react-
|
14
|
+
- Replace make-styles packages with griffel equivalents. ([PR #21424](https://github.com/microsoft/fluentui/pull/21424) by olfedias@microsoft.com)
|
15
|
+
- Updating based on changes to composition types. ([PR #20891](https://github.com/microsoft/fluentui/pull/20891) by Humberto.Morimoto@microsoft.com)
|
16
|
+
- Remove component's shorthandProps array ([PR #21134](https://github.com/microsoft/fluentui/pull/21134) by behowell@microsoft.com)
|
17
|
+
- Refactor component Slot typings ([PR #21518](https://github.com/microsoft/fluentui/pull/21518) by behowell@microsoft.com)
|
18
|
+
- remove export of commons types ([PR #21660](https://github.com/microsoft/fluentui/pull/21660) by mgodbolt@microsoft.com)
|
19
|
+
- update styles to not use CSS shorthands ([PR #20844](https://github.com/microsoft/fluentui/pull/20844) by olfedias@microsoft.com)
|
20
|
+
- Replacing use of functions in makeStyles with direct use of tokens. ([PR #21056](https://github.com/microsoft/fluentui/pull/21056) by Humberto.Morimoto@microsoft.com)
|
21
|
+
- Updating packages based on changes to focusIndicator functions to remove functions from makeStyles in @fluentui/react-tabster. ([PR #21035](https://github.com/microsoft/fluentui/pull/21035) by Humberto.Morimoto@microsoft.com)
|
22
|
+
- BREAKING: Rename component hooks add the suffix _unstable, as their API has not been finalized yet ([PR #21365](https://github.com/microsoft/fluentui/pull/21365) by behowell@microsoft.com)
|
23
|
+
- Bump Fluent UI dependencies to 9.0.0-rc ([PR #21623](https://github.com/microsoft/fluentui/pull/21623) by lingfangao@hotmail.com)
|
24
|
+
- Bump @fluentui/react-shared-contexts to v9.0.0-rc.1 ([commit](https://github.com/microsoft/fluentui/commit/e6c855f6d9019d6c73668d15fc9bc3a13291a6c8) by beachball)
|
25
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.1 ([commit](https://github.com/microsoft/fluentui/commit/e6c855f6d9019d6c73668d15fc9bc3a13291a6c8) by beachball)
|
26
|
+
- Bump @fluentui/react-utilities to v9.0.0-rc.1 ([commit](https://github.com/microsoft/fluentui/commit/e6c855f6d9019d6c73668d15fc9bc3a13291a6c8) by beachball)
|
27
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.1 ([commit](https://github.com/microsoft/fluentui/commit/e6c855f6d9019d6c73668d15fc9bc3a13291a6c8) by beachball)
|
28
|
+
|
29
|
+
## [9.0.0-beta.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-beta.5)
|
30
|
+
|
31
|
+
Thu, 25 Nov 2021 08:34:17 GMT
|
32
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-beta.4..@fluentui/react-switch_v9.0.0-beta.5)
|
33
|
+
|
34
|
+
### Changes
|
35
|
+
|
36
|
+
- Bump @fluentui/react-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
37
|
+
- Bump @fluentui/react-shared-contexts to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
38
|
+
- Bump @fluentui/react-tabster to v9.0.0-beta.5 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
39
|
+
- Bump @fluentui/react-utilities to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
40
|
+
- Bump @fluentui/babel-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
41
|
+
- Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
42
|
+
- Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
|
43
|
+
|
44
|
+
## [9.0.0-beta.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-beta.4)
|
45
|
+
|
46
|
+
Fri, 12 Nov 2021 13:25:33 GMT
|
47
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-beta.3..@fluentui/react-switch_v9.0.0-beta.4)
|
48
|
+
|
49
|
+
### Changes
|
50
|
+
|
51
|
+
- export static classes for components ([PR #20456](https://github.com/microsoft/fluentui/pull/20456) by olfedias@microsoft.com)
|
52
|
+
- Bump @fluentui/react-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
53
|
+
- Bump @fluentui/react-shared-contexts to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
54
|
+
- Bump @fluentui/react-tabster to v9.0.0-beta.4 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
55
|
+
- Bump @fluentui/react-utilities to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
56
|
+
- Bump @fluentui/babel-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
57
|
+
- Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
58
|
+
- Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
|
59
|
+
|
60
|
+
## [9.0.0-beta.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-beta.3)
|
61
|
+
|
62
|
+
Wed, 27 Oct 2021 12:14:22 GMT
|
63
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-beta.2..@fluentui/react-switch_v9.0.0-beta.3)
|
64
|
+
|
65
|
+
### Changes
|
66
|
+
|
67
|
+
- Changing the Switch's onKeyDown event to onKeyUp. ([PR #20217](https://github.com/microsoft/fluentui/pull/20217) by czearing@outlook.com)
|
68
|
+
- added styling of documentation ([PR #20193](https://github.com/microsoft/fluentui/pull/20193) by peter@draxler.ml)
|
69
|
+
- Bump @fluentui/react-make-styles to v9.0.0-beta.2 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
|
70
|
+
- Bump @fluentui/react-shared-contexts to v9.0.0-beta.2 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
|
71
|
+
- Bump @fluentui/react-tabster to v9.0.0-beta.3 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
|
72
|
+
- Bump @fluentui/react-utilities to v9.0.0-beta.2 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
|
73
|
+
- Bump @fluentui/babel-make-styles to v9.0.0-beta.2 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
|
74
|
+
- Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.2 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
|
75
|
+
- Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.2 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
|
76
|
+
- Bump @fluentui/react-label to v9.0.0-beta.2 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
|
77
|
+
- Bump @fluentui/react-provider to v9.0.0-beta.3 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
|
78
|
+
- Bump @fluentui/react-theme to v9.0.0-beta.2 ([PR #20353](https://github.com/microsoft/fluentui/pull/20353) by beachball)
|
27
79
|
|
28
80
|
## [9.0.0-beta.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-beta.2)
|
29
81
|
|
package/Spec.md
CHANGED
@@ -86,10 +86,10 @@ Amongst other major component libraries (`Material UI`, `Ant Design`, `Evergreen
|
|
86
86
|
- _**DOM**_
|
87
87
|
|
88
88
|
```jsx=
|
89
|
-
<div className="
|
90
|
-
<div className="
|
91
|
-
<div className="
|
92
|
-
<div className="
|
89
|
+
<div className="fui-Switch">
|
90
|
+
<div className="fui-Switch-track" />
|
91
|
+
<div className="fui-Switch-thumbWrapper">
|
92
|
+
<div className="fui-Switch-thumb" />
|
93
93
|
</div>
|
94
94
|
<input type="checkbox" />
|
95
95
|
</div>;
|
package/dist/react-switch.d.ts
CHANGED
@@ -1,20 +1,22 @@
|
|
1
1
|
import type { ComponentProps } from '@fluentui/react-utilities';
|
2
2
|
import type { ComponentState } from '@fluentui/react-utilities';
|
3
3
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
4
|
-
import type { IntrinsicShorthandProps } from '@fluentui/react-utilities';
|
5
4
|
import * as React_2 from 'react';
|
5
|
+
import type { Slot } from '@fluentui/react-utilities';
|
6
6
|
|
7
7
|
/**
|
8
8
|
* Render the final JSX of Switch
|
9
9
|
*/
|
10
|
-
export declare const
|
10
|
+
export declare const renderSwitch_unstable: (state: SwitchState) => JSX.Element;
|
11
11
|
|
12
12
|
/**
|
13
13
|
* The Switch control enables users to trigger an option on or off through pressing on the component.
|
14
14
|
*/
|
15
15
|
export declare const Switch: ForwardRefComponent<SwitchProps>;
|
16
16
|
|
17
|
-
export declare
|
17
|
+
export declare const switchClassName = "fui-Switch";
|
18
|
+
|
19
|
+
declare interface SwitchCommons {
|
18
20
|
/**
|
19
21
|
* The starting value for a uncontrolled Switch. If `true` then the Switch will be enabled.
|
20
22
|
* Mutually exclusive with `checked` prop.
|
@@ -41,39 +43,34 @@ export declare interface SwitchCommons {
|
|
41
43
|
}) => void;
|
42
44
|
}
|
43
45
|
|
44
|
-
export declare interface SwitchProps extends Omit<ComponentProps<SwitchSlots
|
46
|
+
export declare interface SwitchProps extends Omit<ComponentProps<Partial<SwitchSlots>>, 'onChange'>, SwitchCommons {
|
45
47
|
}
|
46
48
|
|
47
|
-
/**
|
48
|
-
* Array of all shorthand properties listed in SwitchSlots
|
49
|
-
*/
|
50
|
-
export declare const switchShorthandProps: (keyof SwitchSlots)[];
|
51
|
-
|
52
49
|
export declare type SwitchSlots = {
|
53
50
|
/**
|
54
51
|
* The root of the Switch.
|
55
52
|
*/
|
56
|
-
root:
|
53
|
+
root: Slot<'div'>;
|
57
54
|
/**
|
58
55
|
* The bar indicating the status of the Switch.
|
59
56
|
*/
|
60
|
-
track:
|
57
|
+
track: NonNullable<Slot<'div'>>;
|
61
58
|
/**
|
62
59
|
* The wrapper around the thumb. It is used as the active area for the thumb to position itself.
|
63
60
|
*/
|
64
|
-
thumbWrapper:
|
61
|
+
thumbWrapper: NonNullable<Slot<'div'>>;
|
65
62
|
/**
|
66
63
|
* The circular icon indicating the status of the Switch.
|
67
64
|
*/
|
68
|
-
thumb:
|
65
|
+
thumb: NonNullable<Slot<'div'>>;
|
69
66
|
/**
|
70
67
|
* The hidden input that handles the Switch's internal functionality.
|
71
68
|
*/
|
72
|
-
input:
|
69
|
+
input: NonNullable<Slot<'input'>>;
|
73
70
|
/**
|
74
71
|
* The area in which the Switch's rail allows for the thumb to be dragged.
|
75
72
|
*/
|
76
|
-
activeRail:
|
73
|
+
activeRail: NonNullable<Slot<'div'>>;
|
77
74
|
};
|
78
75
|
|
79
76
|
export declare interface SwitchState extends ComponentState<SwitchSlots>, SwitchCommons {
|
@@ -82,11 +79,11 @@ export declare interface SwitchState extends ComponentState<SwitchSlots>, Switch
|
|
82
79
|
/**
|
83
80
|
* Given user props, returns state and render function for a Switch.
|
84
81
|
*/
|
85
|
-
export declare const
|
82
|
+
export declare const useSwitch_unstable: (props: SwitchProps, ref: React_2.Ref<HTMLElement>) => SwitchState;
|
86
83
|
|
87
84
|
/**
|
88
85
|
* Apply styling to the Switch slots based on the state
|
89
86
|
*/
|
90
|
-
export declare const
|
87
|
+
export declare const useSwitchStyles_unstable: (state: SwitchState) => SwitchState;
|
91
88
|
|
92
89
|
export { }
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
2
|
+
import { useSwitch_unstable } from './useSwitch';
|
3
|
+
import { renderSwitch_unstable } from './renderSwitch';
|
4
|
+
import { useSwitchStyles_unstable } from './useSwitchStyles';
|
5
5
|
/**
|
6
6
|
* The Switch control enables users to trigger an option on or off through pressing on the component.
|
7
7
|
*/
|
8
8
|
|
9
|
-
export
|
10
|
-
|
11
|
-
|
12
|
-
return
|
9
|
+
export const Switch = /*#__PURE__*/React.forwardRef((props, ref) => {
|
10
|
+
const state = useSwitch_unstable(props, ref);
|
11
|
+
useSwitchStyles_unstable(state);
|
12
|
+
return renderSwitch_unstable(state);
|
13
13
|
});
|
14
14
|
Switch.displayName = 'Switch';
|
15
15
|
//# sourceMappingURL=Switch.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Switch/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,
|
1
|
+
{"version":3,"sources":["../../../src/components/Switch/Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,kBAAT,QAAmC,aAAnC;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AACA,SAAS,wBAAT,QAAyC,mBAAzC;AAIA;;AAEG;;AACH,OAAO,MAAM,MAAM,gBAAqC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACtF,QAAM,KAAK,GAAG,kBAAkB,CAAC,KAAD,EAAQ,GAAR,CAAhC;AAEA,EAAA,wBAAwB,CAAC,KAAD,CAAxB;AAEA,SAAO,qBAAqB,CAAC,KAAD,CAA5B;AACD,CANuD,CAAjD;AAQP,MAAM,CAAC,WAAP,GAAqB,QAArB","sourceRoot":""}
|