@path58/tokens 1.0.0-rc.1 → 1.1.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-rc.1",
3
+ "version": "1.1.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,26 @@
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
+
33
53
  /* -------------------------------------------------------------------
34
54
  COLOR — ACCENT (terminal teal / brand)
35
55
  `--p58-teal-*` is the canonical p58 accent (data / dev / proof moments),
@@ -74,6 +94,37 @@
74
94
  muted cyan glyph — preserves the "soft icon" aesthetic. On p58-light it dispatches to a
75
95
  fully opaque darker teal (see p58-light.css). Per REQ-2026-06-02-008 Option A. */
76
96
 
97
+ /* Canonical accent tint — low-opacity teal fill for selected-state backgrounds,
98
+ status-pill fills, avatar bgs, focus-ring tints. Live precedent: p58-marketing-tools
99
+ intake/waitlist + DSGN-2.1.3 axe-sample dashboard all use rgba(0,212,170,.12) inline;
100
+ this token formalizes the canon. Per REQ-2026-06-08-001 (closed 2026-06-15).
101
+ Theme dispatch: per-theme overrides can re-point to lime-tint for consultancy world
102
+ (path58-tool.css), violet-tint for p58-product-axe, etc. */
103
+ --p58-accent-tint: color-mix(in srgb, var(--p58-teal) 12%, transparent);
104
+
105
+ /* -------------------------------------------------------------------
106
+ PRIMARY-CTA TOKEN FAMILY (per REQ-2026-06-16-002 Option A canonical fix,
107
+ shipped via REQ-2026-06-16-003 v2.3.0)
108
+
109
+ Distinct from --p58-accent (which is the brand-side accent — teal on
110
+ p58 surfaces, used for fills, focus rings, data series). --p58-primary
111
+ is specifically the PRIMARY-CTA color, which per brand canon dispatches
112
+ differently:
113
+ p58 (product) surfaces → teal CTAs (revenue meets dev tooling)
114
+ Path58 consultancy → NAVY CTAs (warm-editorial; lime reserved
115
+ for one money-moment per surface)
116
+ AXE product surface → violet CTAs (AXE accent)
117
+
118
+ Default below = teal (p58 product surface convention). Each Path58
119
+ theme overrides --p58-primary in their theme CSS to navy. This closes
120
+ REQ-2026-06-16-002 — Button.css + P58Button.tsx now read --p58-primary
121
+ and the theme cascade routes per-brand without per-consumer overrides.
122
+ ------------------------------------------------------------------- */
123
+ --p58-primary: var(--p58-teal); /* default: p58 product = teal */
124
+ --p58-primary-hover: var(--p58-teal-hover);
125
+ --p58-primary-press: var(--p58-teal-press);
126
+ --p58-primary-fg: var(--p58-on-accent); /* navy text on teal */
127
+
77
128
  /* -------------------------------------------------------------------
78
129
  BRAND COLOR FAMILIES (per BRAND_STRATEGY_v2 § Visual identity)
79
130
  Three secondary accent families woven across the two sub-brands:
@@ -112,6 +163,51 @@
112
163
  --p58-lime-300: #c7d79b; /* optional — light tint (backgrounds) */
113
164
  --p58-lime-700: #6c7f34; /* optional — deep lime */
114
165
 
