@jobber/components-native 0.1.2-pree.21 → 0.1.2-pree.22

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.
@@ -1,10 +1,4 @@
1
1
  import { TextStyle } from "react-native";
2
- /**
3
- * Reusable typography tokens to ensure consistency for any client facing texts.
4
- */
5
- export declare const typographyStyles: {
6
- [index: string]: TextStyle;
7
- };
8
2
  /**
9
3
  * `StyleSheet` for Typography.tsx.
10
4
  *
@@ -15,6 +9,9 @@ export declare const typographyStyles: {
15
9
  * import { typographyStyles } from "@jobber/components-native"
16
10
  * ```
17
11
  */
18
- export declare const styles: {
12
+ /**
13
+ * Reusable typography tokens to ensure consistency for any client facing texts.
14
+ */
15
+ export declare const typographyStyles: {
19
16
  [index: string]: TextStyle;
20
17
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components-native",
3
- "version": "0.1.2-pree.21+78c02b0f",
3
+ "version": "0.1.2-pree.22+413b2161",
4
4
  "license": "MIT",
5
5
  "main": "dist/src/index.js",
6
6
  "module": "dist/src/index.js",
@@ -37,5 +37,5 @@
37
37
  "react": "^18",
38
38
  "react-native": ">=0.69.2"
39
39
  },
40
- "gitHead": "78c02b0f8f8f0b75b880b420437b12d9e9002b7c"
40
+ "gitHead": "413b2161fc2340578d89fba935942b6afbeba98a"
41
41
  }
@@ -11,353 +11,352 @@ const tightLineHeight = tokens["typography--lineHeight-tight"];
11
11
  const minisculeLineHeight = tokens["typography--lineHeight-miniscule"];
12
12
 
13
13
  /**
14
- * Reusable typography tokens to ensure consistency for any client facing texts.
14
+ * `StyleSheet` for Typography.tsx.
15
+ *
16
+ * If you find yourself needing to use what's inside this object on files other
17
+ * than `<Typography />`, please import from `@jobber/components-native` instead.
18
+ *
19
+ * ```
20
+ * import { typographyStyles } from "@jobber/components-native"
21
+ * ```
15
22
  */
