@carbon/themes 10.54.0 → 11.0.0-rc.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 (45) hide show
  1. package/es/index.js +1725 -1163
  2. package/index.scss +3 -3
  3. package/lib/index.js +1716 -1333
  4. package/package.json +8 -8
  5. package/scss/{modules/_config.scss → _config.scss} +0 -0
  6. package/scss/{modules/_theme.scss → _theme.scss} +0 -0
  7. package/scss/{modules/_themes.scss → _themes.scss} +0 -0
  8. package/scss/_tokens.scss +1 -1
  9. package/scss/{modules/_utilities.scss → _utilities.scss} +0 -0
  10. package/scss/compat/generated/_tokens.scss +2 -2
  11. package/scss/generated/_themes.scss +401 -2924
  12. package/scss/generated/_tokens.scss +300 -3171
  13. package/src/g10.js +145 -225
  14. package/src/g100.js +148 -220
  15. package/src/g90.js +147 -221
  16. package/src/index.js +7 -12
  17. package/src/{next/tokens → tokens}/Token.js +0 -0
  18. package/src/{next/tokens → tokens}/TokenFormat.js +0 -0
  19. package/src/{next/tokens → tokens}/TokenGroup.js +0 -0
  20. package/src/{next/tokens → tokens}/TokenSet.js +0 -0
  21. package/src/{next/tokens → tokens}/index.js +0 -0
  22. package/src/{next/tokens → tokens}/v11TokenGroup.js +0 -0
  23. package/src/{next/tokens → tokens}/v11TokenSet.js +0 -0
  24. package/src/{v9.js → v10/g10.js} +98 -70
  25. package/src/v10/g100.js +339 -0
  26. package/src/v10/g90.js +341 -0
  27. package/src/{next → v10}/index.js +4 -3
  28. package/{metadata.yml → src/v10/metadata.yml} +0 -0
  29. package/src/{tokens.js → v10/tokens.js} +0 -0
  30. package/src/v10/white.js +343 -0
  31. package/src/white.js +145 -225
  32. package/umd/index.js +1719 -1336
  33. package/scss/_mixins.scss +0 -39
  34. package/scss/_theme-maps.scss +0 -9
  35. package/scss/generated/_mixins.scss +0 -3622
  36. package/scss/index.scss +0 -8
  37. package/scss/modules/_tokens.scss +0 -8
  38. package/scss/modules/generated/_themes.scss +0 -432
  39. package/scss/modules/generated/_tokens.scss +0 -308
  40. package/scss/themes.scss +0 -10
  41. package/src/g80.js +0 -351
  42. package/src/next/g10.js +0 -268
  43. package/src/next/g100.js +0 -275
  44. package/src/next/g90.js +0 -275
  45. package/src/next/white.js +0 -271
@@ -5,102 +5,139 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { adjustLightness } from './tools';
9
- import { white, red60, gray40, black, rgba } from '@carbon/colors';
10
-
11
- export const interactive01 = '#3d70b2';
12
- export const interactive02 = '#4d5358';
13
- export const interactive03 = '#3d70b2';
14
- export const interactive04 = '#3d70b2';
15
- export const uiBackground = '#f4f7fb';
8
+ import { adjustLightness } from '../tools';
9
+
10
+ import {
11
+ // Blue
12
+ blue20,
13
+ blue40,
14
+ blue60,
15
+ blue70,
16
+ blue80,
17
+
18
+ // Gray
19
+ gray10,
20
+ gray20,
21
+ gray30,
22
+ gray40,
23
+ gray50,
24
+ gray60,
25
+ gray70,
26
+ gray80,
27
+ gray100,
28
+
29
+ // Support
30
+ blue50,
31
+ green40,
32
+ green60,
33
+ yellow30,
34
+ red50,
35
+ red60,
36
+ red80,
37
+ purple60,
38
+
39
+ // Constants
40
+ white,
41
+ black,
42
+
43
+ // Tools
44
+ rgba,
45
+ } from '@carbon/colors';
46
+
47
+ export const interactive01 = blue60;
48
+ export const interactive02 = gray80;
49
+ export const interactive03 = blue60;
50
+ export const interactive04 = blue60;
51
+
52
+ export const uiBackground = gray10;
16
53
 
17
54
  export const ui01 = white;
