@hero-design/rn 8.36.1 → 8.36.3
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/.turbo/turbo-build.log +1 -1
- package/es/index.js +55 -50
- package/lib/index.js +55 -50
- package/package.json +7 -7
- package/src/components/Carousel/StyledCardCarousel.tsx +1 -1
- package/src/components/Carousel/__tests__/__snapshots__/CardCarousel.spec.tsx.snap +8 -8
- package/src/components/Checkbox/StyledCheckbox.tsx +7 -14
- package/src/components/Checkbox/__tests__/StyledCheckbox.spec.tsx +8 -12
- package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +4 -88
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +12 -324
- package/src/components/Checkbox/__tests__/index.spec.tsx +7 -12
- package/src/components/Checkbox/index.tsx +7 -1
- package/src/components/Drawer/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/Drawer/index.tsx +3 -3
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
- package/src/components/FAB/StyledFAB.tsx +1 -1
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +4 -4
- package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
- package/src/components/List/StyledListItem.tsx +5 -5
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +6 -6
- package/src/components/Toast/StyledToast.tsx +1 -1
- package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +7 -7
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +29 -14
- package/src/theme/components/cardCarousel.ts +5 -5
- package/src/theme/components/fab.ts +5 -5
- package/src/theme/components/list.ts +7 -4
- package/src/theme/components/toast.ts +5 -5
- package/src/theme/global/index.ts +3 -0
- package/src/theme/global/shadows.ts +19 -0
- package/types/components/Checkbox/StyledCheckbox.d.ts +0 -1
- package/types/components/Checkbox/index.d.ts +1 -0
- package/types/theme/components/cardCarousel.d.ts +1 -1
- package/types/theme/components/fab.d.ts +1 -1
- package/types/theme/components/list.d.ts +9 -6
- package/types/theme/components/toast.d.ts +1 -1
- package/types/theme/global/index.d.ts +12 -0
- package/types/theme/global/shadows.d.ts +16 -0
|
@@ -68,49 +68,7 @@ exports[`StyledCheckbox renders correctly when disabled is true and readonly is
|
|
|
68
68
|
/>
|
|
69
69
|
`;
|
|
70
70
|
|
|
71
|
-
exports[`StyledWrapper renders correctly when disabled is false,
|
|
72
|
-
<View
|
|
73
|
-
accessible={true}
|
|
74
|
-
collapsable={false}
|
|
75
|
-
focusable={false}
|
|
76
|
-
onClick={[Function]}
|
|
77
|
-
onResponderGrant={[Function]}
|
|
78
|
-
onResponderMove={[Function]}
|
|
79
|
-
onResponderRelease={[Function]}
|
|
80
|
-
onResponderTerminate={[Function]}
|
|
81
|
-
onResponderTerminationRequest={[Function]}
|
|
82
|
-
onStartShouldSetResponder={[Function]}
|
|
83
|
-
style={
|
|
84
|
-
Object {
|
|
85
|
-
"flexDirection": "row",
|
|
86
|
-
"opacity": 1,
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
/>
|
|
90
|
-
`;
|
|
91
|
-
|
|
92
|
-
exports[`StyledWrapper renders correctly when disabled is false, withBorder is false 2`] = `
|
|
93
|
-
<View
|
|
94
|
-
accessible={true}
|
|
95
|
-
collapsable={false}
|
|
96
|
-
focusable={false}
|
|
97
|
-
onClick={[Function]}
|
|
98
|
-
onResponderGrant={[Function]}
|
|
99
|
-
onResponderMove={[Function]}
|
|
100
|
-
onResponderRelease={[Function]}
|
|
101
|
-
onResponderTerminate={[Function]}
|
|
102
|
-
onResponderTerminationRequest={[Function]}
|
|
103
|
-
onStartShouldSetResponder={[Function]}
|
|
104
|
-
style={
|
|
105
|
-
Object {
|
|
106
|
-
"flexDirection": "row",
|
|
107
|
-
"opacity": 1,
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
/>
|
|
111
|
-
`;
|
|
112
|
-
|
|
113
|
-
exports[`StyledWrapper renders correctly when disabled is false, withBorder is true 1`] = `
|
|
71
|
+
exports[`StyledWrapper renders correctly when disabled is false, readonly is false 1`] = `
|
|
114
72
|
<View
|
|
115
73
|
accessible={true}
|
|
116
74
|
collapsable={false}
|
|
@@ -135,7 +93,7 @@ exports[`StyledWrapper renders correctly when disabled is false, withBorder is t
|
|
|
135
93
|
/>
|
|
136
94
|
`;
|
|
137
95
|
|
|
138
|
-
exports[`StyledWrapper renders correctly when disabled is false,
|
|
96
|
+
exports[`StyledWrapper renders correctly when disabled is false, readonly is true 1`] = `
|
|
139
97
|
<View
|
|
140
98
|
accessible={true}
|
|
141
99
|
collapsable={false}
|
|
@@ -160,49 +118,7 @@ exports[`StyledWrapper renders correctly when disabled is false, withBorder is t
|
|
|
160
118
|
/>
|
|
161
119
|
`;
|
|
162
120
|
|
|
163
|
-
exports[`StyledWrapper renders correctly when disabled is true,
|
|
164
|
-
<View
|
|
165
|
-
accessible={true}
|
|
166
|
-
collapsable={false}
|
|
167
|
-
focusable={false}
|
|
168
|
-
onClick={[Function]}
|
|
169
|
-
onResponderGrant={[Function]}
|
|
170
|
-
onResponderMove={[Function]}
|
|
171
|
-
onResponderRelease={[Function]}
|
|
172
|
-
onResponderTerminate={[Function]}
|
|
173
|
-
onResponderTerminationRequest={[Function]}
|
|
174
|
-
onStartShouldSetResponder={[Function]}
|
|
175
|
-
style={
|
|
176
|
-
Object {
|
|
177
|
-
"flexDirection": "row",
|
|
178
|
-
"opacity": 1,
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
/>
|
|
182
|
-
`;
|
|
183
|
-
|
|
184
|
-
exports[`StyledWrapper renders correctly when disabled is true, withBorder is false 2`] = `
|
|
185
|
-
<View
|
|
186
|
-
accessible={true}
|
|
187
|
-
collapsable={false}
|
|
188
|
-
focusable={false}
|
|
189
|
-
onClick={[Function]}
|
|
190
|
-
onResponderGrant={[Function]}
|
|
191
|
-
onResponderMove={[Function]}
|
|
192
|
-
onResponderRelease={[Function]}
|
|
193
|
-
onResponderTerminate={[Function]}
|
|
194
|
-
onResponderTerminationRequest={[Function]}
|
|
195
|
-
onStartShouldSetResponder={[Function]}
|
|
196
|
-
style={
|
|
197
|
-
Object {
|
|
198
|
-
"flexDirection": "row",
|
|
199
|
-
"opacity": 1,
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
/>
|
|
203
|
-
`;
|
|
204
|
-
|
|
205
|
-
exports[`StyledWrapper renders correctly when disabled is true, withBorder is true 1`] = `
|
|
121
|
+
exports[`StyledWrapper renders correctly when disabled is true, readonly is false 1`] = `
|
|
206
122
|
<View
|
|
207
123
|
accessible={true}
|
|
208
124
|
collapsable={false}
|
|
@@ -227,7 +143,7 @@ exports[`StyledWrapper renders correctly when disabled is true, withBorder is tr
|
|
|
227
143
|
/>
|
|
228
144
|
`;
|
|
229
145
|
|
|
230
|
-
exports[`StyledWrapper renders correctly when disabled is true,
|
|
146
|
+
exports[`StyledWrapper renders correctly when disabled is true, readonly is true 1`] = `
|
|
231
147
|
<View
|
|
232
148
|
accessible={true}
|
|
233
149
|
collapsable={false}
|
|
@@ -19,8 +19,12 @@ exports[`Checkbox renders correctly when checked is false and there is no descri
|
|
|
19
19
|
onStartShouldSetResponder={[Function]}
|
|
20
20
|
style={
|
|
21
21
|
Object {
|
|
22
|
+
"borderColor": "#001f23",
|
|
23
|
+
"borderRadius": 8,
|
|
24
|
+
"borderWidth": 1,
|
|
22
25
|
"flexDirection": "row",
|
|
23
26
|
"opacity": 1,
|
|
27
|
+
"padding": 16,
|
|
24
28
|
}
|
|
25
29
|
}
|
|
26
30
|
>
|
|
@@ -73,8 +77,12 @@ exports[`Checkbox renders correctly when checked is true and there is no descrip
|
|
|
73
77
|
onStartShouldSetResponder={[Function]}
|
|
74
78
|
style={
|
|
75
79
|
Object {
|
|
80
|
+
"borderColor": "#001f23",
|
|
81
|
+
"borderRadius": 8,
|
|
82
|
+
"borderWidth": 1,
|
|
76
83
|
"flexDirection": "row",
|
|
77
84
|
"opacity": 1,
|
|
85
|
+
"padding": 16,
|
|
78
86
|
}
|
|
79
87
|
}
|
|
80
88
|
>
|
|
@@ -130,167 +138,7 @@ exports[`Checkbox renders correctly when checked is true and there is no descrip
|
|
|
130
138
|
</View>
|
|
131
139
|
`;
|
|
132
140
|
|
|
133
|
-
exports[`Checkbox renders correctly when disabled is false
|
|
134
|
-
<View
|
|
135
|
-
accessibilityState={
|
|
136
|
-
Object {
|
|
137
|
-
"disabled": false,
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
accessible={true}
|
|
141
|
-
collapsable={false}
|
|
142
|
-
focusable={false}
|
|
143
|
-
onClick={[Function]}
|
|
144
|
-
onResponderGrant={[Function]}
|
|
145
|
-
onResponderMove={[Function]}
|
|
146
|
-
onResponderRelease={[Function]}
|
|
147
|
-
onResponderTerminate={[Function]}
|
|
148
|
-
onResponderTerminationRequest={[Function]}
|
|
149
|
-
onStartShouldSetResponder={[Function]}
|
|
150
|
-
style={
|
|
151
|
-
Object {
|
|
152
|
-
"flexDirection": "row",
|
|
153
|
-
"opacity": 1,
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
>
|
|
157
|
-
<Text
|
|
158
|
-
allowFontScaling={false}
|
|
159
|
-
style={
|
|
160
|
-
Array [
|
|
161
|
-
Object {
|
|
162
|
-
"color": "#001f23",
|
|
163
|
-
"fontFamily": "BeVietnamPro-Regular",
|
|
164
|
-
"fontSize": 14,
|
|
165
|
-
"letterSpacing": 0.48,
|
|
166
|
-
"lineHeight": 22,
|
|
167
|
-
},
|
|
168
|
-
Array [
|
|
169
|
-
Object {
|
|
170
|
-
"flex": 1,
|
|
171
|
-
"paddingRight": 12,
|
|
172
|
-
},
|
|
173
|
-
undefined,
|
|
174
|
-
],
|
|
175
|
-
]
|
|
176
|
-
}
|
|
177
|
-
themeIntent="body"
|
|
178
|
-
themeTypeface="neutral"
|
|
179
|
-
themeVariant="small"
|
|
180
|
-
>
|
|
181
|
-
Please agree to our privacy policy
|
|
182
|
-
</Text>
|
|
183
|
-
<View
|
|
184
|
-
style={
|
|
185
|
-
Array [
|
|
186
|
-
Object {
|
|
187
|
-
"height": 24,
|
|
188
|
-
"overflow": "hidden",
|
|
189
|
-
"width": 24,
|
|
190
|
-
},
|
|
191
|
-
undefined,
|
|
192
|
-
]
|
|
193
|
-
}
|
|
194
|
-
>
|
|
195
|
-
<View
|
|
196
|
-
style={
|
|
197
|
-
Array [
|
|
198
|
-
Object {
|
|
199
|
-
"borderColor": "#001f23",
|
|
200
|
-
"borderRadius": 4,
|
|
201
|
-
"borderWidth": 2,
|
|
202
|
-
"flex": 1,
|
|
203
|
-
},
|
|
204
|
-
undefined,
|
|
205
|
-
]
|
|
206
|
-
}
|
|
207
|
-
themeState="default"
|
|
208
|
-
/>
|
|
209
|
-
</View>
|
|
210
|
-
</View>
|
|
211
|
-
`;
|
|
212
|
-
|
|
213
|
-
exports[`Checkbox renders correctly when disabled is false, withBorder is false and readonly is true 1`] = `
|
|
214
|
-
<View
|
|
215
|
-
accessibilityState={
|
|
216
|
-
Object {
|
|
217
|
-
"disabled": true,
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
accessible={true}
|
|
221
|
-
collapsable={false}
|
|
222
|
-
focusable={false}
|
|
223
|
-
onClick={[Function]}
|
|
224
|
-
onResponderGrant={[Function]}
|
|
225
|
-
onResponderMove={[Function]}
|
|
226
|
-
onResponderRelease={[Function]}
|
|
227
|
-
onResponderTerminate={[Function]}
|
|
228
|
-
onResponderTerminationRequest={[Function]}
|
|
229
|
-
onStartShouldSetResponder={[Function]}
|
|
230
|
-
style={
|
|
231
|
-
Object {
|
|
232
|
-
"flexDirection": "row",
|
|
233
|
-
"opacity": 1,
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
>
|
|
237
|
-
<Text
|
|
238
|
-
allowFontScaling={false}
|
|
239
|
-
style={
|
|
240
|
-
Array [
|
|
241
|
-
Object {
|
|
242
|
-
"color": "#001f23",
|
|
243
|
-
"fontFamily": "BeVietnamPro-Regular",
|
|
244
|
-
"fontSize": 14,
|
|
245
|
-
"letterSpacing": 0.48,
|
|
246
|
-
"lineHeight": 22,
|
|
247
|
-
},
|
|
248
|
-
Array [
|
|
249
|
-
Object {
|
|
250
|
-
"flex": 1,
|
|
251
|
-
"paddingRight": 12,
|
|
252
|
-
},
|
|
253
|
-
undefined,
|
|
254
|
-
],
|
|
255
|
-
]
|
|
256
|
-
}
|
|
257
|
-
themeIntent="body"
|
|
258
|
-
themeTypeface="neutral"
|
|
259
|
-
themeVariant="small"
|
|
260
|
-
>
|
|
261
|
-
Please agree to our privacy policy
|
|
262
|
-
</Text>
|
|
263
|
-
<View
|
|
264
|
-
style={
|
|
265
|
-
Array [
|
|
266
|
-
Object {
|
|
267
|
-
"height": 24,
|
|
268
|
-
"overflow": "hidden",
|
|
269
|
-
"width": 24,
|
|
270
|
-
},
|
|
271
|
-
undefined,
|
|
272
|
-
]
|
|
273
|
-
}
|
|
274
|
-
>
|
|
275
|
-
<View
|
|
276
|
-
style={
|
|
277
|
-
Array [
|
|
278
|
-
Object {
|
|
279
|
-
"borderColor": "#808f91",
|
|
280
|
-
"borderRadius": 4,
|
|
281
|
-
"borderWidth": 2,
|
|
282
|
-
"flex": 1,
|
|
283
|
-
},
|
|
284
|
-
undefined,
|
|
285
|
-
]
|
|
286
|
-
}
|
|
287
|
-
themeState="readonly"
|
|
288
|
-
/>
|
|
289
|
-
</View>
|
|
290
|
-
</View>
|
|
291
|
-
`;
|
|
292
|
-
|
|
293
|
-
exports[`Checkbox renders correctly when disabled is false, withBorder is true and readonly is false 1`] = `
|
|
141
|
+
exports[`Checkbox renders correctly when disabled is false and readonly is false 1`] = `
|
|
294
142
|
<View
|
|
295
143
|
accessibilityState={
|
|
296
144
|
Object {
|
|
@@ -374,7 +222,7 @@ exports[`Checkbox renders correctly when disabled is false, withBorder is true a
|
|
|
374
222
|
</View>
|
|
375
223
|
`;
|
|
376
224
|
|
|
377
|
-
exports[`Checkbox renders correctly when disabled is false
|
|
225
|
+
exports[`Checkbox renders correctly when disabled is false and readonly is true 1`] = `
|
|
378
226
|
<View
|
|
379
227
|
accessibilityState={
|
|
380
228
|
Object {
|
|
@@ -458,167 +306,7 @@ exports[`Checkbox renders correctly when disabled is false, withBorder is true a
|
|
|
458
306
|
</View>
|
|
459
307
|
`;
|
|
460
308
|
|
|
461
|
-
exports[`Checkbox renders correctly when disabled is true
|
|
462
|
-
<View
|
|
463
|
-
accessibilityState={
|
|
464
|
-
Object {
|
|
465
|
-
"disabled": true,
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
accessible={true}
|
|
469
|
-
collapsable={false}
|
|
470
|
-
focusable={false}
|
|
471
|
-
onClick={[Function]}
|
|
472
|
-
onResponderGrant={[Function]}
|
|
473
|
-
onResponderMove={[Function]}
|
|
474
|
-
onResponderRelease={[Function]}
|
|
475
|
-
onResponderTerminate={[Function]}
|
|
476
|
-
onResponderTerminationRequest={[Function]}
|
|
477
|
-
onStartShouldSetResponder={[Function]}
|
|
478
|
-
style={
|
|
479
|
-
Object {
|
|
480
|
-
"flexDirection": "row",
|
|
481
|
-
"opacity": 1,
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
>
|
|
485
|
-
<Text
|
|
486
|
-
allowFontScaling={false}
|
|
487
|
-
style={
|
|
488
|
-
Array [
|
|
489
|
-
Object {
|
|
490
|
-
"color": "#4d6265",
|
|
491
|
-
"fontFamily": "BeVietnamPro-Regular",
|
|
492
|
-
"fontSize": 14,
|
|
493
|
-
"letterSpacing": 0.48,
|
|
494
|
-
"lineHeight": 22,
|
|
495
|
-
},
|
|
496
|
-
Array [
|
|
497
|
-
Object {
|
|
498
|
-
"flex": 1,
|
|
499
|
-
"paddingRight": 12,
|
|
500
|
-
},
|
|
501
|
-
undefined,
|
|
502
|
-
],
|
|
503
|
-
]
|
|
504
|
-
}
|
|
505
|
-
themeIntent="subdued"
|
|
506
|
-
themeTypeface="neutral"
|
|
507
|
-
themeVariant="small"
|
|
508
|
-
>
|
|
509
|
-
Please agree to our privacy policy
|
|
510
|
-
</Text>
|
|
511
|
-
<View
|
|
512
|
-
style={
|
|
513
|
-
Array [
|
|
514
|
-
Object {
|
|
515
|
-
"height": 24,
|
|
516
|
-
"overflow": "hidden",
|
|
517
|
-
"width": 24,
|
|
518
|
-
},
|
|
519
|
-
undefined,
|
|
520
|
-
]
|
|
521
|
-
}
|
|
522
|
-
>
|
|
523
|
-
<View
|
|
524
|
-
style={
|
|
525
|
-
Array [
|
|
526
|
-
Object {
|
|
527
|
-
"borderColor": "#bfc1c5",
|
|
528
|
-
"borderRadius": 4,
|
|
529
|
-
"borderWidth": 2,
|
|
530
|
-
"flex": 1,
|
|
531
|
-
},
|
|
532
|
-
undefined,
|
|
533
|
-
]
|
|
534
|
-
}
|
|
535
|
-
themeState="disabled"
|
|
536
|
-
/>
|
|
537
|
-
</View>
|
|
538
|
-
</View>
|
|
539
|
-
`;
|
|
540
|
-
|
|
541
|
-
exports[`Checkbox renders correctly when disabled is true, withBorder is false and readonly is true 1`] = `
|
|
542
|
-
<View
|
|
543
|
-
accessibilityState={
|
|
544
|
-
Object {
|
|
545
|
-
"disabled": true,
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
accessible={true}
|
|
549
|
-
collapsable={false}
|
|
550
|
-
focusable={false}
|
|
551
|
-
onClick={[Function]}
|
|
552
|
-
onResponderGrant={[Function]}
|
|
553
|
-
onResponderMove={[Function]}
|
|
554
|
-
onResponderRelease={[Function]}
|
|
555
|
-
onResponderTerminate={[Function]}
|
|
556
|
-
onResponderTerminationRequest={[Function]}
|
|
557
|
-
onStartShouldSetResponder={[Function]}
|
|
558
|
-
style={
|
|
559
|
-
Object {
|
|
560
|
-
"flexDirection": "row",
|
|
561
|
-
"opacity": 1,
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
>
|
|
565
|
-
<Text
|
|
566
|
-
allowFontScaling={false}
|
|
567
|
-
style={
|
|
568
|
-
Array [
|
|
569
|
-
Object {
|
|
570
|
-
"color": "#4d6265",
|
|
571
|
-
"fontFamily": "BeVietnamPro-Regular",
|
|
572
|
-
"fontSize": 14,
|
|
573
|
-
"letterSpacing": 0.48,
|
|
574
|
-
"lineHeight": 22,
|
|
575
|
-
},
|
|
576
|
-
Array [
|
|
577
|
-
Object {
|
|
578
|
-
"flex": 1,
|
|
579
|
-
"paddingRight": 12,
|
|
580
|
-
},
|
|
581
|
-
undefined,
|
|
582
|
-
],
|
|
583
|
-
]
|
|
584
|
-
}
|
|
585
|
-
themeIntent="subdued"
|
|
586
|
-
themeTypeface="neutral"
|
|
587
|
-
themeVariant="small"
|
|
588
|
-
>
|
|
589
|
-
Please agree to our privacy policy
|
|
590
|
-
</Text>
|
|
591
|
-
<View
|
|
592
|
-
style={
|
|
593
|
-
Array [
|
|
594
|
-
Object {
|
|
595
|
-
"height": 24,
|
|
596
|
-
"overflow": "hidden",
|
|
597
|
-
"width": 24,
|
|
598
|
-
},
|
|
599
|
-
undefined,
|
|
600
|
-
]
|
|
601
|
-
}
|
|
602
|
-
>
|
|
603
|
-
<View
|
|
604
|
-
style={
|
|
605
|
-
Array [
|
|
606
|
-
Object {
|
|
607
|
-
"borderColor": "#bfc1c5",
|
|
608
|
-
"borderRadius": 4,
|
|
609
|
-
"borderWidth": 2,
|
|
610
|
-
"flex": 1,
|
|
611
|
-
},
|
|
612
|
-
undefined,
|
|
613
|
-
]
|
|
614
|
-
}
|
|
615
|
-
themeState="disabled"
|
|
616
|
-
/>
|
|
617
|
-
</View>
|
|
618
|
-
</View>
|
|
619
|
-
`;
|
|
620
|
-
|
|
621
|
-
exports[`Checkbox renders correctly when disabled is true, withBorder is true and readonly is false 1`] = `
|
|
309
|
+
exports[`Checkbox renders correctly when disabled is true and readonly is false 1`] = `
|
|
622
310
|
<View
|
|
623
311
|
accessibilityState={
|
|
624
312
|
Object {
|
|
@@ -702,7 +390,7 @@ exports[`Checkbox renders correctly when disabled is true, withBorder is true an
|
|
|
702
390
|
</View>
|
|
703
391
|
`;
|
|
704
392
|
|
|
705
|
-
exports[`Checkbox renders correctly when disabled is true
|
|
393
|
+
exports[`Checkbox renders correctly when disabled is true and readonly is true 1`] = `
|
|
706
394
|
<View
|
|
707
395
|
accessibilityState={
|
|
708
396
|
Object {
|
|
@@ -21,22 +21,17 @@ describe('getThemeState', () => {
|
|
|
21
21
|
|
|
22
22
|
describe('Checkbox', () => {
|
|
23
23
|
it.each`
|
|
24
|
-
|
|
25
|
-
${false}
|
|
26
|
-
${
|
|
27
|
-
${
|
|
28
|
-
${true}
|
|
29
|
-
${false} | ${false} | ${true}
|
|
30
|
-
${false} | ${true} | ${true}
|
|
31
|
-
${true} | ${false} | ${true}
|
|
32
|
-
${true} | ${true} | ${true}
|
|
24
|
+
disabled | readonly
|
|
25
|
+
${false} | ${false}
|
|
26
|
+
${true} | ${false}
|
|
27
|
+
${false} | ${true}
|
|
28
|
+
${true} | ${true}
|
|
33
29
|
`(
|
|
34
|
-
'renders correctly when disabled is $disabled
|
|
35
|
-
({ disabled,
|
|
30
|
+
'renders correctly when disabled is $disabled and readonly is $readonly',
|
|
31
|
+
({ disabled, readonly }) => {
|
|
36
32
|
const wrapper = renderWithTheme(
|
|
37
33
|
<Checkbox
|
|
38
34
|
disabled={disabled}
|
|
39
|
-
withBorder={withBorder}
|
|
40
35
|
readonly={readonly}
|
|
41
36
|
description="Please agree to our privacy policy"
|
|
42
37
|
/>
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
StyledDescription,
|
|
8
8
|
StyledWrapper,
|
|
9
9
|
} from './StyledCheckbox';
|
|
10
|
+
import { useDeprecation } from '../../utils/hooks';
|
|
10
11
|
|
|
11
12
|
export interface CheckboxProps {
|
|
12
13
|
/**
|
|
@@ -18,6 +19,7 @@ export interface CheckboxProps {
|
|
|
18
19
|
*/
|
|
19
20
|
description?: string;
|
|
20
21
|
/**
|
|
22
|
+
* @deprecated This prop will be removed in the next major release. Checkboxes will always have border.
|
|
21
23
|
* Whether the border is shown.
|
|
22
24
|
*/
|
|
23
25
|
withBorder?: boolean;
|
|
@@ -70,13 +72,17 @@ const Checkbox = ({
|
|
|
70
72
|
testID,
|
|
71
73
|
readonly = false,
|
|
72
74
|
}: CheckboxProps) => {
|
|
75
|
+
useDeprecation(
|
|
76
|
+
`Checkbox's withBorder prop will be removed in the next major release, all checkboxes will have border by default. Please remove it.`,
|
|
77
|
+
withBorder === true
|
|
78
|
+
);
|
|
79
|
+
|
|
73
80
|
const themeState = getThemeState({ disabled, readonly });
|
|
74
81
|
|
|
75
82
|
return (
|
|
76
83
|
<StyledWrapper
|
|
77
84
|
onPress={onPress}
|
|
78
85
|
disabled={disabled || readonly}
|
|
79
|
-
themeWithBorder={withBorder}
|
|
80
86
|
themeState={themeState}
|
|
81
87
|
style={style}
|
|
82
88
|
testID={testID}
|
|
@@ -66,7 +66,7 @@ exports[`Drawer renders correctly in invisible state 1`] = `
|
|
|
66
66
|
"overflow": "hidden",
|
|
67
67
|
"transform": Array [
|
|
68
68
|
Object {
|
|
69
|
-
"translateY": -
|
|
69
|
+
"translateY": -1334,
|
|
70
70
|
},
|
|
71
71
|
],
|
|
72
72
|
}
|
|
@@ -145,7 +145,7 @@ exports[`Drawer renders correctly in visible state 1`] = `
|
|
|
145
145
|
"overflow": "hidden",
|
|
146
146
|
"transform": Array [
|
|
147
147
|
Object {
|
|
148
|
-
"translateY":
|
|
148
|
+
"translateY": 0,
|
|
149
149
|
},
|
|
150
150
|
],
|
|
151
151
|
}
|
|
@@ -224,7 +224,7 @@ exports[`Drawer renders correctly with no backdrop 1`] = `
|
|
|
224
224
|
"overflow": "hidden",
|
|
225
225
|
"transform": Array [
|
|
226
226
|
Object {
|
|
227
|
-
"translateY": -
|
|
227
|
+
"translateY": -1334,
|
|
228
228
|
},
|
|
229
229
|
],
|
|
230
230
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
-
import { Animated, Easing } from 'react-native';
|
|
3
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { Animated, Dimensions, Easing } from 'react-native';
|
|
4
4
|
import DragableDrawer from './DragableDrawer';
|
|
5
5
|
|
|
6
6
|
import {
|
|
@@ -40,7 +40,7 @@ const Drawer = ({
|
|
|
40
40
|
testID,
|
|
41
41
|
}: DrawerProps): JSX.Element => {
|
|
42
42
|
const animatedValue = useRef(new Animated.Value(visible ? 1 : 0)).current;
|
|
43
|
-
const [height, setHeight] = useState(
|
|
43
|
+
const [height, setHeight] = useState(Dimensions.get('window').height);
|
|
44
44
|
|
|
45
45
|
const enableShadow = visible && !hasBackdrop;
|
|
46
46
|
|
|
@@ -44,7 +44,7 @@ exports[`ActionGroup has active false 1`] = `
|
|
|
44
44
|
"alignSelf": "flex-start",
|
|
45
45
|
"backgroundColor": "#401960",
|
|
46
46
|
"borderRadius": 999,
|
|
47
|
-
"elevation":
|
|
47
|
+
"elevation": 3,
|
|
48
48
|
"flexDirection": "row",
|
|
49
49
|
"justifyContent": "center",
|
|
50
50
|
"padding": 20,
|
|
@@ -54,7 +54,7 @@ exports[`ActionGroup has active false 1`] = `
|
|
|
54
54
|
"width": 0,
|
|
55
55
|
},
|
|
56
56
|
"shadowOpacity": 0.12,
|
|
57
|
-
"shadowRadius":
|
|
57
|
+
"shadowRadius": 4,
|
|
58
58
|
},
|
|
59
59
|
Array [
|
|
60
60
|
Array [
|
|
@@ -197,7 +197,7 @@ exports[`ActionGroup has active true 1`] = `
|
|
|
197
197
|
"alignSelf": "flex-start",
|
|
198
198
|
"backgroundColor": "#33144d",
|
|
199
199
|
"borderRadius": 999,
|
|
200
|
-
"elevation":
|
|
200
|
+
"elevation": 3,
|
|
201
201
|
"flexDirection": "row",
|
|
202
202
|
"justifyContent": "center",
|
|
203
203
|
"padding": 20,
|
|
@@ -207,7 +207,7 @@ exports[`ActionGroup has active true 1`] = `
|
|
|
207
207
|
"width": 0,
|
|
208
208
|
},
|
|
209
209
|
"shadowOpacity": 0.12,
|
|
210
|
-
"shadowRadius":
|
|
210
|
+
"shadowRadius": 4,
|
|
211
211
|
},
|
|
212
212
|
Array [
|
|
213
213
|
Array [
|
|
@@ -923,7 +923,7 @@ exports[`ActionGroup has active true 1`] = `
|
|
|
923
923
|
"alignSelf": "flex-start",
|
|
924
924
|
"backgroundColor": "#33144d",
|
|
925
925
|
"borderRadius": 999,
|
|
926
|
-
"elevation":
|
|
926
|
+
"elevation": 3,
|
|
927
927
|
"flexDirection": "row",
|
|
928
928
|
"justifyContent": "center",
|
|
929
929
|
"padding": 20,
|
|
@@ -933,7 +933,7 @@ exports[`ActionGroup has active true 1`] = `
|
|
|
933
933
|
"width": 0,
|
|
934
934
|
},
|
|
935
935
|
"shadowOpacity": 0.12,
|
|
936
|
-
"shadowRadius":
|
|
936
|
+
"shadowRadius": 4,
|
|
937
937
|
},
|
|
938
938
|
Array [
|
|
939
939
|
Array [
|
|
@@ -21,7 +21,7 @@ const StyledFAB = styled(TouchableHighlight)<
|
|
|
21
21
|
padding: theme.__hd__.fab.space.containerPadding,
|
|
22
22
|
flexDirection: 'row',
|
|
23
23
|
elevation: theme.__hd__.fab.shadows.elevation,
|
|
24
|
-
shadowColor: theme.__hd__.fab.
|
|
24
|
+
shadowColor: theme.__hd__.fab.shadows.color,
|
|
25
25
|
shadowOffset: theme.__hd__.fab.shadows.offset,
|
|
26
26
|
shadowRadius: theme.__hd__.fab.shadows.radius,
|
|
27
27
|
shadowOpacity: theme.__hd__.fab.shadows.opacity,
|
|
@@ -18,7 +18,7 @@ exports[`StyledFAB renders correctly 1`] = `
|
|
|
18
18
|
"alignSelf": "flex-start",
|
|
19
19
|
"backgroundColor": "#401960",
|
|
20
20
|
"borderRadius": 999,
|
|
21
|
-
"elevation":
|
|
21
|
+
"elevation": 3,
|
|
22
22
|
"flexDirection": "row",
|
|
23
23
|
"justifyContent": "center",
|
|
24
24
|
"padding": 20,
|
|
@@ -28,7 +28,7 @@ exports[`StyledFAB renders correctly 1`] = `
|
|
|
28
28
|
"width": 0,
|
|
29
29
|
},
|
|
30
30
|
"shadowOpacity": 0.12,
|
|
31
|
-
"shadowRadius":
|
|
31
|
+
"shadowRadius": 4,
|
|
32
32
|
},
|
|
33
33
|
undefined,
|
|
34
34
|
]
|
|
@@ -75,7 +75,7 @@ exports[`StyledFAB renders correctly 2`] = `
|
|
|
75
75
|
"alignSelf": "flex-start",
|
|
76
76
|
"backgroundColor": "#33144d",
|
|
77
77
|
"borderRadius": 999,
|
|
78
|
-
"elevation":
|
|
78
|
+
"elevation": 3,
|
|
79
79
|
"flexDirection": "row",
|
|
80
80
|
"justifyContent": "center",
|
|
81
81
|
"padding": 20,
|
|
@@ -85,7 +85,7 @@ exports[`StyledFAB renders correctly 2`] = `
|
|
|
85
85
|
"width": 0,
|
|
86
86
|
},
|
|
87
87
|
"shadowOpacity": 0.12,
|
|
88
|
-
"shadowRadius":
|
|
88
|
+
"shadowRadius": 4,
|
|
89
89
|
},
|
|
90
90
|
undefined,
|
|
91
91
|
]
|