@govbr-ds/tokens 4.0.0-next.10 → 4.0.0-next.12

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 (54) hide show
  1. package/README.md +82 -1
  2. package/dist/css/themes/dark.css +69 -80
  3. package/dist/css/themes/light.css +69 -80
  4. package/dist/css/tokens.css +303 -213
  5. package/dist/js/themes/dark.js +77 -80
  6. package/dist/js/themes/light.js +77 -80
  7. package/dist/js/tokens.js +257 -157
  8. package/dist/json/themes/dark.json +1338 -1538
  9. package/dist/json/themes/light.json +1338 -1538
  10. package/dist/json/tokens.json +8788 -5829
  11. package/dist/scss/themes/dark.scss +69 -80
  12. package/dist/scss/themes/light.scss +69 -80
  13. package/dist/scss/tokens.scss +303 -213
  14. package/dist/tokens-studio/tokens.json +5033 -0
  15. package/package.json +12 -8
  16. package/src/figma/{variables/base14.json → base14.json} +2 -6
  17. package/src/figma/{variables/color.json → color.json} +1 -1
  18. package/src/figma/component/base14.json +64 -0
  19. package/src/figma/component/icon.json +202 -0
  20. package/src/figma/component/manifest.json +18 -0
  21. package/src/figma/{variables/component → component}/text.json +21 -11
  22. package/src/figma/dark.json +352 -0
  23. package/src/figma/{variables/elevation.json → elevation.json} +29 -27
  24. package/src/figma/{variables/grid.json → grid.json} +6 -6
  25. package/src/figma/{variables/guideline → guideline}/componente.json +1 -1
  26. package/src/figma/{variables/guideline → guideline}/fundamento.json +1 -1
  27. package/src/figma/{variables/guideline → guideline}/geral.json +1 -1
  28. package/src/figma/guideline/manifest.json +12 -0
  29. package/src/figma/{variables/guideline → guideline}/padrao.json +1 -1
  30. package/src/figma/iconography.json +348 -0
  31. package/src/figma/light.json +352 -0
  32. package/src/figma/{variables/manifest.json → manifest.json} +9 -0
  33. package/src/figma/{variables/motion.json → motion.json} +1 -1
  34. package/src/figma/pattern/form.json +16 -0
  35. package/src/figma/{variables/pattern → pattern}/manifest.json +2 -4
  36. package/src/figma/pattern/skeleton.json +52 -0
  37. package/src/figma/{variables/spacing.json → spacing.json} +1 -1
  38. package/src/figma/state.json +232 -0
  39. package/src/figma/{variables/surface.json → surface.json} +20 -24
  40. package/src/figma/{variables/typography.json → typography.json} +7 -19
  41. package/src/temp/component.json +406 -0
  42. package/src/temp/core.json +3851 -0
  43. package/src/temp/dark.json +352 -0
  44. package/src/temp/light.json +352 -0
  45. package/src/temp/pattern.json +70 -0
  46. package/src/tokens.json +5033 -0
  47. package/src/figma/tokens.json +0 -4465
  48. package/src/figma/variables/component/manifest.json +0 -12
  49. package/src/figma/variables/dark.json +0 -314
  50. package/src/figma/variables/guideline/manifest.json +0 -21
  51. package/src/figma/variables/iconography.json +0 -14
  52. package/src/figma/variables/light.json +0 -314
  53. package/src/figma/variables/pattern/skeleton.json +0 -52
  54. package/src/figma/variables/state.json +0 -238
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@govbr-ds/tokens",
3
- "version": "4.0.0-next.10",
3
+ "version": "4.0.0-next.12",
4
4
  "type": "module",
5
5
  "description": "Tokens do Padrão Digital de Governo",
6
6
  "keywords": [
@@ -24,16 +24,20 @@
24
24
  "src"
25
25
  ],
26
26
  "scripts": {
27
- "build": "run-s clear transform compile",
27
+ "build": "run-s clear split-tokens compile copy-tokens",
28
28
  "clear": "run-p clear:*",
29
29
  "clear:dist": "rimraf ./dist",
30
- "clear:temp": "rimraf ./temp",
31
- "compile": "node scripts/build-tokens.js",
32
- "transform": "node scripts/transform-tokens.js src/figma/tokens.json temp/",
33
- "start": "run-s transform compile"
30
+ "clear:temp": "rimraf ./src/temp",
31
+ "compile": "node scripts/build-tokens.js --themes='light, dark'",
32
+ "split-tokens": "node scripts/split-tokens.js src/tokens.json src/temp/",
33
+ "start": "run-s split-tokens compile copy-tokens",
34
+ "copy-tokens": "cpy 'src/tokens.json' 'dist/tokens-studio/' --flat"
34
35
  },
35
36
  "dependencies": {
36
- "@tokens-studio/sd-transforms": "^1.2.3",
37
- "style-dictionary": "^4.0.1"
37
+ "@tokens-studio/sd-transforms": "^1.2.9",
38
+ "style-dictionary": "^4.2.0"
39
+ },
40
+ "devDependencies": {
41
+ "cpy-cli": "^5.0.0"
38
42
  }
