@digdir/designsystemet 0.1.0-next.22 → 0.1.0-next.24
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/dist/bin/designsystemet.js +41 -13
- package/dist/src/colors/index.js +2 -2
- package/dist/src/colors/{themeUtils.js → theme.js} +16 -13
- package/dist/src/colors/{colorUtils.js → utils.js} +20 -10
- package/dist/src/init/createTokensPackage.js +27 -4
- package/dist/src/init/generateMetadataJson.js +10 -5
- package/dist/src/init/generateThemesJson.js +56 -5
- package/dist/src/init/nextStepsMarkdown.js +2 -2
- package/dist/src/init/template/default-files/design-tokens/Figma/components.json +22 -0
- package/dist/src/init/template/default-files/design-tokens/primitives/globals.json +32 -68
- package/dist/src/init/template/default-files/design-tokens/primitives/size/default.json +175 -0
- package/dist/src/init/template/default-files/design-tokens/semantic/color.json +280 -270
- package/dist/src/init/template/default-files/design-tokens/semantic/style.json +307 -286
- package/dist/src/init/template/default-files/design-tokens/themes/theme.json +334 -0
- package/dist/src/init/template/template-files/design-tokens/primitives/modes/colors/contrast/theme-template.json +314 -0
- package/dist/src/init/template/template-files/design-tokens/primitives/modes/colors/dark/global.json +376 -0
- package/dist/src/init/template/template-files/design-tokens/primitives/modes/colors/dark/theme-template.json +314 -0
- package/dist/src/init/template/template-files/design-tokens/primitives/modes/colors/light/global.json +376 -0
- package/dist/src/init/template/template-files/design-tokens/primitives/modes/colors/light/theme-template.json +314 -0
- package/dist/src/init/template/template-files/design-tokens/primitives/modes/typography/primary/theme-template.json +30 -0
- package/dist/src/init/template/template-files/design-tokens/primitives/modes/typography/secondary/theme-template.json +30 -0
- package/dist/src/init/template/template-files/design-tokens/themes/theme-template.json +170 -150
- package/dist/src/init/template/template-files/package.json +1 -1
- package/dist/src/tokens/{formats → build/formats}/css.js +6 -8
- package/dist/src/tokens/{build.js → build/index.js} +2 -2
- package/dist/src/tokens/create/README.md +3 -0
- package/dist/src/tokens/create/index.js +153 -0
- package/dist/src/tokens/index.js +4 -0
- package/dist/types/src/colors/index.d.ts +2 -2
- package/dist/types/src/colors/index.d.ts.map +1 -1
- package/dist/types/src/colors/{themeUtils.d.ts → theme.d.ts} +10 -27
- package/dist/types/src/colors/theme.d.ts.map +1 -0
- package/dist/types/src/colors/types.d.ts +3 -2
- package/dist/types/src/colors/types.d.ts.map +1 -1
- package/dist/types/src/colors/{colorUtils.d.ts → utils.d.ts} +14 -8
- package/dist/types/src/colors/utils.d.ts.map +1 -0
- package/dist/types/src/init/createTokensPackage.d.ts.map +1 -1
- package/dist/types/src/init/generateMetadataJson.d.ts.map +1 -1
- package/dist/types/src/init/generateThemesJson.d.ts.map +1 -1
- package/dist/types/src/tokens/build/actions.d.ts.map +1 -0
- package/dist/types/src/tokens/build/configs.d.ts.map +1 -0
- package/dist/types/src/tokens/build/formats/css.d.ts.map +1 -0
- package/dist/types/src/tokens/build/formats/js-tokens.d.ts.map +1 -0
- package/dist/types/src/tokens/{build.d.ts → build/index.d.ts} +2 -2
- package/dist/types/src/tokens/build/index.d.ts.map +1 -0
- package/dist/types/src/tokens/build/transformers.d.ts.map +1 -0
- package/dist/types/src/tokens/build/utils/entryfile.d.ts.map +1 -0
- package/dist/types/src/tokens/build/utils/noCase.d.ts.map +1 -0
- package/dist/types/src/tokens/build/utils/permutateThemes.d.ts.map +1 -0
- package/dist/types/src/tokens/build/utils/utils.d.ts.map +1 -0
- package/dist/types/src/tokens/create/index.d.ts +64 -0
- package/dist/types/src/tokens/create/index.d.ts.map +1 -0
- package/dist/types/src/tokens/index.d.ts +2 -0
- package/dist/types/src/tokens/index.d.ts.map +1 -0
- package/package.json +7 -3
- package/dist/src/init/template/default-files/design-tokens/primitives/typography/default.json +0 -86
- package/dist/src/init/template/template-files/design-tokens/primitives/colors/contrast/theme-template.json +0 -314
- package/dist/src/init/template/template-files/design-tokens/primitives/colors/dark/global.json +0 -376
- package/dist/src/init/template/template-files/design-tokens/primitives/colors/dark/theme-template.json +0 -314
- package/dist/src/init/template/template-files/design-tokens/primitives/colors/light/global.json +0 -376
- package/dist/src/init/template/template-files/design-tokens/primitives/colors/light/theme-template.json +0 -314
- package/dist/types/src/colors/colorUtils.d.ts.map +0 -1
- package/dist/types/src/colors/themeUtils.d.ts.map +0 -1
- package/dist/types/src/tokens/actions.d.ts.map +0 -1
- package/dist/types/src/tokens/build.d.ts.map +0 -1
- package/dist/types/src/tokens/configs.d.ts.map +0 -1
- package/dist/types/src/tokens/formats/css.d.ts.map +0 -1
- package/dist/types/src/tokens/formats/js-tokens.d.ts.map +0 -1
- package/dist/types/src/tokens/transformers.d.ts.map +0 -1
- package/dist/types/src/tokens/utils/entryfile.d.ts.map +0 -1
- package/dist/types/src/tokens/utils/noCase.d.ts.map +0 -1
- package/dist/types/src/tokens/utils/permutateThemes.d.ts.map +0 -1
- package/dist/types/src/tokens/utils/utils.d.ts.map +0 -1
- /package/dist/src/init/template/template-files/design-tokens/primitives/{colors → modes/colors}/contrast/global.json +0 -0
- /package/dist/src/tokens/{actions.js → build/actions.js} +0 -0
- /package/dist/src/tokens/{configs.js → build/configs.js} +0 -0
- /package/dist/src/tokens/{formats → build/formats}/js-tokens.js +0 -0
- /package/dist/src/tokens/{transformers.js → build/transformers.js} +0 -0
- /package/dist/src/tokens/{utils → build/utils}/entryfile.js +0 -0
- /package/dist/src/tokens/{utils → build/utils}/noCase.js +0 -0
- /package/dist/src/tokens/{utils → build/utils}/permutateThemes.js +0 -0
- /package/dist/src/tokens/{utils → build/utils}/utils.js +0 -0
- /package/dist/types/src/tokens/{actions.d.ts → build/actions.d.ts} +0 -0
- /package/dist/types/src/tokens/{configs.d.ts → build/configs.d.ts} +0 -0
- /package/dist/types/src/tokens/{formats → build/formats}/css.d.ts +0 -0
- /package/dist/types/src/tokens/{formats → build/formats}/js-tokens.d.ts +0 -0
- /package/dist/types/src/tokens/{transformers.d.ts → build/transformers.d.ts} +0 -0
- /package/dist/types/src/tokens/{utils → build/utils}/entryfile.d.ts +0 -0
- /package/dist/types/src/tokens/{utils → build/utils}/noCase.d.ts +0 -0
- /package/dist/types/src/tokens/{utils → build/utils}/permutateThemes.d.ts +0 -0
- /package/dist/types/src/tokens/{utils → build/utils}/utils.d.ts +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"<theme>": {
|
|
3
|
+
"main": {
|
|
4
|
+
"$type": "fontFamilies",
|
|
5
|
+
"$value": "IBM Plex Mono"
|
|
6
|
+
},
|
|
7
|
+
"bold": {
|
|
8
|
+
"$extensions": {
|
|
9
|
+
"studio.tokens": {
|
|
10
|
+
"modify": {}
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"$type": "fontWeights",
|
|
14
|
+
"$value": "Medium"
|
|
15
|
+
},
|
|
16
|
+
"extra-bold": {
|
|
17
|
+
"$extensions": {
|
|
18
|
+
"studio.tokens": {
|
|
19
|
+
"modify": {}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"$type": "fontWeights",
|
|
23
|
+
"$value": "SemiBold"
|
|
24
|
+
},
|
|
25
|
+
"regular": {
|
|
26
|
+
"$type": "fontWeights",
|
|
27
|
+
"$value": "Regular"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -2,313 +2,333 @@
|
|
|
2
2
|
"color": {
|
|
3
3
|
"accent": {
|
|
4
4
|
"1": {
|
|
5
|
-
"type": "color",
|
|
6
|
-
"value": "{<theme>.accent.1}"
|
|
5
|
+
"$type": "color",
|
|
6
|
+
"$value": "{<theme>.accent.1}"
|
|
7
7
|
},
|
|
8
8
|
"2": {
|
|
9
|
-
"type": "color",
|
|
10
|
-
"value": "{<theme>.accent.2}"
|
|
9
|
+
"$type": "color",
|
|
10
|
+
"$value": "{<theme>.accent.2}"
|
|
11
11
|
},
|
|
12
12
|
"3": {
|
|
13
|
-
"type": "color",
|
|
14
|
-
"value": "{<theme>.accent.3}"
|
|
13
|
+
"$type": "color",
|
|
14
|
+
"$value": "{<theme>.accent.3}"
|
|
15
15
|
},
|
|
16
16
|
"4": {
|
|
17
|
-
"type": "color",
|
|
18
|
-
"value": "{<theme>.accent.4}"
|
|
17
|
+
"$type": "color",
|
|
18
|
+
"$value": "{<theme>.accent.4}"
|
|
19
19
|
},
|
|
20
20
|
"5": {
|
|
21
|
-
"type": "color",
|
|
22
|
-
"value": "{<theme>.accent.5}"
|
|
21
|
+
"$type": "color",
|
|
22
|
+
"$value": "{<theme>.accent.5}"
|
|
23
23
|
},
|
|
24
24
|
"6": {
|
|
25
|
-
"type": "color",
|
|
26
|
-
"value": "{<theme>.accent.6}"
|
|
25
|
+
"$type": "color",
|
|
26
|
+
"$value": "{<theme>.accent.6}"
|
|
27
27
|
},
|
|
28
28
|
"7": {
|
|
29
|
-
"type": "color",
|
|
30
|
-
"value": "{<theme>.accent.7}"
|
|
29
|
+
"$type": "color",
|
|
30
|
+
"$value": "{<theme>.accent.7}"
|
|
31
31
|
},
|
|
32
32
|
"8": {
|
|
33
|
-
"type": "color",
|
|
34
|
-
"value": "{<theme>.accent.8}"
|
|
33
|
+
"$type": "color",
|
|
34
|
+
"$value": "{<theme>.accent.8}"
|
|
35
35
|
},
|
|
36
36
|
"9": {
|
|
37
|
-
"type": "color",
|
|
38
|
-
"value": "{<theme>.accent.9}"
|
|
37
|
+
"$type": "color",
|
|
38
|
+
"$value": "{<theme>.accent.9}"
|
|
39
39
|
},
|
|
40
40
|
"10": {
|
|
41
|
-
"type": "color",
|
|
42
|
-
"value": "{<theme>.accent.10}"
|
|
41
|
+
"$type": "color",
|
|
42
|
+
"$value": "{<theme>.accent.10}"
|
|
43
43
|
},
|
|
44
44
|
"11": {
|
|
45
|
-
"type": "color",
|
|
46
|
-
"value": "{<theme>.accent.11}"
|
|
45
|
+
"$type": "color",
|
|
46
|
+
"$value": "{<theme>.accent.11}"
|
|
47
47
|
},
|
|
48
48
|
"12": {
|
|
49
|
-
"type": "color",
|
|
50
|
-
"value": "{<theme>.accent.12}"
|
|
49
|
+
"$type": "color",
|
|
50
|
+
"$value": "{<theme>.accent.12}"
|
|
51
51
|
},
|
|
52
52
|
"13": {
|
|
53
|
-
"type": "color",
|
|
54
|
-
"value": "{<theme>.accent.13}"
|
|
53
|
+
"$type": "color",
|
|
54
|
+
"$value": "{<theme>.accent.13}"
|
|
55
55
|
},
|
|
56
56
|
"contrast-1": {
|
|
57
|
-
"type": "color",
|
|
58
|
-
"value": "{<theme>.accent.contrast-1}"
|
|
57
|
+
"$type": "color",
|
|
58
|
+
"$value": "{<theme>.accent.contrast-1}"
|
|
59
59
|
},
|
|
60
60
|
"contrast-2": {
|
|
61
|
-
"type": "color",
|
|
62
|
-
"value": "{<theme>.accent.contrast-2}"
|
|
61
|
+
"$type": "color",
|
|
62
|
+
"$value": "{<theme>.accent.contrast-2}"
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
"neutral": {
|
|
66
66
|
"1": {
|
|
67
|
-
"type": "color",
|
|
68
|
-
"value": "{<theme>.neutral.1}"
|
|
67
|
+
"$type": "color",
|
|
68
|
+
"$value": "{<theme>.neutral.1}"
|
|
69
69
|
},
|
|
70
70
|
"2": {
|
|
71
|
-
"type": "color",
|
|
72
|
-
"value": "{<theme>.neutral.2}"
|
|
71
|
+
"$type": "color",
|
|
72
|
+
"$value": "{<theme>.neutral.2}"
|
|
73
73
|
},
|
|
74
74
|
"3": {
|
|
75
|
-
"type": "color",
|
|
76
|
-
"value": "{<theme>.neutral.3}"
|
|
75
|
+
"$type": "color",
|
|
76
|
+
"$value": "{<theme>.neutral.3}"
|
|
77
77
|
},
|
|
78
78
|
"4": {
|
|
79
|
-
"type": "color",
|
|
80
|
-
"value": "{<theme>.neutral.4}"
|
|
79
|
+
"$type": "color",
|
|
80
|
+
"$value": "{<theme>.neutral.4}"
|
|
81
81
|
},
|
|
82
82
|
"5": {
|
|
83
|
-
"type": "color",
|
|
84
|
-
"value": "{<theme>.neutral.5}"
|
|
83
|
+
"$type": "color",
|
|
84
|
+
"$value": "{<theme>.neutral.5}"
|
|
85
85
|
},
|
|
86
86
|
"6": {
|
|
87
|
-
"type": "color",
|
|
88
|
-
"value": "{<theme>.neutral.6}"
|
|
87
|
+
"$type": "color",
|
|
88
|
+
"$value": "{<theme>.neutral.6}"
|
|
89
89
|
},
|
|
90
90
|
"7": {
|
|
91
|
-
"type": "color",
|
|
92
|
-
"value": "{<theme>.neutral.7}"
|
|
91
|
+
"$type": "color",
|
|
92
|
+
"$value": "{<theme>.neutral.7}"
|
|
93
93
|
},
|
|
94
94
|
"8": {
|
|
95
|
-
"type": "color",
|
|
96
|
-
"value": "{<theme>.neutral.8}"
|
|
95
|
+
"$type": "color",
|
|
96
|
+
"$value": "{<theme>.neutral.8}"
|
|
97
97
|
},
|
|
98
98
|
"9": {
|
|
99
|
-
"type": "color",
|
|
100
|
-
"value": "{<theme>.neutral.9}"
|
|
99
|
+
"$type": "color",
|
|
100
|
+
"$value": "{<theme>.neutral.9}"
|
|
101
101
|
},
|
|
102
102
|
"10": {
|
|
103
|
-
"type": "color",
|
|
104
|
-
"value": "{<theme>.neutral.10}"
|
|
103
|
+
"$type": "color",
|
|
104
|
+
"$value": "{<theme>.neutral.10}"
|
|
105
105
|
},
|
|
106
106
|
"11": {
|
|
107
|
-
"type": "color",
|
|
108
|
-
"value": "{<theme>.neutral.11}"
|
|
107
|
+
"$type": "color",
|
|
108
|
+
"$value": "{<theme>.neutral.11}"
|
|
109
109
|
},
|
|
110
110
|
"12": {
|
|
111
|
-
"type": "color",
|
|
112
|
-
"value": "{<theme>.neutral.12}"
|
|
111
|
+
"$type": "color",
|
|
112
|
+
"$value": "{<theme>.neutral.12}"
|
|
113
113
|
},
|
|
114
114
|
"13": {
|
|
115
|
-
"type": "color",
|
|
116
|
-
"value": "{<theme>.neutral.13}"
|
|
115
|
+
"$type": "color",
|
|
116
|
+
"$value": "{<theme>.neutral.13}"
|
|
117
117
|
},
|
|
118
118
|
"contrast-1": {
|
|
119
|
-
"type": "color",
|
|
120
|
-
"value": "{<theme>.neutral.contrast-1}"
|
|
119
|
+
"$type": "color",
|
|
120
|
+
"$value": "{<theme>.neutral.contrast-1}"
|
|
121
121
|
},
|
|
122
122
|
"contrast-2": {
|
|
123
|
-
"type": "color",
|
|
124
|
-
"value": "{<theme>.neutral.contrast-2}"
|
|
123
|
+
"$type": "color",
|
|
124
|
+
"$value": "{<theme>.neutral.contrast-2}"
|
|
125
125
|
}
|
|
126
126
|
},
|
|
127
127
|
"brand1": {
|
|
128
128
|
"1": {
|
|
129
|
-
"type": "color",
|
|
130
|
-
"value": "{<theme>.brand1.1}"
|
|
129
|
+
"$type": "color",
|
|
130
|
+
"$value": "{<theme>.brand1.1}"
|
|
131
131
|
},
|
|
132
132
|
"2": {
|
|
133
|
-
"type": "color",
|
|
134
|
-
"value": "{<theme>.brand1.2}"
|
|
133
|
+
"$type": "color",
|
|
134
|
+
"$value": "{<theme>.brand1.2}"
|
|
135
135
|
},
|
|
136
136
|
"3": {
|
|
137
|
-
"type": "color",
|
|
138
|
-
"value": "{<theme>.brand1.3}"
|
|
137
|
+
"$type": "color",
|
|
138
|
+
"$value": "{<theme>.brand1.3}"
|
|
139
139
|
},
|
|
140
140
|
"4": {
|
|
141
|
-
"type": "color",
|
|
142
|
-
"value": "{<theme>.brand1.4}"
|
|
141
|
+
"$type": "color",
|
|
142
|
+
"$value": "{<theme>.brand1.4}"
|
|
143
143
|
},
|
|
144
144
|
"5": {
|
|
145
|
-
"type": "color",
|
|
146
|
-
"value": "{<theme>.brand1.5}"
|
|
145
|
+
"$type": "color",
|
|
146
|
+
"$value": "{<theme>.brand1.5}"
|
|
147
147
|
},
|
|
148
148
|
"6": {
|
|
149
|
-
"type": "color",
|
|
150
|
-
"value": "{<theme>.brand1.6}"
|
|
149
|
+
"$type": "color",
|
|
150
|
+
"$value": "{<theme>.brand1.6}"
|
|
151
151
|
},
|
|
152
152
|
"7": {
|
|
153
|
-
"type": "color",
|
|
154
|
-
"value": "{<theme>.brand1.7}"
|
|
153
|
+
"$type": "color",
|
|
154
|
+
"$value": "{<theme>.brand1.7}"
|
|
155
155
|
},
|
|
156
156
|
"8": {
|
|
157
|
-
"type": "color",
|
|
158
|
-
"value": "{<theme>.brand1.8}"
|
|
157
|
+
"$type": "color",
|
|
158
|
+
"$value": "{<theme>.brand1.8}"
|
|
159
159
|
},
|
|
160
160
|
"9": {
|
|
161
|
-
"type": "color",
|
|
162
|
-
"value": "{<theme>.brand1.9}"
|
|
161
|
+
"$type": "color",
|
|
162
|
+
"$value": "{<theme>.brand1.9}"
|
|
163
163
|
},
|
|
164
164
|
"10": {
|
|
165
|
-
"type": "color",
|
|
166
|
-
"value": "{<theme>.brand1.10}"
|
|
165
|
+
"$type": "color",
|
|
166
|
+
"$value": "{<theme>.brand1.10}"
|
|
167
167
|
},
|
|
168
168
|
"11": {
|
|
169
|
-
"type": "color",
|
|
170
|
-
"value": "{<theme>.brand1.11}"
|
|
169
|
+
"$type": "color",
|
|
170
|
+
"$value": "{<theme>.brand1.11}"
|
|
171
171
|
},
|
|
172
172
|
"12": {
|
|
173
|
-
"type": "color",
|
|
174
|
-
"value": "{<theme>.brand1.12}"
|
|
173
|
+
"$type": "color",
|
|
174
|
+
"$value": "{<theme>.brand1.12}"
|
|
175
175
|
},
|
|
176
176
|
"13": {
|
|
177
|
-
"type": "color",
|
|
178
|
-
"value": "{<theme>.brand1.13}"
|
|
177
|
+
"$type": "color",
|
|
178
|
+
"$value": "{<theme>.brand1.13}"
|
|
179
179
|
},
|
|
180
180
|
"contrast-1": {
|
|
181
|
-
"type": "color",
|
|
182
|
-
"value": "{<theme>.brand1.contrast-1}"
|
|
181
|
+
"$type": "color",
|
|
182
|
+
"$value": "{<theme>.brand1.contrast-1}"
|
|
183
183
|
},
|
|
184
184
|
"contrast-2": {
|
|
185
|
-
"type": "color",
|
|
186
|
-
"value": "{<theme>.brand1.contrast-2}"
|
|
185
|
+
"$type": "color",
|
|
186
|
+
"$value": "{<theme>.brand1.contrast-2}"
|
|
187
187
|
}
|
|
188
188
|
},
|
|
189
189
|
"brand2": {
|
|
190
190
|
"1": {
|
|
191
|
-
"type": "color",
|
|
192
|
-
"value": "{<theme>.brand2.1}"
|
|
191
|
+
"$type": "color",
|
|
192
|
+
"$value": "{<theme>.brand2.1}"
|
|
193
193
|
},
|
|
194
194
|
"2": {
|
|
195
|
-
"type": "color",
|
|
196
|
-
"value": "{<theme>.brand2.2}"
|
|
195
|
+
"$type": "color",
|
|
196
|
+
"$value": "{<theme>.brand2.2}"
|
|
197
197
|
},
|
|
198
198
|
"3": {
|
|
199
|
-
"type": "color",
|
|
200
|
-
"value": "{<theme>.brand2.3}"
|
|
199
|
+
"$type": "color",
|
|
200
|
+
"$value": "{<theme>.brand2.3}"
|
|
201
201
|
},
|
|
202
202
|
"4": {
|
|
203
|
-
"type": "color",
|
|
204
|
-
"value": "{<theme>.brand2.4}"
|
|
203
|
+
"$type": "color",
|
|
204
|
+
"$value": "{<theme>.brand2.4}"
|
|
205
205
|
},
|
|
206
206
|
"5": {
|
|
207
|
-
"type": "color",
|
|
208
|
-
"value": "{<theme>.brand2.5}"
|
|
207
|
+
"$type": "color",
|
|
208
|
+
"$value": "{<theme>.brand2.5}"
|
|
209
209
|
},
|
|
210
210
|
"6": {
|
|
211
|
-
"type": "color",
|
|
212
|
-
"value": "{<theme>.brand2.6}"
|
|
211
|
+
"$type": "color",
|
|
212
|
+
"$value": "{<theme>.brand2.6}"
|
|
213
213
|
},
|
|
214
214
|
"7": {
|
|
215
|
-
"type": "color",
|
|
216
|
-
"value": "{<theme>.brand2.7}"
|
|
215
|
+
"$type": "color",
|
|
216
|
+
"$value": "{<theme>.brand2.7}"
|
|
217
217
|
},
|
|
218
218
|
"8": {
|
|
219
|
-
"type": "color",
|
|
220
|
-
"value": "{<theme>.brand2.8}"
|
|
219
|
+
"$type": "color",
|
|
220
|
+
"$value": "{<theme>.brand2.8}"
|
|
221
221
|
},
|
|
222
222
|
"9": {
|
|
223
|
-
"type": "color",
|
|
224
|
-
"value": "{<theme>.brand2.9}"
|
|
223
|
+
"$type": "color",
|
|
224
|
+
"$value": "{<theme>.brand2.9}"
|
|
225
225
|
},
|
|
226
226
|
"10": {
|
|
227
|
-
"type": "color",
|
|
228
|
-
"value": "{<theme>.brand2.10}"
|
|
227
|
+
"$type": "color",
|
|
228
|
+
"$value": "{<theme>.brand2.10}"
|
|
229
229
|
},
|
|
230
230
|
"11": {
|
|
231
|
-
"type": "color",
|
|
232
|
-
"value": "{<theme>.brand2.11}"
|
|
231
|
+
"$type": "color",
|
|
232
|
+
"$value": "{<theme>.brand2.11}"
|
|
233
233
|
},
|
|
234
234
|
"12": {
|
|
235
|
-
"type": "color",
|
|
236
|
-
"value": "{<theme>.brand2.12}"
|
|
235
|
+
"$type": "color",
|
|
236
|
+
"$value": "{<theme>.brand2.12}"
|
|
237
237
|
},
|
|
238
238
|
"13": {
|
|
239
|
-
"type": "color",
|
|
240
|
-
"value": "{<theme>.brand2.13}"
|
|
239
|
+
"$type": "color",
|
|
240
|
+
"$value": "{<theme>.brand2.13}"
|
|
241
241
|
},
|
|
242
242
|
"contrast-1": {
|
|
243
|
-
"type": "color",
|
|
244
|
-
"value": "{<theme>.brand2.contrast-1}"
|
|
243
|
+
"$type": "color",
|
|
244
|
+
"$value": "{<theme>.brand2.contrast-1}"
|
|
245
245
|
},
|
|
246
246
|
"contrast-2": {
|
|
247
|
-
"type": "color",
|
|
248
|
-
"value": "{<theme>.brand2.contrast-2}"
|
|
247
|
+
"$type": "color",
|
|
248
|
+
"$value": "{<theme>.brand2.contrast-2}"
|
|
249
249
|
}
|
|
250
250
|
},
|
|
251
251
|
"brand3": {
|
|
252
252
|
"1": {
|
|
253
|
-
"type": "color",
|
|
254
|
-
"value": "{<theme>.brand3.1}"
|
|
253
|
+
"$type": "color",
|
|
254
|
+
"$value": "{<theme>.brand3.1}"
|
|
255
255
|
},
|
|
256
256
|
"2": {
|
|
257
|
-
"type": "color",
|
|
258
|
-
"value": "{<theme>.brand3.2}"
|
|
257
|
+
"$type": "color",
|
|
258
|
+
"$value": "{<theme>.brand3.2}"
|
|
259
259
|
},
|
|
260
260
|
"3": {
|
|
261
|
-
"type": "color",
|
|
262
|
-
"value": "{<theme>.brand3.3}"
|
|
261
|
+
"$type": "color",
|
|
262
|
+
"$value": "{<theme>.brand3.3}"
|
|
263
263
|
},
|
|
264
264
|
"4": {
|
|
265
|
-
"type": "color",
|
|
266
|
-
"value": "{<theme>.brand3.4}"
|
|
265
|
+
"$type": "color",
|
|
266
|
+
"$value": "{<theme>.brand3.4}"
|
|
267
267
|
},
|
|
268
268
|
"5": {
|
|
269
|
-
"type": "color",
|
|
270
|
-
"value": "{<theme>.brand3.5}"
|
|
269
|
+
"$type": "color",
|
|
270
|
+
"$value": "{<theme>.brand3.5}"
|
|
271
271
|
},
|
|
272
272
|
"6": {
|
|
273
|
-
"type": "color",
|
|
274
|
-
"value": "{<theme>.brand3.6}"
|
|
273
|
+
"$type": "color",
|
|
274
|
+
"$value": "{<theme>.brand3.6}"
|
|
275
275
|
},
|
|
276
276
|
"7": {
|
|
277
|
-
"type": "color",
|
|
278
|
-
"value": "{<theme>.brand3.7}"
|
|
277
|
+
"$type": "color",
|
|
278
|
+
"$value": "{<theme>.brand3.7}"
|
|
279
279
|
},
|
|
280
280
|
"8": {
|
|
281
|
-
"type": "color",
|
|
282
|
-
"value": "{<theme>.brand3.8}"
|
|
281
|
+
"$type": "color",
|
|
282
|
+
"$value": "{<theme>.brand3.8}"
|
|
283
283
|
},
|
|
284
284
|
"9": {
|
|
285
|
-
"type": "color",
|
|
286
|
-
"value": "{<theme>.brand3.9}"
|
|
285
|
+
"$type": "color",
|
|
286
|
+
"$value": "{<theme>.brand3.9}"
|
|
287
287
|
},
|
|
288
288
|
"10": {
|
|
289
|
-
"type": "color",
|
|
290
|
-
"value": "{<theme>.brand3.10}"
|
|
289
|
+
"$type": "color",
|
|
290
|
+
"$value": "{<theme>.brand3.10}"
|
|
291
291
|
},
|
|
292
292
|
"11": {
|
|
293
|
-
"type": "color",
|
|
294
|
-
"value": "{<theme>.brand3.11}"
|
|
293
|
+
"$type": "color",
|
|
294
|
+
"$value": "{<theme>.brand3.11}"
|
|
295
295
|
},
|
|
296
296
|
"12": {
|
|
297
|
-
"type": "color",
|
|
298
|
-
"value": "{<theme>.brand3.12}"
|
|
297
|
+
"$type": "color",
|
|
298
|
+
"$value": "{<theme>.brand3.12}"
|
|
299
299
|
},
|
|
300
300
|
"13": {
|
|
301
|
-
"type": "color",
|
|
302
|
-
"value": "{<theme>.brand3.13}"
|
|
301
|
+
"$type": "color",
|
|
302
|
+
"$value": "{<theme>.brand3.13}"
|
|
303
303
|
},
|
|
304
304
|
"contrast-1": {
|
|
305
|
-
"type": "color",
|
|
306
|
-
"value": "{<theme>.brand3.contrast-1}"
|
|
305
|
+
"$type": "color",
|
|
306
|
+
"$value": "{<theme>.brand3.contrast-1}"
|
|
307
307
|
},
|
|
308
308
|
"contrast-2": {
|
|
309
|
-
"type": "color",
|
|
310
|
-
"value": "{<theme>.brand3.contrast-2}"
|
|
309
|
+
"$type": "color",
|
|
310
|
+
"$value": "{<theme>.brand3.contrast-2}"
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
|
+
},
|
|
314
|
+
"font": {
|
|
315
|
+
"family": {
|
|
316
|
+
"$type": "fontFamilies",
|
|
317
|
+
"$value": "{<theme>.main}"
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
"font-weight": {
|
|
321
|
+
"medium": {
|
|
322
|
+
"$type": "fontWeights",
|
|
323
|
+
"$value": "{<theme>.bold}"
|
|
324
|
+
},
|
|
325
|
+
"semibold": {
|
|
326
|
+
"$type": "fontWeights",
|
|
327
|
+
"$value": "{<theme>.extra-bold}"
|
|
328
|
+
},
|
|
329
|
+
"regular": {
|
|
330
|
+
"$type": "fontWeights",
|
|
331
|
+
"$value": "{<theme>.regular}"
|
|
332
|
+
}
|
|
313
333
|
}
|
|
314
334
|
}
|
|
@@ -117,22 +117,20 @@ const typography = {
|
|
|
117
117
|
.${classSelector(token)} {
|
|
118
118
|
font-weight: ${getValue(token)};
|
|
119
119
|
}`;
|
|
120
|
-
return {
|
|
121
|
-
...acc,
|
|
120
|
+
return Object.assign(acc, {
|
|
122
121
|
variables: [...acc.variables, format(token)],
|
|
123
122
|
classes: [...acc.classes, className]
|
|
124
|
-
};
|
|
123
|
+
});
|
|
125
124
|
}
|
|
126
125
|
if (typeEquals("lineheight", token)) {
|
|
127
126
|
const className = `
|
|
128
127
|
.${classSelector(token)} {
|
|
129
128
|
line-height: ${getValue(token)};
|
|
130
129
|
}`;
|
|
131
|
-
return {
|
|
132
|
-
...acc,
|
|
130
|
+
return Object.assign(acc, {
|
|
133
131
|
variables: [...acc.variables, format(token)],
|
|
134
132
|
classes: [...acc.classes, className]
|
|
135
|
-
};
|
|
133
|
+
});
|
|
136
134
|
}
|
|
137
135
|
if (typeEquals("typography", token)) {
|
|
138
136
|
let references = [];
|
|
@@ -157,9 +155,9 @@ const typography = {
|
|
|
157
155
|
${fontWeightVar ? `font-weight: ${fontWeightVar};` : ""}
|
|
158
156
|
${letterSpacingVar ? `letter-spacing: ${letterSpacingVar};` : ""}
|
|
159
157
|
}`;
|
|
160
|
-
return
|
|
158
|
+
return Object.assign(acc, { classes: [className, ...acc.classes] });
|
|
161
159
|
}
|
|
162
|
-
return
|
|
160
|
+
return Object.assign(acc, { variables: [...acc.variables, format(token)] });
|
|
163
161
|
},
|
|
164
162
|
{ variables: [], classes: [] }
|
|
165
163
|
)
|
|
@@ -7,7 +7,7 @@ import * as configs from "./configs.js";
|
|
|
7
7
|
import { makeEntryFile } from "./utils/entryfile.js";
|
|
8
8
|
const { permutateThemes, getConfigs } = configs;
|
|
9
9
|
const sd = new StyleDictionary();
|
|
10
|
-
async function
|
|
10
|
+
async function buildTokens(options) {
|
|
11
11
|
const tokensDir = options.tokens;
|
|
12
12
|
const storefrontOutDir = path.resolve("../../apps/storefront/tokens");
|
|
13
13
|
const outPath = path.resolve(options.out);
|
|
@@ -81,5 +81,5 @@ async function run(options) {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
export {
|
|
84
|
-
|
|
84
|
+
buildTokens
|
|
85
85
|
};
|