@carbon/type 10.41.0-rc.0 → 10.42.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.
Files changed (51) hide show
  1. package/es/index.js +73 -2
  2. package/lib/index.js +169 -98
  3. package/package.json +5 -5
  4. package/scss/_inlined/_reset.scss +1 -1
  5. package/scss/_inlined/_scale.scss +1 -1
  6. package/scss/_inlined/_styles.import.scss +3 -3
  7. package/scss/_inlined/_styles.scss +1 -1
  8. package/scss/_styles.import.scss +3 -3
  9. package/scss/modules/_font-family.scss +13 -11
  10. package/scss/modules/_scale.scss +2 -1
  11. package/scss/modules/_styles.scss +7 -11
  12. package/scss/vendor/@carbon/grid/12.scss +41 -0
  13. package/scss/vendor/@carbon/grid/_inlined/12.scss +41 -0
  14. package/scss/vendor/@carbon/grid/_inlined/_mixins.import.scss +431 -0
  15. package/scss/vendor/@carbon/grid/_inlined/_mixins.scss +415 -0
  16. package/scss/vendor/@carbon/grid/_inlined/_prefix.scss +12 -0
  17. package/scss/vendor/@carbon/grid/_mixins.import.scss +431 -0
  18. package/scss/vendor/@carbon/grid/_mixins.scss +415 -0
  19. package/scss/vendor/@carbon/grid/_prefix.scss +12 -0
  20. package/scss/vendor/@carbon/grid/grid.scss +10 -0
  21. package/scss/vendor/@carbon/grid/index.scss +10 -0
  22. package/scss/vendor/@carbon/{layout → grid}/modules/_breakpoint.scss +36 -2
  23. package/scss/vendor/@carbon/grid/modules/_config.scss +18 -0
  24. package/scss/vendor/@carbon/grid/modules/_css-grid.scss +347 -0
  25. package/scss/vendor/@carbon/grid/modules/_flex-grid.scss +374 -0
  26. package/scss/vendor/@carbon/grid/modules/_mixins.scss +336 -0
  27. package/scss/vendor/@carbon/grid/vendor/@carbon/import-once/import-once.scss +27 -0
  28. package/scss/vendor/@carbon/grid/vendor/@carbon/import-once/index.scss +8 -0
  29. package/scss/vendor/@carbon/{layout → grid/vendor/@carbon/layout}/_breakpoint.scss +0 -0
  30. package/scss/vendor/@carbon/{layout → grid/vendor/@carbon/layout}/_convert.import.scss +0 -0
  31. package/scss/vendor/@carbon/{layout → grid/vendor/@carbon/layout}/_convert.scss +0 -0
  32. package/scss/vendor/@carbon/{layout → grid/vendor/@carbon/layout}/_key-height.import.scss +2 -2
  33. package/scss/vendor/@carbon/{layout → grid/vendor/@carbon/layout}/_key-height.scss +0 -0
  34. package/scss/vendor/@carbon/{layout → grid/vendor/@carbon/layout}/_mini-unit.scss +0 -0
  35. package/scss/vendor/@carbon/{layout → grid/vendor/@carbon/layout}/_spacing.scss +0 -0
  36. package/scss/vendor/@carbon/{layout → grid/vendor/@carbon/layout}/_utilities.scss +0 -0
  37. package/scss/vendor/@carbon/{layout → grid/vendor/@carbon/layout}/generated/_container.scss +0 -0
  38. package/scss/vendor/@carbon/{layout → grid/vendor/@carbon/layout}/generated/_fluid-spacing.scss +0 -0
  39. package/scss/vendor/@carbon/{layout → grid/vendor/@carbon/layout}/generated/_icon-size.scss +0 -0
  40. package/scss/vendor/@carbon/{layout → grid/vendor/@carbon/layout}/generated/_layout.scss +0 -0
  41. package/scss/vendor/@carbon/{layout → grid/vendor/@carbon/layout}/generated/_size.scss +0 -0
  42. package/scss/vendor/@carbon/{layout → grid/vendor/@carbon/layout}/generated/_spacing.scss +0 -0
  43. package/scss/vendor/@carbon/{layout → grid/vendor/@carbon/layout}/index.scss +0 -0
  44. package/scss/vendor/@carbon/{layout → grid/vendor/@carbon/layout}/layout.scss +0 -0
  45. package/scss/vendor/@carbon/{layout → grid/vendor/@carbon/layout}/modules/_convert.scss +0 -0
  46. package/scss/vendor/@carbon/{layout → grid/vendor/@carbon/layout}/modules/_spacing.scss +0 -0
  47. package/scss/vendor/@carbon/{layout → grid/vendor/@carbon/layout}/modules/_utilities.scss +3 -3
  48. package/scss/vendor/@carbon/{layout → grid/vendor/@carbon/layout}/modules/generated/_fluid-spacing.scss +0 -0
  49. package/scss/vendor/@carbon/{layout → grid/vendor/@carbon/layout}/modules/generated/_spacing.scss +0 -0
  50. package/scss/vendor/@carbon/import-once/import-once.scss +1 -1
  51. package/umd/index.js +173 -100
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.41.0-rc.0",
4
+ "version": "10.42.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -37,11 +37,11 @@
37
37
  "clean": "rimraf css es lib umd scss/_inlined scss/vendor"
