@scattered-light/loomiere 0.0.0-stage → 0.1.1
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 +60 -2
- package/bin/loomiere.mjs +112 -0
- package/build/build-tokens.mjs +485 -0
- package/exporters/README.md +45 -0
- package/exporters/ag-grid-settings.mjs +177 -0
- package/exporters/ag-grid.mjs +112 -0
- package/exporters/chakra.mjs +630 -0
- package/exporters/component-styles.mjs +207 -0
- package/exporters/dtcg.mjs +31 -0
- package/exporters/figma.mjs +100 -0
- package/exporters/index.mjs +38 -0
- package/exporters/mui.mjs +666 -0
- package/exporters/tailwind.mjs +35 -0
- package/exporters/theme.mjs +93 -0
- package/generator/brand.mjs +328 -0
- package/generator/brand.schema.json +657 -0
- package/generator/color.mjs +130 -0
- package/generator/data-colors.mjs +104 -0
- package/generator/format-brand.mjs +60 -0
- package/generator/generate.mjs +43 -0
- package/generator/pairs.mjs +236 -0
- package/generator/roles.mjs +258 -0
- package/generator/vision.mjs +167 -0
- package/lib/config.mjs +71 -0
- package/lib/contrast.mjs +134 -0
- package/lib/lab.mjs +108 -0
- package/lib/studio.mjs +127 -0
- package/lib/tool-server.mjs +96 -0
- package/package.json +51 -4
- package/templates/brand.json +104 -0
- package/tokens/README.md +219 -0
- package/tokens/component/avatar.json +10 -0
- package/tokens/component/button.json +12 -0
- package/tokens/component/drawer.json +26 -0
- package/tokens/component/navigation-menu.json +13 -0
- package/tokens/component/popover.json +13 -0
- package/tokens/component/preview-card.json +13 -0
- package/tokens/component/slider.json +13 -0
- package/tokens/component/switch.json +41 -0
- package/tokens/component/toast.json +21 -0
- package/tokens/component/toggle.json +9 -0
- package/tokens/component/toolbar.json +9 -0
- package/tokens/component/tooltip.json +9 -0
- package/tokens/foundation/layering.json +57 -0
- package/tokens/foundation/layout.json +75 -0
- package/tokens/foundation/motion.json +41 -0
- package/tokens/foundation/type.json +92 -0
- package/tokens/semantic/accessibility.json +39 -0
- package/tokens/semantic/bar.json +45 -0
- package/tokens/semantic/check.json +57 -0
- package/tokens/semantic/color.json +270 -0
- package/tokens/semantic/content.json +124 -0
- package/tokens/semantic/disclosure.json +49 -0
- package/tokens/semantic/elevation.json +72 -0
- package/tokens/semantic/field.json +77 -0
- package/tokens/semantic/focus.json +36 -0
- package/tokens/semantic/gauge.json +45 -0
- package/tokens/semantic/icon-button.json +33 -0
- package/tokens/semantic/icon.json +30 -0
- package/tokens/semantic/item.json +65 -0
- package/tokens/semantic/modal.json +86 -0
- package/tokens/semantic/motion.json +20 -0
- package/tokens/semantic/notice.json +37 -0
- package/tokens/semantic/popup.json +89 -0
- package/tokens/semantic/scheme.json +11 -0
- package/tokens/semantic/shape.json +54 -0
- package/tokens/semantic/spacing.json +110 -0
- package/tokens/semantic/table.json +73 -0
- package/tokens/semantic/typography.json +312 -0
- package/tools/brand-builder/builder.js +1119 -0
- package/tools/brand-builder/index.html +329 -0
- package/tools/pair-lab/index.html +119 -0
- package/tools/pair-lab/lab.js +249 -0
|
@@ -0,0 +1,657 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "Brand inputs",
|
|
4
|
+
"description": "The small set of answers that defines a theme. generator/generate.mjs turns these into primitive tokens.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"name",
|
|
8
|
+
"space",
|
|
9
|
+
"color",
|
|
10
|
+
"type",
|
|
11
|
+
"radius",
|
|
12
|
+
"stroke",
|
|
13
|
+
"elevation",
|
|
14
|
+
"motion"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"$schema": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
},
|
|
20
|
+
"name": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "Brand id, used in file names and build output."
|
|
23
|
+
},
|
|
24
|
+
"description": {
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"space": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"description": "Spacing is the unit times each step. Token names are unit counts, so space-4 is 4 units whatever the unit is.",
|
|
30
|
+
"required": [
|
|
31
|
+
"unit",
|
|
32
|
+
"steps"
|
|
33
|
+
],
|
|
34
|
+
"properties": {
|
|
35
|
+
"unit": {
|
|
36
|
+
"type": "number",
|
|
37
|
+
"description": "Smallest spacing unit in px (e.g. 3 or 4)."
|
|
38
|
+
},
|
|
39
|
+
"steps": {
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": {
|
|
42
|
+
"type": "number"
|
|
43
|
+
},
|
|
44
|
+
"description": "Multipliers of the unit to emit. Halves become names like space-0-5."
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"color": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"required": [
|
|
51
|
+
"paper",
|
|
52
|
+
"ink",
|
|
53
|
+
"contrast",
|
|
54
|
+
"palettes"
|
|
55
|
+
],
|
|
56
|
+
"properties": {
|
|
57
|
+
"paper": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"description": "The lightest color (usually white). Becomes color.white; every step is measured against it."
|
|
60
|
+
},
|
|
61
|
+
"ink": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"description": "The darkest color (usually black). Becomes color.black and the dark end of every ramp."
|
|
64
|
+
},
|
|
65
|
+
"contrast": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"description": "Named contrast tables. Each step sits where its contrast against paper equals its target, so the same step means the same contrast in every palette.",
|
|
68
|
+
"additionalProperties": {
|
|
69
|
+
"type": "object",
|
|
70
|
+
"required": [
|
|
71
|
+
"targets"
|
|
72
|
+
],
|
|
73
|
+
"properties": {
|
|
74
|
+
"targets": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"additionalProperties": {
|
|
77
|
+
"type": "number"
|
|
78
|
+
},
|
|
79
|
+
"description": "Step \u2192 WCAG contrast ratio against paper, lightest first. Keep the lightest above 1 so it is never white."
|
|
80
|
+
},
|
|
81
|
+
"locked": {
|
|
82
|
+
"type": "array",
|
|
83
|
+
"items": {
|
|
84
|
+
"type": "integer"
|
|
85
|
+
},
|
|
86
|
+
"description": "Steps that keys may never take, e.g. 500 stays at 4.5:1 so it always passes AA."
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"palettes": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"description": "Role name \u2192 palette. Roles (neutral, primary, \u2026) are what tokens are named after, so brands are interchangeable.",
|
|
94
|
+
"additionalProperties": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"properties": {
|
|
97
|
+
"label": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"description": "The brand's own name for the palette (e.g. stone). Shown in descriptions only."
|
|
100
|
+
},
|
|
101
|
+
"keys": {
|
|
102
|
+
"type": "array",
|
|
103
|
+
"items": {
|
|
104
|
+
"type": "string"
|
|
105
|
+
},
|
|
106
|
+
"description": "Brand colors the ramp passes through, in any order. One is enough; add a light and a dark key to bend the ramp the way the brand does."
|
|
107
|
+
},
|
|
108
|
+
"exact": {
|
|
109
|
+
"type": "boolean",
|
|
110
|
+
"description": "Put each key in the palette as-is, on the step nearest its contrast (never on a locked step). Off by default, as in Leonardo, where keys only shape the ramp."
|
|
111
|
+
},
|
|
112
|
+
"contrast": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"description": "Which contrast table to use. Defaults to \"spot\"."
|
|
115
|
+
},
|
|
116
|
+
"darkest": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"description": "Where this palette ends, if not at ink. Use it when the brand has its own tinted black for this color, e.g. a deep plum for a purple. Steps darker than it can reach land on it."
|
|
119
|
+
},
|
|
120
|
+
"tone": {
|
|
121
|
+
"type": "object",
|
|
122
|
+
"required": [
|
|
123
|
+
"color",
|
|
124
|
+
"intensity"
|
|
125
|
+
],
|
|
126
|
+
"description": "Tints the ramp like a transparent color layered over a grayscale. Used for neutrals.",
|
|
127
|
+
"properties": {
|
|
128
|
+
"color": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"description": "The tone color, usually a brand color or its complement."
|
|
131
|
+
},
|
|
132
|
+
"intensity": {
|
|
133
|
+
"oneOf": [
|
|
134
|
+
{
|
|
135
|
+
"type": "number"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"type": "array",
|
|
139
|
+
"prefixItems": [
|
|
140
|
+
{
|
|
141
|
+
"type": "number"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"type": "number"
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"description": "Opacity of the tone, 0\u20131. A [light, dark] pair changes along the ramp on a log curve, e.g. [0.1, 0.6] keeps the lights clean and the darks rich."
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"pairs": {
|
|
157
|
+
"type": "object",
|
|
158
|
+
"description": "Brand pairs: named background/text combinations that pass AA. Each becomes pair.<name>.* tokens and a .sl-pair-<name> class. Pick them with npm run lab.",
|
|
159
|
+
"propertyNames": {
|
|
160
|
+
"pattern": "^[a-z][a-z0-9-]*$"
|
|
161
|
+
},
|
|
162
|
+
"additionalProperties": {
|
|
163
|
+
"type": "object",
|
|
164
|
+
"required": [
|
|
165
|
+
"bg",
|
|
166
|
+
"fg"
|
|
167
|
+
],
|
|
168
|
+
"additionalProperties": false,
|
|
169
|
+
"properties": {
|
|
170
|
+
"bg": {
|
|
171
|
+
"type": "string",
|
|
172
|
+
"pattern": "^(white|black|paper|ink|[a-z]+\\.[0-9]+)$",
|
|
173
|
+
"description": "Background. A palette color as role.step (\"secondary.600\"), or white/black for paper and ink."
|
|
174
|
+
},
|
|
175
|
+
"fg": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"pattern": "^(white|black|paper|ink|[a-z]+\\.[0-9]+)$",
|
|
178
|
+
"description": "Text, icons and strong borders. Must reach 4.5:1 on bg."
|
|
179
|
+
},
|
|
180
|
+
"accent": {
|
|
181
|
+
"type": "string",
|
|
182
|
+
"pattern": "^(white|black|paper|ink|[a-z]+\\.[0-9]+)$",
|
|
183
|
+
"description": "Links, buttons and focus rings. Must reach 4.5:1 on bg. Defaults to fg."
|
|
184
|
+
},
|
|
185
|
+
"dark": {
|
|
186
|
+
"type": "object",
|
|
187
|
+
"additionalProperties": false,
|
|
188
|
+
"description": "What changes in dark mode. Parts left out carry over.",
|
|
189
|
+
"properties": {
|
|
190
|
+
"bg": {
|
|
191
|
+
"type": "string",
|
|
192
|
+
"pattern": "^(white|black|paper|ink|[a-z]+\\.[0-9]+)$",
|
|
193
|
+
"description": "Background. A palette color as role.step (\"secondary.600\"), or white/black for paper and ink."
|
|
194
|
+
},
|
|
195
|
+
"fg": {
|
|
196
|
+
"type": "string",
|
|
197
|
+
"pattern": "^(white|black|paper|ink|[a-z]+\\.[0-9]+)$",
|
|
198
|
+
"description": "Text, icons and strong borders. Must reach 4.5:1 on bg."
|
|
199
|
+
},
|
|
200
|
+
"accent": {
|
|
201
|
+
"type": "string",
|
|
202
|
+
"pattern": "^(white|black|paper|ink|[a-z]+\\.[0-9]+)$",
|
|
203
|
+
"description": "Links, buttons and focus rings. Must reach 4.5:1 on bg. Defaults to fg."
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"description": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"description": "Why the pair exists or where it's used."
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"data": {
|
|
215
|
+
"type": "array",
|
|
216
|
+
"description": "Categorical colors for charts, in the order they should be used: [name, hex] pairs.",
|
|
217
|
+
"items": {
|
|
218
|
+
"type": "array",
|
|
219
|
+
"prefixItems": [
|
|
220
|
+
{
|
|
221
|
+
"type": "string"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"type": "string"
|
|
225
|
+
}
|
|
226
|
+
]
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"vision": {
|
|
230
|
+
"type": "object",
|
|
231
|
+
"description": "Color vision themes are generated from the brand's spot palettes and data colors. Pin any of their colors per theme here; the others move to make room.",
|
|
232
|
+
"properties": {
|
|
233
|
+
"deuteranopia": {
|
|
234
|
+
"type": "object",
|
|
235
|
+
"properties": {
|
|
236
|
+
"keys": {
|
|
237
|
+
"type": "object",
|
|
238
|
+
"description": "Per palette role, the color that stands for it (its most colorful key) in this theme. The whole palette moves with it.",
|
|
239
|
+
"additionalProperties": {
|
|
240
|
+
"type": "string",
|
|
241
|
+
"pattern": "^#[0-9a-fA-F]{6}$"
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"data": {
|
|
245
|
+
"type": "object",
|
|
246
|
+
"description": "Per data color name, the color to use in this theme.",
|
|
247
|
+
"additionalProperties": {
|
|
248
|
+
"type": "string",
|
|
249
|
+
"pattern": "^#[0-9a-fA-F]{6}$"
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"protanopia": {
|
|
255
|
+
"type": "object",
|
|
256
|
+
"properties": {
|
|
257
|
+
"keys": {
|
|
258
|
+
"type": "object",
|
|
259
|
+
"description": "Per palette role, the color that stands for it (its most colorful key) in this theme. The whole palette moves with it.",
|
|
260
|
+
"additionalProperties": {
|
|
261
|
+
"type": "string",
|
|
262
|
+
"pattern": "^#[0-9a-fA-F]{6}$"
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
"data": {
|
|
266
|
+
"type": "object",
|
|
267
|
+
"description": "Per data color name, the color to use in this theme.",
|
|
268
|
+
"additionalProperties": {
|
|
269
|
+
"type": "string",
|
|
270
|
+
"pattern": "^#[0-9a-fA-F]{6}$"
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
"tritanopia": {
|
|
276
|
+
"type": "object",
|
|
277
|
+
"properties": {
|
|
278
|
+
"keys": {
|
|
279
|
+
"type": "object",
|
|
280
|
+
"description": "Per palette role, the color that stands for it (its most colorful key) in this theme. The whole palette moves with it.",
|
|
281
|
+
"additionalProperties": {
|
|
282
|
+
"type": "string",
|
|
283
|
+
"pattern": "^#[0-9a-fA-F]{6}$"
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
"data": {
|
|
287
|
+
"type": "object",
|
|
288
|
+
"description": "Per data color name, the color to use in this theme.",
|
|
289
|
+
"additionalProperties": {
|
|
290
|
+
"type": "string",
|
|
291
|
+
"pattern": "^#[0-9a-fA-F]{6}$"
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
"achromatopsia": {
|
|
297
|
+
"type": "object",
|
|
298
|
+
"properties": {
|
|
299
|
+
"keys": {
|
|
300
|
+
"type": "object",
|
|
301
|
+
"description": "Per palette role, the color that stands for it (its most colorful key) in this theme. The whole palette moves with it.",
|
|
302
|
+
"additionalProperties": {
|
|
303
|
+
"type": "string",
|
|
304
|
+
"pattern": "^#[0-9a-fA-F]{6}$"
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
"data": {
|
|
308
|
+
"type": "object",
|
|
309
|
+
"description": "Per data color name, the color to use in this theme.",
|
|
310
|
+
"additionalProperties": {
|
|
311
|
+
"type": "string",
|
|
312
|
+
"pattern": "^#[0-9a-fA-F]{6}$"
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
"additionalProperties": false
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
"type": {
|
|
323
|
+
"type": "object",
|
|
324
|
+
"description": "A modular scale: each step is the base times ratio^n. Base and up are fluid between two viewport widths; steps below the base are fixed.",
|
|
325
|
+
"required": [
|
|
326
|
+
"families",
|
|
327
|
+
"base",
|
|
328
|
+
"ratio",
|
|
329
|
+
"viewport",
|
|
330
|
+
"steps",
|
|
331
|
+
"baseStep",
|
|
332
|
+
"lineHeight"
|
|
333
|
+
],
|
|
334
|
+
"properties": {
|
|
335
|
+
"families": {
|
|
336
|
+
"type": "object",
|
|
337
|
+
"additionalProperties": {
|
|
338
|
+
"type": "array",
|
|
339
|
+
"items": {
|
|
340
|
+
"type": "string"
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
"description": "Role \u2192 font stack."
|
|
344
|
+
},
|
|
345
|
+
"base": {
|
|
346
|
+
"$ref": "#/$defs/minMax",
|
|
347
|
+
"description": "Size of the base step in px at the small and large viewport."
|
|
348
|
+
},
|
|
349
|
+
"ratio": {
|
|
350
|
+
"$ref": "#/$defs/minMax",
|
|
351
|
+
"description": "Scale ratio at each viewport (1.2 = minor third, 1.25 = major third, 1.333 = perfect fourth)."
|
|
352
|
+
},
|
|
353
|
+
"viewport": {
|
|
354
|
+
"$ref": "#/$defs/minMax",
|
|
355
|
+
"description": "Viewport widths in px where sizes stop growing or shrinking."
|
|
356
|
+
},
|
|
357
|
+
"steps": {
|
|
358
|
+
"type": "array",
|
|
359
|
+
"items": {
|
|
360
|
+
"type": "string"
|
|
361
|
+
},
|
|
362
|
+
"description": "Step names, smallest first."
|
|
363
|
+
},
|
|
364
|
+
"baseStep": {
|
|
365
|
+
"type": "string",
|
|
366
|
+
"description": "Which step is the base size."
|
|
367
|
+
},
|
|
368
|
+
"lineHeight": {
|
|
369
|
+
"type": "object",
|
|
370
|
+
"description": "Line height = the font's own height + leading in em. Leading eases from `text` at textStep to `heading` at headingStep; small text needs more air than headings.",
|
|
371
|
+
"required": [
|
|
372
|
+
"text",
|
|
373
|
+
"heading",
|
|
374
|
+
"textStep",
|
|
375
|
+
"headingStep"
|
|
376
|
+
],
|
|
377
|
+
"properties": {
|
|
378
|
+
"text": {
|
|
379
|
+
"type": "number",
|
|
380
|
+
"description": "Leading in em for small text (at textStep and below)."
|
|
381
|
+
},
|
|
382
|
+
"heading": {
|
|
383
|
+
"type": "number",
|
|
384
|
+
"description": "Leading in em for headings (at headingStep and above); can be negative to tighten past the font's own height."
|
|
385
|
+
},
|
|
386
|
+
"textStep": {
|
|
387
|
+
"type": "string"
|
|
388
|
+
},
|
|
389
|
+
"headingStep": {
|
|
390
|
+
"type": "string"
|
|
391
|
+
},
|
|
392
|
+
"solidFrom": {
|
|
393
|
+
"type": "string",
|
|
394
|
+
"description": "From this step up, line height is 1 (set solid) for big display text."
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
"small": {
|
|
399
|
+
"type": "object",
|
|
400
|
+
"description": "Sizes below the base step. Fixed by default: small text has little room to shrink before it stops being readable.",
|
|
401
|
+
"properties": {
|
|
402
|
+
"fixed": {
|
|
403
|
+
"type": "boolean",
|
|
404
|
+
"description": "true (default): whole px from the ratio at the small viewport. false: fluid like the rest."
|
|
405
|
+
},
|
|
406
|
+
"floor": {
|
|
407
|
+
"type": "number",
|
|
408
|
+
"description": "Smallest size in px any step may have."
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
"metrics": {
|
|
413
|
+
"type": "object",
|
|
414
|
+
"description": "Measurements of each family role (display, body, mono). Line heights start from the font's own height (ascent + descent) so a taller font gets more room without pins. The brand builder measures them for you.",
|
|
415
|
+
"additionalProperties": {
|
|
416
|
+
"type": "object",
|
|
417
|
+
"description": "Font measurements in em, as the font file reports them.",
|
|
418
|
+
"properties": {
|
|
419
|
+
"ascent": {
|
|
420
|
+
"type": "number"
|
|
421
|
+
},
|
|
422
|
+
"descent": {
|
|
423
|
+
"type": "number"
|
|
424
|
+
},
|
|
425
|
+
"capHeight": {
|
|
426
|
+
"type": "number"
|
|
427
|
+
},
|
|
428
|
+
"xHeight": {
|
|
429
|
+
"type": "number"
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
"required": [
|
|
433
|
+
"ascent",
|
|
434
|
+
"descent"
|
|
435
|
+
]
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
"stepDown": {
|
|
439
|
+
"type": "boolean",
|
|
440
|
+
"description": "true: on small screens each size above the base starts at the size the step below reaches on large screens, so headings drop one step instead of shrinking by the base's ratio."
|
|
441
|
+
},
|
|
442
|
+
"displayFrom": {
|
|
443
|
+
"type": "string",
|
|
444
|
+
"description": "First step set in the display family; its line heights use the display font's measurements, smaller steps use the body font's."
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
"radius": {
|
|
449
|
+
"$ref": "#/$defs/scale",
|
|
450
|
+
"description": "Corner rounding: base radius in px times each step."
|
|
451
|
+
},
|
|
452
|
+
"stroke": {
|
|
453
|
+
"$ref": "#/$defs/scale",
|
|
454
|
+
"description": "Border widths: base width in px times each step."
|
|
455
|
+
},
|
|
456
|
+
"elevation": {
|
|
457
|
+
"type": "object",
|
|
458
|
+
"description": "Shadow color and strength. The shadow shapes are shared across brands.",
|
|
459
|
+
"properties": {
|
|
460
|
+
"shadowColor": {
|
|
461
|
+
"type": "string"
|
|
462
|
+
},
|
|
463
|
+
"strength": {
|
|
464
|
+
"type": "number",
|
|
465
|
+
"description": "Multiplies shadow opacity. 1 is the default."
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
"motion": {
|
|
470
|
+
"type": "object",
|
|
471
|
+
"description": "Durations in ms, scaled by speed. Easing curves are foundation tokens.",
|
|
472
|
+
"properties": {
|
|
473
|
+
"speed": {
|
|
474
|
+
"type": "number",
|
|
475
|
+
"description": "1 is the default. Below 1 is snappier, above 1 is calmer."
|
|
476
|
+
},
|
|
477
|
+
"durations": {
|
|
478
|
+
"type": "object",
|
|
479
|
+
"additionalProperties": {
|
|
480
|
+
"type": "number"
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
},
|
|
485
|
+
"roles": {
|
|
486
|
+
"type": "object",
|
|
487
|
+
"additionalProperties": false,
|
|
488
|
+
"description": "Which palette plays which part. Leave out for neutral chrome, primary accent and the default ladder.",
|
|
489
|
+
"properties": {
|
|
490
|
+
"chrome": {
|
|
491
|
+
"type": "string",
|
|
492
|
+
"description": "Palette for surfaces, text and borders. Usually the neutral."
|
|
493
|
+
},
|
|
494
|
+
"accent": {
|
|
495
|
+
"type": "string",
|
|
496
|
+
"description": "Palette for links, focus and the loudest actions. Any brand color; not always primary (a red brand may want a calmer accent)."
|
|
497
|
+
},
|
|
498
|
+
"emphasis": {
|
|
499
|
+
"type": "object",
|
|
500
|
+
"additionalProperties": false,
|
|
501
|
+
"description": "The ladder components draw from, loudest first.",
|
|
502
|
+
"properties": {
|
|
503
|
+
"bold": {
|
|
504
|
+
"type": "object",
|
|
505
|
+
"additionalProperties": false,
|
|
506
|
+
"required": [
|
|
507
|
+
"style",
|
|
508
|
+
"color"
|
|
509
|
+
],
|
|
510
|
+
"properties": {
|
|
511
|
+
"style": {
|
|
512
|
+
"enum": [
|
|
513
|
+
"solid",
|
|
514
|
+
"soft",
|
|
515
|
+
"outline",
|
|
516
|
+
"ghost"
|
|
517
|
+
],
|
|
518
|
+
"description": "solid: filled; soft: tinted fill; outline: border only; ghost: no fill or border until hover."
|
|
519
|
+
},
|
|
520
|
+
"color": {
|
|
521
|
+
"type": "string",
|
|
522
|
+
"description": "accent, chrome or a palette name."
|
|
523
|
+
}
|
|
524
|
+
},
|
|
525
|
+
"description": "The main call to action."
|
|
526
|
+
},
|
|
527
|
+
"standard": {
|
|
528
|
+
"type": "object",
|
|
529
|
+
"additionalProperties": false,
|
|
530
|
+
"required": [
|
|
531
|
+
"style",
|
|
532
|
+
"color"
|
|
533
|
+
],
|
|
534
|
+
"properties": {
|
|
535
|
+
"style": {
|
|
536
|
+
"enum": [
|
|
537
|
+
"solid",
|
|
538
|
+
"soft",
|
|
539
|
+
"outline",
|
|
540
|
+
"ghost"
|
|
541
|
+
],
|
|
542
|
+
"description": "solid: filled; soft: tinted fill; outline: border only; ghost: no fill or border until hover."
|
|
543
|
+
},
|
|
544
|
+
"color": {
|
|
545
|
+
"type": "string",
|
|
546
|
+
"description": "accent, chrome or a palette name."
|
|
547
|
+
}
|
|
548
|
+
},
|
|
549
|
+
"description": "Ordinary actions."
|
|
550
|
+
},
|
|
551
|
+
"subtle": {
|
|
552
|
+
"type": "object",
|
|
553
|
+
"additionalProperties": false,
|
|
554
|
+
"required": [
|
|
555
|
+
"style",
|
|
556
|
+
"color"
|
|
557
|
+
],
|
|
558
|
+
"properties": {
|
|
559
|
+
"style": {
|
|
560
|
+
"enum": [
|
|
561
|
+
"solid",
|
|
562
|
+
"soft",
|
|
563
|
+
"outline",
|
|
564
|
+
"ghost"
|
|
565
|
+
],
|
|
566
|
+
"description": "solid: filled; soft: tinted fill; outline: border only; ghost: no fill or border until hover."
|
|
567
|
+
},
|
|
568
|
+
"color": {
|
|
569
|
+
"type": "string",
|
|
570
|
+
"description": "accent, chrome or a palette name."
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
"description": "Less important actions."
|
|
574
|
+
},
|
|
575
|
+
"quiet": {
|
|
576
|
+
"type": "object",
|
|
577
|
+
"additionalProperties": false,
|
|
578
|
+
"required": [
|
|
579
|
+
"style",
|
|
580
|
+
"color"
|
|
581
|
+
],
|
|
582
|
+
"properties": {
|
|
583
|
+
"style": {
|
|
584
|
+
"enum": [
|
|
585
|
+
"solid",
|
|
586
|
+
"soft",
|
|
587
|
+
"outline",
|
|
588
|
+
"ghost"
|
|
589
|
+
],
|
|
590
|
+
"description": "solid: filled; soft: tinted fill; outline: border only; ghost: no fill or border until hover."
|
|
591
|
+
},
|
|
592
|
+
"color": {
|
|
593
|
+
"type": "string",
|
|
594
|
+
"description": "accent, chrome or a palette name."
|
|
595
|
+
}
|
|
596
|
+
},
|
|
597
|
+
"description": "The least."
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
},
|
|
601
|
+
"concepts": {
|
|
602
|
+
"type": "object",
|
|
603
|
+
"description": "Picks that replace a role's default step for one concept, keyed \"chrome.<slot>\" or \"accent.<slot>\". Modes left out keep the default. The Roles step of loomiere studio lists the concepts.",
|
|
604
|
+
"additionalProperties": {
|
|
605
|
+
"type": "object",
|
|
606
|
+
"additionalProperties": false,
|
|
607
|
+
"properties": {
|
|
608
|
+
"light": {
|
|
609
|
+
"type": "string",
|
|
610
|
+
"description": "palette.step (\"primary.1000\", \"neutral.on.100\"), \"white\" (paper), \"black\" (ink) or a hex."
|
|
611
|
+
},
|
|
612
|
+
"dark": {
|
|
613
|
+
"type": "string",
|
|
614
|
+
"description": "palette.step (\"primary.1000\", \"neutral.on.100\"), \"white\" (paper), \"black\" (ink) or a hex."
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
},
|
|
622
|
+
"$defs": {
|
|
623
|
+
"minMax": {
|
|
624
|
+
"type": "object",
|
|
625
|
+
"required": [
|
|
626
|
+
"min",
|
|
627
|
+
"max"
|
|
628
|
+
],
|
|
629
|
+
"properties": {
|
|
630
|
+
"min": {
|
|
631
|
+
"type": "number"
|
|
632
|
+
},
|
|
633
|
+
"max": {
|
|
634
|
+
"type": "number"
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
},
|
|
638
|
+
"scale": {
|
|
639
|
+
"type": "object",
|
|
640
|
+
"required": [
|
|
641
|
+
"base",
|
|
642
|
+
"steps"
|
|
643
|
+
],
|
|
644
|
+
"properties": {
|
|
645
|
+
"base": {
|
|
646
|
+
"type": "number"
|
|
647
|
+
},
|
|
648
|
+
"steps": {
|
|
649
|
+
"type": "object",
|
|
650
|
+
"additionalProperties": {
|
|
651
|
+
"type": "number"
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
}
|