@insymetri/styleguide 0.1.87 → 0.1.89

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.
@@ -4,6 +4,7 @@ declare const _default: {
4
4
  backgroundColor: {
5
5
  primary: string;
6
6
  'primary-hover': string;
7
+ 'primary-soft': string;
7
8
  accent: string;
8
9
  'accent-hover': string;
9
10
  secondary: string;
@@ -16,6 +17,10 @@ declare const _default: {
16
17
  'surface-raised': string;
17
18
  background: string;
18
19
  'background-alt': string;
20
+ app: string;
21
+ 'success-soft': string;
22
+ 'warning-soft': string;
23
+ 'error-soft': string;
19
24
  'background-l0': string;
20
25
  'background-l1': string;
21
26
  'background-l2': string;
@@ -252,111 +257,148 @@ declare const _default: {
252
257
  blue: string;
253
258
  };
254
259
  fontSize: {
255
- readonly h1: readonly ["2.4rem", {
256
- readonly lineHeight: "3.2rem";
260
+ readonly h1: readonly ["2.6rem", {
261
+ readonly lineHeight: "3.0rem";
257
262
  readonly fontWeight: "600";
263
+ readonly letterSpacing: "-0.02em";
258
264
  }];
259
265
  readonly h2: readonly ["2.0rem", {
260
- readonly lineHeight: "2.8rem";
266
+ readonly lineHeight: "2.6rem";
261
267
  readonly fontWeight: "600";
268
+ readonly letterSpacing: "-0.02em";
262
269
  }];
263
270
  readonly h3: readonly ["1.8rem", {
264
271
  readonly lineHeight: "2.4rem";
265
272
  readonly fontWeight: "600";
273
+ readonly letterSpacing: "-0.02em";
266
274
  }];
267
- readonly h4: readonly ["1.6rem", {
275
+ readonly h4: readonly ["1.5rem", {
268
276
  readonly lineHeight: "2.0rem";
269
277
  readonly fontWeight: "600";
278
+ readonly letterSpacing: "-0.01em";
270
279
  }];
271
280
  readonly h5: readonly ["1.4rem", {
272
- readonly lineHeight: "2.0rem";
281
+ readonly lineHeight: "1.9rem";
273
282
  readonly fontWeight: "600";
283
+ readonly letterSpacing: "-0.01em";
274
284
  }];
275
285
  readonly h6: readonly ["1.3rem", {
276
- readonly lineHeight: "1.6rem";
286
+ readonly lineHeight: "1.8rem";
277
287
  readonly fontWeight: "600";
288
+ readonly letterSpacing: "-0.005em";
278
289
  }];
279
290
  readonly m1: readonly ["2.0rem", {
280
291
  readonly lineHeight: "2.8rem";
281
292
  readonly fontWeight: "300";
293
+ readonly letterSpacing: "-0.02em";
282
294
  }];
283
295
  readonly m2: readonly ["1.6rem", {
284
296
  readonly lineHeight: "2.4rem";
285
297
  readonly fontWeight: "300";
298
+ readonly letterSpacing: "-0.01em";
286
299
  }];
287
300
  readonly 'm2-emphasis': readonly ["1.6rem", {
288
301
  readonly lineHeight: "2.4rem";
289
302
  readonly fontWeight: "500";
303
+ readonly letterSpacing: "-0.01em";
290
304
  }];
291
305
  readonly m3: readonly ["1.4rem", {
292
306
  readonly lineHeight: "2.0rem";
293
307
  readonly fontWeight: "300";
308
+ readonly letterSpacing: "-0.005em";
294
309
  }];
295
310
  readonly 'm3-emphasis': readonly ["1.3rem", {
296
311
  readonly lineHeight: "2.0rem";
297
312
  readonly fontWeight: "500";
313
+ readonly letterSpacing: "-0.005em";
298
314
  }];
299
315
  readonly 'm3-small': readonly ["1.3rem", {
300
316
  readonly lineHeight: "2.0rem";
301
317
  readonly fontWeight: "400";
318
+ readonly letterSpacing: "-0.005em";
302
319
  }];
303
- readonly large: readonly ["1.6rem", {
304
- readonly lineHeight: "2.0rem";
320
+ readonly large: readonly ["1.5rem", {
321
+ readonly lineHeight: "2.2rem";
305
322
  readonly fontWeight: "400";
323
+ readonly letterSpacing: "-0.01em";
306
324
  }];
307
- readonly 'large-emphasis': readonly ["1.6rem", {
308
- readonly lineHeight: "2.0rem";
325
+ readonly 'large-emphasis': readonly ["1.5rem", {
326
+ readonly lineHeight: "2.2rem";
309
327
  readonly fontWeight: "500";
328
+ readonly letterSpacing: "-0.01em";
310
329
  }];
311
330
  readonly default: readonly ["1.3rem", {
312
- readonly lineHeight: "1.6rem";
331
+ readonly lineHeight: "1.95rem";
313
332
  readonly fontWeight: "400";
333
+ readonly letterSpacing: "-0.005em";
314
334
  }];
315
335
  readonly emphasis: readonly ["1.3rem", {
316
- readonly lineHeight: "1.6rem";
336
+ readonly lineHeight: "1.95rem";
317
337
  readonly fontWeight: "500";
338
+ readonly letterSpacing: "-0.005em";
318
339
  }];
319
340
  readonly strong: readonly ["1.3rem", {
320
- readonly lineHeight: "1.6rem";
341
+ readonly lineHeight: "1.95rem";
321
342
  readonly fontWeight: "600";
343
+ readonly letterSpacing: "-0.005em";
322
344
  }];
323
- readonly small: readonly ["1.2rem", {
324
- readonly lineHeight: "1.6rem";
345
+ readonly small: readonly ["1.25rem", {
346
+ readonly lineHeight: "1.7rem";
325
347
  readonly fontWeight: "400";
348
+ readonly letterSpacing: "0";
326
349
  }];
327
- readonly 'small-emphasis': readonly ["1.2rem", {
328
- readonly lineHeight: "1.6rem";
350
+ readonly 'small-emphasis': readonly ["1.25rem", {
351
+ readonly lineHeight: "1.7rem";
329
352
  readonly fontWeight: "500";
353
+ readonly letterSpacing: "0";
330
354
  }];
331
- readonly 'small-strong': readonly ["1.2rem", {
332
- readonly lineHeight: "1.6rem";
355
+ readonly 'small-strong': readonly ["1.25rem", {
356
+ readonly lineHeight: "1.7rem";
333
357
  readonly fontWeight: "600";
358
+ readonly letterSpacing: "0";
334
359
  }];
335
- readonly tiny: readonly ["1.1rem", {
336
- readonly lineHeight: "1.2rem";
360
+ readonly tiny: readonly ["1.15rem", {
361
+ readonly lineHeight: "1.5rem";
337
362
  readonly fontWeight: "400";
363
+ readonly letterSpacing: "0";
338
364
  }];
339
- readonly 'tiny-emphasis': readonly ["1.1rem", {
340
- readonly lineHeight: "1.2rem";
365
+ readonly 'tiny-emphasis': readonly ["1.15rem", {
366
+ readonly lineHeight: "1.5rem";
341
367
  readonly fontWeight: "500";
368
+ readonly letterSpacing: "0";
342
369
  }];
343
- readonly 'tiny-strong': readonly ["1.1rem", {
344
- readonly lineHeight: "1.2rem";
370
+ readonly 'tiny-strong': readonly ["1.15rem", {
371
+ readonly lineHeight: "1.5rem";
345
372
  readonly fontWeight: "600";
373
+ readonly letterSpacing: "0";
346
374
  }];
347
- readonly numeric: readonly ["1.4rem", {
348
- readonly lineHeight: "1.6rem";
375
+ readonly micro: readonly ["1.05rem", {
376
+ readonly lineHeight: "1.575rem";
377
+ readonly fontWeight: "500";
378
+ readonly letterSpacing: "0.06em";
379
+ }];
380
+ readonly numeric: readonly ["1.3rem", {
381
+ readonly lineHeight: "1.8rem";
349
382
  readonly fontWeight: "400";
383
+ readonly letterSpacing: "0";
384
+ }];
385
+ readonly amount: readonly ["2.6rem", {
386
+ readonly lineHeight: "2.9rem";
387
+ readonly fontWeight: "600";
388
+ readonly letterSpacing: "-0.03em";
350
389
  }];
351
390
  readonly 'display-lg': readonly ["4.0rem", {
352
391
  readonly lineHeight: "1.1";
392
+ readonly letterSpacing: "-0.03em";
353
393
  }];
354
394
  readonly 'display-md': readonly ["3.0rem", {
355
395
  readonly lineHeight: "1.2";
396
+ readonly letterSpacing: "-0.025em";
356
397
  }];
357
398
  readonly 'display-sm': readonly ["2.4rem", {
358
399
  readonly lineHeight: "1.2";
359
400
  readonly fontWeight: "500";
401
+ readonly letterSpacing: "-0.02em";
360
402
  }];
361
403
  };
362
404
  spacing: Record<string, string>;
@@ -365,6 +407,7 @@ declare const _default: {
365
407
  pill: string;
366
408
  subtle: string;
367
409
  card: string;
410
+ 'comm-hover': string;
368
411
  'card-hover': string;
369
412
  dropdown: string;
370
413
  submenu: string;
@@ -372,11 +415,10 @@ declare const _default: {
372
415
  floating: string;
373
416
  drawer: string;
374
417
  toast: string;
375
- 'focus-ring': string;
376
- 'selection-ring': string;
377
- 'comm-hover': string;
378
418
  'login-card': string;
379
419
  'dialog-overlay': string;
420
+ 'focus-ring': string;
421
+ 'selection-ring': string;
380
422
  };
381
423
  borderRadius: Record<string, string>;
382
424
  zIndex: Record<string, string>;
@@ -413,6 +455,15 @@ declare const _default: {
413
455
  full: string;
414
456
  screen: string;
415
457
  };
458
+ letterSpacing: {
459
+ tighter: string;
460
+ tight: string;
461
+ snug: string;
462
+ normal: string;
463
+ none: string;
464
+ label: string;
465
+ wide: string;
466
+ };
416
467
  extend: {
417
468
  keyframes: {
418
469
  loginFadeInUp: {
@@ -626,6 +677,8 @@ declare const _default: {
626
677
  };
627
678
  fontFamily: {
628
679
  inherit: string;
680
+ sans: string;
681
+ mono: string;
629
682
  };
630
683
  textColor: {
631
684
  inherit: string;
@@ -47,6 +47,18 @@ export default {
47
47
  full: '100%',
48
48
  screen: '100vh',
49
49
  }),
50
+ letterSpacing: {
51
+ // Negative tracking scales with type size — see typography.ts.
52
+ tighter: '-0.03em',
53
+ tight: '-0.02em',
54
+ snug: '-0.01em',
55
+ normal: '-0.005em',
56
+ none: '0',
57
+ // Positive tracking, for the uppercase section labels only. Caps at
58
+ // 10–11px are unreadable without it.
59
+ label: '0.06em',
60
+ wide: '0.04em',
61
+ },
50
62
  extend: {
51
63
  keyframes,
52
64
  animation,
@@ -86,8 +98,17 @@ export default {
86
98
  'auto-340': 'repeat(auto-fill, minmax(340px, 1fr))',
87
99
  'auto-fit-200': 'repeat(auto-fit, minmax(200px, 1fr))',
88
100
  },
101
+ // Both go through the variables base.css defines, for the same reason the
102
+ // `body` rule does: this package ships no font files, so an app that has not
103
+ // self-hosted the face must be able to point `--font-family` somewhere else
104
+ // and have `font-sans` follow. Hardcoding the stack here would leave
105
+ // `font-sans` still asking for a font that 404s.
89
106
  fontFamily: {
90
107
  inherit: 'inherit',
108
+ sans: 'var(--font-family)',
109
+ // No mono FACE is shipped; `--font-family-mono` is the system stack, which
110
+ // is what `font-mono` resolved to before it was named.
111
+ mono: 'var(--font-family-mono)',
91
112
  },
92
113
  textColor: {
93
114
  inherit: 'inherit',
@@ -3,6 +3,7 @@ export declare const boxShadow: {
3
3
  pill: string;
4
4
  subtle: string;
5
5
  card: string;
6
+ 'comm-hover': string;
6
7
  'card-hover': string;
7
8
  dropdown: string;
8
9
  submenu: string;
@@ -10,9 +11,8 @@ export declare const boxShadow: {
10
11
  floating: string;
11
12
  drawer: string;
12
13
  toast: string;
13
- 'focus-ring': string;
14
- 'selection-ring': string;
15
- 'comm-hover': string;
16
14
  'login-card': string;
17
15
  'dialog-overlay': string;
16
+ 'focus-ring': string;
17
+ 'selection-ring': string;
18
18
  };
@@ -1,33 +1,32 @@
1
+ // Elevation maps onto the three tiers defined in style/colors.css (and swapped
2
+ // for dark surfaces in style/dark.css). Keeping the utility names stable means
3
+ // no call site changes; only what they resolve to does.
4
+ //
5
+ // tier 1 — hairline lift: buttons at rest, cards, active segment thumbs
6
+ // tier 2 — ambient float: menus, popovers, tooltips, raised/hovered cards
7
+ // tier 3 — modal scale: dialogs, drawers, toasts
8
+ const T1 = 'var(--ii-shadow-1)';
9
+ const T2 = 'var(--ii-shadow-2)';
10
+ const T3 = 'var(--ii-shadow-3)';
1
11
  export const boxShadow = {
2
12
  none: 'none',
3
- // Pill elevation (pills, tags, small controls)
4
- pill: '0 3px 6px -2px rgba(0, 0, 0, 0.02), 0 1px 1px 0 rgba(0, 0, 0, 0.04), inset 0 0 0 0.5px rgba(0, 0, 0, 0.08)',
5
- // Subtle elevation (switch knobs, active pills)
6
- subtle: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',
7
- // Cards at rest
8
- card: '0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06)',
9
- // Card hover / raised state
10
- 'card-hover': '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)',
11
- // Dropdown menus, popovers, comboboxes, date pickers
12
- dropdown: '0 6px 18px rgba(0, 0, 0, 0.02), 0 3px 9px rgba(0, 0, 0, 0.04), 0 1px 1px rgba(0, 0, 0, 0.04)',
13
- // Submenu / nested floating panels
14
- submenu: '0 9px 48px rgba(0, 0, 0, 0.08), 0 6px 24px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(0, 0, 0, 0.04)',
15
- // Modal dialogs
16
- modal: '0 25px 50px -12px rgba(0, 0, 0, 0.25)',
17
- // Floating dialogs / modals shown without an overlay — needs to read as elevated on its own
18
- floating: '0 0 0 1px rgba(0, 0, 0, 0.06), 0 10px 24px -4px rgba(0, 0, 0, 0.12), 0 24px 60px -12px rgba(0, 0, 0, 0.22)',
19
- // Side drawers / floating panels
20
- drawer: '0 25px 50px -12px rgba(0, 0, 0, 0.25)',
21
- // Toast notifications
22
- toast: '0 4px 24px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.08)',
23
- // Focus ring — input/control focus state
13
+ // Tier 1 — at rest
14
+ pill: T1,
15
+ subtle: T1,
16
+ card: T1,
17
+ 'comm-hover': T1,
18
+ // Tier 2 — floating above the page
19
+ 'card-hover': T2,
20
+ dropdown: T2,
21
+ submenu: T2,
22
+ // Tier 3 — modal scale
23
+ modal: T3,
24
+ floating: T3,
25
+ drawer: T3,
26
+ toast: T3,
27
+ 'login-card': T3,
28
+ 'dialog-overlay': T3,
29
+ // Rings — the focus ring is the teal accent, never the near-black primary
24
30
  'focus-ring': '0 0 0 3px var(--ii-focus-primary)',
25
- // Selection ring — selected item indicator
26
31
  'selection-ring': '0 0 0 2px var(--ii-primary-20)',
27
- // Communication card hover
28
- 'comm-hover': '0 2px 8px var(--ii-shadow-subtle-color)',
29
- // Login card — deep overlay shadow
30
- 'login-card': '0 20px 60px var(--ii-overlay), 0 0 1px var(--ii-hover-overlay)',
31
- // Dialog overlay — elevated panel
32
- 'dialog-overlay': '0 20px 25px -5px var(--ii-hover-overlay), 0 10px 10px -5px var(--ii-shadow-xs)',
33
32
  };
@@ -1,108 +1,145 @@
1
1
  export declare const fontSize: {
2
- readonly h1: readonly ["2.4rem", {
3
- readonly lineHeight: "3.2rem";
2
+ readonly h1: readonly ["2.6rem", {
3
+ readonly lineHeight: "3.0rem";
4
4
  readonly fontWeight: "600";
5
+ readonly letterSpacing: "-0.02em";
5
6
  }];
6
7
  readonly h2: readonly ["2.0rem", {
7
- readonly lineHeight: "2.8rem";
8
+ readonly lineHeight: "2.6rem";
8
9
  readonly fontWeight: "600";
10
+ readonly letterSpacing: "-0.02em";
9
11
  }];
10
12
  readonly h3: readonly ["1.8rem", {
11
13
  readonly lineHeight: "2.4rem";
12
14
  readonly fontWeight: "600";
15
+ readonly letterSpacing: "-0.02em";
13
16
  }];
14
- readonly h4: readonly ["1.6rem", {
17
+ readonly h4: readonly ["1.5rem", {
15
18
  readonly lineHeight: "2.0rem";
16
19
  readonly fontWeight: "600";
20
+ readonly letterSpacing: "-0.01em";
17
21
  }];
18
22
  readonly h5: readonly ["1.4rem", {
19
- readonly lineHeight: "2.0rem";
23
+ readonly lineHeight: "1.9rem";
20
24
  readonly fontWeight: "600";
25
+ readonly letterSpacing: "-0.01em";
21
26
  }];
22
27
  readonly h6: readonly ["1.3rem", {
23
- readonly lineHeight: "1.6rem";
28
+ readonly lineHeight: "1.8rem";
24
29
  readonly fontWeight: "600";
30
+ readonly letterSpacing: "-0.005em";
25
31
  }];
26
32
  readonly m1: readonly ["2.0rem", {
27
33
  readonly lineHeight: "2.8rem";
28
34
  readonly fontWeight: "300";
35
+ readonly letterSpacing: "-0.02em";
29
36
  }];
30
37
  readonly m2: readonly ["1.6rem", {
31
38
  readonly lineHeight: "2.4rem";
32
39
  readonly fontWeight: "300";
40
+ readonly letterSpacing: "-0.01em";
33
41
  }];
34
42
  readonly 'm2-emphasis': readonly ["1.6rem", {
35
43
  readonly lineHeight: "2.4rem";
36
44
  readonly fontWeight: "500";
45
+ readonly letterSpacing: "-0.01em";
37
46
  }];
38
47
  readonly m3: readonly ["1.4rem", {
39
48
  readonly lineHeight: "2.0rem";
40
49
  readonly fontWeight: "300";
50
+ readonly letterSpacing: "-0.005em";
41
51
  }];
42
52
  readonly 'm3-emphasis': readonly ["1.3rem", {
43
53
  readonly lineHeight: "2.0rem";
44
54
  readonly fontWeight: "500";
55
+ readonly letterSpacing: "-0.005em";
45
56
  }];
46
57
  readonly 'm3-small': readonly ["1.3rem", {
47
58
  readonly lineHeight: "2.0rem";
48
59
  readonly fontWeight: "400";
60
+ readonly letterSpacing: "-0.005em";
49
61
  }];
50
- readonly large: readonly ["1.6rem", {
51
- readonly lineHeight: "2.0rem";
62
+ readonly large: readonly ["1.5rem", {
63
+ readonly lineHeight: "2.2rem";
52
64
  readonly fontWeight: "400";
65
+ readonly letterSpacing: "-0.01em";
53
66
  }];
54
- readonly 'large-emphasis': readonly ["1.6rem", {
55
- readonly lineHeight: "2.0rem";
67
+ readonly 'large-emphasis': readonly ["1.5rem", {
68
+ readonly lineHeight: "2.2rem";
56
69
  readonly fontWeight: "500";
70
+ readonly letterSpacing: "-0.01em";
57
71
  }];
58
72
  readonly default: readonly ["1.3rem", {
59
- readonly lineHeight: "1.6rem";
73
+ readonly lineHeight: "1.95rem";
60
74
  readonly fontWeight: "400";
75
+ readonly letterSpacing: "-0.005em";
61
76
  }];
62
77
  readonly emphasis: readonly ["1.3rem", {
63
- readonly lineHeight: "1.6rem";
78
+ readonly lineHeight: "1.95rem";
64
79
  readonly fontWeight: "500";
80
+ readonly letterSpacing: "-0.005em";
65
81
  }];
66
82
  readonly strong: readonly ["1.3rem", {
67
- readonly lineHeight: "1.6rem";
83
+ readonly lineHeight: "1.95rem";
68
84
  readonly fontWeight: "600";
85
+ readonly letterSpacing: "-0.005em";
69
86
  }];
70
- readonly small: readonly ["1.2rem", {
71
- readonly lineHeight: "1.6rem";
87
+ readonly small: readonly ["1.25rem", {
88
+ readonly lineHeight: "1.7rem";
72
89
  readonly fontWeight: "400";
90
+ readonly letterSpacing: "0";
73
91
  }];
74
- readonly 'small-emphasis': readonly ["1.2rem", {
75
- readonly lineHeight: "1.6rem";
92
+ readonly 'small-emphasis': readonly ["1.25rem", {
93
+ readonly lineHeight: "1.7rem";
76
94
  readonly fontWeight: "500";
95
+ readonly letterSpacing: "0";
77
96
  }];
78
- readonly 'small-strong': readonly ["1.2rem", {
79
- readonly lineHeight: "1.6rem";
97
+ readonly 'small-strong': readonly ["1.25rem", {
98
+ readonly lineHeight: "1.7rem";
80
99
  readonly fontWeight: "600";
100
+ readonly letterSpacing: "0";
81
101
  }];
82
- readonly tiny: readonly ["1.1rem", {
83
- readonly lineHeight: "1.2rem";
102
+ readonly tiny: readonly ["1.15rem", {
103
+ readonly lineHeight: "1.5rem";
84
104
  readonly fontWeight: "400";
105
+ readonly letterSpacing: "0";
85
106
  }];
86
- readonly 'tiny-emphasis': readonly ["1.1rem", {
87
- readonly lineHeight: "1.2rem";
107
+ readonly 'tiny-emphasis': readonly ["1.15rem", {
108
+ readonly lineHeight: "1.5rem";
88
109
  readonly fontWeight: "500";
110
+ readonly letterSpacing: "0";
89
111
  }];
90
- readonly 'tiny-strong': readonly ["1.1rem", {
91
- readonly lineHeight: "1.2rem";
112
+ readonly 'tiny-strong': readonly ["1.15rem", {
113
+ readonly lineHeight: "1.5rem";
92
114
  readonly fontWeight: "600";
115
+ readonly letterSpacing: "0";
93
116
  }];
94
- readonly numeric: readonly ["1.4rem", {
95
- readonly lineHeight: "1.6rem";
117
+ readonly micro: readonly ["1.05rem", {
118
+ readonly lineHeight: "1.575rem";
119
+ readonly fontWeight: "500";
120
+ readonly letterSpacing: "0.06em";
121
+ }];
122
+ readonly numeric: readonly ["1.3rem", {
123
+ readonly lineHeight: "1.8rem";
96
124
  readonly fontWeight: "400";
125
+ readonly letterSpacing: "0";
126
+ }];
127
+ readonly amount: readonly ["2.6rem", {
128
+ readonly lineHeight: "2.9rem";
129
+ readonly fontWeight: "600";
130
+ readonly letterSpacing: "-0.03em";
97
131
  }];
98
132
  readonly 'display-lg': readonly ["4.0rem", {
99
133
  readonly lineHeight: "1.1";
134
+ readonly letterSpacing: "-0.03em";
100
135
  }];
101
136
  readonly 'display-md': readonly ["3.0rem", {
102
137
  readonly lineHeight: "1.2";
138
+ readonly letterSpacing: "-0.025em";
103
139
  }];
104
140
  readonly 'display-sm': readonly ["2.4rem", {
105
141
  readonly lineHeight: "1.2";
106
142
  readonly fontWeight: "500";
143
+ readonly letterSpacing: "-0.02em";
107
144
  }];
108
145
  };
@@ -1,41 +1,67 @@
1
- // Semantic typography scale (matches TOTM conventions).
1
+ // Semantic typography scale.
2
2
  // With 62.5% base (1rem = 10px), rem values read as pixels: 2.4rem = 24px.
3
- // TW4's extended fontSize format bundles size + lineHeight + fontWeight
4
- // into a single class — e.g. `text-h1` sets all three properties.
3
+ // TW4's extended fontSize format bundles size + lineHeight + weight + tracking
4
+ // into a single class — e.g. `text-h1` sets all four properties.
5
+ //
6
+ // Tuned to the artifact type system. Three things define that look, and they
7
+ // matter more than the raw sizes:
8
+ //
9
+ // 1. Tracking tightens as size grows — body sits at -0.005em, headings run
10
+ // to -0.03em. At these sizes an untracked heading sprawls; this pulls it
11
+ // together. Not tied to one typeface — it was first tuned against Geist,
12
+ // and Inter, which measures ~5% WIDER at the same size, wants it at least
13
+ // as much.
14
+ // 2. Headings are 600, never 700. Emphasis in running text is 500. The jump
15
+ // from 400 to 700 reads as shouting at these sizes.
16
+ // 3. Body line-height is 1.5 and headings are 1.15–1.3 — tight enough that a
17
+ // two-line title still reads as one object.
18
+ //
19
+ // The half-pixel sizes (1.05rem, 1.15rem, 1.25rem, 1.35rem) are deliberate:
20
+ // they are what the artifacts use for dense metadata, and at 62.5% base they
21
+ // land on exact half-pixels rather than rounding artifacts.
22
+ //
23
+ // The loosened body leading is the biggest change here, not the weights, which
24
+ // did not move: 13px text went from a 16px line box to 19.5px, and `tiny` from
25
+ // 12px to 15px. Headings tightened the other way so a two-line title reads as
26
+ // one object.
5
27
  export const fontSize = {
6
- // Headings — semibold (600)
7
- h1: ['2.4rem', { lineHeight: '3.2rem', fontWeight: '600' }], // 24px
8
- h2: ['2.0rem', { lineHeight: '2.8rem', fontWeight: '600' }], // 20px
9
- h3: ['1.8rem', { lineHeight: '2.4rem', fontWeight: '600' }], // 18px
10
- h4: ['1.6rem', { lineHeight: '2.0rem', fontWeight: '600' }], // 16px
11
- h5: ['1.4rem', { lineHeight: '2.0rem', fontWeight: '600' }], // 14px
12
- h6: ['1.3rem', { lineHeight: '1.6rem', fontWeight: '600' }], // 13px
13
- // Medium — light weight display text (300)
14
- m1: ['2.0rem', { lineHeight: '2.8rem', fontWeight: '300' }], // 20px
15
- m2: ['1.6rem', { lineHeight: '2.4rem', fontWeight: '300' }], // 16px
16
- 'm2-emphasis': ['1.6rem', { lineHeight: '2.4rem', fontWeight: '500' }], // 16px
17
- m3: ['1.4rem', { lineHeight: '2.0rem', fontWeight: '300' }], // 14px
18
- 'm3-emphasis': ['1.3rem', { lineHeight: '2.0rem', fontWeight: '500' }], // 13px
19
- 'm3-small': ['1.3rem', { lineHeight: '2.0rem', fontWeight: '400' }], // 13px
20
- // Body — large (16px)
21
- large: ['1.6rem', { lineHeight: '2.0rem', fontWeight: '400' }],
22
- 'large-emphasis': ['1.6rem', { lineHeight: '2.0rem', fontWeight: '500' }],
23
- // Body — default (13px)
24
- default: ['1.3rem', { lineHeight: '1.6rem', fontWeight: '400' }],
25
- emphasis: ['1.3rem', { lineHeight: '1.6rem', fontWeight: '500' }],
26
- strong: ['1.3rem', { lineHeight: '1.6rem', fontWeight: '600' }],
27
- // Body — small (12px)
28
- small: ['1.2rem', { lineHeight: '1.6rem', fontWeight: '400' }],
29
- 'small-emphasis': ['1.2rem', { lineHeight: '1.6rem', fontWeight: '500' }],
30
- 'small-strong': ['1.2rem', { lineHeight: '1.6rem', fontWeight: '600' }],
31
- // Body — tiny (11px)
32
- tiny: ['1.1rem', { lineHeight: '1.2rem', fontWeight: '400' }],
33
- 'tiny-emphasis': ['1.1rem', { lineHeight: '1.2rem', fontWeight: '500' }],
34
- 'tiny-strong': ['1.1rem', { lineHeight: '1.2rem', fontWeight: '600' }],
35
- // Special — numeric uses monospace font (pair with font-mono class)
36
- numeric: ['1.4rem', { lineHeight: '1.6rem', fontWeight: '400' }], // 14px
37
- // Display — hero/feature sizes (no bundled weight)
38
- 'display-lg': ['4.0rem', { lineHeight: '1.1' }], // 40px
39
- 'display-md': ['3.0rem', { lineHeight: '1.2' }], // 30px
40
- 'display-sm': ['2.4rem', { lineHeight: '1.2', fontWeight: '500' }], // 24px
28
+ // Headings — semibold (600), tracking tightening with size
29
+ h1: ['2.6rem', { lineHeight: '3.0rem', fontWeight: '600', letterSpacing: '-0.02em' }], // 26px
30
+ h2: ['2.0rem', { lineHeight: '2.6rem', fontWeight: '600', letterSpacing: '-0.02em' }], // 20px
31
+ h3: ['1.8rem', { lineHeight: '2.4rem', fontWeight: '600', letterSpacing: '-0.02em' }], // 18px
32
+ h4: ['1.5rem', { lineHeight: '2.0rem', fontWeight: '600', letterSpacing: '-0.01em' }], // 15px
33
+ h5: ['1.4rem', { lineHeight: '1.9rem', fontWeight: '600', letterSpacing: '-0.01em' }], // 14px
34
+ h6: ['1.3rem', { lineHeight: '1.8rem', fontWeight: '600', letterSpacing: '-0.005em' }], // 13px
35
+ // Medium — light display text (300)
36
+ m1: ['2.0rem', { lineHeight: '2.8rem', fontWeight: '300', letterSpacing: '-0.02em' }], // 20px
37
+ m2: ['1.6rem', { lineHeight: '2.4rem', fontWeight: '300', letterSpacing: '-0.01em' }], // 16px
38
+ 'm2-emphasis': ['1.6rem', { lineHeight: '2.4rem', fontWeight: '500', letterSpacing: '-0.01em' }], // 16px
39
+ m3: ['1.4rem', { lineHeight: '2.0rem', fontWeight: '300', letterSpacing: '-0.005em' }], // 14px
40
+ 'm3-emphasis': ['1.3rem', { lineHeight: '2.0rem', fontWeight: '500', letterSpacing: '-0.005em' }], // 13px
41
+ 'm3-small': ['1.3rem', { lineHeight: '2.0rem', fontWeight: '400', letterSpacing: '-0.005em' }], // 13px
42
+ // Body — large (15px). The artifacts' lead/description size.
43
+ large: ['1.5rem', { lineHeight: '2.2rem', fontWeight: '400', letterSpacing: '-0.01em' }],
44
+ 'large-emphasis': ['1.5rem', { lineHeight: '2.2rem', fontWeight: '500', letterSpacing: '-0.01em' }],
45
+ // Body — default (13px), the base size the whole system is set in
46
+ default: ['1.3rem', { lineHeight: '1.95rem', fontWeight: '400', letterSpacing: '-0.005em' }],
47
+ emphasis: ['1.3rem', { lineHeight: '1.95rem', fontWeight: '500', letterSpacing: '-0.005em' }],
48
+ strong: ['1.3rem', { lineHeight: '1.95rem', fontWeight: '600', letterSpacing: '-0.005em' }],
49
+ // Body — small (12.5px), for secondary/meta lines beside body text
50
+ small: ['1.25rem', { lineHeight: '1.7rem', fontWeight: '400', letterSpacing: '0' }],
51
+ 'small-emphasis': ['1.25rem', { lineHeight: '1.7rem', fontWeight: '500', letterSpacing: '0' }],
52
+ 'small-strong': ['1.25rem', { lineHeight: '1.7rem', fontWeight: '600', letterSpacing: '0' }],
53
+ // Body — tiny (11.5px), for timestamps, hints and counts
54
+ tiny: ['1.15rem', { lineHeight: '1.5rem', fontWeight: '400', letterSpacing: '0' }],
55
+ 'tiny-emphasis': ['1.15rem', { lineHeight: '1.5rem', fontWeight: '500', letterSpacing: '0' }],
56
+ 'tiny-strong': ['1.15rem', { lineHeight: '1.5rem', fontWeight: '600', letterSpacing: '0' }],
57
+ // Micro (10.5px) — the uppercase section label. Pair with `tracking-label`
58
+ // and `uppercase`; the positive tracking is what keeps caps legible small.
59
+ micro: ['1.05rem', { lineHeight: '1.575rem', fontWeight: '500', letterSpacing: '0.06em' }], // 10.5px × 1.5
60
+ // Special — numeric. Pair with `font-mono` for tabular figures.
61
+ numeric: ['1.3rem', { lineHeight: '1.8rem', fontWeight: '400', letterSpacing: '0' }], // 13px
62
+ // Display — hero/feature sizes. `amount` is the artifacts' big figure.
63
+ amount: ['2.6rem', { lineHeight: '2.9rem', fontWeight: '600', letterSpacing: '-0.03em' }], // 26px
64
+ 'display-lg': ['4.0rem', { lineHeight: '1.1', letterSpacing: '-0.03em' }], // 40px
65
+ 'display-md': ['3.0rem', { lineHeight: '1.2', letterSpacing: '-0.025em' }], // 30px
66
+ 'display-sm': ['2.4rem', { lineHeight: '1.2', fontWeight: '500', letterSpacing: '-0.02em' }], // 24px
41
67
  };