@fluentui-react-native/radio-group 0.16.48 → 0.17.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 +109 -1
- package/CHANGELOG.md +31 -2
- package/lib/Radio/Radio.d.ts.map +1 -1
- package/lib/Radio/Radio.js +1 -0
- package/lib/Radio/Radio.js.map +1 -1
- package/lib/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/lib/RadioGroup/RadioGroup.js.map +1 -1
- package/lib/RadioGroup/__tests__/RadioGroupExperimental.test.js +149 -54
- package/lib/RadioGroup/__tests__/RadioGroupExperimental.test.js.map +1 -1
- package/lib/legacy/RadioButton.d.ts.map +1 -1
- package/lib/legacy/RadioButton.js +1 -0
- package/lib/legacy/RadioButton.js.map +1 -1
- package/lib/legacy/RadioButton.macos.d.ts.map +1 -1
- package/lib/legacy/RadioButton.macos.js +1 -0
- package/lib/legacy/RadioButton.macos.js.map +1 -1
- package/lib/legacy/RadioGroup.d.ts +1 -0
- package/lib/legacy/RadioGroup.d.ts.map +1 -1
- package/lib/legacy/RadioGroup.js +1 -0
- package/lib/legacy/RadioGroup.js.map +1 -1
- package/lib/legacy/RadioGroup.types.d.ts +2 -2
- package/lib/legacy/RadioGroup.types.d.ts.map +1 -1
- package/lib-commonjs/Radio/Radio.d.ts.map +1 -1
- package/lib-commonjs/Radio/Radio.js +1 -0
- package/lib-commonjs/Radio/Radio.js.map +1 -1
- package/lib-commonjs/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/lib-commonjs/RadioGroup/RadioGroup.js.map +1 -1
- package/lib-commonjs/RadioGroup/__tests__/RadioGroupExperimental.test.js +148 -54
- package/lib-commonjs/RadioGroup/__tests__/RadioGroupExperimental.test.js.map +1 -1
- package/lib-commonjs/legacy/RadioButton.d.ts.map +1 -1
- package/lib-commonjs/legacy/RadioButton.js +1 -0
- package/lib-commonjs/legacy/RadioButton.js.map +1 -1
- package/lib-commonjs/legacy/RadioButton.macos.d.ts.map +1 -1
- package/lib-commonjs/legacy/RadioButton.macos.js +1 -0
- package/lib-commonjs/legacy/RadioButton.macos.js.map +1 -1
- package/lib-commonjs/legacy/RadioGroup.d.ts +1 -0
- package/lib-commonjs/legacy/RadioGroup.d.ts.map +1 -1
- package/lib-commonjs/legacy/RadioGroup.js +1 -0
- package/lib-commonjs/legacy/RadioGroup.js.map +1 -1
- package/lib-commonjs/legacy/RadioGroup.types.d.ts +2 -2
- package/lib-commonjs/legacy/RadioGroup.types.d.ts.map +1 -1
- package/package.json +20 -21
- package/src/Radio/Radio.tsx +1 -0
- package/src/Radio/__tests__/__snapshots__/RadioExperimental.test.tsx.snap +68 -17
- package/src/RadioGroup/RadioGroup.tsx +1 -0
- package/src/RadioGroup/__tests__/RadioGroupExperimental.test.tsx +16 -8
- package/src/RadioGroup/__tests__/__snapshots__/RadioGroupExperimental.test.tsx.snap +455 -129
- package/src/legacy/RadioButton.macos.tsx +1 -0
- package/src/legacy/RadioButton.tsx +1 -0
- package/src/legacy/RadioGroup.tsx +1 -0
- package/src/legacy/RadioGroup.types.ts +2 -2
- package/src/legacy/__tests__/__snapshots__/RadioButton.test.tsx.snap +7 -7
- package/src/legacy/__tests__/__snapshots__/RadioButtonGroup.test.tsx.snap +32 -32
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
exports[`Radio component tests Radio default 1`] = `
|
|
4
4
|
<View
|
|
5
5
|
accessibilityActions={
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
[
|
|
7
|
+
{
|
|
8
8
|
"name": "Select",
|
|
9
9
|
},
|
|
10
10
|
]
|
|
@@ -14,11 +14,22 @@ exports[`Radio component tests Radio default 1`] = `
|
|
|
14
14
|
accessibilityRole="radio"
|
|
15
15
|
accessibilitySetSize={0}
|
|
16
16
|
accessibilityState={
|
|
17
|
-
|
|
17
|
+
{
|
|
18
|
+
"busy": undefined,
|
|
19
|
+
"checked": undefined,
|
|
18
20
|
"disabled": false,
|
|
21
|
+
"expanded": undefined,
|
|
19
22
|
"selected": false,
|
|
20
23
|
}
|
|
21
24
|
}
|
|
25
|
+
accessibilityValue={
|
|
26
|
+
{
|
|
27
|
+
"max": undefined,
|
|
28
|
+
"min": undefined,
|
|
29
|
+
"now": undefined,
|
|
30
|
+
"text": undefined,
|
|
31
|
+
}
|
|
32
|
+
}
|
|
22
33
|
accessible={true}
|
|
23
34
|
collapsable={false}
|
|
24
35
|
enableFocusRing={true}
|
|
@@ -35,7 +46,7 @@ exports[`Radio component tests Radio default 1`] = `
|
|
|
35
46
|
onResponderTerminationRequest={[Function]}
|
|
36
47
|
onStartShouldSetResponder={[Function]}
|
|
37
48
|
style={
|
|
38
|
-
|
|
49
|
+
{
|
|
39
50
|
"alignItems": "center",
|
|
40
51
|
"display": "flex",
|
|
41
52
|
"flexDirection": "row",
|
|
@@ -46,6 +57,23 @@ exports[`Radio component tests Radio default 1`] = `
|
|
|
46
57
|
value="key1"
|
|
47
58
|
>
|
|
48
59
|
<View
|
|
60
|
+
accessibilityState={
|
|
61
|
+
{
|
|
62
|
+
"busy": undefined,
|
|
63
|
+
"checked": undefined,
|
|
64
|
+
"disabled": undefined,
|
|
65
|
+
"expanded": undefined,
|
|
66
|
+
"selected": undefined,
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
accessibilityValue={
|
|
70
|
+
{
|
|
71
|
+
"max": undefined,
|
|
72
|
+
"min": undefined,
|
|
73
|
+
"now": undefined,
|
|
74
|
+
"text": undefined,
|
|
75
|
+
}
|
|
76
|
+
}
|
|
49
77
|
accessible={false}
|
|
50
78
|
collapsable={false}
|
|
51
79
|
focusable={false}
|
|
@@ -59,7 +87,7 @@ exports[`Radio component tests Radio default 1`] = `
|
|
|
59
87
|
onResponderTerminationRequest={[Function]}
|
|
60
88
|
onStartShouldSetResponder={[Function]}
|
|
61
89
|
style={
|
|
62
|
-
|
|
90
|
+
{
|
|
63
91
|
"alignItems": "center",
|
|
64
92
|
"backgroundColor": undefined,
|
|
65
93
|
"borderColor": "#616161",
|
|
@@ -78,7 +106,7 @@ exports[`Radio component tests Radio default 1`] = `
|
|
|
78
106
|
>
|
|
79
107
|
<View
|
|
80
108
|
style={
|
|
81
|
-
|
|
109
|
+
{
|
|
82
110
|
"backgroundColor": undefined,
|
|
83
111
|
"borderRadius": 5,
|
|
84
112
|
"height": 10,
|
|
@@ -90,7 +118,7 @@ exports[`Radio component tests Radio default 1`] = `
|
|
|
90
118
|
</View>
|
|
91
119
|
<View
|
|
92
120
|
style={
|
|
93
|
-
|
|
121
|
+
{
|
|
94
122
|
"alignItems": undefined,
|
|
95
123
|
"flexDirection": "column",
|
|
96
124
|
"marginLeft": 16,
|
|
@@ -104,7 +132,7 @@ exports[`Radio component tests Radio default 1`] = `
|
|
|
104
132
|
ellipsizeMode="tail"
|
|
105
133
|
numberOfLines={0}
|
|
106
134
|
style={
|
|
107
|
-
|
|
135
|
+
{
|
|
108
136
|
"color": "#242424",
|
|
109
137
|
"fontFamily": "Segoe UI",
|
|
110
138
|
"fontSize": 13,
|
|
@@ -123,8 +151,8 @@ exports[`Radio component tests Radio default 1`] = `
|
|
|
123
151
|
exports[`Radio component tests Radio disabled 1`] = `
|
|
124
152
|
<View
|
|
125
153
|
accessibilityActions={
|
|
126
|
-
|
|
127
|
-
|
|
154
|
+
[
|
|
155
|
+
{
|
|
128
156
|
"name": "Select",
|
|
129
157
|
},
|
|
130
158
|
]
|
|
@@ -134,11 +162,22 @@ exports[`Radio component tests Radio disabled 1`] = `
|
|
|
134
162
|
accessibilityRole="radio"
|
|
135
163
|
accessibilitySetSize={0}
|
|
136
164
|
accessibilityState={
|
|
137
|
-
|
|
165
|
+
{
|
|
166
|
+
"busy": undefined,
|
|
167
|
+
"checked": undefined,
|
|
138
168
|
"disabled": true,
|
|
169
|
+
"expanded": undefined,
|
|
139
170
|
"selected": false,
|
|
140
171
|
}
|
|
141
172
|
}
|
|
173
|
+
accessibilityValue={
|
|
174
|
+
{
|
|
175
|
+
"max": undefined,
|
|
176
|
+
"min": undefined,
|
|
177
|
+
"now": undefined,
|
|
178
|
+
"text": undefined,
|
|
179
|
+
}
|
|
180
|
+
}
|
|
142
181
|
accessible={false}
|
|
143
182
|
collapsable={false}
|
|
144
183
|
enableFocusRing={true}
|
|
@@ -155,7 +194,7 @@ exports[`Radio component tests Radio disabled 1`] = `
|
|
|
155
194
|
onResponderTerminationRequest={[Function]}
|
|
156
195
|
onStartShouldSetResponder={[Function]}
|
|
157
196
|
style={
|
|
158
|
-
|
|
197
|
+
{
|
|
159
198
|
"alignItems": "center",
|
|
160
199
|
"display": "flex",
|
|
161
200
|
"flexDirection": "row",
|
|
@@ -167,8 +206,20 @@ exports[`Radio component tests Radio disabled 1`] = `
|
|
|
167
206
|
>
|
|
168
207
|
<View
|
|
169
208
|
accessibilityState={
|
|
170
|
-
|
|
209
|
+
{
|
|
210
|
+
"busy": undefined,
|
|
211
|
+
"checked": undefined,
|
|
171
212
|
"disabled": true,
|
|
213
|
+
"expanded": undefined,
|
|
214
|
+
"selected": undefined,
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
accessibilityValue={
|
|
218
|
+
{
|
|
219
|
+
"max": undefined,
|
|
220
|
+
"min": undefined,
|
|
221
|
+
"now": undefined,
|
|
222
|
+
"text": undefined,
|
|
172
223
|
}
|
|
173
224
|
}
|
|
174
225
|
accessible={false}
|
|
@@ -184,7 +235,7 @@ exports[`Radio component tests Radio disabled 1`] = `
|
|
|
184
235
|
onResponderTerminationRequest={[Function]}
|
|
185
236
|
onStartShouldSetResponder={[Function]}
|
|
186
237
|
style={
|
|
187
|
-
|
|
238
|
+
{
|
|
188
239
|
"alignItems": "center",
|
|
189
240
|
"backgroundColor": undefined,
|
|
190
241
|
"borderColor": "#e0e0e0",
|
|
@@ -203,7 +254,7 @@ exports[`Radio component tests Radio disabled 1`] = `
|
|
|
203
254
|
>
|
|
204
255
|
<View
|
|
205
256
|
style={
|
|
206
|
-
|
|
257
|
+
{
|
|
207
258
|
"backgroundColor": undefined,
|
|
208
259
|
"borderRadius": 5,
|
|
209
260
|
"height": 10,
|
|
@@ -215,7 +266,7 @@ exports[`Radio component tests Radio disabled 1`] = `
|
|
|
215
266
|
</View>
|
|
216
267
|
<View
|
|
217
268
|
style={
|
|
218
|
-
|
|
269
|
+
{
|
|
219
270
|
"alignItems": undefined,
|
|
220
271
|
"flexDirection": "column",
|
|
221
272
|
"marginLeft": 16,
|
|
@@ -229,7 +280,7 @@ exports[`Radio component tests Radio disabled 1`] = `
|
|
|
229
280
|
ellipsizeMode="tail"
|
|
230
281
|
numberOfLines={0}
|
|
231
282
|
style={
|
|
232
|
-
|
|
283
|
+
{
|
|
233
284
|
"color": "#bdbdbd",
|
|
234
285
|
"fontFamily": "Segoe UI",
|
|
235
286
|
"fontSize": 13,
|
|
@@ -9,7 +9,7 @@ import { RadioGroup } from '../RadioGroup';
|
|
|
9
9
|
jest.useFakeTimers();
|
|
10
10
|
|
|
11
11
|
describe('RadioGroup component tests', () => {
|
|
12
|
-
it('RadioGroup default', () => {
|
|
12
|
+
it('RadioGroup default', async () => {
|
|
13
13
|
const tree = renderer
|
|
14
14
|
.create(
|
|
15
15
|
<RadioGroup label="Uncontrolled RadioGroup" defaultValue="key2">
|
|
@@ -19,9 +19,10 @@ describe('RadioGroup component tests', () => {
|
|
|
19
19
|
)
|
|
20
20
|
.toJSON();
|
|
21
21
|
expect(tree).toMatchSnapshot();
|
|
22
|
+
await renderer.act(async () => null);
|
|
22
23
|
});
|
|
23
24
|
|
|
24
|
-
it('Radio not direct child of radio group', () => {
|
|
25
|
+
it('Radio not direct child of radio group', async () => {
|
|
25
26
|
const tree = renderer
|
|
26
27
|
.create(
|
|
27
28
|
<RadioGroup label="Uncontrolled RadioGroup" defaultValue="key2">
|
|
@@ -31,9 +32,10 @@ describe('RadioGroup component tests', () => {
|
|
|
31
32
|
)
|
|
32
33
|
.toJSON();
|
|
33
34
|
expect(tree).toMatchSnapshot();
|
|
35
|
+
await renderer.act(async () => null);
|
|
34
36
|
});
|
|
35
37
|
|
|
36
|
-
it('RadioGroup disabled', () => {
|
|
38
|
+
it('RadioGroup disabled', async () => {
|
|
37
39
|
const tree = renderer
|
|
38
40
|
.create(
|
|
39
41
|
<RadioGroup disabled label="Disabled RadioGroup">
|
|
@@ -43,9 +45,10 @@ describe('RadioGroup component tests', () => {
|
|
|
43
45
|
)
|
|
44
46
|
.toJSON();
|
|
45
47
|
expect(tree).toMatchSnapshot();
|
|
48
|
+
await renderer.act(async () => null);
|
|
46
49
|
});
|
|
47
50
|
|
|
48
|
-
it('RadioGroup required', () => {
|
|
51
|
+
it('RadioGroup required', async () => {
|
|
49
52
|
const tree = renderer
|
|
50
53
|
.create(
|
|
51
54
|
<RadioGroup required label="Required RadioGroup" defaultValue="key2">
|
|
@@ -55,9 +58,10 @@ describe('RadioGroup component tests', () => {
|
|
|
55
58
|
)
|
|
56
59
|
.toJSON();
|
|
57
60
|
expect(tree).toMatchSnapshot();
|
|
61
|
+
await renderer.act(async () => null);
|
|
58
62
|
});
|
|
59
63
|
|
|
60
|
-
it('RadioGroup horizontal', () => {
|
|
64
|
+
it('RadioGroup horizontal', async () => {
|
|
61
65
|
const tree = renderer
|
|
62
66
|
.create(
|
|
63
67
|
<RadioGroup layout="horizontal" label="Horizontal RadioGroup" defaultValue="key2">
|
|
@@ -67,9 +71,10 @@ describe('RadioGroup component tests', () => {
|
|
|
67
71
|
)
|
|
68
72
|
.toJSON();
|
|
69
73
|
expect(tree).toMatchSnapshot();
|
|
74
|
+
await renderer.act(async () => null);
|
|
70
75
|
});
|
|
71
76
|
|
|
72
|
-
it('RadioGroup horizontal-stacked', () => {
|
|
77
|
+
it('RadioGroup horizontal-stacked', async () => {
|
|
73
78
|
const tree = renderer
|
|
74
79
|
.create(
|
|
75
80
|
<RadioGroup layout="horizontal-stacked" label="Horizontal-Stacked RadioGroup" defaultValue="key2">
|
|
@@ -79,13 +84,16 @@ describe('RadioGroup component tests', () => {
|
|
|
79
84
|
)
|
|
80
85
|
.toJSON();
|
|
81
86
|
expect(tree).toMatchSnapshot();
|
|
87
|
+
await renderer.act(async () => null);
|
|
82
88
|
});
|
|
83
89
|
|
|
84
|
-
it('RadioGroup simple rendering does not invalidate styling', () => {
|
|
90
|
+
it('RadioGroup simple rendering does not invalidate styling', async () => {
|
|
85
91
|
checkRenderConsistency(() => <RadioGroup>Default RadioGroup</RadioGroup>, 2);
|
|
92
|
+
await renderer.act(async () => null);
|
|
86
93
|
});
|
|
87
94
|
|
|
88
|
-
it('RadioGroup re-renders correctly', () => {
|
|
95
|
+
it('RadioGroup re-renders correctly', async () => {
|
|
89
96
|
checkReRender(() => <RadioGroup>Render twice</RadioGroup>, 2);
|
|
97
|
+
await renderer.act(async () => null);
|
|
90
98
|
});
|
|
91
99
|
});
|