@jobber/components-native 0.86.1 → 0.86.2-JOB-89949-ec4cb2a.11
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/dist/package.json +2 -2
- package/dist/src/Typography/Typography.js +16 -5
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/src/ActionLabel/ActionLabel.d.ts +3 -2
- package/dist/types/src/Heading/Heading.d.ts +3 -2
- package/dist/types/src/Text/Text.d.ts +3 -2
- package/dist/types/src/Typography/Typography.d.ts +2 -2
- package/package.json +2 -2
- package/src/ActionLabel/ActionLabel.test.tsx +12 -0
- package/src/ActionLabel/ActionLabel.tsx +2 -2
- package/src/ActionLabel/__snapshots__/ActionLabel.test.tsx.snap +66 -0
- package/src/Heading/Heading.test.tsx +13 -0
- package/src/Heading/Heading.tsx +2 -2
- package/src/Heading/__snapshots__/Heading.test.tsx.snap +65 -0
- package/src/Text/Text.test.tsx +10 -0
- package/src/Text/Text.tsx +2 -2
- package/src/Text/__snapshots__/Text.test.tsx.snap +66 -0
- package/src/Typography/Typography.test.tsx +61 -0
- package/src/Typography/Typography.tsx +24 -8
- package/src/Typography/__snapshots__/Typography.test.tsx.snap +222 -0
|
@@ -1,5 +1,69 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
+
exports[`allows child Typography to control its own transform 1`] = `
|
|
4
|
+
<Text
|
|
5
|
+
accessibilityRole="text"
|
|
6
|
+
adjustsFontSizeToFit={false}
|
|
7
|
+
allowFontScaling={true}
|
|
8
|
+
collapsable={false}
|
|
9
|
+
selectable={true}
|
|
10
|
+
selectionColor="hsl(86, 100%, 46%)"
|
|
11
|
+
style={
|
|
12
|
+
[
|
|
13
|
+
{
|
|
14
|
+
"fontFamily": "inter-regular",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"color": "hsl(197, 15%, 43%)",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"textAlign": "left",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"fontSize": 16,
|
|
24
|
+
"lineHeight": 20,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"letterSpacing": 0,
|
|
28
|
+
},
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
>
|
|
32
|
+
BEFORE
|
|
33
|
+
<Text
|
|
34
|
+
accessibilityRole="text"
|
|
35
|
+
adjustsFontSizeToFit={false}
|
|
36
|
+
allowFontScaling={true}
|
|
37
|
+
collapsable={false}
|
|
38
|
+
selectable={true}
|
|
39
|
+
selectionColor="hsl(86, 100%, 46%)"
|
|
40
|
+
style={
|
|
41
|
+
[
|
|
42
|
+
{
|
|
43
|
+
"fontFamily": "inter-bold",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"color": "hsl(197, 15%, 43%)",
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"textAlign": "left",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"fontSize": 16,
|
|
53
|
+
"lineHeight": 20,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"letterSpacing": 0,
|
|
57
|
+
},
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
>
|
|
61
|
+
inner
|
|
62
|
+
</Text>
|
|
63
|
+
AFTER
|
|
64
|
+
</Text>
|
|
65
|
+
`;
|
|
66
|
+
|
|
3
67
|
exports[`renders text respecting the text direction 1`] = `
|
|
4
68
|
<Text
|
|
5
69
|
accessibilityRole="text"
|
|
@@ -902,6 +966,164 @@ exports[`renders text with white color 1`] = `
|
|
|
902
966
|
</Text>
|
|
903
967
|
`;
|
|
904
968
|
|
|
969
|
+
exports[`supports multi-level nesting across Typography and Text 1`] = `
|
|
970
|
+
<Text
|
|
971
|
+
accessibilityRole="text"
|
|
972
|
+
adjustsFontSizeToFit={false}
|
|
973
|
+
allowFontScaling={true}
|
|
974
|
+
collapsable={false}
|
|
975
|
+
selectable={true}
|
|
976
|
+
selectionColor="hsl(86, 100%, 46%)"
|
|
977
|
+
style={
|
|
978
|
+
[
|
|
979
|
+
{
|
|
980
|
+
"fontFamily": "inter-regular",
|
|
981
|
+
},
|
|
982
|
+
{
|
|
983
|
+
"color": "hsl(197, 15%, 43%)",
|
|
984
|
+
},
|
|
985
|
+
{
|
|
986
|
+
"textAlign": "left",
|
|
987
|
+
},
|
|
988
|
+
{
|
|
989
|
+
"fontSize": 16,
|
|
990
|
+
"lineHeight": 20,
|
|
991
|
+
},
|
|
992
|
+
{
|
|
993
|
+
"letterSpacing": 0,
|
|
994
|
+
},
|
|
995
|
+
]
|
|
996
|
+
}
|
|
997
|
+
>
|
|
998
|
+
LEVEL1
|
|
999
|
+
<Text
|
|
1000
|
+
accessibilityRole="text"
|
|
1001
|
+
adjustsFontSizeToFit={false}
|
|
1002
|
+
allowFontScaling={true}
|
|
1003
|
+
collapsable={false}
|
|
1004
|
+
selectable={true}
|
|
1005
|
+
selectionColor="hsl(86, 100%, 46%)"
|
|
1006
|
+
style={
|
|
1007
|
+
[
|
|
1008
|
+
{
|
|
1009
|
+
"fontFamily": "inter-regular",
|
|
1010
|
+
},
|
|
1011
|
+
{
|
|
1012
|
+
"color": "hsl(197, 15%, 43%)",
|
|
1013
|
+
},
|
|
1014
|
+
{
|
|
1015
|
+
"textAlign": "left",
|
|
1016
|
+
},
|
|
1017
|
+
{
|
|
1018
|
+
"fontSize": 16,
|
|
1019
|
+
"lineHeight": 20,
|
|
1020
|
+
},
|
|
1021
|
+
{
|
|
1022
|
+
"letterSpacing": 0,
|
|
1023
|
+
},
|
|
1024
|
+
]
|
|
1025
|
+
}
|
|
1026
|
+
>
|
|
1027
|
+
and
|
|
1028
|
+
<Text
|
|
1029
|
+
accessibilityRole="text"
|
|
1030
|
+
adjustsFontSizeToFit={false}
|
|
1031
|
+
allowFontScaling={true}
|
|
1032
|
+
collapsable={false}
|
|
1033
|
+
selectable={true}
|
|
1034
|
+
selectionColor="hsl(86, 100%, 46%)"
|
|
1035
|
+
style={
|
|
1036
|
+
[
|
|
1037
|
+
{
|
|
1038
|
+
"fontFamily": "inter-regular",
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
"color": "hsl(197, 15%, 43%)",
|
|
1042
|
+
},
|
|
1043
|
+
{
|
|
1044
|
+
"textAlign": "left",
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
"fontSize": 16,
|
|
1048
|
+
"lineHeight": 20,
|
|
1049
|
+
},
|
|
1050
|
+
{
|
|
1051
|
+
"letterSpacing": 0,
|
|
1052
|
+
},
|
|
1053
|
+
]
|
|
1054
|
+
}
|
|
1055
|
+
>
|
|
1056
|
+
inner
|
|
1057
|
+
</Text>
|
|
1058
|
+
</Text>
|
|
1059
|
+
END
|
|
1060
|
+
</Text>
|
|
1061
|
+
`;
|
|
1062
|
+
|
|
1063
|
+
exports[`supports nested children and applies transform only to string children 1`] = `
|
|
1064
|
+
<Text
|
|
1065
|
+
accessibilityRole="text"
|
|
1066
|
+
adjustsFontSizeToFit={false}
|
|
1067
|
+
allowFontScaling={true}
|
|
1068
|
+
collapsable={false}
|
|
1069
|
+
selectable={true}
|
|
1070
|
+
selectionColor="hsl(86, 100%, 46%)"
|
|
1071
|
+
style={
|
|
1072
|
+
[
|
|
1073
|
+
{
|
|
1074
|
+
"fontFamily": "inter-regular",
|
|
1075
|
+
},
|
|
1076
|
+
{
|
|
1077
|
+
"color": "hsl(197, 15%, 43%)",
|
|
1078
|
+
},
|
|
1079
|
+
{
|
|
1080
|
+
"textAlign": "left",
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
"fontSize": 16,
|
|
1084
|
+
"lineHeight": 20,
|
|
1085
|
+
},
|
|
1086
|
+
{
|
|
1087
|
+
"letterSpacing": 0,
|
|
1088
|
+
},
|
|
1089
|
+
]
|
|
1090
|
+
}
|
|
1091
|
+
>
|
|
1092
|
+
BEFORE
|
|
1093
|
+
<Text
|
|
1094
|
+
accessibilityRole="text"
|
|
1095
|
+
adjustsFontSizeToFit={false}
|
|
1096
|
+
allowFontScaling={true}
|
|
1097
|
+
collapsable={false}
|
|
1098
|
+
selectable={true}
|
|
1099
|
+
selectionColor="hsl(86, 100%, 46%)"
|
|
1100
|
+
style={
|
|
1101
|
+
[
|
|
1102
|
+
{
|
|
1103
|
+
"fontFamily": "inter-bold",
|
|
1104
|
+
},
|
|
1105
|
+
{
|
|
1106
|
+
"color": "hsl(197, 15%, 43%)",
|
|
1107
|
+
},
|
|
1108
|
+
{
|
|
1109
|
+
"textAlign": "left",
|
|
1110
|
+
},
|
|
1111
|
+
{
|
|
1112
|
+
"fontSize": 16,
|
|
1113
|
+
"lineHeight": 20,
|
|
1114
|
+
},
|
|
1115
|
+
{
|
|
1116
|
+
"letterSpacing": 0,
|
|
1117
|
+
},
|
|
1118
|
+
]
|
|
1119
|
+
}
|
|
1120
|
+
>
|
|
1121
|
+
Inner
|
|
1122
|
+
</Text>
|
|
1123
|
+
AFTER
|
|
1124
|
+
</Text>
|
|
1125
|
+
`;
|
|
1126
|
+
|
|
905
1127
|
exports[`underline renders text with dashed underline 1`] = `
|
|
906
1128
|
<Text
|
|
907
1129
|
accessibilityRole="text"
|