@carbon/themes 11.77.0 → 11.78.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/es/index.js +1360 -1722
- package/js/generated/component-tokens/button.d.ts +98 -0
- package/{src/component-tokens/button/tokens.ts → js/generated/component-tokens/button.js} +65 -97
- package/js/generated/component-tokens/content-switcher.d.ts +25 -0
- package/js/generated/component-tokens/content-switcher.js +25 -0
- package/js/generated/component-tokens/notification.d.ts +65 -0
- package/js/generated/component-tokens/notification.js +65 -0
- package/js/generated/component-tokens/status.d.ts +63 -0
- package/js/generated/component-tokens/status.js +63 -0
- package/js/generated/component-tokens/tag.d.ts +247 -0
- package/js/generated/component-tokens/tag.js +247 -0
- package/js/generated/themes/g10.d.ts +242 -0
- package/js/generated/themes/g10.js +242 -0
- package/js/generated/themes/g100.d.ts +242 -0
- package/js/generated/themes/g100.js +242 -0
- package/js/generated/themes/g90.d.ts +242 -0
- package/js/generated/themes/g90.js +242 -0
- package/js/generated/themes/white.d.ts +242 -0
- package/js/generated/themes/white.js +242 -0
- package/lib/index.d.ts +12 -10
- package/lib/index.js +1360 -1722
- package/package.json +12 -9
- package/scss/generated/_button-tokens.scss +2 -2
- package/src/dtcg/README.md +210 -0
- package/src/dtcg/color-palette.json +3204 -0
- package/src/dtcg/components/button.json +193 -0
- package/src/dtcg/components/content-switcher.json +60 -0
- package/src/dtcg/components/notification.json +130 -0
- package/src/dtcg/components/status.json +122 -0
- package/src/dtcg/components/tag.json +486 -0
- package/src/dtcg/g10.json +1453 -0
- package/src/dtcg/g100.json +1478 -0
- package/src/dtcg/g90.json +1478 -0
- package/src/dtcg/white.json +1345 -0
- package/src/index.ts +96 -10
- package/test-dtcg.scss +28 -0
- package/umd/index.js +1363 -1725
- package/lib/component-tokens/button/index.d.ts +0 -7
- package/lib/component-tokens/button/tokens.d.ts +0 -98
- package/lib/component-tokens/content-switcher/index.d.ts +0 -7
- package/lib/component-tokens/content-switcher/tokens.d.ts +0 -24
- package/lib/component-tokens/notification/index.d.ts +0 -7
- package/lib/component-tokens/notification/tokens.d.ts +0 -64
- package/lib/component-tokens/status/index.d.ts +0 -7
- package/lib/component-tokens/status/tokens.d.ts +0 -62
- package/lib/component-tokens/tag/index.d.ts +0 -7
- package/lib/component-tokens/tag/tokens.d.ts +0 -246
- package/lib/g10.d.ts +0 -242
- package/lib/g100.d.ts +0 -242
- package/lib/g90.d.ts +0 -242
- package/lib/white.d.ts +0 -243
- package/src/component-tokens/button/index.ts +0 -8
- package/src/component-tokens/content-switcher/index.ts +0 -7
- package/src/component-tokens/content-switcher/tokens.ts +0 -29
- package/src/component-tokens/notification/index.ts +0 -8
- package/src/component-tokens/notification/tokens.ts +0 -105
- package/src/component-tokens/status/index.ts +0 -8
- package/src/component-tokens/status/tokens.ts +0 -90
- package/src/component-tokens/tag/index.ts +0 -8
- package/src/component-tokens/tag/tokens.ts +0 -353
- package/src/g10.ts +0 -452
- package/src/g100.ts +0 -453
- package/src/g90.ts +0 -455
- package/src/white.ts +0 -455
package/src/index.ts
CHANGED
|
@@ -5,16 +5,19 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import * as
|
|
8
|
+
// The imports below reference build artifacts in js/generated/ that are
|
|
9
|
+
// produced by `yarn build:js-tokens` (tasks/generate-js-tokens.js) before
|
|
10
|
+
// this file is bundled. Run `yarn build` to generate them first.
|
|
11
|
+
import * as white from '../js/generated/themes/white.js';
|
|
12
|
+
import * as g10 from '../js/generated/themes/g10.js';
|
|
13
|
+
import * as g90 from '../js/generated/themes/g90.js';
|
|
14
|
+
import * as g100 from '../js/generated/themes/g100.js';
|
|
12
15
|
import * as v10 from './v10';
|
|
13
|
-
import * as buttonTokens from '
|
|
14
|
-
import * as tagTokens from '
|
|
15
|
-
import * as notificationTokens from '
|
|
16
|
-
import * as statusTokens from '
|
|
17
|
-
import * as contentSwitcherTokens from '
|
|
16
|
+
import * as buttonTokens from '../js/generated/component-tokens/button.js';
|
|
17
|
+
import * as tagTokens from '../js/generated/component-tokens/tag.js';
|
|
18
|
+
import * as notificationTokens from '../js/generated/component-tokens/notification.js';
|
|
19
|
+
import * as statusTokens from '../js/generated/component-tokens/status.js';
|
|
20
|
+
import * as contentSwitcherTokens from '../js/generated/component-tokens/content-switcher.js';
|
|
18
21
|
import { formatTokenName } from './tools';
|
|
19
22
|
import { unstable_metadata } from './tokens';
|
|
20
23
|
|
|
@@ -25,7 +28,7 @@ const themes = {
|
|
|
25
28
|
g100,
|
|
26
29
|
};
|
|
27
30
|
|
|
28
|
-
export * from '
|
|
31
|
+
export * from '../js/generated/themes/white.js';
|
|
29
32
|
export {
|
|
30
33
|
white,
|
|
31
34
|
g10,
|
|
@@ -41,3 +44,86 @@ export {
|
|
|
41
44
|
unstable_metadata,
|
|
42
45
|
formatTokenName,
|
|
43
46
|
};
|
|
47
|
+
|
|
48
|
+
// Re-export type and layout tokens that were previously re-exported via the
|
|
49
|
+
// hand-authored theme files (white.ts, g10.ts, g90.ts, g100.ts) to preserve
|
|
50
|
+
// backward compatibility with @carbon/themes consumers.
|
|
51
|
+
export {
|
|
52
|
+
caption01,
|
|
53
|
+
caption02,
|
|
54
|
+
label01,
|
|
55
|
+
label02,
|
|
56
|
+
helperText01,
|
|
57
|
+
helperText02,
|
|
58
|
+
bodyShort01,
|
|
59
|
+
bodyLong01,
|
|
60
|
+
bodyShort02,
|
|
61
|
+
bodyLong02,
|
|
62
|
+
code01,
|
|
63
|
+
code02,
|
|
64
|
+
heading01,
|
|
65
|
+
productiveHeading01,
|
|
66
|
+
heading02,
|
|
67
|
+
productiveHeading02,
|
|
68
|
+
productiveHeading03,
|
|
69
|
+
productiveHeading04,
|
|
70
|
+
productiveHeading05,
|
|
71
|
+
productiveHeading06,
|
|
72
|
+
productiveHeading07,
|
|
73
|
+
expressiveHeading01,
|
|
74
|
+
expressiveHeading02,
|
|
75
|
+
expressiveHeading03,
|
|
76
|
+
expressiveHeading04,
|
|
77
|
+
expressiveHeading05,
|
|
78
|
+
expressiveHeading06,
|
|
79
|
+
expressiveParagraph01,
|
|
80
|
+
quotation01,
|
|
81
|
+
quotation02,
|
|
82
|
+
display01,
|
|
83
|
+
display02,
|
|
84
|
+
display03,
|
|
85
|
+
display04,
|
|
86
|
+
} from '@carbon/type';
|
|
87
|
+
export {
|
|
88
|
+
spacing01,
|
|
89
|
+
spacing02,
|
|
90
|
+
spacing03,
|
|
91
|
+
spacing04,
|
|
92
|
+
spacing05,
|
|
93
|
+
spacing06,
|
|
94
|
+
spacing07,
|
|
95
|
+
spacing08,
|
|
96
|
+
spacing09,
|
|
97
|
+
spacing10,
|
|
98
|
+
spacing11,
|
|
99
|
+
spacing12,
|
|
100
|
+
spacing13,
|
|
101
|
+
// Fluid spacing
|
|
102
|
+
fluidSpacing01,
|
|
103
|
+
fluidSpacing02,
|
|
104
|
+
fluidSpacing03,
|
|
105
|
+
fluidSpacing04,
|
|
106
|
+
// Containers
|
|
107
|
+
container01,
|
|
108
|
+
container02,
|
|
109
|
+
container03,
|
|
110
|
+
container04,
|
|
111
|
+
container05,
|
|
112
|
+
sizeXSmall,
|
|
113
|
+
sizeSmall,
|
|
114
|
+
sizeMedium,
|
|
115
|
+
sizeLarge,
|
|
116
|
+
sizeXLarge,
|
|
117
|
+
size2XLarge,
|
|
118
|
+
// Icon sizes
|
|
119
|
+
iconSize01,
|
|
120
|
+
iconSize02,
|
|
121
|
+
// Layout (deprecated)
|
|
122
|
+
layout01,
|
|
123
|
+
layout02,
|
|
124
|
+
layout03,
|
|
125
|
+
layout04,
|
|
126
|
+
layout05,
|
|
127
|
+
layout06,
|
|
128
|
+
layout07,
|
|
129
|
+
} from '@carbon/layout';
|
package/test-dtcg.scss
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
@use 'scss/themes' as *;
|
|
2
|
+
@use 'scss/component-tokens' as *;
|
|
3
|
+
|
|
4
|
+
// Test that all 4 themes are available
|
|
5
|
+
.test-white {
|
|
6
|
+
background: map-get($white, 'background');
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.test-g10 {
|
|
10
|
+
background: map-get($g10, 'background');
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.test-g90 {
|
|
14
|
+
background: map-get($g90, 'background');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.test-g100 {
|
|
18
|
+
background: map-get($g100, 'background');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Test component tokens
|
|
22
|
+
.test-button {
|
|
23
|
+
background: map-get($button-primary, 'white');
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.test-tag {
|
|
27
|
+
background: map-get($tag-background-blue, 'white');
|
|
28
|
+
}
|