@carbon/charts 0.41.49 → 0.41.50

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 (242) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/build/demo/data/index.d.ts +9 -3
  3. package/build/demo/data/wordcloud.d.ts +14 -0
  4. package/build/src/charts/index.d.ts +1 -0
  5. package/build/src/charts/wordcloud.d.ts +6 -0
  6. package/build/src/components/graphs/wordcloud.d.ts +10 -0
  7. package/build/src/components/index.d.ts +1 -0
  8. package/build/src/configuration.d.ts +2 -1
  9. package/build/src/interfaces/charts.d.ts +23 -0
  10. package/build/src/interfaces/events.d.ts +9 -0
  11. package/bundle.js +1 -1
  12. package/charts/index.d.ts +1 -0
  13. package/charts/index.js +1 -0
  14. package/charts/index.js.map +1 -1
  15. package/charts/wordcloud.d.ts +6 -0
  16. package/charts/wordcloud.js +46 -0
  17. package/charts/wordcloud.js.map +1 -0
  18. package/components/essentials/tooltip-axis.js +1 -1
  19. package/components/essentials/tooltip-axis.js.map +1 -1
  20. package/components/graphs/boxplot.js +2 -2
  21. package/components/graphs/boxplot.js.map +1 -1
  22. package/components/graphs/wordcloud.d.ts +10 -0
  23. package/components/graphs/wordcloud.js +229 -0
  24. package/components/graphs/wordcloud.js.map +1 -0
  25. package/components/index.d.ts +1 -0
  26. package/components/index.js +1 -0
  27. package/components/index.js.map +1 -1
  28. package/configuration.d.ts +2 -1
  29. package/configuration.js +22 -0
  30. package/configuration.js.map +1 -1
  31. package/demo/data/bundle.js +1 -1
  32. package/demo/data/index.d.ts +9 -3
  33. package/demo/data/index.js +25 -8
  34. package/demo/data/index.js.map +1 -1
  35. package/demo/data/wordcloud.d.ts +14 -0
  36. package/demo/data/wordcloud.js +105 -0
  37. package/demo/data/wordcloud.js.map +1 -0
  38. package/demo/styles.css +2824 -28
  39. package/demo/styles.css.map +1 -1
  40. package/demo/styles.min.css +1 -1
  41. package/demo/styles.min.css.map +1 -1
  42. package/demo/tsconfig.tsbuildinfo +29 -15
  43. package/interfaces/charts.d.ts +23 -0
  44. package/interfaces/charts.js.map +1 -1
  45. package/interfaces/events.d.ts +9 -0
  46. package/interfaces/events.js +10 -0
  47. package/interfaces/events.js.map +1 -1
  48. package/package.json +8 -7
  49. package/styles/_type.scss +4 -2
  50. package/styles/graphs/_wordcloud.scss +7 -0
  51. package/styles/graphs/index.scss +1 -0
  52. package/styles/vendor/@carbon/colors/README.md +4 -3
  53. package/styles/vendor/@carbon/colors/es/index.js +13 -12
  54. package/styles/vendor/@carbon/colors/lib/index.js +98 -93
  55. package/styles/vendor/@carbon/colors/package.json +14 -10
  56. package/styles/vendor/@carbon/colors/scss/colors.scss +1 -1
  57. package/styles/vendor/@carbon/colors/scss/index.scss +1 -1
  58. package/styles/vendor/@carbon/colors/scss/mixins.scss +33 -13
  59. package/styles/vendor/@carbon/colors/umd/index.js +99 -94
  60. package/styles/vendor/@carbon/elements/README.md +0 -6
  61. package/styles/vendor/@carbon/elements/es/index.js +4 -11
  62. package/styles/vendor/@carbon/elements/lib/index.js +959 -13
  63. package/styles/vendor/@carbon/elements/package.json +17 -13
  64. package/styles/vendor/@carbon/elements/scss/colors/colors.scss +1 -1
  65. package/styles/vendor/@carbon/elements/scss/colors/index.scss +1 -1
  66. package/styles/vendor/@carbon/elements/scss/colors/mixins.scss +33 -13
  67. package/styles/vendor/@carbon/elements/scss/grid/_inlined/_mixins.scss +82 -22
  68. package/styles/vendor/@carbon/elements/scss/grid/_mixins.scss +82 -22
  69. package/styles/vendor/@carbon/elements/scss/grid/modules/_breakpoint.scss +266 -0
  70. package/styles/vendor/@carbon/{themes/node_modules/@carbon/colors/scss/colors.scss → elements/scss/grid/modules/_config.scss} +6 -6
  71. package/styles/vendor/@carbon/elements/scss/grid/modules/_css-grid.scss +350 -0
  72. package/styles/vendor/@carbon/elements/scss/grid/modules/_mixins.scss +323 -0
  73. package/styles/vendor/@carbon/elements/scss/grid/vendor/@carbon/layout/_breakpoint.scss +8 -3
  74. package/styles/vendor/@carbon/elements/scss/grid/vendor/@carbon/layout/modules/_breakpoint.scss +232 -0
  75. package/styles/vendor/@carbon/elements/scss/grid/vendor/@carbon/layout/modules/_convert.scss +40 -0
  76. package/styles/vendor/@carbon/elements/scss/grid/vendor/@carbon/layout/modules/_spacing.scss +9 -0
  77. package/styles/vendor/@carbon/elements/scss/grid/vendor/@carbon/layout/modules/_utilities.scss +41 -0
  78. package/styles/vendor/@carbon/elements/scss/grid/vendor/@carbon/layout/modules/generated/_fluid-spacing.scss +37 -0
  79. package/styles/vendor/@carbon/elements/scss/grid/vendor/@carbon/layout/modules/generated/_spacing.scss +85 -0
  80. package/styles/vendor/@carbon/elements/scss/layout/_breakpoint.scss +8 -3
  81. package/styles/vendor/@carbon/elements/scss/layout/modules/_breakpoint.scss +232 -0
  82. package/styles/vendor/@carbon/elements/scss/layout/modules/_convert.scss +40 -0
  83. package/styles/vendor/@carbon/elements/scss/layout/modules/_spacing.scss +9 -0
  84. package/styles/vendor/@carbon/elements/scss/layout/modules/_utilities.scss +41 -0
  85. package/styles/vendor/@carbon/elements/scss/layout/modules/generated/_fluid-spacing.scss +37 -0
  86. package/styles/vendor/@carbon/elements/scss/layout/modules/generated/_spacing.scss +85 -0
  87. package/styles/vendor/@carbon/elements/scss/motion/motion.scss +24 -0
  88. package/styles/vendor/@carbon/elements/scss/themes/generated/_mixins.scss +643 -138
  89. package/styles/vendor/@carbon/elements/scss/themes/generated/_themes.scss +154 -77
  90. package/styles/vendor/@carbon/elements/scss/themes/generated/_tokens.scss +157 -75
  91. package/styles/vendor/@carbon/elements/scss/themes/modules/_theme.scss +50 -0
  92. package/styles/vendor/@carbon/elements/scss/themes/modules/_themes.scss +8 -0
  93. package/styles/vendor/@carbon/elements/scss/themes/modules/_utilities.scss +18 -0
  94. package/styles/vendor/@carbon/elements/scss/themes/modules/generated/_themes.scss +247 -0
  95. package/styles/vendor/@carbon/elements/scss/type/_font-family.scss +2 -2
  96. package/styles/vendor/@carbon/elements/scss/type/_inlined/_font-family.scss +2 -2
  97. package/styles/vendor/@carbon/elements/scss/type/_inlined/_reset.scss +9 -3
  98. package/styles/vendor/@carbon/elements/scss/type/_inlined/_scale.scss +2 -2
  99. package/styles/vendor/@carbon/elements/scss/type/_inlined/_styles.scss +60 -57
  100. package/styles/vendor/@carbon/elements/scss/type/_inlined/font-face/_mono.scss +72 -72
  101. package/styles/vendor/@carbon/elements/scss/type/_inlined/font-face/_sans-condensed.scss +302 -0
  102. package/styles/vendor/@carbon/elements/scss/type/_inlined/font-face/_sans.scss +84 -84
  103. package/styles/vendor/@carbon/elements/scss/type/_inlined/font-face/_serif.scss +72 -72
  104. package/styles/vendor/@carbon/elements/scss/type/_reset.scss +9 -3
  105. package/styles/vendor/@carbon/elements/scss/type/_scale.scss +2 -2
  106. package/styles/vendor/@carbon/elements/scss/type/_styles.scss +60 -57
  107. package/styles/vendor/@carbon/elements/scss/type/font-face/_mono.scss +72 -72
  108. package/styles/vendor/@carbon/elements/scss/type/font-face/_sans-condensed.scss +302 -0
  109. package/styles/vendor/@carbon/elements/scss/type/font-face/_sans.scss +84 -84
  110. package/styles/vendor/@carbon/elements/scss/type/font-face/_serif.scss +72 -72
  111. package/styles/vendor/@carbon/elements/scss/type/modules/_classes.scss +42 -0
  112. package/styles/vendor/@carbon/elements/scss/type/modules/_font-family.scss +70 -0
  113. package/styles/vendor/@carbon/elements/scss/type/modules/_prefix.scss +11 -0
  114. package/styles/vendor/@carbon/elements/scss/type/modules/_reset.scss +92 -0
  115. package/styles/vendor/@carbon/elements/scss/type/modules/_scale.scss +56 -0
  116. package/styles/vendor/@carbon/elements/scss/type/modules/_styles.scss +713 -0
  117. package/styles/vendor/@carbon/elements/scss/type/vendor/@carbon/layout/_breakpoint.scss +8 -3
  118. package/styles/vendor/@carbon/elements/scss/type/vendor/@carbon/layout/modules/_breakpoint.scss +232 -0
  119. package/styles/vendor/@carbon/elements/scss/type/vendor/@carbon/layout/modules/_convert.scss +40 -0
  120. package/styles/vendor/@carbon/elements/scss/type/vendor/@carbon/layout/modules/_spacing.scss +9 -0
  121. package/styles/vendor/@carbon/elements/scss/type/vendor/@carbon/layout/modules/_utilities.scss +41 -0
  122. package/styles/vendor/@carbon/elements/scss/type/vendor/@carbon/layout/modules/generated/_fluid-spacing.scss +37 -0
  123. package/styles/vendor/@carbon/elements/scss/type/vendor/@carbon/layout/modules/generated/_spacing.scss +85 -0
  124. package/styles/vendor/@carbon/elements/src/__tests__/PublicAPI-test.js +12 -0
  125. package/styles/vendor/@carbon/elements/src/__tests__/__snapshots__/PublicAPI-test.js.snap +306 -0
  126. package/styles/vendor/@carbon/elements/src/index.js +166 -4
  127. package/styles/vendor/@carbon/elements/umd/index.js +961 -17
  128. package/styles/vendor/@carbon/layout/README.md +0 -6
  129. package/styles/vendor/@carbon/layout/es/index.js +1 -1
  130. package/styles/vendor/@carbon/{themes/node_modules/@carbon/colors/scss → layout}/index.scss +5 -6
  131. package/styles/vendor/@carbon/layout/lib/index.js +30 -30
  132. package/styles/vendor/@carbon/layout/package.json +14 -10
  133. package/styles/vendor/@carbon/layout/scss/_breakpoint.scss +8 -3
  134. package/styles/vendor/@carbon/layout/scss/modules/_breakpoint.scss +232 -0
  135. package/styles/vendor/@carbon/layout/scss/modules/_convert.scss +40 -0
  136. package/styles/vendor/@carbon/layout/scss/modules/_spacing.scss +9 -0
  137. package/styles/vendor/@carbon/layout/scss/modules/_utilities.scss +41 -0
  138. package/styles/vendor/@carbon/layout/scss/modules/generated/_fluid-spacing.scss +37 -0
  139. package/styles/vendor/@carbon/layout/scss/modules/generated/_spacing.scss +85 -0
  140. package/styles/vendor/@carbon/layout/umd/index.js +31 -31
  141. package/styles/vendor/@carbon/motion/README.md +0 -6
  142. package/styles/vendor/@carbon/motion/es/index.js +8 -1
  143. package/styles/vendor/@carbon/motion/index.scss +56 -0
  144. package/styles/vendor/@carbon/motion/lib/index.js +14 -0
  145. package/styles/vendor/@carbon/motion/package.json +10 -6
  146. package/styles/vendor/@carbon/motion/scss/motion.scss +24 -0
  147. package/styles/vendor/@carbon/motion/src/index.js +16 -0
  148. package/styles/vendor/@carbon/motion/umd/index.js +15 -1
  149. package/styles/vendor/@carbon/themes/README.md +5 -4
  150. package/styles/vendor/@carbon/themes/es/index.js +719 -57
  151. package/styles/vendor/@carbon/themes/index.scss +9 -0
  152. package/styles/vendor/@carbon/themes/lib/index.js +1297 -251
  153. package/styles/vendor/@carbon/themes/metadata.yml +3 -0
  154. package/styles/vendor/@carbon/themes/package.json +23 -14
  155. package/styles/vendor/@carbon/themes/scss/_mixins.scss +27 -146
  156. package/styles/vendor/@carbon/themes/scss/_theme-maps.scss +3 -263
  157. package/styles/vendor/@carbon/themes/scss/_tokens.scss +2 -297
  158. package/styles/vendor/@carbon/themes/scss/generated/_mixins.scss +1851 -0
  159. package/styles/vendor/@carbon/themes/scss/generated/_themes.scss +1534 -0
  160. package/styles/vendor/@carbon/themes/scss/generated/_tokens.scss +1757 -0
  161. package/styles/vendor/@carbon/themes/scss/modules/_theme.scss +50 -0
  162. package/styles/vendor/@carbon/themes/scss/modules/_themes.scss +8 -0
  163. package/styles/vendor/@carbon/themes/scss/modules/_utilities.scss +18 -0
  164. package/styles/vendor/@carbon/themes/scss/modules/generated/_themes.scss +247 -0
  165. package/styles/vendor/@carbon/themes/scss/themes.scss +3 -2
  166. package/styles/vendor/@carbon/themes/src/g10.js +97 -5
  167. package/styles/vendor/@carbon/themes/src/g100.js +96 -4
  168. package/styles/vendor/@carbon/themes/src/g90.js +98 -6
  169. package/styles/vendor/@carbon/themes/src/index.js +5 -3
  170. package/styles/vendor/@carbon/themes/src/tokens.js +112 -2
  171. package/styles/vendor/@carbon/themes/src/tools.js +25 -0
  172. package/styles/vendor/@carbon/themes/src/v9.js +181 -0
  173. package/styles/vendor/@carbon/themes/src/white.js +98 -3
  174. package/styles/vendor/@carbon/themes/umd/index.js +1297 -254
  175. package/styles/vendor/@carbon/type/README.md +0 -6
  176. package/styles/vendor/@carbon/type/es/index.js +111 -82
  177. package/styles/vendor/@carbon/type/lib/index.js +132 -103
  178. package/styles/vendor/@carbon/type/package.json +12 -8
  179. package/styles/vendor/@carbon/type/scss/_font-family.scss +2 -2
  180. package/styles/vendor/@carbon/type/scss/_inlined/_font-family.scss +2 -2
  181. package/styles/vendor/@carbon/type/scss/_inlined/_reset.scss +9 -3
  182. package/styles/vendor/@carbon/type/scss/_inlined/_scale.scss +2 -2
  183. package/styles/vendor/@carbon/type/scss/_inlined/_styles.scss +60 -57
  184. package/styles/vendor/@carbon/type/scss/_inlined/font-face/_mono.scss +72 -72
  185. package/styles/vendor/@carbon/type/scss/_inlined/font-face/_sans-condensed.scss +302 -0
  186. package/styles/vendor/@carbon/type/scss/_inlined/font-face/_sans.scss +84 -84
  187. package/styles/vendor/@carbon/type/scss/_inlined/font-face/_serif.scss +72 -72
  188. package/styles/vendor/@carbon/type/scss/_reset.scss +9 -3
  189. package/styles/vendor/@carbon/type/scss/_scale.scss +2 -2
  190. package/styles/vendor/@carbon/type/scss/_styles.scss +60 -57
  191. package/styles/vendor/@carbon/type/scss/font-face/_mono.scss +72 -72
  192. package/styles/vendor/@carbon/type/scss/font-face/_sans-condensed.scss +302 -0
  193. package/styles/vendor/@carbon/type/scss/font-face/_sans.scss +84 -84
  194. package/styles/vendor/@carbon/type/scss/font-face/_serif.scss +72 -72
  195. package/styles/vendor/@carbon/type/scss/modules/_classes.scss +42 -0
  196. package/styles/vendor/@carbon/type/scss/modules/_font-family.scss +70 -0
  197. package/styles/vendor/@carbon/type/scss/modules/_prefix.scss +11 -0
  198. package/styles/vendor/@carbon/type/scss/modules/_reset.scss +92 -0
  199. package/styles/vendor/@carbon/type/scss/modules/_scale.scss +56 -0
  200. package/styles/vendor/@carbon/type/scss/modules/_styles.scss +713 -0
  201. package/styles/vendor/@carbon/type/scss/vendor/@carbon/layout/_breakpoint.scss +8 -3
  202. package/styles/vendor/@carbon/type/scss/vendor/@carbon/layout/modules/_breakpoint.scss +232 -0
  203. package/styles/vendor/@carbon/type/scss/vendor/@carbon/layout/modules/_convert.scss +40 -0
  204. package/styles/vendor/@carbon/type/scss/vendor/@carbon/layout/modules/_spacing.scss +9 -0
  205. package/styles/vendor/@carbon/type/scss/vendor/@carbon/layout/modules/_utilities.scss +41 -0
  206. package/styles/vendor/@carbon/type/scss/vendor/@carbon/layout/modules/generated/_fluid-spacing.scss +37 -0
  207. package/styles/vendor/@carbon/type/scss/vendor/@carbon/layout/modules/generated/_spacing.scss +85 -0
  208. package/styles/vendor/@carbon/type/src/__tests__/__snapshots__/styles-test.js.snap +32 -34
  209. package/styles/vendor/@carbon/type/src/__tests__/exports-test.js +1 -1
  210. package/styles/vendor/@carbon/type/src/__tests__/fluid-test.js +26 -26
  211. package/styles/vendor/@carbon/type/src/__tests__/styles-test.js +1 -1
  212. package/styles/vendor/@carbon/type/src/__tests__/tokens-test.js +2 -2
  213. package/styles/vendor/@carbon/type/src/fluid.js +1 -1
  214. package/styles/vendor/@carbon/type/src/index.js +1 -1
  215. package/styles/vendor/@carbon/type/src/styles.js +65 -64
  216. package/styles/vendor/@carbon/type/src/tokens.js +64 -31
  217. package/styles/vendor/@carbon/type/umd/index.js +134 -105
  218. package/styles-g10.css +570 -2
  219. package/styles-g10.css.map +1 -1
  220. package/styles-g10.min.css +1 -1
  221. package/styles-g10.min.css.map +1 -1
  222. package/styles-g100.css +574 -6
  223. package/styles-g100.css.map +1 -1
  224. package/styles-g100.min.css +1 -1
  225. package/styles-g100.min.css.map +1 -1
  226. package/styles-g90.css +574 -6
  227. package/styles-g90.css.map +1 -1
  228. package/styles-g90.min.css +1 -1
  229. package/styles-g90.min.css.map +1 -1
  230. package/styles.css +570 -2
  231. package/styles.css.map +1 -1
  232. package/styles.min.css +1 -1
  233. package/styles.min.css.map +1 -1
  234. package/tsconfig.tsbuildinfo +64 -14
  235. package/styles/vendor/@carbon/layout/docs/sass.md +0 -1899
  236. package/styles/vendor/@carbon/themes/node_modules/@carbon/colors/LICENSE +0 -201
  237. package/styles/vendor/@carbon/themes/node_modules/@carbon/colors/README.md +0 -154
  238. package/styles/vendor/@carbon/themes/node_modules/@carbon/colors/es/index.js +0 -287
  239. package/styles/vendor/@carbon/themes/node_modules/@carbon/colors/lib/index.js +0 -410
  240. package/styles/vendor/@carbon/themes/node_modules/@carbon/colors/package.json +0 -51
  241. package/styles/vendor/@carbon/themes/node_modules/@carbon/colors/scss/mixins.scss +0 -646
  242. package/styles/vendor/@carbon/themes/node_modules/@carbon/colors/umd/index.js +0 -416
