@carbon/type 10.37.0 → 10.39.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/package.json +5 -5
- package/scss/_inlined/_styles.import.scss +6 -1
- package/scss/_styles.import.scss +6 -1
- package/scss/modules/_font-family.scss +4 -0
- package/scss/vendor/@carbon/layout/_convert.import.scss +11 -2
- package/scss/vendor/@carbon/layout/_key-height.import.scss +6 -1
- package/scss/vendor/@carbon/layout/modules/_convert.scss +11 -2
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.39.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@carbon/import-once": "^10.6.0",
|
|
41
|
-
"@carbon/layout": "^10.
|
|
41
|
+
"@carbon/layout": "^10.34.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@carbon/cli": "^10.
|
|
45
|
-
"@carbon/test-utils": "^10.
|
|
44
|
+
"@carbon/cli": "^10.31.0",
|
|
45
|
+
"@carbon/test-utils": "^10.20.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": "3e014d3be20089ade76dddea87c94ab2171e6fd7"
|
|
56
56
|
}
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
// compatibility file to ensure we continue to support node-sass and dart-sass
|
|
20
20
|
// in v10.
|
|
21
21
|
|
|
22
|
+
@use "sass:meta";
|
|
22
23
|
@use "sass:math";
|
|
23
24
|
@import '../vendor/@carbon/layout/breakpoint'; /* stylelint-disable-line no-invalid-position-at-import-rule */
|
|
24
25
|
@import 'font-family'; /* stylelint-disable-line no-invalid-position-at-import-rule */
|
|
@@ -582,7 +583,11 @@ $tokens: (
|
|
|
582
583
|
/// @access public
|
|
583
584
|
/// @group @carbon/type
|
|
584
585
|
@function strip-unit($value) {
|
|
585
|
-
@
|
|
586
|
+
@if meta.function-exists('div', 'math') {
|
|
587
|
+
@return math.div($value, $value * 0 + 1);
|
|
588
|
+
} @else {
|
|
589
|
+
@return $value / ($value * 0 + 1);
|
|
590
|
+
}
|
|
586
591
|
}
|
|
587
592
|
|
|
588
593
|
/// This helper includes fluid type styles for the given token value. Fluid type
|
package/scss/_styles.import.scss
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
// compatibility file to ensure we continue to support node-sass and dart-sass
|
|
20
20
|
// in v10.
|
|
21
21
|
|
|
22
|
+
@use "sass:meta";
|
|
22
23
|
@use "sass:math";
|
|
23
24
|
@import '@carbon/layout/scss/breakpoint'; /* stylelint-disable-line no-invalid-position-at-import-rule */
|
|
24
25
|
@import 'font-family'; /* stylelint-disable-line no-invalid-position-at-import-rule */
|
|
@@ -582,7 +583,11 @@ $tokens: (
|
|
|
582
583
|
/// @access public
|
|
583
584
|
/// @group @carbon/type
|
|
584
585
|
@function strip-unit($value) {
|
|
585
|
-
@
|
|
586
|
+
@if meta.function-exists('div', 'math') {
|
|
587
|
+
@return math.div($value, $value * 0 + 1);
|
|
588
|
+
} @else {
|
|
589
|
+
@return $value / ($value * 0 + 1);
|
|
590
|
+
}
|
|
586
591
|
}
|
|
587
592
|
|
|
588
593
|
/// This helper includes fluid type styles for the given token value. Fluid type
|
|
@@ -43,6 +43,10 @@ $font-families: (
|
|
|
43
43
|
unquote(
|
|
44
44
|
"'IBM Plex Sans KR', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif"
|
|
45
45
|
),
|
|
46
|
+
'sans-thai-looped':
|
|
47
|
+
unquote(
|
|
48
|
+
"'IBM Plex Sans Thai Looped', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif"
|
|
49
|
+
),
|
|
46
50
|
'sans-thai':
|
|
47
51
|
unquote(
|
|
48
52
|
"'IBM Plex Sans Thai', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif"
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
// compatibility file to ensure we continue to support node-sass and dart-sass
|
|
20
20
|
// in v10.
|
|
21
21
|
|
|
22
|
+
@use 'sass:meta';
|
|
22
23
|
@use 'sass:math';
|
|
23
24
|
|
|
24
25
|
/// Default font size
|
|
@@ -38,7 +39,11 @@ $carbon--base-font-size: 16px !default;
|
|
|
38
39
|
@warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
39
40
|
}
|
|
40
41
|
|
|
41
|
-
@
|
|
42
|
+
@if meta.function-exists('div', 'math') {
|
|
43
|
+
@return math.div($px, $carbon--base-font-size) * 1rem;
|
|
44
|
+
} @else {
|
|
45
|
+
@return ($px / $carbon--base-font-size) * 1rem;
|
|
46
|
+
}
|
|
42
47
|
}
|
|
43
48
|
|
|
44
49
|
/// Convert a given px unit to a em unit
|
|
@@ -52,5 +57,9 @@ $carbon--base-font-size: 16px !default;
|
|
|
52
57
|
@warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
53
58
|
}
|
|
54
59
|
|
|
55
|
-
@
|
|
60
|
+
@if meta.function-exists('div', 'math') {
|
|
61
|
+
@return math.div($px, $carbon--base-font-size) * 1em;
|
|
62
|
+
} @else {
|
|
63
|
+
@return ($px / $carbon--base-font-size) * 1em;
|
|
64
|
+
}
|
|
56
65
|
}
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
// compatibility file to ensure we continue to support node-sass and dart-sass
|
|
20
20
|
// in v10.
|
|
21
21
|
|
|
22
|
+
@use 'sass:meta';
|
|
22
23
|
@use "sass:math";
|
|
23
24
|
@import 'breakpoint'; /* stylelint-disable-line no-invalid-position-at-import-rule */
|
|
24
25
|
@import 'utilities'; /* stylelint-disable-line no-invalid-position-at-import-rule */
|
|
@@ -39,7 +40,11 @@
|
|
|
39
40
|
$margin: map-get($values, margin);
|
|
40
41
|
$columns: map-get($values, columns);
|
|
41
42
|
|
|
42
|
-
@
|
|
43
|
+
@if meta.function-exists('div', 'math') {
|
|
44
|
+
@return math.div($width - (2 * $margin), $columns);
|
|
45
|
+
} @else {
|
|
46
|
+
@return (($width - (2 * $margin)) / $columns);
|
|
47
|
+
}
|
|
43
48
|
} @else {
|
|
44
49
|
@warn 'Breakpoint: `#{$breakpoint}` is not a valid breakpoint.';
|
|
45
50
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
// LICENSE file in the root directory of this source tree.
|
|
6
6
|
//
|
|
7
7
|
|
|
8
|
+
@use 'sass:meta';
|
|
8
9
|
@use 'sass:math';
|
|
9
10
|
|
|
10
11
|
/// Default font size
|
|
@@ -24,7 +25,11 @@ $base-font-size: 16px !default;
|
|
|
24
25
|
@warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
@
|
|
28
|
+
@if meta.function-exists('div', 'math') {
|
|
29
|
+
@return math.div($px, $base-font-size) * 1rem;
|
|
30
|
+
} @else {
|
|
31
|
+
@return ($px / $base-font-size) * 1rem;
|
|
32
|
+
}
|
|
28
33
|
}
|
|
29
34
|
|
|
30
35
|
/// Convert a given px unit to a em unit
|
|
@@ -38,5 +43,9 @@ $base-font-size: 16px !default;
|
|
|
38
43
|
@warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
39
44
|
}
|
|
40
45
|
|
|
41
|
-
@
|
|
46
|
+
@if meta.function-exists('div', 'math') {
|
|
47
|
+
@return math.div($px, $base-font-size) * 1em;
|
|
48
|
+
} @else {
|
|
49
|
+
@return ($px / $base-font-size) * 1em;
|
|
50
|
+
}
|
|
42
51
|
}
|