18
- export const ui02 = '#f4f7fb';
19
- export const ui03 = '#dfe3e6';
20
- export const ui04 = '#8897a2';
21
- export const ui05 = '#5a6872';
22
-
23
- export const text01 = '#152935';
24
- export const text02 = '#5a6872';
25
- export const text03 = '#cdd1d4';
55
+ export const ui02 = gray10;
56
+ export const ui03 = gray20;
57
+ export const ui04 = gray50;
58
+ export const ui05 = gray100;
59
+
60
+ export const text01 = gray100;
61
+ export const text02 = gray70;
62
+ export const text03 = gray40;
26
63
  export const text04 = white;
27
- export const text05 = '#5a6872';
28
- export const textError = '#e0182d';
64
+ export const text05 = gray60;
65
+ export const textError = red60;
29
66
 
30
- export const icon01 = '#3d70b2';
31
- export const icon02 = '#5a6872';
67
+ export const icon01 = gray100;
68
+ export const icon02 = gray70;
32
69
  export const icon03 = white;
33
70
 
34
- export const link01 = '#3d70b2';
35
- export const link02 = '#3d70b2';
71
+ export const link01 = blue60;
72
+ export const link02 = blue70;
36
73
 
37
- export const inverseLink = '#5596e6';
74
+ export const inverseLink = blue40;
38
75
 
39
76
  export const field01 = white;
40
- export const field02 = '#f4f7fb';
77
+ export const field02 = gray10;
41
78
 
42
79
  export const inverse01 = white;
43
- export const inverse02 = '#272d33';
80
+ export const inverse02 = gray80;
44
81
 
45
- export const support01 = '#e0182d';
46
- export const support02 = '#5aa700';
47
- export const support03 = '#efc100';
48
- export const support04 = '#5aaafa';
82
+ export const support01 = red60;
83
+ export const support02 = green60;
84
+ export const support03 = yellow30;
85
+ export const support04 = blue70;
49
86
 
50
- export const inverseSupport01 = '#ff5050';
51
- export const inverseSupport02 = '#8cd211';
52
- export const inverseSupport03 = '#FDD600';
53
- export const inverseSupport04 = '#5aaafa';
87
+ export const inverseSupport01 = red50;
88
+ export const inverseSupport02 = green40;
89
+ export const inverseSupport03 = yellow30;
90
+ export const inverseSupport04 = blue50;
54
91
 
55
- export const overlay01 = 'rgba(223, 227, 230, 0.5)';
92
+ export const overlay01 = rgba(gray100, 0.5);
56
93
 
57
94
  export const danger01 = red60;
58
95
  export const danger02 = red60;
59
96
 
60
97
  // Interaction states
61
- export const focus = '#3d70b2';
62
- export const inverseFocusUi = '#3d70b2';
98
+ export const focus = blue60;
99
+ export const inverseFocusUi = white;
63
100
 
64
- export const hoverPrimary = '#30588c';
65
- export const activePrimary = '#30588c';
101
+ export const hoverPrimary = '#0353e9';
102
+ export const activePrimary = blue80;
66
103
 
67
- export const hoverPrimaryText = '#294c86';
104
+ export const hoverPrimaryText = blue70;
68
105
 
69
- export const hoverSecondary = '#4d5b65';
70
- export const activeSecondary = '#414f59';
106
+ export const hoverSecondary = '#4c4c4c';
107
+ export const activeSecondary = gray60;
71
108
 
72
- export const hoverTertiary = '#5a6872';
73
- export const activeTertiary = '#414f59';
109
+ export const hoverTertiary = '#0353e9';
110
+ export const activeTertiary = blue80;
74
111
 
75
- export const hoverUI = '#EEF4FC';
76
- export const hoverLightUI = '#EEF4FC';
77
- export const activeUI = '#DFEAFA';
78
- export const activeLightUI = '#DFEAFA';
79
- export const selectedUI = '#EEF4FC';
80
- export const selectedLightUI = '#EEF4FC';
112
+ export const hoverUI = '#e5e5e5';
113
+ export const hoverLightUI = '#e5e5e5';
114
+ export const activeUI = gray30;
115
+ export const activeLightUI = gray30;
116
+ export const selectedUI = gray20;
117
+ export const selectedLightUI = gray20;
81
118
  export const inverseHoverUI = '#4c4c4c';
82
119
 
83
- export const hoverSelectedUI = '#DFEAFA';
120
+ export const hoverSelectedUI = '#cacaca';
84
121
 