16
- export const typographyStyles: { [index: string]: TextStyle } = {
17
- // This follows a pattern of
18
- // { fontFamily }{ fontStyle }{ fontWeight }
19
- baseRegularRegular: {
20
- fontFamily: "inter-regular",
21
- },
22
-
23
- baseRegularMedium: {
24
- fontFamily: "inter-medium",
25
- },
26
-
27
- baseRegularBold: {
28
- fontFamily: "inter-bold",
29
- },
30
-
31
- baseRegularSemiBold: {
32
- fontFamily: "inter-semibold",
33
- },
34
-
35
- baseRegularExtraBold: {
36
- fontFamily: "inter-extrabold",
37
- },
38
-
39
- displayRegularBold: {
40
- fontFamily: "jobberpro-bd",
41
- },
42
-
43
- displayRegularExtraBold: {
44
- fontFamily: "jobberpro-xbd",
45
- },
46
-
47
- displayRegularBlack: {
48
- fontFamily: "jobberpro-blk",
49
- },
50
-
51
- startAlign: {
52
- textAlign: "left",
53
- },
54
-
55
- endAlign: {
56
- textAlign: "right",
57
- },
58
-
59
- centerAlign: {
60
- textAlign: "center",
61
- },
62
-
63
- justifyAlign: {
64
- textAlign: "justify",
65
- },
66
-
67
- blue: {
68
- color: tokens["color-heading"],
69
- },
70
-
71
- blueDark: {
72
- color: tokens["color-blue--dark"],
73
- },
74
-
75
- white: {
76
- color: tokens["color-white"],
77
- },
78
23
 
79
- green: {
80
- color: tokens["color-green"],
81
- },
82
-
83
- greenDark: {
84
- color: tokens["color-green--dark"],
85
- },
86
-
87
- grey: {
88
- color: tokens["color-grey"],
89
- },
90
-
91
- greyDark: {
92
- color: tokens["color-grey--dark"],
93
- },
94
-
95
- greyBlue: {
96
- color: tokens["color-greyBlue"],
97
- },
98
-
99
- greyBlueDark: {
100
- color: tokens["color-greyBlue--dark"],
101
- },
102
-
103
- lightBlue: {
104
- color: tokens["color-lightBlue"],
105
- },
106
-
107
- lightBlueDark: {
108
- color: tokens["color-lightBlue--dark"],
109
- },
110
-
111
- red: {
112
- color: tokens["color-red"],
113
- },
114
-
115
- redDark: {
116
- color: tokens["color-red--dark"],
117
- },
118
-
119
- yellow: {
120
- color: tokens["color-yellow"],
121
- },
24
+ /**
25
+ * Reusable typography tokens to ensure consistency for any client facing texts.
26
+ */
27
+ export const typographyStyles: { [index: string]: TextStyle } =
28
+ StyleSheet.create({
29
+ // This follows a pattern of
30
+ // { fontFamily }{ fontStyle }{ fontWeight }
31
+ baseRegularRegular: {
32
+ fontFamily: "inter-regular",
33
+ },
34
+
35
+ baseRegularMedium: {
36
+ fontFamily: "inter-medium",
37
+ },
38
+
39
+ baseRegularBold: {
40
+ fontFamily: "inter-bold",
41
+ },
42
+
43
+ baseRegularSemiBold: {
44
+ fontFamily: "inter-semibold",
45
+ },
46
+
47
+ baseRegularExtraBold: {
48
+ fontFamily: "inter-extrabold",
49
+ },
50
+
51
+ displayRegularBold: {
52
+ fontFamily: "jobberpro-bd",
53
+ },
54
+
55
+ displayRegularExtraBold: {
56
+ fontFamily: "jobberpro-xbd",
57
+ },
58
+
59
+ displayRegularBlack: {
60
+ fontFamily: "jobberpro-blk",
61
+ },
62
+
63
+ startAlign: {
64
+ textAlign: "left",
65
+ },
66
+
67
+ endAlign: {
68
+ textAlign: "right",
69
+ },
70
+
71
+ centerAlign: {
72
+ textAlign: "center",
73
+ },
74
+
75
+ justifyAlign: {
76
+ textAlign: "justify",
77
+ },
78
+
79
+ blue: {
80
+ color: tokens["color-heading"],
81
+ },
82
+
83
+ blueDark: {
84
+ color: tokens["color-blue--dark"],
85
+ },
86
+
87
+ white: {
88
+ color: tokens["color-white"],
89
+ },
90
+
91
+ green: {
92
+ color: tokens["color-green"],
93
+ },
94
+
95
+ greenDark: {
96
+ color: tokens["color-green--dark"],
97
+ },
98
+
99
+ grey: {
100
+ color: tokens["color-grey"],
101
+ },
102
+
103
+ greyDark: {
104
+ color: tokens["color-grey--dark"],
105
+ },
106
+
107
+ greyBlue: {
108
+ color: tokens["color-greyBlue"],
109
+ },
110
+
111
+ greyBlueDark: {
112
+ color: tokens["color-greyBlue--dark"],
113
+ },
114
+
115
+ lightBlue: {
116
+ color: tokens["color-lightBlue"],
117
+ },
118
+
119
+ lightBlueDark: {
120
+ color: tokens["color-lightBlue--dark"],
121
+ },
122
+
123
+ red: {
124
+ color: tokens["color-red"],
125
+ },
126
+
127
+ redDark: {
128
+ color: tokens["color-red--dark"],
129
+ },
122
130
 
123
- yellowDark: {
124
- color: tokens["color-yellow--dark"],
125
- },
131
+ yellow: {
132
+ color: tokens["color-yellow"],
133
+ },
126
134
 
127
- yellowGreenDark: {
128
- color: tokens["color-yellowGreen--dark"],
129
- },
135
+ yellowDark: {
136
+ color: tokens["color-yellow--dark"],
137
+ },
130
138
 
131
- orangeDark: {
132
- color: tokens["color-orange--dark"],
133
- },
139
+ yellowGreenDark: {
140
+ color: tokens["color-yellowGreen--dark"],
141
+ },
134
142
 
135
- navyDark: {
136
- color: tokens["color-navy--dark"],
137
- },
143
+ orangeDark: {
144
+ color: tokens["color-orange--dark"],
145
+ },
138
146
 
139
- limeDark: {
140
- color: tokens["color-lime--dark"],
141
- },
147
+ navyDark: {
148
+ color: tokens["color-navy--dark"],
149
+ },
142
150
 
143
- purpleDark: {
144
- color: tokens["color-purple--dark"],
145
- },
151
+ limeDark: {
152
+ color: tokens["color-lime--dark"],
153
+ },
146
154
 
147
- pinkDark: {
148
- color: tokens["color-pink--dark"],
149
- },
155
+ purpleDark: {
156
+ color: tokens["color-purple--dark"],
157
+ },
150
158
 
151
- tealDark: {
152
- color: tokens["color-teal--dark"],
153
- },
159
+ pinkDark: {
160
+ color: tokens["color-pink--dark"],
161
+ },
154
162
 
155
- indigoDark: {
156
- color: tokens["color-indigo--dark"],
157
- },
163
+ tealDark: {
164
+ color: tokens["color-teal--dark"],
165
+ },
158
166
 
159
- navy: {
160
- color: tokens["color-navy"],
161
- },
167
+ indigoDark: {
168
+ color: tokens["color-indigo--dark"],
169
+ },
162
170
 
163
- heading: {
164
- color: tokens["color-heading"],
165
- },
171
+ navy: {
172
+ color: tokens["color-navy"],
173
+ },
166
174
 
167
- headingReverse: {
168
- color: tokens["color-text--reverse"],
169
- },
175
+ heading: {
176
+ color: tokens["color-heading"],
177
+ },
170
178
 
171
- text: {
172
- color: tokens["color-text"],
173
- },
179
+ headingReverse: {
180
+ color: tokens["color-text--reverse"],
181
+ },
174
182
 
175
- textSecondary: {
176
- color: tokens["color-text--secondary"],
177
- },
183
+ text: {
184
+ color: tokens["color-text"],
185
+ },
178
186
 
179
- textReverse: {
180
- color: tokens["color-text--reverse"],
181
- },
187
+ textSecondary: {
188
+ color: tokens["color-text--secondary"],
189
+ },
182
190
 
183
- textReverseSecondary: {
184
- color: tokens["color-text--reverse--secondary"],
185
- },
191
+ textReverse: {
192
+ color: tokens["color-text--reverse"],
193
+ },
186
194
 
187
- success: {
188
- color: tokens["color-success--onSurface"],
189
- },
190
-
191
- error: {
192
- color: tokens["color-critical"],
193
- },
194
-
195
- base: {
196
- color: tokens["color-text"],
197
- },
198
-
199
- subdued: {
200
- color: tokens["color-text--secondary"],
201
- },
202
-
203
- warn: {
204
- color: tokens["color-warning--onSurface"],
205
- },
206
-
207
- info: {
208
- color: tokens["color-informative--onSurface"],
209
- },
210
-
211
- critical: {
212
- color: tokens["color-critical"],
213
- },
214
-
215
- successReverse: {
216
- color: tokens["color-success"],
217
- },
218
-
219
- errorReverse: {
220
- color: tokens["color-critical"],
221
- },
222
-
223
- baseReverse: {
224
- color: tokens["color-text--reverse"],
225
- },
226
-
227
- subduedReverse: {
228
- color: tokens["color-text--reverse--secondary"],
229
- },
230
-
231
- warnReverse: {
232
- color: tokens["color-warning"],
233
- },
234
-
235
- infoReverse: {
236
- color: tokens["color-informative"],
237
- },
238
-
239
- criticalReverse: {
240
- color: tokens["color-critical"],
241
- },
242
-
243
- interactive: {
244
- color: tokens["color-interactive"],
245
- },
246
-
247
- destructive: {
248
- color: tokens["color-destructive"],
249
- },
250
-
251
- learning: {
252
- color: tokens["color-informative"],
253
- },
254
-
255
- subtle: {
256
- color: tokens["color-interactive--subtle"],
257
- },
258
-
259
- onPrimary: {
260
- color: tokens["color-surface"],
261
- },
262
-
263
- disabled: {
264
- color: tokens["color-disabled"],
265
- },
266
-
267
- smallestSize: {
268
- fontSize: tokens["typography--fontSize-smallest"],
269
- lineHeight: minisculeLineHeight,
270
- },
271
-
272
- smallerSize: {
273
- fontSize: tokens["typography--fontSize-smaller"],
274
- lineHeight: tightLineHeight,
275
- },
276
-
277
- smallSize: {
278
- fontSize: tokens["typography--fontSize-small"],
279
- lineHeight: tightLineHeight,
280
- },
281
-
282
- defaultSize: {
283
- fontSize: tokens["typography--fontSize-base"],
284
- lineHeight: baseLineHeight,
285
- },
286
-
287
- largeSize: {
288
- fontSize: tokens["typography--fontSize-large"],
289
- lineHeight: largeLineHeight,
290
- },
291
-
292
- largerSize: {
293
- fontSize: tokens["typography--fontSize-larger"],
294
- lineHeight: largeLineHeight,
295
- },
296
-
297
- largestSize: {
298
- fontSize: tokens["typography--fontSize-largest"],
299
- lineHeight: largerLineHeight,
300
- },
301
-
302
- jumboSize: {
303
- fontSize: tokens["typography--fontSize-jumbo"],
304
- lineHeight: jumboLineHeight,
305
- },
306
-
307
- extravagantSize: {
308
- fontSize: tokens["typography--fontSize-extravagant"],
309
- lineHeight: extravagantLineHeight,
310
- },
311
-
312
- extravagantLineHeight: {
313
- lineHeight: extravagantLineHeight,
314
- },
315
-
316
- jumboLineHeight: {
317
- lineHeight: jumboLineHeight,
318
- },
319
-
320
- largestLineHeight: {
321
- lineHeight: largestLineHeight,
322
- },
323
- largerLineHeight: {
324
- lineHeight: largerLineHeight,
325
- },
326
-
327
- largeLineHeight: {
328
- lineHeight: largeLineHeight,
329
- },
330
-
331
- baseLineHeight: {
332
- lineHeight: baseLineHeight,
333
- },
334
-
335
- tightLineHeight: {
336
- lineHeight: tightLineHeight,
337
- },
338
-
339
- baseLetterSpacing: {
340
- letterSpacing: tokens["typography--letterSpacing-base"],
341
- },
342
-
343
- looseLetterSpacing: {
344
- letterSpacing: tokens["typography--letterSpacing-loose"],
345
- },
346
-
347
- strikeThrough: {
348
- textDecorationLine: "line-through",
349
- },
350
- };
195
+ textReverseSecondary: {
196
+ color: tokens["color-text--reverse--secondary"],
197
+ },
351
198
 
352
- /**
353
- * `StyleSheet` for Typography.tsx.
354
- *
355
- * If you find yourself needing to use what's inside this object on files other
356
- * than `<Typography />`, please import from `@jobber/components-native` instead.
357
- *
358
- * ```
359
- * import { typographyStyles } from "@jobber/components-native"
360
- * ```
361
- */
362
- export const styles: { [index: string]: TextStyle } =
363
- StyleSheet.create(typographyStyles);
199
+ success: {
200
+ color: tokens["color-success--onSurface"],
201
+ },
202
+
203
+ error: {
204
+ color: tokens["color-critical"],
205
+ },
206
+
207
+ base: {
208
+ color: tokens["color-text"],
209
+ },
210
+
211
+ subdued: {
212
+ color: tokens["color-text--secondary"],
213
+ },
214
+
215
+ warn: {
216
+ color: tokens["color-warning--onSurface"],
217
+ },
218
+
219
+ info: {
220
+ color: tokens["color-informative--onSurface"],
221
+ },
222
+
223
+ critical: {
224
+ color: tokens["color-critical"],
225
+ },
226
+
227
+ successReverse: {
228
+ color: tokens["color-success"],
229
+ },
230
+
231
+ errorReverse: {
232
+ color: tokens["color-critical"],
233
+ },
234
+
235
+ baseReverse: {
236
+ color: tokens["color-text--reverse"],
237
+ },
238
+
239
+ subduedReverse: {
240
+ color: tokens["color-text--reverse--secondary"],
241
+ },
242
+
243
+ warnReverse: {
244
+ color: tokens["color-warning"],
245
+ },
246
+
247
+ infoReverse: {
248
+ color: tokens["color-informative"],
249
+ },
250
+
251
+ criticalReverse: {
252
+ color: tokens["color-critical"],
253
+ },
254
+
255
+ interactive: {
256
+ color: tokens["color-interactive"],
257
+ },
258
+
259
+ destructive: {
260
+ color: tokens["color-destructive"],
261
+ },
262
+
263
+ learning: {
264
+ color: tokens["color-informative"],
265
+ },
266
+
267
+ subtle: {
268
+ color: tokens["color-interactive--subtle"],
269
+ },
270
+
271
+ onPrimary: {
272
+ color: tokens["color-surface"],
273
+ },
274
+
275
+ disabled: {
276
+ color: tokens["color-disabled"],
277
+ },
278
+
279
+ smallestSize: {
280
+ fontSize: tokens["typography--fontSize-smallest"],
281
+ lineHeight: minisculeLineHeight,
282
+ },
283
+
284
+ smallerSize: {
285
+ fontSize: tokens["typography--fontSize-smaller"],
286
+ lineHeight: tightLineHeight,
287
+ },
288
+
289
+ smallSize: {
290
+ fontSize: tokens["typography--fontSize-small"],
291
+ lineHeight: tightLineHeight,
292
+ },
293
+
294
+ defaultSize: {
295
+ fontSize: tokens["typography--fontSize-base"],
296
+ lineHeight: baseLineHeight,
297
+ },
298
+
299
+ largeSize: {
300
+ fontSize: tokens["typography--fontSize-large"],
301
+ lineHeight: largeLineHeight,
302
+ },
303
+
304
+ largerSize: {
305
+ fontSize: tokens["typography--fontSize-larger"],
306
+ lineHeight: largeLineHeight,
307
+ },
308
+
309
+ largestSize: {
310
+ fontSize: tokens["typography--fontSize-largest"],
311
+ lineHeight: largerLineHeight,
312
+ },
313
+
314
+ jumboSize: {
315
+ fontSize: tokens["typography--fontSize-jumbo"],
316
+ lineHeight: jumboLineHeight,
317
+ },
318
+
319
+ extravagantSize: {
320
+ fontSize: tokens["typography--fontSize-extravagant"],
321
+ lineHeight: extravagantLineHeight,
322
+ },
323
+
324
+ extravagantLineHeight: {
325
+ lineHeight: extravagantLineHeight,
326
+ },
327
+
328
+ jumboLineHeight: {
329
+ lineHeight: jumboLineHeight,
330
+ },
331
+
332
+ largestLineHeight: {
333
+ lineHeight: largestLineHeight,
334
+ },
335
+ largerLineHeight: {
336
+ lineHeight: largerLineHeight,
337
+ },
338
+
339
+ largeLineHeight: {
340
+ lineHeight: largeLineHeight,
341
+ },
342
+
343
+ baseLineHeight: {
344
+ lineHeight: baseLineHeight,
345
+ },
346
+
347
+ tightLineHeight: {
348
+ lineHeight: tightLineHeight,
349
+ },
350
+
351
+ baseLetterSpacing: {
352
+ letterSpacing: tokens["typography--letterSpacing-base"],
353
+ },
354
+
355
+ looseLetterSpacing: {
356
+ letterSpacing: tokens["typography--letterSpacing-loose"],
357
+ },
358
+
359
+ strikeThrough: {
360
+ textDecorationLine: "line-through",
361
+ },
362
+ });