38
38
  },
39
39
  "dependencies": {
40
- "@carbon/import-once": "^10.6.0",
41
- "@carbon/layout": "^10.36.0-rc.0"
40
+ "@carbon/grid": "^10.42.0",
41
+ "@carbon/import-once": "^10.7.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@carbon/cli": "^10.33.0-rc.0",
44
+ "@carbon/cli": "^10.34.0",
45
45
  "@carbon/test-utils": "^10.21.0",
46
46
  "change-case": "^4.1.1",
47
47
  "rimraf": "^3.0.0"
@@ -52,5 +52,5 @@
52
52
  "sassDir": "scss",
53
53
  "needs": "^1.3.0"
54
54
  },
55
- "gitHead": "6f5bca3be0e19dc7590617c704a2834514b3176b"
55
+ "gitHead": "aadefba8b1097fad433fe63c9c896b1a3e1b589a"
56
56
  }
@@ -5,7 +5,7 @@
5
5
  // LICENSE file in the root directory of this source tree.
6
6
  //
7
7
 
8
- @import '../vendor/@carbon/layout/convert';
8
+ @import '@carbon/layout/scss/convert';
9
9
  @import 'font-family';
10
10
  @import 'styles';
11
11
 
@@ -5,7 +5,7 @@
5
5
  // LICENSE file in the root directory of this source tree.
6
6
  //
7
7
 
8
- @import '../vendor/@carbon/layout/convert';
8
+ @import '@carbon/layout/scss/convert';
9
9
 
10
10
  /// Compute the type size for the given type scale step
11
11
  /// @param {Number} $step
@@ -21,9 +21,9 @@
21
21
 
22
22
  @use "sass:meta";
23
23
  @use "sass:math";
24
- @import '../vendor/@carbon/layout/breakpoint'; /* stylelint-disable-line no-invalid-position-at-import-rule */
25
- @import 'font-family'; /* stylelint-disable-line no-invalid-position-at-import-rule */
26
- @import 'scale'; /* stylelint-disable-line no-invalid-position-at-import-rule */
24
+ @import '@carbon/layout/scss/breakpoint';
25
+ @import 'font-family';
26
+ @import 'scale';
27
27
 
28
28
  /// @type Map
29
29
  /// @access public
@@ -21,7 +21,7 @@
21
21
 
22
22
  // stylelint-disable number-max-precision
23
23
 
24
- @import '../vendor/@carbon/layout/breakpoint';
24
+ @import '@carbon/layout/scss/breakpoint';
25
25
  @import 'font-family';
26
26
  @import 'scale';
27
27
 
@@ -21,9 +21,9 @@
21
21
 
22
22
  @use "sass:meta";
23
23
  @use "sass:math";
24
- @import '@carbon/layout/scss/breakpoint'; /* stylelint-disable-line no-invalid-position-at-import-rule */
25
- @import 'font-family'; /* stylelint-disable-line no-invalid-position-at-import-rule */
26
- @import 'scale'; /* stylelint-disable-line no-invalid-position-at-import-rule */
24
+ @import '@carbon/layout/scss/breakpoint';
25
+ @import 'font-family';
26
+ @import 'scale';
27
27
 
28
28
  /// @type Map
29
29
  /// @access public
@@ -5,6 +5,8 @@
5
5
  // LICENSE file in the root directory of this source tree.
6
6
  //
7
7
 
8
+ @use 'sass:string';
9
+
8
10
  /// Font family fallbacks for: IBM Plex Mono, IBM Plex Sans, IBM Plex Sans
