@path58/tokens 1.0.0 → 1.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@path58/tokens",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "description": "Path58 design tokens — CSS variables and TS exports for color, type, spacing, motion, z-index. Single source of truth consumed by @path58/themes and @path58/ui.",
5
5
  "type": "module",
6
6
  "main": "./src/tokens.ts",
package/src/tokens.css CHANGED
@@ -30,6 +30,38 @@
30
30
  --p58-border-strong: rgba(255, 255, 255, 0.14);
31
31
  --p58-border-subtle: rgba(255, 255, 255, 0.04);
32
32
 
33
+ /* -------------------------------------------------------------------
34
+ COLOR — OVERLAY / SCRIM
35
+ The dimming layer between trigger surface and modal foreground.
36
+ Cascades via --p58-bg so each active theme resolves to a coherent
37
+ tint (dark veil on p58-dark / p58-product-*; cream veil on path58-*).
38
+ Theme files may override for brand-specific veil intensity.
39
+ Genesis: REQ-2026-06-14-001 (DSGN-3.6.1 D6 token gap GAP-3.6.1-01).
40
+ ------------------------------------------------------------------- */
41
+ --p58-overlay-backdrop: color-mix(in srgb, var(--p58-bg) 65%, transparent);
42
+
43
+ /* -------------------------------------------------------------------
44
+ COLOR — DISABLED SURFACE
45
+ The fill behind disabled controls (inputs, selects, textareas).
46
+ A slightly-darker variant of --p58-surface-2 on dark themes; theme
47
+ files override for brand-specific tone on light surfaces.
48
+ Genesis: REQ-2026-06-25-001 (DSGN-2.7.1 Fork 5 — filled-disabled
49
+ canon picked over opacity-only per Tsvika 2026-06-25 design discovery).
50
+ ------------------------------------------------------------------- */
51
+ --p58-surface-disabled: color-mix(in srgb, var(--p58-surface-2) 60%, var(--p58-bg) 40%);
52
+
53
+ /* -------------------------------------------------------------------
54
+ COLOR — NAV STATE (DSGN-2.10.2 — ToolSidebar nav-item state hierarchy)
55
+ Three-tier discrimination: default < hover (3% blue-900) < active (5% blue-900).
56
+ Focus uses --p58-ring-focus (shadow ring; not bg). All themes inherit via
57
+ color-mix() against the current --p58-blue-900 anchor — overlay-bound rendering
58
+ preserved (DESIGN-PER-CLIENT-OVERLAY-LOCK-2026-06-19). Themes MAY override
59
+ these tokens for theme-specific palettes.
60
+ ------------------------------------------------------------------- */
61
+ --p58-nav-hover-bg: color-mix(in srgb, var(--p58-blue-900) 3%, transparent);
62
+ --p58-nav-active-bg: color-mix(in srgb, var(--p58-blue-900) 5%, transparent);
63
+ --p58-nav-active-accent: var(--p58-blue-900); /* 3px rail color on active nav-item */
64
+
33
65
  /* -------------------------------------------------------------------
34
66
  COLOR — ACCENT (terminal teal / brand)
35
67
  `--p58-teal-*` is the canonical p58 accent (data / dev / proof moments),
@@ -74,6 +106,37 @@
74
106
  muted cyan glyph — preserves the "soft icon" aesthetic. On p58-light it dispatches to a
75
107
  fully opaque darker teal (see p58-light.css). Per REQ-2026-06-02-008 Option A. */
76
108
 
109
+ /* Canonical accent tint — low-opacity teal fill for selected-state backgrounds,
110
+ status-pill fills, avatar bgs, focus-ring tints. Live precedent: p58-marketing-tools
111
+ intake/waitlist + DSGN-2.1.3 axe-sample dashboard all use rgba(0,212,170,.12) inline;
112
+ this token formalizes the canon. Per REQ-2026-06-08-001 (closed 2026-06-15).
113
+ Theme dispatch: per-theme overrides can re-point to lime-tint for consultancy world
114
+ (path58-tool.css), violet-tint for p58-product-axe, etc. */
115
+ --p58-accent-tint: color-mix(in srgb, var(--p58-teal) 12%, transparent);
116
+
117
+ /* -------------------------------------------------------------------
118
+ PRIMARY-CTA TOKEN FAMILY (per REQ-2026-06-16-002 Option A canonical fix,
119
+ shipped via REQ-2026-06-16-003 v2.3.0)
120
+
121
+ Distinct from --p58-accent (which is the brand-side accent — teal on
122
+ p58 surfaces, used for fills, focus rings, data series). --p58-primary
123
+ is specifically the PRIMARY-CTA color, which per brand canon dispatches
124
+ differently:
125
+ p58 (product) surfaces → teal CTAs (revenue meets dev tooling)
126
+ Path58 consultancy → NAVY CTAs (warm-editorial; lime reserved
127
+ for one money-moment per surface)
128
+ AXE product surface → violet CTAs (AXE accent)
129
+
130
+ Default below = teal (p58 product surface convention). Each Path58
131
+ theme overrides --p58-primary in their theme CSS to navy. This closes
132
+ REQ-2026-06-16-002 — Button.css + P58Button.tsx now read --p58-primary
133
+ and the theme cascade routes per-brand without per-consumer overrides.
134
+ ------------------------------------------------------------------- */
135
+ --p58-primary: var(--p58-teal); /* default: p58 product = teal */
136
+ --p58-primary-hover: var(--p58-teal-hover);
137
+ --p58-primary-press: var(--p58-teal-press);
138
+ --p58-primary-fg: var(--p58-on-accent); /* navy text on teal */
139
+
77
140
  /* -------------------------------------------------------------------
78
141
  BRAND COLOR FAMILIES (per BRAND_STRATEGY_v2 § Visual identity)
79
142
  Three secondary accent families woven across the two sub-brands:
@@ -112,6 +175,51 @@
112
175
  --p58-lime-300: #c7d79b; /* optional — light tint (backgrounds) */
