@carbon/layout 10.0.0-rc.0 → 10.2.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.
@@ -10,7 +10,8 @@
10
10
  /// @access public
11
11
  /// @param {Map} $map - Map
12
12
  /// @param {Arglist} $keys - Key chain
13
- /// @return {*} - Desired value
13
+ /// @return {*} Desired value
14
+ /// @group @carbon/layout
14
15
  @function map-deep-get($map, $keys...) {
15
16
  @each $key in $keys {
16
17
  $map: map-get($map, $key);
@@ -18,21 +19,22 @@
18
19
  @return $map;
19
20
  }
20
21
 
21
- /// Key by Index
22
- /// provide a $map, and $index, and get back the relevant
23
- /// key value.
22
+ /// Provide a map and index, and get back the relevant key value
23
+ /// @access public
24
24
  /// @param {Map} $map - Map
25
25
  /// @param {Integer} $index - Key chain
26
- /// @return {String} - Desired value
26
+ /// @return {String} Desired value
27
+ /// @group @carbon/layout
27
28
  @function carbon--key-by-index($map, $index) {
28
29
  $keys: map-keys($map);
29
30
  @return nth($keys, $index);
30
31
  }
31
32
 
32
- /// Last Map Item
33
- /// Pass in a map, and get the last one in the list back.
33
+ /// Pass in a map, and get the last one in the list back
34
+ /// @access public
34
35
  /// @param {Map} $map - Map
35
- /// @return {*} - Desired value
36
+ /// @return {*} Desired value
37
+ /// @group @carbon/layout
36
38
  @function last-map-item($map) {
37
39
  $total-length: length($map);
38
40
  @return map-get($map, carbon--key-by-index($map, $total-length));
@@ -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 'layout';
package/src/index.js CHANGED
@@ -29,7 +29,7 @@ export function em(px) {
29
29
 
30
30
  /**
31
31
  * Convert a given px unit to its string representation
32
- * @param {number} px
32
+ * @param {number} value - number of pixels
33
33
  * @returns {string}
34
34
  */
35
35
  export function px(value) {
@@ -95,6 +95,9 @@ export const spacing06 = miniUnits(3);
95
95
  export const spacing07 = miniUnits(4);
96
96
  export const spacing08 = miniUnits(5);
97
97
  export const spacing09 = miniUnits(6);
98
+ export const spacing10 = miniUnits(8);
99
+ export const spacing11 = miniUnits(10);
100
+ export const spacing12 = miniUnits(12);
98
101
  export const spacing = [
99
102
  spacing01,
100
103
  spacing02,
@@ -105,6 +108,9 @@ export const spacing = [
105
108
  spacing07,
106
109
  spacing08,
107
110
  spacing09,
111
+ spacing10,
112
+ spacing11,
113
+ spacing12,
108
114
  ];
109
115
 
110
116
  // Layout
package/umd/index.js CHANGED
@@ -33,7 +33,7 @@
33
33
  }
34
34
  /**
35
35
  * Convert a given px unit to its string representation
36
- * @param {number} px
36
+ * @param {number} value - number of pixels
37
37
  * @returns {string}
38
38
  */
39
39
 
@@ -93,7 +93,10 @@
93
93
  var spacing07 = miniUnits(4);
94
94
  var spacing08 = miniUnits(5);
95
95
  var spacing09 = miniUnits(6);
96
- var spacing = [spacing01, spacing02, spacing03, spacing04, spacing05, spacing06, spacing07, spacing08, spacing09]; // Layout
96
+ var spacing10 = miniUnits(8);
97
+ var spacing11 = miniUnits(10);
98
+ var spacing12 = miniUnits(12);
99
+ var spacing = [spacing01, spacing02, spacing03, spacing04, spacing05, spacing06, spacing07, spacing08, spacing09, spacing10, spacing11, spacing12]; // Layout
97
100
 
98
101
  var layout01 = miniUnits(2);
99
102
  var layout02 = miniUnits(3);
@@ -123,6 +126,9 @@
123
126
  exports.spacing07 = spacing07;
124
127
  exports.spacing08 = spacing08;
125
128
  exports.spacing09 = spacing09;
129
+ exports.spacing10 = spacing10;
130
+ exports.spacing11 = spacing11;
131
+ exports.spacing12 = spacing12;
126
132
  exports.spacing = spacing;
127
133
  exports.layout01 = layout01;
128
134
  exports.layout02 = layout02;