@carbon/themes 12.0.0-alpha.1 → 12.0.0-alpha.2

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 (75) hide show
  1. package/es/index.js +5572 -0
  2. package/lib/__tests__/themes-test.d.ts +1 -0
  3. package/lib/__tests__/tools-test.d.ts +1 -0
  4. package/lib/tokens/__tests__/Token-test.d.ts +1 -0
  5. package/lib/tokens/__tests__/TokenFormat-test.d.ts +1 -0
  6. package/lib/tokens/__tests__/TokenGroup-test.d.ts +1 -0
  7. package/lib/tokens/__tests__/TokenSet-test.d.ts +1 -0
  8. package/lib/tokens/__tests__/metadata-test.d.ts +1 -0
  9. package/lib/tokens/__tests__/v11-test.d.ts +1 -0
  10. package/lib/v10/__tests__/themes-test.d.ts +1 -0
  11. package/lib/v10/__tests__/tokens-test.d.ts +1 -0
  12. package/package.json +12 -4
  13. package/umd/index.js +6322 -0
  14. package/docs/sass.md +0 -189
  15. package/js/generated/component-tokens/button.d.ts +0 -98
  16. package/js/generated/component-tokens/button.js +0 -98
  17. package/js/generated/component-tokens/content-switcher.d.ts +0 -25
  18. package/js/generated/component-tokens/content-switcher.js +0 -25
  19. package/js/generated/component-tokens/notification.d.ts +0 -65
  20. package/js/generated/component-tokens/notification.js +0 -65
  21. package/js/generated/component-tokens/status.d.ts +0 -63
  22. package/js/generated/component-tokens/status.js +0 -63
  23. package/js/generated/component-tokens/tag.d.ts +0 -247
  24. package/js/generated/component-tokens/tag.js +0 -247
  25. package/js/generated/themes/g10.d.ts +0 -242
  26. package/js/generated/themes/g10.js +0 -242
  27. package/js/generated/themes/g100.d.ts +0 -242
  28. package/js/generated/themes/g100.js +0 -242
  29. package/js/generated/themes/g90.d.ts +0 -242
  30. package/js/generated/themes/g90.js +0 -242
  31. package/js/generated/themes/white.d.ts +0 -242
  32. package/js/generated/themes/white.js +0 -242
  33. package/src/dtcg/README.md +0 -336
  34. package/src/dtcg/color-palette.json +0 -4424
  35. package/src/dtcg/components/button.json +0 -193
  36. package/src/dtcg/components/content-switcher.json +0 -60
  37. package/src/dtcg/components/notification.json +0 -130
  38. package/src/dtcg/components/status.json +0 -122
  39. package/src/dtcg/components/tag.json +0 -486
  40. package/src/dtcg/themes.json +0 -3356
  41. package/src/index.ts +0 -129
  42. package/src/tokens/Token.ts +0 -41
  43. package/src/tokens/TokenFormat.ts +0 -93
  44. package/src/tokens/TokenGroup.ts +0 -185
  45. package/src/tokens/TokenSet.ts +0 -91
  46. package/src/tokens/components.ts +0 -120
  47. package/src/tokens/index.ts +0 -59
  48. package/src/tokens/layout.ts +0 -39
  49. package/src/tokens/type.ts +0 -49
  50. package/src/tokens/types.ts +0 -28
  51. package/src/tokens/v10.ts +0 -188
  52. package/src/tokens/v11TokenGroup.ts +0 -546
  53. package/src/tokens/v11TokenSet.ts +0 -93
  54. package/src/tools.ts +0 -69
  55. package/src/v10/g10.ts +0 -349
  56. package/src/v10/g100.ts +0 -348
  57. package/src/v10/g90.ts +0 -350
  58. package/src/v10/index.ts +0 -22
  59. package/src/v10/metadata.yml +0 -217
  60. package/src/v10/tokens.ts +0 -397
  61. package/src/v10/white.ts +0 -352
  62. package/style-dictionary/formats/js-component-tokens.js +0 -128
  63. package/style-dictionary/formats/js-themes.js +0 -84
  64. package/style-dictionary/formats/scss-component-tokens.js +0 -149
  65. package/style-dictionary/formats/scss-themes.js +0 -127
  66. package/style-dictionary/formats/scss-tokens.js +0 -91
  67. package/style-dictionary/preprocessors/component-tokens.js +0 -172
  68. package/style-dictionary/preprocessors/dual-role.js +0 -157
  69. package/style-dictionary/preprocessors/theme-metadata.js +0 -46
  70. package/style-dictionary/sd.config.js +0 -449
  71. package/style-dictionary/transforms/alpha-modifier.js +0 -68
  72. package/style-dictionary/transforms/color-flatten.js +0 -79
  73. package/test-dtcg.scss +0 -28
  74. package/tsconfig.json +0 -8
  75. package/tsconfig.types.json +0 -10