39
43
  }
@@ -1,12 +1,8 @@
1
1
  {
2
2
  "typography": {
3
3
  "fontSize": {
4
- "base": {
5
- "$value": "{typography.fontSize.base14}",
6
- "$type": "number"
7
- },
8
4
  "default": {
9
- "$value": "{typography.fontSize.base}",
5
+ "$value": "14",
10
6
  "$type": "number"
11
7
  },
12
8
  "up": {
@@ -63,4 +59,4 @@
63
59
  }
64
60
  }
65
61
  }
66
- }
62
+ }
@@ -1945,4 +1945,4 @@
1945
1945
  }
1946
1946
  }
1947
1947
  }
1948
- }
1948
+ }
@@ -0,0 +1,64 @@
1
+ {
2
+ "icon": {
3
+ "size": {
4
+ "max": {
5
+ "default": {
6
+ "$type": "dimension",
7
+ "$value": "17.5"
8
+ },
9
+ "up": {
10
+ "01": {
11
+ "$type": "dimension",
12
+ "$value": "19.69"
13
+ },
14
+ "02": {
15
+ "$type": "dimension",
16
+ "$value": "22.16"
17
+ },
18
+ "03": {
19
+ "$type": "dimension",
20
+ "$value": "24.92"
21
+ },
22
+ "04": {
23
+ "$type": "dimension",
24
+ "$value": "28.03"
25
+ },
26
+ "05": {
27
+ "$type": "dimension",
28
+ "$value": "31.53"
29
+ },
30
+ "06": {
31
+ "$type": "dimension",
32
+ "$value": "35.47"
33
+ },
34
+ "07": {
35
+ "$type": "dimension",
36
+ "$value": "39.92"
37
+ },
38
+ "08": {
39
+ "$type": "dimension",
40
+ "$value": "44.9"
41
+ }
42
+ },
43
+ "down": {
44
+ "01": {
45
+ "$type": "dimension",
46
+ "$value": "15.56"
47
+ },
48
+ "02": {
49
+ "$type": "dimension",
50
+ "$value": "13.82"
51
+ },
52
+ "03": {
53
+ "$type": "dimension",
54
+ "$value": "12.28"
55
+ },
56
+ "04": {
57
+ "$type": "dimension",
58
+ "$value": "10.92"
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
64
+ }
@@ -0,0 +1,202 @@
1
+ {
2
+ "icon": {
3
+ "color": {
4
+ "main": {
5
+ "base": {
6
+ "$type": "color",
7
+ "$value": "{color.read.main.base}"
8
+ },
9
+ "alternative": {
10
+ "$type": "color",
11
+ "$value": "{color.read.main.alternative}"
12
+ }
13
+ },
14
+ "contrast": {
15
+ "base": {
16
+ "$type": "color",
17
+ "$value": "{color.read.contrast.base}"
18
+ },
19
+ "alternative": {
20
+ "$type": "color",
21
+ "$value": "{color.read.contrast.alternative}"
22
+ }
23
+ }
24
+ },
25
+ "fontSize": {
26
+ "default": {
27
+ "$type": "number",
28
+ "$value": "{typography.fontSize.default}"
29
+ },
30
+ "up": {
31
+ "01": {
32
+ "$type": "number",
33
+ "$value": "{typography.fontSize.up.01}"
34
+ },
35
+ "02": {
36
+ "$type": "number",
37
+ "$value": "{typography.fontSize.up.02}"
38
+ },
39
+ "03": {
40
+ "$type": "number",
41
+ "$value": "{typography.fontSize.up.03}"
42
+ },
43
+ "04": {
44
+ "$type": "number",
45
+ "$value": "{typography.fontSize.up.04}"
46
+ },
47
+ "05": {
48
+ "$type": "number",
49
+ "$value": "{typography.fontSize.up.05}"
50
+ },
51
+ "06": {
52
+ "$type": "number",
53
+ "$value": "{typography.fontSize.up.06}"
54
+ },
55
+ "07": {
56
+ "$type": "number",
57
+ "$value": "{typography.fontSize.up.07}"
58
+ },
59
+ "08": {
60
+ "$type": "number",
61
+ "$value": "{typography.fontSize.up.08}"
62
+ }
63
+ },
64
+ "down": {
65
+ "01": {
66
+ "$type": "number",
67
+ "$value": "{typography.fontSize.down.01}"
68
+ },
69
+ "02": {
70
+ "$type": "number",
71
+ "$value": "{typography.fontSize.down.02}"
72
+ },
73
+ "03": {
74
+ "$type": "number",
75
+ "$value": "{typography.fontSize.down.03}"
76
+ },
77
+ "04": {
78
+ "$type": "number",
79
+ "$value": "{typography.fontSize.down.04}"
80
+ }
81
+ }
82
+ },
83
+ "size": {
84
+ "min": {
85
+ "default": {
86
+ "$type": "dimension",
87
+ "$value": "{icon.fontSize.default}"
88
+ },
89
+ "up": {
90
+ "01": {
91
+ "$type": "dimension",
92
+ "$value": "{icon.fontSize.up.01}"
93
+ },
94
+ "02": {
95
+ "$type": "dimension",
96
+ "$value": "{icon.fontSize.up.02}"
97
+ },
98
+ "03": {
99
+ "$type": "dimension",
100
+ "$value": "{icon.fontSize.up.03}"
101
+ },
102
+ "04": {
103
+ "$type": "dimension",
104
+ "$value": "{icon.fontSize.up.04}"
105
+ },
106
+ "05": {
107
+ "$type": "dimension",
108
+ "$value": "{icon.fontSize.up.05}"
109
+ },
110
+ "06": {
111
+ "$type": "dimension",
112
+ "$value": "{icon.fontSize.up.06}"
113
+ },
114
+ "07": {
115
+ "$type": "dimension",
116
+ "$value": "{icon.fontSize.up.07}"
117
+ },
118
+ "08": {
119
+ "$type": "dimension",
120
+ "$value": "{icon.fontSize.up.08}"
121
+ }
122
+ },
123
+ "down": {
124
+ "01": {
125
+ "$type": "dimension",
126
+ "$value": "{icon.fontSize.down.01}"
127
+ },
128
+ "02": {
129
+ "$type": "dimension",
130
+ "$value": "{icon.fontSize.down.02}"
131
+ },
132
+ "03": {
133
+ "$type": "dimension",
134
+ "$value": "{icon.fontSize.down.03}"
135
+ },
136
+ "04": {
137
+ "$type": "dimension",
138
+ "$value": "{icon.fontSize.down.04}"
139
+ }
140
+ }
141
+ },
142
+ "max": {
143
+ "default": {
144
+ "$type": "dimension",
145
+ "$value": "20"
146
+ },
147
+ "up": {
148
+ "01": {
149
+ "$type": "dimension",
150
+ "$value": "22.5"
151
+ },
152
+ "02": {
153
+ "$type": "dimension",
154
+ "$value": "25.32"
155
+ },
156
+ "03": {
157
+ "$type": "dimension",
158
+ "$value": "28.48"
159
+ },
160
+ "04": {
161
+ "$type": "dimension",
162
+ "$value": "32.04"
163
+ },
164
+ "05": {
165
+ "$type": "dimension",
166
+ "$value": "36.04"
167
+ },
168
+ "06": {
169
+ "$type": "dimension",
170
+ "$value": "40.54"
171
+ },
172
+ "07": {
173
+ "$type": "dimension",
174
+ "$value": "45.62"
175
+ },
176
+ "08": {
177
+ "$type": "dimension",
178
+ "$value": "51.32"
179
+ }
180
+ },
181
+ "down": {
182
+ "01": {
183
+ "$type": "dimension",
184
+ "$value": "17.78"
185
+ },
186
+ "02": {
187
+ "$type": "dimension",
188
+ "$value": "15.8"
189
+ },
190
+ "03": {
191
+ "$type": "dimension",
192
+ "$value": "14.04"
193
+ },
194
+ "04": {
195
+ "$type": "dimension",
196
+ "$value": "12.48"
197
+ }
198
+ }
199
+ }
200
+ }
201
+ }
202
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "Design Tokens DS",
3
+ "collections": {
4
+ "Component": {
5
+ "modes": {
6
+ "Base16": [
7
+ "text.json",
8
+ "icon.json"
9
+ ],
10
+ "Base14": [
11
+ "text.json",
12
+ "icon.json",
13
+ "base14.json"
14
+ ]
15
+ }
16
+ }
17
+ }
18
+ }
@@ -1,18 +1,28 @@
1
1
  {
2
2
  "text": {
3
3
  "color": {
4
- "$value": "{theme.read.main.base}",
5
- "$type": "color"
6
- },
7
- "fontFamily": {
8
- "$value": "{typography.fontFamily.sans}",
9
- "$type": "string"
10
- },
11
- "fontWeight": {
12
- "$value": "{typography.fontWeight.semiBold}",
13
- "$type": "string"
4
+ "main": {
5
+ "base": {
6
+ "$type": "color",
7
+ "$value": "{color.read.main.base}"
8
+ },
9
+ "alternative": {
10
+ "$type": "color",
11
+ "$value": "{color.read.main.alternative}"
12
+ }
13
+ },
14
+ "contrast": {
15
+ "base": {
16
+ "$type": "color",
17
+ "$value": "{color.read.contrast.base}"
18
+ },
19
+ "alternative": {
20
+ "$type": "color",
21
+ "$value": "{color.read.contrast.alternative}"
22
+ }
23
+ }
14
24
  },
15
- "size": {
25
+ "fontSize": {
16
26
  "label": {
17
27
  "small": {
18
28
  "$value": "{typography.fontSize.down.02}",