@hero-design/rn 7.22.1 → 7.22.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 +2 -2
- package/es/index.js +309 -284
- package/lib/index.js +309 -284
- package/package.json +4 -4
- package/src/components/Accordion/AccordionItem.tsx +1 -1
- package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +8 -8
- package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +12 -12
- package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +3 -3
- package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +2 -2
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +24 -24
- package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +6 -6
- package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +3 -3
- package/src/components/Card/DataCard/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +1 -1
- package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +2 -2
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +5 -5
- package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +4 -18
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +5 -19
- package/src/components/Drawer/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +10 -10
- package/src/components/Icon/HeroIcon/index.tsx +2 -0
- package/src/components/Icon/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Icon/index.tsx +1 -0
- package/src/components/List/StyledBasicListItem.tsx +1 -0
- package/src/components/List/__tests__/BasicListItem.spec.tsx +37 -13
- package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +163 -2
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +12 -12
- package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +6 -2
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +4 -4
- package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +6 -6
- package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +21 -21
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +5 -5
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +3 -1
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +4 -1
- package/src/components/RichTextEditor/RichTextEditor.tsx +1 -3
- package/src/components/RichTextEditor/__tests__/EditorToolbar.spec.tsx +1 -1
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +10 -38
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +2 -1
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +25 -9
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +66 -108
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +2 -1
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +24 -8
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +57 -99
- package/src/components/Select/__tests__/__snapshots__/StyledSelect.spec.tsx.snap +1 -1
- package/src/components/Slider/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/Spinner/StyledSpinner.tsx +8 -4
- package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +8 -4
- package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +32 -16
- package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +8 -4
- package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +3 -3
- package/src/components/Tabs/ScrollableTabs.tsx +2 -5
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +1 -1
- package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +1 -1
- package/src/components/TextInput/StyledTextInput.tsx +11 -16
- package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +3 -3
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +28 -46
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +67 -249
- package/src/components/TextInput/index.tsx +27 -27
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +4 -18
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +5 -19
- package/src/components/Toast/ToastProvider.tsx +2 -4
- package/src/components/Toast/__tests__/index.spec.tsx +138 -0
- package/src/components/Toolbar/ToolbarItem.tsx +1 -1
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +12 -12
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +6 -6
- package/src/components/Typography/Text/StyledText.tsx +1 -0
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +3 -3
- package/src/components/Typography/Text/index.tsx +1 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +93 -84
- package/src/theme/components/accordion.ts +1 -1
- package/src/theme/components/alert.ts +4 -4
- package/src/theme/components/avatar.ts +2 -2
- package/src/theme/components/badge.ts +6 -6
- package/src/theme/components/bottomNavigation.ts +2 -2
- package/src/theme/components/bottomSheet.ts +3 -3
- package/src/theme/components/button.ts +20 -20
- package/src/theme/components/calendar.ts +4 -4
- package/src/theme/components/card.ts +5 -5
- package/src/theme/components/checkbox.ts +1 -1
- package/src/theme/components/divider.ts +1 -1
- package/src/theme/components/drawer.ts +4 -4
- package/src/theme/components/empty.ts +3 -4
- package/src/theme/components/fab.ts +7 -7
- package/src/theme/components/icon.ts +4 -3
- package/src/theme/components/list.ts +8 -6
- package/src/theme/components/pinInput.ts +4 -4
- package/src/theme/components/progress.ts +3 -3
- package/src/theme/components/richTextEditor.ts +3 -3
- package/src/theme/components/sectionHeading.ts +1 -1
- package/src/theme/components/select.ts +1 -1
- package/src/theme/components/slider.ts +3 -3
- package/src/theme/components/spinner.ts +1 -4
- package/src/theme/components/switch.ts +7 -7
- package/src/theme/components/tabs.ts +5 -5
- package/src/theme/components/tag.ts +12 -12
- package/src/theme/components/textInput.ts +38 -38
- package/src/theme/components/toast.ts +6 -6
- package/src/theme/components/toolbar.ts +3 -2
- package/src/theme/components/typography.ts +4 -3
- package/src/theme/global/colors/global.ts +32 -0
- package/src/theme/global/colors/legacySystemPalette.ts +53 -0
- package/src/theme/global/colors/swag.ts +21 -34
- package/src/theme/global/colors/types.ts +46 -26
- package/src/theme/global/colors/work.ts +10 -9
- package/types/components/Icon/HeroIcon/index.d.ts +1 -1
- package/types/components/Icon/index.d.ts +1 -1
- package/types/components/TextInput/StyledTextInput.d.ts +3 -9
- package/types/components/TextInput/index.d.ts +4 -4
- package/types/components/Toast/__tests__/index.spec.d.ts +1 -0
- package/types/components/Toolbar/ToolbarItem.d.ts +1 -1
- package/types/components/Typography/Text/StyledText.d.ts +1 -1
- package/types/components/Typography/Text/index.d.ts +1 -1
- package/types/theme/components/empty.d.ts +0 -1
- package/types/theme/components/icon.d.ts +1 -0
- package/types/theme/components/list.d.ts +1 -0
- package/types/theme/components/spinner.d.ts +1 -4
- package/types/theme/components/toolbar.d.ts +1 -0
- package/types/theme/components/typography.d.ts +1 -0
- package/types/theme/global/colors/global.d.ts +3 -0
- package/types/theme/global/colors/legacySystemPalette.d.ts +3 -0
- package/types/theme/global/colors/types.d.ts +41 -20
- package/types/theme/global/index.d.ts +28 -19
|
@@ -30,21 +30,25 @@ const StyledSpinnerDot = styled(View)<{
|
|
|
30
30
|
switch (themePosition) {
|
|
31
31
|
case 'topLeft':
|
|
32
32
|
return {
|
|
33
|
-
backgroundColor: theme.__hd__.spinner.colors.
|
|
33
|
+
backgroundColor: theme.__hd__.spinner.colors.dot,
|
|
34
|
+
opacity: 1,
|
|
34
35
|
};
|
|
35
36
|
case 'topRight':
|
|
36
37
|
return {
|
|
37
38
|
marginLeft: theme.__hd__.spinner.space.spinnerDotPadding[themeSize],
|
|
38
|
-
backgroundColor: theme.__hd__.spinner.colors.
|
|
39
|
+
backgroundColor: theme.__hd__.spinner.colors.dot,
|
|
40
|
+
opacity: 0.75,
|
|
39
41
|
};
|
|
40
42
|
case 'bottomLeft':
|
|
41
43
|
return {
|
|
42
|
-
backgroundColor: theme.__hd__.spinner.colors.
|
|
44
|
+
backgroundColor: theme.__hd__.spinner.colors.dot,
|
|
45
|
+
opacity: 0.5,
|
|
43
46
|
};
|
|
44
47
|
case 'bottomRight':
|
|
45
48
|
return {
|
|
46
49
|
marginLeft: theme.__hd__.spinner.space.spinnerDotPadding[themeSize],
|
|
47
|
-
backgroundColor: theme.__hd__.spinner.colors.
|
|
50
|
+
backgroundColor: theme.__hd__.spinner.colors.dot,
|
|
51
|
+
opacity: 0.25,
|
|
48
52
|
};
|
|
49
53
|
}
|
|
50
54
|
};
|
|
@@ -35,9 +35,10 @@ exports[`AnimatedSpinner renders correctly 1`] = `
|
|
|
35
35
|
style={
|
|
36
36
|
Array [
|
|
37
37
|
Object {
|
|
38
|
-
"backgroundColor": "#
|
|
38
|
+
"backgroundColor": "#001f23",
|
|
39
39
|
"borderRadius": 999,
|
|
40
40
|
"height": 16,
|
|
41
|
+
"opacity": 1,
|
|
41
42
|
"width": 16,
|
|
42
43
|
},
|
|
43
44
|
Object {},
|
|
@@ -52,10 +53,11 @@ exports[`AnimatedSpinner renders correctly 1`] = `
|
|
|
52
53
|
style={
|
|
53
54
|
Array [
|
|
54
55
|
Object {
|
|
55
|
-
"backgroundColor": "#
|
|
56
|
+
"backgroundColor": "#001f23",
|
|
56
57
|
"borderRadius": 999,
|
|
57
58
|
"height": 16,
|
|
58
59
|
"marginLeft": 8,
|
|
60
|
+
"opacity": 0.75,
|
|
59
61
|
"width": 16,
|
|
60
62
|
},
|
|
61
63
|
Object {},
|
|
@@ -86,9 +88,10 @@ exports[`AnimatedSpinner renders correctly 1`] = `
|
|
|
86
88
|
style={
|
|
87
89
|
Array [
|
|
88
90
|
Object {
|
|
89
|
-
"backgroundColor": "#
|
|
91
|
+
"backgroundColor": "#001f23",
|
|
90
92
|
"borderRadius": 999,
|
|
91
93
|
"height": 16,
|
|
94
|
+
"opacity": 0.5,
|
|
92
95
|
"width": 16,
|
|
93
96
|
},
|
|
94
97
|
Object {},
|
|
@@ -103,10 +106,11 @@ exports[`AnimatedSpinner renders correctly 1`] = `
|
|
|
103
106
|
style={
|
|
104
107
|
Array [
|
|
105
108
|
Object {
|
|
106
|
-
"backgroundColor": "#
|
|
109
|
+
"backgroundColor": "#001f23",
|
|
107
110
|
"borderRadius": 999,
|
|
108
111
|
"height": 16,
|
|
109
112
|
"marginLeft": 8,
|
|
113
|
+
"opacity": 0.25,
|
|
110
114
|
"width": 16,
|
|
111
115
|
},
|
|
112
116
|
Object {},
|
|
@@ -47,9 +47,10 @@ exports[`StyledSpinnerContainer renders correctly in medium size 1`] = `
|
|
|
47
47
|
style={
|
|
48
48
|
Array [
|
|
49
49
|
Object {
|
|
50
|
-
"backgroundColor": "#
|
|
50
|
+
"backgroundColor": "#001f23",
|
|
51
51
|
"borderRadius": 999,
|
|
52
52
|
"height": 16,
|
|
53
|
+
"opacity": 1,
|
|
53
54
|
"width": 16,
|
|
54
55
|
},
|
|
55
56
|
Object {},
|
|
@@ -64,10 +65,11 @@ exports[`StyledSpinnerContainer renders correctly in medium size 1`] = `
|
|
|
64
65
|
style={
|
|
65
66
|
Array [
|
|
66
67
|
Object {
|
|
67
|
-
"backgroundColor": "#
|
|
68
|
+
"backgroundColor": "#001f23",
|
|
68
69
|
"borderRadius": 999,
|
|
69
70
|
"height": 16,
|
|
70
71
|
"marginLeft": 8,
|
|
72
|
+
"opacity": 0.75,
|
|
71
73
|
"width": 16,
|
|
72
74
|
},
|
|
73
75
|
Object {},
|
|
@@ -98,9 +100,10 @@ exports[`StyledSpinnerContainer renders correctly in medium size 1`] = `
|
|
|
98
100
|
style={
|
|
99
101
|
Array [
|
|
100
102
|
Object {
|
|
101
|
-
"backgroundColor": "#
|
|
103
|
+
"backgroundColor": "#001f23",
|
|
102
104
|
"borderRadius": 999,
|
|
103
105
|
"height": 16,
|
|
106
|
+
"opacity": 0.5,
|
|
104
107
|
"width": 16,
|
|
105
108
|
},
|
|
106
109
|
Object {},
|
|
@@ -115,10 +118,11 @@ exports[`StyledSpinnerContainer renders correctly in medium size 1`] = `
|
|
|
115
118
|
style={
|
|
116
119
|
Array [
|
|
117
120
|
Object {
|
|
118
|
-
"backgroundColor": "#
|
|
121
|
+
"backgroundColor": "#001f23",
|
|
119
122
|
"borderRadius": 999,
|
|
120
123
|
"height": 16,
|
|
121
124
|
"marginLeft": 8,
|
|
125
|
+
"opacity": 0.25,
|
|
122
126
|
"width": 16,
|
|
123
127
|
},
|
|
124
128
|
Object {},
|
|
@@ -179,9 +183,10 @@ exports[`StyledSpinnerContainer renders correctly in small size 1`] = `
|
|
|
179
183
|
style={
|
|
180
184
|
Array [
|
|
181
185
|
Object {
|
|
182
|
-
"backgroundColor": "#
|
|
186
|
+
"backgroundColor": "#001f23",
|
|
183
187
|
"borderRadius": 999,
|
|
184
188
|
"height": 8,
|
|
189
|
+
"opacity": 1,
|
|
185
190
|
"width": 8,
|
|
186
191
|
},
|
|
187
192
|
Object {},
|
|
@@ -196,10 +201,11 @@ exports[`StyledSpinnerContainer renders correctly in small size 1`] = `
|
|
|
196
201
|
style={
|
|
197
202
|
Array [
|
|
198
203
|
Object {
|
|
199
|
-
"backgroundColor": "#
|
|
204
|
+
"backgroundColor": "#001f23",
|
|
200
205
|
"borderRadius": 999,
|
|
201
206
|
"height": 8,
|
|
202
207
|
"marginLeft": 4,
|
|
208
|
+
"opacity": 0.75,
|
|
203
209
|
"width": 8,
|
|
204
210
|
},
|
|
205
211
|
Object {},
|
|
@@ -230,9 +236,10 @@ exports[`StyledSpinnerContainer renders correctly in small size 1`] = `
|
|
|
230
236
|
style={
|
|
231
237
|
Array [
|
|
232
238
|
Object {
|
|
233
|
-
"backgroundColor": "#
|
|
239
|
+
"backgroundColor": "#001f23",
|
|
234
240
|
"borderRadius": 999,
|
|
235
241
|
"height": 8,
|
|
242
|
+
"opacity": 0.5,
|
|
236
243
|
"width": 8,
|
|
237
244
|
},
|
|
238
245
|
Object {},
|
|
@@ -247,10 +254,11 @@ exports[`StyledSpinnerContainer renders correctly in small size 1`] = `
|
|
|
247
254
|
style={
|
|
248
255
|
Array [
|
|
249
256
|
Object {
|
|
250
|
-
"backgroundColor": "#
|
|
257
|
+
"backgroundColor": "#001f23",
|
|
251
258
|
"borderRadius": 999,
|
|
252
259
|
"height": 8,
|
|
253
260
|
"marginLeft": 4,
|
|
261
|
+
"opacity": 0.25,
|
|
254
262
|
"width": 8,
|
|
255
263
|
},
|
|
256
264
|
Object {},
|
|
@@ -333,9 +341,10 @@ exports[`StyledSpinnerText renders correctly when position is bottomLeft, size i
|
|
|
333
341
|
style={
|
|
334
342
|
Array [
|
|
335
343
|
Object {
|
|
336
|
-
"backgroundColor": "#
|
|
344
|
+
"backgroundColor": "#001f23",
|
|
337
345
|
"borderRadius": 999,
|
|
338
346
|
"height": 16,
|
|
347
|
+
"opacity": 0.5,
|
|
339
348
|
"width": 16,
|
|
340
349
|
},
|
|
341
350
|
undefined,
|
|
@@ -351,9 +360,10 @@ exports[`StyledSpinnerText renders correctly when position is bottomLeft, size i
|
|
|
351
360
|
style={
|
|
352
361
|
Array [
|
|
353
362
|
Object {
|
|
354
|
-
"backgroundColor": "#
|
|
363
|
+
"backgroundColor": "#001f23",
|
|
355
364
|
"borderRadius": 999,
|
|
356
365
|
"height": 8,
|
|
366
|
+
"opacity": 0.5,
|
|
357
367
|
"width": 8,
|
|
358
368
|
},
|
|
359
369
|
undefined,
|
|
@@ -369,10 +379,11 @@ exports[`StyledSpinnerText renders correctly when position is bottomRight, size
|
|
|
369
379
|
style={
|
|
370
380
|
Array [
|
|
371
381
|
Object {
|
|
372
|
-
"backgroundColor": "#
|
|
382
|
+
"backgroundColor": "#001f23",
|
|
373
383
|
"borderRadius": 999,
|
|
374
384
|
"height": 16,
|
|
375
385
|
"marginLeft": 8,
|
|
386
|
+
"opacity": 0.25,
|
|
376
387
|
"width": 16,
|
|
377
388
|
},
|
|
378
389
|
undefined,
|
|
@@ -388,10 +399,11 @@ exports[`StyledSpinnerText renders correctly when position is bottomRight, size
|
|
|
388
399
|
style={
|
|
389
400
|
Array [
|
|
390
401
|
Object {
|
|
391
|
-
"backgroundColor": "#
|
|
402
|
+
"backgroundColor": "#001f23",
|
|
392
403
|
"borderRadius": 999,
|
|
393
404
|
"height": 8,
|
|
394
405
|
"marginLeft": 4,
|
|
406
|
+
"opacity": 0.25,
|
|
395
407
|
"width": 8,
|
|
396
408
|
},
|
|
397
409
|
undefined,
|
|
@@ -407,9 +419,10 @@ exports[`StyledSpinnerText renders correctly when position is topLeft, size is m
|
|
|
407
419
|
style={
|
|
408
420
|
Array [
|
|
409
421
|
Object {
|
|
410
|
-
"backgroundColor": "#
|
|
422
|
+
"backgroundColor": "#001f23",
|
|
411
423
|
"borderRadius": 999,
|
|
412
424
|
"height": 16,
|
|
425
|
+
"opacity": 1,
|
|
413
426
|
"width": 16,
|
|
414
427
|
},
|
|
415
428
|
undefined,
|
|
@@ -425,9 +438,10 @@ exports[`StyledSpinnerText renders correctly when position is topLeft, size is s
|
|
|
425
438
|
style={
|
|
426
439
|
Array [
|
|
427
440
|
Object {
|
|
428
|
-
"backgroundColor": "#
|
|
441
|
+
"backgroundColor": "#001f23",
|
|
429
442
|
"borderRadius": 999,
|
|
430
443
|
"height": 8,
|
|
444
|
+
"opacity": 1,
|
|
431
445
|
"width": 8,
|
|
432
446
|
},
|
|
433
447
|
undefined,
|
|
@@ -443,10 +457,11 @@ exports[`StyledSpinnerText renders correctly when position is topRight, size is
|
|
|
443
457
|
style={
|
|
444
458
|
Array [
|
|
445
459
|
Object {
|
|
446
|
-
"backgroundColor": "#
|
|
460
|
+
"backgroundColor": "#001f23",
|
|
447
461
|
"borderRadius": 999,
|
|
448
462
|
"height": 16,
|
|
449
463
|
"marginLeft": 8,
|
|
464
|
+
"opacity": 0.75,
|
|
450
465
|
"width": 16,
|
|
451
466
|
},
|
|
452
467
|
undefined,
|
|
@@ -462,10 +477,11 @@ exports[`StyledSpinnerText renders correctly when position is topRight, size is
|
|
|
462
477
|
style={
|
|
463
478
|
Array [
|
|
464
479
|
Object {
|
|
465
|
-
"backgroundColor": "#
|
|
480
|
+
"backgroundColor": "#001f23",
|
|
466
481
|
"borderRadius": 999,
|
|
467
482
|
"height": 8,
|
|
468
483
|
"marginLeft": 4,
|
|
484
|
+
"opacity": 0.75,
|
|
469
485
|
"width": 8,
|
|
470
486
|
},
|
|
471
487
|
undefined,
|
|
@@ -56,9 +56,10 @@ exports[`Spinner renders correctly 1`] = `
|
|
|
56
56
|
style={
|
|
57
57
|
Array [
|
|
58
58
|
Object {
|
|
59
|
-
"backgroundColor": "#
|
|
59
|
+
"backgroundColor": "#001f23",
|
|
60
60
|
"borderRadius": 999,
|
|
61
61
|
"height": 16,
|
|
62
|
+
"opacity": 1,
|
|
62
63
|
"width": 16,
|
|
63
64
|
},
|
|
64
65
|
Object {},
|
|
@@ -73,10 +74,11 @@ exports[`Spinner renders correctly 1`] = `
|
|
|
73
74
|
style={
|
|
74
75
|
Array [
|
|
75
76
|
Object {
|
|
76
|
-
"backgroundColor": "#
|
|
77
|
+
"backgroundColor": "#001f23",
|
|
77
78
|
"borderRadius": 999,
|
|
78
79
|
"height": 16,
|
|
79
80
|
"marginLeft": 8,
|
|
81
|
+
"opacity": 0.75,
|
|
80
82
|
"width": 16,
|
|
81
83
|
},
|
|
82
84
|
Object {},
|
|
@@ -107,9 +109,10 @@ exports[`Spinner renders correctly 1`] = `
|
|
|
107
109
|
style={
|
|
108
110
|
Array [
|
|
109
111
|
Object {
|
|
110
|
-
"backgroundColor": "#
|
|
112
|
+
"backgroundColor": "#001f23",
|
|
111
113
|
"borderRadius": 999,
|
|
112
114
|
"height": 16,
|
|
115
|
+
"opacity": 0.5,
|
|
113
116
|
"width": 16,
|
|
114
117
|
},
|
|
115
118
|
Object {},
|
|
@@ -124,10 +127,11 @@ exports[`Spinner renders correctly 1`] = `
|
|
|
124
127
|
style={
|
|
125
128
|
Array [
|
|
126
129
|
Object {
|
|
127
|
-
"backgroundColor": "#
|
|
130
|
+
"backgroundColor": "#001f23",
|
|
128
131
|
"borderRadius": 999,
|
|
129
132
|
"height": 16,
|
|
130
133
|
"marginLeft": 8,
|
|
134
|
+
"opacity": 0.25,
|
|
131
135
|
"width": 16,
|
|
132
136
|
},
|
|
133
137
|
Object {},
|
|
@@ -21,7 +21,7 @@ exports[`StyledWrapper renders correct style with variant checked 1`] = `
|
|
|
21
21
|
style={
|
|
22
22
|
Array [
|
|
23
23
|
Object {
|
|
24
|
-
"backgroundColor": "#
|
|
24
|
+
"backgroundColor": "#401960",
|
|
25
25
|
"borderRadius": 999,
|
|
26
26
|
"display": "flex",
|
|
27
27
|
"height": 32,
|
|
@@ -42,7 +42,7 @@ exports[`StyledWrapper renders correct style with variant disabled-checked 1`] =
|
|
|
42
42
|
style={
|
|
43
43
|
Array [
|
|
44
44
|
Object {
|
|
45
|
-
"backgroundColor": "#
|
|
45
|
+
"backgroundColor": "#a08cb0",
|
|
46
46
|
"borderRadius": 999,
|
|
47
47
|
"display": "flex",
|
|
48
48
|
"height": 32,
|
|
@@ -63,7 +63,7 @@ exports[`StyledWrapper renders correct style with variant disabled-unchecked 1`]
|
|
|
63
63
|
style={
|
|
64
64
|
Array [
|
|
65
65
|
Object {
|
|
66
|
-
"backgroundColor": "#
|
|
66
|
+
"backgroundColor": "#bfc1c5",
|
|
67
67
|
"borderRadius": 999,
|
|
68
68
|
"display": "flex",
|
|
69
69
|
"height": 32,
|
|
@@ -101,12 +101,9 @@ const ScrollableTab = ({
|
|
|
101
101
|
|
|
102
102
|
return (
|
|
103
103
|
<TabContainer style={containerStyle} testID={componentTestID}>
|
|
104
|
-
<HeaderTabWrapper
|
|
105
|
-
themeInsets={insets}
|
|
106
|
-
style={barStyle}
|
|
107
|
-
testID={componentTestID ? `${componentTestID}-tab-bar` : undefined}
|
|
108
|
-
>
|
|
104
|
+
<HeaderTabWrapper themeInsets={insets} style={barStyle}>
|
|
109
105
|
<FlatList<TabType>
|
|
106
|
+
testID={componentTestID ? `${componentTestID}-tab-bar` : undefined}
|
|
110
107
|
ref={flatListRef}
|
|
111
108
|
horizontal
|
|
112
109
|
data={tabs}
|
|
@@ -10,9 +10,19 @@ export type Variant =
|
|
|
10
10
|
| 'readonly'
|
|
11
11
|
| 'error';
|
|
12
12
|
|
|
13
|
-
const StyledContainer = styled(View)
|
|
13
|
+
const StyledContainer = styled(View)<{
|
|
14
|
+
themeVariant: Variant;
|
|
15
|
+
}>(({ theme, themeVariant }) => ({
|
|
14
16
|
width: '100%',
|
|
15
17
|
marginVertical: theme.__hd__.textInput.space.containerMarginVertical,
|
|
18
|
+
borderWidth:
|
|
19
|
+
themeVariant === 'focused'
|
|
20
|
+
? theme.__hd__.textInput.borderWidths.container.focused
|
|
21
|
+
: theme.__hd__.textInput.borderWidths.container.normal,
|
|
22
|
+
borderRadius: theme.__hd__.textInput.radii.container,
|
|
23
|
+
borderColor:
|
|
24
|
+
theme.__hd__.textInput.colors.borders[themeVariant] ??
|
|
25
|
+
theme.__hd__.textInput.colors.borders.default,
|
|
16
26
|
}));
|
|
17
27
|
|
|
18
28
|
const StyledLabelContainer = styled(View)(({ theme }) => ({
|
|
@@ -97,20 +107,6 @@ const StyledTextInput = styled(TextInput)(({ theme }) => ({
|
|
|
97
107
|
marginHorizontal: theme.__hd__.textInput.space.inputHorizontalMargin,
|
|
98
108
|
}));
|
|
99
109
|
|
|
100
|
-
const StyledBorderBackDrop = styled(View)<{
|
|
101
|
-
themeVariant: Variant;
|
|
102
|
-
}>(({ theme, themeVariant }) => ({
|
|
103
|
-
...StyleSheet.absoluteFillObject,
|
|
104
|
-
borderWidth:
|
|
105
|
-
themeVariant === 'focused'
|
|
106
|
-
? theme.__hd__.textInput.borderWidths.container.focused
|
|
107
|
-
: theme.__hd__.textInput.borderWidths.container.normal,
|
|
108
|
-
borderRadius: theme.__hd__.textInput.radii.container,
|
|
109
|
-
borderColor:
|
|
110
|
-
theme.__hd__.textInput.colors.borders[themeVariant] ??
|
|
111
|
-
theme.__hd__.textInput.colors.borders.default,
|
|
112
|
-
}));
|
|
113
|
-
|
|
114
110
|
const StyledTextInputContainer = styled(View)(({ theme }) => ({
|
|
115
111
|
flexDirection: 'row',
|
|
116
112
|
alignItems: 'center',
|
|
@@ -151,6 +147,5 @@ export {
|
|
|
151
147
|
StyledTextInputAndLabelContainer,
|
|
152
148
|
StyledLabelContainerInsideTextInput,
|
|
153
149
|
StyledErrorAndHelpTextContainer,
|
|
154
|
-
StyledBorderBackDrop,
|
|
155
150
|
StyledErrorAndMaxLengthContainer,
|
|
156
151
|
};
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
StyledAsteriskLabel,
|
|
11
11
|
StyledLabelContainer,
|
|
12
12
|
StyledLabelInsideTextInput,
|
|
13
|
-
|
|
13
|
+
StyledContainer,
|
|
14
14
|
} from '../StyledTextInput';
|
|
15
15
|
|
|
16
16
|
describe('Label', () => {
|
|
@@ -133,7 +133,7 @@ describe('StyledHelperText', () => {
|
|
|
133
133
|
});
|
|
134
134
|
});
|
|
135
135
|
|
|
136
|
-
describe('
|
|
136
|
+
describe('StyledContainer', () => {
|
|
137
137
|
it.each`
|
|
138
138
|
themeVariant
|
|
139
139
|
${'default'}
|
|
@@ -146,7 +146,7 @@ describe('StyledBorderBackDrop', () => {
|
|
|
146
146
|
'renders correctly with themeVariant $themeVariant',
|
|
147
147
|
({ themeVariant }): void => {
|
|
148
148
|
const { toJSON } = renderWithTheme(
|
|
149
|
-
<
|
|
149
|
+
<StyledContainer themeVariant={themeVariant} />
|
|
150
150
|
);
|
|
151
151
|
|
|
152
152
|
expect(toJSON()).toMatchSnapshot();
|
|
@@ -153,7 +153,7 @@ exports[`Label renders correctly with themeVariant readonly 1`] = `
|
|
|
153
153
|
},
|
|
154
154
|
Array [
|
|
155
155
|
Object {
|
|
156
|
-
"color": "#
|
|
156
|
+
"color": "#bfc1c5",
|
|
157
157
|
},
|
|
158
158
|
undefined,
|
|
159
159
|
],
|
|
@@ -362,7 +362,7 @@ exports[`LabelInsideTextInput renders correctly with themeVariant readonly 1`] =
|
|
|
362
362
|
Object {
|
|
363
363
|
"alignContent": "center",
|
|
364
364
|
"alignItems": "center",
|
|
365
|
-
"color": "#
|
|
365
|
+
"color": "#bfc1c5",
|
|
366
366
|
"fontSize": 14,
|
|
367
367
|
"textAlignVertical": "center",
|
|
368
368
|
},
|
|
@@ -392,7 +392,7 @@ exports[`StyledAsteriskLabel renders correctly with themeVariant default 1`] = `
|
|
|
392
392
|
},
|
|
393
393
|
Array [
|
|
394
394
|
Object {
|
|
395
|
-
"color": "#
|
|
395
|
+
"color": "#f46363",
|
|
396
396
|
},
|
|
397
397
|
undefined,
|
|
398
398
|
],
|
|
@@ -448,7 +448,7 @@ exports[`StyledAsteriskLabel renders correctly with themeVariant error 1`] = `
|
|
|
448
448
|
},
|
|
449
449
|
Array [
|
|
450
450
|
Object {
|
|
451
|
-
"color": "#
|
|
451
|
+
"color": "#f46363",
|
|
452
452
|
},
|
|
453
453
|
undefined,
|
|
454
454
|
],
|
|
@@ -476,7 +476,7 @@ exports[`StyledAsteriskLabel renders correctly with themeVariant filled 1`] = `
|
|
|
476
476
|
},
|
|
477
477
|
Array [
|
|
478
478
|
Object {
|
|
479
|
-
"color": "#
|
|
479
|
+
"color": "#f46363",
|
|
480
480
|
},
|
|
481
481
|
undefined,
|
|
482
482
|
],
|
|
@@ -504,7 +504,7 @@ exports[`StyledAsteriskLabel renders correctly with themeVariant focused 1`] = `
|
|
|
504
504
|
},
|
|
505
505
|
Array [
|
|
506
506
|
Object {
|
|
507
|
-
"color": "#
|
|
507
|
+
"color": "#f46363",
|
|
508
508
|
},
|
|
509
509
|
undefined,
|
|
510
510
|
],
|
|
@@ -547,7 +547,7 @@ exports[`StyledAsteriskLabel renders correctly with themeVariant readonly 1`] =
|
|
|
547
547
|
</Text>
|
|
548
548
|
`;
|
|
549
549
|
|
|
550
|
-
exports[`
|
|
550
|
+
exports[`StyledContainer renders correctly with themeVariant default 1`] = `
|
|
551
551
|
<View
|
|
552
552
|
style={
|
|
553
553
|
Array [
|
|
@@ -555,11 +555,8 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant default 1`] =
|
|
|
555
555
|
"borderColor": "#001f23",
|
|
556
556
|
"borderRadius": 8,
|
|
557
557
|
"borderWidth": 1,
|
|
558
|
-
"
|
|
559
|
-
"
|
|
560
|
-
"position": "absolute",
|
|
561
|
-
"right": 0,
|
|
562
|
-
"top": 0,
|
|
558
|
+
"marginVertical": 8,
|
|
559
|
+
"width": "100%",
|
|
563
560
|
},
|
|
564
561
|
undefined,
|
|
565
562
|
]
|
|
@@ -568,7 +565,7 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant default 1`] =
|
|
|
568
565
|
/>
|
|
569
566
|
`;
|
|
570
567
|
|
|
571
|
-
exports[`
|
|
568
|
+
exports[`StyledContainer renders correctly with themeVariant disabled 1`] = `
|
|
572
569
|
<View
|
|
573
570
|
style={
|
|
574
571
|
Array [
|
|
@@ -576,11 +573,8 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant disabled 1`] =
|
|
|
576
573
|
"borderColor": "#bfc1c5",
|
|
577
574
|
"borderRadius": 8,
|
|
578
575
|
"borderWidth": 1,
|
|
579
|
-
"
|
|
580
|
-
"
|
|
581
|
-
"position": "absolute",
|
|
582
|
-
"right": 0,
|
|
583
|
-
"top": 0,
|
|
576
|
+
"marginVertical": 8,
|
|
577
|
+
"width": "100%",
|
|
584
578
|
},
|
|
585
579
|
undefined,
|
|
586
580
|
]
|
|
@@ -589,19 +583,16 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant disabled 1`] =
|
|
|
589
583
|
/>
|
|
590
584
|
`;
|
|
591
585
|
|
|
592
|
-
exports[`
|
|
586
|
+
exports[`StyledContainer renders correctly with themeVariant error 1`] = `
|
|
593
587
|
<View
|
|
594
588
|
style={
|
|
595
589
|
Array [
|
|
596
590
|
Object {
|
|
597
|
-
"borderColor": "#
|
|
591
|
+
"borderColor": "#f46363",
|
|
598
592
|
"borderRadius": 8,
|
|
599
593
|
"borderWidth": 1,
|
|
600
|
-
"
|
|
601
|
-
"
|
|
602
|
-
"position": "absolute",
|
|
603
|
-
"right": 0,
|
|
604
|
-
"top": 0,
|
|
594
|
+
"marginVertical": 8,
|
|
595
|
+
"width": "100%",
|
|
605
596
|
},
|
|
606
597
|
undefined,
|
|
607
598
|
]
|
|
@@ -610,7 +601,7 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant error 1`] = `
|
|
|
610
601
|
/>
|
|
611
602
|
`;
|
|
612
603
|
|
|
613
|
-
exports[`
|
|
604
|
+
exports[`StyledContainer renders correctly with themeVariant filled 1`] = `
|
|
614
605
|
<View
|
|
615
606
|
style={
|
|
616
607
|
Array [
|
|
@@ -618,11 +609,8 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant filled 1`] = `
|
|
|
618
609
|
"borderColor": "#001f23",
|
|
619
610
|
"borderRadius": 8,
|
|
620
611
|
"borderWidth": 1,
|
|
621
|
-
"
|
|
622
|
-
"
|
|
623
|
-
"position": "absolute",
|
|
624
|
-
"right": 0,
|
|
625
|
-
"top": 0,
|
|
612
|
+
"marginVertical": 8,
|
|
613
|
+
"width": "100%",
|
|
626
614
|
},
|
|
627
615
|
undefined,
|
|
628
616
|
]
|
|
@@ -631,7 +619,7 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant filled 1`] = `
|
|
|
631
619
|
/>
|
|
632
620
|
`;
|
|
633
621
|
|
|
634
|
-
exports[`
|
|
622
|
+
exports[`StyledContainer renders correctly with themeVariant focused 1`] = `
|
|
635
623
|
<View
|
|
636
624
|
style={
|
|
637
625
|
Array [
|
|
@@ -639,11 +627,8 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant focused 1`] =
|
|
|
639
627
|
"borderColor": "#001f23",
|
|
640
628
|
"borderRadius": 8,
|
|
641
629
|
"borderWidth": 2,
|
|
642
|
-
"
|
|
643
|
-
"
|
|
644
|
-
"position": "absolute",
|
|
645
|
-
"right": 0,
|
|
646
|
-
"top": 0,
|
|
630
|
+
"marginVertical": 8,
|
|
631
|
+
"width": "100%",
|
|
647
632
|
},
|
|
648
633
|
undefined,
|
|
649
634
|
]
|
|
@@ -652,7 +637,7 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant focused 1`] =
|
|
|
652
637
|
/>
|
|
653
638
|
`;
|
|
654
639
|
|
|
655
|
-
exports[`
|
|
640
|
+
exports[`StyledContainer renders correctly with themeVariant readonly 1`] = `
|
|
656
641
|
<View
|
|
657
642
|
style={
|
|
658
643
|
Array [
|
|
@@ -660,11 +645,8 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant readonly 1`] =
|
|
|
660
645
|
"borderColor": "#808f91",
|
|
661
646
|
"borderRadius": 8,
|
|
662
647
|
"borderWidth": 1,
|
|
663
|
-
"
|
|
664
|
-
"
|
|
665
|
-
"position": "absolute",
|
|
666
|
-
"right": 0,
|
|
667
|
-
"top": 0,
|
|
648
|
+
"marginVertical": 8,
|
|
649
|
+
"width": "100%",
|
|
668
650
|
},
|
|
669
651
|
undefined,
|
|
670
652
|
]
|
|
@@ -686,7 +668,7 @@ exports[`StyledErrorMessage renders correctly 1`] = `
|
|
|
686
668
|
},
|
|
687
669
|
Array [
|
|
688
670
|
Object {
|
|
689
|
-
"color": "#
|
|
671
|
+
"color": "#f46363",
|
|
690
672
|
"fontSize": 12,
|
|
691
673
|
"marginLeft": 4,
|
|
692
674
|
},
|
|
@@ -834,7 +816,7 @@ exports[`StyledMaxLengthMessage renders correctly with themeVariant error 1`] =
|
|
|
834
816
|
Array [
|
|
835
817
|
Object {
|
|
836
818
|
"alignSelf": "flex-end",
|
|
837
|
-
"color": "#
|
|
819
|
+
"color": "#f46363",
|
|
838
820
|
"flex": 1,
|
|
839
821
|
"flexGrow": 1,
|
|
840
822
|
"fontSize": 12,
|
|
@@ -936,7 +918,7 @@ exports[`StyledMaxLengthMessage renders correctly with themeVariant readonly 1`]
|
|
|
936
918
|
Array [
|
|
937
919
|
Object {
|
|
938
920
|
"alignSelf": "flex-end",
|
|
939
|
-
"color": "#
|
|
921
|
+
"color": "#bfc1c5",
|
|
940
922
|
"flex": 1,
|
|
941
923
|
"flexGrow": 1,
|
|
942
924
|
"fontSize": 12,
|