85
- export const hoverDanger = '#c70014';
86
- export const activeDanger = '#AD1625';
122
+ export const hoverDanger = adjustLightness(danger01, -8);
123
+ export const activeDanger = red80;
87
124
 
88
- export const hoverRow = '#eef4fc';
125
+ export const hoverRow = '#e5e5e5';
89
126
 
90
- export const visitedLink = '#294c86';
127
+ export const visitedLink = purple60;
91
128
 
92
- export const disabled01 = '#fafbfd';
93
- export const disabled02 = '#dfe3e6';
94
- export const disabled03 = '#cdd1d4';
129
+ export const disabled01 = white;
130
+ export const disabled02 = gray30;
131
+ export const disabled03 = gray50;
95
132
 
96
- export const highlight = '#f4f7fb';
133
+ export const highlight = blue20;
97
134
 
98
- export const decorative01 = '#EEF4FC';
135
+ export const decorative01 = gray20;
99
136
 
100
137
  export const buttonSeparator = '#e0e0e0';
101
138
 
102
- export const skeleton01 = 'rgba(61, 112, 178, .1)';
103
- export const skeleton02 = 'rgba(61, 112, 178, .1)';
139
+ export const skeleton01 = '#e5e5e5';
140
+ export const skeleton02 = gray30;
104
141
 
105
142
  // New color tokens
106
143
  // TO-DO: remove fallback color when v11 is released and assign carbon colors to new tokens
