@polyxd/ds-carbon 0.1.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/LICENSE +202 -0
- package/NOTICE +177 -0
- package/README.md +129 -0
- package/manifest.json +77 -0
- package/package.json +30 -0
- package/scripts/sources/carbon/LICENSE +201 -0
- package/tokens/primitive.json +3068 -0
- package/tokens/semantic.json +389 -0
- package/tokens/system.dark.json +634 -0
- package/tokens/system.json +385 -0
- package/tokens/system.light.json +613 -0
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$description": "Polyxd semantic tier for IBM Carbon (light = White theme, dark = Gray 100 theme). Every token aliases a Carbon token (carbon.*) wherever Carbon has one; polyxd.* tokens mark contrast adjustments and values Carbon does not define. The file is the same in both modes.",
|
|
3
|
+
"color": {
|
|
4
|
+
"$type": "color",
|
|
5
|
+
"surface": {
|
|
6
|
+
"default": {
|
|
7
|
+
"$value": "{carbon.theme.background}"
|
|
8
|
+
},
|
|
9
|
+
"subtle": {
|
|
10
|
+
"$value": "{carbon.theme.layer-accent-01}",
|
|
11
|
+
"$description": "Carbon data-table header / accent layer"
|
|
12
|
+
},
|
|
13
|
+
"raised": {
|
|
14
|
+
"$value": "{carbon.theme.layer-01}",
|
|
15
|
+
"$description": "Carbon tile"
|
|
16
|
+
},
|
|
17
|
+
"overlay": {
|
|
18
|
+
"$value": "{carbon.theme.layer-01}",
|
|
19
|
+
"$description": "Carbon modal, menu and popover container ($layer on $background)"
|
|
20
|
+
},
|
|
21
|
+
"inverse": {
|
|
22
|
+
"$value": "{carbon.theme.background-inverse}",
|
|
23
|
+
"$description": "Carbon tooltip / inline notification (low contrast off)"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"scrim": {
|
|
27
|
+
"$value": "{carbon.theme.overlay}",
|
|
28
|
+
"$description": "Carbon modal backdrop: black at 0.6"
|
|
29
|
+
},
|
|
30
|
+
"text": {
|
|
31
|
+
"default": {
|
|
32
|
+
"$value": "{carbon.theme.text-primary}"
|
|
33
|
+
},
|
|
34
|
+
"muted": {
|
|
35
|
+
"$value": "{carbon.theme.text-secondary}"
|
|
36
|
+
},
|
|
37
|
+
"inverse": {
|
|
38
|
+
"$value": "{carbon.theme.text-inverse}"
|
|
39
|
+
},
|
|
40
|
+
"link": {
|
|
41
|
+
"$value": "{carbon.theme.link-primary}"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"border": {
|
|
45
|
+
"default": {
|
|
46
|
+
"$value": "{carbon.theme.border-subtle-01}"
|
|
47
|
+
},
|
|
48
|
+
"strong": {
|
|
49
|
+
"$value": "{carbon.theme.border-strong-01}"
|
|
50
|
+
},
|
|
51
|
+
"focus": {
|
|
52
|
+
"$value": "{carbon.theme.focus}"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"action": {
|
|
56
|
+
"primary": {
|
|
57
|
+
"background": {
|
|
58
|
+
"$value": "{carbon.theme.button-primary}"
|
|
59
|
+
},
|
|
60
|
+
"foreground": {
|
|
61
|
+
"$value": "{carbon.theme.text-on-color}"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"secondary": {
|
|
65
|
+
"background": {
|
|
66
|
+
"$value": "{carbon.theme.button-secondary}"
|
|
67
|
+
},
|
|
68
|
+
"foreground": {
|
|
69
|
+
"$value": "{carbon.theme.text-on-color}"
|
|
70
|
+
},
|
|
71
|
+
"border": {
|
|
72
|
+
"$value": "{carbon.theme.button-secondary}",
|
|
73
|
+
"$description": "Carbon secondary buttons are borderless; the border matches the fill"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"danger": {
|
|
77
|
+
"background": {
|
|
78
|
+
"$value": "{carbon.theme.button-danger-primary}"
|
|
79
|
+
},
|
|
80
|
+
"foreground": {
|
|
81
|
+
"$value": "{carbon.theme.text-on-color}"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"selection": {
|
|
86
|
+
"background": {
|
|
87
|
+
"$value": "{carbon.theme.layer-selected-01}"
|
|
88
|
+
},
|
|
89
|
+
"foreground": {
|
|
90
|
+
"$value": "{carbon.theme.text-primary}"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"status": {
|
|
94
|
+
"info": {
|
|
95
|
+
"background": {
|
|
96
|
+
"$value": "{carbon.theme.notification-background-info}"
|
|
97
|
+
},
|
|
98
|
+
"foreground": {
|
|
99
|
+
"$value": "{carbon.theme.text-primary}"
|
|
100
|
+
},
|
|
101
|
+
"emphasis": {
|
|
102
|
+
"$value": "{carbon.theme.support-info}"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"success": {
|
|
106
|
+
"background": {
|
|
107
|
+
"$value": "{carbon.theme.notification-background-success}"
|
|
108
|
+
},
|
|
109
|
+
"foreground": {
|
|
110
|
+
"$value": "{carbon.theme.text-primary}"
|
|
111
|
+
},
|
|
112
|
+
"emphasis": {
|
|
113
|
+
"$value": "{carbon.theme.support-success}"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"warning": {
|
|
117
|
+
"background": {
|
|
118
|
+
"$value": "{carbon.theme.notification-background-warning}"
|
|
119
|
+
},
|
|
120
|
+
"foreground": {
|
|
121
|
+
"$value": "{carbon.theme.text-primary}"
|
|
122
|
+
},
|
|
123
|
+
"emphasis": {
|
|
124
|
+
"$value": "{polyxd.theme.warning-emphasis}",
|
|
125
|
+
"$description": "Light: adjusted to $status-yellow-outline; dark: $support-warning"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"danger": {
|
|
129
|
+
"background": {
|
|
130
|
+
"$value": "{carbon.theme.notification-background-error}"
|
|
131
|
+
},
|
|
132
|
+
"foreground": {
|
|
133
|
+
"$value": "{carbon.theme.text-primary}"
|
|
134
|
+
},
|
|
135
|
+
"emphasis": {
|
|
136
|
+
"$value": "{carbon.theme.support-error}"
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"data": {
|
|
141
|
+
"categorical": {
|
|
142
|
+
"1": {
|
|
143
|
+
"$value": "{carbon.data-viz.categorical.01}"
|
|
144
|
+
},
|
|
145
|
+
"2": {
|
|
146
|
+
"$value": "{carbon.data-viz.categorical.02}"
|
|
147
|
+
},
|
|
148
|
+
"3": {
|
|
149
|
+
"$value": "{carbon.data-viz.categorical.03}"
|
|
150
|
+
},
|
|
151
|
+
"4": {
|
|
152
|
+
"$value": "{carbon.data-viz.categorical.04}"
|
|
153
|
+
},
|
|
154
|
+
"5": {
|
|
155
|
+
"$value": "{carbon.data-viz.categorical.05}"
|
|
156
|
+
},
|
|
157
|
+
"6": {
|
|
158
|
+
"$value": "{carbon.data-viz.categorical.06}"
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"positive": {
|
|
162
|
+
"$value": "{carbon.theme.support-success}"
|
|
163
|
+
},
|
|
164
|
+
"negative": {
|
|
165
|
+
"$value": "{carbon.theme.support-error}"
|
|
166
|
+
},
|
|
167
|
+
"neutral": {
|
|
168
|
+
"$value": "{carbon.theme.status-gray}"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"type": {
|
|
173
|
+
"$type": "typography",
|
|
174
|
+
"title": {
|
|
175
|
+
"page": {
|
|
176
|
+
"$value": "{carbon.type.heading-05}"
|
|
177
|
+
},
|
|
178
|
+
"section": {
|
|
179
|
+
"$value": "{carbon.type.heading-03}"
|
|
180
|
+
},
|
|
181
|
+
"item": {
|
|
182
|
+
"$value": "{carbon.type.heading-02}"
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
"body": {
|
|
186
|
+
"default": {
|
|
187
|
+
"$value": "{carbon.type.body-02}",
|
|
188
|
+
"$description": "Carbon body-02 (16px). Carbon's default body style is body-01 (14px), but the contract requires >= 16px"
|
|
189
|
+
},
|
|
190
|
+
"small": {
|
|
191
|
+
"$value": "{carbon.type.body-01}"
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"label": {
|
|
195
|
+
"default": {
|
|
196
|
+
"$value": "{carbon.type.label-02}",
|
|
197
|
+
"$description": "Same metrics as body-compact-01, Carbon's button and control text"
|
|
198
|
+
},
|
|
199
|
+
"small": {
|
|
200
|
+
"$value": "{carbon.type.label-01}"
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"numeric": {
|
|
204
|
+
"display": {
|
|
205
|
+
"$value": "{carbon.type.heading-06}"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"space": {
|
|
210
|
+
"$type": "dimension",
|
|
211
|
+
"$description": "Carbon 8px-based spacing scale ($spacing-NN)",
|
|
212
|
+
"inset": {
|
|
213
|
+
"compact": {
|
|
214
|
+
"$value": "{carbon.spacing.03}"
|
|
215
|
+
},
|
|
216
|
+
"default": {
|
|
217
|
+
"$value": "{carbon.spacing.05}"
|
|
218
|
+
},
|
|
219
|
+
"comfortable": {
|
|
220
|
+
"$value": "{carbon.spacing.06}"
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
"stack": {
|
|
224
|
+
"tight": {
|
|
225
|
+
"$value": "{carbon.spacing.03}"
|
|
226
|
+
},
|
|
227
|
+
"default": {
|
|
228
|
+
"$value": "{carbon.spacing.05}"
|
|
229
|
+
},
|
|
230
|
+
"loose": {
|
|
231
|
+
"$value": "{carbon.spacing.07}"
|
|
232
|
+
},
|
|
233
|
+
"section": {
|
|
234
|
+
"$value": "{carbon.spacing.09}"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"inline": {
|
|
238
|
+
"tight": {
|
|
239
|
+
"$value": "{carbon.spacing.02}"
|
|
240
|
+
},
|
|
241
|
+
"default": {
|
|
242
|
+
"$value": "{carbon.spacing.03}"
|
|
243
|
+
},
|
|
244
|
+
"loose": {
|
|
245
|
+
"$value": "{carbon.spacing.05}"
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
"size": {
|
|
250
|
+
"$type": "dimension",
|
|
251
|
+
"target": {
|
|
252
|
+
"min": {
|
|
253
|
+
"$value": "{carbon.size.lg}",
|
|
254
|
+
"$description": "Carbon $size-lg (48px), the large control height; Carbon's default (md) is 40px"
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"icon": {
|
|
258
|
+
"small": {
|
|
259
|
+
"$value": "{carbon.icon-size.01}"
|
|
260
|
+
},
|
|
261
|
+
"default": {
|
|
262
|
+
"$value": "{carbon.icon-size.02}"
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
"radius": {
|
|
267
|
+
"$type": "dimension",
|
|
268
|
+
"small": {
|
|
269
|
+
"$value": "{carbon.border-radius.00}",
|
|
270
|
+
"$description": "Carbon components have square corners"
|
|
271
|
+
},
|
|
272
|
+
"control": {
|
|
273
|
+
"$value": "{carbon.border-radius.00}",
|
|
274
|
+
"$description": "Carbon buttons are square"
|
|
275
|
+
},
|
|
276
|
+
"default": {
|
|
277
|
+
"$value": "{carbon.border-radius.00}"
|
|
278
|
+
},
|
|
279
|
+
"large": {
|
|
280
|
+
"$value": "{carbon.border-radius.00}"
|
|
281
|
+
},
|
|
282
|
+
"full": {
|
|
283
|
+
"$value": "{carbon.border-radius.max}",
|
|
284
|
+
"$description": "Pills and avatars (tags, toggles)"
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
"border": {
|
|
288
|
+
"width": {
|
|
289
|
+
"$type": "dimension",
|
|
290
|
+
"default": {
|
|
291
|
+
"$value": {
|
|
292
|
+
"value": 1,
|
|
293
|
+
"unit": "px"
|
|
294
|
+
},
|
|
295
|
+
"$description": "Carbon 1px borders (dividers, tile and field outlines)"
|
|
296
|
+
},
|
|
297
|
+
"strong": {
|
|
298
|
+
"$value": {
|
|
299
|
+
"value": 2,
|
|
300
|
+
"unit": "px"
|
|
301
|
+
},
|
|
302
|
+
"$description": "Carbon 2px emphasis (selected tile, invalid field, focus outline)"
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
"focus": {
|
|
307
|
+
"ring": {
|
|
308
|
+
"$type": "dimension",
|
|
309
|
+
"width": {
|
|
310
|
+
"$value": {
|
|
311
|
+
"value": 2,
|
|
312
|
+
"unit": "px"
|
|
313
|
+
},
|
|
314
|
+
"$description": "@carbon/styles focus-outline('outline'): 2px solid $focus"
|
|
315
|
+
},
|
|
316
|
+
"offset": {
|
|
317
|
+
"$value": {
|
|
318
|
+
"value": -2,
|
|
319
|
+
"unit": "px"
|
|
320
|
+
},
|
|
321
|
+
"$description": "@carbon/styles focus-outline('outline'): outline-offset -2px (Carbon draws focus inside the element edge)"
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
"measure": {
|
|
326
|
+
"max": {
|
|
327
|
+
"$value": 65,
|
|
328
|
+
"$type": "number",
|
|
329
|
+
"$description": "Polyxd: characters per line for running text (Carbon defines no measure token)"
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"opacity": {
|
|
333
|
+
"state": {
|
|
334
|
+
"$type": "number",
|
|
335
|
+
"hover": {
|
|
336
|
+
"$value": "{polyxd.theme.opacity.hover}"
|
|
337
|
+
},
|
|
338
|
+
"pressed": {
|
|
339
|
+
"$value": "{polyxd.theme.opacity.pressed}"
|
|
340
|
+
},
|
|
341
|
+
"focus": {
|
|
342
|
+
"$value": "{polyxd.theme.opacity.focus}"
|
|
343
|
+
},
|
|
344
|
+
"disabled": {
|
|
345
|
+
"$value": "{polyxd.theme.opacity.disabled}"
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
"shadow": {
|
|
350
|
+
"$type": "shadow",
|
|
351
|
+
"raised": {
|
|
352
|
+
"$value": "{polyxd.shadow.flat}",
|
|
353
|
+
"$description": "Carbon tiles are flat"
|
|
354
|
+
},
|
|
355
|
+
"overlay": {
|
|
356
|
+
"$value": "{carbon.shadow.box-shadow}",
|
|
357
|
+
"$description": "Carbon box-shadow mixin (menus, dropdowns)"
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
"motion": {
|
|
361
|
+
"duration": {
|
|
362
|
+
"$type": "duration",
|
|
363
|
+
"instant": {
|
|
364
|
+
"$value": "{carbon.motion.duration.fast-01}"
|
|
365
|
+
},
|
|
366
|
+
"short": {
|
|
367
|
+
"$value": "{carbon.motion.duration.fast-02}"
|
|
368
|
+
},
|
|
369
|
+
"medium": {
|
|
370
|
+
"$value": "{carbon.motion.duration.moderate-02}"
|
|
371
|
+
},
|
|
372
|
+
"long": {
|
|
373
|
+
"$value": "{carbon.motion.duration.slow-01}"
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
"easing": {
|
|
377
|
+
"$type": "cubicBezier",
|
|
378
|
+
"standard": {
|
|
379
|
+
"$value": "{carbon.motion.easing.standard.productive}"
|
|
380
|
+
},
|
|
381
|
+
"enter": {
|
|
382
|
+
"$value": "{carbon.motion.easing.entrance.productive}"
|
|
383
|
+
},
|
|
384
|
+
"exit": {
|
|
385
|
+
"$value": "{carbon.motion.easing.exit.productive}"
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|