@phcdevworks/spectre-tokens 4.13.0 → 4.14.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/README.md +147 -8
- package/dist/index.cjs +112 -47
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +59 -34
- package/dist/index.d.cts +61 -1
- package/dist/index.d.ts +61 -1
- package/dist/index.js +112 -47
- package/dist/index.js.map +1 -1
- package/dist/tokens.dtcg.json +248 -54
- package/package.json +7 -7
- package/tokens/components.json +1 -1
- package/tokens/modes.json +40 -2
- package/tokens/primitives.json +15 -0
- package/tokens/typography.json +71 -35
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ contracts for specific frameworks and runtimes.
|
|
|
17
17
|
| Project team | `project-design` |
|
|
18
18
|
| Repository role | Spectre L1 design-token contract |
|
|
19
19
|
| Package/artifact | `@phcdevworks/spectre-tokens` |
|
|
20
|
-
| Current version/status | 4.
|
|
20
|
+
| Current version/status | 4.14.0 |
|
|
21
21
|
|
|
22
22
|
## Standard Workflow
|
|
23
23
|
|
|
@@ -166,11 +166,11 @@ mode-aware styling.
|
|
|
166
166
|
| ----------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
167
167
|
| `surface` | Background roles: page, card, input, overlay, subtle, hero (gradient, hero sections only), hover, selected, active, divider |
|
|
168
168
|
| `text` | Foreground roles: default, muted, subtle, meta, on-surface, on-page |
|
|
169
|
-
| `component` | Role-specific tokens for navigation, overlays, feedback, data display, loading, forms, cards, badges, and content patterns
|
|
169
|
+
| `component` | Role-specific tokens for navigation, overlays, feedback, data display, loading, forms, cards, badges, and content patterns |
|
|
170
170
|
| `buttons` | Button state tokens: default, hover, active, disabled, CTA |
|
|
171
171
|
| `forms` | Form state tokens: default, focused, error, disabled |
|
|
172
172
|
| `link` | Inline link color roles: default, hover, active, visited |
|
|
173
|
-
| `modes` | Mode-aware overrides under `modes.default` and `modes.
|
|
173
|
+
| `modes` | Mode-aware overrides under `modes.default`, `modes.dark`, and `modes.highContrast` (plus a CSS-only `light` and `system` mode) |
|
|
174
174
|
|
|
175
175
|
```ts
|
|
176
176
|
import tokens from '@phcdevworks/spectre-tokens'
|
|
@@ -311,10 +311,16 @@ light.
|
|
|
311
311
|
`modes.highContrast` is a third mode alongside `default` and `dark`. It is
|
|
312
312
|
light-based, and every text pair in it meets WCAG AAA (7:1). Borders and
|
|
313
313
|
dividers are darkened too. Set `data-spectre-theme="high-contrast"` on the
|
|
314
|
-
root, or on a section, to apply it. Buttons
|
|
315
|
-
change between light and dark, but high-contrast mode overrides
|
|
316
|
-
(`modes.highContrast.buttons
|
|
317
|
-
|
|
314
|
+
root, or on a section, to apply it. Buttons and the valid/invalid form
|
|
315
|
+
states don't change between light and dark, but high-contrast mode overrides
|
|
316
|
+
them (`modes.highContrast.buttons` and `.forms.{valid,invalid}`), so those
|
|
317
|
+
also meet 7:1.
|
|
318
|
+
|
|
319
|
+
Links change in every mode. `modes.dark.link` lightens `default`, `hover`,
|
|
320
|
+
`active`, `visited`, and the underline colours so they meet 4.5:1 on dark
|
|
321
|
+
pages and cards, and `modes.highContrast.link` raises them to 7:1.
|
|
322
|
+
`link.onInverse` and `link.onInverseHover` are for `surface.inverse`, so they
|
|
323
|
+
keep the same value in every mode.
|
|
318
324
|
|
|
319
325
|
`control.{sm,md,lg}` gives the shared height, inline padding, and icon size
|
|
320
326
|
for buttons, inputs, and selects (`--sp-control-md-height`,
|
|
@@ -339,6 +345,135 @@ and z-index variables, so the surface follows the active color mode.
|
|
|
339
345
|
text selection, caret, scrollbar, skeleton-loading, and keycap colors. All of
|
|
340
346
|
them are set for every mode.
|
|
341
347
|
|
|
348
|
+
### Type scales
|
|
349
|
+
|
|
350
|
+
There are three ways to set text size, from most to least opinionated:
|
|
351
|
+
|
|
352
|
+
1. **Text roles** (`--sp-heading-h1-*`, `--sp-display-1-*`, `--sp-body-*`,
|
|
353
|
+
`--sp-lead-*`): size, line height, weight, and letter-spacing for a
|
|
354
|
+
specific job. Use these first.
|
|
355
|
+
2. **Size presets** `font.{xs…9xl}` (`--sp-font-lg-size`,
|
|
356
|
+
`--sp-font-lg-line-height`, `--sp-font-lg-weight`,
|
|
357
|
+
`--sp-font-lg-letter-spacing`): a size together with the line height and
|
|
358
|
+
weight that suit it. The sizes match Tailwind's scale:
|
|
359
|
+
|
|
360
|
+
| Step | xs | sm | md | lg | xl | 2xl | 3xl | 4xl | 5xl | 6xl | 7xl | 8xl | 9xl |
|
|
361
|
+
| ---- | -- | -- | -- | -- | -- | --- | --- | --- | --- | --- | --- | --- | --- |
|
|
362
|
+
| px | 12 | 14 | 16 | 18 | 20 | 24 | 30 | 36 | 48 | 60 | 72 | 96 | 128 |
|
|
363
|
+
|
|
364
|
+
`md` is Tailwind's `base`.
|
|
365
|
+
3. **Plain sizes** `fontSize.{12…128}` (`--sp-font-size-18`): one size with
|
|
366
|
+
no line height or weight attached. Pair them with the scales below.
|
|
367
|
+
|
|
368
|
+
```css
|
|
369
|
+
.price {
|
|
370
|
+
font-size: var(--sp-font-size-18);
|
|
371
|
+
line-height: var(--sp-leading-snug);
|
|
372
|
+
font-weight: var(--sp-font-weight-semibold);
|
|
373
|
+
letter-spacing: var(--sp-tracking-tight);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
a {
|
|
377
|
+
text-decoration-color: var(--sp-link-underline);
|
|
378
|
+
text-decoration-thickness: var(--sp-text-decoration-thickness-thin);
|
|
379
|
+
text-underline-offset: var(--sp-text-decoration-offset-md);
|
|
380
|
+
}
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
| Scale | Steps | CSS variable |
|
|
384
|
+
| --- | --- | --- |
|
|
385
|
+
| `fontWeight` | `normal` 400, `medium` 500, `semibold` 600, `bold` 700, `extrabold` 800, `black` 900 | `--sp-font-weight-*` |
|
|
386
|
+
| `leading` (line height, unitless) | `none` 1, `tight` 1.25, `snug` 1.375, `normal` 1.5, `relaxed` 1.625, `loose` 2 | `--sp-leading-*` |
|
|
387
|
+
| `tracking` (letter-spacing) | `tightest` −0.075em through `widest` 0.1em | `--sp-tracking-*` |
|
|
388
|
+
| `textDecoration` | `thickness.{thin,base,thick}` (1/2/3px), `offset.{sm,md,lg}` (0.125/0.2/0.3em) | `--sp-text-decoration-*` |
|
|
389
|
+
|
|
390
|
+
### Accent rails
|
|
391
|
+
|
|
392
|
+
A rail is the coloured edge on a card, badge, quote, and similar components.
|
|
393
|
+
Each component that has one carries the same contract under
|
|
394
|
+
`component.<name>.accent`: one colour per tone (`neutral`, `brand`, `info`,
|
|
395
|
+
`success`, `warning`, `danger`, `cta`, `accent`) plus a single `thickness`
|
|
396
|
+
(`0.25rem`). The components are `card`, `badge`, `testimonial`,
|
|
397
|
+
`pricingCard`, `nav`, `footer`, `modal`, `toast`, `tooltip`, `dropdown`,
|
|
398
|
+
`listGroup`, and `quote`. `footer.light` has its own tone colours and uses
|
|
399
|
+
`footer`'s thickness. Every rail colour is mode-aware.
|
|
400
|
+
|
|
401
|
+
```css
|
|
402
|
+
.card--brand {
|
|
403
|
+
border-inline-start: var(--sp-component-card-accent-thickness) solid
|
|
404
|
+
var(--sp-component-card-accent-brand);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.toast--danger {
|
|
408
|
+
border-inline-start: var(--sp-toast-accent-thickness) solid
|
|
409
|
+
var(--sp-toast-accent-danger);
|
|
410
|
+
}
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
`card` and `input` keep a legacy `component-` segment in their variable
|
|
414
|
+
names. Every other component uses its own name, such as `--sp-badge-accent-*`
|
|
415
|
+
or `--sp-quote-accent-*`. Which edge the rail sits on, and how it's drawn, is
|
|
416
|
+
up to the downstream component.
|
|
417
|
+
|
|
418
|
+
### Accent and inverse roles
|
|
419
|
+
|
|
420
|
+
`colors.accent` is the second brand colour. It has its own semantic roles, so
|
|
421
|
+
consumers never reach for the raw palette:
|
|
422
|
+
|
|
423
|
+
- `text.onPage.accent` and `text.onSurface.accent` (`--sp-text-on-page-accent`)
|
|
424
|
+
are accent text that passes contrast on the page or a card.
|
|
425
|
+
- `text.onInverse.{default,muted,brand,accent}` is text on dark (inverse)
|
|
426
|
+
backgrounds, such as a dark hero or footer.
|
|
427
|
+
- `buttons.accent` and `buttons.accentOutline` are filled and outlined accent
|
|
428
|
+
buttons. Button variables join camelCase names without hyphens, for example
|
|
429
|
+
`--sp-button-accentoutline-bghover`.
|
|
430
|
+
- `component.stepper.tone.{brand,accent}.{active,done}` colours a stepper in
|
|
431
|
+
either brand colour.
|
|
432
|
+
- `component.quote` covers a quote's text, attribution name and role, an
|
|
433
|
+
accent-coloured quotation mark, a plain border, and an accent rail
|
|
434
|
+
(`--sp-quote-*`).
|
|
435
|
+
|
|
436
|
+
### Footer
|
|
437
|
+
|
|
438
|
+
`component.footer` is its own contract, separate from navigation: `bg`,
|
|
439
|
+
`text`, `heading`, `muted`, `link`, `linkHover`, `border`, `divider`,
|
|
440
|
+
`chipBg`, and an accent rail (`--sp-footer-*`). It is dark by default.
|
|
441
|
+
`component.footer.light` (`--sp-footer-light-*`) has the same roles for a
|
|
442
|
+
light footer.
|
|
443
|
+
|
|
444
|
+
### Extended palette
|
|
445
|
+
|
|
446
|
+
`colors.palette` holds the full extended colour ramps (`red` through `stone`,
|
|
447
|
+
`slate`, `zinc`, the `mauve`/`olive`/`mist`/`taupe` neutrals, and the named
|
|
448
|
+
brand and integration colours), emitted as `--sp-color-palette-<name>-<step>`.
|
|
449
|
+
Like `colors`, it is raw palette: use it for data visualisation or a brand
|
|
450
|
+
colour that has no semantic role, not for normal UI.
|
|
451
|
+
|
|
452
|
+
### HTML element coverage
|
|
453
|
+
|
|
454
|
+
Spectre aims to style every standard HTML element from tokens alone.
|
|
455
|
+
[`element-coverage.json`](element-coverage.json) maps all 115 elements in the
|
|
456
|
+
HTML Living Standard's element index, and 14 styleable pseudo-elements, to
|
|
457
|
+
the token paths that style them. Elements with no visual styling of their own
|
|
458
|
+
(`<div>`, `<meta>`, `<template>`, …) are marked as such, with a reason. The
|
|
459
|
+
`check:elements` step of `npm run check` fails if an element is unmapped or
|
|
460
|
+
mapped to a path that doesn't exist. [TOKEN_REFERENCE.md](TOKEN_REFERENCE.md)
|
|
461
|
+
has the generated table.
|
|
462
|
+
|
|
463
|
+
Element roles include:
|
|
464
|
+
|
|
465
|
+
| Element | Variables |
|
|
466
|
+
| --- | --- |
|
|
467
|
+
| `<del>`, `<ins>`, `<mark>`, `<kbd>`, `<code>`, `<pre>`, `<blockquote>`, `<hr>` | `--sp-prose-*` |
|
|
468
|
+
| `<dt>`, `<dd>` | `--sp-prose-dt-text`, `--sp-prose-dd-text` |
|
|
469
|
+
| `<figcaption>`, `<caption>`, `<tfoot>` | `--sp-prose-figcaption-text`, `--sp-table-caption-text`, `--sp-table-footer-*` |
|
|
470
|
+
| `<meter>` | `--sp-meter-track`, `--sp-meter-fill-{optimum,suboptimum,critical}` |
|
|
471
|
+
| `<option>`, `<optgroup>` | `--sp-select-option-*`, `--sp-select-optgroup-label-text` |
|
|
472
|
+
| `::marker` | `--sp-prose-marker`, `--sp-prose-marker-accent` |
|
|
473
|
+
| `::selection`, `::spelling-error`, `::grammar-error` | `--sp-selection-*`, `--sp-proofing-{spelling,grammar}` |
|
|
474
|
+
| Code highlighting | `--sp-code-syntax-{keyword,string,comment,function,…}` |
|
|
475
|
+
| Article spacing | `--sp-layout-prose-flow-{paragraph,heading,list,…}` |
|
|
476
|
+
|
|
342
477
|
### Token model
|
|
343
478
|
|
|
344
479
|
The generated token object includes these namespaces:
|
|
@@ -370,6 +505,7 @@ The generated token object includes these namespaces:
|
|
|
370
505
|
- `leading`
|
|
371
506
|
- `textDecoration`
|
|
372
507
|
- `fontWeight`
|
|
508
|
+
- `fontSize`
|
|
373
509
|
- `control`
|
|
374
510
|
- `elevation`
|
|
375
511
|
|
|
@@ -384,7 +520,10 @@ Downstream packages building recipes on the CSS output should use
|
|
|
384
520
|
[DOWNSTREAM_PARITY.md](DOWNSTREAM_PARITY.md), which groups every published
|
|
385
521
|
`--sp-*` variable into the family a recipe or stylesheet consumes. Run
|
|
386
522
|
`npm run audit:parity` (optionally `-- <sibling-repo>`) for a checklist of the
|
|
387
|
-
families a checked-out downstream repo has not consumed yet
|
|
523
|
+
families a checked-out downstream repo has not consumed yet, and
|
|
524
|
+
`npm run audit:downstream` for a read-only report of raw `--sp-*`
|
|
525
|
+
redeclarations, hardcoded visual values, and workaround comments across the
|
|
526
|
+
downstream repos.
|
|
388
527
|
|
|
389
528
|
The `layout` namespace includes section, stack, and container spacing tokens,
|
|
390
529
|
plus fixed layout width tokens for common consumer shells:
|
package/dist/index.cjs
CHANGED
|
@@ -438,7 +438,7 @@ var coreTokens = {
|
|
|
438
438
|
},
|
|
439
439
|
"text": "{colors.neutral.900}",
|
|
440
440
|
"divider": "{colors.neutral.200}",
|
|
441
|
-
"stripeBg": "{colors.
|
|
441
|
+
"stripeBg": "{colors.black} / 0.05",
|
|
442
442
|
"hoverBg": "{colors.neutral.100}",
|
|
443
443
|
"selectedBg": "{colors.info.50}",
|
|
444
444
|
"row": {
|
|
@@ -1519,7 +1519,7 @@ var coreTokens = {
|
|
|
1519
1519
|
},
|
|
1520
1520
|
"text": "{colors.neutral.900}",
|
|
1521
1521
|
"divider": "{colors.neutral.200}",
|
|
1522
|
-
"stripeBg": "{colors.
|
|
1522
|
+
"stripeBg": "{colors.black} / 0.05",
|
|
1523
1523
|
"hoverBg": "{colors.neutral.100}",
|
|
1524
1524
|
"selectedBg": "{colors.info.50}",
|
|
1525
1525
|
"row": {
|
|
@@ -2382,7 +2382,7 @@ var coreTokens = {
|
|
|
2382
2382
|
},
|
|
2383
2383
|
"text": "{colors.neutral.100}",
|
|
2384
2384
|
"divider": "{colors.neutral.700}",
|
|
2385
|
-
"stripeBg": "{colors.
|
|
2385
|
+
"stripeBg": "{colors.white} / 0.06",
|
|
2386
2386
|
"hoverBg": "{colors.neutral.700}",
|
|
2387
2387
|
"selectedBg": "{colors.info.900}",
|
|
2388
2388
|
"row": {
|
|
@@ -2815,6 +2815,14 @@ var coreTokens = {
|
|
|
2815
2815
|
"spelling": "{colors.error.400}",
|
|
2816
2816
|
"grammar": "{colors.info.400}"
|
|
2817
2817
|
}
|
|
2818
|
+
},
|
|
2819
|
+
"link": {
|
|
2820
|
+
"default": "{colors.brand.400}",
|
|
2821
|
+
"hover": "{colors.brand.300}",
|
|
2822
|
+
"active": "{colors.brand.200}",
|
|
2823
|
+
"visited": "{colors.accent.300}",
|
|
2824
|
+
"underline": "{colors.brand.400} / 0.4",
|
|
2825
|
+
"underlineHover": "{colors.brand.300}"
|
|
2818
2826
|
}
|
|
2819
2827
|
},
|
|
2820
2828
|
"highContrast": {
|
|
@@ -4634,6 +4642,21 @@ var coreTokens = {
|
|
|
4634
4642
|
"extrabold": 800,
|
|
4635
4643
|
"black": 900
|
|
4636
4644
|
},
|
|
4645
|
+
"fontSize": {
|
|
4646
|
+
"12": "0.75rem",
|
|
4647
|
+
"14": "0.875rem",
|
|
4648
|
+
"16": "1rem",
|
|
4649
|
+
"18": "1.125rem",
|
|
4650
|
+
"20": "1.25rem",
|
|
4651
|
+
"24": "1.5rem",
|
|
4652
|
+
"30": "1.875rem",
|
|
4653
|
+
"36": "2.25rem",
|
|
4654
|
+
"48": "3rem",
|
|
4655
|
+
"60": "3.75rem",
|
|
4656
|
+
"72": "4.5rem",
|
|
4657
|
+
"96": "6rem",
|
|
4658
|
+
"128": "8rem"
|
|
4659
|
+
},
|
|
4637
4660
|
"surface": {
|
|
4638
4661
|
"page": "{colors.neutral.50}",
|
|
4639
4662
|
"card": "{colors.white}",
|
|
@@ -4829,46 +4852,64 @@ var coreTokens = {
|
|
|
4829
4852
|
"letterSpacing": "0em"
|
|
4830
4853
|
},
|
|
4831
4854
|
"lg": {
|
|
4855
|
+
"size": "1.125rem",
|
|
4856
|
+
"lineHeight": "1.875rem",
|
|
4857
|
+
"weight": 500,
|
|
4858
|
+
"letterSpacing": "0em"
|
|
4859
|
+
},
|
|
4860
|
+
"xl": {
|
|
4832
4861
|
"size": "1.25rem",
|
|
4833
4862
|
"lineHeight": "2rem",
|
|
4834
4863
|
"weight": 600,
|
|
4835
4864
|
"letterSpacing": "0em"
|
|
4836
4865
|
},
|
|
4837
|
-
"
|
|
4866
|
+
"2xl": {
|
|
4838
4867
|
"size": "1.5rem",
|
|
4839
4868
|
"lineHeight": "2.125rem",
|
|
4840
4869
|
"weight": 600,
|
|
4841
4870
|
"letterSpacing": "0em"
|
|
4842
4871
|
},
|
|
4843
|
-
"
|
|
4872
|
+
"3xl": {
|
|
4844
4873
|
"size": "1.875rem",
|
|
4845
4874
|
"lineHeight": "2.5rem",
|
|
4846
4875
|
"weight": 700,
|
|
4847
4876
|
"letterSpacing": "0em"
|
|
4848
4877
|
},
|
|
4849
|
-
"
|
|
4878
|
+
"4xl": {
|
|
4850
4879
|
"size": "2.25rem",
|
|
4851
4880
|
"lineHeight": "2.75rem",
|
|
4852
4881
|
"weight": 700,
|
|
4853
4882
|
"letterSpacing": "0em"
|
|
4854
4883
|
},
|
|
4855
|
-
"
|
|
4884
|
+
"5xl": {
|
|
4856
4885
|
"size": "3rem",
|
|
4857
4886
|
"lineHeight": "3.5rem",
|
|
4858
4887
|
"weight": 800,
|
|
4859
4888
|
"letterSpacing": "0em"
|
|
4860
4889
|
},
|
|
4861
|
-
"
|
|
4890
|
+
"6xl": {
|
|
4862
4891
|
"size": "3.75rem",
|
|
4863
4892
|
"lineHeight": "4.25rem",
|
|
4864
4893
|
"weight": 800,
|
|
4865
4894
|
"letterSpacing": "0em"
|
|
4866
4895
|
},
|
|
4867
|
-
"
|
|
4896
|
+
"7xl": {
|
|
4868
4897
|
"size": "4.5rem",
|
|
4869
4898
|
"lineHeight": "5rem",
|
|
4870
4899
|
"weight": 900,
|
|
4871
4900
|
"letterSpacing": "0em"
|
|
4901
|
+
},
|
|
4902
|
+
"8xl": {
|
|
4903
|
+
"size": "6rem",
|
|
4904
|
+
"lineHeight": "6.5rem",
|
|
4905
|
+
"weight": 900,
|
|
4906
|
+
"letterSpacing": "0em"
|
|
4907
|
+
},
|
|
4908
|
+
"9xl": {
|
|
4909
|
+
"size": "8rem",
|
|
4910
|
+
"lineHeight": "8.5rem",
|
|
4911
|
+
"weight": 900,
|
|
4912
|
+
"letterSpacing": "0em"
|
|
4872
4913
|
}
|
|
4873
4914
|
},
|
|
4874
4915
|
"typography": {
|
|
@@ -4897,90 +4938,108 @@ var coreTokens = {
|
|
|
4897
4938
|
"letterSpacing": "0em"
|
|
4898
4939
|
},
|
|
4899
4940
|
"lg": {
|
|
4941
|
+
"fontSize": "1.125rem",
|
|
4942
|
+
"lineHeight": "1.875rem",
|
|
4943
|
+
"fontWeight": 500,
|
|
4944
|
+
"letterSpacing": "0em"
|
|
4945
|
+
},
|
|
4946
|
+
"xl": {
|
|
4900
4947
|
"fontSize": "1.25rem",
|
|
4901
4948
|
"lineHeight": "2rem",
|
|
4902
4949
|
"fontWeight": 600,
|
|
4903
4950
|
"letterSpacing": "0em"
|
|
4904
4951
|
},
|
|
4905
|
-
"
|
|
4952
|
+
"2xl": {
|
|
4906
4953
|
"fontSize": "1.5rem",
|
|
4907
4954
|
"lineHeight": "2.125rem",
|
|
4908
4955
|
"fontWeight": 600,
|
|
4909
4956
|
"letterSpacing": "0em"
|
|
4910
4957
|
},
|
|
4911
|
-
"
|
|
4958
|
+
"3xl": {
|
|
4912
4959
|
"fontSize": "1.875rem",
|
|
4913
4960
|
"lineHeight": "2.5rem",
|
|
4914
4961
|
"fontWeight": 700,
|
|
4915
4962
|
"letterSpacing": "0em"
|
|
4916
4963
|
},
|
|
4917
|
-
"
|
|
4964
|
+
"4xl": {
|
|
4918
4965
|
"fontSize": "2.25rem",
|
|
4919
4966
|
"lineHeight": "2.75rem",
|
|
4920
4967
|
"fontWeight": 700,
|
|
4921
4968
|
"letterSpacing": "0em"
|
|
4922
4969
|
},
|
|
4923
|
-
"
|
|
4970
|
+
"5xl": {
|
|
4924
4971
|
"fontSize": "3rem",
|
|
4925
4972
|
"lineHeight": "3.5rem",
|
|
4926
4973
|
"fontWeight": 800,
|
|
4927
4974
|
"letterSpacing": "0em"
|
|
4928
4975
|
},
|
|
4929
|
-
"
|
|
4976
|
+
"6xl": {
|
|
4930
4977
|
"fontSize": "3.75rem",
|
|
4931
4978
|
"lineHeight": "4.25rem",
|
|
4932
4979
|
"fontWeight": 800,
|
|
4933
4980
|
"letterSpacing": "0em"
|
|
4934
4981
|
},
|
|
4935
|
-
"
|
|
4982
|
+
"7xl": {
|
|
4936
4983
|
"fontSize": "4.5rem",
|
|
4937
4984
|
"lineHeight": "5rem",
|
|
4938
4985
|
"fontWeight": 900,
|
|
4939
4986
|
"letterSpacing": "0em"
|
|
4987
|
+
},
|
|
4988
|
+
"8xl": {
|
|
4989
|
+
"fontSize": "6rem",
|
|
4990
|
+
"lineHeight": "6.5rem",
|
|
4991
|
+
"fontWeight": 900,
|
|
4992
|
+
"letterSpacing": "0em"
|
|
4993
|
+
},
|
|
4994
|
+
"9xl": {
|
|
4995
|
+
"fontSize": "8rem",
|
|
4996
|
+
"lineHeight": "8.5rem",
|
|
4997
|
+
"fontWeight": 900,
|
|
4998
|
+
"letterSpacing": "0em"
|
|
4940
4999
|
}
|
|
4941
5000
|
},
|
|
4942
5001
|
"heading": {
|
|
4943
5002
|
"h1": {
|
|
5003
|
+
"fontFamily": "{typography.families.sans}",
|
|
5004
|
+
"fontSize": "{typography.scale.6xl.fontSize}",
|
|
5005
|
+
"lineHeight": "{typography.scale.6xl.lineHeight}",
|
|
5006
|
+
"fontWeight": 800,
|
|
5007
|
+
"letterSpacing": "{typography.scale.6xl.letterSpacing}"
|
|
5008
|
+
},
|
|
5009
|
+
"h2": {
|
|
4944
5010
|
"fontFamily": "{typography.families.sans}",
|
|
4945
5011
|
"fontSize": "{typography.scale.5xl.fontSize}",
|
|
4946
5012
|
"lineHeight": "{typography.scale.5xl.lineHeight}",
|
|
4947
|
-
"fontWeight":
|
|
5013
|
+
"fontWeight": 700,
|
|
4948
5014
|
"letterSpacing": "{typography.scale.5xl.letterSpacing}"
|
|
4949
5015
|
},
|
|
4950
|
-
"
|
|
5016
|
+
"h3": {
|
|
4951
5017
|
"fontFamily": "{typography.families.sans}",
|
|
4952
5018
|
"fontSize": "{typography.scale.4xl.fontSize}",
|
|
4953
5019
|
"lineHeight": "{typography.scale.4xl.lineHeight}",
|
|
4954
5020
|
"fontWeight": 700,
|
|
4955
5021
|
"letterSpacing": "{typography.scale.4xl.letterSpacing}"
|
|
4956
5022
|
},
|
|
4957
|
-
"
|
|
5023
|
+
"h4": {
|
|
4958
5024
|
"fontFamily": "{typography.families.sans}",
|
|
4959
5025
|
"fontSize": "{typography.scale.3xl.fontSize}",
|
|
4960
5026
|
"lineHeight": "{typography.scale.3xl.lineHeight}",
|
|
4961
|
-
"fontWeight":
|
|
5027
|
+
"fontWeight": 600,
|
|
4962
5028
|
"letterSpacing": "{typography.scale.3xl.letterSpacing}"
|
|
4963
5029
|
},
|
|
4964
|
-
"
|
|
5030
|
+
"h5": {
|
|
4965
5031
|
"fontFamily": "{typography.families.sans}",
|
|
4966
5032
|
"fontSize": "{typography.scale.2xl.fontSize}",
|
|
4967
5033
|
"lineHeight": "{typography.scale.2xl.lineHeight}",
|
|
4968
5034
|
"fontWeight": 600,
|
|
4969
5035
|
"letterSpacing": "{typography.scale.2xl.letterSpacing}"
|
|
4970
5036
|
},
|
|
4971
|
-
"
|
|
5037
|
+
"h6": {
|
|
4972
5038
|
"fontFamily": "{typography.families.sans}",
|
|
4973
5039
|
"fontSize": "{typography.scale.xl.fontSize}",
|
|
4974
5040
|
"lineHeight": "{typography.scale.xl.lineHeight}",
|
|
4975
5041
|
"fontWeight": 600,
|
|
4976
5042
|
"letterSpacing": "{typography.scale.xl.letterSpacing}"
|
|
4977
|
-
},
|
|
4978
|
-
"h6": {
|
|
4979
|
-
"fontFamily": "{typography.families.sans}",
|
|
4980
|
-
"fontSize": "{typography.scale.lg.fontSize}",
|
|
4981
|
-
"lineHeight": "{typography.scale.lg.lineHeight}",
|
|
4982
|
-
"fontWeight": 600,
|
|
4983
|
-
"letterSpacing": "{typography.scale.lg.letterSpacing}"
|
|
4984
5043
|
}
|
|
4985
5044
|
},
|
|
4986
5045
|
"body": {
|
|
@@ -4992,54 +5051,54 @@ var coreTokens = {
|
|
|
4992
5051
|
},
|
|
4993
5052
|
"display": {
|
|
4994
5053
|
"1": {
|
|
5054
|
+
"fontFamily": "{typography.families.sans}",
|
|
5055
|
+
"fontSize": "{typography.scale.7xl.fontSize}",
|
|
5056
|
+
"lineHeight": "{typography.scale.7xl.lineHeight}",
|
|
5057
|
+
"fontWeight": 800,
|
|
5058
|
+
"letterSpacing": "{typography.scale.7xl.letterSpacing}"
|
|
5059
|
+
},
|
|
5060
|
+
"2": {
|
|
4995
5061
|
"fontFamily": "{typography.families.sans}",
|
|
4996
5062
|
"fontSize": "{typography.scale.6xl.fontSize}",
|
|
4997
5063
|
"lineHeight": "{typography.scale.6xl.lineHeight}",
|
|
4998
5064
|
"fontWeight": 800,
|
|
4999
5065
|
"letterSpacing": "{typography.scale.6xl.letterSpacing}"
|
|
5000
5066
|
},
|
|
5001
|
-
"
|
|
5067
|
+
"3": {
|
|
5002
5068
|
"fontFamily": "{typography.families.sans}",
|
|
5003
5069
|
"fontSize": "{typography.scale.5xl.fontSize}",
|
|
5004
5070
|
"lineHeight": "{typography.scale.5xl.lineHeight}",
|
|
5005
|
-
"fontWeight":
|
|
5071
|
+
"fontWeight": 700,
|
|
5006
5072
|
"letterSpacing": "{typography.scale.5xl.letterSpacing}"
|
|
5007
5073
|
},
|
|
5008
|
-
"
|
|
5074
|
+
"4": {
|
|
5009
5075
|
"fontFamily": "{typography.families.sans}",
|
|
5010
5076
|
"fontSize": "{typography.scale.4xl.fontSize}",
|
|
5011
5077
|
"lineHeight": "{typography.scale.4xl.lineHeight}",
|
|
5012
5078
|
"fontWeight": 700,
|
|
5013
5079
|
"letterSpacing": "{typography.scale.4xl.letterSpacing}"
|
|
5014
5080
|
},
|
|
5015
|
-
"
|
|
5081
|
+
"5": {
|
|
5016
5082
|
"fontFamily": "{typography.families.sans}",
|
|
5017
5083
|
"fontSize": "{typography.scale.3xl.fontSize}",
|
|
5018
5084
|
"lineHeight": "{typography.scale.3xl.lineHeight}",
|
|
5019
|
-
"fontWeight":
|
|
5085
|
+
"fontWeight": 600,
|
|
5020
5086
|
"letterSpacing": "{typography.scale.3xl.letterSpacing}"
|
|
5021
5087
|
},
|
|
5022
|
-
"
|
|
5088
|
+
"6": {
|
|
5023
5089
|
"fontFamily": "{typography.families.sans}",
|
|
5024
5090
|
"fontSize": "{typography.scale.2xl.fontSize}",
|
|
5025
5091
|
"lineHeight": "{typography.scale.2xl.lineHeight}",
|
|
5026
5092
|
"fontWeight": 600,
|
|
5027
5093
|
"letterSpacing": "{typography.scale.2xl.letterSpacing}"
|
|
5028
|
-
},
|
|
5029
|
-
"6": {
|
|
5030
|
-
"fontFamily": "{typography.families.sans}",
|
|
5031
|
-
"fontSize": "{typography.scale.xl.fontSize}",
|
|
5032
|
-
"lineHeight": "{typography.scale.xl.lineHeight}",
|
|
5033
|
-
"fontWeight": 600,
|
|
5034
|
-
"letterSpacing": "{typography.scale.xl.letterSpacing}"
|
|
5035
5094
|
}
|
|
5036
5095
|
},
|
|
5037
5096
|
"lead": {
|
|
5038
5097
|
"fontFamily": "{typography.families.sans}",
|
|
5039
|
-
"fontSize": "{typography.scale.
|
|
5040
|
-
"lineHeight": "{typography.scale.
|
|
5098
|
+
"fontSize": "{typography.scale.xl.fontSize}",
|
|
5099
|
+
"lineHeight": "{typography.scale.xl.lineHeight}",
|
|
5041
5100
|
"fontWeight": 400,
|
|
5042
|
-
"letterSpacing": "{typography.scale.
|
|
5101
|
+
"letterSpacing": "{typography.scale.xl.letterSpacing}"
|
|
5043
5102
|
}
|
|
5044
5103
|
}
|
|
5045
5104
|
};
|
|
@@ -5262,6 +5321,12 @@ var createCssVariableMap = (tokens2, options = {}) => {
|
|
|
5262
5321
|
assign(toVariableName(prefix, "font-weight", key), value);
|
|
5263
5322
|
});
|
|
5264
5323
|
}
|
|
5324
|
+
const fontSize = baseTokens.fontSize;
|
|
5325
|
+
if (fontSize) {
|
|
5326
|
+
Object.entries(fontSize).forEach(([key, value]) => {
|
|
5327
|
+
assign(toVariableName(prefix, "font-size", key), value);
|
|
5328
|
+
});
|
|
5329
|
+
}
|
|
5265
5330
|
const textDecoration = baseTokens.textDecoration;
|
|
5266
5331
|
if (textDecoration) {
|
|
5267
5332
|
Object.entries(textDecoration).forEach(([group, scale]) => {
|
|
@@ -5478,12 +5543,12 @@ var generateCssVariables = (tokens2, options = {}) => {
|
|
|
5478
5543
|
(path) => ["form", ...path.map(kebabPathSegment)],
|
|
5479
5544
|
void 0
|
|
5480
5545
|
);
|
|
5546
|
+
const darkLink = getPath(darkMode, ["link"]);
|
|
5481
5547
|
const highContrastLink = getPath(highContrastMode, ["link"]);
|
|
5482
5548
|
Object.entries(linkTokens).forEach(([key, value]) => {
|
|
5483
5549
|
const varName = toVariableName(prefix, "link", kebabPathSegment(key));
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
addDark(varName, resolved);
|
|
5550
|
+
addBase(varName, pickSemantic(tokens2, value));
|
|
5551
|
+
addDark(varName, pickSemantic(tokens2, getPath(darkLink, [key]), value));
|
|
5487
5552
|
addHighContrast(varName, pickSemantic(tokens2, getPath(highContrastLink, [key]), value));
|
|
5488
5553
|
});
|
|
5489
5554
|
const highContrastButtons = getPath(highContrastMode, ["buttons"]);
|