@govbr-ds/tokens 4.0.0-next.37 → 4.0.0-next.39
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/README.md +40 -21
- package/dist/css/theme/dark/contrast-mode.css +76 -0
- package/dist/css/{contrast-mode.css → theme/light/contrast-mode.css} +36 -36
- package/dist/js/components/avatar/tokens.js +6 -6
- package/dist/js/components/breadcrumbs/tokens.js +6 -6
- package/dist/js/components/button/tokens.js +8 -8
- package/dist/js/components/card/tokens.js +7 -7
- package/dist/js/components/chatBubble/tokens.js +4 -4
- package/dist/js/components/chatInput/tokens.js +6 -6
- package/dist/js/components/checkbox/tokens.js +10 -10
- package/dist/js/components/footer/tokens.js +6 -6
- package/dist/js/components/input/tokens.js +6 -6
- package/dist/js/components/list/tokens.js +10 -10
- package/dist/js/components/radioGroup/tokens.js +8 -8
- package/dist/js/components/sideMenu/tokens.js +8 -8
- package/dist/js/components/tag/tokens.js +6 -6
- package/dist/js/tokens.js +31 -31
- package/dist/json/components/actionGroup/tokens.json +8 -8
- package/dist/json/components/avatar/tokens.json +69 -69
- package/dist/json/components/breadcrumbs/tokens.json +66 -66
- package/dist/json/components/button/tokens.json +112 -112
- package/dist/json/components/card/tokens.json +80 -80
- package/dist/json/components/chatBubble/tokens.json +90 -90
- package/dist/json/components/chatInput/tokens.json +107 -107
- package/dist/json/components/checkbox/tokens.json +123 -123
- package/dist/json/components/checkboxGroup/tokens.json +9 -9
- package/dist/json/components/divider/tokens.json +19 -19
- package/dist/json/components/footer/tokens.json +88 -88
- package/dist/json/components/formLabel/tokens.json +7 -7
- package/dist/json/components/header/tokens.json +64 -64
- package/dist/json/components/icon/tokens.json +64 -64
- package/dist/json/components/input/tokens.json +84 -84
- package/dist/json/components/institutionalBar/tokens.json +28 -28
- package/dist/json/components/list/tokens.json +110 -110
- package/dist/json/components/loading/tokens.json +10 -10
- package/dist/json/components/message/tokens.json +16 -16
- package/dist/json/components/radioGroup/tokens.json +96 -96
- package/dist/json/components/rating/tokens.json +30 -30
- package/dist/json/components/select/tokens.json +26 -26
- package/dist/json/components/sideMenu/tokens.json +125 -125
- package/dist/json/components/skipLink/tokens.json +6 -6
- package/dist/json/components/tag/tokens.json +160 -160
- package/dist/json/components/tagCount/tokens.json +38 -38
- package/dist/json/components/tagStatus/tokens.json +48 -48
- package/dist/json/components/text/tokens.json +42 -42
- package/dist/json/components/tooltip/tokens.json +21 -21
- package/dist/json/theme/dark/tokens.json +122 -122
- package/dist/json/theme/light/tokens.json +122 -122
- package/dist/json/tokens.json +1849 -1849
- package/dist/penpot/tokens.json +6056 -3755
- package/dist/tokens-studio/tokens.json +2723 -459
- package/package.json +5 -8
- package/src/config/config.json +174 -0
- package/src/config/penpot.json +48 -0
- package/src/config/penpot.mjs +0 -53
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@govbr-ds/tokens",
|
|
3
|
-
"version": "4.0.0-next.
|
|
3
|
+
"version": "4.0.0-next.39",
|
|
4
4
|
"description": "Tokens do Padrão Digital de Governo",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design system",
|
|
@@ -33,16 +33,13 @@
|
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
|
-
"build": "run-s clear split-tokens compile
|
|
36
|
+
"build": "run-s clear split-tokens compile",
|
|
37
37
|
"clear": "run-p clear:*",
|
|
38
38
|
"clear:dist": "rimraf ./dist",
|
|
39
|
-
"clear:temp": "rimraf ./
|
|
40
|
-
"compile": "node
|
|
41
|
-
"generate-penpot": "node scripts/generate-penpot.mjs",
|
|
42
|
-
"generate-tokens-studio": "node scripts/generate-tokens-studio.mjs",
|
|
39
|
+
"clear:temp": "rimraf ./temp",
|
|
40
|
+
"compile": "node style-dictionary/build.mjs",
|
|
43
41
|
"split-tokens": "node scripts/split-tokens.mjs",
|
|
44
|
-
"
|
|
45
|
-
"test": "node --test test/**/*.test.mjs",
|
|
42
|
+
"test": "node --test test/*.test.mjs test/**/*.test.mjs",
|
|
46
43
|
"test:contracts": "run-s split-tokens test:contracts:run",
|
|
47
44
|
"test:contracts:run": "node --test test/contracts/**/*.test.mjs"
|
|
48
45
|
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
{
|
|
2
|
+
"defaultTheme": "light",
|
|
3
|
+
"themeSource": "temp/style-dictionary/theme/{theme}.json",
|
|
4
|
+
"source": [
|
|
5
|
+
"temp/style-dictionary/core/component.json",
|
|
6
|
+
"temp/style-dictionary/core/foundation.json",
|
|
7
|
+
"temp/style-dictionary/core/pattern.json",
|
|
8
|
+
"temp/style-dictionary/core/config.json"
|
|
9
|
+
],
|
|
10
|
+
"parsers": ["govbr/dtcg-sets"],
|
|
11
|
+
"preprocessors": ["tokens-studio"],
|
|
12
|
+
"log": { "verbosity": "silent" },
|
|
13
|
+
"components": {
|
|
14
|
+
"platforms": {
|
|
15
|
+
"css": {
|
|
16
|
+
"files": [
|
|
17
|
+
{
|
|
18
|
+
"format": "govbr/native/css/variables",
|
|
19
|
+
"destination": "components/{component}/tokens.css",
|
|
20
|
+
"filter": "govbr/component/{component}",
|
|
21
|
+
"options": { "outputReferences": true, "outputReferenceFallbacks": true }
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"scss": {
|
|
26
|
+
"files": [
|
|
27
|
+
{
|
|
28
|
+
"format": "govbr/native/scss/variables",
|
|
29
|
+
"destination": "components/{component}/tokens.scss",
|
|
30
|
+
"filter": "govbr/component/{component}",
|
|
31
|
+
"options": { "outputReferences": true, "outputReferenceFallbacks": true }
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"js": {
|
|
36
|
+
"files": [
|
|
37
|
+
{
|
|
38
|
+
"format": "govbr/native/javascript/es6",
|
|
39
|
+
"destination": "components/{component}/tokens.js",
|
|
40
|
+
"filter": "govbr/component/{component}",
|
|
41
|
+
"options": { "outputReferences": true, "outputReferenceFallbacks": true }
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"json": {
|
|
46
|
+
"files": [
|
|
47
|
+
{
|
|
48
|
+
"format": "govbr/native/json",
|
|
49
|
+
"destination": "components/{component}/tokens.json",
|
|
50
|
+
"filter": "govbr/component/{component}",
|
|
51
|
+
"options": { "outputReferences": true, "outputReferenceFallbacks": true }
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"themes": {
|
|
58
|
+
"platforms": {
|
|
59
|
+
"css": {
|
|
60
|
+
"buildPath": "dist/css/theme/{theme}/",
|
|
61
|
+
"actions": [
|
|
62
|
+
"govbr/css-prefers-color-scheme",
|
|
63
|
+
"govbr/css-color-scheme",
|
|
64
|
+
"govbr/css-contrast-mode"
|
|
65
|
+
],
|
|
66
|
+
"options": { "theme": "{theme}" },
|
|
67
|
+
"files": [
|
|
68
|
+
{
|
|
69
|
+
"format": "govbr/native/css/variables",
|
|
70
|
+
"destination": "tokens.css",
|
|
71
|
+
"filter": "govbr/theme",
|
|
72
|
+
"options": {
|
|
73
|
+
"outputReferences": "govbr/transformed",
|
|
74
|
+
"outputReferenceFallbacks": true,
|
|
75
|
+
"selector": "[data-theme=\"{theme}\"], :root[data-theme=\"{theme}\"]"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
"scss": {
|
|
81
|
+
"buildPath": "dist/scss/theme/{theme}/",
|
|
82
|
+
"files": [
|
|
83
|
+
{
|
|
84
|
+
"format": "govbr/native/scss/variables",
|
|
85
|
+
"destination": "tokens.scss",
|
|
86
|
+
"filter": "govbr/theme",
|
|
87
|
+
"options": { "outputReferences": "govbr/transformed" }
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
"js": {
|
|
92
|
+
"buildPath": "dist/js/theme/{theme}/",
|
|
93
|
+
"files": [
|
|
94
|
+
{
|
|
95
|
+
"format": "govbr/native/javascript/es6",
|
|
96
|
+
"destination": "tokens.js",
|
|
97
|
+
"filter": "govbr/theme",
|
|
98
|
+
"options": {}
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
"json": {
|
|
103
|
+
"buildPath": "dist/json/theme/{theme}/",
|
|
104
|
+
"files": [
|
|
105
|
+
{
|
|
106
|
+
"format": "govbr/native/json",
|
|
107
|
+
"destination": "tokens.json",
|
|
108
|
+
"filter": "govbr/theme",
|
|
109
|
+
"options": {}
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
"tools": {
|
|
114
|
+
"transforms": ["govbr/remove/px", "govbr/resolve/math", "ts/resolveMath", "ts/color/css/hexrgba"],
|
|
115
|
+
"files": []
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"exports": {
|
|
120
|
+
"parsers": ["govbr/dtcg-sets"],
|
|
121
|
+
"preprocessors": ["tokens-studio"],
|
|
122
|
+
"platforms": {
|
|
123
|
+
"exports": {
|
|
124
|
+
"transforms": ["govbr/remove/px", "govbr/resolve/math", "ts/resolveMath", "ts/color/css/hexrgba"],
|
|
125
|
+
"buildPath": "dist/",
|
|
126
|
+
"files": [
|
|
127
|
+
{ "format": "govbr/tokens-studio", "destination": "tokens-studio/tokens.json" },
|
|
128
|
+
{ "format": "{penpotFormat}", "destination": "{penpotDestination}" }
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"log": { "verbosity": "silent" }
|
|
133
|
+
},
|
|
134
|
+
"platforms": {
|
|
135
|
+
"css": {
|
|
136
|
+
"transformGroup": "govbr/shared",
|
|
137
|
+
"transforms": ["name/kebab", "govbr/remove/px", "govbr/format/cubic-bezier", "govbr/resolve/math", "govbr/add/deg", "govbr/add/ms"],
|
|
138
|
+
"buildPath": "dist/css/",
|
|
139
|
+
"actions": [],
|
|
140
|
+
"files": [
|
|
141
|
+
{ "format": "govbr/native/css/variables", "destination": "tokens.css", "filter": "govbr/core" }
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
"scss": {
|
|
145
|
+
"transformGroup": "govbr/shared",
|
|
146
|
+
"transforms": ["name/kebab", "govbr/remove/px", "govbr/format/cubic-bezier", "govbr/resolve/math", "govbr/add/deg", "govbr/add/ms"],
|
|
147
|
+
"buildPath": "dist/scss/",
|
|
148
|
+
"files": [
|
|
149
|
+
{
|
|
150
|
+
"format": "govbr/native/scss/map-deep",
|
|
151
|
+
"destination": "tokens.scss",
|
|
152
|
+
"filter": "govbr/core",
|
|
153
|
+
"options": { "showFileHeader": false }
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
"js": {
|
|
158
|
+
"transformGroup": "govbr/shared",
|
|
159
|
+
"transforms": ["name/camel", "govbr/remove/px", "govbr/format/cubic-bezier", "govbr/resolve/math", "govbr/add/deg", "govbr/add/ms"],
|
|
160
|
+
"buildPath": "dist/js/",
|
|
161
|
+
"files": [
|
|
162
|
+
{ "format": "govbr/native/javascript/es6", "destination": "tokens.js", "filter": "govbr/core" }
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
"json": {
|
|
166
|
+
"transformGroup": "govbr/shared",
|
|
167
|
+
"transforms": ["name/camel", "govbr/remove/px", "govbr/format/cubic-bezier", "govbr/resolve/math", "govbr/add/deg", "govbr/add/ms"],
|
|
168
|
+
"buildPath": "dist/json/",
|
|
169
|
+
"files": [
|
|
170
|
+
{ "format": "govbr/native/json", "destination": "tokens.json", "filter": "govbr/core" }
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "govbr/penpot",
|
|
3
|
+
"destination": "penpot/tokens.json",
|
|
4
|
+
"themeGroup": "DS GOV",
|
|
5
|
+
"typesToChange": {
|
|
6
|
+
"spacing": "dimension",
|
|
7
|
+
"offset": "number",
|
|
8
|
+
"lineHeights": "dimension"
|
|
9
|
+
},
|
|
10
|
+
"typesToChangeByToken": {
|
|
11
|
+
"number": [
|
|
12
|
+
"br.contentOverflow.scrollShadow.blur",
|
|
13
|
+
"br.contentOverflow.scrollShadow.spread",
|
|
14
|
+
"br.elevation.blur.*",
|
|
15
|
+
"br.elevation.level0.blur.*",
|
|
16
|
+
"br.elevation.level1.blur.*",
|
|
17
|
+
"br.elevation.level2.blur.*",
|
|
18
|
+
"br.elevation.level3.blur.*",
|
|
19
|
+
"br.elevation.level4.blur.*"
|
|
20
|
+
],
|
|
21
|
+
"spacing": ["br.form.gap.*", "br.form.padding.*", "br.grid.gutter.*", "br.grid.margin.*"],
|
|
22
|
+
"rotation": ["br.state.dragging.rotation"]
|
|
23
|
+
},
|
|
24
|
+
"setAliases": {
|
|
25
|
+
"core/foundation": "global",
|
|
26
|
+
"core/pattern": "global",
|
|
27
|
+
"core/component": "component",
|
|
28
|
+
"theme/light": "light",
|
|
29
|
+
"theme/dark": "dark"
|
|
30
|
+
},
|
|
31
|
+
"themes": {
|
|
32
|
+
"light": {
|
|
33
|
+
"name": "Light",
|
|
34
|
+
"description": "Tema Light",
|
|
35
|
+
"sets": ["global", "component", "light"]
|
|
36
|
+
},
|
|
37
|
+
"dark": {
|
|
38
|
+
"name": "Dark",
|
|
39
|
+
"description": "Tema Dark",
|
|
40
|
+
"sets": ["global", "component", "dark"]
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"metadata": {
|
|
44
|
+
"group": "DS GOV",
|
|
45
|
+
"activeThemes": ["DS GOV/Light"],
|
|
46
|
+
"activeSets": ["global", "component", "light"]
|
|
47
|
+
}
|
|
48
|
+
}
|
package/src/config/penpot.mjs
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
const PENPOT_CONFIG = {
|
|
2
|
-
source_path: 'src/tokens.json',
|
|
3
|
-
output_path: 'dist/penpot/tokens.json',
|
|
4
|
-
configSet: 'core/config',
|
|
5
|
-
maxReferenceDepth: 12,
|
|
6
|
-
themeGroup: 'DS GOV',
|
|
7
|
-
typesToChange: {
|
|
8
|
-
spacing: 'dimension',
|
|
9
|
-
offset: 'number',
|
|
10
|
-
lineHeights: 'dimension',
|
|
11
|
-
},
|
|
12
|
-
typesToChangeByToken: {
|
|
13
|
-
number: [
|
|
14
|
-
'br.contentOverflow.scrollShadow.blur',
|
|
15
|
-
'br.contentOverflow.scrollShadow.spread',
|
|
16
|
-
'br.elevation.blur.*',
|
|
17
|
-
'br.elevation.level0.blur.*',
|
|
18
|
-
'br.elevation.level1.blur.*',
|
|
19
|
-
'br.elevation.level2.blur.*',
|
|
20
|
-
'br.elevation.level3.blur.*',
|
|
21
|
-
'br.elevation.level4.blur.*',
|
|
22
|
-
],
|
|
23
|
-
spacing: ['br.form.gap.*', 'br.form.padding.*', 'br.grid.gutter.*', 'br.grid.margin.*'],
|
|
24
|
-
rotation: ['br.state.dragging.rotation'],
|
|
25
|
-
},
|
|
26
|
-
fontSizeBaseToken: '{br.typography.fontSize.fontBase.default}',
|
|
27
|
-
setAliases: {
|
|
28
|
-
'core/foundation': 'global',
|
|
29
|
-
'core/pattern': 'global',
|
|
30
|
-
'core/component': 'component',
|
|
31
|
-
'theme/light': 'light',
|
|
32
|
-
'theme/dark': 'dark',
|
|
33
|
-
},
|
|
34
|
-
themes: {
|
|
35
|
-
light: {
|
|
36
|
-
name: 'Light',
|
|
37
|
-
description: 'Tema Light',
|
|
38
|
-
sets: ['global', 'component', 'light'],
|
|
39
|
-
},
|
|
40
|
-
dark: {
|
|
41
|
-
name: 'Dark',
|
|
42
|
-
description: 'Tema Dark',
|
|
43
|
-
sets: ['global', 'component', 'dark'],
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
metadata: {
|
|
47
|
-
group: 'DS GOV',
|
|
48
|
-
activeThemes: ['DS GOV/Light'],
|
|
49
|
-
activeSets: ['global', 'component', 'light'],
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export default PENPOT_CONFIG;
|