@carbon/type 10.43.2 → 10.45.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.
- package/es/index.js +44 -23
- package/lib/index.js +44 -23
- package/package.json +4 -4
- package/scss/_inlined/_styles.scss +16 -16
- package/scss/_inlined/font-face/_mono.scss +914 -178
- package/scss/_inlined/font-face/_sans-condensed.scss +866 -159
- package/scss/_inlined/font-face/_sans.scss +1033 -204
- package/scss/_inlined/font-face/_serif.scss +914 -178
- package/scss/_styles.scss +16 -16
- package/scss/font-face/_mono.scss +914 -178
- package/scss/font-face/_sans-condensed.scss +866 -159
- package/scss/font-face/_sans.scss +1033 -204
- package/scss/font-face/_serif.scss +914 -178
- package/src/__tests__/__snapshots__/styles-test.js.snap +6 -6
- package/src/__tests__/fluid-test.js +4 -5
- package/src/scale.js +25 -23
- package/src/styles.js +16 -19
- package/umd/index.js +44 -23
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);
|
|
@@ -410,7 +434,7 @@ var productiveHeading04$1 = {
|
|
|
410
434
|
};
|
|
411
435
|
var productiveHeading05$1 = {
|
|
412
436
|
fontSize: rem(scale[7]),
|
|
413
|
-
fontWeight: fontWeights.
|
|
437
|
+
fontWeight: fontWeights.light,
|
|
414
438
|
lineHeight: 1.25,
|
|
415
439
|
letterSpacing: 0
|
|
416
440
|
};
|
|
@@ -456,40 +480,38 @@ 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.light
|
|
460
485
|
},
|
|
461
486
|
max: {
|
|
462
|
-
fontSize: rem(scale[7])
|
|
487
|
+
fontSize: rem(scale[7]),
|
|
488
|
+
fontWeight: fontWeights.light
|
|
463
489
|
}
|
|
464
490
|
}
|
|
465
491
|
};
|
|
466
492
|
var expressiveHeading05$1 = {
|
|
467
493
|
fontSize: rem(scale[7]),
|
|
468
|
-
fontWeight: fontWeights.
|
|
494
|
+
fontWeight: fontWeights.light,
|
|
469
495
|
lineHeight: 1.25,
|
|
470
496
|
letterSpacing: 0,
|
|
471
497
|
breakpoints: {
|
|
472
498
|
md: {
|
|
473
499
|
fontSize: rem(scale[8]),
|
|
474
|
-
fontWeight: fontWeights.light,
|
|
475
500
|
lineHeight: 1.22,
|
|
476
501
|
letterSpacing: 0
|
|
477
502
|
},
|
|
478
503
|
lg: {
|
|
479
504
|
fontSize: rem(scale[9]),
|
|
480
|
-
fontWeight: fontWeights.light,
|
|
481
505
|
lineHeight: 1.19,
|
|
482
506
|
letterSpacing: 0
|
|
483
507
|
},
|
|
484
508
|
xlg: {
|
|
485
509
|
fontSize: rem(scale[10]),
|
|
486
|
-
fontWeight: fontWeights.light,
|
|
487
510
|
lineHeight: 1.17,
|
|
488
511
|
letterSpacing: 0
|
|
489
512
|
},
|
|
490
513
|
max: {
|
|
491
514
|
fontSize: rem(scale[12]),
|
|
492
|
-
fontWeight: fontWeights.light,
|
|
493
515
|
letterSpacing: 0
|
|
494
516
|
}
|
|
495
517
|
}
|
|
@@ -648,44 +670,43 @@ var display03$1 = {
|
|
|
648
670
|
letterSpacing: 0,
|
|
649
671
|
breakpoints: {
|
|
650
672
|
md: {
|
|
651
|
-
fontSize: rem(scale[
|
|
652
|
-
lineHeight: 1.
|
|
673
|
+
fontSize: rem(scale[11]),
|
|
674
|
+
lineHeight: 1.18
|
|
653
675
|
},
|
|
654
676
|
lg: {
|
|
655
|
-
fontSize: rem(scale[
|
|
656
|
-
lineHeight: 1.
|
|
677
|
+
fontSize: rem(scale[12]),
|
|
678
|
+
lineHeight: 1.16,
|
|
657
679
|
letterSpacing: px(-0.64)
|
|
658
680
|
},
|
|
659
681
|
xlg: {
|
|
660
|
-
fontSize: rem(scale[
|
|
661
|
-
lineHeight: 1.
|
|
682
|
+
fontSize: rem(scale[14]),
|
|
683
|
+
lineHeight: 1.13
|
|
662
684
|
},
|
|
663
685
|
max: {
|
|
664
|
-
fontSize: rem(scale[
|
|
665
|
-
lineHeight: 1.
|
|
686
|
+
fontSize: rem(scale[15]),
|
|
687
|
+
lineHeight: 1.11,
|
|
666
688
|
letterSpacing: px(-0.96)
|
|
667
689
|
}
|
|
668
690
|
}
|
|
669
691
|
};
|
|
670
692
|
var display04$1 = {
|
|
671
693
|
fontSize: rem(scale[9]),
|
|
672
|
-
fontWeight: fontWeights.
|
|
694
|
+
fontWeight: fontWeights.light,
|
|
673
695
|
lineHeight: 1.19,
|
|
674
696
|
letterSpacing: 0,
|
|
675
697
|
breakpoints: {
|
|
676
698
|
md: {
|
|
677
699
|
fontSize: rem(scale[13]),
|
|
678
|
-
lineHeight: 1.
|
|
700
|
+
lineHeight: 1.14
|
|
679
701
|
},
|
|
680
702
|
lg: {
|
|
681
703
|
fontSize: rem(scale[16]),
|
|
682
|
-
lineHeight: 1.
|
|
704
|
+
lineHeight: 1.1,
|
|
683
705
|
letterSpacing: px(-0.64)
|
|
684
706
|
},
|
|
685
707
|
xlg: {
|
|
686
708
|
fontSize: rem(scale[19]),
|
|
687
|
-
lineHeight: 1.
|
|
688
|
-
letterSpacing: px(-0.64)
|
|
709
|
+
lineHeight: 1.06
|
|
689
710
|
},
|
|
690
711
|
max: {
|
|
691
712
|
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);
|
|
@@ -414,7 +438,7 @@ var productiveHeading04$1 = {
|
|
|
414
438
|
};
|
|
415
439
|
var productiveHeading05$1 = {
|
|
416
440
|
fontSize: rem(scale[7]),
|
|
417
|
-
fontWeight: fontWeights.
|
|
441
|
+
fontWeight: fontWeights.light,
|
|
418
442
|
lineHeight: 1.25,
|
|
419
443
|
letterSpacing: 0
|
|
420
444
|
};
|
|
@@ -460,40 +484,38 @@ 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.light
|
|
464
489
|
},
|
|
465
490
|
max: {
|
|
466
|
-
fontSize: rem(scale[7])
|
|
491
|
+
fontSize: rem(scale[7]),
|
|
492
|
+
fontWeight: fontWeights.light
|
|
467
493
|
}
|
|
468
494
|
}
|
|
469
495
|
};
|
|
470
496
|
var expressiveHeading05$1 = {
|
|
471
497
|
fontSize: rem(scale[7]),
|
|
472
|
-
fontWeight: fontWeights.
|
|
498
|
+
fontWeight: fontWeights.light,
|
|
473
499
|
lineHeight: 1.25,
|
|
474
500
|
letterSpacing: 0,
|
|
475
501
|
breakpoints: {
|
|
476
502
|
md: {
|
|
477
503
|
fontSize: rem(scale[8]),
|
|
478
|
-
fontWeight: fontWeights.light,
|
|
479
504
|
lineHeight: 1.22,
|
|
480
505
|
letterSpacing: 0
|
|
481
506
|
},
|
|
482
507
|
lg: {
|
|
483
508
|
fontSize: rem(scale[9]),
|
|
484
|
-
fontWeight: fontWeights.light,
|
|
485
509
|
lineHeight: 1.19,
|
|
486
510
|
letterSpacing: 0
|
|
487
511
|
},
|
|
488
512
|
xlg: {
|
|
489
513
|
fontSize: rem(scale[10]),
|
|
490
|
-
fontWeight: fontWeights.light,
|
|
491
514
|
lineHeight: 1.17,
|
|
492
515
|
letterSpacing: 0
|
|
493
516
|
},
|
|
494
517
|
max: {
|
|
495
518
|
fontSize: rem(scale[12]),
|
|
496
|
-
fontWeight: fontWeights.light,
|
|
497
519
|
letterSpacing: 0
|
|
498
520
|
}
|
|
499
521
|
}
|
|
@@ -652,44 +674,43 @@ var display03$1 = {
|
|
|
652
674
|
letterSpacing: 0,
|
|
653
675
|
breakpoints: {
|
|
654
676
|
md: {
|
|
655
|
-
fontSize: rem(scale[
|
|
656
|
-
lineHeight: 1.
|
|
677
|
+
fontSize: rem(scale[11]),
|
|
678
|
+
lineHeight: 1.18
|
|
657
679
|
},
|
|
658
680
|
lg: {
|
|
659
|
-
fontSize: rem(scale[
|
|
660
|
-
lineHeight: 1.
|
|
681
|
+
fontSize: rem(scale[12]),
|
|
682
|
+
lineHeight: 1.16,
|
|
661
683
|
letterSpacing: px(-0.64)
|
|
662
684
|
},
|
|
663
685
|
xlg: {
|
|
664
|
-
fontSize: rem(scale[
|
|
665
|
-
lineHeight: 1.
|
|
686
|
+
fontSize: rem(scale[14]),
|
|
687
|
+
lineHeight: 1.13
|
|
666
688
|
},
|
|
667
689
|
max: {
|
|
668
|
-
fontSize: rem(scale[
|
|
669
|
-
lineHeight: 1.
|
|
690
|
+
fontSize: rem(scale[15]),
|
|
691
|
+
lineHeight: 1.11,
|
|
670
692
|
letterSpacing: px(-0.96)
|
|
671
693
|
}
|
|
672
694
|
}
|
|
673
695
|
};
|
|
674
696
|
var display04$1 = {
|
|
675
697
|
fontSize: rem(scale[9]),
|
|
676
|
-
fontWeight: fontWeights.
|
|
698
|
+
fontWeight: fontWeights.light,
|
|
677
699
|
lineHeight: 1.19,
|
|
678
700
|
letterSpacing: 0,
|
|
679
701
|
breakpoints: {
|
|
680
702
|
md: {
|
|
681
703
|
fontSize: rem(scale[13]),
|
|
682
|
-
lineHeight: 1.
|
|
704
|
+
lineHeight: 1.14
|
|
683
705
|
},
|
|
684
706
|
lg: {
|
|
685
707
|
fontSize: rem(scale[16]),
|
|
686
|
-
lineHeight: 1.
|
|
708
|
+
lineHeight: 1.1,
|
|
687
709
|
letterSpacing: px(-0.64)
|
|
688
710
|
},
|
|
689
711
|
xlg: {
|
|
690
712
|
fontSize: rem(scale[19]),
|
|
691
|
-
lineHeight: 1.
|
|
692
|
-
letterSpacing: px(-0.64)
|
|
713
|
+
lineHeight: 1.06
|
|
693
714
|
},
|
|
694
715
|
max: {
|
|
695
716
|
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.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
"clean": "rimraf css es lib umd scss/_inlined scss/vendor"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@carbon/grid": "^10.43.
|
|
40
|
+
"@carbon/grid": "^10.43.0",
|
|
41
41
|
"@carbon/import-once": "^10.7.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@carbon/cli": "^10.34.0",
|
|
45
|
-
"@carbon/test-utils": "^10.21.
|
|
45
|
+
"@carbon/test-utils": "^10.21.0",
|
|
46
46
|
"change-case": "^4.1.1",
|
|
47
47
|
"rimraf": "^3.0.0"
|
|
48
48
|
},
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"sassDir": "scss",
|
|
53
53
|
"needs": "^1.3.0"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "85936cc8eff48a8eeec70b00966339f3b325eb7f"
|
|
56
56
|
}
|
|
@@ -276,7 +276,7 @@ $heading-04: $productive-heading-04 !default;
|
|
|
276
276
|
/// @group @carbon/type
|
|
277
277
|
$productive-heading-05: (
|
|
278
278
|
font-size: carbon--type-scale(8),
|
|
279
|
-
font-weight: carbon--font-weight('
|
|
279
|
+
font-weight: carbon--font-weight('light'),
|
|
280
280
|
line-height: 1.25,
|
|
281
281
|
letter-spacing: 0,
|
|
282
282
|
) !default;
|
|
@@ -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('light'),
|
|
367
368
|
),
|
|
368
369
|
max: (
|
|
369
370
|
font-size: carbon--type-scale(8),
|
|
371
|
+
font-weight: carbon--font-weight('light'),
|
|
370
372
|
),
|
|
371
373
|
),
|
|
372
374
|
) !default;
|
|
@@ -381,13 +383,12 @@ $fluid-heading-04: $expressive-heading-04 !default;
|
|
|
381
383
|
/// @group @carbon/type
|
|
382
384
|
$expressive-heading-05: (
|
|
383
385
|
font-size: carbon--type-scale(8),
|
|
384
|
-
font-weight: carbon--font-weight('
|
|
386
|
+
font-weight: carbon--font-weight('light'),
|
|
385
387
|
line-height: 1.25,
|
|
386
388
|
letter-spacing: 0,
|
|
387
389
|
breakpoints: (
|
|
388
390
|
md: (
|
|
389
391
|
font-size: carbon--type-scale(9),
|
|
390
|
-
font-weight: carbon--font-weight('light'),
|
|
391
392
|
line-height: 1.22,
|
|
392
393
|
),
|
|
393
394
|
lg: (
|
|
@@ -604,22 +605,22 @@ $display-03: (
|
|
|
604
605
|
letter-spacing: 0,
|
|
605
606
|
breakpoints: (
|
|
606
607
|
md: (
|
|
607
|
-
font-size: carbon--type-scale(
|
|
608
|
-
line-height: 1.
|
|
608
|
+
font-size: carbon--type-scale(12),
|
|
609
|
+
line-height: 1.18,
|
|
609
610
|
),
|
|
610
611
|
lg: (
|
|
611
|
-
font-size: carbon--type-scale(
|
|
612
|
-
line-height: 1.
|
|
612
|
+
font-size: carbon--type-scale(13),
|
|
613
|
+
line-height: 1.16,
|
|
613
614
|
letter-spacing: -0.64px,
|
|
614
615
|
),
|
|
615
616
|
xlg: (
|
|
616
|
-
font-size: carbon--type-scale(
|
|
617
|
-
line-height: 1.
|
|
617
|
+
font-size: carbon--type-scale(15),
|
|
618
|
+
line-height: 1.13,
|
|
618
619
|
letter-spacing: -0.64px,
|
|
619
620
|
),
|
|
620
621
|
max: (
|
|
621
|
-
font-size: carbon--type-scale(
|
|
622
|
-
line-height: 1.
|
|
622
|
+
font-size: carbon--type-scale(16),
|
|
623
|
+
line-height: 1.11,
|
|
623
624
|
letter-spacing: -0.96px,
|
|
624
625
|
),
|
|
625
626
|
),
|
|
@@ -635,23 +636,22 @@ $fluid-display-03: $display-03 !default;
|
|
|
635
636
|
/// @group @carbon/type
|
|
636
637
|
$display-04: (
|
|
637
638
|
font-size: carbon--type-scale(10),
|
|
638
|
-
font-weight: carbon--font-weight('
|
|
639
|
+
font-weight: carbon--font-weight('light'),
|
|
639
640
|
line-height: 1.19,
|
|
640
641
|
letter-spacing: 0,
|
|
641
642
|
breakpoints: (
|
|
642
643
|
md: (
|
|
643
644
|
font-size: carbon--type-scale(14),
|
|
644
|
-
line-height: 1.
|
|
645
|
+
line-height: 1.14,
|
|
645
646
|
),
|
|
646
647
|
lg: (
|
|
647
648
|
font-size: carbon--type-scale(17),
|
|
648
|
-
line-height: 1.
|
|
649
|
+
line-height: 1.1,
|
|
649
650
|
letter-spacing: -0.64px,
|
|
650
651
|
),
|
|
651
652
|
xlg: (
|
|
652
653
|
font-size: carbon--type-scale(20),
|
|
653
|
-
line-height: 1.
|
|
654
|
-
letter-spacing: -0.64px,
|
|
654
|
+
line-height: 1.06,
|
|
655
655
|
),
|
|
656
656
|
max: (
|
|
657
657
|
font-size: carbon--type-scale(23),
|