9
11
  /// Condensed, IBM Plex Sans Hebrew, and IBM Plex Serif
10
12
  /// @type Map
@@ -12,47 +14,47 @@
12
14
  /// @group @carbon/type
13
15
  $font-families: (
14
16
  'mono':
15
- unquote(
17
+ string.unquote(
16
18
  "'IBM Plex Mono', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', monospace"
17
19
  ),
18
20
  'sans':
19
- unquote(
21
+ string.unquote(
20
22
  "'IBM Plex Sans', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif"
21
23
  ),
22
24
  'sans-condensed':
23
- unquote(
25
+ string.unquote(
24
26
  "'IBM Plex Sans Condensed', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif"
25
27
  ),
26
28
  'sans-arabic':
27
- unquote(
29
+ string.unquote(
28
30
  "'IBM Plex Sans Arabic', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif"
29
31
  ),
30
32
  'sans-devanagari':
31
- unquote(
33
+ string.unquote(
32
34
  "'IBM Plex Sans Devanagari', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif"
33
35
  ),
34
36
  'sans-hebrew':
35
- unquote(
37
+ string.unquote(
36
38
  "'IBM Plex Sans Hebrew', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif"
37
39
  ),
38
40
  'sans-jp':
39
- unquote(
41
+ string.unquote(
40
42
  "'IBM Plex Sans JP', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif"
41
43
  ),
42
44
  'sans-kr':
43
- unquote(
45
+ string.unquote(
44
46
  "'IBM Plex Sans KR', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif"
45
47
  ),
46
48
  'sans-thai-looped':
47
- unquote(
49
+ string.unquote(
48
50
  "'IBM Plex Sans Thai Looped', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif"
49
51
  ),
50
52
  'sans-thai':
51
- unquote(
53
+ string.unquote(
52
54
  "'IBM Plex Sans Thai', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif"
53
55
  ),
54
56
  'serif':
55
- unquote(
57
+ string.unquote(
56
58
  "'IBM Plex Serif', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', serif"
57
59
  ),
58
60
  ) !default;
@@ -6,6 +6,7 @@
6
6
  //
7
7
 
8
8
  @use '@carbon/layout';
9
+ @use 'sass:list';
9
10
 
10
11
  /// Compute the type size for the given type scale step
11
12
  /// @param {Number} $step
@@ -26,7 +27,7 @@
26
27
  /// @group @carbon/type
27
28
  $type-scale: ();
28
29
  @for $i from 1 through 23 {
29
- $type-scale: append($type-scale, layout.rem(get-type-size($i)));
30
+ $type-scale: list.append($type-scale, layout.rem(get-type-size($i)));
30
31
  }
31
32
 
32
33
  /// Get the value of a specific step in the type scale
@@ -9,7 +9,7 @@
9
9
 
10
10
  @use 'sass:map';
11
11
  @use 'sass:math';
12
- @use '@carbon/layout';
12
+ @use '@carbon/grid/scss/modules/breakpoint' as grid;
13
13
  @use 'font-family';
14
14
  @use 'scale';
15
15
 
@@ -716,7 +716,7 @@ $tokens: (
716
716
  /// @param {Map} $breakpoints [$grid-breakpoints] - Custom breakpoints to use
717
717
  /// @access public
718
718
  /// @group @carbon/type
719
- @mixin fluid-type($type-styles, $breakpoints: layout.$grid-breakpoints) {
719
+ @mixin fluid-type($type-styles, $breakpoints: grid.$grid-breakpoints) {
720
720
  // Include the initial styles for the given token by default without any
721
721
  // media query guard. This includes `font-size` as a fallback in the case
722
722
  // that a browser does not support `calc()`
@@ -729,7 +729,7 @@ $tokens: (
729
729
  // token and apply the properties and fluid type size for that given
730
730
  // breakpoint
731
731
  @each $name, $values in map.get($type-styles, breakpoints) {
732
- @include layout.breakpoint($name) {
732
+ @include grid.breakpoint($name) {
733
733
  @include properties($values);
734
734
  @include fluid-type-size($type-styles, $name, $breakpoints);
735
735
  }
@@ -745,7 +745,7 @@ $tokens: (
745
745
  @mixin fluid-type-size(
746
746
  $type-styles,
747
747
  $name,
748
- $breakpoints: layout.$grid-breakpoints
748
+ $breakpoints: grid.$grid-breakpoints
749
749
  ) {
750
750
  // Get the information about the breakpoint we're currently working in. Useful
751
751
  // for getting initial width information
@@ -776,7 +776,7 @@ $tokens: (
776
776
 
777
777
  // We can use `breakpoint-next` to see if there is another breakpoint we can
778
778
  // use to update `max-font-size` and `max-vw` with larger values
779
- $next-breakpoint-available: layout.breakpoint-next($name, $breakpoints);
779
+ $next-breakpoint-available: grid.breakpoint-next($name, $breakpoints);
780
780
  $next-fluid-breakpoint-name: null;
781
781
 
782
782
  // We need to figure out what the next available fluid breakpoint is for our
@@ -788,7 +788,7 @@ $tokens: (
788
788
  $next-fluid-breakpoint-name: $next-breakpoint-available;
789
789
  $next-breakpoint-available: null;
790
790
  } @else {
791
- $next-breakpoint-available: layout.breakpoint-next(
791
+ $next-breakpoint-available: grid.breakpoint-next(
792
792
  $next-breakpoint-available,
793
793
  $breakpoints
794
794
  );
@@ -846,11 +846,7 @@ $custom-property-prefix: 'cds' !default;
846
846
  /// @param {Map} $breakpoints [$grid-breakpoints] - Provide a custom breakpoint map to use
847
847
  /// @access public
848
848
  /// @group @carbon/type
849
- @mixin type-style(
850
- $name,
851
- $fluid: false,
852
- $breakpoints: layout.$grid-breakpoints
853
- ) {
849
+ @mixin type-style($name, $fluid: false, $breakpoints: grid.$grid-breakpoints) {
854
850
  @if not map.has-key($tokens, $name) {
855
851
  @error 'Unable to find a token with the name: `#{$name}`';
856
852
  }
@@ -0,0 +1,41 @@
1
+ //
2
+ // Copyright IBM Corp. 2018, 2018
3
+ //
4
+ // This source code is licensed under the Apache-2.0 license found in the
5
+ // LICENSE file in the root directory of this source tree.
6
+ //
7
+
8
+ @import 'mixins';
9
+
10
+ /// Overrides `$carbon--grid-breakpoints` to use a 12 column grid instead of the default 16
11
+ /// @type Map
12
+ /// @access public
13
+ /// @group @carbon/grid
14
+ $carbon--12-column-grid: map-merge(
15
+ $carbon--grid-breakpoints,
16
+ (
17
+ lg:
18
+ map-merge(
19
+ map-get($carbon--grid-breakpoints, lg),
20
+ (
21
+ columns: 12,
22
+ )
23
+ ),
24
+ xlg:
25
+ map-merge(
26
+ map-get($carbon--grid-breakpoints, xlg),
27
+ (
28
+ columns: 12,
29
+ )
30
+ ),
31
+ max:
32
+ map-merge(
33
+ map-get($carbon--grid-breakpoints, max),
34
+ (
35
+ columns: 12,
36
+ )
37
+ ),
38
+ )
39
+ );
40
+
41
+ @include carbon--grid($breakpoints: $carbon--12-column-grid);
@@ -0,0 +1,41 @@
1
+ //
2
+ // Copyright IBM Corp. 2018, 2018
3
+ //
4
+ // This source code is licensed under the Apache-2.0 license found in the
5
+ // LICENSE file in the root directory of this source tree.
6
+ //
7
+
8
+ @import 'mixins';
9
+
10
+ /// Overrides `$carbon--grid-breakpoints` to use a 12 column grid instead of the default 16
11
+ /// @type Map
12
+ /// @access public
13
+ /// @group @carbon/grid
14
+ $carbon--12-column-grid: map-merge(
15
+ $carbon--grid-breakpoints,
16
+ (
17
+ lg:
18
+ map-merge(
19
+ map-get($carbon--grid-breakpoints, lg),
20
+ (
21
+ columns: 12,
22
+ )
23
+ ),
24
+ xlg:
25
+ map-merge(
26
+ map-get($carbon--grid-breakpoints, xlg),
27
+ (
28
+ columns: 12,
29
+ )
30
+ ),
31
+ max:
32
+ map-merge(
33
+ map-get($carbon--grid-breakpoints, max),
34
+ (
35
+ columns: 12,
36
+ )
37
+ ),
38
+ )
39
+ );
40
+
41
+ @include carbon--grid($breakpoints: $carbon--12-column-grid);