@jobber/components-native 0.10.0 → 0.12.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.
Files changed (36) hide show
  1. package/dist/src/Button/Button.js +78 -0
  2. package/dist/src/Button/Button.style.js +92 -0
  3. package/dist/src/Button/components/InternalButtonLoading/InternalButtonLoading.js +36 -0
  4. package/dist/src/Button/components/InternalButtonLoading/InternalButtonLoading.style.js +4 -0
  5. package/dist/src/Button/components/InternalButtonLoading/index.js +1 -0
  6. package/dist/src/Button/index.js +1 -0
  7. package/dist/src/Button/types.js +1 -0
  8. package/dist/src/Heading/Heading.js +51 -0
  9. package/dist/src/Heading/index.js +1 -0
  10. package/dist/src/index.js +2 -0
  11. package/dist/tsconfig.tsbuildinfo +1 -1
  12. package/dist/types/src/Button/Button.d.ts +71 -0
  13. package/dist/types/src/Button/Button.style.d.ts +86 -0
  14. package/dist/types/src/Button/components/InternalButtonLoading/InternalButtonLoading.d.ts +11 -0
  15. package/dist/types/src/Button/components/InternalButtonLoading/InternalButtonLoading.style.d.ts +4 -0
  16. package/dist/types/src/Button/components/InternalButtonLoading/index.d.ts +1 -0
  17. package/dist/types/src/Button/index.d.ts +2 -0
  18. package/dist/types/src/Button/types.d.ts +3 -0
  19. package/dist/types/src/Heading/Heading.d.ts +37 -0
  20. package/dist/types/src/Heading/index.d.ts +2 -0
  21. package/dist/types/src/index.d.ts +2 -0
  22. package/package.json +3 -2
  23. package/src/Button/Button.style.ts +116 -0
  24. package/src/Button/Button.test.tsx +298 -0
  25. package/src/Button/Button.tsx +223 -0
  26. package/src/Button/components/InternalButtonLoading/InternalButtonLoading.style.ts +5 -0
  27. package/src/Button/components/InternalButtonLoading/InternalButtonLoading.test.tsx +39 -0
  28. package/src/Button/components/InternalButtonLoading/InternalButtonLoading.tsx +77 -0
  29. package/src/Button/components/InternalButtonLoading/index.ts +1 -0
  30. package/src/Button/index.ts +2 -0
  31. package/src/Button/types.ts +3 -0
  32. package/src/Heading/Heading.test.tsx +83 -0
  33. package/src/Heading/Heading.tsx +132 -0
  34. package/src/Heading/__snapshots__/Heading.test.tsx.snap +270 -0
  35. package/src/Heading/index.ts +2 -0
  36. package/src/index.ts +2 -0
