@carbon/type 10.10.1-rc.0 → 10.11.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 +7 -5
- package/lib/index.js +7 -5
- package/package.json +5 -5
- package/scss/_inlined/_styles.scss +6 -6
- package/scss/_styles.scss +6 -6
- package/src/__tests__/__snapshots__/styles-test.js.snap +2 -2
- package/src/styles.js +2 -2
- package/umd/index.js +7 -5
package/es/index.js
CHANGED
|
@@ -143,6 +143,8 @@ function getTypeSize(step) {
|
|
|
143
143
|
var scale = [12, 14, 16, 18, 20, 24, 28, 32, 36, 42, 48, 54, 60, 68, 76, 84, 92, 102, 112, 122, 132, 144, 156];
|
|
144
144
|
|
|
145
145
|
function _typeof(obj) {
|
|
146
|
+
"@babel/helpers - typeof";
|
|
147
|
+
|
|
146
148
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
147
149
|
_typeof = function (obj) {
|
|
148
150
|
return typeof obj;
|
|
@@ -313,7 +315,7 @@ var productiveHeading02 = heading02;
|
|
|
313
315
|
var productiveHeading03 = {
|
|
314
316
|
fontSize: rem(scale[4]),
|
|
315
317
|
fontWeight: fontWeights.regular,
|
|
316
|
-
lineHeight: rem(
|
|
318
|
+
lineHeight: rem(28),
|
|
317
319
|
letterSpacing: 0
|
|
318
320
|
};
|
|
319
321
|
var productiveHeading04 = {
|
|
@@ -340,16 +342,16 @@ var productiveHeading07 = {
|
|
|
340
342
|
lineHeight: rem(64),
|
|
341
343
|
letterSpacing: 0
|
|
342
344
|
};
|
|
343
|
-
var expressiveHeading01 = _objectSpread2({}, heading01, {
|
|
345
|
+
var expressiveHeading01 = _objectSpread2(_objectSpread2({}, heading01), {}, {
|
|
344
346
|
lineHeight: rem(20)
|
|
345
347
|
});
|
|
346
|
-
var expressiveHeading02 = _objectSpread2({}, heading02, {
|
|
348
|
+
var expressiveHeading02 = _objectSpread2(_objectSpread2({}, heading02), {}, {
|
|
347
349
|
lineHeight: rem(24)
|
|
348
350
|
});
|
|
349
351
|
var expressiveHeading03 = {
|
|
350
352
|
fontSize: rem(scale[4]),
|
|
351
353
|
fontWeight: fontWeights.regular,
|
|
352
|
-
lineHeight: '
|
|
354
|
+
lineHeight: '140%',
|
|
353
355
|
letterSpacing: 0,
|
|
354
356
|
breakpoints: {
|
|
355
357
|
xlg: {
|
|
@@ -662,7 +664,7 @@ function fluid(selector) {
|
|
|
662
664
|
|
|
663
665
|
styles.fontSize = fluidTypeSize(styles, 'sm', fluidBreakpoints);
|
|
664
666
|
fluidBreakpointNames.forEach(function (name) {
|
|
665
|
-
styles[breakpoint(name)] = _objectSpread2({}, fluidBreakpoints[name], {
|
|
667
|
+
styles[breakpoint(name)] = _objectSpread2(_objectSpread2({}, fluidBreakpoints[name]), {}, {
|
|
666
668
|
fontSize: fluidTypeSize(styles, name, fluidBreakpoints)
|
|
667
669
|
});
|
|
668
670
|
});
|
package/lib/index.js
CHANGED
|
@@ -147,6 +147,8 @@ function getTypeSize(step) {
|
|
|
147
147
|
var scale = [12, 14, 16, 18, 20, 24, 28, 32, 36, 42, 48, 54, 60, 68, 76, 84, 92, 102, 112, 122, 132, 144, 156];
|
|
148
148
|
|
|
149
149
|
function _typeof(obj) {
|
|
150
|
+
"@babel/helpers - typeof";
|
|
151
|
+
|
|
150
152
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
151
153
|
_typeof = function (obj) {
|
|
152
154
|
return typeof obj;
|
|
@@ -317,7 +319,7 @@ var productiveHeading02 = heading02;
|
|
|
317
319
|
var productiveHeading03 = {
|
|
318
320
|
fontSize: layout.rem(scale[4]),
|
|
319
321
|
fontWeight: fontWeights.regular,
|
|
320
|
-
lineHeight: layout.rem(
|
|
322
|
+
lineHeight: layout.rem(28),
|
|
321
323
|
letterSpacing: 0
|
|
322
324
|
};
|
|
323
325
|
var productiveHeading04 = {
|
|
@@ -344,16 +346,16 @@ var productiveHeading07 = {
|
|
|
344
346
|
lineHeight: layout.rem(64),
|
|
345
347
|
letterSpacing: 0
|
|
346
348
|
};
|
|
347
|
-
var expressiveHeading01 = _objectSpread2({}, heading01, {
|
|
349
|
+
var expressiveHeading01 = _objectSpread2(_objectSpread2({}, heading01), {}, {
|
|
348
350
|
lineHeight: layout.rem(20)
|
|
349
351
|
});
|
|
350
|
-
var expressiveHeading02 = _objectSpread2({}, heading02, {
|
|
352
|
+
var expressiveHeading02 = _objectSpread2(_objectSpread2({}, heading02), {}, {
|
|
351
353
|
lineHeight: layout.rem(24)
|
|
352
354
|
});
|
|
353
355
|
var expressiveHeading03 = {
|
|
354
356
|
fontSize: layout.rem(scale[4]),
|
|
355
357
|
fontWeight: fontWeights.regular,
|
|
356
|
-
lineHeight: '
|
|
358
|
+
lineHeight: '140%',
|
|
357
359
|
letterSpacing: 0,
|
|
358
360
|
breakpoints: {
|
|
359
361
|
xlg: {
|
|
@@ -666,7 +668,7 @@ function fluid(selector) {
|
|
|
666
668
|
|
|
667
669
|
styles.fontSize = fluidTypeSize(styles, 'sm', fluidBreakpoints);
|
|
668
670
|
fluidBreakpointNames.forEach(function (name) {
|
|
669
|
-
styles[layout.breakpoint(name)] = _objectSpread2({}, fluidBreakpoints[name], {
|
|
671
|
+
styles[layout.breakpoint(name)] = _objectSpread2(_objectSpread2({}, fluidBreakpoints[name]), {}, {
|
|
670
672
|
fontSize: fluidTypeSize(styles, name, fluidBreakpoints)
|
|
671
673
|
});
|
|
672
674
|
});
|
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.11.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@carbon/import-once": "^10.3.0",
|
|
36
|
-
"@carbon/layout": "^10.
|
|
36
|
+
"@carbon/layout": "^10.10.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@carbon/bundler": "^10.
|
|
40
|
-
"@carbon/test-utils": "^10.
|
|
39
|
+
"@carbon/bundler": "^10.8.0",
|
|
40
|
+
"@carbon/test-utils": "^10.9.0",
|
|
41
41
|
"change-case": "^4.1.1",
|
|
42
42
|
"rimraf": "^3.0.0"
|
|
43
43
|
},
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"sassDir": "scss",
|
|
48
48
|
"needs": "^1.3.0"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "2863dbcf312ed9942e2e5d8f094b9e280c2f2e8c"
|
|
51
51
|
}
|
|
@@ -44,7 +44,7 @@ $helper-text-01: (
|
|
|
44
44
|
$body-short-01: (
|
|
45
45
|
font-size: carbon--type-scale(2),
|
|
46
46
|
font-weight: carbon--font-weight('regular'),
|
|
47
|
-
line-height: carbon--
|
|
47
|
+
line-height: carbon--em(18px),
|
|
48
48
|
letter-spacing: 0.16px,
|
|
49
49
|
) !default;
|
|
50
50
|
|
|
@@ -54,7 +54,7 @@ $body-short-01: (
|
|
|
54
54
|
$body-long-01: (
|
|
55
55
|
font-size: carbon--type-scale(2),
|
|
56
56
|
font-weight: carbon--font-weight('regular'),
|
|
57
|
-
line-height: carbon--
|
|
57
|
+
line-height: carbon--em(20px),
|
|
58
58
|
letter-spacing: 0.16px,
|
|
59
59
|
) !default;
|
|
60
60
|
|
|
@@ -64,7 +64,7 @@ $body-long-01: (
|
|
|
64
64
|
$body-short-02: (
|
|
65
65
|
font-size: carbon--type-scale(3),
|
|
66
66
|
font-weight: carbon--font-weight('regular'),
|
|
67
|
-
line-height: carbon--
|
|
67
|
+
line-height: carbon--em(22px),
|
|
68
68
|
letter-spacing: 0,
|
|
69
69
|
) !default;
|
|
70
70
|
|
|
@@ -74,7 +74,7 @@ $body-short-02: (
|
|
|
74
74
|
$body-long-02: (
|
|
75
75
|
font-size: carbon--type-scale(3),
|
|
76
76
|
font-weight: carbon--font-weight('regular'),
|
|
77
|
-
line-height: carbon--
|
|
77
|
+
line-height: carbon--em(24px),
|
|
78
78
|
letter-spacing: 0,
|
|
79
79
|
) !default;
|
|
80
80
|
|
|
@@ -136,7 +136,7 @@ $productive-heading-02: $heading-02 !default;
|
|
|
136
136
|
$productive-heading-03: (
|
|
137
137
|
font-size: carbon--type-scale(5),
|
|
138
138
|
font-weight: carbon--font-weight('regular'),
|
|
139
|
-
line-height: carbon--rem(
|
|
139
|
+
line-height: carbon--rem(28px),
|
|
140
140
|
letter-spacing: 0,
|
|
141
141
|
) !default;
|
|
142
142
|
|
|
@@ -206,7 +206,7 @@ $expressive-heading-02: map-merge(
|
|
|
206
206
|
$expressive-heading-03: (
|
|
207
207
|
font-size: carbon--type-scale(5),
|
|
208
208
|
font-weight: carbon--font-weight('regular'),
|
|
209
|
-
line-height:
|
|
209
|
+
line-height: 140%,
|
|
210
210
|
letter-spacing: 0,
|
|
211
211
|
breakpoints: (
|
|
212
212
|
xlg: (
|
package/scss/_styles.scss
CHANGED
|
@@ -44,7 +44,7 @@ $helper-text-01: (
|
|
|
44
44
|
$body-short-01: (
|
|
45
45
|
font-size: carbon--type-scale(2),
|
|
46
46
|
font-weight: carbon--font-weight('regular'),
|
|
47
|
-
line-height: carbon--
|
|
47
|
+
line-height: carbon--em(18px),
|
|
48
48
|
letter-spacing: 0.16px,
|
|
49
49
|
) !default;
|
|
50
50
|
|
|
@@ -54,7 +54,7 @@ $body-short-01: (
|
|
|
54
54
|
$body-long-01: (
|
|
55
55
|
font-size: carbon--type-scale(2),
|
|
56
56
|
font-weight: carbon--font-weight('regular'),
|
|
57
|
-
line-height: carbon--
|
|
57
|
+
line-height: carbon--em(20px),
|
|
58
58
|
letter-spacing: 0.16px,
|
|
59
59
|
) !default;
|
|
60
60
|
|
|
@@ -64,7 +64,7 @@ $body-long-01: (
|
|
|
64
64
|
$body-short-02: (
|
|
65
65
|
font-size: carbon--type-scale(3),
|
|
66
66
|
font-weight: carbon--font-weight('regular'),
|
|
67
|
-
line-height: carbon--
|
|
67
|
+
line-height: carbon--em(22px),
|
|
68
68
|
letter-spacing: 0,
|
|
69
69
|
) !default;
|
|
70
70
|
|
|
@@ -74,7 +74,7 @@ $body-short-02: (
|
|
|
74
74
|
$body-long-02: (
|
|
75
75
|
font-size: carbon--type-scale(3),
|
|
76
76
|
font-weight: carbon--font-weight('regular'),
|
|
77
|
-
line-height: carbon--
|
|
77
|
+
line-height: carbon--em(24px),
|
|
78
78
|
letter-spacing: 0,
|
|
79
79
|
) !default;
|
|
80
80
|
|
|
@@ -136,7 +136,7 @@ $productive-heading-02: $heading-02 !default;
|
|
|
136
136
|
$productive-heading-03: (
|
|
137
137
|
font-size: carbon--type-scale(5),
|
|
138
138
|
font-weight: carbon--font-weight('regular'),
|
|
139
|
-
line-height: carbon--rem(
|
|
139
|
+
line-height: carbon--rem(28px),
|
|
140
140
|
letter-spacing: 0,
|
|
141
141
|
) !default;
|
|
142
142
|
|
|
@@ -206,7 +206,7 @@ $expressive-heading-02: map-merge(
|
|
|
206
206
|
$expressive-heading-03: (
|
|
207
207
|
font-size: carbon--type-scale(5),
|
|
208
208
|
font-weight: carbon--font-weight('regular'),
|
|
209
|
-
line-height:
|
|
209
|
+
line-height: 140%,
|
|
210
210
|
letter-spacing: 0,
|
|
211
211
|
breakpoints: (
|
|
212
212
|
xlg: (
|
|
@@ -96,7 +96,7 @@ letter-spacing: 0;"
|
|
|
96
96
|
exports[`styles expressiveHeading03 should be printable 1`] = `
|
|
97
97
|
"font-size: 1.25rem;
|
|
98
98
|
font-weight: 400;
|
|
99
|
-
line-height:
|
|
99
|
+
line-height: 140%;
|
|
100
100
|
letter-spacing: 0;"
|
|
101
101
|
`;
|
|
102
102
|
|
|
@@ -174,7 +174,7 @@ letter-spacing: 0;"
|
|
|
174
174
|
exports[`styles productiveHeading03 should be printable 1`] = `
|
|
175
175
|
"font-size: 1.25rem;
|
|
176
176
|
font-weight: 400;
|
|
177
|
-
line-height: 1.
|
|
177
|
+
line-height: 1.75rem;
|
|
178
178
|
letter-spacing: 0;"
|
|
179
179
|
`;
|
|
180
180
|
|
package/src/styles.js
CHANGED
|
@@ -95,7 +95,7 @@ export const productiveHeading02 = heading02;
|
|
|
95
95
|
export const productiveHeading03 = {
|
|
96
96
|
fontSize: rem(scale[4]),
|
|
97
97
|
fontWeight: fontWeights.regular,
|
|
98
|
-
lineHeight: rem(
|
|
98
|
+
lineHeight: rem(28),
|
|
99
99
|
letterSpacing: 0,
|
|
100
100
|
};
|
|
101
101
|
|
|
@@ -140,7 +140,7 @@ export const expressiveHeading02 = {
|
|
|
140
140
|
export const expressiveHeading03 = {
|
|
141
141
|
fontSize: rem(scale[4]),
|
|
142
142
|
fontWeight: fontWeights.regular,
|
|
143
|
-
lineHeight: '
|
|
143
|
+
lineHeight: '140%',
|
|
144
144
|
letterSpacing: 0,
|
|
145
145
|
breakpoints: {
|
|
146
146
|
xlg: {
|
package/umd/index.js
CHANGED
|
@@ -147,6 +147,8 @@
|
|
|
147
147
|
var scale = [12, 14, 16, 18, 20, 24, 28, 32, 36, 42, 48, 54, 60, 68, 76, 84, 92, 102, 112, 122, 132, 144, 156];
|
|
148
148
|
|
|
149
149
|
function _typeof(obj) {
|
|
150
|
+
"@babel/helpers - typeof";
|
|
151
|
+
|
|
150
152
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
151
153
|
_typeof = function (obj) {
|
|
152
154
|
return typeof obj;
|
|
@@ -317,7 +319,7 @@
|
|
|
317
319
|
var productiveHeading03 = {
|
|
318
320
|
fontSize: layout.rem(scale[4]),
|
|
319
321
|
fontWeight: fontWeights.regular,
|
|
320
|
-
lineHeight: layout.rem(
|
|
322
|
+
lineHeight: layout.rem(28),
|
|
321
323
|
letterSpacing: 0
|
|
322
324
|
};
|
|
323
325
|
var productiveHeading04 = {
|
|
@@ -344,16 +346,16 @@
|
|
|
344
346
|
lineHeight: layout.rem(64),
|
|
345
347
|
letterSpacing: 0
|
|
346
348
|
};
|
|
347
|
-
var expressiveHeading01 = _objectSpread2({}, heading01, {
|
|
349
|
+
var expressiveHeading01 = _objectSpread2(_objectSpread2({}, heading01), {}, {
|
|
348
350
|
lineHeight: layout.rem(20)
|
|
349
351
|
});
|
|
350
|
-
var expressiveHeading02 = _objectSpread2({}, heading02, {
|
|
352
|
+
var expressiveHeading02 = _objectSpread2(_objectSpread2({}, heading02), {}, {
|
|
351
353
|
lineHeight: layout.rem(24)
|
|
352
354
|
});
|
|
353
355
|
var expressiveHeading03 = {
|
|
354
356
|
fontSize: layout.rem(scale[4]),
|
|
355
357
|
fontWeight: fontWeights.regular,
|
|
356
|
-
lineHeight: '
|
|
358
|
+
lineHeight: '140%',
|
|
357
359
|
letterSpacing: 0,
|
|
358
360
|
breakpoints: {
|
|
359
361
|
xlg: {
|
|
@@ -666,7 +668,7 @@
|
|
|
666
668
|
|
|
667
669
|
styles.fontSize = fluidTypeSize(styles, 'sm', fluidBreakpoints);
|
|
668
670
|
fluidBreakpointNames.forEach(function (name) {
|
|
669
|
-
styles[layout.breakpoint(name)] = _objectSpread2({}, fluidBreakpoints[name], {
|
|
671
|
+
styles[layout.breakpoint(name)] = _objectSpread2(_objectSpread2({}, fluidBreakpoints[name]), {}, {
|
|
670
672
|
fontSize: fluidTypeSize(styles, name, fluidBreakpoints)
|
|
671
673
|
});
|
|
672
674
|
});
|