@podoba/tokens 0.0.28 → 0.0.30
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/package.json +1 -1
- package/src/contrast.test.ts +108 -0
- package/src/tokens.json +548 -0
- package/src/variables.css +27 -0
package/package.json
CHANGED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/// <reference types="bun" />
|
|
2
|
+
|
|
3
|
+
import { describe, expect, test } from 'bun:test'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* WCAG 2.1 contrast regression over the generated token values — the static
|
|
7
|
+
* equivalent of an axe `color-contrast` pass, run for BOTH themes.
|
|
8
|
+
*
|
|
9
|
+
* Guards the pairing rule behind issues #13/#14/#15: every surface ships with a
|
|
10
|
+
* semantic foreground that stays AA-safe when the theme flips. FIXED light
|
|
11
|
+
* surfaces (brand-secondary, brand-green, accent-yellow) pair with the stable
|
|
12
|
+
* `fg-on-brand` ink; the theme-flipping `surface-inverted` pairs with the
|
|
13
|
+
* equally flipping `fg-inverted`.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
const css = await Bun.file(new URL('./variables.css', import.meta.url)).text()
|
|
17
|
+
|
|
18
|
+
function parseBlock(selector: string): Record<string, string> {
|
|
19
|
+
const m = css.match(new RegExp(`${selector}\\s*\\{([^}]*)\\}`))
|
|
20
|
+
if (!m) throw new Error(`selector ${selector} not found in variables.css`)
|
|
21
|
+
const vars: Record<string, string> = {}
|
|
22
|
+
for (const [, name, hex] of m[1].matchAll(/--color-([a-z0-9-]+):\s*(#[0-9a-fA-F]{6})\b/g)) {
|
|
23
|
+
vars[name] = hex
|
|
24
|
+
}
|
|
25
|
+
return vars
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const light = parseBlock(':root')
|
|
29
|
+
// The dark block only lists overrides — unlisted tokens keep their light value.
|
|
30
|
+
const dark = { ...light, ...parseBlock('\\[data-theme="dark"\\]') }
|
|
31
|
+
const THEMES = { light, dark } as const
|
|
32
|
+
|
|
33
|
+
type Rgb = [number, number, number]
|
|
34
|
+
|
|
35
|
+
const rgb = (hex: string): Rgb => [
|
|
36
|
+
parseInt(hex.slice(1, 3), 16),
|
|
37
|
+
parseInt(hex.slice(3, 5), 16),
|
|
38
|
+
parseInt(hex.slice(5, 7), 16),
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
function luminance([r, g, b]: Rgb): number {
|
|
42
|
+
const [lr, lg, lb] = [r, g, b].map((c) => {
|
|
43
|
+
const s = c / 255
|
|
44
|
+
return s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4
|
|
45
|
+
})
|
|
46
|
+
return 0.2126 * lr + 0.7152 * lg + 0.0722 * lb
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function ratio(fgHex: string, bgHex: string): number {
|
|
50
|
+
const [a, b] = [luminance(rgb(fgHex)), luminance(rgb(bgHex))]
|
|
51
|
+
return (Math.max(a, b) + 0.05) / (Math.min(a, b) + 0.05)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** Foreground at `alpha` composited over the surface (Tailwind `/60`-style tones). */
|
|
55
|
+
const blend = (fgHex: string, alpha: number, bgHex: string): string =>
|
|
56
|
+
'#' +
|
|
57
|
+
rgb(fgHex)
|
|
58
|
+
.map((c, i) => Math.round(alpha * c + (1 - alpha) * rgb(bgHex)[i]).toString(16).padStart(2, '0'))
|
|
59
|
+
.join('')
|
|
60
|
+
|
|
61
|
+
/** [foreground token, surface token] pairs that must hold ≥4.5:1 (normal text). */
|
|
62
|
+
const SOLID_PAIRS: Array<[fg: string, bg: string]> = [
|
|
63
|
+
// fixed light brand/accent surfaces × the stable on-brand ink (CtaPill, Badge, Tile teal/yellow)
|
|
64
|
+
['fg-on-brand', 'brand-secondary'],
|
|
65
|
+
['fg-on-brand', 'brand-green'],
|
|
66
|
+
['fg-on-brand', 'accent-yellow'],
|
|
67
|
+
// flipping inverted surface × flipping inverted ink (Badge dark, Tile dark)
|
|
68
|
+
['fg-inverted', 'surface-inverted'],
|
|
69
|
+
// grey Badge (fg-muted on surface-muted was ~3.7:1 — below AA for caption text)
|
|
70
|
+
['fg', 'surface-muted'],
|
|
71
|
+
// general body-copy sanity
|
|
72
|
+
['fg', 'surface'],
|
|
73
|
+
// NOT listed: ['fg-muted', 'surface'] — #7d786f on #ffffff measures ~4.39:1,
|
|
74
|
+
// just under AA, despite the token's "AA-compliant grey on white" description.
|
|
75
|
+
// Pre-existing, system-wide, and owned by the upstream token source — tracked
|
|
76
|
+
// as its own issue; add the pair here once the value is corrected.
|
|
77
|
+
]
|
|
78
|
+
|
|
79
|
+
/** Alpha-blended muted tones used by Tile (`/60` dark, `/70` teal/yellow). */
|
|
80
|
+
const BLENDED_PAIRS: Array<[fg: string, alpha: number, bg: string]> = [
|
|
81
|
+
['fg-inverted', 0.6, 'surface-inverted'],
|
|
82
|
+
['fg-on-brand', 0.7, 'brand-secondary'],
|
|
83
|
+
['fg-on-brand', 0.7, 'brand-green'],
|
|
84
|
+
['fg-on-brand', 0.7, 'accent-yellow'],
|
|
85
|
+
]
|
|
86
|
+
|
|
87
|
+
for (const [themeName, tokens] of Object.entries(THEMES)) {
|
|
88
|
+
describe(`${themeName} theme`, () => {
|
|
89
|
+
test.each(SOLID_PAIRS)('%s on %s ≥ 4.5:1', (fg, bg) => {
|
|
90
|
+
expect(tokens[fg]).toBeDefined()
|
|
91
|
+
expect(tokens[bg]).toBeDefined()
|
|
92
|
+
expect(ratio(tokens[fg], tokens[bg])).toBeGreaterThanOrEqual(4.5)
|
|
93
|
+
})
|
|
94
|
+
|
|
95
|
+
test.each(BLENDED_PAIRS)('%s at %d over %s ≥ 4.5:1', (fg, alpha, bg) => {
|
|
96
|
+
expect(ratio(blend(tokens[fg], alpha, tokens[bg]), tokens[bg])).toBeGreaterThanOrEqual(4.5)
|
|
97
|
+
})
|
|
98
|
+
})
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
describe('fg-on-brand stability', () => {
|
|
102
|
+
test('is the same ink in both themes — the surfaces it pairs with never flip', () => {
|
|
103
|
+
expect(dark['fg-on-brand']).toBe(light['fg-on-brand'])
|
|
104
|
+
expect(dark['brand-secondary']).toBe(light['brand-secondary'])
|
|
105
|
+
expect(dark['brand-green']).toBe(light['brand-green'])
|
|
106
|
+
expect(dark['accent-yellow']).toBe(light['accent-yellow'])
|
|
107
|
+
})
|
|
108
|
+
})
|
package/src/tokens.json
CHANGED
|
@@ -479,6 +479,52 @@
|
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
481
|
},
|
|
482
|
+
"workflow-muted": {
|
|
483
|
+
"$type": "color",
|
|
484
|
+
"$value": "#858585",
|
|
485
|
+
"$description": "Foreground workflow-muted — inactive explanatory steps in the authoritative GS workflow panels.",
|
|
486
|
+
"$extensions": {
|
|
487
|
+
"graphicstandard": {
|
|
488
|
+
"family": "color",
|
|
489
|
+
"layer": "semantic",
|
|
490
|
+
"value": {
|
|
491
|
+
"kind": "color",
|
|
492
|
+
"value": [
|
|
493
|
+
{
|
|
494
|
+
"themeKey": "light",
|
|
495
|
+
"online": {
|
|
496
|
+
"colorSpace": "hex",
|
|
497
|
+
"hex": "#858585"
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
]
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
},
|
|
505
|
+
"on-brand": {
|
|
506
|
+
"$type": "color",
|
|
507
|
+
"$value": "#0d0d0d",
|
|
508
|
+
"$description": "Foreground on brand — ink paired with the FIXED light brand/accent surfaces (brand-secondary, brand-green, accent-yellow). Those surfaces do not flip with the theme, so this stays brand black in both themes (they'd fail AA under a theme-flipping fg).",
|
|
509
|
+
"$extensions": {
|
|
510
|
+
"graphicstandard": {
|
|
511
|
+
"family": "color",
|
|
512
|
+
"layer": "semantic",
|
|
513
|
+
"value": {
|
|
514
|
+
"kind": "color",
|
|
515
|
+
"value": [
|
|
516
|
+
{
|
|
517
|
+
"themeKey": "light",
|
|
518
|
+
"online": {
|
|
519
|
+
"colorSpace": "hex",
|
|
520
|
+
"hex": "#0d0d0d"
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
]
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
},
|
|
482
528
|
"subtle": {
|
|
483
529
|
"$type": "color",
|
|
484
530
|
"$value": "#b3b3b3",
|
|
@@ -503,6 +549,54 @@
|
|
|
503
549
|
}
|
|
504
550
|
}
|
|
505
551
|
},
|
|
552
|
+
"modal": {
|
|
553
|
+
"backdrop": {
|
|
554
|
+
"$type": "color",
|
|
555
|
+
"$value": "#f7f6f2a8",
|
|
556
|
+
"$description": "Modal backdrop — warm source-UI scrim at 66% opacity.",
|
|
557
|
+
"$extensions": {
|
|
558
|
+
"graphicstandard": {
|
|
559
|
+
"family": "color",
|
|
560
|
+
"layer": "semantic",
|
|
561
|
+
"value": {
|
|
562
|
+
"kind": "color",
|
|
563
|
+
"value": [
|
|
564
|
+
{
|
|
565
|
+
"themeKey": "light",
|
|
566
|
+
"online": {
|
|
567
|
+
"colorSpace": "hex",
|
|
568
|
+
"hex": "#f7f6f2a8"
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
]
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
"backdrop-fallback": {
|
|
577
|
+
"$type": "color",
|
|
578
|
+
"$value": "#f7f6f2c2",
|
|
579
|
+
"$description": "Modal backdrop fallback when backdrop-filter is unavailable.",
|
|
580
|
+
"$extensions": {
|
|
581
|
+
"graphicstandard": {
|
|
582
|
+
"family": "color",
|
|
583
|
+
"layer": "semantic",
|
|
584
|
+
"value": {
|
|
585
|
+
"kind": "color",
|
|
586
|
+
"value": [
|
|
587
|
+
{
|
|
588
|
+
"themeKey": "light",
|
|
589
|
+
"online": {
|
|
590
|
+
"colorSpace": "hex",
|
|
591
|
+
"hex": "#f7f6f2c2"
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
]
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
},
|
|
506
600
|
"neutral": {
|
|
507
601
|
"300": {
|
|
508
602
|
"$type": "color",
|
|
@@ -884,6 +978,21 @@
|
|
|
884
978
|
}
|
|
885
979
|
}
|
|
886
980
|
},
|
|
981
|
+
"display-large": {
|
|
982
|
+
"$type": "dimension",
|
|
983
|
+
"$value": "1.875rem",
|
|
984
|
+
"$description": "Font size — large product display (30px); GS source label-1.",
|
|
985
|
+
"$extensions": {
|
|
986
|
+
"graphicstandard": {
|
|
987
|
+
"family": "dimension",
|
|
988
|
+
"layer": "semantic",
|
|
989
|
+
"value": {
|
|
990
|
+
"kind": "scalar",
|
|
991
|
+
"value": "1.875rem"
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
},
|
|
887
996
|
"heading1": {
|
|
888
997
|
"$type": "dimension",
|
|
889
998
|
"$value": "1.75rem",
|
|
@@ -1004,6 +1113,21 @@
|
|
|
1004
1113
|
}
|
|
1005
1114
|
}
|
|
1006
1115
|
},
|
|
1116
|
+
"panel-heading": {
|
|
1117
|
+
"$type": "dimension",
|
|
1118
|
+
"$value": "1.0625rem",
|
|
1119
|
+
"$description": "Font size — workflow/dialog panel heading (17px).",
|
|
1120
|
+
"$extensions": {
|
|
1121
|
+
"graphicstandard": {
|
|
1122
|
+
"family": "dimension",
|
|
1123
|
+
"layer": "semantic",
|
|
1124
|
+
"value": {
|
|
1125
|
+
"kind": "scalar",
|
|
1126
|
+
"value": "1.0625rem"
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
},
|
|
1007
1131
|
"small": {
|
|
1008
1132
|
"$type": "dimension",
|
|
1009
1133
|
"$value": "0.875rem",
|
|
@@ -1052,6 +1176,96 @@
|
|
|
1052
1176
|
}
|
|
1053
1177
|
},
|
|
1054
1178
|
"line-height": {
|
|
1179
|
+
"body": {
|
|
1180
|
+
"$type": "dimension",
|
|
1181
|
+
"$value": "22px",
|
|
1182
|
+
"$description": "Line height — body.",
|
|
1183
|
+
"$extensions": {
|
|
1184
|
+
"graphicstandard": {
|
|
1185
|
+
"family": "dimension",
|
|
1186
|
+
"layer": "semantic",
|
|
1187
|
+
"value": {
|
|
1188
|
+
"kind": "scalar",
|
|
1189
|
+
"value": "22px"
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
},
|
|
1194
|
+
"compact": {
|
|
1195
|
+
"$type": "dimension",
|
|
1196
|
+
"$value": "16px",
|
|
1197
|
+
"$description": "Line height — compact.",
|
|
1198
|
+
"$extensions": {
|
|
1199
|
+
"graphicstandard": {
|
|
1200
|
+
"family": "dimension",
|
|
1201
|
+
"layer": "semantic",
|
|
1202
|
+
"value": {
|
|
1203
|
+
"kind": "scalar",
|
|
1204
|
+
"value": "16px"
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
},
|
|
1209
|
+
"display": {
|
|
1210
|
+
"$type": "dimension",
|
|
1211
|
+
"$value": "30px",
|
|
1212
|
+
"$description": "Line height — display.",
|
|
1213
|
+
"$extensions": {
|
|
1214
|
+
"graphicstandard": {
|
|
1215
|
+
"family": "dimension",
|
|
1216
|
+
"layer": "semantic",
|
|
1217
|
+
"value": {
|
|
1218
|
+
"kind": "scalar",
|
|
1219
|
+
"value": "30px"
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
},
|
|
1224
|
+
"display-large": {
|
|
1225
|
+
"$type": "dimension",
|
|
1226
|
+
"$value": "32px",
|
|
1227
|
+
"$description": "Line height — large product display.",
|
|
1228
|
+
"$extensions": {
|
|
1229
|
+
"graphicstandard": {
|
|
1230
|
+
"family": "dimension",
|
|
1231
|
+
"layer": "semantic",
|
|
1232
|
+
"value": {
|
|
1233
|
+
"kind": "scalar",
|
|
1234
|
+
"value": "32px"
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
},
|
|
1239
|
+
"panel-heading": {
|
|
1240
|
+
"$type": "dimension",
|
|
1241
|
+
"$value": "20px",
|
|
1242
|
+
"$description": "Line height — workflow/dialog panel heading.",
|
|
1243
|
+
"$extensions": {
|
|
1244
|
+
"graphicstandard": {
|
|
1245
|
+
"family": "dimension",
|
|
1246
|
+
"layer": "semantic",
|
|
1247
|
+
"value": {
|
|
1248
|
+
"kind": "scalar",
|
|
1249
|
+
"value": "20px"
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
},
|
|
1254
|
+
"small": {
|
|
1255
|
+
"$type": "dimension",
|
|
1256
|
+
"$value": "18px",
|
|
1257
|
+
"$description": "Line height — small.",
|
|
1258
|
+
"$extensions": {
|
|
1259
|
+
"graphicstandard": {
|
|
1260
|
+
"family": "dimension",
|
|
1261
|
+
"layer": "semantic",
|
|
1262
|
+
"value": {
|
|
1263
|
+
"kind": "scalar",
|
|
1264
|
+
"value": "18px"
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
},
|
|
1055
1269
|
"heading1": {
|
|
1056
1270
|
"$type": "dimension",
|
|
1057
1271
|
"$value": "30px",
|
|
@@ -1128,6 +1342,325 @@
|
|
|
1128
1342
|
}
|
|
1129
1343
|
}
|
|
1130
1344
|
},
|
|
1345
|
+
"control": {
|
|
1346
|
+
"height": {
|
|
1347
|
+
"tall": {
|
|
1348
|
+
"$type": "dimension",
|
|
1349
|
+
"$value": "3.625rem",
|
|
1350
|
+
"$description": "Tall form control height — 58px.",
|
|
1351
|
+
"$extensions": {
|
|
1352
|
+
"graphicstandard": {
|
|
1353
|
+
"family": "dimension",
|
|
1354
|
+
"layer": "semantic",
|
|
1355
|
+
"value": {
|
|
1356
|
+
"kind": "scalar",
|
|
1357
|
+
"value": "3.625rem"
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
}
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
},
|
|
1364
|
+
"effect": {
|
|
1365
|
+
"modal-backdrop-blur": {
|
|
1366
|
+
"$type": "dimension",
|
|
1367
|
+
"$value": "10px",
|
|
1368
|
+
"$description": "Modal backdrop blur — current GS source.",
|
|
1369
|
+
"$extensions": {
|
|
1370
|
+
"graphicstandard": {
|
|
1371
|
+
"family": "dimension",
|
|
1372
|
+
"layer": "semantic",
|
|
1373
|
+
"value": {
|
|
1374
|
+
"kind": "scalar",
|
|
1375
|
+
"value": "10px"
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
},
|
|
1381
|
+
"shadow": {
|
|
1382
|
+
"modal-surface": {
|
|
1383
|
+
"$type": "shadow",
|
|
1384
|
+
"$value": [
|
|
1385
|
+
{
|
|
1386
|
+
"offsetX": "0",
|
|
1387
|
+
"offsetY": "24px",
|
|
1388
|
+
"blur": "80px",
|
|
1389
|
+
"spread": "0",
|
|
1390
|
+
"color": "#0d0d0d2e",
|
|
1391
|
+
"inset": false
|
|
1392
|
+
},
|
|
1393
|
+
{
|
|
1394
|
+
"offsetX": "0",
|
|
1395
|
+
"offsetY": "2px",
|
|
1396
|
+
"blur": "12px",
|
|
1397
|
+
"spread": "0",
|
|
1398
|
+
"color": "#0d0d0d14",
|
|
1399
|
+
"inset": false
|
|
1400
|
+
}
|
|
1401
|
+
],
|
|
1402
|
+
"$description": "Modal surface shadow — current GS source.",
|
|
1403
|
+
"$extensions": {
|
|
1404
|
+
"graphicstandard": {
|
|
1405
|
+
"family": "shadow",
|
|
1406
|
+
"layer": "semantic",
|
|
1407
|
+
"value": {
|
|
1408
|
+
"kind": "shadow",
|
|
1409
|
+
"value": [
|
|
1410
|
+
{
|
|
1411
|
+
"x": "0",
|
|
1412
|
+
"y": "24px",
|
|
1413
|
+
"blur": "80px",
|
|
1414
|
+
"color": "#0d0d0d2e"
|
|
1415
|
+
},
|
|
1416
|
+
{
|
|
1417
|
+
"x": "0",
|
|
1418
|
+
"y": "2px",
|
|
1419
|
+
"blur": "12px",
|
|
1420
|
+
"color": "#0d0d0d14"
|
|
1421
|
+
}
|
|
1422
|
+
]
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
}
|
|
1427
|
+
},
|
|
1428
|
+
"motion": {
|
|
1429
|
+
"modal": {
|
|
1430
|
+
"content-enter-delay": {
|
|
1431
|
+
"$type": "duration",
|
|
1432
|
+
"$value": "280ms",
|
|
1433
|
+
"$description": "Split-modal first content entrance delay.",
|
|
1434
|
+
"$extensions": {
|
|
1435
|
+
"graphicstandard": {
|
|
1436
|
+
"family": "motion",
|
|
1437
|
+
"layer": "semantic",
|
|
1438
|
+
"value": {
|
|
1439
|
+
"kind": "motion",
|
|
1440
|
+
"value": {
|
|
1441
|
+
"motion": "duration",
|
|
1442
|
+
"value": {
|
|
1443
|
+
"ms": 280
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
},
|
|
1450
|
+
"content-enter-duration": {
|
|
1451
|
+
"$type": "duration",
|
|
1452
|
+
"$value": "420ms",
|
|
1453
|
+
"$description": "Split-modal content entrance duration.",
|
|
1454
|
+
"$extensions": {
|
|
1455
|
+
"graphicstandard": {
|
|
1456
|
+
"family": "motion",
|
|
1457
|
+
"layer": "semantic",
|
|
1458
|
+
"value": {
|
|
1459
|
+
"kind": "motion",
|
|
1460
|
+
"value": {
|
|
1461
|
+
"motion": "duration",
|
|
1462
|
+
"value": {
|
|
1463
|
+
"ms": 420
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
},
|
|
1470
|
+
"content-enter-stagger": {
|
|
1471
|
+
"$type": "duration",
|
|
1472
|
+
"$value": "60ms",
|
|
1473
|
+
"$description": "Split-modal content stagger interval.",
|
|
1474
|
+
"$extensions": {
|
|
1475
|
+
"graphicstandard": {
|
|
1476
|
+
"family": "motion",
|
|
1477
|
+
"layer": "semantic",
|
|
1478
|
+
"value": {
|
|
1479
|
+
"kind": "motion",
|
|
1480
|
+
"value": {
|
|
1481
|
+
"motion": "duration",
|
|
1482
|
+
"value": {
|
|
1483
|
+
"ms": 60
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
},
|
|
1490
|
+
"enter-duration": {
|
|
1491
|
+
"$type": "duration",
|
|
1492
|
+
"$value": "520ms",
|
|
1493
|
+
"$description": "Modal overlay and surface entrance duration.",
|
|
1494
|
+
"$extensions": {
|
|
1495
|
+
"graphicstandard": {
|
|
1496
|
+
"family": "motion",
|
|
1497
|
+
"layer": "semantic",
|
|
1498
|
+
"value": {
|
|
1499
|
+
"kind": "motion",
|
|
1500
|
+
"value": {
|
|
1501
|
+
"motion": "duration",
|
|
1502
|
+
"value": {
|
|
1503
|
+
"ms": 520
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
},
|
|
1510
|
+
"enter-easing": {
|
|
1511
|
+
"$type": "cubicBezier",
|
|
1512
|
+
"$value": [
|
|
1513
|
+
0.16,
|
|
1514
|
+
1,
|
|
1515
|
+
0.3,
|
|
1516
|
+
1
|
|
1517
|
+
],
|
|
1518
|
+
"$description": "Modal entrance easing — soft source-style deceleration.",
|
|
1519
|
+
"$extensions": {
|
|
1520
|
+
"graphicstandard": {
|
|
1521
|
+
"family": "motion",
|
|
1522
|
+
"layer": "semantic",
|
|
1523
|
+
"value": {
|
|
1524
|
+
"kind": "motion",
|
|
1525
|
+
"value": {
|
|
1526
|
+
"motion": "easing",
|
|
1527
|
+
"value": {
|
|
1528
|
+
"kind": "cubicBezier",
|
|
1529
|
+
"points": [
|
|
1530
|
+
0.16,
|
|
1531
|
+
1,
|
|
1532
|
+
0.3,
|
|
1533
|
+
1
|
|
1534
|
+
]
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
},
|
|
1541
|
+
"exit-duration": {
|
|
1542
|
+
"$type": "duration",
|
|
1543
|
+
"$value": "360ms",
|
|
1544
|
+
"$description": "Modal overlay and surface exit duration.",
|
|
1545
|
+
"$extensions": {
|
|
1546
|
+
"graphicstandard": {
|
|
1547
|
+
"family": "motion",
|
|
1548
|
+
"layer": "semantic",
|
|
1549
|
+
"value": {
|
|
1550
|
+
"kind": "motion",
|
|
1551
|
+
"value": {
|
|
1552
|
+
"motion": "duration",
|
|
1553
|
+
"value": {
|
|
1554
|
+
"ms": 360
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
}
|
|
1560
|
+
},
|
|
1561
|
+
"exit-easing": {
|
|
1562
|
+
"$type": "cubicBezier",
|
|
1563
|
+
"$value": [
|
|
1564
|
+
0.4,
|
|
1565
|
+
0,
|
|
1566
|
+
0.2,
|
|
1567
|
+
1
|
|
1568
|
+
],
|
|
1569
|
+
"$description": "Modal exit easing — standard source-style acceleration.",
|
|
1570
|
+
"$extensions": {
|
|
1571
|
+
"graphicstandard": {
|
|
1572
|
+
"family": "motion",
|
|
1573
|
+
"layer": "semantic",
|
|
1574
|
+
"value": {
|
|
1575
|
+
"kind": "motion",
|
|
1576
|
+
"value": {
|
|
1577
|
+
"motion": "easing",
|
|
1578
|
+
"value": {
|
|
1579
|
+
"kind": "cubicBezier",
|
|
1580
|
+
"points": [
|
|
1581
|
+
0.4,
|
|
1582
|
+
0,
|
|
1583
|
+
0.2,
|
|
1584
|
+
1
|
|
1585
|
+
]
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
},
|
|
1592
|
+
"origin-scale-max": {
|
|
1593
|
+
"$type": "number",
|
|
1594
|
+
"$value": "0.96",
|
|
1595
|
+
"$description": "Default modal entrance/exit scale.",
|
|
1596
|
+
"$extensions": {
|
|
1597
|
+
"graphicstandard": {
|
|
1598
|
+
"family": "number",
|
|
1599
|
+
"layer": "semantic",
|
|
1600
|
+
"value": {
|
|
1601
|
+
"kind": "scalar",
|
|
1602
|
+
"value": "0.96"
|
|
1603
|
+
}
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1606
|
+
},
|
|
1607
|
+
"origin-scale-min": {
|
|
1608
|
+
"$type": "number",
|
|
1609
|
+
"$value": "0.82",
|
|
1610
|
+
"$description": "Minimum modal trigger-origin scale.",
|
|
1611
|
+
"$extensions": {
|
|
1612
|
+
"graphicstandard": {
|
|
1613
|
+
"family": "number",
|
|
1614
|
+
"layer": "semantic",
|
|
1615
|
+
"value": {
|
|
1616
|
+
"kind": "scalar",
|
|
1617
|
+
"value": "0.82"
|
|
1618
|
+
}
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
},
|
|
1622
|
+
"panel-enter-delay": {
|
|
1623
|
+
"$type": "duration",
|
|
1624
|
+
"$value": "140ms",
|
|
1625
|
+
"$description": "Split-modal control panel entrance delay.",
|
|
1626
|
+
"$extensions": {
|
|
1627
|
+
"graphicstandard": {
|
|
1628
|
+
"family": "motion",
|
|
1629
|
+
"layer": "semantic",
|
|
1630
|
+
"value": {
|
|
1631
|
+
"kind": "motion",
|
|
1632
|
+
"value": {
|
|
1633
|
+
"motion": "duration",
|
|
1634
|
+
"value": {
|
|
1635
|
+
"ms": 140
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1641
|
+
},
|
|
1642
|
+
"panel-enter-duration": {
|
|
1643
|
+
"$type": "duration",
|
|
1644
|
+
"$value": "460ms",
|
|
1645
|
+
"$description": "Split-modal control panel entrance duration.",
|
|
1646
|
+
"$extensions": {
|
|
1647
|
+
"graphicstandard": {
|
|
1648
|
+
"family": "motion",
|
|
1649
|
+
"layer": "semantic",
|
|
1650
|
+
"value": {
|
|
1651
|
+
"kind": "motion",
|
|
1652
|
+
"value": {
|
|
1653
|
+
"motion": "duration",
|
|
1654
|
+
"value": {
|
|
1655
|
+
"ms": 460
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
}
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
},
|
|
1131
1664
|
"radius": {
|
|
1132
1665
|
"2xl": {
|
|
1133
1666
|
"$type": "dimension",
|
|
@@ -1313,6 +1846,21 @@
|
|
|
1313
1846
|
}
|
|
1314
1847
|
},
|
|
1315
1848
|
"tracking": {
|
|
1849
|
+
"display-large": {
|
|
1850
|
+
"$type": "dimension",
|
|
1851
|
+
"$value": "-0.0666667em",
|
|
1852
|
+
"$description": "Letter spacing — large product display (-2px at 30px).",
|
|
1853
|
+
"$extensions": {
|
|
1854
|
+
"graphicstandard": {
|
|
1855
|
+
"family": "dimension",
|
|
1856
|
+
"layer": "semantic",
|
|
1857
|
+
"value": {
|
|
1858
|
+
"kind": "scalar",
|
|
1859
|
+
"value": "-0.0666667em"
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
}
|
|
1863
|
+
},
|
|
1316
1864
|
"normal": {
|
|
1317
1865
|
"$type": "dimension",
|
|
1318
1866
|
"$value": "0.01em",
|
package/src/variables.css
CHANGED
|
@@ -21,7 +21,11 @@
|
|
|
21
21
|
--color-fg: #0d0d0d;
|
|
22
22
|
--color-fg-inverted: #ffffff;
|
|
23
23
|
--color-fg-muted: #7d786f;
|
|
24
|
+
--color-fg-on-brand: #0d0d0d;
|
|
24
25
|
--color-fg-subtle: #b3b3b3;
|
|
26
|
+
--color-fg-workflow-muted: #858585;
|
|
27
|
+
--color-modal-backdrop: #f7f6f2a8;
|
|
28
|
+
--color-modal-backdrop-fallback: #f7f6f2c2;
|
|
25
29
|
--color-neutral-300: #b3b3b3;
|
|
26
30
|
--color-neutral-600: #333333;
|
|
27
31
|
--color-ring: #0d0d0d;
|
|
@@ -32,6 +36,8 @@
|
|
|
32
36
|
--color-surface-inverted: #242423;
|
|
33
37
|
--color-surface-muted: #eceae1;
|
|
34
38
|
--color-surface-placeholder: #333333;
|
|
39
|
+
--control-height-tall: 3.625rem;
|
|
40
|
+
--effect-modal-backdrop-blur: 10px;
|
|
35
41
|
--font-mono: 'GT America Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
|
|
36
42
|
--font-sans: 'GT America', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
|
37
43
|
--font-size-body: 1rem;
|
|
@@ -39,6 +45,7 @@
|
|
|
39
45
|
--font-size-caption: 0.6875rem;
|
|
40
46
|
--font-size-compact: 0.8125rem;
|
|
41
47
|
--font-size-display: 1.75rem;
|
|
48
|
+
--font-size-display-large: 1.875rem;
|
|
42
49
|
--font-size-heading1: 1.75rem;
|
|
43
50
|
--font-size-heading2: 1.375rem;
|
|
44
51
|
--font-size-heading3: 1.25rem;
|
|
@@ -47,14 +54,32 @@
|
|
|
47
54
|
--font-size-headline: 1.375rem;
|
|
48
55
|
--font-size-label: 0.75rem;
|
|
49
56
|
--font-size-micro: 0.625rem;
|
|
57
|
+
--font-size-panel-heading: 1.0625rem;
|
|
50
58
|
--font-size-small: 0.875rem;
|
|
51
59
|
--font-size-subtitle: 1.125rem;
|
|
52
60
|
--font-size-title: 1.25rem;
|
|
53
61
|
--line-height-heading1: 30px;
|
|
62
|
+
--line-height-display-large: 32px;
|
|
54
63
|
--line-height-heading2: 24px;
|
|
55
64
|
--line-height-heading3: 22px;
|
|
56
65
|
--line-height-heading4: 22px;
|
|
57
66
|
--line-height-heading5: 20px;
|
|
67
|
+
--line-height-body: 22px;
|
|
68
|
+
--line-height-compact: 16px;
|
|
69
|
+
--line-height-display: 30px;
|
|
70
|
+
--line-height-panel-heading: 20px;
|
|
71
|
+
--line-height-small: 18px;
|
|
72
|
+
--motion-modal-content-enter-delay: 280ms;
|
|
73
|
+
--motion-modal-content-enter-duration: 420ms;
|
|
74
|
+
--motion-modal-content-enter-stagger: 60ms;
|
|
75
|
+
--motion-modal-enter-duration: 520ms;
|
|
76
|
+
--motion-modal-enter-easing: cubic-bezier(0.16, 1, 0.3, 1);
|
|
77
|
+
--motion-modal-exit-duration: 360ms;
|
|
78
|
+
--motion-modal-exit-easing: cubic-bezier(0.4, 0, 0.2, 1);
|
|
79
|
+
--motion-modal-origin-scale-max: 0.96;
|
|
80
|
+
--motion-modal-origin-scale-min: 0.82;
|
|
81
|
+
--motion-modal-panel-enter-delay: 140ms;
|
|
82
|
+
--motion-modal-panel-enter-duration: 460ms;
|
|
58
83
|
--radius-2xl: 1rem;
|
|
59
84
|
--radius-lg: 0.5rem;
|
|
60
85
|
--radius-md: 0.375rem;
|
|
@@ -67,8 +92,10 @@
|
|
|
67
92
|
--space-sm: 0.5rem;
|
|
68
93
|
--space-xl: 2rem;
|
|
69
94
|
--space-xs: 0.25rem;
|
|
95
|
+
--shadow-modal-surface: 0 24px 80px #0d0d0d2e, 0 2px 12px #0d0d0d14;
|
|
70
96
|
--tracking-normal: 0.01em;
|
|
71
97
|
--tracking-tight: 0em;
|
|
98
|
+
--tracking-display-large: -0.0666667em;
|
|
72
99
|
--tracking-wide: 0.02em;
|
|
73
100
|
--tracking-wider: 0.03em;
|
|
74
101
|
}
|