113
176
  --p58-lime-700: #6c7f34; /* optional — deep lime */
114
177
 
178
+ /* --- AXE ACCENT (p58-product-axe sibling — Pattern A: primary-accent-replacement) -----
179
+ The p58-product-axe theme is the second p58 sibling (after p58-product-n8n).
180
+ Per the sibling-accent Pattern A established in DSGN-2.1.1 E1 § Sibling
181
+ architectural divergence, AXE re-points the SEMANTIC --p58-accent-* family
182
+ at theme scope; the locked --p58-teal-* anchor values are NOT overridden
183
+ globally. This family carries the AXE primary accent values; consumption
184
+ happens under [data-theme="p58-product-axe"] in p58-product-axe.css.
185
+ Per REQ-2026-06-07-001 (DSGN-2.1.1 closure 2026-06-07).
186
+ ✅ Accent locked at violet by Tsvika consultation gate (DSGN-2.1.1, 2026-06-07).
187
+ WCAG: 7.26:1 on --p58-bg (AAA body); 6.83:1 on --p58-surface (AA body);
188
+ 5.99:1 navy ink on solid violet fill (AA body). */
189
+ --p58-axe-accent: #a78bfa; /* primary AXE accent — violet */
190
+ --p58-axe-accent-hover: #baa5fb; /* +22% toward white (sibling-consistent with n8n) */
191
+ --p58-axe-accent-press: #967de1; /* -10% toward black (sibling-consistent with n8n) */
192
+ --p58-axe-accent-dim: color-mix(in srgb, #a78bfa 13%, transparent); /* subtle tint fill */
193
+ --p58-axe-accent-glow: color-mix(in srgb, #a78bfa 27%, transparent); /* glow / ring */
194
+
195
+ /* --- AXE SUCCESS GREEN (theme-dispatched true green; not teal) -------------------
196
+ Family-default --p58-success is teal-hued (#00d4aa) which under [data-theme=
197
+ "p58-product-axe"] visually overlaps with p58-n8n's teal signature. The AXE
198
+ theme re-points --p58-success to this true-green value so status pills on
199
+ AXE surfaces read as clean green-yellow-red triad without the teal/n8n
200
+ confound. Per BRAND_ARCHITECTURE.md § 5 "Semantic colors are sacred" and
201
+ DSGN-2.1.3 Tsvika-ZT-finding 2026-06-07. WCAG AA: 7.21:1 on --p58-bg #0a0a1a
202
+ (AAA body); 6.78:1 on --p58-surface #0e0e24 (AA body); 6.17:1 on --p58-
203
+ surface-2; consumption in p58-product-axe.css. */
204
+ --p58-success-axe: #4ade80; /* true green — Tailwind green-400 register */
205
+ --p58-success-axe-dim: color-mix(in srgb, #4ade80 14%, transparent);
206
+
207
+ /* --- AXE DENSITY MODIFIERS (p58-product-axe — one step tighter on data regions) -----
208
+ AXE Engine is the measurement instrument; instruments are dense. Per E2
209
+ density spec (DSGN-2.1.1). These tokens exist for theme-scoped consumption
210
+ under [data-theme="p58-product-axe"] in p58-product-axe.css. AXE applies
211
+ them to data-region surfaces (cards, tile grids, journey timelines) where
212
+ denser rhythm signals "instrument, scanning surface" — Grafana / Datadog /
213
+ Linear Analytics neighborhood. Other themes are unaffected. */
214
+ --p58-axe-density-card-padding: 14px 16px; /* vs family-default ~18-20px */
215
+ --p58-axe-density-tile-padding: 10px 12px; /* vs family-default ~12-14px */
216
+ --p58-axe-density-grid-gap: 8px; /* vs family-default 12px */
217
+ --p58-axe-density-section-gap: 14px; /* vs family-default 18-20px */
218
+ --p58-axe-density-row-height: 28px; /* table rows / journey strips — vs family-default 32-36px */
219
+ --p58-axe-density-tile-value-fontsize: 18px; /* vs family-default 16-17px */
220
+ --p58-axe-density-tile-label-fontsize: 10.5px; /* vs family-default 11-12px */
221
+ --p58-axe-density-mono-letter-spacing: 0.005em; /* slightly tighter mono */
222
+
115
223
  /* -------------------------------------------------------------------
116
224
  COLOR — SEMANTIC
117
225
  ------------------------------------------------------------------- */
@@ -290,10 +398,14 @@ html, body {
290
398
  -moz-osx-font-smoothing: grayscale;
291
399
  }
292
400
 
293
- /* Headings — Space Grotesk, tight tracking, tight leading */
401
+ /* Headings — Space Grotesk, tight tracking, tight leading.
402
+ Per REQ-2026-06-16-003 v2.3.0: responsive scale via clamp() so headings
403
+ step down at narrow viewports without per-consumer theme-scoped overrides.
404
+ Each clamp() uses (mobile-min, fluid-scale, desktop-max) pattern. */
294
405
  .p58-h1, h1.p58 {
295
406
  font-family: var(--p58-font-display);
296
- font-size: var(--p58-text-5xl);
407
+ /* desktop var(--p58-text-5xl) ≈ 48px; clamp 28→48 across 360→1080 viewport */
408
+ font-size: clamp(28px, 2.2vw + 16px, var(--p58-text-5xl));
297
409
  font-weight: var(--p58-weight-semibold);
298
410
  line-height: var(--p58-leading-tight);
299
411
  letter-spacing: var(--p58-tracking-tight);
@@ -301,7 +413,8 @@ html, body {
301
413
  }
302
414
  .p58-h2, h2.p58 {
303
415
  font-family: var(--p58-font-display);
304
- font-size: var(--p58-text-3xl);
416
+ /* desktop var(--p58-text-3xl) = 32px; clamp 22→32 */
417
+ font-size: clamp(22px, 1.2vw + 16px, var(--p58-text-3xl));
305
418
  font-weight: var(--p58-weight-semibold);
306
419
  line-height: var(--p58-leading-tight);
307
420
  letter-spacing: var(--p58-tracking-tight);
@@ -309,22 +422,25 @@ html, body {
309
422
  }
310
423
  .p58-h3, h3.p58 {
311
424
  font-family: var(--p58-font-display);
312
- font-size: var(--p58-text-2xl);
425
+ /* desktop var(--p58-text-2xl) = 24px; clamp 17→24 */
426
+ font-size: clamp(17px, 0.8vw + 14px, var(--p58-text-2xl));
313
427
  font-weight: var(--p58-weight-medium);
314
428
  line-height: var(--p58-leading-snug);
315
429
  color: var(--p58-fg-1);
316
430
  }
317
431
  .p58-h4, h4.p58 {
318
432
  font-family: var(--p58-font-display);
319
- font-size: var(--p58-text-xl);
433
+ /* desktop var(--p58-text-xl) = 20px; clamp 16→20 */
434
+ font-size: clamp(16px, 0.5vw + 14px, var(--p58-text-xl));
320
435
  font-weight: var(--p58-weight-medium);
321
436
  line-height: var(--p58-leading-snug);
322
437
  color: var(--p58-fg-1);
323
438
  }
324
439
 
325
- /* Body */
440
+ /* Body — responsive scale per REQ-2026-06-16-003 v2.3.0 */
326
441
  .p58-body {
327
442
  font-family: var(--p58-font-ui);
443
+ /* desktop var(--p58-text-md) = 13px; clamp 14→13 — body stays readable on mobile (no shrink below desktop) */
328
444
  font-size: var(--p58-text-md);
329
445
  font-weight: var(--p58-weight-regular);
330
446
  line-height: var(--p58-leading-normal);
@@ -332,7 +448,8 @@ html, body {
332
448
  }
333
449
  .p58-body-lg {
334
450
  font-family: var(--p58-font-ui);
335
- font-size: var(--p58-text-lg);
451
+ /* desktop var(--p58-text-lg) = 16px; clamp 15→16 — light step-down only */
452
+ font-size: clamp(15px, 0.2vw + 13px, var(--p58-text-lg));
336
453
  line-height: var(--p58-leading-normal);
337
454
  color: var(--p58-fg-2);
338
455
  }
package/src/tokens.ts CHANGED
@@ -71,6 +71,14 @@ export const tokens = {
71
71
  // color-mix or hex would freeze it to one theme and reintroduce the on-light contrast fail.
72
72
  iconAccentSoft: 'var(--p58-icon-accent-soft)',
73
73
 
74
+ // accentTint: theme-DISPATCHED canonical accent tint (REQ-2026-06-08-001).
75
+ // Low-opacity fill for selected-state backgrounds, status-pill fills, avatar bgs,
76
+ // focus-ring tints. Same self-referencing-var pattern as accentFg/iconAccentSoft so
77
+ // the cascade resolves the tint per theme: teal-tint (p58-dark/p58-light), lime-tint
78
+ // (path58-tool consultancy), violet-tint (p58-product-axe). A baked color-mix here
79
+ // would freeze it to teal and defeat the dispatch.
80
+ accentTint: 'var(--p58-accent-tint)',
81
+
74
82
  // Accent — ALIASES of teal* (back-compat; maps to --p58-accent* → var(--p58-teal*))
75
83
  accent: '#00d4aa',
76
84
  accentHover: '#1ee5bd',