@@ -277,15 +314,6 @@ export {
277
314
  fluidSpacing02,
278
315
  fluidSpacing03,
279
316
  fluidSpacing04,
280
- // Layout
281
- // Deprecated -- Remove in v11
282
- layout01,
283
- layout02,
284
- layout03,
285
- layout04,
286
- layout05,
287
- layout06,
288
- layout07,
289
317
  // Containers
290
318
  container01,
291
319
  container02,
@@ -0,0 +1,339 @@
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 { adjustLightness } from '../tools';
9
+
10
+ import {
11
+ // Blue
12
+ blue30,
13
+ blue40,
14
+ blue50,
15
+ blue60,
16
+ blue80,
17
+
18
+ // Gray
19
+ gray10,
20
+ gray30,
21
+ gray50,
22
+ gray60,
23
+ gray70,
24
+ gray80,
25
+ gray90,
26
+ gray100,
27
+
28
+ // Support
29
+ green40,
30
+ green50,
31
+ yellow30,
32
+ red40,
33
+ red50,
34
+ red60,
35
+ red80,
36
+ purple40,
37
+
38
+ // Constants
39
+ white,
40
+ black,
41
+
42
+ // Tools
43
+ rgba,
44
+ } from '@carbon/colors';
45
+
46
+ export const interactive01 = blue60;
47
+ export const interactive02 = gray60;
48
+ export const interactive03 = white;
49
+ export const interactive04 = blue50;
50
+
51
+ export const uiBackground = gray100;
52
+
53
+ export const ui01 = gray90;
54
+ export const ui02 = gray80;
55
+ export const ui03 = gray80;
56
+ export const ui04 = gray60;
57
+ export const ui05 = gray10;
58
+
59
+ export const text01 = gray10;
60
+ export const text02 = gray30;
61
+ export const text03 = gray60;
62
+ export const text04 = white;
63
+ export const text05 = gray50;
64
+ export const textError = red40;
65
+
66
+ export const icon01 = gray10;
67
+ export const icon02 = gray30;
68
+ export const icon03 = white;
69
+
70
+ export const link01 = blue40;
71
+ export const link02 = blue30;
72
+
73
+ export const inverseLink = blue60;
74
+
75
+ export const field01 = gray90;
76
+ export const field02 = gray80;
77
+
78
+ export const inverse01 = gray100;
79
+ export const inverse02 = gray10;
80
+
81
+ export const support01 = red50;
82
+ export const support02 = green40;
83
+ export const support03 = yellow30;
84
+ export const support04 = blue50;
85
+
86
+ export const inverseSupport01 = red60;
87
+ export const inverseSupport02 = green50;
88
+ export const inverseSupport03 = yellow30;
89
+ export const inverseSupport04 = blue60;
90
+
91
+ export const overlay01 = rgba(black, 0.65);
92
+
93
+ export const danger01 = red60;
94
+ export const danger02 = red50;
95
+
96
+ // Interaction states
97
+ export const focus = white;
98
+ export const inverseFocusUi = blue60;
99
+
100
+ export const hoverPrimary = '#0353e9';
101
+ export const activePrimary = blue80;
102
+
103
+ export const hoverPrimaryText = blue30;
104
+
105
+ export const hoverSecondary = '#606060';
106
+ export const activeSecondary = gray80;
107
+
108
+ export const hoverTertiary = gray10;
109
+ export const activeTertiary = gray30;
110
+
111
+ export const hoverUI = '#353535';
112
+ export const hoverLightUI = '#4c4c4c';
113
+ export const activeUI = gray70;
114
+ export const activeLightUI = gray60;
115
+ export const selectedUI = gray80;
116
+ export const selectedLightUI = gray70;
117
+ export const inverseHoverUI = '#e5e5e5';
118
+
119
+ export const hoverSelectedUI = '#4c4c4c';
120
+
121
+ export const hoverDanger = adjustLightness(danger01, -8);
122
+ export const activeDanger = red80;
123
+
124
+ export const hoverRow = '#353535';
125
+
126
+ export const visitedLink = purple40;
127
+
128
+ export const disabled01 = gray90;
129
+ export const disabled02 = gray70;
130
+ export const disabled03 = gray50;
131
+
132
+ export const highlight = blue80;
133
+
134
+ export const decorative01 = gray70;
135
+
136
+ export const buttonSeparator = '#161616';
137
+
138
+ export const skeleton01 = '#353535';
139
+ export const skeleton02 = gray70;
140
+
141
+ // New color tokens
142
+ // TO-DO: remove fallback color when v11 is released and assign carbon colors to new tokens
143
+ export const background = uiBackground;
144
+ export const layer = ui01;
145
+ export const layerAccent = ui03;
146
+ export const layerAccentActive = gray60;
147
+ export const layerAccentHover = adjustLightness(layerAccent, +6);
148
+ export const field = field01;
149
+ export const backgroundInverse = inverse02;
150
+ export const backgroundBrand = interactive01;
151
+ export const interactive = interactive04;
152
+
153
+ export const borderSubtle = ui03;
154
+ export const borderStrong = ui04;
155
+ export const borderInverse = ui05;
156
+ export const borderInteractive = interactive04;
157
+
158
+ export const textPrimary = text01;
159
+ export const textSecondary = text02;
160
+ export const textPlaceholder = text03;
161
+ export const textHelper = text05;
162
+ export const textOnColor = text04;
163
+ export const textInverse = inverse01;
164
+
165
+ export const linkPrimary = link01;
166
+ export const linkSecondary = link02;
167
+ export const linkVisited = visitedLink;
168
+ export const linkInverse = inverseLink;
169
+
170
+ export const iconPrimary = icon01;
171
+ export const iconSecondary = icon02;
172
+ export const iconOnColor = icon03;
173
+ export const iconInverse = inverse01;
174
+
175
+ export const supportError = support01;
176
+ export const supportSuccess = support02;
177
+ export const supportWarning = support03;
178
+ export const supportInfo = support04;
179
+ export const supportErrorInverse = inverseSupport01;
180
+ export const supportSuccessInverse = inverseSupport02;
181
+ export const supportWarningInverse = inverseSupport03;
182
+ export const supportInfoInverse = inverseSupport04;
183
+
184
+ export const overlay = overlay01;
185
+ export const toggleOff = ui04;
186
+ export const shadow = rgba(black, 0.8);
187
+
188
+ export const buttonPrimary = interactive01;
189
+ export const buttonSecondary = interactive02;
190
+ export const buttonTertiary = interactive03;
191
+ export const buttonDangerPrimary = danger01;
192
+ export const buttonDangerSecondary = danger02;
193
+
194
+ export const backgroundActive = activeUI;
195
+ export const layerActive = activeUI;
196
+
197
+ export const buttonDangerActive = activeDanger;
198
+ export const buttonPrimaryActive = activePrimary;
199
+ export const buttonSecondaryActive = activeSecondary;
200
+ export const buttonTertiaryActive = activeTertiary;
201
+
202
+ export const focusInset = inverse01;
203
+ export const focusInverse = inverseFocusUi;
204
+
205
+ export const backgroundHover = hoverUI;
206
+ export const layerHover = hoverUI;
207
+ export const fieldHover = hoverUI;
208
+ export const backgroundInverseHover = inverseHoverUI;
209
+ export const linkPrimaryHover = hoverPrimaryText;
210
+ export const buttonDangerHover = hoverDanger;
211
+ export const buttonPrimaryHover = hoverPrimary;
212
+ export const buttonSecondaryHover = hoverSecondary;
213
+ export const buttonTertiaryHover = hoverTertiary;
214
+
215
+ export const backgroundSelected = selectedUI;
216
+ export const backgroundSelectedHover = hoverSelectedUI;
217
+ export const layerSelected = selectedUI;
218
+ export const layerSelectedHover = hoverSelectedUI;
219
+ export const layerSelectedInverse = ui05;
220
+ export const borderSubtleSelected = activeUI;
221
+
222
+ export const borderDisabled = disabled01;
223
+
224
+ export const textDisabled = disabled02;
225
+ export const buttonDisabled = disabled02;
226
+ export const iconDisabled = disabled02;
227
+
228
+ export const textOnColorDisabled = disabled03;
229
+ export const iconOnColorDisabled = disabled03;
230
+ export const layerSelectedDisabled = disabled03;
231
+
232
+ export const skeletonBackground = skeleton01;
233
+ export const skeletonElement = skeleton02;
234
+
235
+ export {
236
+ // Type
237
+ caption01,
238
+ caption02,
239
+ label01,
240
+ label02,
241
+ helperText01,
242
+ helperText02,
243
+ bodyShort01,
244
+ bodyLong01,
245
+ bodyShort02,
246
+ bodyLong02,
247
+ code01,
248
+ code02,
249
+ heading01,
250
+ productiveHeading01,
251
+ heading02,
252
+ productiveHeading02,
253
+ productiveHeading03,
254
+ productiveHeading04,
255
+ productiveHeading05,
256
+ productiveHeading06,
257
+ productiveHeading07,
258
+ expressiveHeading01,
259
+ expressiveHeading02,
260
+ expressiveHeading03,
261
+ expressiveHeading04,
262
+ expressiveHeading05,
263
+ expressiveHeading06,
264
+ expressiveParagraph01,
265
+ quotation01,
266
+ quotation02,
267
+ display01,
268
+ display02,
269
+ display03,
270
+ display04,
271
+ // V11 Tokens
272
+ legal01,
273
+ legal02,
274
+ bodyCompact01,
275
+ bodyCompact02,
276
+ body01,
277
+ body02,
278
+ headingCompact01,
279
+ headingCompact02,
280
+ heading03,
281
+ heading04,
282
+ heading05,
283
+ heading06,
284
+ heading07,
285
+ fluidHeading03,
286
+ fluidHeading04,
287
+ fluidHeading05,
288
+ fluidHeading06,
289
+ fluidParagraph01,
290
+ fluidQuotation01,
291
+ fluidQuotation02,
292
+ fluidDisplay01,
293
+ fluidDisplay02,
294
+ fluidDisplay03,
295
+ fluidDisplay04,
296
+ // Layout
297
+ // Spacing
298
+ spacing01,
299
+ spacing02,
300
+ spacing03,
301
+ spacing04,
302
+ spacing05,
303
+ spacing06,
304
+ spacing07,
305
+ spacing08,
306
+ spacing09,
307
+ spacing10,
308
+ spacing11,
309
+ spacing12,
310
+ spacing13,
311
+ // Fluid spacing
312
+ fluidSpacing01,
313
+ fluidSpacing02,
314
+ fluidSpacing03,
315
+ fluidSpacing04,
316
+ // Containers
317
+ container01,
318
+ container02,
319
+ container03,
320
+ container04,
321
+ container05,
322
+ sizeXSmall,
323
+ sizeSmall,
324
+ sizeMedium,
325
+ sizeLarge,
326
+ sizeXLarge,
327
+ size2XLarge,
328
+ // Icon sizes
329
+ iconSize01,
330
+ iconSize02,
331
+ } from './white';
332
+
333
+ // Deprecated ☠️
334
+ export const brand01 = interactive01;
335
+ export const brand02 = interactive02;
336
+ export const brand03 = interactive03;
337
+ export const active01 = activeUI;
338
+ export const hoverField = hoverUI;
339
+ export const danger = danger01;