@carbon/themes 10.48.0-rc.0 → 10.48.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/themes",
3
3
  "description": "Themes for applying color in the Carbon Design System",
4
- "version": "10.48.0-rc.0",
4
+ "version": "10.48.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -31,7 +31,7 @@
31
31
  "dependencies": {
32
32
  "@carbon/colors": "^10.34.0",
33
33
  "@carbon/layout": "^10.34.0",
34
- "@carbon/type": "^10.39.0-rc.0",
34
+ "@carbon/type": "^10.39.0",
35
35
  "color": "^3.1.2"
36
36
  },
37
37
  "devDependencies": {
@@ -49,5 +49,5 @@
49
49
  "rimraf": "^3.0.0"
50
50
  },
51
51
  "sideEffects": false,
52
- "gitHead": "f6e5dd2362aa2970add45c7fb7fc32841c252671"
52
+ "gitHead": "3e014d3be20089ade76dddea87c94ab2171e6fd7"
53
53
  }
@@ -66,16 +66,16 @@ $white: (
66
66
  border-strong-03: #8d8d8d,
67
67
  border-inverse: #161616,
68
68
  border-interactive: #0f62fe,
69
- border-disabled: #f4f4f4,
69
+ border-disabled: #c6c6c6,
70
70
  text-primary: #161616,
71
71
  text-secondary: #525252,
72
- text-placeholder: #a8a8a8,
72
+ text-placeholder: rgba(22, 22, 22, 0.4),
73
73
  text-helper: #6f6f6f,
74
74
  text-error: #da1e28,
75
75
  text-inverse: #ffffff,
76
76
  text-on-color: #ffffff,
77
77
  text-on-color-disabled: #8d8d8d,
78
- text-disabled: #c6c6c6,
78
+ text-disabled: rgba(22, 22, 22, 0.25),
79
79
  link-primary: #0f62fe,
80
80
  link-primary-hover: #0043ce,
81
81
  link-secondary: #0043ce,
@@ -171,16 +171,16 @@ $g10: (
171
171
  border-strong-03: #8d8d8d,
172
172
  border-inverse: #161616,
173
173
  border-interactive: #0f62fe,
174
- border-disabled: #ffffff,
174
+ border-disabled: #c6c6c6,
175
175
  text-primary: #161616,
176
176
  text-secondary: #525252,
177
- text-placeholder: #a8a8a8,
177
+ text-placeholder: rgba(22, 22, 22, 0.4),
178
178
  text-helper: #6f6f6f,
179
179
  text-error: #da1e28,
180
180
  text-inverse: #ffffff,
181
181
  text-on-color: #ffffff,
182
182
  text-on-color-disabled: #8d8d8d,
183
- text-disabled: #c6c6c6,
183
+ text-disabled: rgba(22, 22, 22, 0.25),
184
184
  link-primary: #0f62fe,
185
185
  link-primary-hover: #0043ce,
186
186
  link-secondary: #0043ce,
@@ -276,16 +276,16 @@ $g90: (
276
276
  border-strong-03: #c6c6c6,
277
277
  border-inverse: #f4f4f4,
278
278
  border-interactive: #4589ff,
279
- border-disabled: #393939,
279
+ border-disabled: rgba(141, 141, 141, 0.5),
280
280
  text-primary: #f4f4f4,
281
281
  text-secondary: #c6c6c6,
282
- text-placeholder: #8d8d8d,
282
+ text-placeholder: rgba(244, 244, 244, 0.4),
283
283
  text-helper: #c6c6c6,
284
284
  text-error: #ffb3b8,
285
285
  text-inverse: #161616,
286
286
  text-on-color: #ffffff,
287
- text-on-color-disabled: #a8a8a8,
288
- text-disabled: #6f6f6f,
287
+ text-on-color-disabled: rgba(255, 255, 255, 0.25),
288
+ text-disabled: rgba(244, 244, 244, 0.25),
289
289
  link-primary: #78a9ff,
290
290
  link-primary-hover: #a6c8ff,
291
291
  link-secondary: #a6c8ff,
@@ -295,7 +295,7 @@ $g90: (
295
295
  icon-secondary: #c6c6c6,
296
296
  icon-inverse: #161616,
297
297
  icon-on-color: #ffffff,
298
- icon-on-color-disabled: #a8a8a8,
298
+ icon-on-color-disabled: rgba(255, 255, 255, 0.25),
299
299
  icon-disabled: #6f6f6f,
300
300
  support-error: #ff8389,
301
301
  support-success: #42be65,
@@ -381,16 +381,16 @@ $g100: (
381
381
  border-strong-03: #a8a8a8,
382
382
  border-inverse: #f4f4f4,
383
383
  border-interactive: #4589ff,
384
- border-disabled: #262626,
384
+ border-disabled: rgba(141, 141, 141, 0.5),
385
385
  text-primary: #f4f4f4,
386
386
  text-secondary: #c6c6c6,
387
- text-placeholder: #6f6f6f,
387
+ text-placeholder: rgba(244, 244, 244, 0.4),
388
388
  text-helper: #a8a8a8,
389
389
  text-error: #ffb3b8,
390
390
  text-inverse: #161616,
391
391
  text-on-color: #ffffff,
392
- text-on-color-disabled: #a8a8a8,
393
- text-disabled: #525252,
392
+ text-on-color-disabled: rgba(255, 255, 255, 0.25),
393
+ text-disabled: rgba(244, 244, 244, 0.25),
394
394
  link-primary: #78a9ff,
395
395
  link-primary-hover: #a6c8ff,
396
396
  link-secondary: #a6c8ff,
@@ -400,7 +400,7 @@ $g100: (
400
400
  icon-secondary: #c6c6c6,
401
401
  icon-inverse: #161616,
402
402
  icon-on-color: #ffffff,
403
- icon-on-color-disabled: #a8a8a8,
403
+ icon-on-color-disabled: rgba(255, 255, 255, 0.25),
404
404
  icon-disabled: #525252,
405
405
  support-error: #fa4d56,
406
406
  support-success: #42be65,
package/src/next/g10.js CHANGED
@@ -39,7 +39,7 @@ import {
39
39
  white,
40
40
  whiteHover,
41
41
  } from '@carbon/colors';
42
- import { adjustLightness } from '../tools';
42
+ import { adjustLightness, adjustAlpha } from '../tools';
43
43
 
44
44
  // Background
45
45
  export const background = gray10;
@@ -137,18 +137,18 @@ export const borderInverse = gray100;
137
137
  export const borderInteractive = blue60;
138
138
 
139
139
  // border
140
- export const borderDisabled = white;
140
+ export const borderDisabled = gray30;
141
141
 
142
142
  // Text
143
143
  export const textPrimary = gray100;
144
144
  export const textSecondary = gray70;
145
- export const textPlaceholder = gray40;
145
+ export const textPlaceholder = adjustAlpha(textPrimary, 0.4);
146
146
  export const textHelper = gray60;
147
147
  export const textError = red60;
148
148
  export const textInverse = white;
149
149
  export const textOnColor = white;
150
150
  export const textOnColorDisabled = gray50;
151
- export const textDisabled = gray30;
151
+ export const textDisabled = adjustAlpha(textPrimary, 0.25);
152
152
 
153
153
  // Link
154
154
  export const linkPrimary = blue60;
package/src/next/g100.js CHANGED
@@ -46,7 +46,7 @@ import {
46
46
  // Tools
47
47
  rgba,
48
48
  } from '@carbon/colors';
49
- import { adjustLightness } from '../tools';
49
+ import { adjustLightness, adjustAlpha } from '../tools';
50
50
 
51
51
  // Background
52
52
  export const background = gray100;
@@ -144,18 +144,18 @@ export const borderInverse = gray10;
144
144
  export const borderInteractive = blue50;
145
145
 
146
146
  // border
147
- export const borderDisabled = gray90;
147
+ export const borderDisabled = adjustAlpha(gray50, 0.5);
148
148
 
149
149
  // Text
150
150
  export const textPrimary = gray10;
151
151
  export const textSecondary = gray30;
152
- export const textPlaceholder = gray60;
152
+ export const textPlaceholder = adjustAlpha(textPrimary, 0.4);
153
153
  export const textHelper = gray40;
154
154
  export const textError = red30;
155
155
  export const textInverse = gray100;
156
156
  export const textOnColor = white;
157
- export const textOnColorDisabled = gray40;
158
- export const textDisabled = gray70;
157
+ export const textOnColorDisabled = adjustAlpha(textOnColor, 0.25);
158
+ export const textDisabled = adjustAlpha(textPrimary, 0.25);
159
159
 
160
160
  // Link
161
161
  export const linkPrimary = blue40;
@@ -169,7 +169,7 @@ export const iconPrimary = gray10;
169
169
  export const iconSecondary = gray30;
170
170
  export const iconInverse = gray100;
171
171
  export const iconOnColor = white;
172
- export const iconOnColorDisabled = gray40;
172
+ export const iconOnColorDisabled = adjustAlpha(iconOnColor, 0.25);
173
173
  export const iconDisabled = gray70;
174
174
 
175
175
  // Support
package/src/next/g90.js CHANGED
@@ -45,7 +45,7 @@ import {
45
45
  // Tools
46
46
  rgba,
47
47
  } from '@carbon/colors';
48
- import { adjustLightness } from '../tools';
48
+ import { adjustLightness, adjustAlpha } from '../tools';
49
49
 
50
50
  // Background
51
51
  export const background = gray90;
@@ -143,18 +143,18 @@ export const borderInverse = gray10;
143
143
  export const borderInteractive = blue50;
144
144
 
145
145
  // border
146
- export const borderDisabled = gray80;
146
+ export const borderDisabled = adjustAlpha(gray50, 0.5);
147
147
 
148
148
  // Text
149
149
  export const textPrimary = gray10;
150
150
  export const textSecondary = gray30;
151
- export const textPlaceholder = gray50;
151
+ export const textPlaceholder = adjustAlpha(textPrimary, 0.4);
152
152
  export const textHelper = gray30;
153
153
  export const textError = red30;
154
154
  export const textInverse = gray100;
155
155
  export const textOnColor = white;
156
- export const textOnColorDisabled = gray40;
157
- export const textDisabled = gray60;
156
+ export const textOnColorDisabled = adjustAlpha(textOnColor, 0.25);
157
+ export const textDisabled = adjustAlpha(textPrimary, 0.25);
158
158
 
159
159
  // Link
160
160
  export const linkPrimary = blue40;
@@ -168,7 +168,7 @@ export const iconPrimary = gray10;
168
168
  export const iconSecondary = gray30;
169
169
  export const iconInverse = gray100;
170
170
  export const iconOnColor = white;
171
- export const iconOnColorDisabled = gray40;
171
+ export const iconOnColorDisabled = adjustAlpha(iconOnColor, 0.25);
172
172
  export const iconDisabled = gray60;
173
173
 
174
174
  // Support
package/src/next/white.js CHANGED
@@ -38,7 +38,7 @@ import {
38
38
  white,
39
39
  whiteHover,
40
40
  } from '@carbon/colors';
41
- import { adjustLightness } from '../tools';
41
+ import { adjustLightness, adjustAlpha } from '../tools';
42
42
 
43
43
  // Background
44
44
  export const background = white;
@@ -136,18 +136,18 @@ export const borderInverse = gray100;
136
136
  export const borderInteractive = blue60;
137
137
 
138
138
  // border
139
- export const borderDisabled = gray10;
139
+ export const borderDisabled = gray30;
140
140
 
141
141
  // Text
142
142
  export const textPrimary = gray100;
143
143
  export const textSecondary = gray70;
144
- export const textPlaceholder = gray40;
144
+ export const textPlaceholder = adjustAlpha(textPrimary, 0.4);
145
145
  export const textHelper = gray60;
146
146
  export const textError = red60;
147
147
  export const textInverse = white;
148
148
  export const textOnColor = white;
149
149
  export const textOnColorDisabled = gray50;
150
- export const textDisabled = gray30;
150
+ export const textDisabled = adjustAlpha(textPrimary, 0.25);
151
151
 
152
152
  // Link
153
153
  export const linkPrimary = blue60;
package/src/tools.js CHANGED
@@ -23,3 +23,15 @@ export function adjustLightness(token, shift) {
23
23
  .hex()
24
24
  .toLowerCase();
25
25
  }
26
+
27
+ /**
28
+ * Adjust a given token's alpha by a specified amount
29
+ * Example: token = rgba(10, 10, 10, 1.0);
30
+ * adjustAlpha(token, 0.3) === rgba(10, 10, 10, 0.3);
31
+ * @param {string} token
32
+ * @param {float} alpha
33
+ * @returns {string}
34
+ */
35
+ export function adjustAlpha(token, alpha) {
36
+ return Color(token).rgb().alpha(alpha).string();
37
+ }