@fluentui/react-switch 0.0.0-nightly65dd5f749420211213.1 → 0.0.0-nightly695230dc7220220301.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 +198 -21
- package/CHANGELOG.md +58 -12
- package/dist/react-switch.d.ts +59 -47
- package/lib/Switch.js.map +1 -1
- package/lib/components/Switch/Switch.d.ts +1 -1
- 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 +44 -37
- package/lib/components/Switch/Switch.types.js.map +1 -1
- package/lib/components/Switch/index.js.map +1 -1
- package/lib/components/Switch/renderSwitch.d.ts +2 -2
- package/lib/components/Switch/renderSwitch.js +10 -9
- package/lib/components/Switch/renderSwitch.js.map +1 -1
- package/lib/components/Switch/useSwitch.d.ts +9 -7
- package/lib/components/Switch/useSwitch.js +64 -49
- package/lib/components/Switch/useSwitch.js.map +1 -1
- package/lib/components/Switch/useSwitchStyles.d.ts +6 -3
- package/lib/components/Switch/useSwitchStyles.js +150 -282
- package/lib/components/Switch/useSwitchStyles.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Switch.js.map +1 -1
- package/lib-commonjs/components/Switch/Switch.d.ts +1 -1
- package/lib-commonjs/components/Switch/Switch.js +4 -4
- package/lib-commonjs/components/Switch/Switch.js.map +1 -1
- package/lib-commonjs/components/Switch/Switch.types.d.ts +44 -37
- package/lib-commonjs/components/Switch/Switch.types.js.map +1 -1
- package/lib-commonjs/components/Switch/index.js.map +1 -1
- package/lib-commonjs/components/Switch/renderSwitch.d.ts +2 -2
- package/lib-commonjs/components/Switch/renderSwitch.js +12 -12
- package/lib-commonjs/components/Switch/renderSwitch.js.map +1 -1
- package/lib-commonjs/components/Switch/useSwitch.d.ts +9 -7
- package/lib-commonjs/components/Switch/useSwitch.js +67 -50
- package/lib-commonjs/components/Switch/useSwitch.js.map +1 -1
- package/lib-commonjs/components/Switch/useSwitchStyles.d.ts +6 -3
- package/lib-commonjs/components/Switch/useSwitchStyles.js +155 -286
- package/lib-commonjs/components/Switch/useSwitchStyles.js.map +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +9 -9
- package/lib/components/Switch/useSwitchState.d.ts +0 -2
- package/lib/components/Switch/useSwitchState.js +0 -144
- package/lib/components/Switch/useSwitchState.js.map +0 -1
- package/lib-commonjs/components/Switch/useSwitchState.d.ts +0 -2
- package/lib-commonjs/components/Switch/useSwitchState.js +0 -156
- package/lib-commonjs/components/Switch/useSwitchState.js.map +0 -1
package/CHANGELOG.json
CHANGED
@@ -2,72 +2,249 @@
|
|
2
2
|
"name": "@fluentui/react-switch",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
6
|
-
"tag": "@fluentui/react-switch_v0.0.0-
|
7
|
-
"version": "0.0.0-
|
5
|
+
"date": "Tue, 01 Mar 2022 04:15:01 GMT",
|
6
|
+
"tag": "@fluentui/react-switch_v0.0.0-nightly695230dc7220220301.1",
|
7
|
+
"version": "0.0.0-nightly695230dc7220220301.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
11
11
|
"author": "email not defined",
|
12
12
|
"package": "@fluentui/react-switch",
|
13
|
-
"commit": "
|
13
|
+
"commit": "be1864c428aedd3bb265318a6cb6cf161ded2472",
|
14
14
|
"comment": "Release nightly v9"
|
15
15
|
},
|
16
|
+
{
|
17
|
+
"author": "beachball",
|
18
|
+
"package": "@fluentui/react-switch",
|
19
|
+
"comment": "Bump @fluentui/react-label to v0.0.0-nightly695230dc7220220301.1",
|
20
|
+
"commit": "be1864c428aedd3bb265318a6cb6cf161ded2472"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"author": "beachball",
|
24
|
+
"package": "@fluentui/react-switch",
|
25
|
+
"comment": "Bump @fluentui/react-tabster to v0.0.0-nightly695230dc7220220301.1",
|
26
|
+
"commit": "be1864c428aedd3bb265318a6cb6cf161ded2472"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"author": "beachball",
|
30
|
+
"package": "@fluentui/react-switch",
|
31
|
+
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly695230dc7220220301.1",
|
32
|
+
"commit": "be1864c428aedd3bb265318a6cb6cf161ded2472"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"author": "beachball",
|
36
|
+
"package": "@fluentui/react-switch",
|
37
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly695230dc7220220301.1",
|
38
|
+
"commit": "be1864c428aedd3bb265318a6cb6cf161ded2472"
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"author": "beachball",
|
42
|
+
"package": "@fluentui/react-switch",
|
43
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly695230dc7220220301.1",
|
44
|
+
"commit": "be1864c428aedd3bb265318a6cb6cf161ded2472"
|
45
|
+
}
|
46
|
+
]
|
47
|
+
}
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"date": "Tue, 01 Mar 2022 02:17:38 GMT",
|
51
|
+
"tag": "@fluentui/react-switch_v9.0.0-rc.4",
|
52
|
+
"version": "9.0.0-rc.4",
|
53
|
+
"comments": {
|
54
|
+
"prerelease": [
|
55
|
+
{
|
56
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
57
|
+
"package": "@fluentui/react-switch",
|
58
|
+
"commit": "72b08d56fa19f3b580da0497758af54a6afcf69b",
|
59
|
+
"comment": "Switch: Re-implementing component to make it simpler and making it adhere to latest patterns."
|
60
|
+
},
|
16
61
|
{
|
17
62
|
"author": "olfedias@microsoft.com",
|
18
63
|
"package": "@fluentui/react-switch",
|
19
|
-
"commit": "
|
20
|
-
"comment": "
|
64
|
+
"commit": "084d7408855f3e52b67cbca172da1acef9dcb98f",
|
65
|
+
"comment": "fix: Add react-theme as dependency"
|
21
66
|
},
|
22
67
|
{
|
23
68
|
"author": "beachball",
|
24
69
|
"package": "@fluentui/react-switch",
|
25
|
-
"comment": "Bump @fluentui/react-
|
26
|
-
"commit": "
|
70
|
+
"comment": "Bump @fluentui/react-label to v9.0.0-beta.8",
|
71
|
+
"commit": "0bc1e755543ed69443d5d03e1976c630583242f7"
|
27
72
|
},
|
28
73
|
{
|
29
74
|
"author": "beachball",
|
30
75
|
"package": "@fluentui/react-switch",
|
31
|
-
"comment": "Bump @fluentui/react-
|
32
|
-
"commit": "
|
76
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-rc.4",
|
77
|
+
"commit": "0bc1e755543ed69443d5d03e1976c630583242f7"
|
33
78
|
},
|
34
79
|
{
|
35
80
|
"author": "beachball",
|
36
81
|
"package": "@fluentui/react-switch",
|
37
|
-
"comment": "Bump @fluentui/react-
|
38
|
-
"commit": "
|
82
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-rc.4",
|
83
|
+
"commit": "0bc1e755543ed69443d5d03e1976c630583242f7"
|
84
|
+
}
|
85
|
+
]
|
86
|
+
}
|
87
|
+
},
|
88
|
+
{
|
89
|
+
"date": "Fri, 18 Feb 2022 13:35:34 GMT",
|
90
|
+
"tag": "@fluentui/react-switch_v9.0.0-rc.3",
|
91
|
+
"version": "9.0.0-rc.3",
|
92
|
+
"comments": {
|
93
|
+
"prerelease": [
|
94
|
+
{
|
95
|
+
"author": "mgodbolt@microsoft.com",
|
96
|
+
"package": "@fluentui/react-switch",
|
97
|
+
"commit": "2c9804dd585c1b485736c34321264dc62abe6fe1",
|
98
|
+
"comment": "fix visual display of controlled switches"
|
99
|
+
},
|
100
|
+
{
|
101
|
+
"author": "lingfangao@hotmail.com",
|
102
|
+
"package": "@fluentui/react-switch",
|
103
|
+
"commit": "1aa9e691fcccd9a64168cea7941c0f1e71fa1d14",
|
104
|
+
"comment": "fix: Source maps contain original source code"
|
39
105
|
},
|
40
106
|
{
|
41
107
|
"author": "beachball",
|
42
108
|
"package": "@fluentui/react-switch",
|
43
|
-
"comment": "Bump @fluentui/react-
|
44
|
-
"commit": "
|
109
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.0.0-rc.3",
|
110
|
+
"commit": "3b9c1e931c23173da3d1af0c696cdc58516ce504"
|
45
111
|
},
|
46
112
|
{
|
47
113
|
"author": "beachball",
|
48
114
|
"package": "@fluentui/react-switch",
|
49
|
-
"comment": "Bump @fluentui/
|
50
|
-
"commit": "
|
115
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-rc.3",
|
116
|
+
"commit": "3b9c1e931c23173da3d1af0c696cdc58516ce504"
|
51
117
|
},
|
52
118
|
{
|
53
119
|
"author": "beachball",
|
54
120
|
"package": "@fluentui/react-switch",
|
55
|
-
"comment": "Bump @fluentui/
|
56
|
-
"commit": "
|
121
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-rc.3",
|
122
|
+
"commit": "3b9c1e931c23173da3d1af0c696cdc58516ce504"
|
57
123
|
},
|
58
124
|
{
|
59
125
|
"author": "beachball",
|
60
126
|
"package": "@fluentui/react-switch",
|
61
|
-
"comment": "Bump @fluentui/react-conformance-
|
62
|
-
"commit": "
|
127
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.3",
|
128
|
+
"commit": "3b9c1e931c23173da3d1af0c696cdc58516ce504"
|
63
129
|
}
|
64
|
-
]
|
130
|
+
]
|
131
|
+
}
|
132
|
+
},
|
133
|
+
{
|
134
|
+
"date": "Thu, 10 Feb 2022 08:50:51 GMT",
|
135
|
+
"tag": "@fluentui/react-switch_v9.0.0-rc.1",
|
136
|
+
"version": "9.0.0-rc.1",
|
137
|
+
"comments": {
|
65
138
|
"none": [
|
139
|
+
{
|
140
|
+
"author": "martinhochel@microsoft.com",
|
141
|
+
"package": "@fluentui/react-switch",
|
142
|
+
"commit": "8dfa712156b70414205b87b5b6d099367b0c297d",
|
143
|
+
"comment": "chore: use storybook runner for all vNext packages"
|
144
|
+
},
|
66
145
|
{
|
67
146
|
"author": "andredias@microsoft.com",
|
68
147
|
"package": "@fluentui/react-switch",
|
69
148
|
"commit": "bf950e951b102fd8be046993dbb604073fc4ea9e",
|
70
149
|
"comment": "Migrate package to use solution tsconfigs"
|
150
|
+
},
|
151
|
+
{
|
152
|
+
"author": "martinhochel@microsoft.com",
|
153
|
+
"package": "@fluentui/react-switch",
|
154
|
+
"commit": "28ceaaa83cd92a0389c466f0b15b283e3d9b08e4",
|
155
|
+
"comment": "test(react-switch): update snapshots to match new JSDOM"
|
156
|
+
},
|
157
|
+
{
|
158
|
+
"author": "olfedias@microsoft.com",
|
159
|
+
"package": "@fluentui/react-switch",
|
160
|
+
"commit": "c061e98be4b4a718c72a144a1f60bb5515824612",
|
161
|
+
"comment": "remove inline-style-expand-shorthand from tsconfigs"
|
162
|
+
}
|
163
|
+
],
|
164
|
+
"prerelease": [
|
165
|
+
{
|
166
|
+
"author": "olfedias@microsoft.com",
|
167
|
+
"package": "@fluentui/react-switch",
|
168
|
+
"commit": "1df1d6e85bd3a6ab2a7b13e96a9aac324bb6d00c",
|
169
|
+
"comment": "Replace make-styles packages with griffel equivalents."
|
170
|
+
},
|
171
|
+
{
|
172
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
173
|
+
"package": "@fluentui/react-switch",
|
174
|
+
"commit": "e0b8e1fa6980077e7b311fd1c72c28d3e4305db0",
|
175
|
+
"comment": "Updating based on changes to composition types."
|
176
|
+
},
|
177
|
+
{
|
178
|
+
"author": "behowell@microsoft.com",
|
179
|
+
"package": "@fluentui/react-switch",
|
180
|
+
"commit": "7cc28ed8320b00f42d91c63882f10316db2205c5",
|
181
|
+
"comment": "Remove component's shorthandProps array"
|
182
|
+
},
|
183
|
+
{
|
184
|
+
"author": "behowell@microsoft.com",
|
185
|
+
"package": "@fluentui/react-switch",
|
186
|
+
"commit": "53b01d71e335715fda91b33e3d7bbd9d471d5ed3",
|
187
|
+
"comment": "Refactor component Slot typings"
|
188
|
+
},
|
189
|
+
{
|
190
|
+
"author": "mgodbolt@microsoft.com",
|
191
|
+
"package": "@fluentui/react-switch",
|
192
|
+
"commit": "839ec14849e112b85aa321d034739ec421199141",
|
193
|
+
"comment": "remove export of commons types"
|
194
|
+
},
|
195
|
+
{
|
196
|
+
"author": "olfedias@microsoft.com",
|
197
|
+
"package": "@fluentui/react-switch",
|
198
|
+
"commit": "029a7f2fe40e5abe21d8992ad9d92bf2b04d0e97",
|
199
|
+
"comment": "update styles to not use CSS shorthands"
|
200
|
+
},
|
201
|
+
{
|
202
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
203
|
+
"package": "@fluentui/react-switch",
|
204
|
+
"commit": "b52ebbbf185a2ddc4de814238f9438fd04bfba02",
|
205
|
+
"comment": "Replacing use of functions in makeStyles with direct use of tokens."
|
206
|
+
},
|
207
|
+
{
|
208
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
209
|
+
"package": "@fluentui/react-switch",
|
210
|
+
"commit": "38c8bed2c707014688ae2ae689033fa36ef23075",
|
211
|
+
"comment": "Updating packages based on changes to focusIndicator functions to remove functions from makeStyles in @fluentui/react-tabster."
|
212
|
+
},
|
213
|
+
{
|
214
|
+
"author": "behowell@microsoft.com",
|
215
|
+
"package": "@fluentui/react-switch",
|
216
|
+
"commit": "317209bb5cd57c40f35bc42060acb7e3cce5ec95",
|
217
|
+
"comment": "BREAKING: Rename component hooks add the suffix _unstable, as their API has not been finalized yet"
|
218
|
+
},
|
219
|
+
{
|
220
|
+
"author": "lingfangao@hotmail.com",
|
221
|
+
"package": "@fluentui/react-switch",
|
222
|
+
"commit": "c00913d50e2dd15bbfbb0757cefe43b192ff1d7f",
|
223
|
+
"comment": "Bump Fluent UI dependencies to 9.0.0-rc"
|
224
|
+
},
|
225
|
+
{
|
226
|
+
"author": "beachball",
|
227
|
+
"package": "@fluentui/react-switch",
|
228
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.0.0-rc.1",
|
229
|
+
"commit": "e6c855f6d9019d6c73668d15fc9bc3a13291a6c8"
|
230
|
+
},
|
231
|
+
{
|
232
|
+
"author": "beachball",
|
233
|
+
"package": "@fluentui/react-switch",
|
234
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-rc.1",
|
235
|
+
"commit": "e6c855f6d9019d6c73668d15fc9bc3a13291a6c8"
|
236
|
+
},
|
237
|
+
{
|
238
|
+
"author": "beachball",
|
239
|
+
"package": "@fluentui/react-switch",
|
240
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-rc.1",
|
241
|
+
"commit": "e6c855f6d9019d6c73668d15fc9bc3a13291a6c8"
|
242
|
+
},
|
243
|
+
{
|
244
|
+
"author": "beachball",
|
245
|
+
"package": "@fluentui/react-switch",
|
246
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.1",
|
247
|
+
"commit": "e6c855f6d9019d6c73668d15fc9bc3a13291a6c8"
|
71
248
|
}
|
72
249
|
]
|
73
250
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,25 +1,71 @@
|
|
1
1
|
# Change Log - @fluentui/react-switch
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Tue, 01 Mar 2022 04:15:01 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
-
## [0.0.0-
|
7
|
+
## [0.0.0-nightly695230dc7220220301.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v0.0.0-nightly695230dc7220220301.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-
|
9
|
+
Tue, 01 Mar 2022 04:15:01 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-rc.4..@fluentui/react-switch_v0.0.0-nightly695230dc7220220301.1)
|
11
11
|
|
12
12
|
### Changes
|
13
13
|
|
14
|
-
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/
|
14
|
+
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/be1864c428aedd3bb265318a6cb6cf161ded2472) by email not defined)
|
15
|
+
- Bump @fluentui/react-label to v0.0.0-nightly695230dc7220220301.1 ([commit](https://github.com/microsoft/fluentui/commit/be1864c428aedd3bb265318a6cb6cf161ded2472) by beachball)
|
16
|
+
- Bump @fluentui/react-tabster to v0.0.0-nightly695230dc7220220301.1 ([commit](https://github.com/microsoft/fluentui/commit/be1864c428aedd3bb265318a6cb6cf161ded2472) by beachball)
|
17
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly695230dc7220220301.1 ([commit](https://github.com/microsoft/fluentui/commit/be1864c428aedd3bb265318a6cb6cf161ded2472) by beachball)
|
18
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly695230dc7220220301.1 ([commit](https://github.com/microsoft/fluentui/commit/be1864c428aedd3bb265318a6cb6cf161ded2472) by beachball)
|
19
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly695230dc7220220301.1 ([commit](https://github.com/microsoft/fluentui/commit/be1864c428aedd3bb265318a6cb6cf161ded2472) by beachball)
|
20
|
+
|
21
|
+
## [9.0.0-rc.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-rc.4)
|
22
|
+
|
23
|
+
Tue, 01 Mar 2022 02:17:38 GMT
|
24
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-rc.3..@fluentui/react-switch_v9.0.0-rc.4)
|
25
|
+
|
26
|
+
### Changes
|
27
|
+
|
28
|
+
- Switch: Re-implementing component to make it simpler and making it adhere to latest patterns. ([PR #21849](https://github.com/microsoft/fluentui/pull/21849) by Humberto.Morimoto@microsoft.com)
|
29
|
+
- fix: Add react-theme as dependency ([PR #21825](https://github.com/microsoft/fluentui/pull/21825) by olfedias@microsoft.com)
|
30
|
+
- Bump @fluentui/react-label to v9.0.0-beta.8 ([PR #21884](https://github.com/microsoft/fluentui/pull/21884) by beachball)
|
31
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.4 ([PR #21884](https://github.com/microsoft/fluentui/pull/21884) by beachball)
|
32
|
+
- Bump @fluentui/react-utilities to v9.0.0-rc.4 ([PR #21884](https://github.com/microsoft/fluentui/pull/21884) by beachball)
|
33
|
+
|
34
|
+
## [9.0.0-rc.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-rc.3)
|
35
|
+
|
36
|
+
Fri, 18 Feb 2022 13:35:34 GMT
|
37
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-rc.1..@fluentui/react-switch_v9.0.0-rc.3)
|
38
|
+
|
39
|
+
### Changes
|
40
|
+
|
41
|
+
- fix visual display of controlled switches ([PR #21704](https://github.com/microsoft/fluentui/pull/21704) by mgodbolt@microsoft.com)
|
42
|
+
- fix: Source maps contain original source code ([PR #21690](https://github.com/microsoft/fluentui/pull/21690) by lingfangao@hotmail.com)
|
43
|
+
- Bump @fluentui/react-shared-contexts to v9.0.0-rc.3 ([PR #21800](https://github.com/microsoft/fluentui/pull/21800) by beachball)
|
44
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.3 ([PR #21800](https://github.com/microsoft/fluentui/pull/21800) by beachball)
|
45
|
+
- Bump @fluentui/react-utilities to v9.0.0-rc.3 ([PR #21800](https://github.com/microsoft/fluentui/pull/21800) by beachball)
|
46
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.3 ([PR #21800](https://github.com/microsoft/fluentui/pull/21800) by beachball)
|
47
|
+
|
48
|
+
## [9.0.0-rc.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-rc.1)
|
49
|
+
|
50
|
+
Thu, 10 Feb 2022 08:50:51 GMT
|
51
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-beta.5..@fluentui/react-switch_v9.0.0-rc.1)
|
52
|
+
|
53
|
+
### Changes
|
54
|
+
|
55
|
+
- Replace make-styles packages with griffel equivalents. ([PR #21424](https://github.com/microsoft/fluentui/pull/21424) by olfedias@microsoft.com)
|
56
|
+
- Updating based on changes to composition types. ([PR #20891](https://github.com/microsoft/fluentui/pull/20891) by Humberto.Morimoto@microsoft.com)
|
57
|
+
- Remove component's shorthandProps array ([PR #21134](https://github.com/microsoft/fluentui/pull/21134) by behowell@microsoft.com)
|
58
|
+
- Refactor component Slot typings ([PR #21518](https://github.com/microsoft/fluentui/pull/21518) by behowell@microsoft.com)
|
59
|
+
- remove export of commons types ([PR #21660](https://github.com/microsoft/fluentui/pull/21660) by mgodbolt@microsoft.com)
|
15
60
|
- update styles to not use CSS shorthands ([PR #20844](https://github.com/microsoft/fluentui/pull/20844) by olfedias@microsoft.com)
|
16
|
-
-
|
17
|
-
-
|
18
|
-
-
|
19
|
-
- Bump
|
20
|
-
- Bump @fluentui/
|
21
|
-
- Bump @fluentui/
|
22
|
-
- Bump @fluentui/react-
|
61
|
+
- 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)
|
62
|
+
- 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)
|
63
|
+
- 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)
|
64
|
+
- Bump Fluent UI dependencies to 9.0.0-rc ([PR #21623](https://github.com/microsoft/fluentui/pull/21623) by lingfangao@hotmail.com)
|
65
|
+
- Bump @fluentui/react-shared-contexts to v9.0.0-rc.1 ([commit](https://github.com/microsoft/fluentui/commit/e6c855f6d9019d6c73668d15fc9bc3a13291a6c8) by beachball)
|
66
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.1 ([commit](https://github.com/microsoft/fluentui/commit/e6c855f6d9019d6c73668d15fc9bc3a13291a6c8) by beachball)
|
67
|
+
- Bump @fluentui/react-utilities to v9.0.0-rc.1 ([commit](https://github.com/microsoft/fluentui/commit/e6c855f6d9019d6c73668d15fc9bc3a13291a6c8) by beachball)
|
68
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.1 ([commit](https://github.com/microsoft/fluentui/commit/e6c855f6d9019d6c73668d15fc9bc3a13291a6c8) by beachball)
|
23
69
|
|
24
70
|
## [9.0.0-beta.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-beta.5)
|
25
71
|
|
package/dist/react-switch.d.ts
CHANGED
@@ -1,94 +1,106 @@
|
|
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
|
4
|
+
import { Label } from '@fluentui/react-label';
|
5
5
|
import * as React_2 from 'react';
|
6
|
+
import type { Slot } from '@fluentui/react-utilities';
|
6
7
|
|
7
8
|
/**
|
8
|
-
* Render the
|
9
|
+
* Render a Switch component by passing the state defined props to the appropriate slots.
|
9
10
|
*/
|
10
|
-
export declare const
|
11
|
+
export declare const renderSwitch_unstable: (state: SwitchState) => JSX.Element;
|
11
12
|
|
12
13
|
/**
|
13
|
-
*
|
14
|
+
* Switches enable users to trigger an option on or off through pressing the component.
|
14
15
|
*/
|
15
16
|
export declare const Switch: ForwardRefComponent<SwitchProps>;
|
16
17
|
|
17
|
-
export declare const switchClassName
|
18
|
+
export declare const switchClassName: string;
|
18
19
|
|
19
|
-
export declare
|
20
|
+
export declare const switchClassNames: {
|
21
|
+
[SlotName in keyof SwitchSlots]-?: string;
|
22
|
+
};
|
23
|
+
|
24
|
+
declare type SwitchCommons = {
|
20
25
|
/**
|
21
|
-
*
|
22
|
-
*
|
23
|
-
*
|
26
|
+
* Defines the controlled checked state of the Switch.
|
27
|
+
* If passed, Switch ignores the `defaultChecked` property.
|
28
|
+
* This should only be used if the checked state is to be controlled at a higher level and there is a plan to pass the
|
29
|
+
* correct value based on handling `onChange` events and re-rendering.
|
24
30
|
* @default false
|
25
31
|
*/
|
26
|
-
defaultChecked?: boolean;
|
27
|
-
/**
|
28
|
-
* The current value for a controlled Switch. If `true` then the Switch will be enabled.
|
29
|
-
* Mutually exclusive with `defaultChecked` prop.
|
30
|
-
*/
|
31
32
|
checked?: boolean;
|
32
33
|
/**
|
33
|
-
*
|
34
|
+
* The position of the label relative to the Switch.
|
34
35
|
*
|
35
|
-
* @default
|
36
|
-
*/
|
37
|
-
disabled?: boolean;
|
38
|
-
/**
|
39
|
-
* Callback to be called when the `checked` value changes.
|
36
|
+
* @default after
|
40
37
|
*/
|
41
|
-
|
42
|
-
|
43
|
-
}) => void;
|
44
|
-
}
|
38
|
+
labelPosition: 'above' | 'after' | 'before';
|
39
|
+
};
|
45
40
|
|
46
|
-
export declare
|
47
|
-
|
41
|
+
export declare type SwitchOnChangeData = {
|
42
|
+
checked: boolean;
|
43
|
+
};
|
48
44
|
|
49
45
|
/**
|
50
|
-
*
|
46
|
+
* Switch Props
|
51
47
|
*/
|
52
|
-
export declare
|
53
|
-
|
54
|
-
export declare type SwitchSlots = {
|
48
|
+
export declare type SwitchProps = Omit<ComponentProps<Partial<SwitchSlots>, 'input'>, 'onChange'> & Partial<SwitchCommons> & {
|
55
49
|
/**
|
56
|
-
*
|
50
|
+
* Defines whether the Switch is initially in a checked state or not when rendered.
|
51
|
+
* @default false
|
57
52
|
*/
|
58
|
-
|
53
|
+
defaultChecked?: boolean;
|
59
54
|
/**
|
60
|
-
*
|
55
|
+
* Callback to be called when the checked state value changes.
|
61
56
|
*/
|
62
|
-
|
57
|
+
onChange?: (ev: React_2.ChangeEvent<HTMLInputElement>, data: SwitchOnChangeData) => void;
|
58
|
+
};
|
59
|
+
|
60
|
+
export declare type SwitchSlots = {
|
63
61
|
/**
|
64
|
-
* The
|
62
|
+
* The root element of the Switch.
|
63
|
+
*
|
64
|
+
* The root slot receives the `className` and `style` specified directly on the `<Switch>` tag.
|
65
|
+
* All other native props will be applied to the primary slot: `input`.
|
65
66
|
*/
|
66
|
-
|
67
|
+
root: NonNullable<Slot<'div'>>;
|
67
68
|
/**
|
68
|
-
* The
|
69
|
+
* The track and the thumb sliding over it indicating the on and off status of the Switch.
|
69
70
|
*/
|
70
|
-
|
71
|
+
indicator: NonNullable<Slot<'div'>>;
|
71
72
|
/**
|
72
|
-
*
|
73
|
+
* Hidden input that handles the Switch's functionality.
|
74
|
+
*
|
75
|
+
* This is the PRIMARY slot: all native properties specified directly on the `<Switch>` tag will be applied to this
|
76
|
+
* slot, except `className` and `style`, which remain on the root slot.
|
73
77
|
*/
|
74
|
-
input:
|
78
|
+
input: NonNullable<Slot<'input'>>;
|
75
79
|
/**
|
76
|
-
* The
|
80
|
+
* The Switch's label.
|
77
81
|
*/
|
78
|
-
|
82
|
+
label?: Slot<typeof Label>;
|
79
83
|
};
|
80
84
|
|
81
|
-
|
82
|
-
|
85
|
+
/**
|
86
|
+
* State used in rendering Switch
|
87
|
+
*/
|
88
|
+
export declare type SwitchState = ComponentState<SwitchSlots> & SwitchCommons;
|
83
89
|
|
84
90
|
/**
|
85
|
-
*
|
91
|
+
* Create the state required to render Switch.
|
92
|
+
*
|
93
|
+
* The returned state can be modified with hooks such as useSwitchStyles_unstable,
|
94
|
+
* before being passed to renderSwitch_unstable.
|
95
|
+
*
|
96
|
+
* @param props - props from this instance of Switch
|
97
|
+
* @param ref - reference to `<input>` element of Switch
|
86
98
|
*/
|
87
|
-
export declare const
|
99
|
+
export declare const useSwitch_unstable: (props: SwitchProps, ref: React_2.Ref<HTMLInputElement>) => SwitchState;
|
88
100
|
|
89
101
|
/**
|
90
102
|
* Apply styling to the Switch slots based on the state
|
91
103
|
*/
|
92
|
-
export declare const
|
104
|
+
export declare const useSwitchStyles_unstable: (state: SwitchState) => SwitchState;
|
93
105
|
|
94
106
|
export { }
|
package/lib/Switch.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Switch.js","sourceRoot":"","sources":["
|
1
|
+
{"version":3,"file":"Switch.js","sourceRoot":"../src/","sources":["Switch.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC","sourcesContent":["export * from './components/Switch/index';\n"]}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { SwitchProps } from './Switch.types';
|
2
2
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
3
3
|
/**
|
4
|
-
*
|
4
|
+
* Switches enable users to trigger an option on or off through pressing the component.
|
5
5
|
*/
|
6
6
|
export declare const Switch: ForwardRefComponent<SwitchProps>;
|
@@ -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
|
+
* Switches enable users to trigger an option on or off through pressing the component.
|
7
7
|
*/
|
8
8
|
|
9
9
|
export const Switch = /*#__PURE__*/React.forwardRef((props, ref) => {
|
10
|
-
const state =
|
11
|
-
|
12
|
-
return
|
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":["
|
1
|
+
{"version":3,"sources":["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","sourcesContent":["import * as React from 'react';\nimport { useSwitch_unstable } from './useSwitch';\nimport { renderSwitch_unstable } from './renderSwitch';\nimport { useSwitchStyles_unstable } from './useSwitchStyles';\nimport type { SwitchProps } from './Switch.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Switches enable users to trigger an option on or off through pressing the component.\n */\nexport const Switch: ForwardRefComponent<SwitchProps> = React.forwardRef((props, ref) => {\n const state = useSwitch_unstable(props, ref);\n\n useSwitchStyles_unstable(state);\n\n return renderSwitch_unstable(state);\n});\n\nSwitch.displayName = 'Switch';\n"],"sourceRoot":"../src/"}
|