@mediaradar/design-tokens 2.3.0 → 2.5.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 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, for two different needs:
8
+ Output is distributed two ways:
9
9
 
10
- - **CDN** — `tokens.css`/`dark.css` (plain CSS custom properties) are
11
- deployed to Azure Static Web Apps and consumed directly by URL, live and
12
- unversioned. No install required.
13
- - **npm package** (this package) — `tailwind/theme.css`/`typography.css`
14
- contain Tailwind v4 `@theme`/`@utility` directives, which Tailwind's
15
- build-time compiler cannot resolve from a remote `@import` URL. Installing
16
- this package puts a real local file in `node_modules` that Tailwind's
17
- build *can* see.
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
- /* Tailwind's @theme block — needs the npm package, not a CDN URL */
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 only reaches a consumer once that consumer bumps the version, not
39
- automatically. See the root `CLAUDE.md`'s "Consuming in a React + Tailwind
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 ← NOT built here — published by the ux-design repo; do not create or edit
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
- Bump `version` in this file's `package.json` as part of any PR that changes
82
- published output (tokens, `sd.config.mjs`, or this package's own config),
83
- then merge to `main` — `.github/workflows/tokens.yml`'s `publish_npm` job
84
- publishes automatically, and no-ops safely if the version isn't bumped.
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
@@ -181,6 +181,7 @@ Key is the suffix for any Tailwind color utility: `bg-{key}`, `text-{key}`, `bor
181
181
  | brand-primaryAction | #2747c4 | #5b73dd |
182
182
  | brand-onprimary | #ffffff | — |
183
183
  | brand-primarySoft | #ebe3d5 | #3a322a |
184
+ | brand-primaryTint | #eef0fd | #272c49 |
184
185
  | status-success | #1d7a3b | #3a9555 |
185
186
  | status-warning | #b8843a | #d9a655 |
186
187
  | status-danger | #c53030 | #e84a4a |
@@ -194,6 +195,7 @@ Key is the suffix for any Tailwind color utility: `bg-{key}`, `text-{key}`, `bor
194
195
  | ai-tint | #e4e2f5 | #2b2e48 |
195
196
  | ai-ontint | #2747c4 | #8aa0ff |
196
197
  | ai-gradient | linear-gradient(135deg, #2747c4 0%, #f05323 60%, #f99d20 100%) | linear-gradient(135deg, #5b73dd 0%, #ff7548 60%, #ffb878 100%) |
198
+ | scrim | rgba(20, 17, 13, 0.55) | rgba(0, 0, 0, 0.65) |
197
199
 
198
200
  ### Typography
199
201
 
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
@@ -14,6 +14,7 @@
14
14
  --mr-color-brand-primary: var(--mr-ref-color-brand-warm-brand-primary-dark);
15
15
  --mr-color-brand-primary-action: var(--mr-ref-color-brand-warm-brand-primary-action-dark);
16
16
  --mr-color-brand-primary-soft: var(--mr-ref-color-brand-warm-brand-primary-soft-dark);
17
+ --mr-color-brand-primary-tint: var(--mr-ref-color-brand-warm-brand-primary-tint-dark);
17
18
  --mr-color-status-success: var(--mr-ref-color-brand-warm-status-success-dark);
18
19
  --mr-color-status-warning: var(--mr-ref-color-brand-warm-status-warning-dark);
19
20
  --mr-color-status-danger: var(--mr-ref-color-brand-warm-status-danger-dark);
@@ -24,6 +25,7 @@
24
25
  --mr-color-ai-tint: var(--mr-ref-color-brand-warm-ai-tint-dark);
25
26
  --mr-color-ai-ontint: var(--mr-ref-color-brand-warm-ai-ontint-dark);
26
27
  --mr-color-ai-gradient: var(--mr-ref-color-brand-warm-ai-gradient-dark);
28
+ --mr-color-scrim: var(--mr-ref-color-brand-warm-scrim-dark);
27
29
  --mr-text-style-heading-1-color: var(--mr-ref-color-secondary-light-10);
28
30
  --mr-typography-line-height-head: var(--mr-ref-typography-line-height-sm);
29
31
  }
package/dist/css/ref.css CHANGED
@@ -39,6 +39,8 @@
39
39
  --mr-ref-color-brand-warm-onprimary: #ffffff;
40
40
  --mr-ref-color-brand-warm-brand-primary-soft-light: #ebe3d5;
41
41
  --mr-ref-color-brand-warm-brand-primary-soft-dark: #3a322a;
42
+ --mr-ref-color-brand-warm-brand-primary-tint-light: #eef0fd;
43
+ --mr-ref-color-brand-warm-brand-primary-tint-dark: #272c49;
42
44
  --mr-ref-color-brand-warm-status-success-light: #1d7a3b;
43
45
  --mr-ref-color-brand-warm-status-success-dark: #3a9555;
44
46
  --mr-ref-color-brand-warm-status-warning-light: #b8843a;
@@ -52,6 +54,8 @@
52
54
  --mr-ref-color-brand-warm-ai-ontint-dark: #8aa0ff;
53
55
  --mr-ref-color-brand-warm-ai-gradient-light: linear-gradient(135deg, #2747c4 0%, #f05323 60%, #f99d20 100%);
54
56
  --mr-ref-color-brand-warm-ai-gradient-dark: linear-gradient(135deg, #5b73dd 0%, #ff7548 60%, #ffb878 100%);
57
+ --mr-ref-color-brand-warm-scrim-light: rgba(20, 17, 13, 0.55);
58
+ --mr-ref-color-brand-warm-scrim-dark: rgba(0, 0, 0, 0.65);
55
59
  --mr-ref-color-primary-light-1: #f5f9ff;
56
60
  --mr-ref-color-primary-light-2: #ebf4ff;
57
61
  --mr-ref-color-primary-light-3: #d6e6ff;
package/dist/css/sys.css CHANGED
@@ -15,6 +15,7 @@
15
15
  --mr-color-brand-primary-action: var(--mr-ref-color-brand-warm-brand-primary-action-light);
16
16
  --mr-color-brand-onprimary: var(--mr-ref-color-brand-warm-onprimary);
17
17
  --mr-color-brand-primary-soft: var(--mr-ref-color-brand-warm-brand-primary-soft-light);
18
+ --mr-color-brand-primary-tint: var(--mr-ref-color-brand-warm-brand-primary-tint-light);
18
19
  --mr-color-status-success: var(--mr-ref-color-brand-warm-status-success-light);
19
20
  --mr-color-status-warning: var(--mr-ref-color-brand-warm-status-warning-light);
20
21
  --mr-color-status-danger: var(--mr-ref-color-brand-warm-status-danger-light);
@@ -28,6 +29,7 @@
28
29
  --mr-color-ai-tint: var(--mr-ref-color-brand-warm-ai-tint-light);
29
30
  --mr-color-ai-ontint: var(--mr-ref-color-brand-warm-ai-ontint-light);
30
31
  --mr-color-ai-gradient: var(--mr-ref-color-brand-warm-ai-gradient-light);
32
+ --mr-color-scrim: var(--mr-ref-color-brand-warm-scrim-light);
31
33
  --mr-typography-font-size-xs: var(--mr-ref-typography-size-xs);
32
34
  --mr-typography-font-size-sm: var(--mr-ref-typography-size-sm);
33
35
  --mr-typography-font-size-base: var(--mr-ref-typography-size-base);
@@ -19,6 +19,7 @@ export const mrSysColorTextLink: string;
19
19
  export const mrSysColorBrandPrimary: string;
20
20
  export const mrSysColorBrandPrimaryAction: string;
21
21
  export const mrSysColorBrandPrimarySoft: string;
22
+ export const mrSysColorBrandPrimaryTint: string;
22
23
  export const mrSysColorStatusSuccess: string;
23
24
  export const mrSysColorStatusWarning: string;
24
25
  export const mrSysColorStatusDanger: string;
@@ -29,6 +30,7 @@ export const mrSysColorBorderStrong: string;
29
30
  export const mrSysColorAiTint: string;
30
31
  export const mrSysColorAiOntint: string;
31
32
  export const mrSysColorAiGradient: string;
33
+ export const mrSysColorScrim: string;
32
34
  export const mrSysTextStyleHeading_1Color: string;
33
35
  export const mrSysTypographyLineHeightHead: number;
34
36
  export const mrRefColorBrandWarmCanvasLight: string;
@@ -71,6 +73,8 @@ export const mrRefColorBrandWarmBrandPrimaryActionDark: string;
71
73
  export const mrRefColorBrandWarmOnprimary: string;
72
74
  export const mrRefColorBrandWarmBrandPrimarySoftLight: string;
73
75
  export const mrRefColorBrandWarmBrandPrimarySoftDark: string;
76
+ export const mrRefColorBrandWarmBrandPrimaryTintLight: string;
77
+ export const mrRefColorBrandWarmBrandPrimaryTintDark: string;
74
78
  export const mrRefColorBrandWarmStatusSuccessLight: string;
75
79
  export const mrRefColorBrandWarmStatusSuccessDark: string;
76
80
  export const mrRefColorBrandWarmStatusWarningLight: string;
@@ -84,6 +88,8 @@ export const mrRefColorBrandWarmAiOntintLight: string;
84
88
  export const mrRefColorBrandWarmAiOntintDark: string;
85
89
  export const mrRefColorBrandWarmAiGradientLight: string;
86
90
  export const mrRefColorBrandWarmAiGradientDark: string;
91
+ export const mrRefColorBrandWarmScrimLight: string;
92
+ export const mrRefColorBrandWarmScrimDark: string;
87
93
  export const mrRefColorPrimaryLight_1: string;
88
94
  export const mrRefColorPrimaryLight_2: string;
89
95
  export const mrRefColorPrimaryLight_3: string;
@@ -447,6 +453,7 @@ export const mrColorBrandPrimary: string;
447
453
  export const mrColorBrandPrimaryAction: string;
448
454
  export const mrColorBrandOnprimary: string;
449
455
  export const mrColorBrandPrimarySoft: string;
456
+ export const mrColorBrandPrimaryTint: string;
450
457
  export const mrColorStatusSuccess: string;
451
458
  export const mrColorStatusWarning: string;
452
459
  export const mrColorStatusDanger: string;
@@ -460,6 +467,7 @@ export const mrColorBorderStrong: string;
460
467
  export const mrColorAiTint: string;
461
468
  export const mrColorAiOntint: string;
462
469
  export const mrColorAiGradient: string;
470
+ export const mrColorScrim: string;
463
471
  export const mrTypographyFontSizeXs: number;
464
472
  export const mrTypographyFontSizeSm: number;
465
473
  export const mrTypographyFontSizeBase: number;
package/dist/js/tokens.js CHANGED
@@ -19,6 +19,7 @@ export const mrSysColorTextLink = "#8aa0ff";
19
19
  export const mrSysColorBrandPrimary = "#ff7548";
20
20
  export const mrSysColorBrandPrimaryAction = "#5b73dd";
21
21
  export const mrSysColorBrandPrimarySoft = "#3a322a";
22
+ export const mrSysColorBrandPrimaryTint = "#272c49";
22
23
  export const mrSysColorStatusSuccess = "#3a9555";
23
24
  export const mrSysColorStatusWarning = "#d9a655";
24
25
  export const mrSysColorStatusDanger = "#e84a4a";
@@ -30,6 +31,7 @@ export const mrSysColorAiTint = "#2b2e48";
30
31
  export const mrSysColorAiOntint = "#8aa0ff";
31
32
  export const mrSysColorAiGradient =
32
33
  "linear-gradient(135deg, #5b73dd 0%, #ff7548 60%, #ffb878 100%)";
34
+ export const mrSysColorScrim = "rgba(0, 0, 0, 0.65)";
33
35
  export const mrSysTextStyleHeading_1Color = "#3d3d3d";
34
36
  export const mrSysTypographyLineHeightHead = 1.3;
35
37
  export const mrRefColorBrandWarmCanvasLight = "#f4f2ee";
@@ -74,6 +76,8 @@ export const mrRefColorBrandWarmBrandPrimaryActionDark = "#5b73dd";
74
76
  export const mrRefColorBrandWarmOnprimary = "#ffffff";
75
77
  export const mrRefColorBrandWarmBrandPrimarySoftLight = "#ebe3d5";
76
78
  export const mrRefColorBrandWarmBrandPrimarySoftDark = "#3a322a";
79
+ export const mrRefColorBrandWarmBrandPrimaryTintLight = "#eef0fd";
80
+ export const mrRefColorBrandWarmBrandPrimaryTintDark = "#272c49";
77
81
  export const mrRefColorBrandWarmStatusSuccessLight = "#1d7a3b";
78
82
  export const mrRefColorBrandWarmStatusSuccessDark = "#3a9555";
79
83
  export const mrRefColorBrandWarmStatusWarningLight = "#b8843a";
@@ -89,6 +93,8 @@ export const mrRefColorBrandWarmAiGradientLight =
89
93
  "linear-gradient(135deg, #2747c4 0%, #f05323 60%, #f99d20 100%)";
90
94
  export const mrRefColorBrandWarmAiGradientDark =
91
95
  "linear-gradient(135deg, #5b73dd 0%, #ff7548 60%, #ffb878 100%)";
96
+ export const mrRefColorBrandWarmScrimLight = "rgba(20, 17, 13, 0.55)";
97
+ export const mrRefColorBrandWarmScrimDark = "rgba(0, 0, 0, 0.65)";
92
98
  export const mrRefColorPrimaryLight_1 = "#f5f9ff";
93
99
  export const mrRefColorPrimaryLight_2 = "#ebf4ff";
94
100
  export const mrRefColorPrimaryLight_3 = "#d6e6ff";
@@ -454,6 +460,7 @@ export const mrColorBrandPrimary = "#f05323";
454
460
  export const mrColorBrandPrimaryAction = "#2747c4";
455
461
  export const mrColorBrandOnprimary = "#ffffff";
456
462
  export const mrColorBrandPrimarySoft = "#ebe3d5";
463
+ export const mrColorBrandPrimaryTint = "#eef0fd";
457
464
  export const mrColorStatusSuccess = "#1d7a3b";
458
465
  export const mrColorStatusWarning = "#b8843a";
459
466
  export const mrColorStatusDanger = "#c53030";
@@ -468,6 +475,7 @@ export const mrColorAiTint = "#e4e2f5";
468
475
  export const mrColorAiOntint = "#2747c4";
469
476
  export const mrColorAiGradient =
470
477
  "linear-gradient(135deg, #2747c4 0%, #f05323 60%, #f99d20 100%)";
478
+ export const mrColorScrim = "rgba(20, 17, 13, 0.55)";
471
479
  export const mrTypographyFontSizeXs = 0.75;
472
480
  export const mrTypographyFontSizeSm = 0.875;
473
481
  export const mrTypographyFontSizeBase = 1;
@@ -63,6 +63,7 @@
63
63
  --color-brand-primaryAction: var(--mr-color-brand-primary-action);
64
64
  --color-brand-onprimary: var(--mr-color-brand-onprimary);
65
65
  --color-brand-primarySoft: var(--mr-color-brand-primary-soft);
66
+ --color-brand-primaryTint: var(--mr-color-brand-primary-tint);
66
67
  --color-status-success: var(--mr-color-status-success);
67
68
  --color-status-warning: var(--mr-color-status-warning);
68
69
  --color-status-danger: var(--mr-color-status-danger);
@@ -76,6 +77,7 @@
76
77
  --color-ai-tint: var(--mr-color-ai-tint);
77
78
  --color-ai-ontint: var(--mr-color-ai-ontint);
78
79
  --color-ai-gradient: var(--mr-color-ai-gradient);
80
+ --color-scrim: var(--mr-color-scrim);
79
81
  --text-xs: var(--mr-typography-font-size-xs);
80
82
  --text-sm: var(--mr-typography-font-size-sm);
81
83
  --text-base: var(--mr-typography-font-size-base);
package/package.json CHANGED
@@ -1,52 +1,52 @@
1
1
  {
2
- "name": "@mediaradar/design-tokens",
3
- "version": "2.3.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/staticwebapp.config.json"
11
- ],
12
- "exports": {
13
- ".": {
14
- "types": "./dist/js/tokens.d.ts",
15
- "default": "./dist/js/tokens.js"
16
- },
17
- "./package.json": "./package.json",
18
- "./*": "./dist/*"
2
+ "name": "@mediaradar/design-tokens",
3
+ "version": "2.5.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
- "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."
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
  }