166
+ /* --- AXE ACCENT (p58-product-axe sibling — Pattern A: primary-accent-replacement) -----
167
+ The p58-product-axe theme is the second p58 sibling (after p58-product-n8n).
168
+ Per the sibling-accent Pattern A established in DSGN-2.1.1 E1 § Sibling
169
+ architectural divergence, AXE re-points the SEMANTIC --p58-accent-* family
170
+ at theme scope; the locked --p58-teal-* anchor values are NOT overridden
171
+ globally. This family carries the AXE primary accent values; consumption
172
+ happens under [data-theme="p58-product-axe"] in p58-product-axe.css.
173
+ Per REQ-2026-06-07-001 (DSGN-2.1.1 closure 2026-06-07).
174
+ ✅ Accent locked at violet by Tsvika consultation gate (DSGN-2.1.1, 2026-06-07).
175
+ WCAG: 7.26:1 on --p58-bg (AAA body); 6.83:1 on --p58-surface (AA body);
176
+ 5.99:1 navy ink on solid violet fill (AA body). */
177
+ --p58-axe-accent: #a78bfa; /* primary AXE accent — violet */
178
+ --p58-axe-accent-hover: #baa5fb; /* +22% toward white (sibling-consistent with n8n) */
179
+ --p58-axe-accent-press: #967de1; /* -10% toward black (sibling-consistent with n8n) */
180
+ --p58-axe-accent-dim: color-mix(in srgb, #a78bfa 13%, transparent); /* subtle tint fill */
181
+ --p58-axe-accent-glow: color-mix(in srgb, #a78bfa 27%, transparent); /* glow / ring */
182
+
183
+ /* --- AXE SUCCESS GREEN (theme-dispatched true green; not teal) -------------------
184
+ Family-default --p58-success is teal-hued (#00d4aa) which under [data-theme=
185
+ "p58-product-axe"] visually overlaps with p58-n8n's teal signature. The AXE
186
+ theme re-points --p58-success to this true-green value so status pills on
187
+ AXE surfaces read as clean green-yellow-red triad without the teal/n8n
188
+ confound. Per BRAND_ARCHITECTURE.md § 5 "Semantic colors are sacred" and
189
+ DSGN-2.1.3 Tsvika-ZT-finding 2026-06-07. WCAG AA: 7.21:1 on --p58-bg #0a0a1a
190
+ (AAA body); 6.78:1 on --p58-surface #0e0e24 (AA body); 6.17:1 on --p58-
191
+ surface-2; consumption in p58-product-axe.css. */
192
+ --p58-success-axe: #4ade80; /* true green — Tailwind green-400 register */
193
+ --p58-success-axe-dim: color-mix(in srgb, #4ade80 14%, transparent);
194
+
195
+ /* --- AXE DENSITY MODIFIERS (p58-product-axe — one step tighter on data regions) -----
196
+ AXE Engine is the measurement instrument; instruments are dense. Per E2
197
+ density spec (DSGN-2.1.1). These tokens exist for theme-scoped consumption
198
+ under [data-theme="p58-product-axe"] in p58-product-axe.css. AXE applies
199
+ them to data-region surfaces (cards, tile grids, journey timelines) where
200
+ denser rhythm signals "instrument, scanning surface" — Grafana / Datadog /
201
+ Linear Analytics neighborhood. Other themes are unaffected. */
202
+ --p58-axe-density-card-padding: 14px 16px; /* vs family-default ~18-20px */
203
+ --p58-axe-density-tile-padding: 10px 12px; /* vs family-default ~12-14px */
204
+ --p58-axe-density-grid-gap: 8px; /* vs family-default 12px */
205
+ --p58-axe-density-section-gap: 14px; /* vs family-default 18-20px */
206
+ --p58-axe-density-row-height: 28px; /* table rows / journey strips — vs family-default 32-36px */
207
+ --p58-axe-density-tile-value-fontsize: 18px; /* vs family-default 16-17px */
208
+ --p58-axe-density-tile-label-fontsize: 10.5px; /* vs family-default 11-12px */
209
+ --p58-axe-density-mono-letter-spacing: 0.005em; /* slightly tighter mono */
210
+
115
211
  /* -------------------------------------------------------------------
116
212
  COLOR — SEMANTIC
117
213
  ------------------------------------------------------------------- */
@@ -290,10 +386,14 @@ html, body {
290
386
  -moz-osx-font-smoothing: grayscale;
291
387
  }
292
388
 
293
- /* Headings — Space Grotesk, tight tracking, tight leading */
389
+ /* Headings — Space Grotesk, tight tracking, tight leading.
390
+ Per REQ-2026-06-16-003 v2.3.0: responsive scale via clamp() so headings
391
+ step down at narrow viewports without per-consumer theme-scoped overrides.
392
+ Each clamp() uses (mobile-min, fluid-scale, desktop-max) pattern. */
294
393
  .p58-h1, h1.p58 {
295
394
  font-family: var(--p58-font-display);
296
- font-size: var(--p58-text-5xl);
395
+ /* desktop var(--p58-text-5xl) ≈ 48px; clamp 28→48 across 360→1080 viewport */
396
+ font-size: clamp(28px, 2.2vw + 16px, var(--p58-text-5xl));
297
397
  font-weight: var(--p58-weight-semibold);
298
398
  line-height: var(--p58-leading-tight);
299
399
  letter-spacing: var(--p58-tracking-tight);
@@ -301,7 +401,8 @@ html, body {
301
401
  }
302
402
  .p58-h2, h2.p58 {
303
403
  font-family: var(--p58-font-display);
304
- font-size: var(--p58-text-3xl);
404
+ /* desktop var(--p58-text-3xl) = 32px; clamp 22→32 */
405
+ font-size: clamp(22px, 1.2vw + 16px, var(--p58-text-3xl));
305
406
  font-weight: var(--p58-weight-semibold);
306
407
  line-height: var(--p58-leading-tight);
307
408
  letter-spacing: var(--p58-tracking-tight);
@@ -309,22 +410,25 @@ html, body {
309
410
  }
310
411
  .p58-h3, h3.p58 {
311
412
  font-family: var(--p58-font-display);
312
- font-size: var(--p58-text-2xl);
413
+ /* desktop var(--p58-text-2xl) = 24px; clamp 17→24 */
414
+ font-size: clamp(17px, 0.8vw + 14px, var(--p58-text-2xl));
313
415
  font-weight: var(--p58-weight-medium);
314
416
  line-height: var(--p58-leading-snug);
315
417
  color: var(--p58-fg-1);
316
418
  }
317
419
  .p58-h4, h4.p58 {
318
420
  font-family: var(--p58-font-display);
319
- font-size: var(--p58-text-xl);
421
+ /* desktop var(--p58-text-xl) = 20px; clamp 16→20 */
422
+ font-size: clamp(16px, 0.5vw + 14px, var(--p58-text-xl));
320
423
  font-weight: var(--p58-weight-medium);
321
424
  line-height: var(--p58-leading-snug);
322
425
  color: var(--p58-fg-1);
323
426
  }
324
427
 
325
- /* Body */
428
+ /* Body — responsive scale per REQ-2026-06-16-003 v2.3.0 */
326
429
  .p58-body {
327
430
  font-family: var(--p58-font-ui);
431
+ /* desktop var(--p58-text-md) = 13px; clamp 14→13 — body stays readable on mobile (no shrink below desktop) */
328
432
  font-size: var(--p58-text-md);
329
433
  font-weight: var(--p58-weight-regular);
330
434
  line-height: var(--p58-leading-normal);
@@ -332,7 +436,8 @@ html, body {
332
436
  }
333
437
  .p58-body-lg {
334
438
  font-family: var(--p58-font-ui);
335
- font-size: var(--p58-text-lg);
439
+ /* desktop var(--p58-text-lg) = 16px; clamp 15→16 — light step-down only */
440
+ font-size: clamp(15px, 0.2vw + 13px, var(--p58-text-lg));
336
441
  line-height: var(--p58-leading-normal);
337
442
  color: var(--p58-fg-2);
338
443
  }
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',