@carbon/colors 10.1.1 → 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.
package/LICENSE CHANGED
@@ -178,7 +178,7 @@
178
178
  APPENDIX: How to apply the Apache License to your work.
179
179
 
180
180
  To apply the Apache License to your work, attach the following
181
- boilerplate notice, with the fields enclosed by brackets "[]"
181
+ boilerplate notice, with the fields enclosed by brackets "{}"
182
182
  replaced with your own identifying information. (Don't include
183
183
  the brackets!) The text should be enclosed in the appropriate
184
184
  comment syntax for the file format. We also recommend that a
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright 2018 IBM Corp.
189
+ Copyright 2015 IBM Corp.
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
package/README.md CHANGED
@@ -1,19 +1,18 @@
1
1
  # @carbon/colors
2
2
 
3
- > Colors for digital and software products using the Carbon Design
4
- > System
3
+ > Colors for digital and software products using the Carbon Design System
5
4
 
6
5
  ## Getting started
7
6
 
8
- To install `@carbon/colors` in your project, you will need to run the
9
- following command using [npm](https://www.npmjs.com/):
7
+ To install `@carbon/colors` in your project, you will need to run the following
8
+ command using [npm](https://www.npmjs.com/):
10
9
 
11
10
  ```bash
12
11
  npm install -S @carbon/colors
13
12
  ```
14
13
 
15
- If you prefer [Yarn](https://yarnpkg.com/en/), use the following
16
- command instead:
14
+ If you prefer [Yarn](https://yarnpkg.com/en/), use the following command
15
+ instead:
17
16
 
18
17
  ```bash
19
18
  yarn add @carbon/colors
@@ -21,8 +20,8 @@ yarn add @carbon/colors
21
20
 
22
21
  ## Usage
23
22
 
24
- You can use the `@carbon/colors` module in your JavaScript, in
25
- addition to your Sass.
23
+ You can use the `@carbon/colors` module in your JavaScript, in addition to your
24
+ Sass.
26
25
 
27
26
  ### Sass
28
27
 
@@ -32,10 +31,11 @@ In Sass, you can import the files individual by doing:
32
31
  @import '@carbon/colors/scss/colors';
33
32
  ```
34
33
 
35
- This file automatically includes the `carbon--colors` mixin which
36
- initializes all the color variables for the IBM Design Language.
34
+ This file automatically includes the `carbon--colors` mixin which initializes
35
+ all the color variables for the IBM Design Language.
37
36
 
38
- These color variables follow the naming convention: `$carbon--<swatch>-<grade>`. For example:
37
+ These color variables follow the naming convention: `$carbon--<swatch>-<grade>`.
38
+ For example:
39
39
 
40
40
  ```scss
41
41
  $carbon--blue-50;
@@ -44,7 +44,8 @@ $carbon--black-100;
44
44
  $carbon--white-0;
45
45
  ```
46
46
 
47
- You can also use the shorthand form of these colors by dropping the `carbon--` namespace:
47
+ You can also use the shorthand form of these colors by dropping the `carbon--`
48
+ namespace:
48
49
 
49
50
  ```scss
50
51
  $blue-50;
@@ -54,13 +55,11 @@ $white-0;
54
55
  ```
55
56
 
56
57
  _Note: the shorthand variables require that you do not have any other
57
- conflicting variables in your setup. Namespaced variables are always
58
- preferred for this reason, unless you are confident that no collisions
59
- will occur._
58
+ conflicting variables in your setup. Namespaced variables are always preferred
59
+ for this reason, unless you are confident that no collisions will occur._
60
60
 
61
- If you would like you choose when these variables are defined, then
62
- you can call the `carbon--colors` mixin directly by importing the
63
- following file:
61
+ If you would like you choose when these variables are defined, then you can call
62
+ the `carbon--colors` mixin directly by importing the following file:
64
63
 
65
64
  ```scss
66
65
  @import '@carbon/colors/scss/mixins';
@@ -69,11 +68,11 @@ following file:
69
68
  @include carbon--colors();
70
69
  ```
71
70
 
72
- Alongside the color variables detailed above, we also provide a map of
73
- colors so that you can programmatically use these values. This map is
74
- called `$carbon--colors` and each key is the name of a swatch. The
75
- value of these swatches is also a map, but each key is now the grade.
76
- In code, this looks like the following:
71
+ Alongside the color variables detailed above, we also provide a map of colors so
72
+ that you can programmatically use these values. This map is called
73
+ `$carbon--colors` and each key is the name of a swatch. The value of these
74
+ swatches is also a map, but each key is now the grade. In code, this looks like
75
+ the following:
77
76
 
78
77
  <!-- prettier-ignore-start -->
79
78
 
@@ -88,27 +87,27 @@ $carbon--colors: (
88
87
 
89
88
  <!-- prettier-ignore-end -->
90
89
 
91
- You can include this variable by including `@carbon/colors/scss/colors`
92
- or calling the `carbon--colors()` mixin directly.
90
+ You can include this variable by including `@carbon/colors/scss/colors` or
91
+ calling the `carbon--colors()` mixin directly.
93
92
 
94
93
  #### Migrating from previous versions
95
94
 
96
- If you were originally using a project that had color variables
97
- defined as `$ibm-color__<swatch>-<grade>`, or are relying on `$ibm-color-map`, you can also use the entrypoint described above to
98
- access these colors. They are meant as an easier way to help adopt
99
- these packages. However, these variables will be removed in the next
100
- release of Carbon.
95
+ If you were originally using a project that had color variables defined as
96
+ `$ibm-color__<swatch>-<grade>`, or are relying on `$ibm-color-map`, you can also
97
+ use the entrypoint described above to access these colors. They are meant as an
98
+ easier way to help adopt these packages. However, these variables will be
99
+ removed in the next release of Carbon.
101
100
 
102
- Similar to previous efforts, we also provide colors in the formats
103
- mentioned above. For example:
101
+ Similar to previous efforts, we also provide colors in the formats mentioned
102
+ above. For example:
104
103
 
105
104
  ```scss
106
105
  $ibm-color__blue-50;
107
106
  $ibm-color__warm-gray-100;
108
107
  ```
109
108
 
110
- If you would like a mixin to conditionally include these variables,
111
- you can include the mixin by using:
109
+ If you would like a mixin to conditionally include these variables, you can
110
+ include the mixin by using:
112
111
 
113
112
  ```scss
114
113
  @import '@carbon/colors/scss/mixins';
@@ -118,8 +117,8 @@ you can include the mixin by using:
118
117
 
119
118
  ### JavaScript
120
119
 
121
- For JavaScript, you can import and use this module by doing the
122
- following in your code:
120
+ For JavaScript, you can import and use this module by doing the following in
121
+ your code:
123
122
 
124
123
  ```js
125
124
  // ESM
@@ -129,9 +128,8 @@ import { black, blue, warmGray } from '@carbon/colors';
129
128
  const { black, blue, warmGray } = require('@carbon/colors');
130
129
  ```
131
130
 
132
- Each color swatch is exported as a variable, and each color name is
133
- also exported as an object that can be called by specifying grade, for
134
- example:
131
+ Each color swatch is exported as a variable, and each color name is also
132
+ exported as an object that can be called by specifying grade, for example:
135
133
 
136
134
  ```js
137
135
  black;
@@ -147,10 +145,9 @@ If you're looking for `@carbon/colors` API documentation, check out:
147
145
 
148
146
  ## 🙌 Contributing
149
147
 
150
- We're always looking for contributors to help us fix bugs, build new
151
- features, or help us improve the project documentation. If you're
152
- interested, definitely check out our [Contributing Guide](/.github/CONTRIBUTING.md)
153
- ! 👀
148
+ We're always looking for contributors to help us fix bugs, build new features,
149
+ or help us improve the project documentation. If you're interested, definitely
150
+ check out our [Contributing Guide](/.github/CONTRIBUTING.md) ! 👀
154
151
 
155
152
  ## 📝 License
156
153
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/colors",
3
3
  "description": "Colors for digital and software products using the Carbon Design System",
4
- "version": "10.1.1",
4
+ "version": "10.2.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -25,17 +25,18 @@
25
25
  "access": "public"
26
26
  },
27
27
  "scripts": {
28
- "build": "yarn clean && bundler bundle src/index.js --name CarbonColors && node tasks/build.js && bundler check 'scss/*.scss' && bundler sassdoc 'scss'",
28
+ "build": "yarn clean && bundler bundle src/index.js --name CarbonColors && node tasks/build.js && bundler check 'scss/*.scss' && bundler sassdoc 'scss/*.scss'",
29
29
  "clean": "rimraf css es lib umd scss"
30
30
  },
31
31
  "devDependencies": {
32
- "@carbon/bundler": "10.1.1",
33
- "@carbon/cli-reporter": "10.0.0",
34
- "@carbon/test-utils": "10.0.0",
32
+ "@carbon/bundler": "10.2.0",
33
+ "@carbon/cli-reporter": "10.2.0",
34
+ "@carbon/scss-generator": "10.2.0",
35
+ "@carbon/test-utils": "10.2.0",
35
36
  "change-case": "^3.0.2",
37
+ "core-js": "^3.0.1",
36
38
  "fs-extra": "^7.0.0",
37
39
  "node-sass": "^4.11.0",
38
- "prettier": "^1.14.3",
39
40
  "rimraf": "^2.6.2"
40
41
  },
41
42
  "eyeglass": {
@@ -44,5 +45,5 @@
44
45
  "sassDir": "scss",
45
46
  "needs": "^1.3.0"
46
47
  },
47
- "gitHead": "0931cfcf4a7636d6e3f5aff3ab8d7d7f2d4ecb99"
48
+ "gitHead": "e71825a0cf44f6f41fee7d2b0dd9c57d7bda126a"
48
49
  }
package/scss/colors.scss CHANGED
@@ -5,9 +5,7 @@
5
5
  // This source code is licensed under the Apache-2.0 license found in the
6
6
  // LICENSE file in the root directory of this source tree.
7
7
  //
8
-
9
8
  @import './mixins';
10
-
11
9
  // Deprecated ☠️
12
10
  @include ibm--colors();
13
11
  // Preferred
@@ -0,0 +1,12 @@
1
+ // Code generated by @carbon/colors. DO NOT EDIT.
2
+ //
3
+ // Copyright IBM Corp. 2018, 2018
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
+ @import './mixins';
9
+ // Deprecated ☠️
10
+ @include ibm--colors();
11
+ // Preferred
12
+ @include carbon--colors();
package/scss/mixins.scss CHANGED
@@ -5,12 +5,11 @@
5
5
  // This source code is licensed under the Apache-2.0 license found in the
6
6
  // LICENSE file in the root directory of this source tree.
7
7
  //
8
-
9
8
  /// Define color variables
10
9
  /// @access public
11
10
  /// @group @carbon/colors
12
11
  /// @deprecated Use `$carbon--colors` going forward
13
- @mixin ibm--colors {
12
+ @mixin ibm--colors() {
14
13
  $ibm-color__black-100: #000000 !default !global;
15
14
  $ibm-color__blue-10: #edf4ff !default !global;
16
15
  $ibm-color__blue-20: #c9deff !default !global;
@@ -115,10 +114,9 @@
115
114
  $ibm-color__warm-gray-100: #1a1717 !default !global;
116
115
  $ibm-color__white-0: #ffffff !default !global;
117
116
  $ibm-color__yellow-20: #fdd13a !default !global;
118
-
119
117
  $ibm-color-map: (
120
118
  'black': (
121
- 100: #000000
119
+ 100: #000000,
122
120
  ),
123
121
  'blue': (
124
122
  10: #edf4ff,
@@ -130,7 +128,19 @@
130
128
  70: #054ada,
131
129
  80: #0530ad,
132
130
  90: #061f80,
133
- 100: #051243
131
+ 100: #051243,
132
+ ),
133
+ 'cool-gray': (
134
+ 10: #f2f4f8,
135
+ 20: #d5d9e0,
136
+ 30: #b9bfc7,
137
+ 40: #9fa5ad,
138
+ 50: #868d95,
139
+ 60: #697077,
140
+ 70: #50565b,
141
+ 80: #373d42,
142
+ 90: #242a2e,
143
+ 100: #13171a,
134
144
  ),
135
145
  'coolGray': (
136
146
  10: #f2f4f8,
@@ -142,7 +152,7 @@
142
152
  70: #50565b,
143
153
  80: #373d42,
144
154
  90: #242a2e,
145
- 100: #13171a
155
+ 100: #13171a,
146
156
  ),
147
157
  'cyan': (
148
158
  10: #e3f6ff,
@@ -154,7 +164,7 @@
154
164
  70: #0058a1,
155
165
  80: #003d73,
156
166
  90: #002b50,
157
- 100: #07192b
167
+ 100: #07192b,
158
168
  ),
159
169
  'gray': (
160
170
  10: #f3f3f3,
@@ -166,7 +176,7 @@
166
176
  70: #565656,
167
177
  80: #3d3d3d,
168
178
  90: #282828,
169
- 100: #171717
179
+ 100: #171717,
170
180
  ),
171
181
  'green': (
172
182
  10: #dafbe4,
@@ -178,7 +188,7 @@
178
188
  70: #10642a,
179
189
  80: #054719,
180
190
  90: #01330f,
181
- 100: #081b09
191
+ 100: #081b09,
182
192
  ),
183
193
  'magenta': (
184
194
  10: #fff0f6,
@@ -190,10 +200,10 @@
190
200
  70: #a11950,
191
201
  80: #760a3a,
192
202
  90: #57002b,
193
- 100: #2a0a16
203
+ 100: #2a0a16,
194
204
  ),
195
205
  'orange': (
196
- 40: #fc7b1e
206
+ 40: #fc7b1e,
197
207
  ),
198
208
  'purple': (
199
209
  10: #f7f1ff,
@@ -205,7 +215,7 @@
205
215
  70: #6e32c9,
206
216
  80: #4f2196,
207
217
  90: #38146b,
208
- 100: #1e1033
218
+ 100: #1e1033,
209
219
  ),
210
220
  'red': (
211
221
  10: #fff0f1,
@@ -217,7 +227,7 @@
217
227
  70: #a51920,
218
228
  80: #750e13,
219
229
  90: #570408,
220
- 100: #2c080a
230
+ 100: #2c080a,
221
231
  ),
222
232
  'teal': (
223
233
  10: #dbfbfb,
@@ -229,7 +239,19 @@
229
239
  70: #006161,
230
240
  80: #004548,
231
241
  90: #003137,
232
- 100: #081a1c
242
+ 100: #081a1c,
243
+ ),
244
+ 'warm-gray': (
245
+ 10: #f7f3f1,
246
+ 20: #e0dbda,
247
+ 30: #c1bcbb,
248
+ 40: #a7a2a2,
249
+ 50: #8f8b8b,
250
+ 60: #726e6e,
251
+ 70: #595555,
252
+ 80: #403c3c,
253
+ 90: #2b2828,
254
+ 100: #1a1717,
233
255
  ),
234
256
  'warmGray': (
235
257
  10: #f7f3f1,
@@ -241,21 +263,20 @@
241
263
  70: #595555,
242
264
  80: #403c3c,
243
265
  90: #2b2828,
244
- 100: #1a1717
266
+ 100: #1a1717,
245
267
  ),
246
268
  'white': (
247
- 0: #ffffff
269
+ 0: #ffffff,
248
270
  ),
249
271
  'yellow': (
250
- 20: #fdd13a
251
- )
272
+ 20: #fdd13a,
273
+ ),
252
274
  ) !default !global;
253
275
  }
254
-
255
276
  /// Define color variables
256
277
  /// @access public
257
278
  /// @group @carbon/colors
258
- @mixin carbon--colors {
279
+ @mixin carbon--colors() {
259
280
  $carbon--black-100: #000000 !default !global;
260
281
  $carbon--blue-10: #edf4ff !default !global;
261
282
  $carbon--blue-20: #c9deff !default !global;
@@ -466,7 +487,7 @@
466
487
  $yellow-20: #fdd13a !default !global;
467
488
  $carbon--colors: (
468
489
  'black': (
469
- 100: #000000
490
+ 100: #000000,
470
491
  ),
471
492
  'blue': (
472
493
  10: #edf4ff,
@@ -478,7 +499,19 @@
478
499
  70: #054ada,
479
500
  80: #0530ad,
480
501
  90: #061f80,
481
- 100: #051243
502
+ 100: #051243,
503
+ ),
504
+ 'cool-gray': (
505
+ 10: #f2f4f8,
506
+ 20: #d5d9e0,
507
+ 30: #b9bfc7,
508
+ 40: #9fa5ad,
509
+ 50: #868d95,
510
+ 60: #697077,
511
+ 70: #50565b,
512
+ 80: #373d42,
513
+ 90: #242a2e,
514
+ 100: #13171a,
482
515
  ),
483
516
  'coolGray': (
484
517
  10: #f2f4f8,
@@ -490,7 +523,7 @@
490
523
  70: #50565b,
491
524
  80: #373d42,
492
525
  90: #242a2e,
493
- 100: #13171a
526
+ 100: #13171a,
494
527
  ),
495
528
  'cyan': (
496
529
  10: #e3f6ff,
@@ -502,7 +535,7 @@
502
535
  70: #0058a1,
503
536
  80: #003d73,
504
537
  90: #002b50,
505
- 100: #07192b
538
+ 100: #07192b,
506
539
  ),
507
540
  'gray': (
508
541
  10: #f3f3f3,
@@ -514,7 +547,7 @@
514
547
  70: #565656,
515
548
  80: #3d3d3d,
516
549
  90: #282828,
517
- 100: #171717
550
+ 100: #171717,
518
551
  ),
519
552
  'green': (
520
553
  10: #dafbe4,
@@ -526,7 +559,7 @@
526
559
  70: #10642a,
527
560
  80: #054719,
528
561
  90: #01330f,
529
- 100: #081b09
562
+ 100: #081b09,
530
563
  ),
531
564
  'magenta': (
532
565
  10: #fff0f6,
@@ -538,10 +571,10 @@
538
571
  70: #a11950,
539
572
  80: #760a3a,
540
573
  90: #57002b,
541
- 100: #2a0a16
574
+ 100: #2a0a16,
542
575
  ),
543
576
  'orange': (
544
- 40: #fc7b1e
577
+ 40: #fc7b1e,
545
578
  ),
546
579
  'purple': (
547
580
  10: #f7f1ff,
@@ -553,7 +586,7 @@
553
586
  70: #6e32c9,
554
587
  80: #4f2196,
555
588
  90: #38146b,
556
- 100: #1e1033
589
+ 100: #1e1033,
557
590
  ),
558
591
  'red': (
559
592
  10: #fff0f1,
@@ -565,7 +598,7 @@
565
598
  70: #a51920,
566
599
  80: #750e13,
567
600
  90: #570408,
568
- 100: #2c080a
601
+ 100: #2c080a,
569
602
  ),
570
603
  'teal': (
571
604
  10: #dbfbfb,
@@ -577,7 +610,19 @@
577
610
  70: #006161,
578
611
  80: #004548,
579
612
  90: #003137,
580
- 100: #081a1c
613
+ 100: #081a1c,
614
+ ),
615
+ 'warm-gray': (
616
+ 10: #f7f3f1,
617
+ 20: #e0dbda,
618
+ 30: #c1bcbb,
619
+ 40: #a7a2a2,
620
+ 50: #8f8b8b,
621
+ 60: #726e6e,
622
+ 70: #595555,
623
+ 80: #403c3c,
624
+ 90: #2b2828,
625
+ 100: #1a1717,
581
626
  ),
582
627
  'warmGray': (
583
628
  10: #f7f3f1,
@@ -589,13 +634,13 @@
589
634
  70: #595555,
590
635
  80: #403c3c,
591
636
  90: #2b2828,
592
- 100: #1a1717
637
+ 100: #1a1717,
593
638
  ),
594
639
  'white': (
595
- 0: #ffffff
640
+ 0: #ffffff,
596
641
  ),
597
642
  'yellow': (
598
- 20: #fdd13a
599
- )
643
+ 20: #fdd13a,
644
+ ),
600
645
  ) !default !global;
601
646
  }