@@ -0,0 +1,37 @@
1
+ // Code generated by @carbon/layout. DO NOT EDIT.
2
+ //
3
+ // Copyright IBM Corp. 2018, 2019
4
+ //
5
+ // This source code is licensed under the Apache-2.0 license found in the
6
+ // LICENSE file in the root directory of this source tree.
7
+ //
8
+
9
+ /// @type Number
10
+ /// @access public
11
+ /// @group @carbon/layout
12
+ $fluid-spacing-01: 0 !default;
13
+
14
+ /// @type Number
15
+ /// @access public
16
+ /// @group @carbon/layout
17
+ $fluid-spacing-02: 2vw !default;
18
+
19
+ /// @type Number
20
+ /// @access public
21
+ /// @group @carbon/layout
22
+ $fluid-spacing-03: 5vw !default;
23
+
24
+ /// @type Number
25
+ /// @access public
26
+ /// @group @carbon/layout
27
+ $fluid-spacing-04: 10vw !default;
28
+
29
+ /// @type Map
30
+ /// @access public
31
+ /// @group @carbon/layout
32
+ $fluid-spacing: (
33
+ fluid-spacing-01: $fluid-spacing-01,
34
+ fluid-spacing-02: $fluid-spacing-02,
35
+ fluid-spacing-03: $fluid-spacing-03,
36
+ fluid-spacing-04: $fluid-spacing-04,
37
+ );
@@ -0,0 +1,85 @@
1
+ // Code generated by @carbon/layout. DO NOT EDIT.
2
+ //
3
+ // Copyright IBM Corp. 2018, 2019
4
+ //
5
+ // This source code is licensed under the Apache-2.0 license found in the
6
+ // LICENSE file in the root directory of this source tree.
7
+ //
8
+
9
+ /// @type Number
10
+ /// @access public
11
+ /// @group @carbon/layout
12
+ $spacing-01: 0.125rem !default;
13
+
14
+ /// @type Number
15
+ /// @access public
16
+ /// @group @carbon/layout
17
+ $spacing-02: 0.25rem !default;
18
+
19
+ /// @type Number
20
+ /// @access public
21
+ /// @group @carbon/layout
22
+ $spacing-03: 0.5rem !default;
23
+
24
+ /// @type Number
25
+ /// @access public
26
+ /// @group @carbon/layout
27
+ $spacing-04: 0.75rem !default;
28
+
29
+ /// @type Number
30
+ /// @access public
31
+ /// @group @carbon/layout
32
+ $spacing-05: 1rem !default;
33
+
34
+ /// @type Number
35
+ /// @access public
36
+ /// @group @carbon/layout
37
+ $spacing-06: 1.5rem !default;
38
+
39
+ /// @type Number
40
+ /// @access public
41
+ /// @group @carbon/layout
42
+ $spacing-07: 2rem !default;
43
+
44
+ /// @type Number
45
+ /// @access public
46
+ /// @group @carbon/layout
47
+ $spacing-08: 2.5rem !default;
48
+
49
+ /// @type Number
50
+ /// @access public
51
+ /// @group @carbon/layout
52
+ $spacing-09: 3rem !default;
53
+
54
+ /// @type Number
55
+ /// @access public
56
+ /// @group @carbon/layout
57
+ $spacing-10: 4rem !default;
58
+
59
+ /// @type Number
60
+ /// @access public
61
+ /// @group @carbon/layout
62
+ $spacing-11: 5rem !default;
63
+
64
+ /// @type Number
65
+ /// @access public
66
+ /// @group @carbon/layout
67
+ $spacing-12: 6rem !default;
68
+
69
+ /// @type Map
70
+ /// @access public
71
+ /// @group @carbon/layout
72
+ $spacing: (
73
+ spacing-01: $spacing-01,
74
+ spacing-02: $spacing-02,
75
+ spacing-03: $spacing-03,
76
+ spacing-04: $spacing-04,
77
+ spacing-05: $spacing-05,
78
+ spacing-06: $spacing-06,
79
+ spacing-07: $spacing-07,
80
+ spacing-08: $spacing-08,
81
+ spacing-09: $spacing-09,
82
+ spacing-10: $spacing-10,
83
+ spacing-11: $spacing-11,
84
+ spacing-12: $spacing-12,
85
+ );
@@ -19,7 +19,7 @@ $carbon--grid-gutter: carbon--rem(32px);
19
19
  /// @type Number
