Skip to content

Commit ee2d0bf

Browse files
committed
Test new color tokens
1 parent 84d26d5 commit ee2d0bf

16 files changed

Lines changed: 2739 additions & 557 deletions

packages/tokens/__tests__/__snapshots__/tokens.spec.ts.snap

Lines changed: 350 additions & 218 deletions
Large diffs are not rendered by default.

packages/tokens/__tests__/tokens.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ describe('Tokens', () => {
4040
const config = css('default');
4141
config.source = [
4242
path.resolve(__dirname, '../tokens/color-primitives.default.json'),
43+
path.resolve(__dirname, '../tokens/color-primitives-map.json'),
4344
path.resolve(__dirname, '../tokens/*.default.json'),
4445
];
4546

@@ -53,6 +54,7 @@ describe('Tokens', () => {
5354
const config = css('dark');
5455
config.source = [
5556
path.resolve(__dirname, '../tokens/color-primitives.default.json'),
57+
path.resolve(__dirname, '../tokens/color-primitives-map.json'),
5658
path.resolve(__dirname, '../tokens/*.dark.json'),
5759
];
5860

Lines changed: 282 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,282 @@
1+
{
2+
"color": {
3+
"$type": "color",
4+
"bg": {
5+
"feedback": {
6+
"error": {
7+
"$value": "{color.red.900}"
8+
},
9+
"info": {
10+
"$value": "{color.blue.900}"
11+
},
12+
"success": {
13+
"$value": "{color.green.900}"
14+
},
15+
"warning": {
16+
"$value": "{color.brand.orange.dark}"
17+
}
18+
},
19+
"interactive": {
20+
"primary": {
21+
"base": {
22+
"$value": "{color.blue.600}"
23+
},
24+
"active": {
25+
"$value": "{color.blue.600}"
26+
},
27+
"focus": {
28+
"$value": "{color.blue.500}"
29+
},
30+
"hover": {
31+
"$value": "{color.blue.500}"
32+
}
33+
},
34+
"secondary": {
35+
"focus": {
36+
"$value": "{color.gray.800}"
37+
},
38+
"hover": {
39+
"$value": "{color.gray.800}"
40+
}
41+
},
42+
"tertiary": {
43+
"focus": {
44+
"$value": "{color.gray.800}"
45+
},
46+
"hover": {
47+
"$value": "{color.gray.800}"
48+
}
49+
},
50+
"destructive": {
51+
"base": {
52+
"$value": "{color.red.600}"
53+
},
54+
"active": {
55+
"$value": "{color.red.600}"
56+
},
57+
"focus": {
58+
"$value": "{color.red.500}"
59+
},
60+
"hover": {
61+
"$value": "{color.red.500}"
62+
}
63+
},
64+
"disabled": {
65+
"$value": "{color.gray.800}"
66+
},
67+
"link": {
68+
"$value": "#4761FF33"
69+
},
70+
"selected": {
71+
"$value": "{color.blue.950}"
72+
}
73+
},
74+
"ui": {
75+
"primary": {
76+
"$value": "{color.gray.950}"
77+
},
78+
"secondary": {
79+
"$value": "{color.gray.900}"
80+
},
81+
"tertiary": {
82+
"$value": "{color.gray.800}"
83+
}
84+
},
85+
"overlay": {
86+
"secondary": {
87+
"$value": "{color.bg.ui.secondary}"
88+
}
89+
},
90+
"field": {
91+
"base": {
92+
"$value": "{color.bg.ui.secondary}"
93+
}
94+
},
95+
"product": {
96+
"beta": {
97+
"$value": "{color.purple.900}"
98+
},
99+
"federal": {
100+
"$value": "{color.brand.yellow.dark}"
101+
}
102+
}
103+
},
104+
"border": {
105+
"feedback": {
106+
"error": {
107+
"$value": "{color.red.400}"
108+
},
109+
"info": {
110+
"$value": "{color.blue.400}"
111+
},
112+
"success": {
113+
"$value": "{color.green.400}"
114+
}
115+
},
116+
"field": {
117+
"active": {
118+
"$value": "{color.blue.400}"
119+
},
120+
"focus": {
121+
"$value": "{color.blue.400}"
122+
}
123+
},
124+
"interactive": {
125+
"focus": {
126+
"$value": "{color.blue.400}"
127+
},
128+
"selected": {
129+
"$value": "{color.blue.400}"
130+
}
131+
},
132+
"ui": {
133+
"primary": {
134+
"$value": "{color.gray.700}"
135+
},
136+
"secondary": {
137+
"$value": "{color.gray.800}"
138+
}
139+
}
140+
},
141+
"fill": {
142+
"ui": {
143+
"primary": {
144+
"$value": "{color.gray.200}"
145+
}
146+
},
147+
"field": {
148+
"base": {
149+
"$value": "{color.gray.400}"
150+
}
151+
}
152+
},
153+
"shadow": {
154+
"interactive": {
155+
"focus": {
156+
"$value": "{color.blue.400}"
157+
},
158+
"primary": {
159+
"$value": "{color.gray.950}"
160+
}
161+
},
162+
"ui": {
163+
"primary": {
164+
"$value": "{color.black.200}"
165+
},
166+
"secondary": {
167+
"$value": "{color.black.100}"
168+
}
169+
}
170+
},
171+
"text": {
172+
"feedback": {
173+
"error": {
174+
"$value": "{color.red.400}"
175+
},
176+
"success": {
177+
"$value": "{color.green.400}"
178+
},
179+
"info": {
180+
"$value": "{color.blue.400}"
181+
},
182+
"warning": {
183+
"$value": "{color.brand.orange.light}"
184+
}
185+
},
186+
"interactive": {
187+
"base": {
188+
"$value": "{color.blue.400}"
189+
},
190+
"active": {
191+
"$value": "{color.purple.400}"
192+
},
193+
"secondary": {
194+
"$value": "{color.gray.400}"
195+
},
196+
"disabled": {
197+
"$value": "{color.gray.600}"
198+
},
199+
"selected": {
200+
"$value": "{color.blue.100}"
201+
}
202+
},
203+
"ui": {
204+
"primary": {
205+
"base": {
206+
"$value": "{color.gray.0}"
207+
},
208+
"inverted": {
209+
"$value": "{color.gray.950}"
210+
}
211+
},
212+
"secondary": {
213+
"$value": "{color.gray.400}"
214+
}
215+
},
216+
"field": {
217+
"placeholder": {
218+
"$value": "{color.gray.400}"
219+
}
220+
},
221+
"product": {
222+
"beta": {
223+
"$value": "{color.purple.400}"
224+
}
225+
},
226+
"code": {
227+
"function": {
228+
"$value": "{color.brand.purple.base}"
229+
},
230+
"tag": {
231+
"$value": "{color.brand.orange.base}"
232+
},
233+
"string": {
234+
"$value": "{color.brand.cyan.light}"
235+
},
236+
"base": {
237+
"$value": "{color.gray.200}"
238+
},
239+
"keyword": {
240+
"$value": "{color.brand.pink.light}"
241+
},
242+
"title": {
243+
"$value": "{color.brand.orange.light}"
244+
},
245+
"number": {
246+
"$value": "{color.brand.blue.light}"
247+
}
248+
}
249+
},
250+
"data": {
251+
"info": {
252+
"$value": "#996DD8"
253+
},
254+
"comparison": {
255+
"$value": "#60656A"
256+
},
257+
"neutral": {
258+
"$value": "#A8ADB3"
259+
},
260+
"positive": {
261+
"$value": "#2B9556"
262+
},
263+
"negative": {
264+
"$value": "#E84866"
265+
},
266+
"series": {
267+
"1": {
268+
"$value": "#23ABC5"
269+
},
270+
"2": {
271+
"$value": "#F6B668"
272+
},
273+
"3": {
274+
"$value": "#996DD8"
275+
},
276+
"4": {
277+
"$value": "#2B9556"
278+
}
279+
}
280+
}
281+
}
282+
}

0 commit comments

Comments
 (0)