@@ -0,0 +1,270 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`when Heading called with Subtitle variation should match snapshot 1`] = `
4
+ <Text
5
+ accessibilityRole="header"
6
+ adjustsFontSizeToFit={false}
7
+ allowFontScaling={true}
8
+ collapsable={false}
9
+ maxFontSizeMultiplier={1}
10
+ selectable={true}
11
+ selectionColor="rgb(160, 215, 42)"
12
+ style={
13
+ [
14
+ {
15
+ "fontFamily": "jobberpro-xbd",
16
+ },
17
+ {
18
+ "color": "rgb(1, 41, 57)",
19
+ },
20
+ {
21
+ "textAlign": "left",
22
+ },
23
+ {
24
+ "fontSize": 24,
25
+ "lineHeight": 28,
26
+ },
27
+ {
28
+ "letterSpacing": 0,
29
+ },
30
+ ]
31
+ }
32
+ >
33
+ Subtitle
34
+ </Text>
35
+ `;
36
+
37
+ exports[`when Heading called with an alignment should match snapshot 1`] = `
38
+ <Text
39
+ accessibilityRole="header"
40
+ adjustsFontSizeToFit={false}
41
+ allowFontScaling={true}
42
+ collapsable={false}
43
+ selectable={true}
44
+ selectionColor="rgb(160, 215, 42)"
45
+ style={
46
+ [
47
+ {
48
+ "fontFamily": "jobberpro-xbd",
49
+ },
50
+ {
51
+ "color": "rgb(1, 41, 57)",
52
+ },
53
+ {
54
+ "textAlign": "right",
55
+ },
56
+ {
57
+ "fontSize": 20,
58
+ "lineHeight": 22,
59
+ },
60
+ {
61
+ "letterSpacing": 0,
62
+ },
63
+ ]
64
+ }
65
+ >
66
+ Text Aligned Right
67
+ </Text>
68
+ `;
69
+
70
+ exports[`when Heading called with maxLines should match snapshot 1`] = `
71
+ <Text
72
+ accessibilityRole="header"
73
+ adjustsFontSizeToFit={false}
74
+ allowFontScaling={true}
75
+ collapsable={false}
76
+ numberOfLines={1}
77
+ selectable={true}
78
+ selectionColor="rgb(160, 215, 42)"
79
+ style={
80
+ [
81
+ {
82
+ "fontFamily": "jobberpro-xbd",
83
+ },
84
+ {
85
+ "color": "rgb(1, 41, 57)",
86
+ },
87
+ {
88
+ "textAlign": "left",
89
+ },
90
+ {
91
+ "fontSize": 20,
92
+ "lineHeight": 22,
93
+ },
94
+ {
95
+ "letterSpacing": 0,
96
+ },
97
+ ]
98
+ }
99
+ >
100
+ Text Aligned Right
101
+ </Text>
102
+ `;
103
+
104
+ exports[`when Heading called with reverseTheme should match snapshot 1`] = `
105
+ <Text
106
+ accessibilityRole="header"
107
+ adjustsFontSizeToFit={false}
108
+ allowFontScaling={true}
109
+ collapsable={false}
110
+ selectable={true}
111
+ selectionColor="rgb(160, 215, 42)"
112
+ style={
113
+ [
114
+ {
115
+ "fontFamily": "jobberpro-xbd",
116
+ },
117
+ {
118
+ "color": "rgba(255, 255, 255, 1)",
119
+ },
120
+ {
121
+ "textAlign": "left",
122
+ },
123
+ {
124
+ "fontSize": 20,
125
+ "lineHeight": 22,
126
+ },
127
+ {
128
+ "letterSpacing": 0,
129
+ },
130
+ ]
131
+ }
132
+ >
133
+ Reverse Theme Heading
134
+ </Text>
135
+ `;
136
+
137
+ exports[`when Heading called with sub-heading variation and text-color should match snapshot 1`] = `
138
+ <Text
139
+ accessibilityRole="header"
140
+ adjustsFontSizeToFit={false}
141
+ allowFontScaling={true}
142
+ collapsable={false}
143
+ maxFontSizeMultiplier={1.375}
144
+ selectable={true}
145
+ selectionColor="rgb(160, 215, 42)"
146
+ style={
147
+ [
148
+ {
149
+ "fontFamily": "inter-semibold",
150
+ },
151
+ {
152
+ "color": "rgba(101, 120, 132, 1)",
153
+ },
154
+ {
155
+ "textAlign": "left",
156
+ },
157
+ {
158
+ "fontSize": 16,
159
+ "lineHeight": 20,
160
+ },
161
+ {
162
+ "letterSpacing": 0,
163
+ },
164
+ ]
165
+ }
166
+ >
167
+ Sub-Heading
168
+ </Text>
169
+ `;
170
+
171
+ exports[`when Heading called with sub-heading variation should match snapshot 1`] = `
172
+ <Text
173
+ accessibilityRole="header"
174
+ adjustsFontSizeToFit={false}
175
+ allowFontScaling={true}
176
+ collapsable={false}
177
+ maxFontSizeMultiplier={1.375}
178
+ selectable={true}
179
+ selectionColor="rgb(160, 215, 42)"
180
+ style={
181
+ [
182
+ {
183
+ "fontFamily": "inter-semibold",
184
+ },
185
+ {
186
+ "color": "rgb(1, 41, 57)",
187
+ },
188
+ {
189
+ "textAlign": "left",
190
+ },
191
+ {
192
+ "fontSize": 16,
193
+ "lineHeight": 20,
194
+ },
195
+ {
196
+ "letterSpacing": 0,
197
+ },
198
+ ]
199
+ }
200
+ >
201
+ Sub-Heading
202
+ </Text>
203
+ `;
204
+
205
+ exports[`when Heading called with text as the only prop should match snapshot 1`] = `
206
+ <Text
207
+ accessibilityRole="header"
208
+ adjustsFontSizeToFit={false}
209
+ allowFontScaling={true}
210
+ collapsable={false}
211
+ selectable={true}
212
+ selectionColor="rgb(160, 215, 42)"
213
+ style={
214
+ [
215
+ {
216
+ "fontFamily": "jobberpro-xbd",
217
+ },
218
+ {
219
+ "color": "rgb(1, 41, 57)",
220
+ },
221
+ {
222
+ "textAlign": "left",
223
+ },
224
+ {
225
+ "fontSize": 20,
226
+ "lineHeight": 22,
227
+ },
228
+ {
229
+ "letterSpacing": 0,
230
+ },
231
+ ]
232
+ }
233
+ >
234
+ Default Heading
235
+ </Text>
236
+ `;
237
+
238
+ exports[`when Heading called with title variation should match snapshot 1`] = `
239
+ <Text
240
+ accessibilityRole="header"
241
+ adjustsFontSizeToFit={false}
242
+ allowFontScaling={true}
243
+ collapsable={false}
244
+ maxFontSizeMultiplier={1.0625}
245
+ selectable={true}
246
+ selectionColor="rgb(160, 215, 42)"
247
+ style={
248
+ [
249
+ {
250
+ "fontFamily": "jobberpro-blk",
251
+ },
252
+ {
253
+ "color": "rgb(1, 41, 57)",
254
+ },
255
+ {
256
+ "textAlign": "left",
257
+ },
258
+ {
259
+ "fontSize": 32,
260
+ "lineHeight": 36,
261
+ },
262
+ {
263
+ "letterSpacing": 0,
264
+ },
265
+ ]
266
+ }
267
+ >
268
+ Title Heading
269
+ </Text>
270
+ `;
@@ -0,0 +1,2 @@
1
+ export { Heading } from "./Heading";
2
+ export type { HeadingLevel } from "./Heading";
package/src/index.ts CHANGED
@@ -9,4 +9,6 @@ export * from "./ActivityIndicator";
9
9
  export * from "./Card";
10
10
  export * from "./StatusLabel";
11
11
  export * from "./AtlantisContext";
12
+ export * from "./Button";
12
13
  export * from "./InputFieldWrapper";
14
+ export * from "./Heading";