@carbon/type 10.44.0 → 10.45.1
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/es/index.js +43 -21
- package/lib/index.js +43 -21
- package/package.json +2 -2
- package/scss/_inlined/_styles.scss +15 -14
- package/scss/_styles.scss +15 -14
- package/src/__tests__/__snapshots__/styles-test.js.snap +2 -2
- package/src/__tests__/fluid-test.js +4 -5
- package/src/scale.js +25 -23
- package/src/styles.js +15 -17
- package/umd/index.js +43 -21
package/es/index.js
CHANGED
|
@@ -210,8 +210,32 @@ function getTypeSize(step) {
|
|
|
210
210
|
*
|
|
211
211
|
* > Array.from({ length: 23 }, (_, i) => getTypeSize(i + 1))
|
|
212
212
|
*/
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
//values in pixels
|
|
214
|
+
|
|
215
|
+
var scale = [12, //scale[0]
|
|
216
|
+
14, //scale[1]
|
|
217
|
+
16, //scale[2]
|
|
218
|
+
18, //scale[3]
|
|
219
|
+
20, //scale[4]
|
|
220
|
+
24, //scale[5]
|
|
221
|
+
28, //scale[6]
|
|
222
|
+
32, //scale[7]
|
|
223
|
+
36, //scale[8]
|
|
224
|
+
42, //scale[9]
|
|
225
|
+
48, //scale[10]
|
|
226
|
+
54, //scale[11]
|
|
227
|
+
60, //scale[12]
|
|
228
|
+
68, //scale[13]
|
|
229
|
+
76, //scale[14]
|
|
230
|
+
84, //scale[15]
|
|
231
|
+
92, //scale[16]
|
|
232
|
+
102, //scale[17]
|
|
233
|
+
112, //scale[18]
|
|
234
|
+
122, //scale[19]
|
|
235
|
+
132, //scale[20]
|
|
236
|
+
144, //scale[21]
|
|
237
|
+
156 //scale[22]
|
|
238
|
+
];
|
|
215
239
|
|
|
216
240
|
function ownKeys(object, enumerableOnly) {
|
|
217
241
|
var keys = Object.keys(object);
|
|
@@ -440,7 +464,7 @@ var expressiveHeading03$1 = {
|
|
|
440
464
|
breakpoints: {
|
|
441
465
|
xlg: {
|
|
442
466
|
fontSize: rem(scale[4]),
|
|
443
|
-
lineHeight: 1.
|
|
467
|
+
lineHeight: 1.4
|
|
444
468
|
},
|
|
445
469
|
max: {
|
|
446
470
|
fontSize: rem(scale[5]),
|
|
@@ -456,10 +480,12 @@ var expressiveHeading04$1 = {
|
|
|
456
480
|
breakpoints: {
|
|
457
481
|
xlg: {
|
|
458
482
|
fontSize: rem(scale[6]),
|
|
459
|
-
lineHeight: 1.25
|
|
483
|
+
lineHeight: 1.25,
|
|
484
|
+
fontWeight: fontWeights.regular
|
|
460
485
|
},
|
|
461
486
|
max: {
|
|
462
|
-
fontSize: rem(scale[7])
|
|
487
|
+
fontSize: rem(scale[7]),
|
|
488
|
+
fontWeight: fontWeights.regular
|
|
463
489
|
}
|
|
464
490
|
}
|
|
465
491
|
};
|
|
@@ -477,19 +503,16 @@ var expressiveHeading05$1 = {
|
|
|
477
503
|
},
|
|
478
504
|
lg: {
|
|
479
505
|
fontSize: rem(scale[9]),
|
|
480
|
-
fontWeight: fontWeights.light,
|
|
481
506
|
lineHeight: 1.19,
|
|
482
507
|
letterSpacing: 0
|
|
483
508
|
},
|
|
484
509
|
xlg: {
|
|
485
510
|
fontSize: rem(scale[10]),
|
|
486
|
-
fontWeight: fontWeights.light,
|
|
487
511
|
lineHeight: 1.17,
|
|
488
512
|
letterSpacing: 0
|
|
489
513
|
},
|
|
490
514
|
max: {
|
|
491
515
|
fontSize: rem(scale[12]),
|
|
492
|
-
fontWeight: fontWeights.light,
|
|
493
516
|
letterSpacing: 0
|
|
494
517
|
}
|
|
495
518
|
}
|
|
@@ -648,44 +671,43 @@ var display03$1 = {
|
|
|
648
671
|
letterSpacing: 0,
|
|
649
672
|
breakpoints: {
|
|
650
673
|
md: {
|
|
651
|
-
fontSize: rem(scale[
|
|
652
|
-
lineHeight: 1.
|
|
674
|
+
fontSize: rem(scale[11]),
|
|
675
|
+
lineHeight: 1.18
|
|
653
676
|
},
|
|
654
677
|
lg: {
|
|
655
|
-
fontSize: rem(scale[
|
|
656
|
-
lineHeight: 1.
|
|
678
|
+
fontSize: rem(scale[12]),
|
|
679
|
+
lineHeight: 1.16,
|
|
657
680
|
letterSpacing: px(-0.64)
|
|
658
681
|
},
|
|
659
682
|
xlg: {
|
|
660
|
-
fontSize: rem(scale[
|
|
661
|
-
lineHeight: 1.
|
|
683
|
+
fontSize: rem(scale[14]),
|
|
684
|
+
lineHeight: 1.13
|
|
662
685
|
},
|
|
663
686
|
max: {
|
|
664
|
-
fontSize: rem(scale[
|
|
665
|
-
lineHeight: 1.
|
|
687
|
+
fontSize: rem(scale[15]),
|
|
688
|
+
lineHeight: 1.11,
|
|
666
689
|
letterSpacing: px(-0.96)
|
|
667
690
|
}
|
|
668
691
|
}
|
|
669
692
|
};
|
|
670
693
|
var display04$1 = {
|
|
671
694
|
fontSize: rem(scale[9]),
|
|
672
|
-
fontWeight: fontWeights.
|
|
695
|
+
fontWeight: fontWeights.light,
|
|
673
696
|
lineHeight: 1.19,
|
|
674
697
|
letterSpacing: 0,
|
|
675
698
|
breakpoints: {
|
|
676
699
|
md: {
|
|
677
700
|
fontSize: rem(scale[13]),
|
|
678
|
-
lineHeight: 1.
|
|
701
|
+
lineHeight: 1.14
|
|
679
702
|
},
|
|
680
703
|
lg: {
|
|
681
704
|
fontSize: rem(scale[16]),
|
|
682
|
-
lineHeight: 1.
|
|
705
|
+
lineHeight: 1.1,
|
|
683
706
|
letterSpacing: px(-0.64)
|
|
684
707
|
},
|
|
685
708
|
xlg: {
|
|
686
709
|
fontSize: rem(scale[19]),
|
|
687
|
-
lineHeight: 1.
|
|
688
|
-
letterSpacing: px(-0.64)
|
|
710
|
+
lineHeight: 1.06
|
|
689
711
|
},
|
|
690
712
|
max: {
|
|
691
713
|
fontSize: rem(scale[22]),
|
package/lib/index.js
CHANGED
|
@@ -214,8 +214,32 @@ function getTypeSize(step) {
|
|
|
214
214
|
*
|
|
215
215
|
* > Array.from({ length: 23 }, (_, i) => getTypeSize(i + 1))
|
|
216
216
|
*/
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
//values in pixels
|
|
218
|
+
|
|
219
|
+
var scale = [12, //scale[0]
|
|
220
|
+
14, //scale[1]
|
|
221
|
+
16, //scale[2]
|
|
222
|
+
18, //scale[3]
|
|
223
|
+
20, //scale[4]
|
|
224
|
+
24, //scale[5]
|
|
225
|
+
28, //scale[6]
|
|
226
|
+
32, //scale[7]
|
|
227
|
+
36, //scale[8]
|
|
228
|
+
42, //scale[9]
|
|
229
|
+
48, //scale[10]
|
|
230
|
+
54, //scale[11]
|
|
231
|
+
60, //scale[12]
|
|
232
|
+
68, //scale[13]
|
|
233
|
+
76, //scale[14]
|
|
234
|
+
84, //scale[15]
|
|
235
|
+
92, //scale[16]
|
|
236
|
+
102, //scale[17]
|
|
237
|
+
112, //scale[18]
|
|
238
|
+
122, //scale[19]
|
|
239
|
+
132, //scale[20]
|
|
240
|
+
144, //scale[21]
|
|
241
|
+
156 //scale[22]
|
|
242
|
+
];
|
|
219
243
|
|
|
220
244
|
function ownKeys(object, enumerableOnly) {
|
|
221
245
|
var keys = Object.keys(object);
|
|
@@ -444,7 +468,7 @@ var expressiveHeading03$1 = {
|
|
|
444
468
|
breakpoints: {
|
|
445
469
|
xlg: {
|
|
446
470
|
fontSize: rem(scale[4]),
|
|
447
|
-
lineHeight: 1.
|
|
471
|
+
lineHeight: 1.4
|
|
448
472
|
},
|
|
449
473
|
max: {
|
|
450
474
|
fontSize: rem(scale[5]),
|
|
@@ -460,10 +484,12 @@ var expressiveHeading04$1 = {
|
|
|
460
484
|
breakpoints: {
|
|
461
485
|
xlg: {
|
|
462
486
|
fontSize: rem(scale[6]),
|
|
463
|
-
lineHeight: 1.25
|
|
487
|
+
lineHeight: 1.25,
|
|
488
|
+
fontWeight: fontWeights.regular
|
|
464
489
|
},
|
|
465
490
|
max: {
|
|
466
|
-
fontSize: rem(scale[7])
|
|
491
|
+
fontSize: rem(scale[7]),
|
|
492
|
+
fontWeight: fontWeights.regular
|
|
467
493
|
}
|
|
468
494
|
}
|
|
469
495
|
};
|
|
@@ -481,19 +507,16 @@ var expressiveHeading05$1 = {
|
|
|
481
507
|
},
|
|
482
508
|
lg: {
|
|
483
509
|
fontSize: rem(scale[9]),
|
|
484
|
-
fontWeight: fontWeights.light,
|
|
485
510
|
lineHeight: 1.19,
|
|
486
511
|
letterSpacing: 0
|
|
487
512
|
},
|
|
488
513
|
xlg: {
|
|
489
514
|
fontSize: rem(scale[10]),
|
|
490
|
-
fontWeight: fontWeights.light,
|
|
491
515
|
lineHeight: 1.17,
|
|
492
516
|
letterSpacing: 0
|
|
493
517
|
},
|
|
494
518
|
max: {
|
|
495
519
|
fontSize: rem(scale[12]),
|
|
496
|
-
fontWeight: fontWeights.light,
|
|
497
520
|
letterSpacing: 0
|
|
498
521
|
}
|
|
499
522
|
}
|
|
@@ -652,44 +675,43 @@ var display03$1 = {
|
|
|
652
675
|
letterSpacing: 0,
|
|
653
676
|
breakpoints: {
|
|
654
677
|
md: {
|
|
655
|
-
fontSize: rem(scale[
|
|
656
|
-
lineHeight: 1.
|
|
678
|
+
fontSize: rem(scale[11]),
|
|
679
|
+
lineHeight: 1.18
|
|
657
680
|
},
|
|
658
681
|
lg: {
|
|
659
|
-
fontSize: rem(scale[
|
|
660
|
-
lineHeight: 1.
|
|
682
|
+
fontSize: rem(scale[12]),
|
|
683
|
+
lineHeight: 1.16,
|
|
661
684
|
letterSpacing: px(-0.64)
|
|
662
685
|
},
|
|
663
686
|
xlg: {
|
|
664
|
-
fontSize: rem(scale[
|
|
665
|
-
lineHeight: 1.
|
|
687
|
+
fontSize: rem(scale[14]),
|
|
688
|
+
lineHeight: 1.13
|
|
666
689
|
},
|
|
667
690
|
max: {
|
|
668
|
-
fontSize: rem(scale[
|
|
669
|
-
lineHeight: 1.
|
|
691
|
+
fontSize: rem(scale[15]),
|
|
692
|
+
lineHeight: 1.11,
|
|
670
693
|
letterSpacing: px(-0.96)
|
|
671
694
|
}
|
|
672
695
|
}
|
|
673
696
|
};
|
|
674
697
|
var display04$1 = {
|
|
675
698
|
fontSize: rem(scale[9]),
|
|
676
|
-
fontWeight: fontWeights.
|
|
699
|
+
fontWeight: fontWeights.light,
|
|
677
700
|
lineHeight: 1.19,
|
|
678
701
|
letterSpacing: 0,
|
|
679
702
|
breakpoints: {
|
|
680
703
|
md: {
|
|
681
704
|
fontSize: rem(scale[13]),
|
|
682
|
-
lineHeight: 1.
|
|
705
|
+
lineHeight: 1.14
|
|
683
706
|
},
|
|
684
707
|
lg: {
|
|
685
708
|
fontSize: rem(scale[16]),
|
|
686
|
-
lineHeight: 1.
|
|
709
|
+
lineHeight: 1.1,
|
|
687
710
|
letterSpacing: px(-0.64)
|
|
688
711
|
},
|
|
689
712
|
xlg: {
|
|
690
713
|
fontSize: rem(scale[19]),
|
|
691
|
-
lineHeight: 1.
|
|
692
|
-
letterSpacing: px(-0.64)
|
|
714
|
+
lineHeight: 1.06
|
|
693
715
|
},
|
|
694
716
|
max: {
|
|
695
717
|
fontSize: rem(scale[22]),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/type",
|
|
3
3
|
"description": "Typography for digital and software products using the Carbon Design System",
|
|
4
|
-
"version": "10.
|
|
4
|
+
"version": "10.45.1",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"sassDir": "scss",
|
|
53
53
|
"needs": "^1.3.0"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "f194dfb8beb09cf2ad62b521c65fddf3a439069b"
|
|
56
56
|
}
|
|
@@ -338,7 +338,7 @@ $expressive-heading-03: (
|
|
|
338
338
|
breakpoints: (
|
|
339
339
|
xlg: (
|
|
340
340
|
font-size: carbon--type-scale(5),
|
|
341
|
-
line-height: 1.
|
|
341
|
+
line-height: 1.4,
|
|
342
342
|
),
|
|
343
343
|
max: (
|
|
344
344
|
font-size: carbon--type-scale(6),
|
|
@@ -364,9 +364,11 @@ $expressive-heading-04: (
|
|
|
364
364
|
xlg: (
|
|
365
365
|
font-size: carbon--type-scale(7),
|
|
366
366
|
line-height: 1.25,
|
|
367
|
+
font-weight: carbon--font-weight('regular'),
|
|
367
368
|
),
|
|
368
369
|
max: (
|
|
369
370
|
font-size: carbon--type-scale(8),
|
|
371
|
+
font-weight: carbon--font-weight('regular'),
|
|
370
372
|
),
|
|
371
373
|
),
|
|
372
374
|
) !default;
|
|
@@ -604,22 +606,22 @@ $display-03: (
|
|
|
604
606
|
letter-spacing: 0,
|
|
605
607
|
breakpoints: (
|
|
606
608
|
md: (
|
|
607
|
-
font-size: carbon--type-scale(
|
|
608
|
-
line-height: 1.
|
|
609
|
+
font-size: carbon--type-scale(12),
|
|
610
|
+
line-height: 1.18,
|
|
609
611
|
),
|
|
610
612
|
lg: (
|
|
611
|
-
font-size: carbon--type-scale(
|
|
612
|
-
line-height: 1.
|
|
613
|
+
font-size: carbon--type-scale(13),
|
|
614
|
+
line-height: 1.16,
|
|
613
615
|
letter-spacing: -0.64px,
|
|
614
616
|
),
|
|
615
617
|
xlg: (
|
|
616
|
-
font-size: carbon--type-scale(
|
|
617
|
-
line-height: 1.
|
|
618
|
+
font-size: carbon--type-scale(15),
|
|
619
|
+
line-height: 1.13,
|
|
618
620
|
letter-spacing: -0.64px,
|
|
619
621
|
),
|
|
620
622
|
max: (
|
|
621
|
-
font-size: carbon--type-scale(
|
|
622
|
-
line-height: 1.
|
|
623
|
+
font-size: carbon--type-scale(16),
|
|
624
|
+
line-height: 1.11,
|
|
623
625
|
letter-spacing: -0.96px,
|
|
624
626
|
),
|
|
625
627
|
),
|
|
@@ -635,23 +637,22 @@ $fluid-display-03: $display-03 !default;
|
|
|
635
637
|
/// @group @carbon/type
|
|
636
638
|
$display-04: (
|
|
637
639
|
font-size: carbon--type-scale(10),
|
|
638
|
-
font-weight: carbon--font-weight('
|
|
640
|
+
font-weight: carbon--font-weight('light'),
|
|
639
641
|
line-height: 1.19,
|
|
640
642
|
letter-spacing: 0,
|
|
641
643
|
breakpoints: (
|
|
642
644
|
md: (
|
|
643
645
|
font-size: carbon--type-scale(14),
|
|
644
|
-
line-height: 1.
|
|
646
|
+
line-height: 1.14,
|
|
645
647
|
),
|
|
646
648
|
lg: (
|
|
647
649
|
font-size: carbon--type-scale(17),
|
|
648
|
-
line-height: 1.
|
|
650
|
+
line-height: 1.1,
|
|
649
651
|
letter-spacing: -0.64px,
|
|
650
652
|
),
|
|
651
653
|
xlg: (
|
|
652
654
|
font-size: carbon--type-scale(20),
|
|
653
|
-
line-height: 1.
|
|
654
|
-
letter-spacing: -0.64px,
|
|
655
|
+
line-height: 1.06,
|
|
655
656
|
),
|
|
656
657
|
max: (
|
|
657
658
|
font-size: carbon--type-scale(23),
|
package/scss/_styles.scss
CHANGED
|
@@ -338,7 +338,7 @@ $expressive-heading-03: (
|
|
|
338
338
|
breakpoints: (
|
|
339
339
|
xlg: (
|
|
340
340
|
font-size: carbon--type-scale(5),
|
|
341
|
-
line-height: 1.
|
|
341
|
+
line-height: 1.4,
|
|
342
342
|
),
|
|
343
343
|
max: (
|
|
344
344
|
font-size: carbon--type-scale(6),
|
|
@@ -364,9 +364,11 @@ $expressive-heading-04: (
|
|
|
364
364
|
xlg: (
|
|
365
365
|
font-size: carbon--type-scale(7),
|
|
366
366
|
line-height: 1.25,
|
|
367
|
+
font-weight: carbon--font-weight('regular'),
|
|
367
368
|
),
|
|
368
369
|
max: (
|
|
369
370
|
font-size: carbon--type-scale(8),
|
|
371
|
+
font-weight: carbon--font-weight('regular'),
|
|
370
372
|
),
|
|
371
373
|
),
|
|
372
374
|
) !default;
|
|
@@ -604,22 +606,22 @@ $display-03: (
|
|
|
604
606
|
letter-spacing: 0,
|
|
605
607
|
breakpoints: (
|
|
606
608
|
md: (
|
|
607
|
-
font-size: carbon--type-scale(
|
|
608
|
-
line-height: 1.
|
|
609
|
+
font-size: carbon--type-scale(12),
|
|
610
|
+
line-height: 1.18,
|
|
609
611
|
),
|
|
610
612
|
lg: (
|
|
611
|
-
font-size: carbon--type-scale(
|
|
612
|
-
line-height: 1.
|
|
613
|
+
font-size: carbon--type-scale(13),
|
|
614
|
+
line-height: 1.16,
|
|
613
615
|
letter-spacing: -0.64px,
|
|
614
616
|
),
|
|
615
617
|
xlg: (
|
|
616
|
-
font-size: carbon--type-scale(
|
|
617
|
-
line-height: 1.
|
|
618
|
+
font-size: carbon--type-scale(15),
|
|
619
|
+
line-height: 1.13,
|
|
618
620
|
letter-spacing: -0.64px,
|
|
619
621
|
),
|
|
620
622
|
max: (
|
|
621
|
-
font-size: carbon--type-scale(
|
|
622
|
-
line-height: 1.
|
|
623
|
+
font-size: carbon--type-scale(16),
|
|
624
|
+
line-height: 1.11,
|
|
623
625
|
letter-spacing: -0.96px,
|
|
624
626
|
),
|
|
625
627
|
),
|
|
@@ -635,23 +637,22 @@ $fluid-display-03: $display-03 !default;
|
|
|
635
637
|
/// @group @carbon/type
|
|
636
638
|
$display-04: (
|
|
637
639
|
font-size: carbon--type-scale(10),
|
|
638
|
-
font-weight: carbon--font-weight('
|
|
640
|
+
font-weight: carbon--font-weight('light'),
|
|
639
641
|
line-height: 1.19,
|
|
640
642
|
letter-spacing: 0,
|
|
641
643
|
breakpoints: (
|
|
642
644
|
md: (
|
|
643
645
|
font-size: carbon--type-scale(14),
|
|
644
|
-
line-height: 1.
|
|
646
|
+
line-height: 1.14,
|
|
645
647
|
),
|
|
646
648
|
lg: (
|
|
647
649
|
font-size: carbon--type-scale(17),
|
|
648
|
-
line-height: 1.
|
|
650
|
+
line-height: 1.1,
|
|
649
651
|
letter-spacing: -0.64px,
|
|
650
652
|
),
|
|
651
653
|
xlg: (
|
|
652
654
|
font-size: carbon--type-scale(20),
|
|
653
|
-
line-height: 1.
|
|
654
|
-
letter-spacing: -0.64px,
|
|
655
|
+
line-height: 1.06,
|
|
655
656
|
),
|
|
656
657
|
max: (
|
|
657
658
|
font-size: carbon--type-scale(23),
|
|
@@ -109,7 +109,7 @@ letter-spacing: 0;"
|
|
|
109
109
|
|
|
110
110
|
exports[`styles display04 should be printable 1`] = `
|
|
111
111
|
"font-size: 2.625rem;
|
|
112
|
-
font-weight:
|
|
112
|
+
font-weight: 300;
|
|
113
113
|
line-height: 1.19;
|
|
114
114
|
letter-spacing: 0;"
|
|
115
115
|
`;
|
|
@@ -186,7 +186,7 @@ letter-spacing: 0;"
|
|
|
186
186
|
|
|
187
187
|
exports[`styles fluidDisplay04 should be printable 1`] = `
|
|
188
188
|
"font-size: 2.625rem;
|
|
189
|
-
font-weight:
|
|
189
|
+
font-weight: 300;
|
|
190
190
|
line-height: 1.19;
|
|
191
191
|
letter-spacing: 0;"
|
|
192
192
|
`;
|
|
@@ -44,17 +44,16 @@ describe('fluid', () => {
|
|
|
44
44
|
Object {
|
|
45
45
|
"@media (min-width: 42rem)": Object {
|
|
46
46
|
"fontSize": "calc(4.25rem + 1.5 * ((100vw - 42rem) / 24))",
|
|
47
|
-
"lineHeight": 1.
|
|
47
|
+
"lineHeight": 1.14,
|
|
48
48
|
},
|
|
49
49
|
"@media (min-width: 66rem)": Object {
|
|
50
50
|
"fontSize": "calc(5.75rem + 1.875 * ((100vw - 66rem) / 16))",
|
|
51
51
|
"letterSpacing": "-0.64px",
|
|
52
|
-
"lineHeight": 1.
|
|
52
|
+
"lineHeight": 1.1,
|
|
53
53
|
},
|
|
54
54
|
"@media (min-width: 82rem)": Object {
|
|
55
55
|
"fontSize": "calc(7.625rem + 2.125 * ((100vw - 82rem) / 17))",
|
|
56
|
-
"
|
|
57
|
-
"lineHeight": 1.07,
|
|
56
|
+
"lineHeight": 1.06,
|
|
58
57
|
},
|
|
59
58
|
"@media (min-width: 99rem)": Object {
|
|
60
59
|
"fontSize": "9.75rem",
|
|
@@ -62,7 +61,7 @@ describe('fluid', () => {
|
|
|
62
61
|
"lineHeight": 1.05,
|
|
63
62
|
},
|
|
64
63
|
"fontSize": "calc(2.625rem + 1.625 * ((100vw - 20rem) / 22))",
|
|
65
|
-
"fontWeight":
|
|
64
|
+
"fontWeight": 300,
|
|
66
65
|
"letterSpacing": 0,
|
|
67
66
|
"lineHeight": 1.19,
|
|
68
67
|
}
|
package/src/scale.js
CHANGED
|
@@ -24,28 +24,30 @@ export function getTypeSize(step) {
|
|
|
24
24
|
*
|
|
25
25
|
* > Array.from({ length: 23 }, (_, i) => getTypeSize(i + 1))
|
|
26
26
|
*/
|
|
27
|
+
|
|
28
|
+
//values in pixels
|
|
27
29
|
export const scale = [
|
|
28
|
-
12,
|
|
29
|
-
14,
|
|
30
|
-
16,
|
|
31
|
-
18,
|
|
32
|
-
20,
|
|
33
|
-
24,
|
|
34
|
-
28,
|
|
35
|
-
32,
|
|
36
|
-
36,
|
|
37
|
-
42,
|
|
38
|
-
48,
|
|
39
|
-
54,
|
|
40
|
-
60,
|
|
41
|
-
68,
|
|
42
|
-
76,
|
|
43
|
-
84,
|
|
44
|
-
92,
|
|
45
|
-
102,
|
|
46
|
-
112,
|
|
47
|
-
122,
|
|
48
|
-
132,
|
|
49
|
-
144,
|
|
50
|
-
156,
|
|
30
|
+
12, //scale[0]
|
|
31
|
+
14, //scale[1]
|
|
32
|
+
16, //scale[2]
|
|
33
|
+
18, //scale[3]
|
|
34
|
+
20, //scale[4]
|
|
35
|
+
24, //scale[5]
|
|
36
|
+
28, //scale[6]
|
|
37
|
+
32, //scale[7]
|
|
38
|
+
36, //scale[8]
|
|
39
|
+
42, //scale[9]
|
|
40
|
+
48, //scale[10]
|
|
41
|
+
54, //scale[11]
|
|
42
|
+
60, //scale[12]
|
|
43
|
+
68, //scale[13]
|
|
44
|
+
76, //scale[14]
|
|
45
|
+
84, //scale[15]
|
|
46
|
+
92, //scale[16]
|
|
47
|
+
102, //scale[17]
|
|
48
|
+
112, //scale[18]
|
|
49
|
+
122, //scale[19]
|
|
50
|
+
132, //scale[20]
|
|
51
|
+
144, //scale[21]
|
|
52
|
+
156, //scale[22]
|
|
51
53
|
];
|
package/src/styles.js
CHANGED
|
@@ -175,7 +175,7 @@ export const expressiveHeading03 = {
|
|
|
175
175
|
breakpoints: {
|
|
176
176
|
xlg: {
|
|
177
177
|
fontSize: rem(scale[4]),
|
|
178
|
-
lineHeight: 1.
|
|
178
|
+
lineHeight: 1.4,
|
|
179
179
|
},
|
|
180
180
|
max: {
|
|
181
181
|
fontSize: rem(scale[5]),
|
|
@@ -193,9 +193,11 @@ export const expressiveHeading04 = {
|
|
|
193
193
|
xlg: {
|
|
194
194
|
fontSize: rem(scale[6]),
|
|
195
195
|
lineHeight: 1.25,
|
|
196
|
+
fontWeight: fontWeights.regular,
|
|
196
197
|
},
|
|
197
198
|
max: {
|
|
198
199
|
fontSize: rem(scale[7]),
|
|
200
|
+
fontWeight: fontWeights.regular,
|
|
199
201
|
},
|
|
200
202
|
},
|
|
201
203
|
};
|
|
@@ -214,19 +216,16 @@ export const expressiveHeading05 = {
|
|
|
214
216
|
},
|
|
215
217
|
lg: {
|
|
216
218
|
fontSize: rem(scale[9]),
|
|
217
|
-
fontWeight: fontWeights.light,
|
|
218
219
|
lineHeight: 1.19,
|
|
219
220
|
letterSpacing: 0,
|
|
220
221
|
},
|
|
221
222
|
xlg: {
|
|
222
223
|
fontSize: rem(scale[10]),
|
|
223
|
-
fontWeight: fontWeights.light,
|
|
224
224
|
lineHeight: 1.17,
|
|
225
225
|
letterSpacing: 0,
|
|
226
226
|
},
|
|
227
227
|
max: {
|
|
228
228
|
fontSize: rem(scale[12]),
|
|
229
|
-
fontWeight: fontWeights.light,
|
|
230
229
|
letterSpacing: 0,
|
|
231
230
|
},
|
|
232
231
|
},
|
|
@@ -392,21 +391,21 @@ export const display03 = {
|
|
|
392
391
|
letterSpacing: 0,
|
|
393
392
|
breakpoints: {
|
|
394
393
|
md: {
|
|
395
|
-
fontSize: rem(scale[
|
|
396
|
-
lineHeight: 1.
|
|
394
|
+
fontSize: rem(scale[11]),
|
|
395
|
+
lineHeight: 1.18,
|
|
397
396
|
},
|
|
398
397
|
lg: {
|
|
399
|
-
fontSize: rem(scale[
|
|
400
|
-
lineHeight: 1.
|
|
398
|
+
fontSize: rem(scale[12]),
|
|
399
|
+
lineHeight: 1.16,
|
|
401
400
|
letterSpacing: px(-0.64),
|
|
402
401
|
},
|
|
403
402
|
xlg: {
|
|
404
|
-
fontSize: rem(scale[
|
|
405
|
-
lineHeight: 1.
|
|
403
|
+
fontSize: rem(scale[14]),
|
|
404
|
+
lineHeight: 1.13,
|
|
406
405
|
},
|
|
407
406
|
max: {
|
|
408
|
-
fontSize: rem(scale[
|
|
409
|
-
lineHeight: 1.
|
|
407
|
+
fontSize: rem(scale[15]),
|
|
408
|
+
lineHeight: 1.11,
|
|
410
409
|
letterSpacing: px(-0.96),
|
|
411
410
|
},
|
|
412
411
|
},
|
|
@@ -414,23 +413,22 @@ export const display03 = {
|
|
|
414
413
|
|
|
415
414
|
export const display04 = {
|
|
416
415
|
fontSize: rem(scale[9]),
|
|
417
|
-
fontWeight: fontWeights.
|
|
416
|
+
fontWeight: fontWeights.light,
|
|
418
417
|
lineHeight: 1.19,
|
|
419
418
|
letterSpacing: 0,
|
|
420
419
|
breakpoints: {
|
|
421
420
|
md: {
|
|
422
421
|
fontSize: rem(scale[13]),
|
|
423
|
-
lineHeight: 1.
|
|
422
|
+
lineHeight: 1.14,
|
|
424
423
|
},
|
|
425
424
|
lg: {
|
|
426
425
|
fontSize: rem(scale[16]),
|
|
427
|
-
lineHeight: 1.
|
|
426
|
+
lineHeight: 1.1,
|
|
428
427
|
letterSpacing: px(-0.64),
|
|
429
428
|
},
|
|
430
429
|
xlg: {
|
|
431
430
|
fontSize: rem(scale[19]),
|
|
432
|
-
lineHeight: 1.
|
|
433
|
-
letterSpacing: px(-0.64),
|
|
431
|
+
lineHeight: 1.06,
|
|
434
432
|
},
|
|
435
433
|
max: {
|
|
436
434
|
fontSize: rem(scale[22]),
|
package/umd/index.js
CHANGED
|
@@ -216,8 +216,32 @@
|
|
|
216
216
|
*
|
|
217
217
|
* > Array.from({ length: 23 }, (_, i) => getTypeSize(i + 1))
|
|
218
218
|
*/
|
|
219
|
-
|
|
220
|
-
|
|
219
|
+
//values in pixels
|
|
220
|
+
|
|
221
|
+
var scale = [12, //scale[0]
|
|
222
|
+
14, //scale[1]
|
|
223
|
+
16, //scale[2]
|
|
224
|
+
18, //scale[3]
|
|
225
|
+
20, //scale[4]
|
|
226
|
+
24, //scale[5]
|
|
227
|
+
28, //scale[6]
|
|
228
|
+
32, //scale[7]
|
|
229
|
+
36, //scale[8]
|
|
230
|
+
42, //scale[9]
|
|
231
|
+
48, //scale[10]
|
|
232
|
+
54, //scale[11]
|
|
233
|
+
60, //scale[12]
|
|
234
|
+
68, //scale[13]
|
|
235
|
+
76, //scale[14]
|
|
236
|
+
84, //scale[15]
|
|
237
|
+
92, //scale[16]
|
|
238
|
+
102, //scale[17]
|
|
239
|
+
112, //scale[18]
|
|
240
|
+
122, //scale[19]
|
|
241
|
+
132, //scale[20]
|
|
242
|
+
144, //scale[21]
|
|
243
|
+
156 //scale[22]
|
|
244
|
+
];
|
|
221
245
|
|
|
222
246
|
function ownKeys(object, enumerableOnly) {
|
|
223
247
|
var keys = Object.keys(object);
|
|
@@ -446,7 +470,7 @@
|
|
|
446
470
|
breakpoints: {
|
|
447
471
|
xlg: {
|
|
448
472
|
fontSize: rem(scale[4]),
|
|
449
|
-
lineHeight: 1.
|
|
473
|
+
lineHeight: 1.4
|
|
450
474
|
},
|
|
451
475
|
max: {
|
|
452
476
|
fontSize: rem(scale[5]),
|
|
@@ -462,10 +486,12 @@
|
|
|
462
486
|
breakpoints: {
|
|
463
487
|
xlg: {
|
|
464
488
|
fontSize: rem(scale[6]),
|
|
465
|
-
lineHeight: 1.25
|
|
489
|
+
lineHeight: 1.25,
|
|
490
|
+
fontWeight: fontWeights.regular
|
|
466
491
|
},
|
|
467
492
|
max: {
|
|
468
|
-
fontSize: rem(scale[7])
|
|
493
|
+
fontSize: rem(scale[7]),
|
|
494
|
+
fontWeight: fontWeights.regular
|
|
469
495
|
}
|
|
470
496
|
}
|
|
471
497
|
};
|
|
@@ -483,19 +509,16 @@
|
|
|
483
509
|
},
|
|
484
510
|
lg: {
|
|
485
511
|
fontSize: rem(scale[9]),
|
|
486
|
-
fontWeight: fontWeights.light,
|
|
487
512
|
lineHeight: 1.19,
|
|
488
513
|
letterSpacing: 0
|
|
489
514
|
},
|
|
490
515
|
xlg: {
|
|
491
516
|
fontSize: rem(scale[10]),
|
|
492
|
-
fontWeight: fontWeights.light,
|
|
493
517
|
lineHeight: 1.17,
|
|
494
518
|
letterSpacing: 0
|
|
495
519
|
},
|
|
496
520
|
max: {
|
|
497
521
|
fontSize: rem(scale[12]),
|
|
498
|
-
fontWeight: fontWeights.light,
|
|
499
522
|
letterSpacing: 0
|
|
500
523
|
}
|
|
501
524
|
}
|
|
@@ -654,44 +677,43 @@
|
|
|
654
677
|
letterSpacing: 0,
|
|
655
678
|
breakpoints: {
|
|
656
679
|
md: {
|
|
657
|
-
fontSize: rem(scale[
|
|
658
|
-
lineHeight: 1.
|
|
680
|
+
fontSize: rem(scale[11]),
|
|
681
|
+
lineHeight: 1.18
|
|
659
682
|
},
|
|
660
683
|
lg: {
|
|
661
|
-
fontSize: rem(scale[
|
|
662
|
-
lineHeight: 1.
|
|
684
|
+
fontSize: rem(scale[12]),
|
|
685
|
+
lineHeight: 1.16,
|
|
663
686
|
letterSpacing: px(-0.64)
|
|
664
687
|
},
|
|
665
688
|
xlg: {
|
|
666
|
-
fontSize: rem(scale[
|
|
667
|
-
lineHeight: 1.
|
|
689
|
+
fontSize: rem(scale[14]),
|
|
690
|
+
lineHeight: 1.13
|
|
668
691
|
},
|
|
669
692
|
max: {
|
|
670
|
-
fontSize: rem(scale[
|
|
671
|
-
lineHeight: 1.
|
|
693
|
+
fontSize: rem(scale[15]),
|
|
694
|
+
lineHeight: 1.11,
|
|
672
695
|
letterSpacing: px(-0.96)
|
|
673
696
|
}
|
|
674
697
|
}
|
|
675
698
|
};
|
|
676
699
|
var display04$1 = {
|
|
677
700
|
fontSize: rem(scale[9]),
|
|
678
|
-
fontWeight: fontWeights.
|
|
701
|
+
fontWeight: fontWeights.light,
|
|
679
702
|
lineHeight: 1.19,
|
|
680
703
|
letterSpacing: 0,
|
|
681
704
|
breakpoints: {
|
|
682
705
|
md: {
|
|
683
706
|
fontSize: rem(scale[13]),
|
|
684
|
-
lineHeight: 1.
|
|
707
|
+
lineHeight: 1.14
|
|
685
708
|
},
|
|
686
709
|
lg: {
|
|
687
710
|
fontSize: rem(scale[16]),
|
|
688
|
-
lineHeight: 1.
|
|
711
|
+
lineHeight: 1.1,
|
|
689
712
|
letterSpacing: px(-0.64)
|
|
690
713
|
},
|
|
691
714
|
xlg: {
|
|
692
715
|
fontSize: rem(scale[19]),
|
|
693
|
-
lineHeight: 1.
|
|
694
|
-
letterSpacing: px(-0.64)
|
|
716
|
+
lineHeight: 1.06
|
|
695
717
|
},
|
|
696
718
|
max: {
|
|
697
719
|
fontSize: rem(scale[22]),
|