@hero-design/rn 8.10.0 → 8.11.0
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 +9 -9
- package/es/index.js +293 -82
- package/lib/index.js +293 -82
- package/package.json +5 -5
- package/src/components/Card/index.tsx +1 -1
- package/src/components/Carousel/CardCarousel.tsx +218 -0
- package/src/components/Carousel/StyledCardCarousel.tsx +40 -0
- package/src/components/Carousel/__tests__/CardCarousel.spec.tsx +105 -0
- package/src/components/Carousel/__tests__/StyledCardCarousel.spec.tsx +38 -0
- package/src/components/Carousel/__tests__/__snapshots__/CardCarousel.spec.tsx.snap +289 -0
- package/src/components/Carousel/__tests__/__snapshots__/StyledCardCarousel.spec.tsx.snap +109 -0
- package/src/components/Carousel/contants.ts +10 -0
- package/src/components/Carousel/index.tsx +4 -1
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +0 -1
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +0 -1
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +2 -2
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +1 -6
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +1 -6
- package/src/components/TextInput/StyledTextInput.tsx +1 -2
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +5 -6
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +6 -20
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +0 -2
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +0 -2
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +24 -4
- package/src/theme/components/cardCarousel.ts +28 -0
- package/src/theme/components/textInput.ts +2 -6
- package/src/theme/getTheme.ts +3 -0
- package/src/types.ts +2 -0
- package/types/components/Card/index.d.ts +1 -1
- package/types/components/Carousel/CardCarousel.d.ts +40 -0
- package/types/components/Carousel/StyledCardCarousel.d.ts +31 -0
- package/types/components/Carousel/contants.d.ts +2 -0
- package/types/components/Carousel/index.d.ts +5 -3
- package/types/theme/components/cardCarousel.d.ts +25 -0
- package/types/theme/components/textInput.d.ts +1 -4
- package/types/theme/getTheme.d.ts +2 -0
- package/types/types.d.ts +2 -1
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`StyledCard should render correctly 1`] = `
|
|
4
|
+
<View
|
|
5
|
+
style={
|
|
6
|
+
Array [
|
|
7
|
+
Object {
|
|
8
|
+
"borderRadius": 12,
|
|
9
|
+
"overflow": "hidden",
|
|
10
|
+
},
|
|
11
|
+
Array [
|
|
12
|
+
Object {
|
|
13
|
+
"borderRadius": 8,
|
|
14
|
+
"flex": 1,
|
|
15
|
+
"overflow": "hidden",
|
|
16
|
+
},
|
|
17
|
+
undefined,
|
|
18
|
+
],
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
/>
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
exports[`StyledItemWrapper should render correctly 1`] = `
|
|
25
|
+
<View
|
|
26
|
+
style={
|
|
27
|
+
Array [
|
|
28
|
+
Object {
|
|
29
|
+
"padding": 8,
|
|
30
|
+
},
|
|
31
|
+
undefined,
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
/>
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
exports[`StyledPageControl should render correctly 1`] = `
|
|
38
|
+
<View
|
|
39
|
+
style={
|
|
40
|
+
Array [
|
|
41
|
+
Object {
|
|
42
|
+
"alignItems": "center",
|
|
43
|
+
"flexDirection": "row",
|
|
44
|
+
},
|
|
45
|
+
Array [
|
|
46
|
+
Object {
|
|
47
|
+
"alignSelf": "center",
|
|
48
|
+
"marginTop": 16,
|
|
49
|
+
},
|
|
50
|
+
undefined,
|
|
51
|
+
],
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
>
|
|
55
|
+
<View
|
|
56
|
+
collapsable={false}
|
|
57
|
+
style={
|
|
58
|
+
Object {
|
|
59
|
+
"backgroundColor": "#401960",
|
|
60
|
+
"borderRadius": 999,
|
|
61
|
+
"height": 8,
|
|
62
|
+
"marginHorizontal": 8,
|
|
63
|
+
"opacity": 0.5,
|
|
64
|
+
"width": 8,
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
testID="page-control-indicator0"
|
|
68
|
+
/>
|
|
69
|
+
<View
|
|
70
|
+
collapsable={false}
|
|
71
|
+
style={
|
|
72
|
+
Object {
|
|
73
|
+
"backgroundColor": "#401960",
|
|
74
|
+
"borderRadius": 999,
|
|
75
|
+
"height": 8,
|
|
76
|
+
"marginHorizontal": 8,
|
|
77
|
+
"opacity": 1,
|
|
78
|
+
"width": 24,
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
testID="page-control-indicator1"
|
|
82
|
+
/>
|
|
83
|
+
<View
|
|
84
|
+
collapsable={false}
|
|
85
|
+
style={
|
|
86
|
+
Object {
|
|
87
|
+
"backgroundColor": "#401960",
|
|
88
|
+
"borderRadius": 999,
|
|
89
|
+
"height": 8,
|
|
90
|
+
"marginHorizontal": 8,
|
|
91
|
+
"opacity": 0.5,
|
|
92
|
+
"width": 8,
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
testID="page-control-indicator2"
|
|
96
|
+
/>
|
|
97
|
+
</View>
|
|
98
|
+
`;
|
|
99
|
+
|
|
100
|
+
exports[`StyledWrapper should render correctly 1`] = `
|
|
101
|
+
<View
|
|
102
|
+
style={
|
|
103
|
+
Array [
|
|
104
|
+
Object {},
|
|
105
|
+
undefined,
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
/>
|
|
109
|
+
`;
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
StyledPageControl,
|
|
25
25
|
} from './StyledCarousel';
|
|
26
26
|
import CarouselItem from './CarouselItem';
|
|
27
|
+
import { CardCarousel } from './CardCarousel';
|
|
27
28
|
|
|
28
29
|
interface CarouselProps extends ViewProps {
|
|
29
30
|
/**
|
|
@@ -164,4 +165,6 @@ const Carousel = ({
|
|
|
164
165
|
);
|
|
165
166
|
};
|
|
166
167
|
|
|
167
|
-
export default Carousel
|
|
168
|
+
export default Object.assign(Carousel, {
|
|
169
|
+
Card: CardCarousel,
|
|
170
|
+
});
|
|
@@ -91,7 +91,7 @@ exports[`RichTextEditor onMessage recevied event editor-layout should update hei
|
|
|
91
91
|
"alignItems": "center",
|
|
92
92
|
"color": "#001f23",
|
|
93
93
|
"fontSize": 14,
|
|
94
|
-
"
|
|
94
|
+
"marginTop": -2,
|
|
95
95
|
"textAlignVertical": "center",
|
|
96
96
|
},
|
|
97
97
|
undefined,
|
|
@@ -356,7 +356,7 @@ exports[`RichTextEditor should render correctly 1`] = `
|
|
|
356
356
|
"alignItems": "center",
|
|
357
357
|
"color": "#001f23",
|
|
358
358
|
"fontSize": 14,
|
|
359
|
-
"
|
|
359
|
+
"marginTop": -2,
|
|
360
360
|
"textAlignVertical": "center",
|
|
361
361
|
},
|
|
362
362
|
undefined,
|
|
@@ -116,7 +116,7 @@ Array [
|
|
|
116
116
|
"alignItems": "center",
|
|
117
117
|
"color": "#001f23",
|
|
118
118
|
"fontSize": 14,
|
|
119
|
-
"
|
|
119
|
+
"marginTop": -2,
|
|
120
120
|
"textAlignVertical": "center",
|
|
121
121
|
},
|
|
122
122
|
undefined,
|
|
@@ -152,7 +152,6 @@ Array [
|
|
|
152
152
|
"alignSelf": "stretch",
|
|
153
153
|
"flexGrow": 2,
|
|
154
154
|
"fontSize": 14,
|
|
155
|
-
"lineHeight": 18,
|
|
156
155
|
"marginHorizontal": 8,
|
|
157
156
|
"paddingVertical": 0,
|
|
158
157
|
"textAlignVertical": "center",
|
|
@@ -1509,7 +1508,6 @@ Array [
|
|
|
1509
1508
|
"alignSelf": "stretch",
|
|
1510
1509
|
"flexGrow": 2,
|
|
1511
1510
|
"fontSize": 14,
|
|
1512
|
-
"lineHeight": 18,
|
|
1513
1511
|
"marginHorizontal": 8,
|
|
1514
1512
|
"paddingVertical": 0,
|
|
1515
1513
|
"textAlignVertical": "center",
|
|
@@ -1721,7 +1719,6 @@ Array [
|
|
|
1721
1719
|
"alignSelf": "stretch",
|
|
1722
1720
|
"flexGrow": 2,
|
|
1723
1721
|
"fontSize": 14,
|
|
1724
|
-
"lineHeight": 18,
|
|
1725
1722
|
"marginHorizontal": 8,
|
|
1726
1723
|
"paddingVertical": 0,
|
|
1727
1724
|
"textAlignVertical": "center",
|
|
@@ -3255,7 +3252,6 @@ Array [
|
|
|
3255
3252
|
"alignSelf": "stretch",
|
|
3256
3253
|
"flexGrow": 2,
|
|
3257
3254
|
"fontSize": 14,
|
|
3258
|
-
"lineHeight": 18,
|
|
3259
3255
|
"marginHorizontal": 8,
|
|
3260
3256
|
"paddingVertical": 0,
|
|
3261
3257
|
"textAlignVertical": "center",
|
|
@@ -3480,7 +3476,6 @@ Array [
|
|
|
3480
3476
|
"alignSelf": "stretch",
|
|
3481
3477
|
"flexGrow": 2,
|
|
3482
3478
|
"fontSize": 14,
|
|
3483
|
-
"lineHeight": 18,
|
|
3484
3479
|
"marginHorizontal": 8,
|
|
3485
3480
|
"paddingVertical": 0,
|
|
3486
3481
|
"textAlignVertical": "center",
|
|
@@ -116,7 +116,7 @@ Array [
|
|
|
116
116
|
"alignItems": "center",
|
|
117
117
|
"color": "#001f23",
|
|
118
118
|
"fontSize": 14,
|
|
119
|
-
"
|
|
119
|
+
"marginTop": -2,
|
|
120
120
|
"textAlignVertical": "center",
|
|
121
121
|
},
|
|
122
122
|
undefined,
|
|
@@ -152,7 +152,6 @@ Array [
|
|
|
152
152
|
"alignSelf": "stretch",
|
|
153
153
|
"flexGrow": 2,
|
|
154
154
|
"fontSize": 14,
|
|
155
|
-
"lineHeight": 18,
|
|
156
155
|
"marginHorizontal": 8,
|
|
157
156
|
"paddingVertical": 0,
|
|
158
157
|
"textAlignVertical": "center",
|
|
@@ -1434,7 +1433,6 @@ Array [
|
|
|
1434
1433
|
"alignSelf": "stretch",
|
|
1435
1434
|
"flexGrow": 2,
|
|
1436
1435
|
"fontSize": 14,
|
|
1437
|
-
"lineHeight": 18,
|
|
1438
1436
|
"marginHorizontal": 8,
|
|
1439
1437
|
"paddingVertical": 0,
|
|
1440
1438
|
"textAlignVertical": "center",
|
|
@@ -1646,7 +1644,6 @@ Array [
|
|
|
1646
1644
|
"alignSelf": "stretch",
|
|
1647
1645
|
"flexGrow": 2,
|
|
1648
1646
|
"fontSize": 14,
|
|
1649
|
-
"lineHeight": 18,
|
|
1650
1647
|
"marginHorizontal": 8,
|
|
1651
1648
|
"paddingVertical": 0,
|
|
1652
1649
|
"textAlignVertical": "center",
|
|
@@ -3052,7 +3049,6 @@ Array [
|
|
|
3052
3049
|
"alignSelf": "stretch",
|
|
3053
3050
|
"flexGrow": 2,
|
|
3054
3051
|
"fontSize": 14,
|
|
3055
|
-
"lineHeight": 18,
|
|
3056
3052
|
"marginHorizontal": 8,
|
|
3057
3053
|
"paddingVertical": 0,
|
|
3058
3054
|
"textAlignVertical": "center",
|
|
@@ -3277,7 +3273,6 @@ Array [
|
|
|
3277
3273
|
"alignSelf": "stretch",
|
|
3278
3274
|
"flexGrow": 2,
|
|
3279
3275
|
"fontSize": 14,
|
|
3280
|
-
"lineHeight": 18,
|
|
3281
3276
|
"marginHorizontal": 8,
|
|
3282
3277
|
"paddingVertical": 0,
|
|
3283
3278
|
"textAlignVertical": "center",
|
|
@@ -43,9 +43,9 @@ const StyledLabelInsideTextInput = styled(Typography.Text)<{
|
|
|
43
43
|
textAlignVertical: 'center',
|
|
44
44
|
alignContent: 'center',
|
|
45
45
|
fontSize: theme.__hd__.textInput.fontSizes.labelInsideTextInput,
|
|
46
|
-
lineHeight: theme.__hd__.textInput.lineHeights.labelInsideTextInput,
|
|
47
46
|
alignItems: 'center',
|
|
48
47
|
color: theme.__hd__.textInput.colors.labelsInsideTextInput[themeVariant],
|
|
48
|
+
marginTop: theme.__hd__.textInput.space.labelInsideTextInputMarginTop,
|
|
49
49
|
}));
|
|
50
50
|
|
|
51
51
|
const StyledAsteriskLabelInsideTextInput = styled(Typography.Text)<{
|
|
@@ -87,7 +87,6 @@ const StyledHelperText = styled(Typography.Text)(({ theme }) => ({
|
|
|
87
87
|
const StyledTextInput = styled(TextInput)(({ theme }) => ({
|
|
88
88
|
textAlignVertical: 'center',
|
|
89
89
|
fontSize: theme.__hd__.textInput.fontSizes.text,
|
|
90
|
-
lineHeight: theme.__hd__.textInput.lineHeights.text,
|
|
91
90
|
alignSelf: 'stretch',
|
|
92
91
|
flexGrow: 2,
|
|
93
92
|
marginHorizontal: theme.__hd__.textInput.space.inputHorizontalMargin,
|
|
@@ -181,7 +181,7 @@ exports[`LabelInsideTextInput renders correctly with themeVariant default 1`] =
|
|
|
181
181
|
"alignItems": "center",
|
|
182
182
|
"color": "#001f23",
|
|
183
183
|
"fontSize": 14,
|
|
184
|
-
"
|
|
184
|
+
"marginTop": -2,
|
|
185
185
|
"textAlignVertical": "center",
|
|
186
186
|
},
|
|
187
187
|
undefined,
|
|
@@ -215,7 +215,7 @@ exports[`LabelInsideTextInput renders correctly with themeVariant disabled 1`] =
|
|
|
215
215
|
"alignItems": "center",
|
|
216
216
|
"color": "#bfc1c5",
|
|
217
217
|
"fontSize": 14,
|
|
218
|
-
"
|
|
218
|
+
"marginTop": -2,
|
|
219
219
|
"textAlignVertical": "center",
|
|
220
220
|
},
|
|
221
221
|
undefined,
|
|
@@ -249,7 +249,7 @@ exports[`LabelInsideTextInput renders correctly with themeVariant error 1`] = `
|
|
|
249
249
|
"alignItems": "center",
|
|
250
250
|
"color": "#001f23",
|
|
251
251
|
"fontSize": 14,
|
|
252
|
-
"
|
|
252
|
+
"marginTop": -2,
|
|
253
253
|
"textAlignVertical": "center",
|
|
254
254
|
},
|
|
255
255
|
undefined,
|
|
@@ -283,7 +283,7 @@ exports[`LabelInsideTextInput renders correctly with themeVariant filled 1`] = `
|
|
|
283
283
|
"alignItems": "center",
|
|
284
284
|
"color": "#001f23",
|
|
285
285
|
"fontSize": 14,
|
|
286
|
-
"
|
|
286
|
+
"marginTop": -2,
|
|
287
287
|
"textAlignVertical": "center",
|
|
288
288
|
},
|
|
289
289
|
undefined,
|
|
@@ -317,7 +317,7 @@ exports[`LabelInsideTextInput renders correctly with themeVariant readonly 1`] =
|
|
|
317
317
|
"alignItems": "center",
|
|
318
318
|
"color": "#808f91",
|
|
319
319
|
"fontSize": 14,
|
|
320
|
-
"
|
|
320
|
+
"marginTop": -2,
|
|
321
321
|
"textAlignVertical": "center",
|
|
322
322
|
},
|
|
323
323
|
undefined,
|
|
@@ -875,7 +875,6 @@ exports[`StyledTextInput renders correctly 1`] = `
|
|
|
875
875
|
"alignSelf": "stretch",
|
|
876
876
|
"flexGrow": 2,
|
|
877
877
|
"fontSize": 14,
|
|
878
|
-
"lineHeight": 18,
|
|
879
878
|
"marginHorizontal": 8,
|
|
880
879
|
"paddingVertical": 0,
|
|
881
880
|
"textAlignVertical": "center",
|
|
@@ -163,7 +163,6 @@ exports[`TextInput defaultValue TextInput is idle renders correctly 1`] = `
|
|
|
163
163
|
"alignSelf": "stretch",
|
|
164
164
|
"flexGrow": 2,
|
|
165
165
|
"fontSize": 14,
|
|
166
|
-
"lineHeight": 18,
|
|
167
166
|
"marginHorizontal": 8,
|
|
168
167
|
"paddingVertical": 0,
|
|
169
168
|
"textAlignVertical": "center",
|
|
@@ -426,7 +425,6 @@ exports[`TextInput defaultValue default Value and Value renders correctly with 2
|
|
|
426
425
|
"alignSelf": "stretch",
|
|
427
426
|
"flexGrow": 2,
|
|
428
427
|
"fontSize": 14,
|
|
429
|
-
"lineHeight": 18,
|
|
430
428
|
"marginHorizontal": 8,
|
|
431
429
|
"paddingVertical": 0,
|
|
432
430
|
"textAlignVertical": "center",
|
|
@@ -674,7 +672,6 @@ exports[`TextInput disabled renders correctly 1`] = `
|
|
|
674
672
|
"alignSelf": "stretch",
|
|
675
673
|
"flexGrow": 2,
|
|
676
674
|
"fontSize": 14,
|
|
677
|
-
"lineHeight": 18,
|
|
678
675
|
"marginHorizontal": 8,
|
|
679
676
|
"paddingVertical": 0,
|
|
680
677
|
"textAlignVertical": "center",
|
|
@@ -849,7 +846,7 @@ exports[`TextInput error renders correctly 1`] = `
|
|
|
849
846
|
"alignItems": "center",
|
|
850
847
|
"color": "#001f23",
|
|
851
848
|
"fontSize": 14,
|
|
852
|
-
"
|
|
849
|
+
"marginTop": -2,
|
|
853
850
|
"textAlignVertical": "center",
|
|
854
851
|
},
|
|
855
852
|
undefined,
|
|
@@ -883,7 +880,6 @@ exports[`TextInput error renders correctly 1`] = `
|
|
|
883
880
|
"alignSelf": "stretch",
|
|
884
881
|
"flexGrow": 2,
|
|
885
882
|
"fontSize": 14,
|
|
886
|
-
"lineHeight": 18,
|
|
887
883
|
"marginHorizontal": 8,
|
|
888
884
|
"paddingVertical": 0,
|
|
889
885
|
"textAlignVertical": "center",
|
|
@@ -1117,7 +1113,6 @@ exports[`TextInput filled renders correctly 1`] = `
|
|
|
1117
1113
|
"alignSelf": "stretch",
|
|
1118
1114
|
"flexGrow": 2,
|
|
1119
1115
|
"fontSize": 14,
|
|
1120
|
-
"lineHeight": 18,
|
|
1121
1116
|
"marginHorizontal": 8,
|
|
1122
1117
|
"paddingVertical": 0,
|
|
1123
1118
|
"textAlignVertical": "center",
|
|
@@ -1307,7 +1302,7 @@ exports[`TextInput helper text renders correctly 1`] = `
|
|
|
1307
1302
|
"alignItems": "center",
|
|
1308
1303
|
"color": "#001f23",
|
|
1309
1304
|
"fontSize": 14,
|
|
1310
|
-
"
|
|
1305
|
+
"marginTop": -2,
|
|
1311
1306
|
"textAlignVertical": "center",
|
|
1312
1307
|
},
|
|
1313
1308
|
undefined,
|
|
@@ -1341,7 +1336,6 @@ exports[`TextInput helper text renders correctly 1`] = `
|
|
|
1341
1336
|
"alignSelf": "stretch",
|
|
1342
1337
|
"flexGrow": 2,
|
|
1343
1338
|
"fontSize": 14,
|
|
1344
|
-
"lineHeight": 18,
|
|
1345
1339
|
"marginHorizontal": 8,
|
|
1346
1340
|
"paddingVertical": 0,
|
|
1347
1341
|
"textAlignVertical": "center",
|
|
@@ -1517,7 +1511,7 @@ exports[`TextInput idle renders correctly 1`] = `
|
|
|
1517
1511
|
"alignItems": "center",
|
|
1518
1512
|
"color": "#001f23",
|
|
1519
1513
|
"fontSize": 14,
|
|
1520
|
-
"
|
|
1514
|
+
"marginTop": -2,
|
|
1521
1515
|
"textAlignVertical": "center",
|
|
1522
1516
|
},
|
|
1523
1517
|
undefined,
|
|
@@ -1551,7 +1545,6 @@ exports[`TextInput idle renders correctly 1`] = `
|
|
|
1551
1545
|
"alignSelf": "stretch",
|
|
1552
1546
|
"flexGrow": 2,
|
|
1553
1547
|
"fontSize": 14,
|
|
1554
|
-
"lineHeight": 18,
|
|
1555
1548
|
"marginHorizontal": 8,
|
|
1556
1549
|
"paddingVertical": 0,
|
|
1557
1550
|
"textAlignVertical": "center",
|
|
@@ -1740,7 +1733,7 @@ exports[`TextInput idle with suffix and prefix are React Element renders correct
|
|
|
1740
1733
|
"alignItems": "center",
|
|
1741
1734
|
"color": "#001f23",
|
|
1742
1735
|
"fontSize": 14,
|
|
1743
|
-
"
|
|
1736
|
+
"marginTop": -2,
|
|
1744
1737
|
"textAlignVertical": "center",
|
|
1745
1738
|
},
|
|
1746
1739
|
undefined,
|
|
@@ -1774,7 +1767,6 @@ exports[`TextInput idle with suffix and prefix are React Element renders correct
|
|
|
1774
1767
|
"alignSelf": "stretch",
|
|
1775
1768
|
"flexGrow": 2,
|
|
1776
1769
|
"fontSize": 14,
|
|
1777
|
-
"lineHeight": 18,
|
|
1778
1770
|
"marginHorizontal": 8,
|
|
1779
1771
|
"paddingVertical": 0,
|
|
1780
1772
|
"textAlignVertical": "center",
|
|
@@ -1921,7 +1913,6 @@ exports[`TextInput loading renders correctly 1`] = `
|
|
|
1921
1913
|
"alignSelf": "stretch",
|
|
1922
1914
|
"flexGrow": 2,
|
|
1923
1915
|
"fontSize": 14,
|
|
1924
|
-
"lineHeight": 18,
|
|
1925
1916
|
"marginHorizontal": 8,
|
|
1926
1917
|
"paddingVertical": 0,
|
|
1927
1918
|
"textAlignVertical": "center",
|
|
@@ -2137,7 +2128,6 @@ exports[`TextInput max length renders correctly 1`] = `
|
|
|
2137
2128
|
"alignSelf": "stretch",
|
|
2138
2129
|
"flexGrow": 2,
|
|
2139
2130
|
"fontSize": 14,
|
|
2140
|
-
"lineHeight": 18,
|
|
2141
2131
|
"marginHorizontal": 8,
|
|
2142
2132
|
"paddingVertical": 0,
|
|
2143
2133
|
"textAlignVertical": "center",
|
|
@@ -2405,7 +2395,7 @@ exports[`TextInput placeholder TextInput is idle renders correctly 1`] = `
|
|
|
2405
2395
|
"alignItems": "center",
|
|
2406
2396
|
"color": "#001f23",
|
|
2407
2397
|
"fontSize": 14,
|
|
2408
|
-
"
|
|
2398
|
+
"marginTop": -2,
|
|
2409
2399
|
"textAlignVertical": "center",
|
|
2410
2400
|
},
|
|
2411
2401
|
undefined,
|
|
@@ -2439,7 +2429,6 @@ exports[`TextInput placeholder TextInput is idle renders correctly 1`] = `
|
|
|
2439
2429
|
"alignSelf": "stretch",
|
|
2440
2430
|
"flexGrow": 2,
|
|
2441
2431
|
"fontSize": 14,
|
|
2442
|
-
"lineHeight": 18,
|
|
2443
2432
|
"marginHorizontal": 8,
|
|
2444
2433
|
"paddingVertical": 0,
|
|
2445
2434
|
"textAlignVertical": "center",
|
|
@@ -2666,7 +2655,6 @@ exports[`TextInput readonly renders correctly 1`] = `
|
|
|
2666
2655
|
"alignSelf": "stretch",
|
|
2667
2656
|
"flexGrow": 2,
|
|
2668
2657
|
"fontSize": 14,
|
|
2669
|
-
"lineHeight": 18,
|
|
2670
2658
|
"marginHorizontal": 8,
|
|
2671
2659
|
"paddingVertical": 0,
|
|
2672
2660
|
"textAlignVertical": "center",
|
|
@@ -2842,7 +2830,6 @@ exports[`TextInput ref ref methods work correctly 1`] = `
|
|
|
2842
2830
|
"alignSelf": "stretch",
|
|
2843
2831
|
"flexGrow": 2,
|
|
2844
2832
|
"fontSize": 14,
|
|
2845
|
-
"lineHeight": 18,
|
|
2846
2833
|
"marginHorizontal": 8,
|
|
2847
2834
|
"paddingVertical": 0,
|
|
2848
2835
|
"textAlignVertical": "center",
|
|
@@ -3017,7 +3004,7 @@ exports[`TextInput required renders correctly 1`] = `
|
|
|
3017
3004
|
"alignItems": "center",
|
|
3018
3005
|
"color": "#001f23",
|
|
3019
3006
|
"fontSize": 14,
|
|
3020
|
-
"
|
|
3007
|
+
"marginTop": -2,
|
|
3021
3008
|
"textAlignVertical": "center",
|
|
3022
3009
|
},
|
|
3023
3010
|
undefined,
|
|
@@ -3051,7 +3038,6 @@ exports[`TextInput required renders correctly 1`] = `
|
|
|
3051
3038
|
"alignSelf": "stretch",
|
|
3052
3039
|
"flexGrow": 2,
|
|
3053
3040
|
"fontSize": 14,
|
|
3054
|
-
"lineHeight": 18,
|
|
3055
3041
|
"marginHorizontal": 8,
|
|
3056
3042
|
"paddingVertical": 0,
|
|
3057
3043
|
"textAlignVertical": "center",
|
|
@@ -146,7 +146,6 @@ exports[`TimePickerAndroid renders correct with hide suffix 1`] = `
|
|
|
146
146
|
"alignSelf": "stretch",
|
|
147
147
|
"flexGrow": 2,
|
|
148
148
|
"fontSize": 14,
|
|
149
|
-
"lineHeight": 18,
|
|
150
149
|
"marginHorizontal": 8,
|
|
151
150
|
"paddingVertical": 0,
|
|
152
151
|
"textAlignVertical": "center",
|
|
@@ -361,7 +360,6 @@ exports[`TimePickerAndroid renders correctly 1`] = `
|
|
|
361
360
|
"alignSelf": "stretch",
|
|
362
361
|
"flexGrow": 2,
|
|
363
362
|
"fontSize": 14,
|
|
364
|
-
"lineHeight": 18,
|
|
365
363
|
"marginHorizontal": 8,
|
|
366
364
|
"paddingVertical": 0,
|
|
367
365
|
"textAlignVertical": "center",
|
|
@@ -146,7 +146,6 @@ exports[`TimePickerIOS renders correct with hide suffix 1`] = `
|
|
|
146
146
|
"alignSelf": "stretch",
|
|
147
147
|
"flexGrow": 2,
|
|
148
148
|
"fontSize": 14,
|
|
149
|
-
"lineHeight": 18,
|
|
150
149
|
"marginHorizontal": 8,
|
|
151
150
|
"paddingVertical": 0,
|
|
152
151
|
"textAlignVertical": "center",
|
|
@@ -361,7 +360,6 @@ exports[`TimePickerIOS renders correctly 1`] = `
|
|
|
361
360
|
"alignSelf": "stretch",
|
|
362
361
|
"flexGrow": 2,
|
|
363
362
|
"fontSize": 14,
|
|
364
|
-
"lineHeight": 18,
|
|
365
363
|
"marginHorizontal": 8,
|
|
366
364
|
"paddingVertical": 0,
|
|
367
365
|
"textAlignVertical": "center",
|
|
@@ -253,6 +253,29 @@ Object {
|
|
|
253
253
|
"indicatorWidth": 16,
|
|
254
254
|
},
|
|
255
255
|
},
|
|
256
|
+
"cardCarousel": Object {
|
|
257
|
+
"colors": Object {
|
|
258
|
+
"carouselItemBackground": "#f6f6f7",
|
|
259
|
+
"shadow": "#001f23",
|
|
260
|
+
},
|
|
261
|
+
"radii": Object {
|
|
262
|
+
"card": 8,
|
|
263
|
+
},
|
|
264
|
+
"shadows": Object {
|
|
265
|
+
"elevation": 4,
|
|
266
|
+
"offset": Object {
|
|
267
|
+
"height": 2,
|
|
268
|
+
"width": 0,
|
|
269
|
+
},
|
|
270
|
+
"opacity": 0.12,
|
|
271
|
+
"radius": 8,
|
|
272
|
+
},
|
|
273
|
+
"space": Object {
|
|
274
|
+
"carouselItemSpacing": 8,
|
|
275
|
+
"contentContainerPaddingHorizontal": 24,
|
|
276
|
+
"pageControlMarginTop": 16,
|
|
277
|
+
},
|
|
278
|
+
},
|
|
256
279
|
"carousel": Object {
|
|
257
280
|
"fontSizes": Object {
|
|
258
281
|
"heading": 32,
|
|
@@ -837,10 +860,6 @@ Object {
|
|
|
837
860
|
"maxLength": 12,
|
|
838
861
|
"text": 14,
|
|
839
862
|
},
|
|
840
|
-
"lineHeights": Object {
|
|
841
|
-
"labelInsideTextInput": 18,
|
|
842
|
-
"text": 18,
|
|
843
|
-
},
|
|
844
863
|
"radii": Object {
|
|
845
864
|
"container": 8,
|
|
846
865
|
},
|
|
@@ -855,6 +874,7 @@ Object {
|
|
|
855
874
|
"errorMarginLeft": 4,
|
|
856
875
|
"inputHorizontalMargin": 8,
|
|
857
876
|
"labelHorizontalPadding": 4,
|
|
877
|
+
"labelInsideTextInputMarginTop": -2,
|
|
858
878
|
"labelLeft": 16,
|
|
859
879
|
"labelPaddingBottom": 8,
|
|
860
880
|
"labelTop": -10,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { GlobalTheme } from '../global';
|
|
2
|
+
|
|
3
|
+
const getCardCarouselTheme = (theme: GlobalTheme) => {
|
|
4
|
+
const space = {
|
|
5
|
+
pageControlMarginTop: theme.space.medium,
|
|
6
|
+
carouselItemSpacing: theme.space.small,
|
|
7
|
+
contentContainerPaddingHorizontal: theme.space.large,
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const colors = {
|
|
11
|
+
shadow: theme.colors.primaryOutline,
|
|
12
|
+
carouselItemBackground: theme.colors.defaultSurface,
|
|
13
|
+
};
|
|
14
|
+
const shadows = {
|
|
15
|
+
offset: { width: 0, height: 2 },
|
|
16
|
+
opacity: 0.12,
|
|
17
|
+
radius: theme.radii.medium,
|
|
18
|
+
elevation: 4,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const radii = {
|
|
22
|
+
card: theme.radii.medium,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
return { shadows, colors, space, radii };
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default getCardCarouselTheme;
|
|
@@ -54,6 +54,7 @@ const getTextInputTheme = (theme: GlobalTheme) => {
|
|
|
54
54
|
maxLengthLabelMarginLeft: theme.space.xsmall,
|
|
55
55
|
errorAndHelpTextContainerPaddingLeft: theme.space.medium,
|
|
56
56
|
containerMarginTop: theme.space.small,
|
|
57
|
+
labelInsideTextInputMarginTop: -theme.space.xxsmall,
|
|
57
58
|
};
|
|
58
59
|
|
|
59
60
|
const fontSizes = {
|
|
@@ -64,11 +65,6 @@ const getTextInputTheme = (theme: GlobalTheme) => {
|
|
|
64
65
|
asteriskLabel: theme.fontSizes.medium,
|
|
65
66
|
};
|
|
66
67
|
|
|
67
|
-
const lineHeights = {
|
|
68
|
-
text: theme.lineHeights.xsmall,
|
|
69
|
-
labelInsideTextInput: theme.lineHeights.xsmall,
|
|
70
|
-
};
|
|
71
|
-
|
|
72
68
|
const borderWidths = {
|
|
73
69
|
container: {
|
|
74
70
|
normal: theme.borderWidths.base,
|
|
@@ -84,7 +80,7 @@ const getTextInputTheme = (theme: GlobalTheme) => {
|
|
|
84
80
|
errorAndHelpTextContainerHeight: theme.sizes.medium,
|
|
85
81
|
};
|
|
86
82
|
|
|
87
|
-
return { colors, space, fontSizes, borderWidths, radii,
|
|
83
|
+
return { colors, space, fontSizes, borderWidths, radii, sizes };
|
|
88
84
|
};
|
|
89
85
|
|
|
90
86
|
export default getTextInputTheme;
|
package/src/theme/getTheme.ts
CHANGED
|
@@ -11,6 +11,7 @@ import getButtonTheme from './components/button';
|
|
|
11
11
|
import getCalendarTheme from './components/calendar';
|
|
12
12
|
import getCardTheme from './components/card';
|
|
13
13
|
import getCarouselTheme from './components/carousel';
|
|
14
|
+
import getCardCarouselTheme from './components/cardCarousel';
|
|
14
15
|
import getCheckboxTheme from './components/checkbox';
|
|
15
16
|
import getContentNavigatorTheme from './components/contentNavigator';
|
|
16
17
|
import getDatePickerTheme from './components/datePicker';
|
|
@@ -56,6 +57,7 @@ type Theme = GlobalTheme & {
|
|
|
56
57
|
calendar: ReturnType<typeof getCalendarTheme>;
|
|
57
58
|
card: ReturnType<typeof getCardTheme>;
|
|
58
59
|
carousel: ReturnType<typeof getCarouselTheme>;
|
|
60
|
+
cardCarousel: ReturnType<typeof getCardCarouselTheme>;
|
|
59
61
|
checkbox: ReturnType<typeof getCheckboxTheme>;
|
|
60
62
|
contentNavigator: ReturnType<typeof getContentNavigatorTheme>;
|
|
61
63
|
datePicker: ReturnType<typeof getDatePickerTheme>;
|
|
@@ -107,6 +109,7 @@ const getTheme = (
|
|
|
107
109
|
calendar: getCalendarTheme(globalTheme),
|
|
108
110
|
card: getCardTheme(globalTheme),
|
|
109
111
|
carousel: getCarouselTheme(globalTheme),
|
|
112
|
+
cardCarousel: getCardCarouselTheme(globalTheme),
|
|
110
113
|
checkbox: getCheckboxTheme(globalTheme),
|
|
111
114
|
contentNavigator: getContentNavigatorTheme(globalTheme),
|
|
112
115
|
datePicker: getDatePickerTheme(globalTheme),
|