@fluentui/react-radio 0.0.0-nightly-20230925-0416.1 → 0.0.0-nightly-20230927-0415.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 +141 -21
- package/CHANGELOG.md +46 -13
- package/lib/components/Radio/useRadio.js +2 -5
- package/lib/components/Radio/useRadio.js.map +1 -1
- package/lib-commonjs/components/Radio/useRadio.js +2 -5
- package/lib-commonjs/components/Radio/useRadio.js.map +1 -1
- package/package.json +10 -10
package/CHANGELOG.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"name": "@fluentui/react-radio",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
6
|
-
"tag": "@fluentui/react-radio_v0.0.0-nightly-
|
|
7
|
-
"version": "0.0.0-nightly-
|
|
5
|
+
"date": "Wed, 27 Sep 2023 04:21:56 GMT",
|
|
6
|
+
"tag": "@fluentui/react-radio_v0.0.0-nightly-20230927-0415.1",
|
|
7
|
+
"version": "0.0.0-nightly-20230927-0415.1",
|
|
8
8
|
"comments": {
|
|
9
9
|
"prerelease": [
|
|
10
10
|
{
|
|
@@ -16,56 +16,176 @@
|
|
|
16
16
|
{
|
|
17
17
|
"author": "beachball",
|
|
18
18
|
"package": "@fluentui/react-radio",
|
|
19
|
-
"comment": "Bump @fluentui/react-field to v0.0.0-nightly-
|
|
20
|
-
"commit": "
|
|
19
|
+
"comment": "Bump @fluentui/react-field to v0.0.0-nightly-20230927-0415.1",
|
|
20
|
+
"commit": "e2ddd695515e0d647f781917f280cebc78d8cf71"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"author": "beachball",
|
|
24
24
|
"package": "@fluentui/react-radio",
|
|
25
|
-
"comment": "Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-
|
|
26
|
-
"commit": "
|
|
25
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230927-0415.1",
|
|
26
|
+
"commit": "e2ddd695515e0d647f781917f280cebc78d8cf71"
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"author": "beachball",
|
|
30
30
|
"package": "@fluentui/react-radio",
|
|
31
|
-
"comment": "Bump @fluentui/react-label to v0.0.0-nightly-
|
|
32
|
-
"commit": "
|
|
31
|
+
"comment": "Bump @fluentui/react-label to v0.0.0-nightly-20230927-0415.1",
|
|
32
|
+
"commit": "e2ddd695515e0d647f781917f280cebc78d8cf71"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"author": "beachball",
|
|
36
36
|
"package": "@fluentui/react-radio",
|
|
37
|
-
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-
|
|
38
|
-
"commit": "
|
|
37
|
+
"comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230927-0415.1",
|
|
38
|
+
"commit": "e2ddd695515e0d647f781917f280cebc78d8cf71"
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"author": "beachball",
|
|
42
42
|
"package": "@fluentui/react-radio",
|
|
43
|
-
"comment": "Bump @fluentui/react-tabster to v0.0.0-nightly-
|
|
44
|
-
"commit": "
|
|
43
|
+
"comment": "Bump @fluentui/react-tabster to v0.0.0-nightly-20230927-0415.1",
|
|
44
|
+
"commit": "e2ddd695515e0d647f781917f280cebc78d8cf71"
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"author": "beachball",
|
|
48
48
|
"package": "@fluentui/react-radio",
|
|
49
|
-
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-
|
|
50
|
-
"commit": "
|
|
49
|
+
"comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230927-0415.1",
|
|
50
|
+
"commit": "e2ddd695515e0d647f781917f280cebc78d8cf71"
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
"author": "beachball",
|
|
54
54
|
"package": "@fluentui/react-radio",
|
|
55
|
-
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-
|
|
56
|
-
"commit": "
|
|
55
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230927-0415.1",
|
|
56
|
+
"commit": "e2ddd695515e0d647f781917f280cebc78d8cf71"
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
"author": "beachball",
|
|
60
60
|
"package": "@fluentui/react-radio",
|
|
61
|
-
"comment": "Bump @fluentui/react-conformance to v0.0.0-nightly-
|
|
62
|
-
"commit": "
|
|
61
|
+
"comment": "Bump @fluentui/react-conformance to v0.0.0-nightly-20230927-0415.1",
|
|
62
|
+
"commit": "e2ddd695515e0d647f781917f280cebc78d8cf71"
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
"author": "beachball",
|
|
66
66
|
"package": "@fluentui/react-radio",
|
|
67
|
-
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
|
68
|
-
"commit": "
|
|
67
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230927-0415.1",
|
|
68
|
+
"commit": "e2ddd695515e0d647f781917f280cebc78d8cf71"
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"date": "Tue, 26 Sep 2023 17:49:10 GMT",
|
|
75
|
+
"tag": "@fluentui/react-radio_v9.1.44",
|
|
76
|
+
"version": "9.1.44",
|
|
77
|
+
"comments": {
|
|
78
|
+
"patch": [
|
|
79
|
+
{
|
|
80
|
+
"author": "yuanboxue@microsoft.com",
|
|
81
|
+
"package": "@fluentui/react-radio",
|
|
82
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d",
|
|
83
|
+
"comment": "chore: trigger manual version bump after broken release"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"author": "beachball",
|
|
87
|
+
"package": "@fluentui/react-radio",
|
|
88
|
+
"comment": "Bump @fluentui/react-field to v9.1.31",
|
|
89
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"author": "beachball",
|
|
93
|
+
"package": "@fluentui/react-radio",
|
|
94
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.12",
|
|
95
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"author": "beachball",
|
|
99
|
+
"package": "@fluentui/react-radio",
|
|
100
|
+
"comment": "Bump @fluentui/react-label to v9.1.39",
|
|
101
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"author": "beachball",
|
|
105
|
+
"package": "@fluentui/react-radio",
|
|
106
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.9.1",
|
|
107
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"author": "beachball",
|
|
111
|
+
"package": "@fluentui/react-radio",
|
|
112
|
+
"comment": "Bump @fluentui/react-tabster to v9.13.1",
|
|
113
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"author": "beachball",
|
|
117
|
+
"package": "@fluentui/react-radio",
|
|
118
|
+
"comment": "Bump @fluentui/react-theme to v9.1.14",
|
|
119
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"author": "beachball",
|
|
123
|
+
"package": "@fluentui/react-radio",
|
|
124
|
+
"comment": "Bump @fluentui/react-utilities to v9.13.5",
|
|
125
|
+
"commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"date": "Tue, 26 Sep 2023 15:31:52 GMT",
|
|
132
|
+
"tag": "@fluentui/react-radio_v9.1.43",
|
|
133
|
+
"version": "9.1.43",
|
|
134
|
+
"comments": {
|
|
135
|
+
"patch": [
|
|
136
|
+
{
|
|
137
|
+
"author": "martinhochel@microsoft.com",
|
|
138
|
+
"package": "@fluentui/react-radio",
|
|
139
|
+
"commit": "e61473fa10195f6ebf2308205c1e72e91b711831",
|
|
140
|
+
"comment": "fix: bump swc core to mitigate transpilation memory leaks"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"author": "ololubek@microsoft.com",
|
|
144
|
+
"package": "@fluentui/react-radio",
|
|
145
|
+
"commit": "a31e7394d9f169bc5aa55430a22cdc65425a1b49",
|
|
146
|
+
"comment": "chore: Update react-icons version to pick up IconDirectionContextProvider updated export"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"author": "beachball",
|
|
150
|
+
"package": "@fluentui/react-radio",
|
|
151
|
+
"comment": "Bump @fluentui/react-field to v9.1.30",
|
|
152
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"author": "beachball",
|
|
156
|
+
"package": "@fluentui/react-radio",
|
|
157
|
+
"comment": "Bump @fluentui/react-jsx-runtime to v9.0.11",
|
|
158
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"author": "beachball",
|
|
162
|
+
"package": "@fluentui/react-radio",
|
|
163
|
+
"comment": "Bump @fluentui/react-label to v9.1.38",
|
|
164
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"author": "beachball",
|
|
168
|
+
"package": "@fluentui/react-radio",
|
|
169
|
+
"comment": "Bump @fluentui/react-shared-contexts to v9.9.0",
|
|
170
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"author": "beachball",
|
|
174
|
+
"package": "@fluentui/react-radio",
|
|
175
|
+
"comment": "Bump @fluentui/react-tabster to v9.13.0",
|
|
176
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"author": "beachball",
|
|
180
|
+
"package": "@fluentui/react-radio",
|
|
181
|
+
"comment": "Bump @fluentui/react-theme to v9.1.13",
|
|
182
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"author": "beachball",
|
|
186
|
+
"package": "@fluentui/react-radio",
|
|
187
|
+
"comment": "Bump @fluentui/react-utilities to v9.13.4",
|
|
188
|
+
"commit": "e16520437e10cd824ac254dd797e32762b5de72d"
|
|
69
189
|
}
|
|
70
190
|
]
|
|
71
191
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,26 +1,59 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-radio
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 27 Sep 2023 04:21:56 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-20230927-0415.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v0.0.0-nightly-20230927-0415.1)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-radio_v9.1.
|
|
9
|
+
Wed, 27 Sep 2023 04:21:56 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-radio_v9.1.44..@fluentui/react-radio_v0.0.0-nightly-20230927-0415.1)
|
|
11
11
|
|
|
12
12
|
### Changes
|
|
13
13
|
|
|
14
14
|
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
|
|
15
|
-
- Bump @fluentui/react-field to v0.0.0-nightly-
|
|
16
|
-
- Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-
|
|
17
|
-
- Bump @fluentui/react-label to v0.0.0-nightly-
|
|
18
|
-
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-
|
|
19
|
-
- Bump @fluentui/react-tabster to v0.0.0-nightly-
|
|
20
|
-
- Bump @fluentui/react-theme to v0.0.0-nightly-
|
|
21
|
-
- Bump @fluentui/react-utilities to v0.0.0-nightly-
|
|
22
|
-
- Bump @fluentui/react-conformance to v0.0.0-nightly-
|
|
23
|
-
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-
|
|
15
|
+
- Bump @fluentui/react-field to v0.0.0-nightly-20230927-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/e2ddd695515e0d647f781917f280cebc78d8cf71) by beachball)
|
|
16
|
+
- Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20230927-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/e2ddd695515e0d647f781917f280cebc78d8cf71) by beachball)
|
|
17
|
+
- Bump @fluentui/react-label to v0.0.0-nightly-20230927-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/e2ddd695515e0d647f781917f280cebc78d8cf71) by beachball)
|
|
18
|
+
- Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230927-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/e2ddd695515e0d647f781917f280cebc78d8cf71) by beachball)
|
|
19
|
+
- Bump @fluentui/react-tabster to v0.0.0-nightly-20230927-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/e2ddd695515e0d647f781917f280cebc78d8cf71) by beachball)
|
|
20
|
+
- Bump @fluentui/react-theme to v0.0.0-nightly-20230927-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/e2ddd695515e0d647f781917f280cebc78d8cf71) by beachball)
|
|
21
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20230927-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/e2ddd695515e0d647f781917f280cebc78d8cf71) by beachball)
|
|
22
|
+
- Bump @fluentui/react-conformance to v0.0.0-nightly-20230927-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/e2ddd695515e0d647f781917f280cebc78d8cf71) by beachball)
|
|
23
|
+
- Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230927-0415.1 ([commit](https://github.com/microsoft/fluentui/commit/e2ddd695515e0d647f781917f280cebc78d8cf71) by beachball)
|
|
24
|
+
|
|
25
|
+
## [9.1.44](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v9.1.44)
|
|
26
|
+
|
|
27
|
+
Tue, 26 Sep 2023 17:49:10 GMT
|
|
28
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-radio_v9.1.43..@fluentui/react-radio_v9.1.44)
|
|
29
|
+
|
|
30
|
+
### Patches
|
|
31
|
+
|
|
32
|
+
- chore: trigger manual version bump after broken release ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by yuanboxue@microsoft.com)
|
|
33
|
+
- Bump @fluentui/react-field to v9.1.31 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
34
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.12 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
35
|
+
- Bump @fluentui/react-label to v9.1.39 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
36
|
+
- Bump @fluentui/react-shared-contexts to v9.9.1 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
37
|
+
- Bump @fluentui/react-tabster to v9.13.1 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
38
|
+
- Bump @fluentui/react-theme to v9.1.14 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
39
|
+
- Bump @fluentui/react-utilities to v9.13.5 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
|
|
40
|
+
|
|
41
|
+
## [9.1.43](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v9.1.43)
|
|
42
|
+
|
|
43
|
+
Tue, 26 Sep 2023 15:31:52 GMT
|
|
44
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-radio_v9.1.42..@fluentui/react-radio_v9.1.43)
|
|
45
|
+
|
|
46
|
+
### Patches
|
|
47
|
+
|
|
48
|
+
- fix: bump swc core to mitigate transpilation memory leaks ([PR #29253](https://github.com/microsoft/fluentui/pull/29253) by martinhochel@microsoft.com)
|
|
49
|
+
- chore: Update react-icons version to pick up IconDirectionContextProvider updated export ([PR #29151](https://github.com/microsoft/fluentui/pull/29151) by ololubek@microsoft.com)
|
|
50
|
+
- Bump @fluentui/react-field to v9.1.30 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
51
|
+
- Bump @fluentui/react-jsx-runtime to v9.0.11 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
52
|
+
- Bump @fluentui/react-label to v9.1.38 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
53
|
+
- Bump @fluentui/react-shared-contexts to v9.9.0 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
54
|
+
- Bump @fluentui/react-tabster to v9.13.0 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
55
|
+
- Bump @fluentui/react-theme to v9.1.13 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
56
|
+
- Bump @fluentui/react-utilities to v9.13.4 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
|
|
24
57
|
|
|
25
58
|
## [9.1.42](https://github.com/microsoft/fluentui/tree/@fluentui/react-radio_v9.1.42)
|
|
26
59
|
|
|
@@ -46,12 +46,9 @@ import { useFocusWithin } from '@fluentui/react-tabster';
|
|
|
46
46
|
},
|
|
47
47
|
elementType: 'input'
|
|
48
48
|
});
|
|
49
|
-
input.onChange = mergeCallbacks(input.onChange, (ev)=>{
|
|
50
|
-
var _onChange;
|
|
51
|
-
return (_onChange = onChange) === null || _onChange === void 0 ? void 0 : _onChange(ev, {
|
|
49
|
+
input.onChange = mergeCallbacks(input.onChange, (ev)=>onChange === null || onChange === void 0 ? void 0 : onChange(ev, {
|
|
52
50
|
value: ev.currentTarget.value
|
|
53
|
-
});
|
|
54
|
-
});
|
|
51
|
+
}));
|
|
55
52
|
const label = slot.optional(props.label, {
|
|
56
53
|
defaultProps: {
|
|
57
54
|
htmlFor: input.id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useRadio.tsx"],"sourcesContent":["import * as React from 'react';\nimport { CircleFilled } from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\nimport { getPartitionedNativeProps, mergeCallbacks, useId, slot } from '@fluentui/react-utilities';\nimport { useRadioGroupContextValue_unstable } from '../../contexts/RadioGroupContext';\nimport { useFocusWithin } from '@fluentui/react-tabster';\nimport type { RadioProps, RadioState } from './Radio.types';\n\n/**\n * Create the state required to render Radio.\n *\n * The returned state can be modified with hooks such as useRadioStyles_unstable,\n * before being passed to renderRadio_unstable.\n *\n * @param props - props from this instance of Radio\n * @param ref - reference to `<input>` element of Radio\n */\nexport const useRadio_unstable = (props: RadioProps, ref: React.Ref<HTMLInputElement>): RadioState => {\n const group = useRadioGroupContextValue_unstable();\n\n const {\n name = group.name,\n checked = group.value !== undefined ? group.value === props.value : undefined,\n defaultChecked = group.defaultValue !== undefined ? group.defaultValue === props.value : undefined,\n labelPosition = group.layout === 'horizontal-stacked' ? 'below' : 'after',\n disabled = group.disabled,\n required = group.required,\n 'aria-describedby': ariaDescribedBy = group['aria-describedby'],\n onChange,\n } = props;\n\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['checked', 'defaultChecked', 'onChange'],\n });\n\n const root = slot.always(props.root, {\n defaultProps: {\n ref: useFocusWithin<HTMLSpanElement>(),\n ...nativeProps.root,\n },\n elementType: 'span',\n });\n const input = slot.always(props.input, {\n defaultProps: {\n ref,\n type: 'radio',\n id: useId('radio-', nativeProps.primary.id),\n name,\n checked,\n defaultChecked,\n disabled,\n required,\n 'aria-describedby': ariaDescribedBy,\n ...nativeProps.primary,\n },\n elementType: 'input',\n });\n input.onChange = mergeCallbacks(input.onChange, ev => onChange?.(ev, { value: ev.currentTarget.value }));\n const label = slot.optional(props.label, {\n defaultProps: { htmlFor: input.id, disabled: input.disabled },\n elementType: Label,\n });\n const indicator = slot.always(props.indicator, {\n defaultProps: { 'aria-hidden': true, children: <CircleFilled /> },\n elementType: 'div',\n });\n return {\n labelPosition,\n components: { root: 'span', input: 'input', label: Label, indicator: 'div' },\n root,\n input,\n label,\n indicator,\n };\n};\n"],"names":["React","CircleFilled","Label","getPartitionedNativeProps","mergeCallbacks","useId","slot","useRadioGroupContextValue_unstable","useFocusWithin","useRadio_unstable","props","ref","group","name","checked","value","undefined","defaultChecked","defaultValue","labelPosition","layout","disabled","required","ariaDescribedBy","onChange","nativeProps","primarySlotTagName","excludedPropNames","root","always","defaultProps","elementType","input","type","id","primary","ev","currentTarget","label","optional","htmlFor","indicator","children","components"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,YAAY,QAAQ,wBAAwB;AACrD,SAASC,KAAK,QAAQ,wBAAwB;AAC9C,SAASC,yBAAyB,EAAEC,cAAc,EAAEC,KAAK,EAAEC,IAAI,QAAQ,4BAA4B;AACnG,SAASC,kCAAkC,QAAQ,mCAAmC;AACtF,SAASC,cAAc,QAAQ,0BAA0B;AAGzD;;;;;;;;CAQC,GACD,OAAO,MAAMC,oBAAoB,CAACC,OAAmBC;IACnD,MAAMC,QAAQL;IAEd,MAAM,EACJM,OAAOD,MAAMC,IAAI,EACjBC,UAAUF,MAAMG,KAAK,KAAKC,YAAYJ,MAAMG,KAAK,KAAKL,MAAMK,KAAK,GAAGC,SAAS,EAC7EC,iBAAiBL,MAAMM,YAAY,KAAKF,YAAYJ,MAAMM,YAAY,KAAKR,MAAMK,KAAK,GAAGC,SAAS,EAClGG,gBAAgBP,MAAMQ,MAAM,KAAK,uBAAuB,UAAU,OAAO,EACzEC,WAAWT,MAAMS,QAAQ,EACzBC,WAAWV,MAAMU,QAAQ,EACzB,oBAAoBC,kBAAkBX,KAAK,CAAC,mBAAmB,EAC/DY,QAAQ,EACT,GAAGd;IAEJ,MAAMe,cAActB,0BAA0B;QAC5CO;QACAgB,oBAAoB;QACpBC,mBAAmB;YAAC;YAAW;YAAkB;SAAW;IAC9D;IAEA,MAAMC,OAAOtB,KAAKuB,MAAM,CAACnB,MAAMkB,IAAI,EAAE;QACnCE,cAAc;YACZnB,KAAKH;YACL,GAAGiB,YAAYG,IAAI;QACrB;QACAG,aAAa;IACf;IACA,MAAMC,QAAQ1B,KAAKuB,MAAM,CAACnB,MAAMsB,KAAK,EAAE;QACrCF,cAAc;YACZnB;YACAsB,MAAM;YACNC,IAAI7B,MAAM,UAAUoB,YAAYU,OAAO,CAACD,EAAE;YAC1CrB;YACAC;YACAG;YACAI;YACAC;YACA,oBAAoBC;YACpB,GAAGE,YAAYU,OAAO;QACxB;QACAJ,aAAa;IACf;IACAC,MAAMR,QAAQ,GAAGpB,eAAe4B,MAAMR,QAAQ,EAAEY,CAAAA
|
|
1
|
+
{"version":3,"sources":["useRadio.tsx"],"sourcesContent":["import * as React from 'react';\nimport { CircleFilled } from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\nimport { getPartitionedNativeProps, mergeCallbacks, useId, slot } from '@fluentui/react-utilities';\nimport { useRadioGroupContextValue_unstable } from '../../contexts/RadioGroupContext';\nimport { useFocusWithin } from '@fluentui/react-tabster';\nimport type { RadioProps, RadioState } from './Radio.types';\n\n/**\n * Create the state required to render Radio.\n *\n * The returned state can be modified with hooks such as useRadioStyles_unstable,\n * before being passed to renderRadio_unstable.\n *\n * @param props - props from this instance of Radio\n * @param ref - reference to `<input>` element of Radio\n */\nexport const useRadio_unstable = (props: RadioProps, ref: React.Ref<HTMLInputElement>): RadioState => {\n const group = useRadioGroupContextValue_unstable();\n\n const {\n name = group.name,\n checked = group.value !== undefined ? group.value === props.value : undefined,\n defaultChecked = group.defaultValue !== undefined ? group.defaultValue === props.value : undefined,\n labelPosition = group.layout === 'horizontal-stacked' ? 'below' : 'after',\n disabled = group.disabled,\n required = group.required,\n 'aria-describedby': ariaDescribedBy = group['aria-describedby'],\n onChange,\n } = props;\n\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: ['checked', 'defaultChecked', 'onChange'],\n });\n\n const root = slot.always(props.root, {\n defaultProps: {\n ref: useFocusWithin<HTMLSpanElement>(),\n ...nativeProps.root,\n },\n elementType: 'span',\n });\n const input = slot.always(props.input, {\n defaultProps: {\n ref,\n type: 'radio',\n id: useId('radio-', nativeProps.primary.id),\n name,\n checked,\n defaultChecked,\n disabled,\n required,\n 'aria-describedby': ariaDescribedBy,\n ...nativeProps.primary,\n },\n elementType: 'input',\n });\n input.onChange = mergeCallbacks(input.onChange, ev => onChange?.(ev, { value: ev.currentTarget.value }));\n const label = slot.optional(props.label, {\n defaultProps: { htmlFor: input.id, disabled: input.disabled },\n elementType: Label,\n });\n const indicator = slot.always(props.indicator, {\n defaultProps: { 'aria-hidden': true, children: <CircleFilled /> },\n elementType: 'div',\n });\n return {\n labelPosition,\n components: { root: 'span', input: 'input', label: Label, indicator: 'div' },\n root,\n input,\n label,\n indicator,\n };\n};\n"],"names":["React","CircleFilled","Label","getPartitionedNativeProps","mergeCallbacks","useId","slot","useRadioGroupContextValue_unstable","useFocusWithin","useRadio_unstable","props","ref","group","name","checked","value","undefined","defaultChecked","defaultValue","labelPosition","layout","disabled","required","ariaDescribedBy","onChange","nativeProps","primarySlotTagName","excludedPropNames","root","always","defaultProps","elementType","input","type","id","primary","ev","currentTarget","label","optional","htmlFor","indicator","children","components"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AA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e4B,MAAMR,QAAQ,EAAEY,CAAAA,KAAMZ,qBAAAA,+BAAAA,SAAWY,IAAI;YAAErB,OAAOqB,GAAGC,aAAa,CAACtB,KAAK;QAAC;IACrG,MAAMuB,QAAQhC,KAAKiC,QAAQ,CAAC7B,MAAM4B,KAAK,EAAE;QACvCR,cAAc;YAAEU,SAASR,MAAME,EAAE;YAAEb,UAAUW,MAAMX,QAAQ;QAAC;QAC5DU,aAAa7B;IACf;IACA,MAAMuC,YAAYnC,KAAKuB,MAAM,CAACnB,MAAM+B,SAAS,EAAE;QAC7CX,cAAc;YAAE,eAAe;YAAMY,wBAAU,oBAACzC;QAAgB;QAChE8B,aAAa;IACf;IACA,OAAO;QACLZ;QACAwB,YAAY;YAAEf,MAAM;YAAQI,OAAO;YAASM,OAAOpC;YAAOuC,WAAW;QAAM;QAC3Eb;QACAI;QACAM;QACAG;IACF;AACF,EAAE"}
|
|
@@ -49,12 +49,9 @@ const useRadio_unstable = (props, ref)=>{
|
|
|
49
49
|
},
|
|
50
50
|
elementType: 'input'
|
|
51
51
|
});
|
|
52
|
-
input.onChange = (0, _reactutilities.mergeCallbacks)(input.onChange, (ev)=>{
|
|
53
|
-
var _onChange;
|
|
54
|
-
return (_onChange = onChange) === null || _onChange === void 0 ? void 0 : _onChange(ev, {
|
|
52
|
+
input.onChange = (0, _reactutilities.mergeCallbacks)(input.onChange, (ev)=>onChange === null || onChange === void 0 ? void 0 : onChange(ev, {
|
|
55
53
|
value: ev.currentTarget.value
|
|
56
|
-
});
|
|
57
|
-
});
|
|
54
|
+
}));
|
|
58
55
|
const label = _reactutilities.slot.optional(props.label, {
|
|
59
56
|
defaultProps: {
|
|
60
57
|
htmlFor: input.id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useRadio.js"],"sourcesContent":["import * as React from 'react';\nimport { CircleFilled } from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\nimport { getPartitionedNativeProps, mergeCallbacks, useId, slot } from '@fluentui/react-utilities';\nimport { useRadioGroupContextValue_unstable } from '../../contexts/RadioGroupContext';\nimport { useFocusWithin } from '@fluentui/react-tabster';\n/**\n * Create the state required to render Radio.\n *\n * The returned state can be modified with hooks such as useRadioStyles_unstable,\n * before being passed to renderRadio_unstable.\n *\n * @param props - props from this instance of Radio\n * @param ref - reference to `<input>` element of Radio\n */ export const useRadio_unstable = (props, ref)=>{\n const group = useRadioGroupContextValue_unstable();\n const { name = group.name, checked = group.value !== undefined ? group.value === props.value : undefined, defaultChecked = group.defaultValue !== undefined ? group.defaultValue === props.value : undefined, labelPosition = group.layout === 'horizontal-stacked' ? 'below' : 'after', disabled = group.disabled, required = group.required, 'aria-describedby': ariaDescribedBy = group['aria-describedby'], onChange } = props;\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: [\n 'checked',\n 'defaultChecked',\n 'onChange'\n ]\n });\n const root = slot.always(props.root, {\n defaultProps: {\n ref: useFocusWithin(),\n ...nativeProps.root\n },\n elementType: 'span'\n });\n const input = slot.always(props.input, {\n defaultProps: {\n ref,\n type: 'radio',\n id: useId('radio-', nativeProps.primary.id),\n name,\n checked,\n defaultChecked,\n disabled,\n required,\n 'aria-describedby': ariaDescribedBy,\n ...nativeProps.primary\n },\n elementType: 'input'\n });\n input.onChange = mergeCallbacks(input.onChange, (ev)=>
|
|
1
|
+
{"version":3,"sources":["useRadio.js"],"sourcesContent":["import * as React from 'react';\nimport { CircleFilled } from '@fluentui/react-icons';\nimport { Label } from '@fluentui/react-label';\nimport { getPartitionedNativeProps, mergeCallbacks, useId, slot } from '@fluentui/react-utilities';\nimport { useRadioGroupContextValue_unstable } from '../../contexts/RadioGroupContext';\nimport { useFocusWithin } from '@fluentui/react-tabster';\n/**\n * Create the state required to render Radio.\n *\n * The returned state can be modified with hooks such as useRadioStyles_unstable,\n * before being passed to renderRadio_unstable.\n *\n * @param props - props from this instance of Radio\n * @param ref - reference to `<input>` element of Radio\n */ export const useRadio_unstable = (props, ref)=>{\n const group = useRadioGroupContextValue_unstable();\n const { name = group.name, checked = group.value !== undefined ? group.value === props.value : undefined, defaultChecked = group.defaultValue !== undefined ? group.defaultValue === props.value : undefined, labelPosition = group.layout === 'horizontal-stacked' ? 'below' : 'after', disabled = group.disabled, required = group.required, 'aria-describedby': ariaDescribedBy = group['aria-describedby'], onChange } = props;\n const nativeProps = getPartitionedNativeProps({\n props,\n primarySlotTagName: 'input',\n excludedPropNames: [\n 'checked',\n 'defaultChecked',\n 'onChange'\n ]\n });\n const root = slot.always(props.root, {\n defaultProps: {\n ref: useFocusWithin(),\n ...nativeProps.root\n },\n elementType: 'span'\n });\n const input = slot.always(props.input, {\n defaultProps: {\n ref,\n type: 'radio',\n id: useId('radio-', nativeProps.primary.id),\n name,\n checked,\n defaultChecked,\n disabled,\n required,\n 'aria-describedby': ariaDescribedBy,\n ...nativeProps.primary\n },\n elementType: 'input'\n });\n input.onChange = mergeCallbacks(input.onChange, (ev)=>onChange === null || onChange === void 0 ? void 0 : onChange(ev, {\n value: ev.currentTarget.value\n }));\n const label = slot.optional(props.label, {\n defaultProps: {\n htmlFor: input.id,\n disabled: input.disabled\n },\n elementType: Label\n });\n const indicator = slot.always(props.indicator, {\n defaultProps: {\n 'aria-hidden': true,\n children: /*#__PURE__*/ React.createElement(CircleFilled, null)\n },\n elementType: 'div'\n });\n return {\n labelPosition,\n components: {\n root: 'span',\n input: 'input',\n label: Label,\n indicator: 'div'\n },\n root,\n input,\n label,\n indicator\n };\n};\n"],"names":["useRadio_unstable","props","ref","group","useRadioGroupContextValue_unstable","name","checked","value","undefined","defaultChecked","defaultValue","labelPosition","layout","disabled","required","ariaDescribedBy","onChange","nativeProps","getPartitionedNativeProps","primarySlotTagName","excludedPropNames","root","slot","always","defaultProps","useFocusWithin","elementType","input","type","id","useId","primary","mergeCallbacks","ev","currentTarget","label","optional","htmlFor","Label","indicator","children","React","createElement","CircleFilled","components"],"mappings":";;;;+BAciBA;;;eAAAA;;;;iE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C3B,KAAK;QACjC;IACJ,MAAM4B,QAAQb,oBAAI,CAACc,QAAQ,CAACnC,MAAMkC,KAAK,EAAE;QACrCX,cAAc;YACVa,SAASV,MAAME,EAAE;YACjBhB,UAAUc,MAAMd,QAAQ;QAC5B;QACAa,aAAaY,iBAAK;IACtB;IACA,MAAMC,YAAYjB,oBAAI,CAACC,MAAM,CAACtB,MAAMsC,SAAS,EAAE;QAC3Cf,cAAc;YACV,eAAe;YACfgB,UAAU,WAAW,GAAGC,OAAMC,aAAa,CAACC,wBAAY,EAAE;QAC9D;QACAjB,aAAa;IACjB;IACA,OAAO;QACHf;QACAiC,YAAY;YACRvB,MAAM;YACNM,OAAO;YACPQ,OAAOG,iBAAK;YACZC,WAAW;QACf;QACAlB;QACAM;QACAQ;QACAI;IACJ;AACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-radio",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20230927-0415.1",
|
|
4
4
|
"description": "Fluent UI Radio component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -27,20 +27,20 @@
|
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@fluentui/eslint-plugin": "*",
|
|
30
|
-
"@fluentui/react-conformance": "0.0.0-nightly-
|
|
31
|
-
"@fluentui/react-conformance-griffel": "0.0.0-nightly-
|
|
30
|
+
"@fluentui/react-conformance": "0.0.0-nightly-20230927-0415.1",
|
|
31
|
+
"@fluentui/react-conformance-griffel": "0.0.0-nightly-20230927-0415.1",
|
|
32
32
|
"@fluentui/scripts-api-extractor": "*",
|
|
33
33
|
"@fluentui/scripts-tasks": "*"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@fluentui/react-field": "0.0.0-nightly-
|
|
36
|
+
"@fluentui/react-field": "0.0.0-nightly-20230927-0415.1",
|
|
37
37
|
"@fluentui/react-icons": "^2.0.217",
|
|
38
|
-
"@fluentui/react-jsx-runtime": "0.0.0-nightly-
|
|
39
|
-
"@fluentui/react-label": "0.0.0-nightly-
|
|
40
|
-
"@fluentui/react-shared-contexts": "0.0.0-nightly-
|
|
41
|
-
"@fluentui/react-tabster": "0.0.0-nightly-
|
|
42
|
-
"@fluentui/react-theme": "0.0.0-nightly-
|
|
43
|
-
"@fluentui/react-utilities": "0.0.0-nightly-
|
|
38
|
+
"@fluentui/react-jsx-runtime": "0.0.0-nightly-20230927-0415.1",
|
|
39
|
+
"@fluentui/react-label": "0.0.0-nightly-20230927-0415.1",
|
|
40
|
+
"@fluentui/react-shared-contexts": "0.0.0-nightly-20230927-0415.1",
|
|
41
|
+
"@fluentui/react-tabster": "0.0.0-nightly-20230927-0415.1",
|
|
42
|
+
"@fluentui/react-theme": "0.0.0-nightly-20230927-0415.1",
|
|
43
|
+
"@fluentui/react-utilities": "0.0.0-nightly-20230927-0415.1",
|
|
44
44
|
"@griffel/react": "^1.5.14",
|
|
45
45
|
"@swc/helpers": "^0.5.1"
|
|
46
46
|
},
|