@patternfly/design-tokens 1.10.0 → 1.12.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/build/css/tokens-charts-dark.scss +153 -153
- package/build/css/tokens-charts.scss +153 -153
- package/build/css/tokens-dark.scss +300 -300
- package/build/css/tokens-default.scss +567 -548
- package/build/css/tokens-palette.scss +65 -65
- package/build.js +18 -9
- package/config.default.json +1 -0
- package/package.json +1 -1
- package/tokens/dark/base.dark.json +2 -2
- package/tokens/dark/semantic.dark.json +325 -64
- package/tokens/default/base.dimension.json +16 -54
- package/tokens/default/base.json +3 -3
- package/tokens/default/semantic.dimension.json +191 -83
- package/tokens/default/semantic.json +325 -64
- package/tokens/default/semantic.motion.json +26 -0
|
@@ -1,74 +1,74 @@
|
|
|
1
1
|
|
|
2
2
|
// Do not edit directly
|
|
3
|
-
// Generated on
|
|
3
|
+
// Generated on Tue, 02 Jul 2024 18:11:52 GMT
|
|
4
4
|
|
|
5
5
|
@mixin pf-v6-tokens {
|
|
6
|
-
--pf-t--color--
|
|
7
|
-
--pf-t--color--
|
|
8
|
-
--pf-t--color--
|
|
9
|
-
--pf-t--color--
|
|
10
|
-
--pf-t--color--
|
|
11
|
-
--pf-t--color--
|
|
12
|
-
--pf-t--color--
|
|
13
|
-
--pf-t--color--
|
|
14
|
-
--pf-t--color--
|
|
15
|
-
--pf-t--color--
|
|
16
|
-
--pf-t--color--
|
|
17
|
-
--pf-t--color--
|
|
18
|
-
--pf-t--color--
|
|
6
|
+
--pf-t--color--black: #000000;
|
|
7
|
+
--pf-t--color--blue--10: #e0f0ff;
|
|
8
|
+
--pf-t--color--blue--20: #b9dafc;
|
|
9
|
+
--pf-t--color--blue--30: #92c5f9;
|
|
10
|
+
--pf-t--color--blue--40: #4394e5;
|
|
11
|
+
--pf-t--color--blue--50: #0066cc;
|
|
12
|
+
--pf-t--color--blue--60: #004d99;
|
|
13
|
+
--pf-t--color--blue--70: #003366;
|
|
14
|
+
--pf-t--color--gray--10: #f2f2f2;
|
|
15
|
+
--pf-t--color--gray--20: #e0e0e0;
|
|
16
|
+
--pf-t--color--gray--30: #c7c7c7;
|
|
17
|
+
--pf-t--color--gray--40: #a3a3a3;
|
|
18
|
+
--pf-t--color--gray--50: #707070;
|
|
19
|
+
--pf-t--color--gray--60: #4d4d4d;
|
|
20
|
+
--pf-t--color--gray--70: #383838;
|
|
21
|
+
--pf-t--color--gray--80: #292929;
|
|
22
|
+
--pf-t--color--gray--90: #1f1f1f;
|
|
23
|
+
--pf-t--color--gray--95: #151515;
|
|
24
|
+
--pf-t--color--green--10: #e9f7df;
|
|
25
|
+
--pf-t--color--green--20: #d1f1bb;
|
|
26
|
+
--pf-t--color--green--30: #afdc8f;
|
|
27
|
+
--pf-t--color--green--40: #87bb62;
|
|
28
|
+
--pf-t--color--green--50: #63993d;
|
|
29
|
+
--pf-t--color--green--60: #3d7317;
|
|
30
|
+
--pf-t--color--green--70: #204d00;
|
|
31
|
+
--pf-t--color--orange--10: #ffe8cc;
|
|
32
|
+
--pf-t--color--orange--20: #fccb8f;
|
|
33
|
+
--pf-t--color--orange--30: #f8ae54;
|
|
34
|
+
--pf-t--color--orange--40: #f5921b;
|
|
35
|
+
--pf-t--color--orange--50: #ca6c0f;
|
|
36
|
+
--pf-t--color--orange--60: #9e4a06;
|
|
37
|
+
--pf-t--color--orange--70: #732e00;
|
|
19
38
|
--pf-t--color--purple--10: #ece6ff;
|
|
20
|
-
--pf-t--color--
|
|
21
|
-
--pf-t--color--
|
|
22
|
-
--pf-t--color--
|
|
23
|
-
--pf-t--color--
|
|
24
|
-
--pf-t--color--
|
|
25
|
-
--pf-t--color--
|
|
39
|
+
--pf-t--color--purple--20: #d0c5f4;
|
|
40
|
+
--pf-t--color--purple--30: #b6a6e9;
|
|
41
|
+
--pf-t--color--purple--40: #876fd4;
|
|
42
|
+
--pf-t--color--purple--50: #5e40be;
|
|
43
|
+
--pf-t--color--purple--60: #3d2785;
|
|
44
|
+
--pf-t--color--purple--70: #21134d;
|
|
45
|
+
--pf-t--color--red--10: #fce3e3;
|
|
46
|
+
--pf-t--color--red--20: #fbc5c5;
|
|
47
|
+
--pf-t--color--red--30: #f9a8a8;
|
|
48
|
+
--pf-t--color--red--40: #f56e6e;
|
|
49
|
+
--pf-t--color--red--50: #ee0000;
|
|
50
|
+
--pf-t--color--red--60: #a60000;
|
|
51
|
+
--pf-t--color--red--70: #5f0000;
|
|
26
52
|
--pf-t--color--red-orange--10: #ffe3d9;
|
|
27
|
-
--pf-t--color--orange--
|
|
28
|
-
--pf-t--color--orange--
|
|
29
|
-
--pf-t--color--orange--
|
|
30
|
-
--pf-t--color--orange--
|
|
31
|
-
--pf-t--color--orange--
|
|
32
|
-
--pf-t--color--orange--
|
|
33
|
-
--pf-t--color--orange--10: #ffe8cc;
|
|
34
|
-
--pf-t--color--green--70: #204d00;
|
|
35
|
-
--pf-t--color--green--60: #3d7317;
|
|
36
|
-
--pf-t--color--green--50: #63993d;
|
|
37
|
-
--pf-t--color--green--40: #87bb62;
|
|
38
|
-
--pf-t--color--green--30: #afdc8f;
|
|
39
|
-
--pf-t--color--green--20: #d1f1bb;
|
|
40
|
-
--pf-t--color--green--10: #e9f7df;
|
|
41
|
-
--pf-t--color--yellow--70: #73480b;
|
|
42
|
-
--pf-t--color--yellow--60: #96640f;
|
|
43
|
-
--pf-t--color--yellow--50: #b98412;
|
|
44
|
-
--pf-t--color--yellow--40: #dca614;
|
|
45
|
-
--pf-t--color--yellow--30: #ffcc17;
|
|
46
|
-
--pf-t--color--yellow--20: #ffe072;
|
|
47
|
-
--pf-t--color--yellow--10: #fff4cc;
|
|
48
|
-
--pf-t--color--teal--70: #004d4d;
|
|
49
|
-
--pf-t--color--teal--60: #147878;
|
|
50
|
-
--pf-t--color--teal--50: #37a3a3;
|
|
51
|
-
--pf-t--color--teal--40: #63bdbd;
|
|
52
|
-
--pf-t--color--teal--30: #9ad8d8;
|
|
53
|
-
--pf-t--color--teal--20: #b9e5e5;
|
|
53
|
+
--pf-t--color--red-orange--20: #fbbea8;
|
|
54
|
+
--pf-t--color--red-orange--30: #f89b78;
|
|
55
|
+
--pf-t--color--red-orange--40: #f4784a;
|
|
56
|
+
--pf-t--color--red-orange--50: #f0561d;
|
|
57
|
+
--pf-t--color--red-orange--60: #b1380b;
|
|
58
|
+
--pf-t--color--red-orange--70: #731f00;
|
|
54
59
|
--pf-t--color--teal--10: #daf2f2;
|
|
55
|
-
--pf-t--color--
|
|
56
|
-
--pf-t--color--
|
|
57
|
-
--pf-t--color--
|
|
58
|
-
--pf-t--color--
|
|
59
|
-
--pf-t--color--
|
|
60
|
-
--pf-t--color--
|
|
61
|
-
--pf-t--color--blue--10: #e0f0ff;
|
|
62
|
-
--pf-t--color--black: #000000;
|
|
63
|
-
--pf-t--color--gray--95: #151515;
|
|
64
|
-
--pf-t--color--gray--90: #1f1f1f;
|
|
65
|
-
--pf-t--color--gray--80: #292929;
|
|
66
|
-
--pf-t--color--gray--70: #383838;
|
|
67
|
-
--pf-t--color--gray--60: #4d4d4d;
|
|
68
|
-
--pf-t--color--gray--50: #707070;
|
|
69
|
-
--pf-t--color--gray--40: #a3a3a3;
|
|
70
|
-
--pf-t--color--gray--30: #c7c7c7;
|
|
71
|
-
--pf-t--color--gray--20: #e0e0e0;
|
|
72
|
-
--pf-t--color--gray--10: #f2f2f2;
|
|
60
|
+
--pf-t--color--teal--20: #b9e5e5;
|
|
61
|
+
--pf-t--color--teal--30: #9ad8d8;
|
|
62
|
+
--pf-t--color--teal--40: #63bdbd;
|
|
63
|
+
--pf-t--color--teal--50: #37a3a3;
|
|
64
|
+
--pf-t--color--teal--60: #147878;
|
|
65
|
+
--pf-t--color--teal--70: #004d4d;
|
|
73
66
|
--pf-t--color--white: #ffffff;
|
|
67
|
+
--pf-t--color--yellow--10: #fff4cc;
|
|
68
|
+
--pf-t--color--yellow--20: #ffe072;
|
|
69
|
+
--pf-t--color--yellow--30: #ffcc17;
|
|
70
|
+
--pf-t--color--yellow--40: #dca614;
|
|
71
|
+
--pf-t--color--yellow--50: #b98412;
|
|
72
|
+
--pf-t--color--yellow--60: #96640f;
|
|
73
|
+
--pf-t--color--yellow--70: #73480b;
|
|
74
74
|
}
|
package/build.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/* eslint-disable no-console */
|
|
2
2
|
const StyleDictionary = require('style-dictionary');
|
|
3
|
+
const config = require('./config.default.json'); // Adjust the path if necessary
|
|
4
|
+
const basePxFontSize = config.basePxFontSize || 16;
|
|
3
5
|
|
|
4
6
|
const build = (selector) => {
|
|
5
|
-
const { fileHeader, formattedVariables } = StyleDictionary.formatHelpers;
|
|
7
|
+
const { fileHeader, formattedVariables, sortByName } = StyleDictionary.formatHelpers;
|
|
6
8
|
|
|
7
9
|
console.log('Build started...');
|
|
8
10
|
console.log('\n============================');
|
|
@@ -12,6 +14,8 @@ const build = (selector) => {
|
|
|
12
14
|
name: 'customFormat',
|
|
13
15
|
formatter: function ({ dictionary, file, options }) {
|
|
14
16
|
const { outputReferences } = options;
|
|
17
|
+
const alphaSort = (a, b) => sortByName(a, b) * -1;
|
|
18
|
+
dictionary.allTokens = dictionary.allTokens.sort(alphaSort);
|
|
15
19
|
return (
|
|
16
20
|
fileHeader({ file, commentStyle: 'short' }) +
|
|
17
21
|
`${selector} {\n` +
|
|
@@ -26,21 +30,25 @@ const build = (selector) => {
|
|
|
26
30
|
name: 'patternfly/global/px',
|
|
27
31
|
type: 'value',
|
|
28
32
|
matcher: (token) =>
|
|
29
|
-
token.attributes.type === 'spacer' ||
|
|
30
33
|
token.attributes.type === 'border' ||
|
|
31
|
-
token.attributes.type === '
|
|
32
|
-
token.attributes.type === 'breakpoint' ||
|
|
33
|
-
(token.attributes.type === 'box-shadow' && token.attributes.item !== 'color') ||
|
|
34
|
-
(token.attributes.type === 'font' && token.attributes.item === 'size'),
|
|
34
|
+
(token.attributes.type === 'box-shadow' && token.attributes.item !== 'color'),
|
|
35
35
|
transformer: (token) => `${token.value}px`
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
StyleDictionary.registerTransform({
|
|
39
|
-
name: 'patternfly/global/
|
|
39
|
+
name: 'patternfly/global/pxToRem',
|
|
40
40
|
type: 'value',
|
|
41
41
|
matcher: (token) =>
|
|
42
|
-
token.attributes.type === '
|
|
43
|
-
token.attributes.
|
|
42
|
+
token.attributes.type === 'spacer' ||
|
|
43
|
+
token.attributes.item === 'size' ||
|
|
44
|
+
token.attributes.type === 'breakpoint',
|
|
45
|
+
transformer: (token) => `${token.value / basePxFontSize}rem`
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
StyleDictionary.registerTransform({
|
|
49
|
+
name: 'patternfly/global/ms',
|
|
50
|
+
type: 'value',
|
|
51
|
+
matcher: (token) => token.attributes.type === 'duration' || token.attributes.type === 'delay',
|
|
44
52
|
transformer: (token) => `${token.value}ms`
|
|
45
53
|
});
|
|
46
54
|
|
|
@@ -63,6 +71,7 @@ const build = (selector) => {
|
|
|
63
71
|
'color/css',
|
|
64
72
|
// custom transforms
|
|
65
73
|
'patternfly/global/px',
|
|
74
|
+
'patternfly/global/pxToRem',
|
|
66
75
|
'patternfly/global/ms',
|
|
67
76
|
'patternfly/doublekebab'
|
|
68
77
|
]
|
package/config.default.json
CHANGED
package/package.json
CHANGED
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
"value": "{color.orange.10}"
|
|
221
221
|
}
|
|
222
222
|
},
|
|
223
|
-
"
|
|
223
|
+
"yellow": {
|
|
224
224
|
"100": {
|
|
225
225
|
"type": "color",
|
|
226
226
|
"value": "{color.yellow.30}"
|
|
@@ -248,7 +248,7 @@
|
|
|
248
248
|
"value": "{color.green.10}"
|
|
249
249
|
}
|
|
250
250
|
},
|
|
251
|
-
"
|
|
251
|
+
"teal": {
|
|
252
252
|
"100": {
|
|
253
253
|
"type": "color",
|
|
254
254
|
"value": "{color.teal.30}"
|