@fluentui/react-switch 9.0.0-rc.6 → 9.0.0-rc.9
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 +107 -6
- package/CHANGELOG.md +75 -40
- package/dist/{react-switch.d.ts → index.d.ts} +0 -0
- package/lib/components/Switch/useSwitchStyles.js +11 -2
- package/lib/components/Switch/useSwitchStyles.js.map +1 -1
- package/lib-commonjs/components/Switch/useSwitchStyles.js +11 -2
- package/lib-commonjs/components/Switch/useSwitchStyles.js.map +1 -1
- package/package.json +8 -8
package/CHANGELOG.json
CHANGED
@@ -2,7 +2,108 @@
|
|
2
2
|
"name": "@fluentui/react-switch",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
5
|
+
"date": "Thu, 05 May 2022 18:24:33 GMT",
|
6
|
+
"tag": "@fluentui/react-switch_v9.0.0-rc.9",
|
7
|
+
"version": "9.0.0-rc.9",
|
8
|
+
"comments": {
|
9
|
+
"none": [
|
10
|
+
{
|
11
|
+
"author": "tristan.watanabe@gmail.com",
|
12
|
+
"package": "@fluentui/react-switch",
|
13
|
+
"commit": "ad3dfcc6d85a8dba3c183612fe552280cd33c20e",
|
14
|
+
"comment": "react-switch: Move to new common folder."
|
15
|
+
}
|
16
|
+
],
|
17
|
+
"prerelease": [
|
18
|
+
{
|
19
|
+
"author": "beachball",
|
20
|
+
"package": "@fluentui/react-switch",
|
21
|
+
"comment": "Bump @fluentui/react-label to v9.0.0-beta.12",
|
22
|
+
"commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"author": "beachball",
|
26
|
+
"package": "@fluentui/react-switch",
|
27
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-rc.9",
|
28
|
+
"commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
|
29
|
+
},
|
30
|
+
{
|
31
|
+
"author": "beachball",
|
32
|
+
"package": "@fluentui/react-switch",
|
33
|
+
"comment": "Bump @fluentui/react-theme to v9.0.0-rc.7",
|
34
|
+
"commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
|
35
|
+
},
|
36
|
+
{
|
37
|
+
"author": "beachball",
|
38
|
+
"package": "@fluentui/react-switch",
|
39
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-rc.8",
|
40
|
+
"commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
|
41
|
+
},
|
42
|
+
{
|
43
|
+
"author": "beachball",
|
44
|
+
"package": "@fluentui/react-switch",
|
45
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.5",
|
46
|
+
"commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
|
47
|
+
}
|
48
|
+
]
|
49
|
+
}
|
50
|
+
},
|
51
|
+
{
|
52
|
+
"date": "Wed, 04 May 2022 13:26:51 GMT",
|
53
|
+
"tag": "@fluentui/react-switch_v9.0.0-rc.8",
|
54
|
+
"version": "9.0.0-rc.8",
|
55
|
+
"comments": {
|
56
|
+
"prerelease": [
|
57
|
+
{
|
58
|
+
"author": "humberto_makoto@hotmail.com",
|
59
|
+
"package": "@fluentui/react-switch",
|
60
|
+
"commit": "daf5a7692bce6794dbacf7470cc48e48e1c67252",
|
61
|
+
"comment": "Switch: Fixing disabled styles in high contrast mode."
|
62
|
+
},
|
63
|
+
{
|
64
|
+
"author": "beachball",
|
65
|
+
"package": "@fluentui/react-switch",
|
66
|
+
"comment": "Bump @fluentui/react-label to v9.0.0-beta.11",
|
67
|
+
"commit": "65f94192ed3b2cde7e52b9c7e12d6f38b81965dd"
|
68
|
+
},
|
69
|
+
{
|
70
|
+
"author": "beachball",
|
71
|
+
"package": "@fluentui/react-switch",
|
72
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-rc.8",
|
73
|
+
"commit": "65f94192ed3b2cde7e52b9c7e12d6f38b81965dd"
|
74
|
+
},
|
75
|
+
{
|
76
|
+
"author": "beachball",
|
77
|
+
"package": "@fluentui/react-switch",
|
78
|
+
"comment": "Bump @fluentui/react-theme to v9.0.0-rc.6",
|
79
|
+
"commit": "65f94192ed3b2cde7e52b9c7e12d6f38b81965dd"
|
80
|
+
},
|
81
|
+
{
|
82
|
+
"author": "beachball",
|
83
|
+
"package": "@fluentui/react-switch",
|
84
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0-rc.7",
|
85
|
+
"commit": "65f94192ed3b2cde7e52b9c7e12d6f38b81965dd"
|
86
|
+
}
|
87
|
+
]
|
88
|
+
}
|
89
|
+
},
|
90
|
+
{
|
91
|
+
"date": "Mon, 25 Apr 2022 09:32:19 GMT",
|
92
|
+
"tag": "@fluentui/react-switch_v9.0.0-rc.7",
|
93
|
+
"version": "9.0.0-rc.7",
|
94
|
+
"comments": {
|
95
|
+
"prerelease": [
|
96
|
+
{
|
97
|
+
"author": "beachball",
|
98
|
+
"package": "@fluentui/react-switch",
|
99
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-rc.7",
|
100
|
+
"commit": "02ca1d3c198452c1693067f5f18bd01b2ed5d6e6"
|
101
|
+
}
|
102
|
+
]
|
103
|
+
}
|
104
|
+
},
|
105
|
+
{
|
106
|
+
"date": "Tue, 19 Apr 2022 19:16:54 GMT",
|
6
107
|
"tag": "@fluentui/react-switch_v9.0.0-rc.6",
|
7
108
|
"version": "9.0.0-rc.6",
|
8
109
|
"comments": {
|
@@ -41,31 +142,31 @@
|
|
41
142
|
"author": "beachball",
|
42
143
|
"package": "@fluentui/react-switch",
|
43
144
|
"comment": "Bump @fluentui/react-label to v9.0.0-beta.10",
|
44
|
-
"commit": "
|
145
|
+
"commit": "f94b48c825ca8c8b2e3b6755bdd29fe15c7d435d"
|
45
146
|
},
|
46
147
|
{
|
47
148
|
"author": "beachball",
|
48
149
|
"package": "@fluentui/react-switch",
|
49
150
|
"comment": "Bump @fluentui/react-tabster to v9.0.0-rc.6",
|
50
|
-
"commit": "
|
151
|
+
"commit": "f94b48c825ca8c8b2e3b6755bdd29fe15c7d435d"
|
51
152
|
},
|
52
153
|
{
|
53
154
|
"author": "beachball",
|
54
155
|
"package": "@fluentui/react-switch",
|
55
156
|
"comment": "Bump @fluentui/react-theme to v9.0.0-rc.5",
|
56
|
-
"commit": "
|
157
|
+
"commit": "f94b48c825ca8c8b2e3b6755bdd29fe15c7d435d"
|
57
158
|
},
|
58
159
|
{
|
59
160
|
"author": "beachball",
|
60
161
|
"package": "@fluentui/react-switch",
|
61
162
|
"comment": "Bump @fluentui/react-utilities to v9.0.0-rc.6",
|
62
|
-
"commit": "
|
163
|
+
"commit": "f94b48c825ca8c8b2e3b6755bdd29fe15c7d435d"
|
63
164
|
},
|
64
165
|
{
|
65
166
|
"author": "beachball",
|
66
167
|
"package": "@fluentui/react-switch",
|
67
168
|
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.4",
|
68
|
-
"commit": "
|
169
|
+
"commit": "f94b48c825ca8c8b2e3b6755bdd29fe15c7d435d"
|
69
170
|
}
|
70
171
|
],
|
71
172
|
"none": [
|
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,47 @@
|
|
1
1
|
# Change Log - @fluentui/react-switch
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Thu, 05 May 2022 18:24:33 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.0.0-rc.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-rc.9)
|
8
|
+
|
9
|
+
Thu, 05 May 2022 18:24:33 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-rc.8..@fluentui/react-switch_v9.0.0-rc.9)
|
11
|
+
|
12
|
+
### Changes
|
13
|
+
|
14
|
+
- Bump @fluentui/react-label to v9.0.0-beta.12 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
|
15
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.9 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
|
16
|
+
- Bump @fluentui/react-theme to v9.0.0-rc.7 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
|
17
|
+
- Bump @fluentui/react-utilities to v9.0.0-rc.8 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
|
18
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.5 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
|
19
|
+
|
20
|
+
## [9.0.0-rc.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-rc.8)
|
21
|
+
|
22
|
+
Wed, 04 May 2022 13:26:51 GMT
|
23
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-rc.7..@fluentui/react-switch_v9.0.0-rc.8)
|
24
|
+
|
25
|
+
### Changes
|
26
|
+
|
27
|
+
- Switch: Fixing disabled styles in high contrast mode. ([PR #22817](https://github.com/microsoft/fluentui/pull/22817) by humberto_makoto@hotmail.com)
|
28
|
+
- Bump @fluentui/react-label to v9.0.0-beta.11 ([PR #22786](https://github.com/microsoft/fluentui/pull/22786) by beachball)
|
29
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.8 ([PR #22786](https://github.com/microsoft/fluentui/pull/22786) by beachball)
|
30
|
+
- Bump @fluentui/react-theme to v9.0.0-rc.6 ([PR #22786](https://github.com/microsoft/fluentui/pull/22786) by beachball)
|
31
|
+
- Bump @fluentui/react-utilities to v9.0.0-rc.7 ([PR #22786](https://github.com/microsoft/fluentui/pull/22786) by beachball)
|
32
|
+
|
33
|
+
## [9.0.0-rc.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-rc.7)
|
34
|
+
|
35
|
+
Mon, 25 Apr 2022 09:32:19 GMT
|
36
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-rc.6..@fluentui/react-switch_v9.0.0-rc.7)
|
37
|
+
|
38
|
+
### Changes
|
39
|
+
|
40
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.7 ([PR #22601](https://github.com/microsoft/fluentui/pull/22601) by beachball)
|
41
|
+
|
7
42
|
## [9.0.0-rc.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-rc.6)
|
8
43
|
|
9
|
-
Tue, 19 Apr 2022 19:
|
44
|
+
Tue, 19 Apr 2022 19:16:54 GMT
|
10
45
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-rc.5..@fluentui/react-switch_v9.0.0-rc.6)
|
11
46
|
|
12
47
|
### Changes
|
@@ -16,15 +51,15 @@ Tue, 19 Apr 2022 19:14:04 GMT
|
|
16
51
|
- update react-icons version to ^2.0.166-rc.3 from ^2.0.159-beta.10 ([PR #22512](https://github.com/microsoft/fluentui/pull/22512) by seanmonahan@microsoft.com)
|
17
52
|
- Removing star exports. ([PR #22139](https://github.com/microsoft/fluentui/pull/22139) by Humberto.Morimoto@microsoft.com)
|
18
53
|
- Switch: Updating spec and migration guide to reflect latest state of the component. ([PR #22011](https://github.com/microsoft/fluentui/pull/22011) by email not defined)
|
19
|
-
- Bump @fluentui/react-label to v9.0.0-beta.10 ([PR #
|
20
|
-
- Bump @fluentui/react-tabster to v9.0.0-rc.6 ([PR #
|
21
|
-
- Bump @fluentui/react-theme to v9.0.0-rc.5 ([PR #
|
22
|
-
- Bump @fluentui/react-utilities to v9.0.0-rc.6 ([PR #
|
23
|
-
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.4 ([PR #
|
54
|
+
- Bump @fluentui/react-label to v9.0.0-beta.10 ([PR #21995](https://github.com/microsoft/fluentui/pull/21995) by beachball)
|
55
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.6 ([PR #21995](https://github.com/microsoft/fluentui/pull/21995) by beachball)
|
56
|
+
- Bump @fluentui/react-theme to v9.0.0-rc.5 ([PR #21995](https://github.com/microsoft/fluentui/pull/21995) by beachball)
|
57
|
+
- Bump @fluentui/react-utilities to v9.0.0-rc.6 ([PR #21995](https://github.com/microsoft/fluentui/pull/21995) by beachball)
|
58
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.4 ([PR #21995](https://github.com/microsoft/fluentui/pull/21995) by beachball)
|
24
59
|
|
25
60
|
## [9.0.0-rc.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-rc.5)
|
26
61
|
|
27
|
-
Fri, 04 Mar 2022 05:17:30 GMT
|
62
|
+
Fri, 04 Mar 2022 05:17:30 GMT
|
28
63
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-rc.4..@fluentui/react-switch_v9.0.0-rc.5)
|
29
64
|
|
30
65
|
### Changes
|
@@ -38,7 +73,7 @@ Fri, 04 Mar 2022 05:17:30 GMT
|
|
38
73
|
|
39
74
|
## [9.0.0-rc.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-rc.4)
|
40
75
|
|
41
|
-
Tue, 01 Mar 2022 02:17:38 GMT
|
76
|
+
Tue, 01 Mar 2022 02:17:38 GMT
|
42
77
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-rc.3..@fluentui/react-switch_v9.0.0-rc.4)
|
43
78
|
|
44
79
|
### Changes
|
@@ -51,7 +86,7 @@ Tue, 01 Mar 2022 02:17:38 GMT
|
|
51
86
|
|
52
87
|
## [9.0.0-rc.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-rc.3)
|
53
88
|
|
54
|
-
Fri, 18 Feb 2022 13:35:34 GMT
|
89
|
+
Fri, 18 Feb 2022 13:35:34 GMT
|
55
90
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-rc.1..@fluentui/react-switch_v9.0.0-rc.3)
|
56
91
|
|
57
92
|
### Changes
|
@@ -65,7 +100,7 @@ Fri, 18 Feb 2022 13:35:34 GMT
|
|
65
100
|
|
66
101
|
## [9.0.0-rc.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-rc.1)
|
67
102
|
|
68
|
-
Thu, 10 Feb 2022 08:50:51 GMT
|
103
|
+
Thu, 10 Feb 2022 08:50:51 GMT
|
69
104
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-beta.5..@fluentui/react-switch_v9.0.0-rc.1)
|
70
105
|
|
71
106
|
### Changes
|
@@ -87,7 +122,7 @@ Thu, 10 Feb 2022 08:50:51 GMT
|
|
87
122
|
|
88
123
|
## [9.0.0-beta.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-beta.5)
|
89
124
|
|
90
|
-
Thu, 25 Nov 2021 08:34:17 GMT
|
125
|
+
Thu, 25 Nov 2021 08:34:17 GMT
|
91
126
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-beta.4..@fluentui/react-switch_v9.0.0-beta.5)
|
92
127
|
|
93
128
|
### Changes
|
@@ -102,7 +137,7 @@ Thu, 25 Nov 2021 08:34:17 GMT
|
|
102
137
|
|
103
138
|
## [9.0.0-beta.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-beta.4)
|
104
139
|
|
105
|
-
Fri, 12 Nov 2021 13:25:33 GMT
|
140
|
+
Fri, 12 Nov 2021 13:25:33 GMT
|
106
141
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-beta.3..@fluentui/react-switch_v9.0.0-beta.4)
|
107
142
|
|
108
143
|
### Changes
|
@@ -118,7 +153,7 @@ Fri, 12 Nov 2021 13:25:33 GMT
|
|
118
153
|
|
119
154
|
## [9.0.0-beta.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-beta.3)
|
120
155
|
|
121
|
-
Wed, 27 Oct 2021 12:14:22 GMT
|
156
|
+
Wed, 27 Oct 2021 12:14:22 GMT
|
122
157
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-beta.2..@fluentui/react-switch_v9.0.0-beta.3)
|
123
158
|
|
124
159
|
### Changes
|
@@ -138,7 +173,7 @@ Wed, 27 Oct 2021 12:14:22 GMT
|
|
138
173
|
|
139
174
|
## [9.0.0-beta.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-beta.2)
|
140
175
|
|
141
|
-
Tue, 12 Oct 2021 19:45:58 GMT
|
176
|
+
Tue, 12 Oct 2021 19:45:58 GMT
|
142
177
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-beta.1..@fluentui/react-switch_v9.0.0-beta.2)
|
143
178
|
|
144
179
|
### Changes
|
@@ -148,7 +183,7 @@ Tue, 12 Oct 2021 19:45:58 GMT
|
|
148
183
|
|
149
184
|
## [9.0.0-beta.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-beta.1)
|
150
185
|
|
151
|
-
Wed, 06 Oct 2021 10:37:22 GMT
|
186
|
+
Wed, 06 Oct 2021 10:37:22 GMT
|
152
187
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-alpha.17..@fluentui/react-switch_v9.0.0-beta.1)
|
153
188
|
|
154
189
|
### Changes
|
@@ -167,7 +202,7 @@ Wed, 06 Oct 2021 10:37:22 GMT
|
|
167
202
|
|
168
203
|
## [9.0.0-alpha.17](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-alpha.17)
|
169
204
|
|
170
|
-
Tue, 05 Oct 2021 12:47:58 GMT
|
205
|
+
Tue, 05 Oct 2021 12:47:58 GMT
|
171
206
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-alpha.16..@fluentui/react-switch_v9.0.0-alpha.17)
|
172
207
|
|
173
208
|
### Changes
|
@@ -182,7 +217,7 @@ Tue, 05 Oct 2021 12:47:58 GMT
|
|
182
217
|
|
183
218
|
## [9.0.0-alpha.16](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-alpha.16)
|
184
219
|
|
185
|
-
Tue, 05 Oct 2021 09:28:07 GMT
|
220
|
+
Tue, 05 Oct 2021 09:28:07 GMT
|
186
221
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-alpha.15..@fluentui/react-switch_v9.0.0-alpha.16)
|
187
222
|
|
188
223
|
### Changes
|
@@ -199,7 +234,7 @@ Tue, 05 Oct 2021 09:28:07 GMT
|
|
199
234
|
|
200
235
|
## [9.0.0-alpha.15](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-alpha.15)
|
201
236
|
|
202
|
-
Fri, 01 Oct 2021 14:13:08 GMT
|
237
|
+
Fri, 01 Oct 2021 14:13:08 GMT
|
203
238
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-alpha.13..@fluentui/react-switch_v9.0.0-alpha.15)
|
204
239
|
|
205
240
|
### Changes
|
@@ -218,7 +253,7 @@ Fri, 01 Oct 2021 14:13:08 GMT
|
|
218
253
|
|
219
254
|
## [9.0.0-alpha.13](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-alpha.13)
|
220
255
|
|
221
|
-
Fri, 01 Oct 2021 09:44:56 GMT
|
256
|
+
Fri, 01 Oct 2021 09:44:56 GMT
|
222
257
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-alpha.12..@fluentui/react-switch_v9.0.0-alpha.13)
|
223
258
|
|
224
259
|
### Changes
|
@@ -229,7 +264,7 @@ Fri, 01 Oct 2021 09:44:56 GMT
|
|
229
264
|
|
230
265
|
## [9.0.0-alpha.12](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-alpha.12)
|
231
266
|
|
232
|
-
Wed, 29 Sep 2021 08:06:11 GMT
|
267
|
+
Wed, 29 Sep 2021 08:06:11 GMT
|
233
268
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-alpha.11..@fluentui/react-switch_v9.0.0-alpha.12)
|
234
269
|
|
235
270
|
### Changes
|
@@ -246,7 +281,7 @@ Wed, 29 Sep 2021 08:06:11 GMT
|
|
246
281
|
|
247
282
|
## [9.0.0-alpha.11](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-alpha.11)
|
248
283
|
|
249
|
-
Mon, 27 Sep 2021 08:06:00 GMT
|
284
|
+
Mon, 27 Sep 2021 08:06:00 GMT
|
250
285
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-alpha.10..@fluentui/react-switch_v9.0.0-alpha.11)
|
251
286
|
|
252
287
|
### Changes
|
@@ -262,7 +297,7 @@ Mon, 27 Sep 2021 08:06:00 GMT
|
|
262
297
|
|
263
298
|
## [9.0.0-alpha.10](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-alpha.10)
|
264
299
|
|
265
|
-
Fri, 24 Sep 2021 09:17:17 GMT
|
300
|
+
Fri, 24 Sep 2021 09:17:17 GMT
|
266
301
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-alpha.9..@fluentui/react-switch_v9.0.0-alpha.10)
|
267
302
|
|
268
303
|
### Changes
|
@@ -278,7 +313,7 @@ Fri, 24 Sep 2021 09:17:17 GMT
|
|
278
313
|
|
279
314
|
## [9.0.0-alpha.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-alpha.9)
|
280
315
|
|
281
|
-
Thu, 23 Sep 2021 08:21:34 GMT
|
316
|
+
Thu, 23 Sep 2021 08:21:34 GMT
|
282
317
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-alpha.8..@fluentui/react-switch_v9.0.0-alpha.9)
|
283
318
|
|
284
319
|
### Changes
|
@@ -295,7 +330,7 @@ Thu, 23 Sep 2021 08:21:34 GMT
|
|
295
330
|
|
296
331
|
## [9.0.0-alpha.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-alpha.8)
|
297
332
|
|
298
|
-
Wed, 22 Sep 2021 10:10:07 GMT
|
333
|
+
Wed, 22 Sep 2021 10:10:07 GMT
|
299
334
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-alpha.7..@fluentui/react-switch_v9.0.0-alpha.8)
|
300
335
|
|
301
336
|
### Changes
|
@@ -312,7 +347,7 @@ Wed, 22 Sep 2021 10:10:07 GMT
|
|
312
347
|
|
313
348
|
## [9.0.0-alpha.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-alpha.7)
|
314
349
|
|
315
|
-
Tue, 21 Sep 2021 07:42:34 GMT
|
350
|
+
Tue, 21 Sep 2021 07:42:34 GMT
|
316
351
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-alpha.6..@fluentui/react-switch_v9.0.0-alpha.7)
|
317
352
|
|
318
353
|
### Changes
|
@@ -329,7 +364,7 @@ Tue, 21 Sep 2021 07:42:34 GMT
|
|
329
364
|
|
330
365
|
## [9.0.0-alpha.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-alpha.6)
|
331
366
|
|
332
|
-
Mon, 20 Sep 2021 07:36:26 GMT
|
367
|
+
Mon, 20 Sep 2021 07:36:26 GMT
|
333
368
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-alpha.5..@fluentui/react-switch_v9.0.0-alpha.6)
|
334
369
|
|
335
370
|
### Changes
|
@@ -338,7 +373,7 @@ Mon, 20 Sep 2021 07:36:26 GMT
|
|
338
373
|
|
339
374
|
## [9.0.0-alpha.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-alpha.5)
|
340
375
|
|
341
|
-
Fri, 17 Sep 2021 07:35:26 GMT
|
376
|
+
Fri, 17 Sep 2021 07:35:26 GMT
|
342
377
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-alpha.4..@fluentui/react-switch_v9.0.0-alpha.5)
|
343
378
|
|
344
379
|
### Changes
|
@@ -347,7 +382,7 @@ Fri, 17 Sep 2021 07:35:26 GMT
|
|
347
382
|
|
348
383
|
## [9.0.0-alpha.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-alpha.4)
|
349
384
|
|
350
|
-
Thu, 16 Sep 2021 07:38:39 GMT
|
385
|
+
Thu, 16 Sep 2021 07:38:39 GMT
|
351
386
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-alpha.3..@fluentui/react-switch_v9.0.0-alpha.4)
|
352
387
|
|
353
388
|
### Changes
|
@@ -357,7 +392,7 @@ Thu, 16 Sep 2021 07:38:39 GMT
|
|
357
392
|
|
358
393
|
## [9.0.0-alpha.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-alpha.3)
|
359
394
|
|
360
|
-
Tue, 14 Sep 2021 20:09:02 GMT
|
395
|
+
Tue, 14 Sep 2021 20:09:02 GMT
|
361
396
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-alpha.2..@fluentui/react-switch_v9.0.0-alpha.3)
|
362
397
|
|
363
398
|
### Changes
|
@@ -366,7 +401,7 @@ Tue, 14 Sep 2021 20:09:02 GMT
|
|
366
401
|
|
367
402
|
## [9.0.0-alpha.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-alpha.2)
|
368
403
|
|
369
|
-
Fri, 10 Sep 2021 16:31:53 GMT
|
404
|
+
Fri, 10 Sep 2021 16:31:53 GMT
|
370
405
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-alpha.1..@fluentui/react-switch_v9.0.0-alpha.2)
|
371
406
|
|
372
407
|
### Changes
|
@@ -376,7 +411,7 @@ Fri, 10 Sep 2021 16:31:53 GMT
|
|
376
411
|
|
377
412
|
## [9.0.0-alpha.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-alpha.1)
|
378
413
|
|
379
|
-
Fri, 10 Sep 2021 07:39:51 GMT
|
414
|
+
Fri, 10 Sep 2021 07:39:51 GMT
|
380
415
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-alpha.0..@fluentui/react-switch_v9.0.0-alpha.1)
|
381
416
|
|
382
417
|
### Changes
|
@@ -385,7 +420,7 @@ Fri, 10 Sep 2021 07:39:51 GMT
|
|
385
420
|
|
386
421
|
## [9.0.0-alpha.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-alpha.0)
|
387
422
|
|
388
|
-
Mon, 06 Sep 2021 07:34:53 GMT
|
423
|
+
Mon, 06 Sep 2021 07:34:53 GMT
|
389
424
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-alpha.0..@fluentui/react-switch_v9.0.0-alpha.0)
|
390
425
|
|
391
426
|
### Changes
|
@@ -394,7 +429,7 @@ Mon, 06 Sep 2021 07:34:53 GMT
|
|
394
429
|
|
395
430
|
## [9.0.0-alpha.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-alpha.0)
|
396
431
|
|
397
|
-
Thu, 02 Sep 2021 07:36:46 GMT
|
432
|
+
Thu, 02 Sep 2021 07:36:46 GMT
|
398
433
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-alpha.0..@fluentui/react-switch_v9.0.0-alpha.0)
|
399
434
|
|
400
435
|
### Patches
|
@@ -407,7 +442,7 @@ Thu, 02 Sep 2021 07:36:46 GMT
|
|
407
442
|
|
408
443
|
## [9.0.0-alpha.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-alpha.0)
|
409
444
|
|
410
|
-
Wed, 01 Sep 2021 07:39:56 GMT
|
445
|
+
Wed, 01 Sep 2021 07:39:56 GMT
|
411
446
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-alpha.0..@fluentui/react-switch_v9.0.0-alpha.0)
|
412
447
|
|
413
448
|
### Changes
|
@@ -416,7 +451,7 @@ Wed, 01 Sep 2021 07:39:56 GMT
|
|
416
451
|
|
417
452
|
## [9.0.0-alpha.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-alpha.0)
|
418
453
|
|
419
|
-
Tue, 31 Aug 2021 07:37:47 GMT
|
454
|
+
Tue, 31 Aug 2021 07:37:47 GMT
|
420
455
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-alpha.0..@fluentui/react-switch_v9.0.0-alpha.0)
|
421
456
|
|
422
457
|
### Changes
|
@@ -425,7 +460,7 @@ Tue, 31 Aug 2021 07:37:47 GMT
|
|
425
460
|
|
426
461
|
## [9.0.0-alpha.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-alpha.0)
|
427
462
|
|
428
|
-
Fri, 27 Aug 2021 07:33:32 GMT
|
463
|
+
Fri, 27 Aug 2021 07:33:32 GMT
|
429
464
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-alpha.0..@fluentui/react-switch_v9.0.0-alpha.0)
|
430
465
|
|
431
466
|
### Changes
|
@@ -434,7 +469,7 @@ Fri, 27 Aug 2021 07:33:32 GMT
|
|
434
469
|
|
435
470
|
## [9.0.0-alpha.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-alpha.0)
|
436
471
|
|
437
|
-
Thu, 26 Aug 2021 07:35:43 GMT
|
472
|
+
Thu, 26 Aug 2021 07:35:43 GMT
|
438
473
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-alpha.0..@fluentui/react-switch_v9.0.0-alpha.0)
|
439
474
|
|
440
475
|
### Changes
|
@@ -443,7 +478,7 @@ Thu, 26 Aug 2021 07:35:43 GMT
|
|
443
478
|
|
444
479
|
## [9.0.0-alpha.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-alpha.0)
|
445
480
|
|
446
|
-
Fri, 20 Aug 2021 07:37:28 GMT
|
481
|
+
Fri, 20 Aug 2021 07:37:28 GMT
|
447
482
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-alpha.0..@fluentui/react-switch_v9.0.0-alpha.0)
|
448
483
|
|
449
484
|
### Changes
|
@@ -452,7 +487,7 @@ Fri, 20 Aug 2021 07:37:28 GMT
|
|
452
487
|
|
453
488
|
## [9.0.0-alpha.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-switch_v9.0.0-alpha.0)
|
454
489
|
|
455
|
-
Thu, 19 Aug 2021 07:41:35 GMT
|
490
|
+
Thu, 19 Aug 2021 07:41:35 GMT
|
456
491
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-switch_v9.0.0-alpha.0..@fluentui/react-switch_v9.0.0-alpha.0)
|
457
492
|
|
458
493
|
### Changes
|
File without changes
|
@@ -173,9 +173,18 @@ const useInputStyles = /*#__PURE__*/__styles({
|
|
173
173
|
"u4vbwo": ["fipwscc", "fab39iv"],
|
174
174
|
"Bfjga03": "f1th5z1l",
|
175
175
|
"F0s3py": ["fab39iv", "fipwscc"]
|
176
|
+
},
|
177
|
+
"highContrast": {
|
178
|
+
"Bskmvfo": "f19h63kc",
|
179
|
+
"zhypoe": "ffutfdj",
|
180
|
+
"Bb6xxwe": ["f72m8yo", "f1ud47z9"],
|
181
|
+
"o89t22": "f15xfkur",
|
182
|
+
"B7qxyha": ["f1ud47z9", "f72m8yo"],
|
183
|
+
"Bhmcd6p": "f1jaqqzs"
|
176
184
|
}
|
177
185
|
}, {
|
178
|
-
"d": [".f1ewtqcl{box-sizing:border-box;}", ".f1k6fduh{cursor:pointer;}", ".f1l02sjl{height:100%;}", ".f1vgc2s3{left:0;}", ".f1e31b4d{right:0;}", ".f1hu3pq6{margin-top:0;}", ".f11qmguv{margin-right:0;}", ".f1tyq0we{margin-left:0;}", ".f19f4twv{margin-bottom:0;}", ".fk73vx1{opacity:0;}", ".f1euv43f{position:absolute;}", ".f15twtuk{top:0;}", ".fly5x3f{width:100%;}", ".f1owqbgs:checked~.fui-Switch__indicator>*{-webkit-transform:translateX(22px);-moz-transform:translateX(22px);-ms-transform:translateX(22px);transform:translateX(22px);}", ".f1a7g3i4:checked~.fui-Switch__indicator>*{-webkit-transform:translateX(-22px);-moz-transform:translateX(-22px);-ms-transform:translateX(-22px);transform:translateX(-22px);}", ".fvxnmui:disabled{cursor:default;}", ".f1cxq9o1:disabled~.fui-Switch__indicator{color:var(--colorNeutralForegroundDisabled);}", ".f1ks1zsm:disabled~.fui-Switch__label{color:var(--colorNeutralForegroundDisabled);}", ".fiqfi0i:enabled:not(:checked)~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessible);}", ".f9aagkg:enabled:not(:checked)~.fui-Switch__indicator{border-top-color:var(--colorNeutralStrokeAccessible);}", ".fgv8l18:enabled:not(:checked)~.fui-Switch__indicator{border-right-color:var(--colorNeutralStrokeAccessible);}", ".f1p3jmxb:enabled:not(:checked)~.fui-Switch__indicator{border-left-color:var(--colorNeutralStrokeAccessible);}", ".f11yi64e:enabled:not(:checked)~.fui-Switch__indicator{border-bottom-color:var(--colorNeutralStrokeAccessible);}", ".fthrly9:enabled:not(:checked)~.fui-Switch__label{color:var(--colorNeutralForeground1);}", ".fhdp2ht:enabled:not(:checked):hover~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessibleHover);}", ".f1rzj6jj:enabled:not(:checked):hover~.fui-Switch__indicator{border-top-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1jywl1l:enabled:not(:checked):hover~.fui-Switch__indicator{border-right-color:var(--colorNeutralStrokeAccessibleHover);}", ".f13d626x:enabled:not(:checked):hover~.fui-Switch__indicator{border-left-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1ivtmze:enabled:not(:checked):hover~.fui-Switch__indicator{border-bottom-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1uvnr57:enabled:not(:checked):hover:active~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessiblePressed);}", ".frhcydi:enabled:not(:checked):hover:active~.fui-Switch__indicator{border-top-color:var(--colorNeutralStrokeAccessiblePressed);}", ".f1pvt3n7:enabled:not(:checked):hover:active~.fui-Switch__indicator{border-right-color:var(--colorNeutralStrokeAccessiblePressed);}", ".f14i0clv:enabled:not(:checked):hover:active~.fui-Switch__indicator{border-left-color:var(--colorNeutralStrokeAccessiblePressed);}", ".fq9gcw4:enabled:not(:checked):hover:active~.fui-Switch__indicator{border-bottom-color:var(--colorNeutralStrokeAccessiblePressed);}", ".fft44l1:enabled:checked~.fui-Switch__indicator{background-color:var(--colorBrandBackground);}", ".fwlrvmy:enabled:checked~.fui-Switch__indicator{color:var(--colorNeutralForegroundOnBrand);}", ".f1c4gun2:enabled:checked~.fui-Switch__indicator{border-top-color:var(--colorTransparentStroke);}", ".flhgtcm:enabled:checked~.fui-Switch__indicator{border-right-color:var(--colorTransparentStroke);}", ".fx1zdd8:enabled:checked~.fui-Switch__indicator{border-left-color:var(--colorTransparentStroke);}", ".fayrp2e:enabled:checked~.fui-Switch__indicator{border-bottom-color:var(--colorTransparentStroke);}", ".f1vk2knj:enabled:checked:hover~.fui-Switch__indicator{background-color:var(--colorBrandBackgroundHover);}", ".firogjh:enabled:checked:hover~.fui-Switch__indicator{border-top-color:var(--colorTransparentStrokeInteractive);}", ".f1crd6p1:enabled:checked:hover~.fui-Switch__indicator{border-right-color:var(--colorTransparentStrokeInteractive);}", ".for8100:enabled:checked:hover~.fui-Switch__indicator{border-left-color:var(--colorTransparentStrokeInteractive);}", ".f1v5j4zb:enabled:checked:hover~.fui-Switch__indicator{border-bottom-color:var(--colorTransparentStrokeInteractive);}", ".f1rt7qcq:enabled:checked:hover:active~.fui-Switch__indicator{background-color:var(--colorBrandBackgroundPressed);}", ".fxvotg6:enabled:checked:hover:active~.fui-Switch__indicator{border-top-color:var(--colorTransparentStrokeInteractive);}", ".fk9ur30:enabled:checked:hover:active~.fui-Switch__indicator{border-right-color:var(--colorTransparentStrokeInteractive);}", ".f3u5smv:enabled:checked:hover:active~.fui-Switch__indicator{border-left-color:var(--colorTransparentStrokeInteractive);}", ".fdtj07x:enabled:checked:hover:active~.fui-Switch__indicator{border-bottom-color:var(--colorTransparentStrokeInteractive);}", ".fv5mb1o:disabled:not(:checked)~.fui-Switch__indicator{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f1i2l8ou:disabled:not(:checked)~.fui-Switch__indicator{border-right-color:var(--colorNeutralStrokeDisabled);}", ".fxj1kmv:disabled:not(:checked)~.fui-Switch__indicator{border-left-color:var(--colorNeutralStrokeDisabled);}", ".fku528b:disabled:not(:checked)~.fui-Switch__indicator{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".fabcpc0:disabled:checked~.fui-Switch__indicator{background-color:var(--colorNeutralBackgroundDisabled);}", ".f17xwy6w:disabled:checked~.fui-Switch__indicator{border-top-color:var(--colorTransparentStrokeDisabled);}", ".fipwscc:disabled:checked~.fui-Switch__indicator{border-right-color:var(--colorTransparentStrokeDisabled);}", ".fab39iv:disabled:checked~.fui-Switch__indicator{border-left-color:var(--colorTransparentStrokeDisabled);}", ".f1th5z1l:disabled:checked~.fui-Switch__indicator{border-bottom-color:var(--colorTransparentStrokeDisabled);}"]
|
186
|
+
"d": [".f1ewtqcl{box-sizing:border-box;}", ".f1k6fduh{cursor:pointer;}", ".f1l02sjl{height:100%;}", ".f1vgc2s3{left:0;}", ".f1e31b4d{right:0;}", ".f1hu3pq6{margin-top:0;}", ".f11qmguv{margin-right:0;}", ".f1tyq0we{margin-left:0;}", ".f19f4twv{margin-bottom:0;}", ".fk73vx1{opacity:0;}", ".f1euv43f{position:absolute;}", ".f15twtuk{top:0;}", ".fly5x3f{width:100%;}", ".f1owqbgs:checked~.fui-Switch__indicator>*{-webkit-transform:translateX(22px);-moz-transform:translateX(22px);-ms-transform:translateX(22px);transform:translateX(22px);}", ".f1a7g3i4:checked~.fui-Switch__indicator>*{-webkit-transform:translateX(-22px);-moz-transform:translateX(-22px);-ms-transform:translateX(-22px);transform:translateX(-22px);}", ".fvxnmui:disabled{cursor:default;}", ".f1cxq9o1:disabled~.fui-Switch__indicator{color:var(--colorNeutralForegroundDisabled);}", ".f1ks1zsm:disabled~.fui-Switch__label{color:var(--colorNeutralForegroundDisabled);}", ".fiqfi0i:enabled:not(:checked)~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessible);}", ".f9aagkg:enabled:not(:checked)~.fui-Switch__indicator{border-top-color:var(--colorNeutralStrokeAccessible);}", ".fgv8l18:enabled:not(:checked)~.fui-Switch__indicator{border-right-color:var(--colorNeutralStrokeAccessible);}", ".f1p3jmxb:enabled:not(:checked)~.fui-Switch__indicator{border-left-color:var(--colorNeutralStrokeAccessible);}", ".f11yi64e:enabled:not(:checked)~.fui-Switch__indicator{border-bottom-color:var(--colorNeutralStrokeAccessible);}", ".fthrly9:enabled:not(:checked)~.fui-Switch__label{color:var(--colorNeutralForeground1);}", ".fhdp2ht:enabled:not(:checked):hover~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessibleHover);}", ".f1rzj6jj:enabled:not(:checked):hover~.fui-Switch__indicator{border-top-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1jywl1l:enabled:not(:checked):hover~.fui-Switch__indicator{border-right-color:var(--colorNeutralStrokeAccessibleHover);}", ".f13d626x:enabled:not(:checked):hover~.fui-Switch__indicator{border-left-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1ivtmze:enabled:not(:checked):hover~.fui-Switch__indicator{border-bottom-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1uvnr57:enabled:not(:checked):hover:active~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessiblePressed);}", ".frhcydi:enabled:not(:checked):hover:active~.fui-Switch__indicator{border-top-color:var(--colorNeutralStrokeAccessiblePressed);}", ".f1pvt3n7:enabled:not(:checked):hover:active~.fui-Switch__indicator{border-right-color:var(--colorNeutralStrokeAccessiblePressed);}", ".f14i0clv:enabled:not(:checked):hover:active~.fui-Switch__indicator{border-left-color:var(--colorNeutralStrokeAccessiblePressed);}", ".fq9gcw4:enabled:not(:checked):hover:active~.fui-Switch__indicator{border-bottom-color:var(--colorNeutralStrokeAccessiblePressed);}", ".fft44l1:enabled:checked~.fui-Switch__indicator{background-color:var(--colorBrandBackground);}", ".fwlrvmy:enabled:checked~.fui-Switch__indicator{color:var(--colorNeutralForegroundOnBrand);}", ".f1c4gun2:enabled:checked~.fui-Switch__indicator{border-top-color:var(--colorTransparentStroke);}", ".flhgtcm:enabled:checked~.fui-Switch__indicator{border-right-color:var(--colorTransparentStroke);}", ".fx1zdd8:enabled:checked~.fui-Switch__indicator{border-left-color:var(--colorTransparentStroke);}", ".fayrp2e:enabled:checked~.fui-Switch__indicator{border-bottom-color:var(--colorTransparentStroke);}", ".f1vk2knj:enabled:checked:hover~.fui-Switch__indicator{background-color:var(--colorBrandBackgroundHover);}", ".firogjh:enabled:checked:hover~.fui-Switch__indicator{border-top-color:var(--colorTransparentStrokeInteractive);}", ".f1crd6p1:enabled:checked:hover~.fui-Switch__indicator{border-right-color:var(--colorTransparentStrokeInteractive);}", ".for8100:enabled:checked:hover~.fui-Switch__indicator{border-left-color:var(--colorTransparentStrokeInteractive);}", ".f1v5j4zb:enabled:checked:hover~.fui-Switch__indicator{border-bottom-color:var(--colorTransparentStrokeInteractive);}", ".f1rt7qcq:enabled:checked:hover:active~.fui-Switch__indicator{background-color:var(--colorBrandBackgroundPressed);}", ".fxvotg6:enabled:checked:hover:active~.fui-Switch__indicator{border-top-color:var(--colorTransparentStrokeInteractive);}", ".fk9ur30:enabled:checked:hover:active~.fui-Switch__indicator{border-right-color:var(--colorTransparentStrokeInteractive);}", ".f3u5smv:enabled:checked:hover:active~.fui-Switch__indicator{border-left-color:var(--colorTransparentStrokeInteractive);}", ".fdtj07x:enabled:checked:hover:active~.fui-Switch__indicator{border-bottom-color:var(--colorTransparentStrokeInteractive);}", ".fv5mb1o:disabled:not(:checked)~.fui-Switch__indicator{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f1i2l8ou:disabled:not(:checked)~.fui-Switch__indicator{border-right-color:var(--colorNeutralStrokeDisabled);}", ".fxj1kmv:disabled:not(:checked)~.fui-Switch__indicator{border-left-color:var(--colorNeutralStrokeDisabled);}", ".fku528b:disabled:not(:checked)~.fui-Switch__indicator{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".fabcpc0:disabled:checked~.fui-Switch__indicator{background-color:var(--colorNeutralBackgroundDisabled);}", ".f17xwy6w:disabled:checked~.fui-Switch__indicator{border-top-color:var(--colorTransparentStrokeDisabled);}", ".fipwscc:disabled:checked~.fui-Switch__indicator{border-right-color:var(--colorTransparentStrokeDisabled);}", ".fab39iv:disabled:checked~.fui-Switch__indicator{border-left-color:var(--colorTransparentStrokeDisabled);}", ".f1th5z1l:disabled:checked~.fui-Switch__indicator{border-bottom-color:var(--colorTransparentStrokeDisabled);}"],
|
187
|
+
"t": ["@media (forced-colors: active){.f19h63kc:disabled~.fui-Switch__indicator{color:GrayText;}}", "@media (forced-colors: active){.ffutfdj:disabled~.fui-Switch__indicator{border-top-color:GrayText;}}", "@media (forced-colors: active){.f72m8yo:disabled~.fui-Switch__indicator{border-right-color:GrayText;}.f1ud47z9:disabled~.fui-Switch__indicator{border-left-color:GrayText;}}", "@media (forced-colors: active){.f15xfkur:disabled~.fui-Switch__indicator{border-bottom-color:GrayText;}}", "@media (forced-colors: active){.f1ud47z9:disabled~.fui-Switch__indicator{border-left-color:GrayText;}.f72m8yo:disabled~.fui-Switch__indicator{border-right-color:GrayText;}}", "@media (forced-colors: active){.f1jaqqzs:disabled~.fui-Switch__label{color:GrayText;}}"]
|
179
188
|
});
|
180
189
|
|
181
190
|
const useLabelStyles = /*#__PURE__*/__styles({
|
@@ -200,7 +209,7 @@ export const useSwitchStyles_unstable = state => {
|
|
200
209
|
} = state;
|
201
210
|
state.root.className = mergeClasses(switchClassNames.root, rootStyles.base, rootStyles[labelPosition], state.root.className);
|
202
211
|
state.indicator.className = mergeClasses(switchClassNames.indicator, indicatorStyles.base, state.indicator.className);
|
203
|
-
state.input.className = mergeClasses(switchClassNames.input, inputStyles.base, state.input.className);
|
212
|
+
state.input.className = mergeClasses(switchClassNames.input, inputStyles.base, inputStyles.highContrast, state.input.className);
|
204
213
|
|
205
214
|
if (state.label) {
|
206
215
|
state.label.className = mergeClasses(switchClassNames.label, labelStyles.base, state.label.className);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/Switch/useSwitchStyles.ts"],"names":[],"mappings":"AAAA,SAAS,uBAAT,QAAwC,yBAAxC;AACA,SAAS,MAAT,QAAuB,uBAAvB;AACA,mBAAqB,YAArB,EAAmC,UAAnC,QAAqD,gBAArD;AAIA,OAAO,MAAM,gBAAgB,GAAgC;AAC3D,EAAA,IAAI,EAAE,YADqD;AAE3D,EAAA,SAAS,EAAE,uBAFgD;AAG3D,EAAA,KAAK,EAAE,mBAHoD;AAI3D,EAAA,KAAK,EAAE;AAJoD,CAAtD;AAOP;;AAEG;;AACH,OAAO,MAAM,eAAe,GAAG,gBAAgB,CAAC,IAAzC,C,CAEP;;AACA,MAAM,SAAS,GAAG,CAAlB;AACA,MAAM,QAAQ,GAAG,CAAjB;AACA,MAAM,QAAQ,GAAG,EAAjB,C,CAEA;;AACA,MAAM,yBAAyB,GAAG,CAAlC;AACA,MAAM,SAAS,GAAG,EAAlB;AACA,MAAM,WAAW,GAAG,EAApB;AACA,MAAM,UAAU,GAAG,EAAnB;;AAEA,MAAM,aAAa,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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-theme';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { SwitchSlots, SwitchState } from './Switch.types';\n\nexport const switchClassNames: SlotClassNames<SwitchSlots> = {\n root: 'fui-Switch',\n indicator: 'fui-Switch__indicator',\n input: 'fui-Switch__input',\n label: 'fui-Switch__label',\n};\n\n/**\n * @deprecated Use `switchClassNames.root` instead.\n */\nexport const switchClassName = switchClassNames.root;\n\n// TODO replace these spacing constants with theme values once they're on the theme.\nconst spacingXS = 4;\nconst spacingS = 8;\nconst spacingM = 12;\n\n// Thumb and track sizes used by the component.\nconst spaceBetweenThumbAndTrack = 2;\nconst thumbSize = 14;\nconst trackHeight = 20;\nconst trackWidth = 40;\n\nconst useRootStyles = makeStyles({\n base: {\n boxSizing: 'border-box',\n columnGap: `${spacingM}px`,\n display: 'inline-flex',\n ...shorthands.padding(`${spacingS}px`),\n position: 'relative',\n\n ...createFocusOutlineStyle({ style: {}, selector: 'focus-within' }),\n },\n\n // Label position variations\n above: {\n flexDirection: 'column',\n paddingTop: `${spacingXS}px`,\n rowGap: `${spacingXS}px`,\n },\n after: {\n alignItems: 'flex-start',\n columnGap: `${spacingM}px`,\n flexDirection: 'row',\n },\n before: {\n alignItems: 'flex-start',\n columnGap: `${spacingM}px`,\n flexDirection: 'row',\n },\n});\n\nconst useIndicatorStyles = makeStyles({\n base: {\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n ...shorthands.borderStyle('solid'),\n ...shorthands.borderWidth('1px'),\n boxSizing: 'border-box',\n fill: 'currentColor',\n flexShrink: 0,\n fontSize: `${thumbSize + spaceBetweenThumbAndTrack}px`,\n height: `${trackHeight}px`,\n pointerEvents: 'none',\n transitionDuration: '200ms',\n transitionTimingFunction: 'cubic-bezier(0.33, 0, 0.67, 1)',\n transitionProperty: 'background, border, color',\n width: `${trackWidth}px`,\n\n '> *': {\n transitionDuration: '200ms',\n transitionTimingFunction: 'cubic-bezier(0.33, 0, 0.67, 1)',\n transitionProperty: 'transform',\n },\n },\n});\n\nconst useInputStyles = makeStyles({\n base: {\n boxSizing: 'border-box',\n cursor: 'pointer',\n height: '100%',\n left: 0,\n ...shorthands.margin(0),\n opacity: 0,\n position: 'absolute',\n top: 0,\n width: '100%',\n\n // Checked (both enabled and disabled)\n ':checked': {\n [`& ~ .${switchClassNames.indicator}`]: {\n '> *': {\n transform: `translateX(${trackWidth - thumbSize - spaceBetweenThumbAndTrack * 2}px)`,\n },\n },\n },\n\n // Disabled (both checked and unchecked)\n ':disabled': {\n cursor: 'default',\n\n [`& ~ .${switchClassNames.indicator}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n [`& ~ .${switchClassNames.label}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n\n // Enabled and unchecked\n ':enabled:not(:checked)': {\n [`& ~ .${switchClassNames.indicator}`]: {\n color: tokens.colorNeutralStrokeAccessible,\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessible),\n },\n\n [`& ~ .${switchClassNames.label}`]: {\n color: tokens.colorNeutralForeground1,\n },\n\n ':hover': {\n [`& ~ .${switchClassNames.indicator}`]: {\n color: tokens.colorNeutralStrokeAccessibleHover,\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessibleHover),\n },\n },\n\n ':hover:active': {\n [`& ~ .${switchClassNames.indicator}`]: {\n color: tokens.colorNeutralStrokeAccessiblePressed,\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessiblePressed),\n },\n },\n },\n\n // Enabled and checked\n ':enabled:checked': {\n [`& ~ .${switchClassNames.indicator}`]: {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n\n ':hover': {\n [`& ~ .${switchClassNames.indicator}`]: {\n backgroundColor: tokens.colorBrandBackgroundHover,\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n },\n },\n\n ':hover:active': {\n [`& ~ .${switchClassNames.indicator}`]: {\n backgroundColor: tokens.colorBrandBackgroundPressed,\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n },\n },\n },\n\n // Disabled and unchecked\n ':disabled:not(:checked)': {\n [`& ~ .${switchClassNames.indicator}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n },\n },\n\n // Disabled and checked\n ':disabled:checked': {\n [`& ~ .${switchClassNames.indicator}`]: {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorTransparentStrokeDisabled),\n },\n },\n },\n\n highContrast: {\n '@media (forced-colors: active)': {\n ':disabled': {\n [`& ~ .${switchClassNames.indicator}`]: {\n color: 'GrayText',\n ...shorthands.borderColor('GrayText'),\n },\n\n [`& ~ .${switchClassNames.label}`]: {\n color: 'GrayText',\n },\n },\n },\n },\n});\n\nconst useLabelStyles = makeStyles({\n base: {\n userSelect: 'none',\n },\n});\n\n/**\n * Apply styling to the Switch slots based on the state\n */\nexport const useSwitchStyles_unstable = (state: SwitchState): SwitchState => {\n const rootStyles = useRootStyles();\n const indicatorStyles = useIndicatorStyles();\n const inputStyles = useInputStyles();\n const labelStyles = useLabelStyles();\n\n const { labelPosition } = state;\n\n state.root.className = mergeClasses(\n switchClassNames.root,\n rootStyles.base,\n rootStyles[labelPosition],\n state.root.className,\n );\n\n state.indicator.className = mergeClasses(switchClassNames.indicator, indicatorStyles.base, state.indicator.className);\n\n state.input.className = mergeClasses(\n switchClassNames.input,\n inputStyles.base,\n inputStyles.highContrast,\n state.input.className,\n );\n\n if (state.label) {\n state.label.className = mergeClasses(switchClassNames.label, labelStyles.base, state.label.className);\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
@@ -183,9 +183,18 @@ const useInputStyles = /*#__PURE__*/react_1.__styles({
|
|
183
183
|
"u4vbwo": ["fipwscc", "fab39iv"],
|
184
184
|
"Bfjga03": "f1th5z1l",
|
185
185
|
"F0s3py": ["fab39iv", "fipwscc"]
|
186
|
+
},
|
187
|
+
"highContrast": {
|
188
|
+
"Bskmvfo": "f19h63kc",
|
189
|
+
"zhypoe": "ffutfdj",
|
190
|
+
"Bb6xxwe": ["f72m8yo", "f1ud47z9"],
|
191
|
+
"o89t22": "f15xfkur",
|
192
|
+
"B7qxyha": ["f1ud47z9", "f72m8yo"],
|
193
|
+
"Bhmcd6p": "f1jaqqzs"
|
186
194
|
}
|
187
195
|
}, {
|
188
|
-
"d": [".f1ewtqcl{box-sizing:border-box;}", ".f1k6fduh{cursor:pointer;}", ".f1l02sjl{height:100%;}", ".f1vgc2s3{left:0;}", ".f1e31b4d{right:0;}", ".f1hu3pq6{margin-top:0;}", ".f11qmguv{margin-right:0;}", ".f1tyq0we{margin-left:0;}", ".f19f4twv{margin-bottom:0;}", ".fk73vx1{opacity:0;}", ".f1euv43f{position:absolute;}", ".f15twtuk{top:0;}", ".fly5x3f{width:100%;}", ".f1owqbgs:checked~.fui-Switch__indicator>*{-webkit-transform:translateX(22px);-moz-transform:translateX(22px);-ms-transform:translateX(22px);transform:translateX(22px);}", ".f1a7g3i4:checked~.fui-Switch__indicator>*{-webkit-transform:translateX(-22px);-moz-transform:translateX(-22px);-ms-transform:translateX(-22px);transform:translateX(-22px);}", ".fvxnmui:disabled{cursor:default;}", ".f1cxq9o1:disabled~.fui-Switch__indicator{color:var(--colorNeutralForegroundDisabled);}", ".f1ks1zsm:disabled~.fui-Switch__label{color:var(--colorNeutralForegroundDisabled);}", ".fiqfi0i:enabled:not(:checked)~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessible);}", ".f9aagkg:enabled:not(:checked)~.fui-Switch__indicator{border-top-color:var(--colorNeutralStrokeAccessible);}", ".fgv8l18:enabled:not(:checked)~.fui-Switch__indicator{border-right-color:var(--colorNeutralStrokeAccessible);}", ".f1p3jmxb:enabled:not(:checked)~.fui-Switch__indicator{border-left-color:var(--colorNeutralStrokeAccessible);}", ".f11yi64e:enabled:not(:checked)~.fui-Switch__indicator{border-bottom-color:var(--colorNeutralStrokeAccessible);}", ".fthrly9:enabled:not(:checked)~.fui-Switch__label{color:var(--colorNeutralForeground1);}", ".fhdp2ht:enabled:not(:checked):hover~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessibleHover);}", ".f1rzj6jj:enabled:not(:checked):hover~.fui-Switch__indicator{border-top-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1jywl1l:enabled:not(:checked):hover~.fui-Switch__indicator{border-right-color:var(--colorNeutralStrokeAccessibleHover);}", ".f13d626x:enabled:not(:checked):hover~.fui-Switch__indicator{border-left-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1ivtmze:enabled:not(:checked):hover~.fui-Switch__indicator{border-bottom-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1uvnr57:enabled:not(:checked):hover:active~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessiblePressed);}", ".frhcydi:enabled:not(:checked):hover:active~.fui-Switch__indicator{border-top-color:var(--colorNeutralStrokeAccessiblePressed);}", ".f1pvt3n7:enabled:not(:checked):hover:active~.fui-Switch__indicator{border-right-color:var(--colorNeutralStrokeAccessiblePressed);}", ".f14i0clv:enabled:not(:checked):hover:active~.fui-Switch__indicator{border-left-color:var(--colorNeutralStrokeAccessiblePressed);}", ".fq9gcw4:enabled:not(:checked):hover:active~.fui-Switch__indicator{border-bottom-color:var(--colorNeutralStrokeAccessiblePressed);}", ".fft44l1:enabled:checked~.fui-Switch__indicator{background-color:var(--colorBrandBackground);}", ".fwlrvmy:enabled:checked~.fui-Switch__indicator{color:var(--colorNeutralForegroundOnBrand);}", ".f1c4gun2:enabled:checked~.fui-Switch__indicator{border-top-color:var(--colorTransparentStroke);}", ".flhgtcm:enabled:checked~.fui-Switch__indicator{border-right-color:var(--colorTransparentStroke);}", ".fx1zdd8:enabled:checked~.fui-Switch__indicator{border-left-color:var(--colorTransparentStroke);}", ".fayrp2e:enabled:checked~.fui-Switch__indicator{border-bottom-color:var(--colorTransparentStroke);}", ".f1vk2knj:enabled:checked:hover~.fui-Switch__indicator{background-color:var(--colorBrandBackgroundHover);}", ".firogjh:enabled:checked:hover~.fui-Switch__indicator{border-top-color:var(--colorTransparentStrokeInteractive);}", ".f1crd6p1:enabled:checked:hover~.fui-Switch__indicator{border-right-color:var(--colorTransparentStrokeInteractive);}", ".for8100:enabled:checked:hover~.fui-Switch__indicator{border-left-color:var(--colorTransparentStrokeInteractive);}", ".f1v5j4zb:enabled:checked:hover~.fui-Switch__indicator{border-bottom-color:var(--colorTransparentStrokeInteractive);}", ".f1rt7qcq:enabled:checked:hover:active~.fui-Switch__indicator{background-color:var(--colorBrandBackgroundPressed);}", ".fxvotg6:enabled:checked:hover:active~.fui-Switch__indicator{border-top-color:var(--colorTransparentStrokeInteractive);}", ".fk9ur30:enabled:checked:hover:active~.fui-Switch__indicator{border-right-color:var(--colorTransparentStrokeInteractive);}", ".f3u5smv:enabled:checked:hover:active~.fui-Switch__indicator{border-left-color:var(--colorTransparentStrokeInteractive);}", ".fdtj07x:enabled:checked:hover:active~.fui-Switch__indicator{border-bottom-color:var(--colorTransparentStrokeInteractive);}", ".fv5mb1o:disabled:not(:checked)~.fui-Switch__indicator{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f1i2l8ou:disabled:not(:checked)~.fui-Switch__indicator{border-right-color:var(--colorNeutralStrokeDisabled);}", ".fxj1kmv:disabled:not(:checked)~.fui-Switch__indicator{border-left-color:var(--colorNeutralStrokeDisabled);}", ".fku528b:disabled:not(:checked)~.fui-Switch__indicator{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".fabcpc0:disabled:checked~.fui-Switch__indicator{background-color:var(--colorNeutralBackgroundDisabled);}", ".f17xwy6w:disabled:checked~.fui-Switch__indicator{border-top-color:var(--colorTransparentStrokeDisabled);}", ".fipwscc:disabled:checked~.fui-Switch__indicator{border-right-color:var(--colorTransparentStrokeDisabled);}", ".fab39iv:disabled:checked~.fui-Switch__indicator{border-left-color:var(--colorTransparentStrokeDisabled);}", ".f1th5z1l:disabled:checked~.fui-Switch__indicator{border-bottom-color:var(--colorTransparentStrokeDisabled);}"]
|
196
|
+
"d": [".f1ewtqcl{box-sizing:border-box;}", ".f1k6fduh{cursor:pointer;}", ".f1l02sjl{height:100%;}", ".f1vgc2s3{left:0;}", ".f1e31b4d{right:0;}", ".f1hu3pq6{margin-top:0;}", ".f11qmguv{margin-right:0;}", ".f1tyq0we{margin-left:0;}", ".f19f4twv{margin-bottom:0;}", ".fk73vx1{opacity:0;}", ".f1euv43f{position:absolute;}", ".f15twtuk{top:0;}", ".fly5x3f{width:100%;}", ".f1owqbgs:checked~.fui-Switch__indicator>*{-webkit-transform:translateX(22px);-moz-transform:translateX(22px);-ms-transform:translateX(22px);transform:translateX(22px);}", ".f1a7g3i4:checked~.fui-Switch__indicator>*{-webkit-transform:translateX(-22px);-moz-transform:translateX(-22px);-ms-transform:translateX(-22px);transform:translateX(-22px);}", ".fvxnmui:disabled{cursor:default;}", ".f1cxq9o1:disabled~.fui-Switch__indicator{color:var(--colorNeutralForegroundDisabled);}", ".f1ks1zsm:disabled~.fui-Switch__label{color:var(--colorNeutralForegroundDisabled);}", ".fiqfi0i:enabled:not(:checked)~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessible);}", ".f9aagkg:enabled:not(:checked)~.fui-Switch__indicator{border-top-color:var(--colorNeutralStrokeAccessible);}", ".fgv8l18:enabled:not(:checked)~.fui-Switch__indicator{border-right-color:var(--colorNeutralStrokeAccessible);}", ".f1p3jmxb:enabled:not(:checked)~.fui-Switch__indicator{border-left-color:var(--colorNeutralStrokeAccessible);}", ".f11yi64e:enabled:not(:checked)~.fui-Switch__indicator{border-bottom-color:var(--colorNeutralStrokeAccessible);}", ".fthrly9:enabled:not(:checked)~.fui-Switch__label{color:var(--colorNeutralForeground1);}", ".fhdp2ht:enabled:not(:checked):hover~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessibleHover);}", ".f1rzj6jj:enabled:not(:checked):hover~.fui-Switch__indicator{border-top-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1jywl1l:enabled:not(:checked):hover~.fui-Switch__indicator{border-right-color:var(--colorNeutralStrokeAccessibleHover);}", ".f13d626x:enabled:not(:checked):hover~.fui-Switch__indicator{border-left-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1ivtmze:enabled:not(:checked):hover~.fui-Switch__indicator{border-bottom-color:var(--colorNeutralStrokeAccessibleHover);}", ".f1uvnr57:enabled:not(:checked):hover:active~.fui-Switch__indicator{color:var(--colorNeutralStrokeAccessiblePressed);}", ".frhcydi:enabled:not(:checked):hover:active~.fui-Switch__indicator{border-top-color:var(--colorNeutralStrokeAccessiblePressed);}", ".f1pvt3n7:enabled:not(:checked):hover:active~.fui-Switch__indicator{border-right-color:var(--colorNeutralStrokeAccessiblePressed);}", ".f14i0clv:enabled:not(:checked):hover:active~.fui-Switch__indicator{border-left-color:var(--colorNeutralStrokeAccessiblePressed);}", ".fq9gcw4:enabled:not(:checked):hover:active~.fui-Switch__indicator{border-bottom-color:var(--colorNeutralStrokeAccessiblePressed);}", ".fft44l1:enabled:checked~.fui-Switch__indicator{background-color:var(--colorBrandBackground);}", ".fwlrvmy:enabled:checked~.fui-Switch__indicator{color:var(--colorNeutralForegroundOnBrand);}", ".f1c4gun2:enabled:checked~.fui-Switch__indicator{border-top-color:var(--colorTransparentStroke);}", ".flhgtcm:enabled:checked~.fui-Switch__indicator{border-right-color:var(--colorTransparentStroke);}", ".fx1zdd8:enabled:checked~.fui-Switch__indicator{border-left-color:var(--colorTransparentStroke);}", ".fayrp2e:enabled:checked~.fui-Switch__indicator{border-bottom-color:var(--colorTransparentStroke);}", ".f1vk2knj:enabled:checked:hover~.fui-Switch__indicator{background-color:var(--colorBrandBackgroundHover);}", ".firogjh:enabled:checked:hover~.fui-Switch__indicator{border-top-color:var(--colorTransparentStrokeInteractive);}", ".f1crd6p1:enabled:checked:hover~.fui-Switch__indicator{border-right-color:var(--colorTransparentStrokeInteractive);}", ".for8100:enabled:checked:hover~.fui-Switch__indicator{border-left-color:var(--colorTransparentStrokeInteractive);}", ".f1v5j4zb:enabled:checked:hover~.fui-Switch__indicator{border-bottom-color:var(--colorTransparentStrokeInteractive);}", ".f1rt7qcq:enabled:checked:hover:active~.fui-Switch__indicator{background-color:var(--colorBrandBackgroundPressed);}", ".fxvotg6:enabled:checked:hover:active~.fui-Switch__indicator{border-top-color:var(--colorTransparentStrokeInteractive);}", ".fk9ur30:enabled:checked:hover:active~.fui-Switch__indicator{border-right-color:var(--colorTransparentStrokeInteractive);}", ".f3u5smv:enabled:checked:hover:active~.fui-Switch__indicator{border-left-color:var(--colorTransparentStrokeInteractive);}", ".fdtj07x:enabled:checked:hover:active~.fui-Switch__indicator{border-bottom-color:var(--colorTransparentStrokeInteractive);}", ".fv5mb1o:disabled:not(:checked)~.fui-Switch__indicator{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f1i2l8ou:disabled:not(:checked)~.fui-Switch__indicator{border-right-color:var(--colorNeutralStrokeDisabled);}", ".fxj1kmv:disabled:not(:checked)~.fui-Switch__indicator{border-left-color:var(--colorNeutralStrokeDisabled);}", ".fku528b:disabled:not(:checked)~.fui-Switch__indicator{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".fabcpc0:disabled:checked~.fui-Switch__indicator{background-color:var(--colorNeutralBackgroundDisabled);}", ".f17xwy6w:disabled:checked~.fui-Switch__indicator{border-top-color:var(--colorTransparentStrokeDisabled);}", ".fipwscc:disabled:checked~.fui-Switch__indicator{border-right-color:var(--colorTransparentStrokeDisabled);}", ".fab39iv:disabled:checked~.fui-Switch__indicator{border-left-color:var(--colorTransparentStrokeDisabled);}", ".f1th5z1l:disabled:checked~.fui-Switch__indicator{border-bottom-color:var(--colorTransparentStrokeDisabled);}"],
|
197
|
+
"t": ["@media (forced-colors: active){.f19h63kc:disabled~.fui-Switch__indicator{color:GrayText;}}", "@media (forced-colors: active){.ffutfdj:disabled~.fui-Switch__indicator{border-top-color:GrayText;}}", "@media (forced-colors: active){.f72m8yo:disabled~.fui-Switch__indicator{border-right-color:GrayText;}.f1ud47z9:disabled~.fui-Switch__indicator{border-left-color:GrayText;}}", "@media (forced-colors: active){.f15xfkur:disabled~.fui-Switch__indicator{border-bottom-color:GrayText;}}", "@media (forced-colors: active){.f1ud47z9:disabled~.fui-Switch__indicator{border-left-color:GrayText;}.f72m8yo:disabled~.fui-Switch__indicator{border-right-color:GrayText;}}", "@media (forced-colors: active){.f1jaqqzs:disabled~.fui-Switch__label{color:GrayText;}}"]
|
189
198
|
});
|
190
199
|
|
191
200
|
const useLabelStyles = /*#__PURE__*/react_1.__styles({
|
@@ -210,7 +219,7 @@ const useSwitchStyles_unstable = state => {
|
|
210
219
|
} = state;
|
211
220
|
state.root.className = react_1.mergeClasses(exports.switchClassNames.root, rootStyles.base, rootStyles[labelPosition], state.root.className);
|
212
221
|
state.indicator.className = react_1.mergeClasses(exports.switchClassNames.indicator, indicatorStyles.base, state.indicator.className);
|
213
|
-
state.input.className = react_1.mergeClasses(exports.switchClassNames.input, inputStyles.base, state.input.className);
|
222
|
+
state.input.className = react_1.mergeClasses(exports.switchClassNames.input, inputStyles.base, inputStyles.highContrast, state.input.className);
|
214
223
|
|
215
224
|
if (state.label) {
|
216
225
|
state.label.className = react_1.mergeClasses(exports.switchClassNames.label, labelStyles.base, state.label.className);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/Switch/useSwitchStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAIa,OAAA,CAAA,gBAAA,GAAgD;AAC3D,EAAA,IAAI,EAAE,YADqD;AAE3D,EAAA,SAAS,EAAE,uBAFgD;AAG3D,EAAA,KAAK,EAAE,mBAHoD;AAI3D,EAAA,KAAK,EAAE;AAJoD,CA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B;AAOA,EAAA,KAAK,CAAC,SAAN,CAAgB,SAAhB,GAA4B,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,gBAAA,CAAiB,SAA9B,EAAyC,eAAe,CAAC,IAAzD,EAA+D,KAAK,CAAC,SAAN,CAAgB,SAA/E,CAA5B;AAEA,EAAA,KAAK,CAAC,KAAN,CAAY,SAAZ,GAAwB,OAAA,CAAA,YAAA,CACtB,OAAA,CAAA,gBAAA,CAAiB,KADK,EAEtB,WAAW,CAAC,IAFU,EAGtB,WAAW,CAAC,YAHU,EAItB,KAAK,CAAC,KAAN,CAAY,SAJU,CAAxB;;AAOA,MAAI,KAAK,CAAC,KAAV,EAAiB;AACf,IAAA,KAAK,CAAC,KAAN,CAAY,SAAZ,GAAwB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,gBAAA,CAAiB,KAA9B,EAAqC,WAAW,CAAC,IAAjD,EAAuD,KAAK,CAAC,KAAN,CAAY,SAAnE,CAAxB;AACD;;AAED,SAAO,KAAP;AACD,CA7BM;;AAAM,OAAA,CAAA,wBAAA,GAAwB,wBAAxB","sourcesContent":["import { createFocusOutlineStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { SwitchSlots, SwitchState } from './Switch.types';\n\nexport const switchClassNames: SlotClassNames<SwitchSlots> = {\n root: 'fui-Switch',\n indicator: 'fui-Switch__indicator',\n input: 'fui-Switch__input',\n label: 'fui-Switch__label',\n};\n\n/**\n * @deprecated Use `switchClassNames.root` instead.\n */\nexport const switchClassName = switchClassNames.root;\n\n// TODO replace these spacing constants with theme values once they're on the theme.\nconst spacingXS = 4;\nconst spacingS = 8;\nconst spacingM = 12;\n\n// Thumb and track sizes used by the component.\nconst spaceBetweenThumbAndTrack = 2;\nconst thumbSize = 14;\nconst trackHeight = 20;\nconst trackWidth = 40;\n\nconst useRootStyles = makeStyles({\n base: {\n boxSizing: 'border-box',\n columnGap: `${spacingM}px`,\n display: 'inline-flex',\n ...shorthands.padding(`${spacingS}px`),\n position: 'relative',\n\n ...createFocusOutlineStyle({ style: {}, selector: 'focus-within' }),\n },\n\n // Label position variations\n above: {\n flexDirection: 'column',\n paddingTop: `${spacingXS}px`,\n rowGap: `${spacingXS}px`,\n },\n after: {\n alignItems: 'flex-start',\n columnGap: `${spacingM}px`,\n flexDirection: 'row',\n },\n before: {\n alignItems: 'flex-start',\n columnGap: `${spacingM}px`,\n flexDirection: 'row',\n },\n});\n\nconst useIndicatorStyles = makeStyles({\n base: {\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n ...shorthands.borderStyle('solid'),\n ...shorthands.borderWidth('1px'),\n boxSizing: 'border-box',\n fill: 'currentColor',\n flexShrink: 0,\n fontSize: `${thumbSize + spaceBetweenThumbAndTrack}px`,\n height: `${trackHeight}px`,\n pointerEvents: 'none',\n transitionDuration: '200ms',\n transitionTimingFunction: 'cubic-bezier(0.33, 0, 0.67, 1)',\n transitionProperty: 'background, border, color',\n width: `${trackWidth}px`,\n\n '> *': {\n transitionDuration: '200ms',\n transitionTimingFunction: 'cubic-bezier(0.33, 0, 0.67, 1)',\n transitionProperty: 'transform',\n },\n },\n});\n\nconst useInputStyles = makeStyles({\n base: {\n boxSizing: 'border-box',\n cursor: 'pointer',\n height: '100%',\n left: 0,\n ...shorthands.margin(0),\n opacity: 0,\n position: 'absolute',\n top: 0,\n width: '100%',\n\n // Checked (both enabled and disabled)\n ':checked': {\n [`& ~ .${switchClassNames.indicator}`]: {\n '> *': {\n transform: `translateX(${trackWidth - thumbSize - spaceBetweenThumbAndTrack * 2}px)`,\n },\n },\n },\n\n // Disabled (both checked and unchecked)\n ':disabled': {\n cursor: 'default',\n\n [`& ~ .${switchClassNames.indicator}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n [`& ~ .${switchClassNames.label}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n\n // Enabled and unchecked\n ':enabled:not(:checked)': {\n [`& ~ .${switchClassNames.indicator}`]: {\n color: tokens.colorNeutralStrokeAccessible,\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessible),\n },\n\n [`& ~ .${switchClassNames.label}`]: {\n color: tokens.colorNeutralForeground1,\n },\n\n ':hover': {\n [`& ~ .${switchClassNames.indicator}`]: {\n color: tokens.colorNeutralStrokeAccessibleHover,\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessibleHover),\n },\n },\n\n ':hover:active': {\n [`& ~ .${switchClassNames.indicator}`]: {\n color: tokens.colorNeutralStrokeAccessiblePressed,\n ...shorthands.borderColor(tokens.colorNeutralStrokeAccessiblePressed),\n },\n },\n },\n\n // Enabled and checked\n ':enabled:checked': {\n [`& ~ .${switchClassNames.indicator}`]: {\n backgroundColor: tokens.colorBrandBackground,\n color: tokens.colorNeutralForegroundOnBrand,\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n\n ':hover': {\n [`& ~ .${switchClassNames.indicator}`]: {\n backgroundColor: tokens.colorBrandBackgroundHover,\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n },\n },\n\n ':hover:active': {\n [`& ~ .${switchClassNames.indicator}`]: {\n backgroundColor: tokens.colorBrandBackgroundPressed,\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n },\n },\n },\n\n // Disabled and unchecked\n ':disabled:not(:checked)': {\n [`& ~ .${switchClassNames.indicator}`]: {\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n },\n },\n\n // Disabled and checked\n ':disabled:checked': {\n [`& ~ .${switchClassNames.indicator}`]: {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorTransparentStrokeDisabled),\n },\n },\n },\n\n highContrast: {\n '@media (forced-colors: active)': {\n ':disabled': {\n [`& ~ .${switchClassNames.indicator}`]: {\n color: 'GrayText',\n ...shorthands.borderColor('GrayText'),\n },\n\n [`& ~ .${switchClassNames.label}`]: {\n color: 'GrayText',\n },\n },\n },\n },\n});\n\nconst useLabelStyles = makeStyles({\n base: {\n userSelect: 'none',\n },\n});\n\n/**\n * Apply styling to the Switch slots based on the state\n */\nexport const useSwitchStyles_unstable = (state: SwitchState): SwitchState => {\n const rootStyles = useRootStyles();\n const indicatorStyles = useIndicatorStyles();\n const inputStyles = useInputStyles();\n const labelStyles = useLabelStyles();\n\n const { labelPosition } = state;\n\n state.root.className = mergeClasses(\n switchClassNames.root,\n rootStyles.base,\n rootStyles[labelPosition],\n state.root.className,\n );\n\n state.indicator.className = mergeClasses(switchClassNames.indicator, indicatorStyles.base, state.indicator.className);\n\n state.input.className = mergeClasses(\n switchClassNames.input,\n inputStyles.base,\n inputStyles.highContrast,\n state.input.className,\n );\n\n if (state.label) {\n state.label.className = mergeClasses(switchClassNames.label, labelStyles.base, state.label.className);\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-switch",
|
3
|
-
"version": "9.0.0-rc.
|
3
|
+
"version": "9.0.0-rc.9",
|
4
4
|
"description": "Fluent UI React Switch component.",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -21,22 +21,22 @@
|
|
21
21
|
"start": "yarn storybook",
|
22
22
|
"test": "jest --passWithNoTests",
|
23
23
|
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
|
24
|
-
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node
|
25
|
-
"storybook": "node
|
24
|
+
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../../scripts/typescript/normalize-import --output ./dist/packages/react-components/react-switch/src && yarn docs",
|
25
|
+
"storybook": "node ../../../scripts/storybook/runner",
|
26
26
|
"type-check": "tsc -b tsconfig.json"
|
27
27
|
},
|
28
28
|
"devDependencies": {
|
29
29
|
"@fluentui/eslint-plugin": "*",
|
30
30
|
"@fluentui/react-conformance": "*",
|
31
|
-
"@fluentui/react-conformance-griffel": "9.0.0-beta.
|
31
|
+
"@fluentui/react-conformance-griffel": "9.0.0-beta.5",
|
32
32
|
"@fluentui/scripts": "^1.0.0"
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
35
|
"@fluentui/react-icons": "^2.0.166-rc.3",
|
36
|
-
"@fluentui/react-label": "9.0.0-beta.
|
37
|
-
"@fluentui/react-tabster": "9.0.0-rc.
|
38
|
-
"@fluentui/react-theme": "9.0.0-rc.
|
39
|
-
"@fluentui/react-utilities": "9.0.0-rc.
|
36
|
+
"@fluentui/react-label": "9.0.0-beta.12",
|
37
|
+
"@fluentui/react-tabster": "9.0.0-rc.9",
|
38
|
+
"@fluentui/react-theme": "9.0.0-rc.7",
|
39
|
+
"@fluentui/react-utilities": "9.0.0-rc.8",
|
40
40
|
"@griffel/react": "1.0.3",
|
41
41
|
"tslib": "^2.1.0"
|
42
42
|
},
|