@jobber/components-native 0.65.5 → 0.66.1-JOB-101940.4

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.
@@ -41,14 +41,14 @@ exports[`TextList when the bulletItems is provided displays the text list 1`] =
41
41
  collapsable={false}
42
42
  maxFontSizeMultiplier={3.125}
43
43
  selectable={true}
44
- selectionColor="rgb(132, 234, 0)"
44
+ selectionColor="hsl(86, 100%, 46%)"
45
45
  style={
46
46
  [
47
47
  {
48
48
  "fontFamily": "inter-regular",
49
49
  },
50
50
  {
51
- "color": "rgb(66, 78, 86)",
51
+ "color": "hsl(198, 35%, 21%)",
52
52
  },
53
53
  {
54
54
  "textAlign": "left",
@@ -80,14 +80,14 @@ exports[`TextList when the bulletItems is provided displays the text list 1`] =
80
80
  collapsable={false}
81
81
  maxFontSizeMultiplier={3.125}
82
82
  selectable={true}
83
- selectionColor="rgb(132, 234, 0)"
83
+ selectionColor="hsl(86, 100%, 46%)"
84
84
  style={
85
85
  [
86
86
  {
87
87
  "fontFamily": "inter-regular",
88
88
  },
89
89
  {
90
- "color": "rgb(66, 78, 86)",
90
+ "color": "hsl(198, 35%, 21%)",
91
91
  },
92
92
  {
93
93
  "textAlign": "left",
@@ -132,14 +132,14 @@ exports[`TextList when the bulletItems is provided displays the text list 1`] =
132
132
  collapsable={false}
133
133
  maxFontSizeMultiplier={3.125}
134
134
  selectable={true}
135
- selectionColor="rgb(132, 234, 0)"
135
+ selectionColor="hsl(86, 100%, 46%)"
136
136
  style={
137
137
  [
138
138
  {
139
139
  "fontFamily": "inter-regular",
140
140
  },
141
141
  {
142
- "color": "rgb(66, 78, 86)",
142
+ "color": "hsl(198, 35%, 21%)",
143
143
  },
144
144
  {
145
145
  "textAlign": "left",
@@ -171,14 +171,14 @@ exports[`TextList when the bulletItems is provided displays the text list 1`] =
171
171
  collapsable={false}
172
172
  maxFontSizeMultiplier={3.125}
173
173
  selectable={true}
174
- selectionColor="rgb(132, 234, 0)"
174
+ selectionColor="hsl(86, 100%, 46%)"
175
175
  style={
176
176
  [
177
177
  {
178
178
  "fontFamily": "inter-regular",
179
179
  },
180
180
  {
181
- "color": "rgb(66, 78, 86)",
181
+ "color": "hsl(198, 35%, 21%)",
182
182
  },
183
183
  {
184
184
  "textAlign": "left",
@@ -70,8 +70,8 @@ exports[`renders a thumbnail component with attachments 1`] = `
70
70
  style={
71
71
  [
72
72
  {
73
- "backgroundColor": "rgb(241, 239, 233)",
74
- "borderColor": "rgb(218, 224, 226)",
73
+ "backgroundColor": "hsl(53, 21%, 93%)",
74
+ "borderColor": "hsl(200, 13%, 87%)",
75
75
  "borderRadius": 8,
76
76
  "borderWidth": 1,
77
77
  "marginBottom": 8,
@@ -64,6 +64,10 @@ export const typographyTokens: { [index: string]: TextStyle } = {
64
64
  // { fontFamily }{ fontStyle }{ fontWeight }
65
65
  ...fonts,
66
66
 
67
+ italic: {
68
+ fontStyle: "italic",
69
+ },
70
+
67
71
  startAlign: {
68
72
  textAlign: "left",
69
73
  },
@@ -146,7 +146,7 @@ function InternalTypography<T extends FontFamily = "base">({
146
146
  }: TypographyProps<T>): JSX.Element {
147
147
  const sizeAndHeight = getSizeAndHeightStyle(size, lineHeight);
148
148
  const style: StyleProp<ViewStyle>[] = [
149
- getFontStyle(fontFamily, fontStyle, fontWeight),
149
+ getFontStyle(fontFamily, fontWeight),
150
150
  getColorStyle(color, reverseTheme),
151
151
  getAlignStyle(align),
152
152
  sizeAndHeight,
@@ -156,6 +156,11 @@ function InternalTypography<T extends FontFamily = "base">({
156
156
  if (strikeThrough) {
157
157
  style.push(styles.strikeThrough);
158
158
  }
159
+
160
+ if (fontStyle === "italic") {
161
+ style.push(styles.italic);
162
+ }
163
+
159
164
  const numberOfLinesForNativeText = maxNumberOfLines[maxLines];
160
165
 
161
166
  const text = getTransformedText(children, transform);
@@ -198,14 +203,11 @@ function getScaleMultiplier(maxFontScaleSize = 0, size = 1) {
198
203
 
199
204
  function getFontStyle(
200
205
  fontFamily: FontFamily = "base",
201
- fontStyle: FontStyle = "regular",
202
206
  fontWeight: FontWeight = "regular",
203
207
  ) {
204
208
  const defaultBaseFontStyling = styles.baseRegularRegular;
205
209
  const defaultDisplayFontStyling = styles.displayRegularBold;
206
- const styleKey = `${fontFamily}${capitalize(fontStyle)}${capitalize(
207
- fontWeight,
208
- )}`;
210
+ const styleKey = `${fontFamily}Regular${capitalize(fontWeight)}`;
209
211
  const fontStyling = styles[styleKey];
210
212
 
211
213
  if (fontStyling) {
@@ -7,14 +7,14 @@ exports[`renders text respecting the text direction 1`] = `
7
7
  allowFontScaling={true}
8
8
  collapsable={false}
9
9
  selectable={true}
10
- selectionColor="rgb(132, 234, 0)"
10
+ selectionColor="hsl(86, 100%, 46%)"
11
11
  style={
12
12
  [
13
13
  {
14
14
  "fontFamily": "inter-regular",
15
15
  },
16
16
  {
17
- "color": "rgba(101, 120, 132, 1)",
17
+ "color": "hsl(197, 15%, 45%)",
18
18
  },
19
19
  {
20
20
  "textAlign": "right",
@@ -41,14 +41,14 @@ exports[`renders text using the maxLines is also passed 1`] = `
41
41
  collapsable={false}
42
42
  numberOfLines={2}
43
43
  selectable={true}
44
- selectionColor="rgb(132, 234, 0)"
44
+ selectionColor="hsl(86, 100%, 46%)"
45
45
  style={
46
46
  [
47
47
  {
48
48
  "fontFamily": "inter-regular",
49
49
  },
50
50
  {
51
- "color": "rgba(101, 120, 132, 1)",
51
+ "color": "hsl(197, 15%, 45%)",
52
52
  },
53
53
  {
54
54
  "textAlign": "left",
@@ -75,14 +75,14 @@ exports[`renders text with adjustsFontSizeToFit set to true 1`] = `
75
75
  collapsable={false}
76
76
  numberOfLines={1}
77
77
  selectable={true}
78
- selectionColor="rgb(132, 234, 0)"
78
+ selectionColor="hsl(86, 100%, 46%)"
79
79
  style={
80
80
  [
81
81
  {
82
82
  "fontFamily": "inter-regular",
83
83
  },
84
84
  {
85
- "color": "rgba(101, 120, 132, 1)",
85
+ "color": "hsl(197, 15%, 45%)",
86
86
  },
87
87
  {
88
88
  "textAlign": "left",
@@ -108,14 +108,14 @@ exports[`renders text with black style and display as fontFamily 1`] = `
108
108
  allowFontScaling={true}
109
109
  collapsable={false}
110
110
  selectable={true}
111
- selectionColor="rgb(132, 234, 0)"
111
+ selectionColor="hsl(86, 100%, 46%)"
112
112
  style={
113
113
  [
114
114
  {
115
115
  "fontFamily": "jobberpro-blk",
116
116
  },
117
117
  {
118
- "color": "rgba(101, 120, 132, 1)",
118
+ "color": "hsl(197, 15%, 45%)",
119
119
  },
120
120
  {
121
121
  "textAlign": "left",
@@ -141,14 +141,14 @@ exports[`renders text with bold style 1`] = `
141
141
  allowFontScaling={true}
142
142
  collapsable={false}
143
143
  selectable={true}
144
- selectionColor="rgb(132, 234, 0)"
144
+ selectionColor="hsl(86, 100%, 46%)"
145
145
  style={
146
146
  [
147
147
  {
148
148
  "fontFamily": "inter-bold",
149
149
  },
150
150
  {
151
- "color": "rgba(101, 120, 132, 1)",
151
+ "color": "hsl(197, 15%, 45%)",
152
152
  },
153
153
  {
154
154
  "textAlign": "left",
@@ -174,14 +174,14 @@ exports[`renders text with bold style and display as fontFamily 1`] = `
174
174
  allowFontScaling={true}
175
175
  collapsable={false}
176
176
  selectable={true}
177
- selectionColor="rgb(132, 234, 0)"
177
+ selectionColor="hsl(86, 100%, 46%)"
178
178
  style={
179
179
  [
180
180
  {
181
181
  "fontFamily": "jobberpro-bd",
182
182
  },
183
183
  {
184
- "color": "rgba(101, 120, 132, 1)",
184
+ "color": "hsl(197, 15%, 45%)",
185
185
  },
186
186
  {
187
187
  "textAlign": "left",
@@ -207,14 +207,14 @@ exports[`renders text with bold weight and italic style 1`] = `
207
207
  allowFontScaling={true}
208
208
  collapsable={false}
209
209
  selectable={true}
210
- selectionColor="rgb(132, 234, 0)"
210
+ selectionColor="hsl(86, 100%, 46%)"
211
211
  style={
212
212
  [
213
213
  {
214
- "fontFamily": "inter-regular",
214
+ "fontFamily": "inter-bold",
215
215
  },
216
216
  {
217
- "color": "rgba(101, 120, 132, 1)",
217
+ "color": "hsl(197, 15%, 45%)",
218
218
  },
219
219
  {
220
220
  "textAlign": "left",
@@ -226,6 +226,9 @@ exports[`renders text with bold weight and italic style 1`] = `
226
226
  {
227
227
  "letterSpacing": 0,
228
228
  },
229
+ {
230
+ "fontStyle": "italic",
231
+ },
229
232
  ]
230
233
  }
231
234
  >
@@ -240,14 +243,14 @@ exports[`renders text with center align 1`] = `
240
243
  allowFontScaling={true}
241
244
  collapsable={false}
242
245
  selectable={true}
243
- selectionColor="rgb(132, 234, 0)"
246
+ selectionColor="hsl(86, 100%, 46%)"
244
247
  style={
245
248
  [
246
249
  {
247
250
  "fontFamily": "inter-regular",
248
251
  },
249
252
  {
250
- "color": "rgba(101, 120, 132, 1)",
253
+ "color": "hsl(197, 15%, 45%)",
251
254
  },
252
255
  {
253
256
  "textAlign": "center",
@@ -273,14 +276,14 @@ exports[`renders text with default color 1`] = `
273
276
  allowFontScaling={true}
274
277
  collapsable={false}
275
278
  selectable={true}
276
- selectionColor="rgb(132, 234, 0)"
279
+ selectionColor="hsl(86, 100%, 46%)"
277
280
  style={
278
281
  [
279
282
  {
280
283
  "fontFamily": "inter-regular",
281
284
  },
282
285
  {
283
- "color": "rgba(101, 120, 132, 1)",
286
+ "color": "hsl(197, 15%, 45%)",
284
287
  },
285
288
  {
286
289
  "textAlign": "left",
@@ -306,14 +309,14 @@ exports[`renders text with default size 1`] = `
306
309
  allowFontScaling={true}
307
310
  collapsable={false}
308
311
  selectable={true}
309
- selectionColor="rgb(132, 234, 0)"
312
+ selectionColor="hsl(86, 100%, 46%)"
310
313
  style={
311
314
  [
312
315
  {
313
316
  "fontFamily": "inter-regular",
314
317
  },
315
318
  {
316
- "color": "rgba(101, 120, 132, 1)",
319
+ "color": "hsl(197, 15%, 45%)",
317
320
  },
318
321
  {
319
322
  "textAlign": "left",
@@ -339,14 +342,14 @@ exports[`renders text with extraBold weight and display as fontFamily 1`] = `
339
342
  allowFontScaling={true}
340
343
  collapsable={false}
341
344
  selectable={true}
342
- selectionColor="rgb(132, 234, 0)"
345
+ selectionColor="hsl(86, 100%, 46%)"
343
346
  style={
344
347
  [
345
348
  {
346
349
  "fontFamily": "jobberpro-xbd",
347
350
  },
348
351
  {
349
- "color": "rgba(101, 120, 132, 1)",
352
+ "color": "hsl(197, 15%, 45%)",
350
353
  },
351
354
  {
352
355
  "textAlign": "left",
@@ -372,14 +375,14 @@ exports[`renders text with green color 1`] = `
372
375
  allowFontScaling={true}
373
376
  collapsable={false}
374
377
  selectable={true}
375
- selectionColor="rgb(132, 234, 0)"
378
+ selectionColor="hsl(86, 100%, 46%)"
376
379
  style={
377
380
  [
378
381
  {
379
382
  "fontFamily": "inter-regular",
380
383
  },
381
384
  {
382
- "color": "rgb(50, 130, 28)",
385
+ "color": "hsl(107, 58%, 33%)",
383
386
  },
384
387
  {
385
388
  "textAlign": "left",
@@ -405,14 +408,14 @@ exports[`renders text with italic style 1`] = `
405
408
  allowFontScaling={true}
406
409
  collapsable={false}
407
410
  selectable={true}
408
- selectionColor="rgb(132, 234, 0)"
411
+ selectionColor="hsl(86, 100%, 46%)"
409
412
  style={
410
413
  [
411
414
  {
412
415
  "fontFamily": "inter-regular",
413
416
  },
414
417
  {
415
- "color": "rgba(101, 120, 132, 1)",
418
+ "color": "hsl(197, 15%, 45%)",
416
419
  },
417
420
  {
418
421
  "textAlign": "left",
@@ -424,6 +427,9 @@ exports[`renders text with italic style 1`] = `
424
427
  {
425
428
  "letterSpacing": 0,
426
429
  },
430
+ {
431
+ "fontStyle": "italic",
432
+ },
427
433
  ]
428
434
  }
429
435
  >
@@ -438,14 +444,14 @@ exports[`renders text with large size 1`] = `
438
444
  allowFontScaling={true}
439
445
  collapsable={false}
440
446
  selectable={true}
441
- selectionColor="rgb(132, 234, 0)"
447
+ selectionColor="hsl(86, 100%, 46%)"
442
448
  style={
443
449
  [
444
450
  {
445
451
  "fontFamily": "inter-regular",
446
452
  },
447
453
  {
448
- "color": "rgba(101, 120, 132, 1)",
454
+ "color": "hsl(197, 15%, 45%)",
449
455
  },
450
456
  {
451
457
  "textAlign": "left",
@@ -471,14 +477,14 @@ exports[`renders text with letter spacing 1`] = `
471
477
  allowFontScaling={true}
472
478
  collapsable={false}
473
479
  selectable={true}
474
- selectionColor="rgb(132, 234, 0)"
480
+ selectionColor="hsl(86, 100%, 46%)"
475
481
  style={
476
482
  [
477
483
  {
478
484
  "fontFamily": "inter-regular",
479
485
  },
480
486
  {
481
- "color": "rgba(101, 120, 132, 1)",
487
+ "color": "hsl(197, 15%, 45%)",
482
488
  },
483
489
  {
484
490
  "textAlign": "left",
@@ -504,14 +510,14 @@ exports[`renders text with line height override 1`] = `
504
510
  allowFontScaling={true}
505
511
  collapsable={false}
506
512
  selectable={true}
507
- selectionColor="rgb(132, 234, 0)"
513
+ selectionColor="hsl(86, 100%, 46%)"
508
514
  style={
509
515
  [
510
516
  {
511
517
  "fontFamily": "inter-regular",
512
518
  },
513
519
  {
514
- "color": "rgba(101, 120, 132, 1)",
520
+ "color": "hsl(197, 15%, 45%)",
515
521
  },
516
522
  {
517
523
  "textAlign": "left",
@@ -537,14 +543,14 @@ exports[`renders text with lowercase transform 1`] = `
537
543
  allowFontScaling={true}
538
544
  collapsable={false}
539
545
  selectable={true}
540
- selectionColor="rgb(132, 234, 0)"
546
+ selectionColor="hsl(86, 100%, 46%)"
541
547
  style={
542
548
  [
543
549
  {
544
550
  "fontFamily": "inter-regular",
545
551
  },
546
552
  {
547
- "color": "rgba(101, 120, 132, 1)",
553
+ "color": "hsl(197, 15%, 45%)",
548
554
  },
549
555
  {
550
556
  "textAlign": "left",
@@ -570,7 +576,7 @@ exports[`renders text with multiple properties 1`] = `
570
576
  allowFontScaling={true}
571
577
  collapsable={false}
572
578
  selectable={true}
573
- selectionColor="rgb(132, 234, 0)"
579
+ selectionColor="hsl(86, 100%, 46%)"
574
580
  style={
575
581
  [
576
582
  {
@@ -603,14 +609,14 @@ exports[`renders text with no additional props 1`] = `
603
609
  allowFontScaling={true}
604
610
  collapsable={false}
605
611
  selectable={true}
606
- selectionColor="rgb(132, 234, 0)"
612
+ selectionColor="hsl(86, 100%, 46%)"
607
613
  style={
608
614
  [
609
615
  {
610
616
  "fontFamily": "inter-regular",
611
617
  },
612
618
  {
613
- "color": "rgba(101, 120, 132, 1)",
619
+ "color": "hsl(197, 15%, 45%)",
614
620
  },
615
621
  {
616
622
  "textAlign": "left",
@@ -636,14 +642,14 @@ exports[`renders text with regular style 1`] = `
636
642
  allowFontScaling={true}
637
643
  collapsable={false}
638
644
  selectable={true}
639
- selectionColor="rgb(132, 234, 0)"
645
+ selectionColor="hsl(86, 100%, 46%)"
640
646
  style={
641
647
  [
642
648
  {
643
649
  "fontFamily": "inter-regular",
644
650
  },
645
651
  {
646
- "color": "rgba(101, 120, 132, 1)",
652
+ "color": "hsl(197, 15%, 45%)",
647
653
  },
648
654
  {
649
655
  "textAlign": "left",
@@ -669,14 +675,14 @@ exports[`renders text with reverseTheme false with reversible color 1`] = `
669
675
  allowFontScaling={true}
670
676
  collapsable={false}
671
677
  selectable={true}
672
- selectionColor="rgb(132, 234, 0)"
678
+ selectionColor="hsl(86, 100%, 46%)"
673
679
  style={
674
680
  [
675
681
  {
676
682
  "fontFamily": "inter-regular",
677
683
  },
678
684
  {
679
- "color": "rgb(14, 78, 26)",
685
+ "color": "hsl(107, 64%, 16%)",
680
686
  },
681
687
  {
682
688
  "textAlign": "left",
@@ -702,14 +708,14 @@ exports[`renders text with reverseTheme true with reversible color 1`] = `
702
708
  allowFontScaling={true}
703
709
  collapsable={false}
704
710
  selectable={true}
705
- selectionColor="rgb(132, 234, 0)"
711
+ selectionColor="hsl(86, 100%, 46%)"
706
712
  style={
707
713
  [
708
714
  {
709
715
  "fontFamily": "inter-regular",
710
716
  },
711
717
  {
712
- "color": "rgb(50, 130, 28)",
718
+ "color": "hsl(107, 58%, 33%)",
713
719
  },
714
720
  {
715
721
  "textAlign": "left",
@@ -735,14 +741,14 @@ exports[`renders text with small size 1`] = `
735
741
  allowFontScaling={true}
736
742
  collapsable={false}
737
743
  selectable={true}
738
- selectionColor="rgb(132, 234, 0)"
744
+ selectionColor="hsl(86, 100%, 46%)"
739
745
  style={
740
746
  [
741
747
  {
742
748
  "fontFamily": "inter-regular",
743
749
  },
744
750
  {
745
- "color": "rgba(101, 120, 132, 1)",
751
+ "color": "hsl(197, 15%, 45%)",
746
752
  },
747
753
  {
748
754
  "textAlign": "left",
@@ -768,14 +774,14 @@ exports[`renders text with strikethough styling 1`] = `
768
774
  allowFontScaling={true}
769
775
  collapsable={false}
770
776
  selectable={true}
771
- selectionColor="rgb(132, 234, 0)"
777
+ selectionColor="hsl(86, 100%, 46%)"
772
778
  style={
773
779
  [
774
780
  {
775
781
  "fontFamily": "inter-regular",
776
782
  },
777
783
  {
778
- "color": "rgba(101, 120, 132, 1)",
784
+ "color": "hsl(197, 15%, 45%)",
779
785
  },
780
786
  {
781
787
  "textAlign": "left",
@@ -804,14 +810,14 @@ exports[`renders text with uppercase transform 1`] = `
804
810
  allowFontScaling={true}
805
811
  collapsable={false}
806
812
  selectable={true}
807
- selectionColor="rgb(132, 234, 0)"
813
+ selectionColor="hsl(86, 100%, 46%)"
808
814
  style={
809
815
  [
810
816
  {
811
817
  "fontFamily": "inter-regular",
812
818
  },
813
819
  {
814
- "color": "rgba(101, 120, 132, 1)",
820
+ "color": "hsl(197, 15%, 45%)",
815
821
  },
816
822
  {
817
823
  "textAlign": "left",
@@ -837,7 +843,7 @@ exports[`renders text with white color 1`] = `
837
843
  allowFontScaling={true}
838
844
  collapsable={false}
839
845
  selectable={true}
840
- selectionColor="rgb(132, 234, 0)"
846
+ selectionColor="hsl(86, 100%, 46%)"
841
847
  style={
842
848
  [
843
849
  {