@carbon/type 10.41.0 → 10.43.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 +11 -45
  23. package/scss/vendor/@carbon/grid/modules/_config.scss +94 -0
  24. package/scss/vendor/@carbon/grid/modules/_css-grid.scss +470 -0
  25. package/scss/vendor/@carbon/grid/modules/_flex-grid.scss +363 -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
@@ -0,0 +1,27 @@
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
+ /// Used by `exports` mixin to track which modules have been imported
9
+ /// @type Map
10
+ /// @access public
11
+ /// @group @carbon/import-once
12
+ $imported-modules: () !default;
13
+
14
+ /// Module export mixin that helps making sure a module is imported once and only once
15
+ /// @access public
16
+ /// @param {String} $name - Name of exported module
17
+ /// @param {Bool} $warn [false] - Warn when a module has been already imported
18
+ /// @content Declaration blocks to be imported
19
+ /// @group @carbon/import-once
20
+ @mixin exports($name, $warn: false) {
21
+ @if not(index($imported-modules, $name)) {
22
+ $imported-modules: append($imported-modules, $name) !global;
23
+ @content;
24
+ } @else if $warn == true {
25
+ @warn 'Module `#{$name}` has already been imported.';
26
+ }
27
+ }
@@ -0,0 +1,8 @@
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 'import-once';
@@ -21,8 +21,8 @@
21
21
 
22
22
  @use 'sass:meta';
23
23
  @use "sass:math";
24
- @import 'breakpoint'; /* stylelint-disable-line no-invalid-position-at-import-rule */
25
- @import 'utilities'; /* stylelint-disable-line no-invalid-position-at-import-rule */
24
+ @import 'breakpoint';
25
+ @import 'utilities';
26
26
 
27
27
  /// Get the column width for a given breakpoint
28
28
  /// @param {String} $breakpoint
@@ -14,7 +14,7 @@
14
14
  /// @group @carbon/layout
15
15
  @function map-deep-get($map, $keys...) {
16
16
  @each $key in $keys {
17
- $map: map-get($map, $key);
17
+ $map: map.get($map, $key);
18
18
  }
19
19
  @return $map;
20
20
  }
@@ -26,7 +26,7 @@
26
26
  /// @return {String} Desired value
27
27
  /// @group @carbon/layout
28
28
  @function key-by-index($map, $index) {
29
- $keys: map-keys($map);
29
+ $keys: map.keys($map);
30
30
  @return nth($keys, $index);
31
31
  }
32
32
 
@@ -36,6 +36,6 @@
36
36
  /// @return {*} Desired value
37
37
  /// @group @carbon/layout
38
38
  @function last-map-item($map) {
39
- $total-length: length($map);
39
+ $total-length: list.length($map);
40
40
  @return map-get($map, carbon--key-by-index($map, $total-length));
41
41
  }
@@ -18,7 +18,7 @@ $imported-modules: () !default;
18
18
  /// @content Declaration blocks to be imported
19
19
  /// @group @carbon/import-once
20
20
  @mixin exports($name, $warn: false) {
21
- @if (index($imported-modules, $name) == null) {
21
+ @if not(index($imported-modules, $name)) {
22
22
  $imported-modules: append($imported-modules, $name) !global;
23
23
  @content;
24
24
  } @else if $warn == true {