package/src/v10/g90.ts DELETED
@@ -1,350 +0,0 @@
1
- /**
2
- * Copyright IBM Corp. 2018, 2026
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
- blue70,
17
- blue80,
18
-
19
- // Gray
20
- gray10,
21
- gray30,
22
- gray40,
23
- gray50,
24
- gray60,
25
- gray70,
26
- gray80,
27
- gray90,
28
- gray100,
29
-
30
- // Support
31
- green40,
32
- green50,
33
- yellow30,
34
- red30,
35
- red40,
36
- red60,
37
- red80,
38
- purple40,
39
-
40
- // Constants
41
- white,
42
- black,
43
-
44
- // Tools
45
- rgba,
46
- } from '@carbon/colors';
47
-
48
- export const interactive01 = blue60;
49
- export const interactive02 = gray60;
50
- export const interactive03 = white;
51
- export const interactive04 = blue50;
52
-
53
- export const uiBackground = gray90;
54
-
55
- export const ui01 = gray80;
56
- export const ui02 = gray70;
57
- export const ui03 = gray70;
58
- export const ui04 = gray50;
59
- export const ui05 = gray10;
60
-
61
- export const text01 = gray10;
62
- export const text02 = gray30;
63
- export const text03 = gray60;
64
- export const text04 = white;
65
- export const text05 = gray50;
66
- export const textError = red30;
67
-
68
- export const icon01 = gray10;
69
- export const icon02 = gray30;
70
- export const icon03 = white;
71
-
72
- export const link01 = blue40;
73
- export const link02 = blue30;
74
-
75
- export const inverseLink = blue60;
76
-
77
- export const field01 = gray80;
78
- export const field02 = gray70;
79
-
80
- export const inverse01 = gray100;
81
- export const inverse02 = gray10;
82
-
83
- export const support01 = red40;
84
- export const support02 = green40;
85
- export const support03 = yellow30;
86
- export const support04 = blue50;
87
-
88
- export const inverseSupport01 = red60;
89
- export const inverseSupport02 = green50;
90
- export const inverseSupport03 = yellow30;
91
- export const inverseSupport04 = blue60;
92
-
93
- export const overlay01 = rgba(black, 0.65);
94
-
95
- export const danger01 = red60;
96
- export const danger02 = red40;
97
-
98
- // Interaction states
99
- export const focus = white;
100
- export const inverseFocusUi = blue60;
101
-
102
- export const hoverPrimary = '#0353e9';
103
- export const activePrimary = blue80;
104
-
105
- export const hoverPrimaryText = blue30;
106
-
107
- export const hoverSecondary = '#606060';
108
- export const activeSecondary = gray80;
109
-
110
- export const hoverTertiary = gray10;
111
- export const activeTertiary = gray30;
112
-
113
- export const hoverUI = '#4c4c4c';
114
- export const hoverLightUI = '#656565';
115
- export const activeUI = gray60;
116
- export const activeLightUI = gray50;
117
- export const selectedUI = gray70;
118
- export const selectedLightUI = gray60;
119
- export const inverseHoverUI = '#e5e5e5';
120
-
121
- export const hoverSelectedUI = '#656565';
122
-
123
- export const hoverDanger = adjustLightness(danger01, -8);
124
- export const activeDanger = red80;
125
-
126
- export const hoverRow = '#4c4c4c';
127
-
128
- export const visitedLink = purple40;
129
-
130
- export const disabled01 = gray80;
131
- export const disabled02 = gray60;
132
- export const disabled03 = gray40;
133
-
134
- export const highlight = blue70;
135
-
136
- export const decorative01 = gray60;
137
-
138
- export const buttonSeparator = '#161616';
139
-
140
- export const skeleton01 = '#353535';
141
- export const skeleton02 = gray70;
142
-
143
- // New color tokens
144
- // TODO: remove fallback color when v11 is released and assign carbon colors to new tokens
145
- export const background = uiBackground;
146
- export const layer = ui01;
147
- export const layerAccent = ui03;
148
- export const layerAccentActive = gray50;
149
- export const layerAccentHover = adjustLightness(layerAccent, +7);
150
- export const field = field01;
151
- export const backgroundInverse = inverse02;
152
- export const backgroundBrand = interactive01;
153
- export const interactive = interactive04;
154
-
155
- export const borderSubtle = ui03;
156
- export const borderStrong = ui04;
157
- export const borderInverse = ui05;
158
- export const borderInteractive = interactive04;
159
-
160
- export const textPrimary = text01;
161
- export const textSecondary = text02;
162
- export const textPlaceholder = text03;
163
- export const textHelper = text05;
164
- export const textOnColor = text04;
165
- export const textInverse = inverse01;
166
-
167
- export const linkPrimary = link01;
168
- export const linkSecondary = link02;
169
- export const linkVisited = visitedLink;
170
- export const linkInverse = inverseLink;
171
-
172
- export const iconPrimary = icon01;
173
- export const iconSecondary = icon02;
174
- export const iconOnColor = icon03;
175
- export const iconInverse = inverse01;
176
-
177
- export const supportError = support01;
178
- export const supportSuccess = support02;
179
- export const supportWarning = support03;
180
- export const supportInfo = support04;
181
- export const supportErrorInverse = inverseSupport01;
182
- export const supportSuccessInverse = inverseSupport02;
183
- export const supportWarningInverse = inverseSupport03;
184
- export const supportInfoInverse = inverseSupport04;
185
-
186
- export const overlay = overlay01;
187
- export const toggleOff = ui04;
188
- export const shadow = rgba(black, 0.8);
189
-
190
- export const buttonPrimary = interactive01;
191
- export const buttonSecondary = interactive02;
192
- export const buttonTertiary = interactive03;
193
- export const buttonDangerPrimary = danger01;
194
- export const buttonDangerSecondary = danger02;
195
-
196
- export const backgroundActive = activeUI;
197
- export const layerActive = activeUI;
198
-
199
- export const buttonDangerActive = activeDanger;
200
- export const buttonPrimaryActive = activePrimary;
201
- export const buttonSecondaryActive = activeSecondary;
202
- export const buttonTertiaryActive = activeTertiary;
203
-
204
- export const focusInset = inverse01;
205
- export const focusInverse = inverseFocusUi;
206
-
207
- export const backgroundHover = hoverUI;
208
- export const layerHover = hoverUI;
209
- export const fieldHover = hoverUI;
210
- export const backgroundInverseHover = inverseHoverUI;
211
- export const linkPrimaryHover = hoverPrimaryText;
212
- export const buttonDangerHover = hoverDanger;
213
- export const buttonPrimaryHover = hoverPrimary;
214
- export const buttonSecondaryHover = hoverSecondary;
215
- export const buttonTertiaryHover = hoverTertiary;
216
-
217
- export const backgroundSelected = selectedUI;
218
- export const backgroundSelectedHover = hoverSelectedUI;
219
- export const layerSelected = selectedUI;
220
- export const layerSelectedHover = hoverSelectedUI;
221
- export const layerSelectedInverse = ui05;
222
- export const borderSubtleSelected = activeUI;
223
-
224
- export const borderDisabled = disabled01;
225
-
226
- export const textDisabled = disabled02;
227
- export const buttonDisabled = disabled02;
228
- export const iconDisabled = disabled02;
229
-
230
- export const textOnColorDisabled = disabled03;
231
- export const iconOnColorDisabled = disabled03;
232
- export const layerSelectedDisabled = disabled03;
233
-
234
- export const skeletonBackground = skeleton01;
235
- export const skeletonElement = skeleton02;
236
-
237
- export {
238
- // Type
239
- caption01,
240
- caption02,
241
- label01,
242
- label02,
243
- helperText01,
244
- helperText02,
245
- bodyShort01,
246
- bodyLong01,
247
- bodyShort02,
248
- bodyLong02,
249
- code01,
250
- code02,
251
- heading01,
252
- productiveHeading01,
253
- heading02,
254
- productiveHeading02,
255
- productiveHeading03,
256
- productiveHeading04,
257
- productiveHeading05,
258
- productiveHeading06,
259
- productiveHeading07,
260
- expressiveHeading01,
261
- expressiveHeading02,
262
- expressiveHeading03,
263
- expressiveHeading04,
264
- expressiveHeading05,
265
- expressiveHeading06,
266
- expressiveParagraph01,
267
- quotation01,
268
- quotation02,
269
- display01,
270
- display02,
271
- display03,
272
- display04,
273
- // V11 Tokens
274
- legal01,
275
- legal02,
276
- bodyCompact01,
277
- bodyCompact02,
278
- body01,
279
- body02,
280
- headingCompact01,
281
- headingCompact02,
282
- heading03,
283
- heading04,
284
- heading05,
285
- heading06,
286
- heading07,
287
- fluidHeading03,
288
- fluidHeading04,
289
- fluidHeading05,
290
- fluidHeading06,
291
- fluidParagraph01,
292
- fluidQuotation01,
293
- fluidQuotation02,
294
- fluidDisplay01,
295
- fluidDisplay02,
296
- fluidDisplay03,
297
- fluidDisplay04,
298
- // Layout
299
- // Spacing
300
- spacing01,
301
- spacing02,
302
- spacing03,
303
- spacing04,
304
- spacing05,
305
- spacing06,
306
- spacing07,
307
- spacing08,
308
- spacing09,
309
- spacing10,
310
- spacing11,
311
- spacing12,
312
- spacing13,
313
- // Fluid spacing
314
- fluidSpacing01,
315
- fluidSpacing02,
316
- fluidSpacing03,
317
- fluidSpacing04,
318
- // Containers
319
- container01,
320
- container02,
321
- container03,
322
- container04,
323
- container05,
324
- sizeXSmall,
325
- sizeSmall,
326
- sizeMedium,
327
- sizeLarge,
328
- sizeXLarge,
329
- size2XLarge,
330
- // Icon sizes
331
- iconSize01,
332
- iconSize02,
333
- // Layout
334
- // Deprecated ☠️
335
- layout01,
336
- layout02,
337
- layout03,
338
- layout04,
339
- layout05,
340
- layout06,
341
- layout07,
342
- } from './white';
343
-
344
- // Deprecated ☠️
345
- export const brand01 = interactive01;
346
- export const brand02 = interactive02;
347
- export const brand03 = interactive03;
348
- export const active01 = activeUI;
349
- export const hoverField = hoverUI;
350
- export const danger = danger01;
package/src/v10/index.ts DELETED
@@ -1,22 +0,0 @@
1
- /**
2
- * Copyright IBM Corp. 2018, 2026
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 * as white from './white';
9
- import * as g10 from './g10';
10
- import * as g90 from './g90';
11
- import * as g100 from './g100';
12
- import { tokens } from './tokens';
13
-
14
- const themes = {
15
- white,
16
- g10,
17
- g90,
18
- g100,
19
- };
20
-
21
- export * from './white';
22
- export { white, g10, g90, g100, themes, tokens };
@@ -1,217 +0,0 @@
1
- tokens:
2
- - name: interactive01
3
- role:
4
- - Primary interactive color
5
- - Primary buttons
6
- - name: interactive02
7
- role:
8
- - Secondary interactive color
9
- - Secondary button
10
- - name: interactive03
11
- role:
12
- - 4.5:1 AA contrast
13
- - Tertiary button
14
- - name: interactive04
15
- role:
16
- - 3:1 AA contrast
17
- - Selected elements
18
- - Active elements
19
- - Accent icons
20
- - name: uiBackground
21
- role:
22
- - Default page background
23
- - name: ui01
24
- role:
25
- - Primary container background
26
- - Secondary page background
27
- - name: ui02
28
- role:
29
- - Primary page background
30
- - Secondary container background
31
- - name: ui03
32
- role:
33
- - Subtle border
34
- - Tertiary background color
35
- - name: ui04
36
- role:
37
- - 3:1 AA element contrast
38
- - Medium contrast border
39
- - name: ui05
40
- role:
41
- - 4.5:1 AA element contrast
42
- - High contrast border
43
- - Emphasis elements
44
- - name: text01
45
- role:
46
- - Primary text
47
- - Body copy
48
- - Headers
49
- - Hover text color for text02
50
- - name: text02
51
- role:
52
- - Secondary text
53
- - Input labels
54
- - Help text
55
- - name: text03
56
- role:
57
- - Placeholder text
58
- - name: text04
59
- role:
60
- - Text on interactive colors
61
- - name: icon01
62
- role:
63
- - Primary icons
64
- - name: icon02
65
- role:
66
- - Secondary icons
67
- - name: icon03
68
- role:
69
- - Tertiary icons
70
- - Icons on interactive colors
71
- - Icons on non-ui colors
72
- - name: link01
73
- role:
74
- - Primary links
75
- - Ghost button
76
- - name: link02
77
- role:
78
- - Secondary link color for lower contrast backgrounds
79
- - name: field01
80
- role:
81
- - Default input fields
82
- - Field color on $ui-backgrounds
83
- - name: field02
84
- role:
85
- - Input field color on ui02 backgrounds
86
-
87
- - name: inverse01
88
- role:
89
- - Inverse text color
90
- - Inverse icon color
91
- - name: inverse02
92
- role:
93
- - High contrast backgrounds
94
- - High contrast elements
95
- - name: support01
96
- role:
97
- - Error
98
- - name: support02
99
- role:
100
- - Success
101
- - name: support03
102
- role:
103
- - Warning
104
- - name: support04
105
- role:
106
- - Information
107
- - name: inverseSupport01
108
- role:
109
- - Error on high contrast backgrounds
110
- - name: inverseSupport02
111
- role:
112
- - Success on high contrast backgrounds
113
- - name: inverseSupport03
114
- role:
115
- - Warning on high contrast backgrounds
116
- - name: inverseSupport04
117
- role:
118
- - Information on high contrast backgrounds
119
- - name: overlay01
120
- role:
121
- - Background overlay
122
- - name: focus
123
- role:
124
- - Focus border
125
- - Focus underline
126
- - name: hoverPrimary
127
- role:
128
- - interactive01 hover
129
- - name: activePrimary
130
- role:
131
- - interactive01 active
132
- - name: hoverPrimaryText
133
- role:
134
- - interactive01 text hover
135
- - name: hoverSecondary
136
- role:
137
- - interactive02 hover
138
- - name: activeSecondary
139
- role:
140
- - interactive02 active
141
- - inverse01 active
142
- - name: hoverTertiary
143
- role:
144
- - interactive03 hover
145
- - inverse01 hover
146
- - name: activeTertiary
147
- role:
148
- - interactive03 active
149
- - name: hoverUI
150
- role:
151
- - ui01 hover
152
- - ui02 hover
153
- - Transparent background hover
154
- - name: activeUI
155
- role:
156
- - ui01 active
157
- - ui02 active
158
- - name: selectedUI
159
- role:
160
- - Selected UI elements
161
- - name: hoverSelectedUI
162
- role:
163
- - Data table selected row hover
164
- - name: hoverDanger
165
- role:
166
- - Danger hover
167
- - support01 hover
168
- - name: activeDanger
169
- role:
170
- - Danger active
171
- - support01 active
172
- - name: hoverRow
173
- role:
174
- - Row hover
175
- - name: visitedLink
176
- role:
177
- - Visited links
178
- - name: disabled01
179
- role:
180
- - Disabled fields
181
- - Disabled backgrounds
182
- - Disabled border
183
- - name: disabled02
184
- role:
185
- - Disabled elements on disabled01
186
- - Disabled label
187
- - Disabled text on disabled01
188
- - Disabled icons
189
- - Disabled border
190
- - name: disabled03
191
- role:
192
- - Disabled text on disabled02
193
- - Disabled icons on disabled02
194
- - name: highlight
195
- role:
196
- - interactive01 high light
197
- - name: skeleton01
198
- role:
199
- - Skeleton state of graphics
200
- - name: skeleton02
201
- role:
202
- - Skeleton state of text
203
- - name: brand01
204
- alias: interactive01
205
- deprecated: true
206
- - name: brand02
207
- alias: interactive02
208
- deprecated: true
209
- - name: brand03
210
- alias: interactive03
211
- deprecated: true
212
- - name: active01
213
- alias: activeUI
214
- deprecated: true
215
- - name: hoverField
216
- alias: hoverUI
217
- deprecated: true