@fluentui/react-switch 0.0.0-nightly-20220714-0418.1 → 0.0.0-nightly-20221007-1237.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 +260 -14
- package/CHANGELOG.md +86 -10
- package/lib/Switch.js.map +1 -1
- package/lib/components/Switch/Switch.js.map +1 -1
- package/lib/components/Switch/Switch.types.js.map +1 -1
- package/lib/components/Switch/index.js.map +1 -1
- package/lib/components/Switch/renderSwitch.js.map +1 -1
- package/lib/components/Switch/useSwitch.js +7 -3
- package/lib/components/Switch/useSwitch.js.map +1 -1
- package/lib/components/Switch/useSwitchStyles.js +88 -53
- 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.js.map +1 -1
- 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.js.map +1 -1
- package/lib-commonjs/components/Switch/useSwitch.js +7 -2
- package/lib-commonjs/components/Switch/useSwitch.js.map +1 -1
- package/lib-commonjs/components/Switch/useSwitchStyles.js +88 -53
- package/lib-commonjs/components/Switch/useSwitchStyles.js.map +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +10 -14
- package/dist/tsdoc-metadata.json +0 -11
package/CHANGELOG.json
CHANGED
@@ -2,13 +2,13 @@
|
|
2
2
|
"name": "@fluentui/react-switch",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
6
|
-
"tag": "@fluentui/react-switch_v0.0.0-nightly-
|
7
|
-
"version": "0.0.0-nightly-
|
5
|
+
"date": "Fri, 07 Oct 2022 12:44:26 GMT",
|
6
|
+
"tag": "@fluentui/react-switch_v0.0.0-nightly-20221007-1237.1",
|
7
|
+
"version": "0.0.0-nightly-20221007-1237.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
11
|
-
"author": "
|
11
|
+
"author": "fluentui-internal@service.microsoft.com",
|
12
12
|
"package": "@fluentui/react-switch",
|
13
13
|
"commit": "not available",
|
14
14
|
"comment": "Release nightly v9"
|
@@ -16,32 +16,278 @@
|
|
16
16
|
{
|
17
17
|
"author": "beachball",
|
18
18
|
"package": "@fluentui/react-switch",
|
19
|
-
"comment": "Bump @fluentui/react-label to v0.0.0-nightly-
|
20
|
-
"commit": "
|
19
|
+
"comment": "Bump @fluentui/react-label to v0.0.0-nightly-20221007-1237.1",
|
20
|
+
"commit": "cb80d71825ddb9ebe5d06bb14b1c970f8633c4ec"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"author": "beachball",
|
24
|
+
"package": "@fluentui/react-switch",
|
25
|
+
"comment": "Bump @fluentui/react-tabster to v0.0.0-nightly-20221007-1237.1",
|
26
|
+
"commit": "cb80d71825ddb9ebe5d06bb14b1c970f8633c4ec"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"author": "beachball",
|
30
|
+
"package": "@fluentui/react-switch",
|
31
|
+
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20221007-1237.1",
|
32
|
+
"commit": "cb80d71825ddb9ebe5d06bb14b1c970f8633c4ec"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"author": "beachball",
|
36
|
+
"package": "@fluentui/react-switch",
|
37
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20221007-1237.1",
|
38
|
+
"commit": "cb80d71825ddb9ebe5d06bb14b1c970f8633c4ec"
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"author": "beachball",
|
42
|
+
"package": "@fluentui/react-switch",
|
43
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20221007-1237.1",
|
44
|
+
"commit": "cb80d71825ddb9ebe5d06bb14b1c970f8633c4ec"
|
45
|
+
}
|
46
|
+
]
|
47
|
+
}
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"date": "Mon, 03 Oct 2022 22:24:40 GMT",
|
51
|
+
"tag": "@fluentui/react-switch_v9.0.7",
|
52
|
+
"version": "9.0.7",
|
53
|
+
"comments": {
|
54
|
+
"patch": [
|
55
|
+
{
|
56
|
+
"author": "makotom@microsoft.com",
|
57
|
+
"package": "@fluentui/react-switch",
|
58
|
+
"commit": "e44263f522e3e690c49ac69e5eef8e522e6e0a4a",
|
59
|
+
"comment": "fix: Making the hidden input only cover the indicator and not also the label."
|
60
|
+
},
|
61
|
+
{
|
62
|
+
"author": "behowell@microsoft.com",
|
63
|
+
"package": "@fluentui/react-switch",
|
64
|
+
"commit": "6a60b17a2e1ef2709a76c5b209d3b579e437feba",
|
65
|
+
"comment": "fix: Switch's label shouldn't have a pointer cursor when disabled"
|
66
|
+
},
|
67
|
+
{
|
68
|
+
"author": "beachball",
|
69
|
+
"package": "@fluentui/react-switch",
|
70
|
+
"comment": "Bump @fluentui/react-tabster to v9.1.2",
|
71
|
+
"commit": "67a8c98b8d53cd2fa14d668cf639b867b68ad18a"
|
72
|
+
}
|
73
|
+
]
|
74
|
+
}
|
75
|
+
},
|
76
|
+
{
|
77
|
+
"date": "Tue, 20 Sep 2022 20:55:45 GMT",
|
78
|
+
"tag": "@fluentui/react-switch_v9.0.6",
|
79
|
+
"version": "9.0.6",
|
80
|
+
"comments": {
|
81
|
+
"patch": [
|
82
|
+
{
|
83
|
+
"author": "beachball",
|
84
|
+
"package": "@fluentui/react-switch",
|
85
|
+
"comment": "Bump @fluentui/react-label to v9.0.6",
|
86
|
+
"commit": "4ceba844c804a2f49b0465389100e7a3dabf116e"
|
87
|
+
},
|
88
|
+
{
|
89
|
+
"author": "beachball",
|
90
|
+
"package": "@fluentui/react-switch",
|
91
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.14",
|
92
|
+
"commit": "4ceba844c804a2f49b0465389100e7a3dabf116e"
|
93
|
+
}
|
94
|
+
]
|
95
|
+
}
|
96
|
+
},
|
97
|
+
{
|
98
|
+
"date": "Thu, 15 Sep 2022 09:49:25 GMT",
|
99
|
+
"tag": "@fluentui/react-switch_v9.0.5",
|
100
|
+
"version": "9.0.5",
|
101
|
+
"comments": {
|
102
|
+
"patch": [
|
103
|
+
{
|
104
|
+
"author": "seanmonahan@microsoft.com",
|
105
|
+
"package": "@fluentui/react-switch",
|
106
|
+
"commit": "1d0a72865a151962362aa3e5054ac9bf8178f09c",
|
107
|
+
"comment": "fix: update color tokens"
|
108
|
+
},
|
109
|
+
{
|
110
|
+
"author": "olfedias@microsoft.com",
|
111
|
+
"package": "@fluentui/react-switch",
|
112
|
+
"commit": "e610024474cfe5d45f61501a8b6a21daf4c794a2",
|
113
|
+
"comment": "chore: Update Griffel to latest version"
|
114
|
+
},
|
115
|
+
{
|
116
|
+
"author": "behowell@microsoft.com",
|
117
|
+
"package": "@fluentui/react-switch",
|
118
|
+
"commit": "e598325b985cad3e5057f00893e0176416edd292",
|
119
|
+
"comment": "refactor: Replace useMergedEventCallbacks utility with mergeCallbacks"
|
120
|
+
},
|
121
|
+
{
|
122
|
+
"author": "beachball",
|
123
|
+
"package": "@fluentui/react-switch",
|
124
|
+
"comment": "Bump @fluentui/react-label to v9.0.5",
|
125
|
+
"commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
|
126
|
+
},
|
127
|
+
{
|
128
|
+
"author": "beachball",
|
129
|
+
"package": "@fluentui/react-switch",
|
130
|
+
"comment": "Bump @fluentui/react-tabster to v9.1.1",
|
131
|
+
"commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
|
132
|
+
},
|
133
|
+
{
|
134
|
+
"author": "beachball",
|
135
|
+
"package": "@fluentui/react-switch",
|
136
|
+
"comment": "Bump @fluentui/react-theme to v9.1.0",
|
137
|
+
"commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
|
138
|
+
},
|
139
|
+
{
|
140
|
+
"author": "beachball",
|
141
|
+
"package": "@fluentui/react-switch",
|
142
|
+
"comment": "Bump @fluentui/react-utilities to v9.1.0",
|
143
|
+
"commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
|
144
|
+
},
|
145
|
+
{
|
146
|
+
"author": "beachball",
|
147
|
+
"package": "@fluentui/react-switch",
|
148
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.13",
|
149
|
+
"commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
|
150
|
+
}
|
151
|
+
],
|
152
|
+
"none": [
|
153
|
+
{
|
154
|
+
"author": "martinhochel@microsoft.com",
|
155
|
+
"package": "@fluentui/react-switch",
|
156
|
+
"commit": "e6cf183695d6d67a24e038c49a876224e5ed35e5",
|
157
|
+
"comment": "chore: update package scaffold"
|
158
|
+
}
|
159
|
+
]
|
160
|
+
}
|
161
|
+
},
|
162
|
+
{
|
163
|
+
"date": "Wed, 03 Aug 2022 16:04:02 GMT",
|
164
|
+
"tag": "@fluentui/react-switch_v9.0.4",
|
165
|
+
"version": "9.0.4",
|
166
|
+
"comments": {
|
167
|
+
"none": [
|
168
|
+
{
|
169
|
+
"author": "lingfangao@hotmail.com",
|
170
|
+
"package": "@fluentui/react-switch",
|
171
|
+
"commit": "99cc385631d04a76ee10ebc143cb9fecd99640b6",
|
172
|
+
"comment": "chore: Add `prerelease` as disallowed changetype for 9.0.0 packages"
|
173
|
+
}
|
174
|
+
],
|
175
|
+
"patch": [
|
176
|
+
{
|
177
|
+
"author": "lingfangao@hotmail.com",
|
178
|
+
"package": "@fluentui/react-switch",
|
179
|
+
"commit": "71590ea6aeab8ce24d8c8e50e0ee80ece81a4392",
|
180
|
+
"comment": "refactor: use `useFocusWithin` hook for :focus-within styles"
|
181
|
+
},
|
182
|
+
{
|
183
|
+
"author": "miroslav.stastny@microsoft.com",
|
184
|
+
"package": "@fluentui/react-switch",
|
185
|
+
"commit": "08563664778fd80284561d3c9d254307a0a32362",
|
186
|
+
"comment": "chore: Bump Griffel dependencies"
|
187
|
+
},
|
188
|
+
{
|
189
|
+
"author": "sarah.higley@microsoft.com",
|
190
|
+
"package": "@fluentui/react-switch",
|
191
|
+
"commit": "c66808887bcd7fd150c22eda462b325075742694",
|
192
|
+
"comment": "bugfix: add reduced motion styles for avatar, spinner, switch, and input focus styles"
|
193
|
+
},
|
194
|
+
{
|
195
|
+
"author": "beachball",
|
196
|
+
"package": "@fluentui/react-switch",
|
197
|
+
"comment": "Bump @fluentui/react-label to v9.0.4",
|
198
|
+
"commit": "ee4a8be0d0831a6615f878f98db6a97cc61a802d"
|
199
|
+
},
|
200
|
+
{
|
201
|
+
"author": "beachball",
|
202
|
+
"package": "@fluentui/react-switch",
|
203
|
+
"comment": "Bump @fluentui/react-tabster to v9.1.0",
|
204
|
+
"commit": "ee4a8be0d0831a6615f878f98db6a97cc61a802d"
|
21
205
|
},
|
22
206
|
{
|
23
207
|
"author": "beachball",
|
24
208
|
"package": "@fluentui/react-switch",
|
25
|
-
"comment": "Bump @fluentui/react-
|
26
|
-
"commit": "
|
209
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.12",
|
210
|
+
"commit": "ee4a8be0d0831a6615f878f98db6a97cc61a802d"
|
211
|
+
}
|
212
|
+
]
|
213
|
+
}
|
214
|
+
},
|
215
|
+
{
|
216
|
+
"date": "Thu, 14 Jul 2022 21:21:05 GMT",
|
217
|
+
"tag": "@fluentui/react-switch_v9.0.3",
|
218
|
+
"version": "9.0.3",
|
219
|
+
"comments": {
|
220
|
+
"patch": [
|
221
|
+
{
|
222
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
223
|
+
"package": "@fluentui/react-switch",
|
224
|
+
"commit": "802bc4e3730a88b0fc61b5bf42ef7fc6b6543fe2",
|
225
|
+
"comment": "fix: Fixing bad version bump of @fluentui/react-utilities."
|
27
226
|
},
|
28
227
|
{
|
29
228
|
"author": "beachball",
|
30
229
|
"package": "@fluentui/react-switch",
|
31
|
-
"comment": "Bump @fluentui/react-
|
32
|
-
"commit": "
|
230
|
+
"comment": "Bump @fluentui/react-label to v9.0.3",
|
231
|
+
"commit": "79b513146194367544160f364b0a7dd749ed93e4"
|
33
232
|
},
|
34
233
|
{
|
35
234
|
"author": "beachball",
|
36
235
|
"package": "@fluentui/react-switch",
|
37
|
-
"comment": "Bump @fluentui/react-
|
38
|
-
"commit": "
|
236
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.3",
|
237
|
+
"commit": "79b513146194367544160f364b0a7dd749ed93e4"
|
39
238
|
},
|
40
239
|
{
|
41
240
|
"author": "beachball",
|
42
241
|
"package": "@fluentui/react-switch",
|
43
|
-
"comment": "Bump @fluentui/react-
|
44
|
-
"commit": "
|
242
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.2",
|
243
|
+
"commit": "79b513146194367544160f364b0a7dd749ed93e4"
|
244
|
+
}
|
245
|
+
]
|
246
|
+
}
|
247
|
+
},
|
248
|
+
{
|
249
|
+
"date": "Thu, 14 Jul 2022 17:06:23 GMT",
|
250
|
+
"tag": "@fluentui/react-switch_v9.0.2",
|
251
|
+
"version": "9.0.2",
|
252
|
+
"comments": {
|
253
|
+
"patch": [
|
254
|
+
{
|
255
|
+
"author": "ololubek@microsoft.com",
|
256
|
+
"package": "@fluentui/react-switch",
|
257
|
+
"commit": "63ab03fa7a9b3d02204147ea5356b8f78751df42",
|
258
|
+
"comment": "chore: Update @fluentui/react-icons dependency to v2.0.175"
|
259
|
+
},
|
260
|
+
{
|
261
|
+
"author": "beachball",
|
262
|
+
"package": "@fluentui/react-switch",
|
263
|
+
"comment": "Bump @fluentui/react-label to v9.0.2",
|
264
|
+
"commit": "35237381e941c8935b1892c9217096cea3e5601f"
|
265
|
+
},
|
266
|
+
{
|
267
|
+
"author": "beachball",
|
268
|
+
"package": "@fluentui/react-switch",
|
269
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.2",
|
270
|
+
"commit": "35237381e941c8935b1892c9217096cea3e5601f"
|
271
|
+
},
|
272
|
+
{
|
273
|
+
"author": "beachball",
|
274
|
+
"package": "@fluentui/react-switch",
|
275
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.1-0",
|
276
|
+
"commit": "35237381e941c8935b1892c9217096cea3e5601f"
|
277
|
+
},
|
278
|
+
{
|
279
|
+
"author": "beachball",
|
280
|
+
"package": "@fluentui/react-switch",
|
281
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.11",
|
282
|
+
"commit": "35237381e941c8935b1892c9217096cea3e5601f"
|
283
|
+
}
|
284
|
+
],
|
285
|
+
"none": [
|
286
|
+
{
|
287
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
288
|
+
"package": "@fluentui/react-switch",
|
289
|
+
"commit": "422636fffd66758c1a6dd617063582d902b61927",
|
290
|
+
"comment": "docs: Replacing https://aka.ms/fluentui-storybook with https://react.fluentui.dev/ to point to the official documentation site."
|
45
291
|
}
|
46
292
|
]
|
47
293
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,22 +1,98 @@
|
|
1
1
|
# Change Log - @fluentui/react-switch
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Fri, 07 Oct 2022 12:44:26 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-20221007-1237.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v0.0.0-nightly-20221007-1237.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.
|
9
|
+
Fri, 07 Oct 2022 12:44:26 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.7..@fluentui/react-switch_v0.0.0-nightly-20221007-1237.1)
|
11
11
|
|
12
12
|
### Changes
|
13
13
|
|
14
|
-
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by
|
15
|
-
- Bump @fluentui/react-label to v0.0.0-nightly-
|
16
|
-
- Bump @fluentui/react-tabster to v0.0.0-nightly-
|
17
|
-
- Bump @fluentui/react-theme to v0.0.0-nightly-
|
18
|
-
- Bump @fluentui/react-utilities to v0.0.0-nightly-
|
19
|
-
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
14
|
+
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
|
15
|
+
- Bump @fluentui/react-label to v0.0.0-nightly-20221007-1237.1 ([commit](https://github.com/microsoft/fluentui/commit/cb80d71825ddb9ebe5d06bb14b1c970f8633c4ec) by beachball)
|
16
|
+
- Bump @fluentui/react-tabster to v0.0.0-nightly-20221007-1237.1 ([commit](https://github.com/microsoft/fluentui/commit/cb80d71825ddb9ebe5d06bb14b1c970f8633c4ec) by beachball)
|
17
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20221007-1237.1 ([commit](https://github.com/microsoft/fluentui/commit/cb80d71825ddb9ebe5d06bb14b1c970f8633c4ec) by beachball)
|
18
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20221007-1237.1 ([commit](https://github.com/microsoft/fluentui/commit/cb80d71825ddb9ebe5d06bb14b1c970f8633c4ec) by beachball)
|
19
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20221007-1237.1 ([commit](https://github.com/microsoft/fluentui/commit/cb80d71825ddb9ebe5d06bb14b1c970f8633c4ec) by beachball)
|
20
|
+
|
21
|
+
## [9.0.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.7)
|
22
|
+
|
23
|
+
Mon, 03 Oct 2022 22:24:40 GMT
|
24
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.6..@fluentui/react-switch_v9.0.7)
|
25
|
+
|
26
|
+
### Patches
|
27
|
+
|
28
|
+
- fix: Making the hidden input only cover the indicator and not also the label. ([PR #24638](https://github.com/microsoft/fluentui/pull/24638) by makotom@microsoft.com)
|
29
|
+
- fix: Switch's label shouldn't have a pointer cursor when disabled ([PR #25026](https://github.com/microsoft/fluentui/pull/25026) by behowell@microsoft.com)
|
30
|
+
- Bump @fluentui/react-tabster to v9.1.2 ([PR #25055](https://github.com/microsoft/fluentui/pull/25055) by beachball)
|
31
|
+
|
32
|
+
## [9.0.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.6)
|
33
|
+
|
34
|
+
Tue, 20 Sep 2022 20:55:45 GMT
|
35
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.5..@fluentui/react-switch_v9.0.6)
|
36
|
+
|
37
|
+
### Patches
|
38
|
+
|
39
|
+
- Bump @fluentui/react-label to v9.0.6 ([PR #24869](https://github.com/microsoft/fluentui/pull/24869) by beachball)
|
40
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.14 ([PR #24869](https://github.com/microsoft/fluentui/pull/24869) by beachball)
|
41
|
+
|
42
|
+
## [9.0.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.5)
|
43
|
+
|
44
|
+
Thu, 15 Sep 2022 09:49:25 GMT
|
45
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.4..@fluentui/react-switch_v9.0.5)
|
46
|
+
|
47
|
+
### Patches
|
48
|
+
|
49
|
+
- fix: update color tokens ([PR #24027](https://github.com/microsoft/fluentui/pull/24027) by seanmonahan@microsoft.com)
|
50
|
+
- chore: Update Griffel to latest version ([PR #24221](https://github.com/microsoft/fluentui/pull/24221) by olfedias@microsoft.com)
|
51
|
+
- refactor: Replace useMergedEventCallbacks utility with mergeCallbacks ([PR #24152](https://github.com/microsoft/fluentui/pull/24152) by behowell@microsoft.com)
|
52
|
+
- Bump @fluentui/react-label to v9.0.5 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
|
53
|
+
- Bump @fluentui/react-tabster to v9.1.1 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
|
54
|
+
- Bump @fluentui/react-theme to v9.1.0 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
|
55
|
+
- Bump @fluentui/react-utilities to v9.1.0 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
|
56
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.13 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
|
57
|
+
|
58
|
+
## [9.0.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.4)
|
59
|
+
|
60
|
+
Wed, 03 Aug 2022 16:04:02 GMT
|
61
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.3..@fluentui/react-switch_v9.0.4)
|
62
|
+
|
63
|
+
### Patches
|
64
|
+
|
65
|
+
- refactor: use `useFocusWithin` hook for :focus-within styles ([PR #24154](https://github.com/microsoft/fluentui/pull/24154) by lingfangao@hotmail.com)
|
66
|
+
- chore: Bump Griffel dependencies ([PR #24114](https://github.com/microsoft/fluentui/pull/24114) by miroslav.stastny@microsoft.com)
|
67
|
+
- bugfix: add reduced motion styles for avatar, spinner, switch, and input focus styles ([PR #23788](https://github.com/microsoft/fluentui/pull/23788) by sarah.higley@microsoft.com)
|
68
|
+
- Bump @fluentui/react-label to v9.0.4 ([PR #24131](https://github.com/microsoft/fluentui/pull/24131) by beachball)
|
69
|
+
- Bump @fluentui/react-tabster to v9.1.0 ([PR #24131](https://github.com/microsoft/fluentui/pull/24131) by beachball)
|
70
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.12 ([PR #24131](https://github.com/microsoft/fluentui/pull/24131) by beachball)
|
71
|
+
|
72
|
+
## [9.0.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.3)
|
73
|
+
|
74
|
+
Thu, 14 Jul 2022 21:21:05 GMT
|
75
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.2..@fluentui/react-switch_v9.0.3)
|
76
|
+
|
77
|
+
### Patches
|
78
|
+
|
79
|
+
- fix: Fixing bad version bump of @fluentui/react-utilities. ([PR #23920](https://github.com/microsoft/fluentui/pull/23920) by Humberto.Morimoto@microsoft.com)
|
80
|
+
- Bump @fluentui/react-label to v9.0.3 ([PR #23918](https://github.com/microsoft/fluentui/pull/23918) by beachball)
|
81
|
+
- Bump @fluentui/react-tabster to v9.0.3 ([PR #23918](https://github.com/microsoft/fluentui/pull/23918) by beachball)
|
82
|
+
- Bump @fluentui/react-utilities to v9.0.2 ([PR #23918](https://github.com/microsoft/fluentui/pull/23918) by beachball)
|
83
|
+
|
84
|
+
## [9.0.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.2)
|
85
|
+
|
86
|
+
Thu, 14 Jul 2022 17:06:23 GMT
|
87
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.1..@fluentui/react-switch_v9.0.2)
|
88
|
+
|
89
|
+
### Patches
|
90
|
+
|
91
|
+
- chore: Update @fluentui/react-icons dependency to v2.0.175 ([PR #23812](https://github.com/microsoft/fluentui/pull/23812) by ololubek@microsoft.com)
|
92
|
+
- Bump @fluentui/react-label to v9.0.2 ([PR #23897](https://github.com/microsoft/fluentui/pull/23897) by beachball)
|
93
|
+
- Bump @fluentui/react-tabster to v9.0.2 ([PR #23897](https://github.com/microsoft/fluentui/pull/23897) by beachball)
|
94
|
+
- Bump @fluentui/react-utilities to v9.0.1-0 ([PR #23897](https://github.com/microsoft/fluentui/pull/23897) by beachball)
|
95
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.11 ([PR #23897](https://github.com/microsoft/fluentui/pull/23897) by beachball)
|
20
96
|
|
21
97
|
## [9.0.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.1)
|
22
98
|
|
package/lib/Switch.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Switch.js","sourceRoot":"
|
1
|
+
{"version":3,"file":"Switch.js","sourceRoot":"","sources":["../src/Switch.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC","sourcesContent":["export * from './components/Switch/index';\n"]}
|
@@ -1 +1 @@
|
|
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;EACtF,MAAM,KAAK,GAAG,kBAAkB,CAAC,KAAD,EAAQ,GAAR,CAAhC;EAEA,wBAAwB,CAAC,KAAD,CAAxB;EAEA,OAAO,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":"
|
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;EACtF,MAAM,KAAK,GAAG,kBAAkB,CAAC,KAAD,EAAQ,GAAR,CAAhC;EAEA,wBAAwB,CAAC,KAAD,CAAxB;EAEA,OAAO,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":""}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Switch.types.js","sourceRoot":"
|
1
|
+
{"version":3,"file":"Switch.types.js","sourceRoot":"","sources":["../../../src/components/Switch/Switch.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { Label } from '@fluentui/react-label';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type SwitchSlots = {\n /**\n * The root element of the Switch.\n *\n * The root slot receives the `className` and `style` specified directly on the `<Switch>` tag.\n * All other native props will be applied to the primary slot: `input`.\n */\n root: NonNullable<Slot<'div'>>;\n\n /**\n * The track and the thumb sliding over it indicating the on and off status of the Switch.\n */\n indicator: NonNullable<Slot<'div'>>;\n\n /**\n * Hidden input that handles the Switch's functionality.\n *\n * This is the PRIMARY slot: all native properties specified directly on the `<Switch>` tag will be applied to this\n * slot, except `className` and `style`, which remain on the root slot.\n */\n input: NonNullable<Slot<'input'>>;\n\n /**\n * The Switch's label.\n */\n label?: Slot<typeof Label>;\n};\n\nexport type SwitchOnChangeData = {\n checked: boolean;\n};\n\n/**\n * Switch Props\n */\nexport type SwitchProps = Omit<\n ComponentProps<Partial<SwitchSlots>, 'input'>,\n 'checked' | 'defaultChecked' | 'onChange'\n> & {\n /**\n * Defines the controlled checked state of the Switch.\n * If passed, Switch ignores the `defaultChecked` property.\n * 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\n * correct value based on handling `onChange` events and re-rendering.\n *\n * @default false\n */\n checked?: boolean;\n\n /**\n * Defines whether the Switch is initially in a checked state or not when rendered.\n *\n * @default false\n */\n defaultChecked?: boolean;\n\n /**\n * The position of the label relative to the Switch.\n *\n * @default after\n */\n labelPosition?: 'above' | 'after' | 'before';\n\n /**\n * Callback to be called when the checked state value changes.\n */\n onChange?: (ev: React.ChangeEvent<HTMLInputElement>, data: SwitchOnChangeData) => void;\n};\n\n/**\n * State used in rendering Switch\n */\nexport type SwitchState = ComponentState<SwitchSlots> & Required<Pick<SwitchProps, 'labelPosition'>>;\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Switch/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC","sourcesContent":["export * from './Switch';\nexport * from './Switch.types';\nexport * from './renderSwitch';\nexport * from './useSwitch';\nexport * from './useSwitchStyles';\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/Switch/renderSwitch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,qBAAqB,GAAI,KAAD,IAAuB;EAC1D,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAc,KAAd,CAArC;EACA,MAAM;IAAE;EAAF,IAAoB,KAA1B;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;EAAf,CAAZ,CADF,EAEG,aAAa,KAAK,OAAlB,IAA6B,KAAK,CAAC,KAAnC,iBAA4C,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;EAAf,CAAZ,CAF/C,eAGE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,SAAP,EAAgB,EAAA,GAAK,SAAS,CAAC;EAAf,CAAhB,CAHF,EAIG,aAAa,KAAK,OAAlB,IAA6B,KAAK,CAAC,KAAnC,iBAA4C,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;EAAf,CAAZ,CAJ/C,CADF;AAQD,CAZM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { SwitchState, SwitchSlots } from './Switch.types';\n\n/**\n * Render a Switch component by passing the state defined props to the appropriate slots.\n */\nexport const renderSwitch_unstable = (state: SwitchState) => {\n const { slots, slotProps } = getSlots<SwitchSlots>(state);\n const { labelPosition } = state;\n\n return (\n <slots.root {...slotProps.root}>\n <slots.input {...slotProps.input} />\n {labelPosition !== 'after' && slots.label && <slots.label {...slotProps.label} />}\n <slots.indicator {...slotProps.indicator} />\n {labelPosition === 'after' && slots.label && <slots.label {...slotProps.label} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"
|
1
|
+
{"version":3,"sources":["../../../src/components/Switch/renderSwitch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,qBAAqB,GAAI,KAAD,IAAuB;EAC1D,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAc,KAAd,CAArC;EACA,MAAM;IAAE;EAAF,IAAoB,KAA1B;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;EAAf,CAAZ,CADF,EAEG,aAAa,KAAK,OAAlB,IAA6B,KAAK,CAAC,KAAnC,iBAA4C,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;EAAf,CAAZ,CAF/C,eAGE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,SAAP,EAAgB,EAAA,GAAK,SAAS,CAAC;EAAf,CAAhB,CAHF,EAIG,aAAa,KAAK,OAAlB,IAA6B,KAAK,CAAC,KAAnC,iBAA4C,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;EAAf,CAAZ,CAJ/C,CADF;AAQD,CAZM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { SwitchState, SwitchSlots } from './Switch.types';\n\n/**\n * Render a Switch component by passing the state defined props to the appropriate slots.\n */\nexport const renderSwitch_unstable = (state: SwitchState) => {\n const { slots, slotProps } = getSlots<SwitchSlots>(state);\n const { labelPosition } = state;\n\n return (\n <slots.root {...slotProps.root}>\n <slots.input {...slotProps.input} />\n {labelPosition !== 'after' && slots.label && <slots.label {...slotProps.label} />}\n <slots.indicator {...slotProps.indicator} />\n {labelPosition === 'after' && slots.label && <slots.label {...slotProps.label} />}\n </slots.root>\n );\n};\n"],"sourceRoot":""}
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { CircleFilled } from '@fluentui/react-icons';
|
3
3
|
import { Label } from '@fluentui/react-label';
|
4
|
-
import {
|
4
|
+
import { useFocusWithin } from '@fluentui/react-tabster';
|
5
|
+
import { getPartitionedNativeProps, mergeCallbacks, resolveShorthand, useId } from '@fluentui/react-utilities';
|
5
6
|
/**
|
6
7
|
* Create the state required to render Switch.
|
7
8
|
*
|
@@ -28,7 +29,10 @@ export const useSwitch_unstable = (props, ref) => {
|
|
28
29
|
});
|
29
30
|
const id = useId('switch-', nativeProps.primary.id);
|
30
31
|
const root = resolveShorthand(props.root, {
|
31
|
-
defaultProps:
|
32
|
+
defaultProps: {
|
33
|
+
ref: useFocusWithin(),
|
34
|
+
...nativeProps.root
|
35
|
+
},
|
32
36
|
required: true
|
33
37
|
});
|
34
38
|
const indicator = resolveShorthand(props.indicator, {
|
@@ -50,7 +54,7 @@ export const useSwitch_unstable = (props, ref) => {
|
|
50
54
|
},
|
51
55
|
required: true
|
52
56
|
});
|
53
|
-
input.onChange =
|
57
|
+
input.onChange = mergeCallbacks(input.onChange, ev => onChange === null || onChange === void 0 ? void 0 : onChange(ev, {
|
54
58
|
checked: ev.currentTarget.checked
|
55
59
|
}));
|
56
60
|
const label = resolveShorthand(props.label, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/Switch/useSwitch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,YAAT,QAA6B,uBAA7B;AACA,SAAS,KAAT,QAAsB,uBAAtB;AACA,SAAS,yBAAT,EAAoC,
|
1
|
+
{"version":3,"sources":["../../../src/components/Switch/useSwitch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,YAAT,QAA6B,uBAA7B;AACA,SAAS,KAAT,QAAsB,uBAAtB;AACA,SAAS,cAAT,QAA+B,yBAA/B;AACA,SAAS,yBAAT,EAAoC,cAApC,EAAoD,gBAApD,EAAsE,KAAtE,QAAmF,2BAAnF;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,kBAAkB,GAAG,CAAC,KAAD,EAAqB,GAArB,KAAsE;EACtG,MAAM;IAAE,OAAF;IAAW,cAAX;IAA2B,QAA3B;IAAqC,aAAa,GAAG,OAArD;IAA8D,QAA9D;IAAwE;EAAxE,IAAqF,KAA3F;EAEA,MAAM,WAAW,GAAG,yBAAyB,CAAC;IAC5C,KAD4C;IAE5C,kBAAkB,EAAE,OAFwB;IAG5C,iBAAiB,EAAE,CAAC,SAAD,EAAY,gBAAZ,EAA8B,UAA9B;EAHyB,CAAD,CAA7C;EAMA,MAAM,EAAE,GAAG,KAAK,CAAC,SAAD,EAAY,WAAW,CAAC,OAAZ,CAAoB,EAAhC,CAAhB;EAEA,MAAM,IAAI,GAAG,gBAAgB,CAAC,KAAK,CAAC,IAAP,EAAa;IACxC,YAAY,EAAE;MAAE,GAAG,EAAE,cAAc,EAArB;MAAyC,GAAG,WAAW,CAAC;IAAxD,CAD0B;IAExC,QAAQ,EAAE;EAF8B,CAAb,CAA7B;EAKA,MAAM,SAAS,GAAG,gBAAgB,CAAC,KAAK,CAAC,SAAP,EAAkB;IAClD,YAAY,EAAE;MACZ,eAAe,IADH;MAEZ,QAAQ,eAAE,KAAA,CAAA,aAAA,CAAC,YAAD,EAAa,IAAb;IAFE,CADoC;IAKlD,QAAQ,EAAE;EALwC,CAAlB,CAAlC;EAQA,MAAM,KAAK,GAAG,gBAAgB,CAAC,KAAK,CAAC,KAAP,EAAc;IAC1C,YAAY,EAAE;MACZ,OADY;MAEZ,cAFY;MAGZ,EAHY;MAIZ,GAJY;MAKZ,IAAI,EAAE,QALM;MAMZ,IAAI,EAAE,UANM;MAOZ,GAAG,WAAW,CAAC;IAPH,CAD4B;IAU1C,QAAQ,EAAE;EAVgC,CAAd,CAA9B;EAYA,KAAK,CAAC,QAAN,GAAiB,cAAc,CAAC,KAAK,CAAC,QAAP,EAAiB,EAAE,IAAI,QAAQ,KAAA,IAAR,IAAA,QAAQ,KAAA,KAAA,CAAR,GAAQ,KAAA,CAAR,GAAA,QAAQ,CAAG,EAAH,EAAO;IAAE,OAAO,EAAE,EAAE,CAAC,aAAH,CAAiB;EAA5B,CAAP,CAA/B,CAA/B;EAEA,MAAM,KAAK,GAAG,gBAAgB,CAAC,KAAK,CAAC,KAAP,EAAc;IAC1C,YAAY,EAAE;MACZ,QADY;MAEZ,OAAO,EAAE,EAFG;MAGZ,QAHY;MAIZ,IAAI,EAAE;IAJM;EAD4B,CAAd,CAA9B;EASA,OAAO;IACL,aADK;IAGL;IACA,UAAU,EAAE;MACV,IAAI,EAAE,KADI;MAEV,SAAS,EAAE,KAFD;MAGV,KAAK,EAAE,OAHG;MAIV,KAAK,EAAE;IAJG,CAJP;IAWL,IAXK;IAYL,SAZK;IAaL,KAbK;IAcL;EAdK,CAAP;AAgBD,CA/DM","sourcesContent":["import * as React from 'react';\nimport { CircleFilled } from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\nimport { useFocusWithin } from '@fluentui/react-tabster';\nimport { getPartitionedNativeProps, mergeCallbacks, resolveShorthand, useId } from '@fluentui/react-utilities';\nimport type { SwitchProps, SwitchState } from './Switch.types';\n\n/**\n * Create the state required to render Switch.\n *\n * The returned state can be modified with hooks such as useSwitchStyles_unstable,\n * before being passed to renderSwitch_unstable.\n *\n * @param props - props from this instance of Switch\n * @param ref - reference to `<input>` element of Switch\n */\nexport const useSwitch_unstable = (props: SwitchProps, ref: React.Ref<HTMLInputElement>): SwitchState => {\n const { checked, defaultChecked, disabled, labelPosition = 'after', onChange, required } = props;\n\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['checked', 'defaultChecked', 'onChange'],\n });\n\n const id = useId('switch-', nativeProps.primary.id);\n\n const root = resolveShorthand(props.root, {\n defaultProps: { ref: useFocusWithin<HTMLDivElement>(), ...nativeProps.root },\n required: true,\n });\n\n const indicator = resolveShorthand(props.indicator, {\n defaultProps: {\n 'aria-hidden': true,\n children: <CircleFilled />,\n },\n required: true,\n });\n\n const input = resolveShorthand(props.input, {\n defaultProps: {\n checked,\n defaultChecked,\n id,\n ref,\n role: 'switch',\n type: 'checkbox',\n ...nativeProps.primary,\n },\n required: true,\n });\n input.onChange = mergeCallbacks(input.onChange, ev => onChange?.(ev, { checked: ev.currentTarget.checked }));\n\n const label = resolveShorthand(props.label, {\n defaultProps: {\n disabled,\n htmlFor: id,\n required,\n size: 'medium',\n },\n });\n\n return {\n labelPosition,\n\n //Slots definition\n components: {\n root: 'div',\n indicator: 'div',\n input: 'input',\n label: Label,\n },\n\n root,\n indicator,\n input,\n label,\n };\n};\n"],"sourceRoot":""}
|