@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.
Files changed (64) hide show
  1. package/es/index.js +1360 -1722
  2. package/js/generated/component-tokens/button.d.ts +98 -0
  3. package/{src/component-tokens/button/tokens.ts → js/generated/component-tokens/button.js} +65 -97
  4. package/js/generated/component-tokens/content-switcher.d.ts +25 -0
  5. package/js/generated/component-tokens/content-switcher.js +25 -0
  6. package/js/generated/component-tokens/notification.d.ts +65 -0
  7. package/js/generated/component-tokens/notification.js +65 -0
  8. package/js/generated/component-tokens/status.d.ts +63 -0
  9. package/js/generated/component-tokens/status.js +63 -0
  10. package/js/generated/component-tokens/tag.d.ts +247 -0
  11. package/js/generated/component-tokens/tag.js +247 -0
  12. package/js/generated/themes/g10.d.ts +242 -0
  13. package/js/generated/themes/g10.js +242 -0
  14. package/js/generated/themes/g100.d.ts +242 -0
  15. package/js/generated/themes/g100.js +242 -0
  16. package/js/generated/themes/g90.d.ts +242 -0
  17. package/js/generated/themes/g90.js +242 -0
  18. package/js/generated/themes/white.d.ts +242 -0
  19. package/js/generated/themes/white.js +242 -0
  20. package/lib/index.d.ts +12 -10
  21. package/lib/index.js +1360 -1722
  22. package/package.json +12 -9
  23. package/scss/generated/_button-tokens.scss +2 -2
  24. package/src/dtcg/README.md +210 -0
  25. package/src/dtcg/color-palette.json +3204 -0
  26. package/src/dtcg/components/button.json +193 -0
  27. package/src/dtcg/components/content-switcher.json +60 -0
  28. package/src/dtcg/components/notification.json +130 -0
  29. package/src/dtcg/components/status.json +122 -0
  30. package/src/dtcg/components/tag.json +486 -0
  31. package/src/dtcg/g10.json +1453 -0
  32. package/src/dtcg/g100.json +1478 -0
  33. package/src/dtcg/g90.json +1478 -0
  34. package/src/dtcg/white.json +1345 -0
  35. package/src/index.ts +96 -10
  36. package/test-dtcg.scss +28 -0
  37. package/umd/index.js +1363 -1725
  38. package/lib/component-tokens/button/index.d.ts +0 -7
  39. package/lib/component-tokens/button/tokens.d.ts +0 -98
  40. package/lib/component-tokens/content-switcher/index.d.ts +0 -7
  41. package/lib/component-tokens/content-switcher/tokens.d.ts +0 -24
  42. package/lib/component-tokens/notification/index.d.ts +0 -7
  43. package/lib/component-tokens/notification/tokens.d.ts +0 -64
  44. package/lib/component-tokens/status/index.d.ts +0 -7
  45. package/lib/component-tokens/status/tokens.d.ts +0 -62
  46. package/lib/component-tokens/tag/index.d.ts +0 -7
  47. package/lib/component-tokens/tag/tokens.d.ts +0 -246
  48. package/lib/g10.d.ts +0 -242
  49. package/lib/g100.d.ts +0 -242
  50. package/lib/g90.d.ts +0 -242
  51. package/lib/white.d.ts +0 -243
  52. package/src/component-tokens/button/index.ts +0 -8
  53. package/src/component-tokens/content-switcher/index.ts +0 -7
  54. package/src/component-tokens/content-switcher/tokens.ts +0 -29
  55. package/src/component-tokens/notification/index.ts +0 -8
  56. package/src/component-tokens/notification/tokens.ts +0 -105
  57. package/src/component-tokens/status/index.ts +0 -8
  58. package/src/component-tokens/status/tokens.ts +0 -90
  59. package/src/component-tokens/tag/index.ts +0 -8
  60. package/src/component-tokens/tag/tokens.ts +0 -353
  61. package/src/g10.ts +0 -452
  62. package/src/g100.ts +0 -453
  63. package/src/g90.ts +0 -455
  64. 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
- import * as white from './white';
9
- import * as g10 from './g10';
10
- import * as g90 from './g90';
11
- import * as g100 from './g100';
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 './component-tokens/button';
14
- import * as tagTokens from './component-tokens/tag';
15
- import * as notificationTokens from './component-tokens/notification';
16
- import * as statusTokens from './component-tokens/status';
17
- import * as contentSwitcherTokens from './component-tokens/content-switcher';
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 './white';
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
+ }