20
20
  /// @access public
21
21
  /// @group @carbon/layout
22
- $carbon--grid-gutter--condensed: carbon--rem(2px);
22
+ $carbon--grid-gutter--condensed: carbon--rem(1px);
23
23
 
24
24
  // Initial map of our breakpoints and their values
25
25
  /// @type Map
@@ -125,7 +125,7 @@ $carbon--grid-breakpoints: (
125
125
  @return '-#{$name}';
126
126
  }
127
127
 
128
- /// Generate a media query up to the width of the given breakpoint name
128
+ /// Generate a media query from the width of the given breakpoint to infinity
129
129
  /// @param {String | Number} $name
130
130
  /// @param {Map} $breakpoints [$carbon--grid-breakpoints] - A map of breakpoints where the key is the name
131
131
  /// @content
@@ -163,8 +163,13 @@ $carbon--grid-breakpoints: (
163
163
  @content;
164
164
  }
165
165
  } @else if map-has-key($breakpoints, $name) {
166
+ // We borrow this logic from bootstrap for specifying the value of the
167
+ // max-width. The maximum width is calculated by finding the breakpoint and
168
+ // subtracting .02 from its value. This value is used instead of .01 to
169
+ // avoid rounding issues in Safari
170
+ // https://github.com/twbs/bootstrap/blob/c5b1919deaf5393fcca9e9b9d7ce9c338160d99d/scss/mixins/_breakpoints.scss#L34-L46
166
171
  $breakpoint: map-get($breakpoints, $name);
167
- $width: map-get($breakpoint, width);
172
+ $width: map-get($breakpoint, width) - 0.02;
168
173
  @media (max-width: $width) {
169
174
  @content;
170
175
  }
@@ -0,0 +1,232 @@
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
+ // https://github.com/twbs/bootstrap/blob/v4-dev/scss/mixins/_breakpoints.scss
9
+ @use 'sass:list';
10
+ @use 'sass:map';
11
+ @use 'sass:meta';
12
+ @use 'convert';
13
+ @use 'utilities';
14
+
15
+ /// Carbon gutter size in rem
16
+ /// @type Number
17
+ /// @access public
18
+ /// @group @carbon/layout
19
+ $grid-gutter: convert.rem(32px);
20
+
21
+ /// Carbon condensed gutter size in rem
22
+ /// @type Number
23
+ /// @access public
24
+ /// @group @carbon/layout
25
+ $grid-gutter--condensed: convert.rem(1px);
26
+
27
+ // Initial map of our breakpoints and their values
28
+ /// @type Map
29
+ /// @access public
30
+ /// @group @carbon/layout
31
+ $grid-breakpoints: (
32
+ sm: (
33
+ columns: 4,
34
+ margin: 0,
35
+ width: convert.rem(320px),
36
+ ),
37
+ md: (
38
+ columns: 8,
39
+ margin: convert.rem(16px),
40
+ width: convert.rem(672px),
41
+ ),
42
+ lg: (
43
+ columns: 16,
44
+ margin: convert.rem(16px),
45
+ width: convert.rem(1056px),
46
+ ),
47
+ xlg: (
48
+ columns: 16,
49
+ margin: convert.rem(16px),
50
+ width: convert.rem(1312px),
51
+ ),
52
+ max: (
53
+ columns: 16,
54
+ margin: convert.rem(24px),
55
+ width: convert.rem(1584px),
56
+ ),
57
+ ) !default;
58
+
59
+ /// Get the value of the next breakpoint, or null for the last breakpoint
60
+ /// @param {String} $name - The name of the brekapoint
61
+ /// @param {Map} $breakpoints [$grid-breakpoints] - A map of breakpoints where the key is the name of the breakpoint and the value is the values for the breakpoint
62
+ /// @param {List} $breakpoint-names [map-keys($breakpoints)] - A list of names from the `$breakpoints` map
63
+ /// @return {String}
64
+ /// @access public
65
+ /// @group @carbon/layout
66
+ @function breakpoint-next(
67
+ $name,
68
+ $breakpoints: $grid-breakpoints,
69
+ $breakpoint-names: map.keys($breakpoints)
70
+ ) {
71
+ $n: list.index($breakpoint-names, $name);
72
+ @if $n != null and $n < list.length($breakpoint-names) {
73
+ @return list.nth($breakpoint-names, $n + 1);
74
+ }
75
+ @return null;
76
+ }
77
+
78
+ /// Get the value of the previous breakpoint, or null for the first breakpoint
79
+ /// @param {String} $name - The name of the brekapoint
80
+ /// @param {Map} $breakpoints [$grid-breakpoints] - A map of breakpoints where the key is the name of the breakpoint and the value is the values for the breakpoint
81
+ /// @param {List} $breakpoint-names [map-keys($breakpoints)] - A list of names from the `$breakpoints` map
82
+ /// @return {String}
83
+ /// @access public
84
+ /// @group @carbon/layout
85
+ @function breakpoint-prev(
86
+ $name,
87
+ $breakpoints: $grid-breakpoints,
88
+ $breakpoint-names: map.keys($breakpoints)
89
+ ) {
90
+ $n: list.index($breakpoint-names, $name);
91
+ @if $n != null and $n > 1 {
92
+ @return list.nth($breakpoint-names, $n - 1);
93
+ }
94
+ @return null;
95
+ }
96
+
97
+ /// Check to see if the given breakpoint name
98
+ /// @param {String} $name - The name of the brekapoint
99
+ /// @param {Map} $breakpoints [$grid-breakpoints] - A map of breakpoints where the key is the name of the breakpoint and the value is the values for the breakpoint
100
+ /// @return {Bool}
101
+ /// @access public
102
+ /// @group @carbon/layout
103
+ @function is-smallest-breakpoint($name, $breakpoints: $grid-breakpoints) {
104
+ @return list.index(map.keys($breakpoints), $name) == 1;
105
+ }
106
+
107
+ /// Returns the largest breakpoint name
108
+ /// @param {Map} $breakpoints [$grid-breakpoints] - A map of breakpoints where the key is the name
109
+ /// @return {String}
110
+ /// @access public
111
+ /// @group @carbon/layout
112
+ @function largest-breakpoint-name($breakpoints: $grid-breakpoints) {
113
+ $total-breakpoints: list.length($breakpoints);
114
+ @return key-by-index($breakpoints, $total-breakpoints);
115
+ }
116
+
117
+ /// Get the infix for a given breakpoint in a list of breakpoints. Usesful for generate the size part in a selector, for example: `.prefix--col-sm-2`.
118
+ /// @param {String} $name - The name of the breakpoint
119
+ /// @return {String}
120
+ /// @access public
121
+ /// @group @carbon/layout
122
+ @function breakpoint-infix($name) {
123
+ @return '-#{$name}';
124
+ }
125
+
126
+ /// Generate a media query from the width of the given breakpoint to infinity
127
+ /// @param {String | Number} $name
128
+ /// @param {Map} $breakpoints [$grid-breakpoints] - A map of breakpoints where the key is the name
129
+ /// @content
130
+ /// @access public
131
+ /// @group @carbon/layout
132
+ @mixin breakpoint-up($name, $breakpoints: $grid-breakpoints) {
133
+ @if meta.type-of($name) == 'number' {
134
+ @media (min-width: $name) {
135
+ @content;
136
+ }
137
+ } @else if map.has-key($breakpoints, $name) {
138
+ $breakpoint: map.get($breakpoints, $name);
139
+ $width: map.get($breakpoint, width);
140
+ @if is-smallest-breakpoint($name, $breakpoints) {
141
+ @content;
142
+ } @else {
143
+ @media (min-width: $width) {
144
+ @content;
145
+ }
146
+ }
147
+ } @else {
148
+ @error 'Unable to find a breakpoint with name `#{$name}`. Expected one of: (#{map.keys($breakpoints)})';
149
+ }
150
+ }
151
+
152
+ /// Generate a media query for the maximum width of the given styles
153
+ /// @param {String | Number} $name
154
+ /// @param {Map} $breakpoints [$grid-breakpoints] - A map of breakpoints where the key is the name
155
+ /// @content
156
+ /// @access public
157
+ /// @group @carbon/layout
158
+ @mixin breakpoint-down($name, $breakpoints: $grid-breakpoints) {
159
+ @if meta.type-of($name) == 'number' {
160
+ @media (max-width: $name) {
161
+ @content;
162
+ }
163
+ } @else if map.has-key($breakpoints, $name) {
164
+ // We borrow this logic from bootstrap for specifying the value of the
165
+ // max-width. The maximum width is calculated by finding the breakpoint and
166
+ // subtracting .02 from its value. This value is used instead of .01 to
167
+ // avoid rounding issues in Safari
168
+ // https://github.com/twbs/bootstrap/blob/c5b1919deaf5393fcca9e9b9d7ce9c338160d99d/scss/mixins/_breakpoints.scss#L34-L46
169
+ $breakpoint: map.get($breakpoints, $name);
170
+ $width: map.get($breakpoint, width) - 0.02;
171
+ @media (max-width: $width) {
172
+ @content;
173
+ }
174
+ } @else {
175
+ @error 'Unable to find a breakpoint with name `#{$name}`. Expected one of: (#{map.keys($breakpoints)})';
176
+ }
177
+ }
178
+
179
+ /// Generate a media query for the range between the lower and upper breakpoints
180
+ /// @param {String | Number} $lower
181
+ /// @param {String | Number} $upper
182
+ /// @param {Map} $breakpoints [$grid-breakpoints] - A map of breakpoints where the key is the name
183
+ /// @content
184
+ /// @access public
185
+ /// @group @carbon/layout
186
+ @mixin breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) {
187
+ $is-number-lower: meta.type-of($lower) == 'number';
188
+ $is-number-upper: meta.type-of($upper) == 'number';
189
+ $min: if($is-number-lower, $lower, map.get($breakpoints, $lower));
190
+ $max: if($is-number-upper, $upper, map.get($breakpoints, $upper));
191
+
192
+ @if $min and $max {
193
+ $min-width: if(not $is-number-lower and $min, map.get($min, width), $min);
194
+ $max-width: if(not $is-number-upper and $max, map.get($max, width), $max);
195
+ @media (min-width: $min-width) and (max-width: $max-width) {
196
+ @content;
197
+ }
198
+ } @else if $min != null and $max == null {
199
+ @include breakpoint-up($lower) {
200
+ @content;
201
+ }
202
+ } @else if $min == null and $max != null {
203
+ @include breakpoint-down($upper) {
204
+ @content;
205
+ }
206
+ } @else {
207
+ @error 'Unable to find a breakpoint to satisfy: (#{$lower},#{$upper}). Expected both to be one of (#{map.keys($breakpoints)}).';
208
+ }
209
+ }
210
+
211
+ /// Generate media query for the largest breakpoint
212
+ /// @param {Map} $breakpoints [$grid-breakpoints] - A map of breakpoints where the key is the name
213
+ /// @content
214
+ /// @access public
215
+ /// @group @carbon/layout
216
+ @mixin largest-breakpoint($breakpoints: $grid-breakpoints) {
217
+ @include breakpoint(largest-breakpoint-name()) {
218
+ @content;
219
+ }
220
+ }
221
+
222
+ /// Generate a media query for a given breakpoint
223
+ /// @param {String | Number} $name
224
+ /// @param {Map} $breakpoints [$grid-breakpoints] - A map of breakpoints where the key is the name
225
+ /// @content
226
+ /// @access public
227
+ /// @group @carbon/layout
228
+ @mixin breakpoint($name, $breakpoints: $grid-breakpoints) {
229
+ @include breakpoint-up($name, $breakpoints) {
230
+ @content;
231
+ }
232
+ }
@@ -0,0 +1,40 @@
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
+ /// Default font size
9
+ /// @type Number
10
+ /// @access public
11
+ /// @group @carbon/layout
12
+ $base-font-size: 16px !default;
13
+
14
+ /// Convert a given px unit to a rem unit
15
+ /// @param {Number} $px - Number with px unit
16
+ /// @return {Number} Number with rem unit
17
+ /// @access public
18
+ /// @group @carbon/layout
19
+ @function rem($px) {
20
+ @if unit($px) != 'px' {
21
+ // TODO: update to @error in v11
22
+ @warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
23
+ }
24
+
25
+ @return ($px / $base-font-size) * 1rem;
26
+ }
27
+
28
+ /// Convert a given px unit to a em unit
29
+ /// @param {Number} $px - Number with px unit
30
+ /// @return {Number} Number with em unit
31
+ /// @access public
32
+ /// @group @carbon/layout
33
+ @function em($px) {
34
+ @if unit($px) != 'px' {
35
+ // TODO: update to @error in v11
36
+ @warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
37
+ }
38
+
39
+ @return ($px / $base-font-size) * 1em;
40
+ }
@@ -0,0 +1,9 @@
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
+ @forward './generated/fluid-spacing';
9
+ @forward './generated/spacing';
@@ -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
+ /// Map deep get
9
+ /// @author Hugo Giraudel
10
+ /// @access public
11
+ /// @param {Map} $map - Map
12
+ /// @param {Arglist} $keys - Key chain
13
+ /// @return {*} Desired value
14
+ /// @group @carbon/layout
15
+ @function map-deep-get($map, $keys...) {
16
+ @each $key in $keys {
17
+ $map: map-get($map, $key);
18
+ }
19
+ @return $map;
20
+ }
21
+
22
+ /// Provide a map and index, and get back the relevant key value
23
+ /// @access public
24
+ /// @param {Map} $map - Map
25
+ /// @param {Integer} $index - Key chain
26
+ /// @return {String} Desired value
27
+ /// @group @carbon/layout
28
+ @function key-by-index($map, $index) {
29
+ $keys: map-keys($map);
30
+ @return nth($keys, $index);
31
+ }
32
+
33
+ /// Pass in a map, and get the last one in the list back
34
+ /// @access public
35
+ /// @param {Map} $map - Map
36
+ /// @return {*} Desired value
37
+ /// @group @carbon/layout
38
+ @function last-map-item($map) {
39
+ $total-length: length($map);
40
+ @return map-get($map, carbon--key-by-index($map, $total-length));
41
+ }
@@ -0,0 +1,37 @@
1
+ // Code generated by @carbon/layout. DO NOT EDIT.
2
+ //
3
+ // Copyright IBM Corp. 2018, 2019
4
+ //
5
+ // This source code is licensed under the Apache-2.0 license found in the
6
+ // LICENSE file in the root directory of this source tree.
7
+ //
8
+
9
+ /// @type Number
10
+ /// @access public
11
+ /// @group @carbon/layout
12
+ $fluid-spacing-01: 0 !default;
13
+
14
+ /// @type Number
15
+ /// @access public
16
+ /// @group @carbon/layout
17
+ $fluid-spacing-02: 2vw !default;
18
+
19
+ /// @type Number
20
+ /// @access public
21
+ /// @group @carbon/layout
22
+ $fluid-spacing-03: 5vw !default;
23
+
24
+ /// @type Number
25
+ /// @access public
26
+ /// @group @carbon/layout
27
+ $fluid-spacing-04: 10vw !default;
28
+
29
+ /// @type Map
30
+ /// @access public
31
+ /// @group @carbon/layout
32
+ $fluid-spacing: (
33
+ fluid-spacing-01: $fluid-spacing-01,
34
+ fluid-spacing-02: $fluid-spacing-02,
35
+ fluid-spacing-03: $fluid-spacing-03,
36
+ fluid-spacing-04: $fluid-spacing-04,
37
+ );
@@ -0,0 +1,85 @@
1
+ // Code generated by @carbon/layout. DO NOT EDIT.
2
+ //
3
+ // Copyright IBM Corp. 2018, 2019
4
+ //
5
+ // This source code is licensed under the Apache-2.0 license found in the
6
+ // LICENSE file in the root directory of this source tree.
7
+ //
8
+
9
+ /// @type Number
10
+ /// @access public
11
+ /// @group @carbon/layout
12
+ $spacing-01: 0.125rem !default;
13
+
14
+ /// @type Number
15
+ /// @access public
16
+ /// @group @carbon/layout
17
+ $spacing-02: 0.25rem !default;
18
+
19
+ /// @type Number
20
+ /// @access public
21
+ /// @group @carbon/layout
22
+ $spacing-03: 0.5rem !default;
23
+
24
+ /// @type Number
25
+ /// @access public
26
+ /// @group @carbon/layout
27
+ $spacing-04: 0.75rem !default;
28
+
29
+ /// @type Number
30
+ /// @access public
31
+ /// @group @carbon/layout
32
+ $spacing-05: 1rem !default;
33
+
34
+ /// @type Number
35
+ /// @access public
36
+ /// @group @carbon/layout
37
+ $spacing-06: 1.5rem !default;
38
+
39
+ /// @type Number
40
+ /// @access public
41
+ /// @group @carbon/layout
42
+ $spacing-07: 2rem !default;
43
+
44
+ /// @type Number
45
+ /// @access public
46
+ /// @group @carbon/layout
47
+ $spacing-08: 2.5rem !default;
48
+
49
+ /// @type Number
50
+ /// @access public
51
+ /// @group @carbon/layout
52
+ $spacing-09: 3rem !default;
53
+
54
+ /// @type Number
55
+ /// @access public
56
+ /// @group @carbon/layout
57
+ $spacing-10: 4rem !default;
58
+
59
+ /// @type Number
60
+ /// @access public
61
+ /// @group @carbon/layout
62
+ $spacing-11: 5rem !default;
63
+
64
+ /// @type Number
65
+ /// @access public
66
+ /// @group @carbon/layout
67
+ $spacing-12: 6rem !default;
68
+
69
+ /// @type Map
70
+ /// @access public
71
+ /// @group @carbon/layout
72
+ $spacing: (
73
+ spacing-01: $spacing-01,
74
+ spacing-02: $spacing-02,
75
+ spacing-03: $spacing-03,
76
+ spacing-04: $spacing-04,
77
+ spacing-05: $spacing-05,
78
+ spacing-06: $spacing-06,
79
+ spacing-07: $spacing-07,
80
+ spacing-08: $spacing-08,
81
+ spacing-09: $spacing-09,
82
+ spacing-10: $spacing-10,
83
+ spacing-11: $spacing-11,
84
+ spacing-12: $spacing-12,
85
+ );
@@ -5,6 +5,30 @@
5
5
  // LICENSE file in the root directory of this source tree.
6
6
  //
7
7
 
8
+ /// @access public
9
+ /// @group @carbon/motion
10
+ $fast-01: 70ms !default;
11
+
12
+ /// @access public
13
+ /// @group @carbon/motion
14
+ $fast-02: 110ms !default;
15
+
16
+ /// @access public
17
+ /// @group @carbon/motion
18
+ $moderate-01: 150ms !default;
19
+
20
+ /// @access public
21
+ /// @group @carbon/motion
22
+ $moderate-02: 240ms !default;
23
+
24
+ /// @access public
25
+ /// @group @carbon/motion
26
+ $slow-01: 400ms !default;
27
+
28
+ /// @access public
29
+ /// @group @carbon/motion
30
+ $slow-02: 700ms !default;
31
+
8
32
  /// Common component easings
9
33
  /// @type Map
10
34
  /// @access public