@mediaradar/design-tokens 2.3.0 → 2.4.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 +29 -21
- package/dist/DESIGN.md +1 -0
- package/dist/_headers +0 -3
- package/dist/css/dark.css +1 -0
- package/dist/css/ref.css +2 -0
- package/dist/css/sys.css +1 -0
- package/dist/js/tokens.d.ts +4 -0
- package/dist/js/tokens.js +4 -0
- package/dist/tailwind/theme.css +1 -0
- package/package.json +49 -49
package/README.md
CHANGED
|
@@ -5,16 +5,16 @@ source files in `packages/tokens/` (one level up) and transforms them into
|
|
|
5
5
|
CSS custom properties, Tailwind v4 integration files, and JS/TS token
|
|
6
6
|
values.
|
|
7
7
|
|
|
8
|
-
Output is distributed two ways
|
|
8
|
+
Output is distributed two ways:
|
|
9
9
|
|
|
10
|
-
- **
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
- **npm package** (this package) — how apps consume tokens. Take all four
|
|
11
|
+
files (`css/tokens.css`, `css/dark.css`, `tailwind/theme.css`,
|
|
12
|
+
`tailwind/typography.css`) from here, so they always come from the same
|
|
13
|
+
version.
|
|
14
|
+
- **CDN** (`https://tokens.mediaradar.com`, Cloudflare Pages) — serves the
|
|
15
|
+
same `dist/` plus `DESIGN.md`, `patterns.json`, `tokens.json` and
|
|
16
|
+
`changelog.json` for the MCP server. Useful for previewing an unreleased
|
|
17
|
+
token change, not as an app's main source.
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
@@ -25,18 +25,24 @@ npm install @mediaradar/design-tokens
|
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
```css
|
|
28
|
-
|
|
28
|
+
@import "@mediaradar/design-tokens/css/tokens.css";
|
|
29
|
+
@import "@mediaradar/design-tokens/css/dark.css";
|
|
30
|
+
@import "tailwindcss";
|
|
29
31
|
@import "@mediaradar/design-tokens/tailwind/theme.css";
|
|
30
32
|
@import "@mediaradar/design-tokens/tailwind/typography.css";
|
|
31
|
-
|
|
32
|
-
/* Plain CSS custom properties — CDN works fine for these */
|
|
33
|
-
@import "https://tokens.mediaradar.com/css/tokens.css";
|
|
34
|
-
@import "https://tokens.mediaradar.com/css/dark.css";
|
|
35
33
|
```
|
|
36
34
|
|
|
35
|
+
Don't load `tokens.css`/`dark.css` from the CDN alongside a pinned
|
|
36
|
+
`theme.css`: `theme.css` only aliases names, the values live in those two
|
|
37
|
+
files, and loading them live lets the two halves drift apart (a CDN token
|
|
38
|
+
rename breaks an app's classes with no version change on its side). And never
|
|
39
|
+
load `tailwind/*.css` from the CDN at all — Tailwind can't resolve `@theme`
|
|
40
|
+
from a remote `@import`.
|
|
41
|
+
|
|
37
42
|
This package is version-pinned like any other npm dependency — a token
|
|
38
|
-
change
|
|
39
|
-
|
|
43
|
+
change reaches a consumer when it bumps the version (Dependabot opens that PR
|
|
44
|
+
daily in `insights-studio-prototype`, and merges it automatically for
|
|
45
|
+
non-major versions). See the root `CLAUDE.md`'s "Consuming in a React + Tailwind
|
|
40
46
|
app" section for the full wiring and the CDN asset reference table.
|
|
41
47
|
|
|
42
48
|
## Building locally
|
|
@@ -68,7 +74,7 @@ dist/
|
|
|
68
74
|
tailwind/ ← theme.css (@theme block), typography.css (@utility text-style-* classes)
|
|
69
75
|
js/ ← tokens.js, tokens.d.ts
|
|
70
76
|
DESIGN.md ← LLM-optimized design spec, auto-generated
|
|
71
|
-
patterns.json ←
|
|
77
|
+
patterns.json ← component catalog, built by tokens.yml from packages/design-components — do not create or edit
|
|
72
78
|
index.html, staticwebapp.config.json, scss/utilities/ ← copied as-is from
|
|
73
79
|
static/; CDN-hosting artifacts (routing/cache config, a landing page,
|
|
74
80
|
unwired legacy SCSS) with no relevance to an npm consumer, so index.html
|
|
@@ -78,10 +84,12 @@ dist/
|
|
|
78
84
|
|
|
79
85
|
## Publishing
|
|
80
86
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
87
|
+
`.github/workflows/tokens.yml` bumps the version automatically when token
|
|
88
|
+
*values* change (major for a breaking change, minor for an addition, patch
|
|
89
|
+
otherwise) and publishes on merge to `main`. A change to generated output
|
|
90
|
+
alone — `sd.config.mjs`, this package's own config — changes no token value,
|
|
91
|
+
so bump `version` in `package.json` by hand in that PR; otherwise nothing
|
|
92
|
+
publishes (the publish no-ops when the version is already on npm).
|
|
85
93
|
|
|
86
94
|
## Contributing
|
|
87
95
|
|
package/dist/DESIGN.md
CHANGED
|
@@ -194,6 +194,7 @@ Key is the suffix for any Tailwind color utility: `bg-{key}`, `text-{key}`, `bor
|
|
|
194
194
|
| ai-tint | #e4e2f5 | #2b2e48 |
|
|
195
195
|
| ai-ontint | #2747c4 | #8aa0ff |
|
|
196
196
|
| ai-gradient | linear-gradient(135deg, #2747c4 0%, #f05323 60%, #f99d20 100%) | linear-gradient(135deg, #5b73dd 0%, #ff7548 60%, #ffb878 100%) |
|
|
197
|
+
| scrim | rgba(20, 17, 13, 0.55) | rgba(0, 0, 0, 0.65) |
|
|
197
198
|
|
|
198
199
|
### Typography
|
|
199
200
|
|
package/dist/_headers
CHANGED
|
@@ -25,9 +25,6 @@
|
|
|
25
25
|
/patterns.json
|
|
26
26
|
Cache-Control: public, max-age=60, stale-while-revalidate=300
|
|
27
27
|
|
|
28
|
-
/component-source.tar.gz
|
|
29
|
-
Cache-Control: public, max-age=60, stale-while-revalidate=300
|
|
30
|
-
|
|
31
28
|
/changelog.json
|
|
32
29
|
Cache-Control: public, max-age=60, stale-while-revalidate=300
|
|
33
30
|
|
package/dist/css/dark.css
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
--mr-color-ai-tint: var(--mr-ref-color-brand-warm-ai-tint-dark);
|
|
25
25
|
--mr-color-ai-ontint: var(--mr-ref-color-brand-warm-ai-ontint-dark);
|
|
26
26
|
--mr-color-ai-gradient: var(--mr-ref-color-brand-warm-ai-gradient-dark);
|
|
27
|
+
--mr-color-scrim: var(--mr-ref-color-brand-warm-scrim-dark);
|
|
27
28
|
--mr-text-style-heading-1-color: var(--mr-ref-color-secondary-light-10);
|
|
28
29
|
--mr-typography-line-height-head: var(--mr-ref-typography-line-height-sm);
|
|
29
30
|
}
|
package/dist/css/ref.css
CHANGED
|
@@ -52,6 +52,8 @@
|
|
|
52
52
|
--mr-ref-color-brand-warm-ai-ontint-dark: #8aa0ff;
|
|
53
53
|
--mr-ref-color-brand-warm-ai-gradient-light: linear-gradient(135deg, #2747c4 0%, #f05323 60%, #f99d20 100%);
|
|
54
54
|
--mr-ref-color-brand-warm-ai-gradient-dark: linear-gradient(135deg, #5b73dd 0%, #ff7548 60%, #ffb878 100%);
|
|
55
|
+
--mr-ref-color-brand-warm-scrim-light: rgba(20, 17, 13, 0.55);
|
|
56
|
+
--mr-ref-color-brand-warm-scrim-dark: rgba(0, 0, 0, 0.65);
|
|
55
57
|
--mr-ref-color-primary-light-1: #f5f9ff;
|
|
56
58
|
--mr-ref-color-primary-light-2: #ebf4ff;
|
|
57
59
|
--mr-ref-color-primary-light-3: #d6e6ff;
|
package/dist/css/sys.css
CHANGED
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
--mr-color-ai-tint: var(--mr-ref-color-brand-warm-ai-tint-light);
|
|
29
29
|
--mr-color-ai-ontint: var(--mr-ref-color-brand-warm-ai-ontint-light);
|
|
30
30
|
--mr-color-ai-gradient: var(--mr-ref-color-brand-warm-ai-gradient-light);
|
|
31
|
+
--mr-color-scrim: var(--mr-ref-color-brand-warm-scrim-light);
|
|
31
32
|
--mr-typography-font-size-xs: var(--mr-ref-typography-size-xs);
|
|
32
33
|
--mr-typography-font-size-sm: var(--mr-ref-typography-size-sm);
|
|
33
34
|
--mr-typography-font-size-base: var(--mr-ref-typography-size-base);
|
package/dist/js/tokens.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export const mrSysColorBorderStrong: string;
|
|
|
29
29
|
export const mrSysColorAiTint: string;
|
|
30
30
|
export const mrSysColorAiOntint: string;
|
|
31
31
|
export const mrSysColorAiGradient: string;
|
|
32
|
+
export const mrSysColorScrim: string;
|
|
32
33
|
export const mrSysTextStyleHeading_1Color: string;
|
|
33
34
|
export const mrSysTypographyLineHeightHead: number;
|
|
34
35
|
export const mrRefColorBrandWarmCanvasLight: string;
|
|
@@ -84,6 +85,8 @@ export const mrRefColorBrandWarmAiOntintLight: string;
|
|
|
84
85
|
export const mrRefColorBrandWarmAiOntintDark: string;
|
|
85
86
|
export const mrRefColorBrandWarmAiGradientLight: string;
|
|
86
87
|
export const mrRefColorBrandWarmAiGradientDark: string;
|
|
88
|
+
export const mrRefColorBrandWarmScrimLight: string;
|
|
89
|
+
export const mrRefColorBrandWarmScrimDark: string;
|
|
87
90
|
export const mrRefColorPrimaryLight_1: string;
|
|
88
91
|
export const mrRefColorPrimaryLight_2: string;
|
|
89
92
|
export const mrRefColorPrimaryLight_3: string;
|
|
@@ -460,6 +463,7 @@ export const mrColorBorderStrong: string;
|
|
|
460
463
|
export const mrColorAiTint: string;
|
|
461
464
|
export const mrColorAiOntint: string;
|
|
462
465
|
export const mrColorAiGradient: string;
|
|
466
|
+
export const mrColorScrim: string;
|
|
463
467
|
export const mrTypographyFontSizeXs: number;
|
|
464
468
|
export const mrTypographyFontSizeSm: number;
|
|
465
469
|
export const mrTypographyFontSizeBase: number;
|
package/dist/js/tokens.js
CHANGED
|
@@ -30,6 +30,7 @@ export const mrSysColorAiTint = "#2b2e48";
|
|
|
30
30
|
export const mrSysColorAiOntint = "#8aa0ff";
|
|
31
31
|
export const mrSysColorAiGradient =
|
|
32
32
|
"linear-gradient(135deg, #5b73dd 0%, #ff7548 60%, #ffb878 100%)";
|
|
33
|
+
export const mrSysColorScrim = "rgba(0, 0, 0, 0.65)";
|
|
33
34
|
export const mrSysTextStyleHeading_1Color = "#3d3d3d";
|
|
34
35
|
export const mrSysTypographyLineHeightHead = 1.3;
|
|
35
36
|
export const mrRefColorBrandWarmCanvasLight = "#f4f2ee";
|
|
@@ -89,6 +90,8 @@ export const mrRefColorBrandWarmAiGradientLight =
|
|
|
89
90
|
"linear-gradient(135deg, #2747c4 0%, #f05323 60%, #f99d20 100%)";
|
|
90
91
|
export const mrRefColorBrandWarmAiGradientDark =
|
|
91
92
|
"linear-gradient(135deg, #5b73dd 0%, #ff7548 60%, #ffb878 100%)";
|
|
93
|
+
export const mrRefColorBrandWarmScrimLight = "rgba(20, 17, 13, 0.55)";
|
|
94
|
+
export const mrRefColorBrandWarmScrimDark = "rgba(0, 0, 0, 0.65)";
|
|
92
95
|
export const mrRefColorPrimaryLight_1 = "#f5f9ff";
|
|
93
96
|
export const mrRefColorPrimaryLight_2 = "#ebf4ff";
|
|
94
97
|
export const mrRefColorPrimaryLight_3 = "#d6e6ff";
|
|
@@ -468,6 +471,7 @@ export const mrColorAiTint = "#e4e2f5";
|
|
|
468
471
|
export const mrColorAiOntint = "#2747c4";
|
|
469
472
|
export const mrColorAiGradient =
|
|
470
473
|
"linear-gradient(135deg, #2747c4 0%, #f05323 60%, #f99d20 100%)";
|
|
474
|
+
export const mrColorScrim = "rgba(20, 17, 13, 0.55)";
|
|
471
475
|
export const mrTypographyFontSizeXs = 0.75;
|
|
472
476
|
export const mrTypographyFontSizeSm = 0.875;
|
|
473
477
|
export const mrTypographyFontSizeBase = 1;
|
package/dist/tailwind/theme.css
CHANGED
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
--color-ai-tint: var(--mr-color-ai-tint);
|
|
77
77
|
--color-ai-ontint: var(--mr-color-ai-ontint);
|
|
78
78
|
--color-ai-gradient: var(--mr-color-ai-gradient);
|
|
79
|
+
--color-scrim: var(--mr-color-scrim);
|
|
79
80
|
--text-xs: var(--mr-typography-font-size-xs);
|
|
80
81
|
--text-sm: var(--mr-typography-font-size-sm);
|
|
81
82
|
--text-base: var(--mr-typography-font-size-base);
|
package/package.json
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
"./package.json": "./package.json",
|
|
18
|
-
"./*": "./dist/*"
|
|
2
|
+
"name": "@mediaradar/design-tokens",
|
|
3
|
+
"version": "2.4.0",
|
|
4
|
+
"main": "dist/js/tokens.js",
|
|
5
|
+
"types": "dist/js/tokens.d.ts",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"!dist/index.html",
|
|
10
|
+
"!dist/404.html"
|
|
11
|
+
],
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/js/tokens.d.ts",
|
|
15
|
+
"default": "./dist/js/tokens.js"
|
|
19
16
|
},
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
17
|
+
"./package.json": "./package.json",
|
|
18
|
+
"./*": "./dist/*"
|
|
19
|
+
},
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"clean": "rm -rf build",
|
|
25
|
+
"clean-ds": "rm -rf dists",
|
|
26
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
27
|
+
"build": "node scripts/build-tokens.js --verbose",
|
|
28
|
+
"check-token-drift": "node scripts/check-token-drift.mjs",
|
|
29
|
+
"check-style-guide-drift": "node scripts/check-style-guide-drift.mjs"
|
|
30
|
+
},
|
|
31
|
+
"author": "",
|
|
32
|
+
"license": "Apache-2.0",
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@tokens-studio/sd-transforms": "^2.0.3",
|
|
35
|
+
"lodash": "^4.17.21",
|
|
36
|
+
"lodash-es": "^4.17.21",
|
|
37
|
+
"style-dictionary": "^5.5.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@babel/parser": "^7.29.8",
|
|
41
|
+
"@babel/traverse": "^7.29.8",
|
|
42
|
+
"@types/node": "^25.3.0",
|
|
43
|
+
"eslint": "^10.0.1",
|
|
44
|
+
"react-docgen-typescript": "^2.4.0",
|
|
45
|
+
"typescript": "5.7.2"
|
|
46
|
+
},
|
|
47
|
+
"keywords": [
|
|
48
|
+
"design-tokens",
|
|
49
|
+
"mediaradar"
|
|
50
|
+
],
|
|
51
|
+
"description": "MediaRadar design tokens — CSS custom properties, Tailwind v4 theme, and JS/TS values, built by Style Dictionary."
|
|
52
52
|
}
|