@carbon/themes 12.0.0-alpha.1 → 12.0.0-alpha.3
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/es/index.js +5572 -0
- package/lib/__tests__/themes-test.d.ts +1 -0
- package/lib/__tests__/tools-test.d.ts +1 -0
- package/lib/tokens/__tests__/Token-test.d.ts +1 -0
- package/lib/tokens/__tests__/TokenFormat-test.d.ts +1 -0
- package/lib/tokens/__tests__/TokenGroup-test.d.ts +1 -0
- package/lib/tokens/__tests__/TokenSet-test.d.ts +1 -0
- package/lib/tokens/__tests__/metadata-test.d.ts +1 -0
- package/lib/tokens/__tests__/v11-test.d.ts +1 -0
- package/lib/v10/__tests__/themes-test.d.ts +1 -0
- package/lib/v10/__tests__/tokens-test.d.ts +1 -0
- package/package.json +13 -4
- package/umd/index.js +6322 -0
- package/docs/sass.md +0 -189
- package/src/dtcg/README.md +0 -336
- package/src/dtcg/color-palette.json +0 -4424
- package/src/dtcg/components/button.json +0 -193
- package/src/dtcg/components/content-switcher.json +0 -60
- package/src/dtcg/components/notification.json +0 -130
- package/src/dtcg/components/status.json +0 -122
- package/src/dtcg/components/tag.json +0 -486
- package/src/dtcg/themes.json +0 -3356
- package/src/index.ts +0 -129
- package/src/tokens/Token.ts +0 -41
- package/src/tokens/TokenFormat.ts +0 -93
- package/src/tokens/TokenGroup.ts +0 -185
- package/src/tokens/TokenSet.ts +0 -91
- package/src/tokens/components.ts +0 -120
- package/src/tokens/index.ts +0 -59
- package/src/tokens/layout.ts +0 -39
- package/src/tokens/type.ts +0 -49
- package/src/tokens/types.ts +0 -28
- package/src/tokens/v10.ts +0 -188
- package/src/tokens/v11TokenGroup.ts +0 -546
- package/src/tokens/v11TokenSet.ts +0 -93
- package/src/tools.ts +0 -69
- package/src/v10/g10.ts +0 -349
- package/src/v10/g100.ts +0 -348
- package/src/v10/g90.ts +0 -350
- package/src/v10/index.ts +0 -22
- package/src/v10/metadata.yml +0 -217
- package/src/v10/tokens.ts +0 -397
- package/src/v10/white.ts +0 -352
- package/style-dictionary/formats/js-component-tokens.js +0 -128
- package/style-dictionary/formats/js-themes.js +0 -84
- package/style-dictionary/formats/scss-component-tokens.js +0 -149
- package/style-dictionary/formats/scss-themes.js +0 -127
- package/style-dictionary/formats/scss-tokens.js +0 -91
- package/style-dictionary/preprocessors/component-tokens.js +0 -172
- package/style-dictionary/preprocessors/dual-role.js +0 -157
- package/style-dictionary/preprocessors/theme-metadata.js +0 -46
- package/style-dictionary/sd.config.js +0 -449
- package/style-dictionary/transforms/alpha-modifier.js +0 -68
- package/style-dictionary/transforms/color-flatten.js +0 -79
- package/test-dtcg.scss +0 -28
- package/tsconfig.json +0 -8
- package/tsconfig.types.json +0 -10
package/src/tokens/layout.ts
DELETED
|
@@ -1,39 +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 { TokenGroup } from './TokenGroup';
|
|
9
|
-
|
|
10
|
-
export const layout = TokenGroup.create({
|
|
11
|
-
name: 'Layout',
|
|
12
|
-
properties: [],
|
|
13
|
-
tokens: [
|
|
14
|
-
'spacing-01',
|
|
15
|
-
'spacing-02',
|
|
16
|
-
'spacing-03',
|
|
17
|
-
'spacing-04',
|
|
18
|
-
'spacing-05',
|
|
19
|
-
'spacing-06',
|
|
20
|
-
'spacing-07',
|
|
21
|
-
'spacing-08',
|
|
22
|
-
'spacing-09',
|
|
23
|
-
'spacing-10',
|
|
24
|
-
'spacing-11',
|
|
25
|
-
'spacing-12',
|
|
26
|
-
'spacing-13',
|
|
27
|
-
'fluid-spacing-01',
|
|
28
|
-
'fluid-spacing-02',
|
|
29
|
-
'fluid-spacing-03',
|
|
30
|
-
'fluid-spacing-04',
|
|
31
|
-
'container-01',
|
|
32
|
-
'container-02',
|
|
33
|
-
'container-03',
|
|
34
|
-
'container-04',
|
|
35
|
-
'container-05',
|
|
36
|
-
'icon-size-01',
|
|
37
|
-
'icon-size-02',
|
|
38
|
-
],
|
|
39
|
-
});
|
package/src/tokens/type.ts
DELETED
|
@@ -1,49 +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 { TokenGroup } from './TokenGroup';
|
|
9
|
-
|
|
10
|
-
export const type = TokenGroup.create({
|
|
11
|
-
name: 'Type',
|
|
12
|
-
properties: [],
|
|
13
|
-
tokens: [
|
|
14
|
-
'caption-01',
|
|
15
|
-
'caption-02',
|
|
16
|
-
'label-01',
|
|
17
|
-
'label-02',
|
|
18
|
-
'helper-text-01',
|
|
19
|
-
'helper-text-02',
|
|
20
|
-
'body-short-01',
|
|
21
|
-
'body-long-01',
|
|
22
|
-
'body-short-02',
|
|
23
|
-
'body-long-02',
|
|
24
|
-
'code-01',
|
|
25
|
-
'code-02',
|
|
26
|
-
'heading-01',
|
|
27
|
-
'productive-heading-01',
|
|
28
|
-
'heading-02',
|
|
29
|
-
'productive-Heading-02',
|
|
30
|
-
'productive-heading-03',
|
|
31
|
-
'productive-heading-04',
|
|
32
|
-
'productive-heading-05',
|
|
33
|
-
'productive-heading-06',
|
|
34
|
-
'productive-heading-07',
|
|
35
|
-
'expressive-heading-01',
|
|
36
|
-
'expressive-heading-02',
|
|
37
|
-
'expressive-heading-03',
|
|
38
|
-
'expressive-heading-04',
|
|
39
|
-
'expressive-heading-05',
|
|
40
|
-
'expressive-heading-06',
|
|
41
|
-
'expressive-paragraph-01',
|
|
42
|
-
'quotation-01',
|
|
43
|
-
'quotation-02',
|
|
44
|
-
'display-01',
|
|
45
|
-
'display-02',
|
|
46
|
-
'display-03',
|
|
47
|
-
'display-04',
|
|
48
|
-
],
|
|
49
|
-
});
|
package/src/tokens/types.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 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
|
-
export type TokenProperties = string[];
|
|
9
|
-
|
|
10
|
-
export type TokenDefinition = {
|
|
11
|
-
name: string;
|
|
12
|
-
properties?: TokenProperties;
|
|
13
|
-
state?: string;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export type TokenContext = {
|
|
17
|
-
groups?: string[];
|
|
18
|
-
properties?: TokenProperties;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export type ResolvedToken = TokenDefinition & {
|
|
22
|
-
groups: string[];
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export type TokenMetadata = {
|
|
26
|
-
name: string;
|
|
27
|
-
type: 'color' | 'layout' | 'type';
|
|
28
|
-
};
|
package/src/tokens/v10.ts
DELETED
|
@@ -1,188 +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 { TokenGroup } from './TokenGroup';
|
|
9
|
-
|
|
10
|
-
const color = TokenGroup.create({
|
|
11
|
-
name: 'Color',
|
|
12
|
-
properties: [],
|
|
13
|
-
tokens: [
|
|
14
|
-
'interactive-01',
|
|
15
|
-
'interactive-02',
|
|
16
|
-
'interactive-03',
|
|
17
|
-
'interactive-04',
|
|
18
|
-
'ui-background',
|
|
19
|
-
'ui-01',
|
|
20
|
-
'ui-02',
|
|
21
|
-
'ui-03',
|
|
22
|
-
'ui-04',
|
|
23
|
-
'ui-05',
|
|
24
|
-
'text-01',
|
|
25
|
-
'text-02',
|
|
26
|
-
'text-03',
|
|
27
|
-
'text-04',
|
|
28
|
-
'text-05',
|
|
29
|
-
'text-error',
|
|
30
|
-
'icon-01',
|
|
31
|
-
'icon-02',
|
|
32
|
-
'icon-03',
|
|
33
|
-
'link-01',
|
|
34
|
-
'link-02',
|
|
35
|
-
'inverse-link',
|
|
36
|
-
'field-01',
|
|
37
|
-
'field-02',
|
|
38
|
-
'inverse-01',
|
|
39
|
-
'inverse-02',
|
|
40
|
-
'support-01',
|
|
41
|
-
'support-02',
|
|
42
|
-
'support-03',
|
|
43
|
-
'support-04',
|
|
44
|
-
'inverse-support-01',
|
|
45
|
-
'inverse-support-02',
|
|
46
|
-
'inverse-support-03',
|
|
47
|
-
'inverse-support-04',
|
|
48
|
-
'overlay-01',
|
|
49
|
-
'danger-01',
|
|
50
|
-
'danger-02',
|
|
51
|
-
'focus',
|
|
52
|
-
'inverse-focus-ui',
|
|
53
|
-
'hover-primary',
|
|
54
|
-
'active-primary',
|
|
55
|
-
'hover-primary-text',
|
|
56
|
-
'hover-secondary',
|
|
57
|
-
'active-secondary',
|
|
58
|
-
'hover-tertiary',
|
|
59
|
-
'active-tertiary',
|
|
60
|
-
'hover-ui',
|
|
61
|
-
'hover-light-ui',
|
|
62
|
-
'hover-selected-ui',
|
|
63
|
-
'active-ui',
|
|
64
|
-
'active-light-ui',
|
|
65
|
-
'selected-ui',
|
|
66
|
-
'selected-light-ui',
|
|
67
|
-
'inverse-hover-ui',
|
|
68
|
-
'hover-danger',
|
|
69
|
-
'active-danger',
|
|
70
|
-
'hover-row',
|
|
71
|
-
'visited-link',
|
|
72
|
-
'disabled-01',
|
|
73
|
-
'disabled-02',
|
|
74
|
-
'disabled-03',
|
|
75
|
-
'highlight',
|
|
76
|
-
'decorative-01',
|
|
77
|
-
'button-separator',
|
|
78
|
-
'skeleton-01',
|
|
79
|
-
'skeleton-02',
|
|
80
|
-
// deprecated
|
|
81
|
-
'brand-01',
|
|
82
|
-
'brand-02',
|
|
83
|
-
'brand-03',
|
|
84
|
-
'active-01',
|
|
85
|
-
'hover-field',
|
|
86
|
-
'danger',
|
|
87
|
-
],
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
const type = TokenGroup.create({
|
|
91
|
-
name: 'Type',
|
|
92
|
-
properties: [],
|
|
93
|
-
tokens: [
|
|
94
|
-
'caption-01',
|
|
95
|
-
'caption-02',
|
|
96
|
-
'label-01',
|
|
97
|
-
'label-02',
|
|
98
|
-
'helper-text-01',
|
|
99
|
-
'helper-text-02',
|
|
100
|
-
'body-short-01',
|
|
101
|
-
'body-long-01',
|
|
102
|
-
'body-short-02',
|
|
103
|
-
'body-long-02',
|
|
104
|
-
'code-01',
|
|
105
|
-
'code-02',
|
|
106
|
-
'heading-01',
|
|
107
|
-
'productive-heading-01',
|
|
108
|
-
'heading-02',
|
|
109
|
-
'productive-Heading-02',
|
|
110
|
-
'productive-heading-03',
|
|
111
|
-
'productive-heading-04',
|
|
112
|
-
'productive-heading-05',
|
|
113
|
-
'productive-heading-06',
|
|
114
|
-
'productive-heading-07',
|
|
115
|
-
'expressive-heading-01',
|
|
116
|
-
'expressive-heading-02',
|
|
117
|
-
'expressive-heading-03',
|
|
118
|
-
'expressive-heading-04',
|
|
119
|
-
'expressive-heading-05',
|
|
120
|
-
'expressive-heading-06',
|
|
121
|
-
'expressive-paragraph-01',
|
|
122
|
-
'quotation-01',
|
|
123
|
-
'quotation-02',
|
|
124
|
-
'display-01',
|
|
125
|
-
'display-02',
|
|
126
|
-
'display-03',
|
|
127
|
-
'display-04',
|
|
128
|
-
],
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
const layout = TokenGroup.create({
|
|
132
|
-
name: 'Layout',
|
|
133
|
-
properties: [],
|
|
134
|
-
tokens: [
|
|
135
|
-
'spacing-01',
|
|
136
|
-
'spacing-02',
|
|
137
|
-
'spacing-03',
|
|
138
|
-
'spacing-04',
|
|
139
|
-
'spacing-05',
|
|
140
|
-
'spacing-06',
|
|
141
|
-
'spacing-07',
|
|
142
|
-
'spacing-08',
|
|
143
|
-
'spacing-09',
|
|
144
|
-
'spacing-10',
|
|
145
|
-
'spacing-11',
|
|
146
|
-
'spacing-12',
|
|
147
|
-
'spacing-13',
|
|
148
|
-
'layout-01',
|
|
149
|
-
'layout-02',
|
|
150
|
-
'layout-03',
|
|
151
|
-
'layout-04',
|
|
152
|
-
'layout-05',
|
|
153
|
-
'layout-06',
|
|
154
|
-
'layout-07',
|
|
155
|
-
'fluid-spacing-01',
|
|
156
|
-
'fluid-spacing-02',
|
|
157
|
-
'fluid-spacing-03',
|
|
158
|
-
'fluid-spacing-04',
|
|
159
|
-
'container-01',
|
|
160
|
-
'container-02',
|
|
161
|
-
'container-03',
|
|
162
|
-
'container-04',
|
|
163
|
-
'container-05',
|
|
164
|
-
'icon-size-01',
|
|
165
|
-
'icon-size-02',
|
|
166
|
-
],
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
export const v10 = [
|
|
170
|
-
...color.getTokens().map((token) => {
|
|
171
|
-
return {
|
|
172
|
-
name: token.name,
|
|
173
|
-
type: 'color',
|
|
174
|
-
};
|
|
175
|
-
}),
|
|
176
|
-
...type.getTokens().map((token) => {
|
|
177
|
-
return {
|
|
178
|
-
name: token.name,
|
|
179
|
-
type: 'type',
|
|
180
|
-
};
|
|
181
|
-
}),
|
|
182
|
-
...layout.getTokens().map((token) => {
|
|
183
|
-
return {
|
|
184
|
-
name: token.name,
|
|
185
|
-
type: 'layout',
|
|
186
|
-
};
|
|
187
|
-
}),
|
|
188
|
-
];
|