@titan-design/react-ui 0.9.2 → 0.10.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.
Files changed (53) hide show
  1. package/dist/bodymap.js +78 -24
  2. package/dist/bodymap.js.map +1 -1
  3. package/dist/bodymap.mjs +78 -24
  4. package/dist/bodymap.mjs.map +1 -1
  5. package/dist/index.d.mts +215 -123
  6. package/dist/index.d.ts +215 -123
  7. package/dist/index.js +408 -259
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.mjs +258 -121
  10. package/dist/index.mjs.map +1 -1
  11. package/dist/pages.js +214 -157
  12. package/dist/pages.js.map +1 -1
  13. package/dist/pages.mjs +214 -157
  14. package/dist/pages.mjs.map +1 -1
  15. package/dist/theme/index.d.mts +895 -795
  16. package/dist/theme/index.d.ts +895 -795
  17. package/dist/theme/index.js +101 -20
  18. package/dist/theme/index.js.map +1 -1
  19. package/dist/theme/index.mjs +99 -22
  20. package/dist/theme/index.mjs.map +1 -1
  21. package/dist/theme/tokens-css.js +88 -24
  22. package/dist/theme/tokens-css.js.map +1 -1
  23. package/dist/theme/tokens-css.mjs +88 -24
  24. package/dist/theme/tokens-css.mjs.map +1 -1
  25. package/package.json +1 -1
  26. package/src/components/custom/Workout/BaseBadge.tsx +5 -5
  27. package/src/components/custom/Workout/RowInventory.stories.tsx +5 -2
  28. package/src/components/custom/Workout/S3FullRail.stories.tsx +13 -1
  29. package/src/components/custom/Workout/SessionHeader.tsx +11 -13
  30. package/src/components/custom/Workout/SessionRail.stories.tsx +4 -1
  31. package/src/components/custom/Workout/SessionRail.tsx +16 -14
  32. package/src/components/custom/Workout/SupersetWrapper.stories.tsx +16 -25
  33. package/src/components/custom/Workout/SupersetWrapper.tsx +1 -1
  34. package/src/components/custom/Workout/TempoDisplay.tsx +3 -7
  35. package/src/components/custom/Workout/VolumeLandmarkBar.stories.tsx +4 -1
  36. package/src/components/custom/Workout/WorkoutPill.tsx +2 -2
  37. package/src/components/shell/DashboardShell.tsx +6 -3
  38. package/src/components/ui/surface/Surface.stories.tsx +244 -1
  39. package/src/components/ui/surface/Surface.test.tsx +244 -1
  40. package/src/components/ui/surface/Surface.tsx +98 -20
  41. package/src/components/ui/surface/SurfaceContext.ts +126 -0
  42. package/src/components/ui/surface/index.ts +13 -0
  43. package/src/components/ui/surface/surface.contract.test.ts +283 -0
  44. package/src/test/nativewind-stub.ts +13 -0
  45. package/src/theme/ColorSystem.stories.tsx +232 -47
  46. package/src/theme/ThemeProvider.test.tsx +24 -0
  47. package/src/theme/ThemeProvider.tsx +23 -6
  48. package/src/theme/config.ts +12 -0
  49. package/src/theme/elevation.ts +90 -67
  50. package/src/theme/global.css +35 -9
  51. package/src/theme/tokens/primitives.ts +40 -0
  52. package/src/theme/tokens/semantic.ts +63 -14
  53. package/tailwind.config.js +8 -0
package/dist/bodymap.js CHANGED
@@ -46,13 +46,24 @@ var primitiveColors = {
46
46
  200: "#3C3C3C",
47
47
  300: "#2C2C2C",
48
48
  400: "#1F1F1F",
49
- 500: "#1C1C1C",
50
- 600: "#191919",
51
- 700: "#161616",
52
- 900: "#101010"
53
- },
49
+ 500: "#1C1C1C"},
54
50
  // Pure colors
55
51
  white: "#FFFFFF"};
52
+ var surfaceRampDark = {
53
+ inset: "#13100D",
54
+ // L*4.5 — sub-shell well / pressed
55
+ background: "#1C1916",
56
+ // L*9 — shell / frame
57
+ base: "#252321",
58
+ // L*13.5 — main content plane
59
+ elevated: "#2C2A28",
60
+ // L*17 — nav / rail
61
+ raised: "#31302F",
62
+ // L*20 — cards
63
+ overlay: "#373635"
64
+ // L*22.5 — hero / popover
65
+ };
66
+ var backgroundFrameDark = "#100D0A";
56
67
  var primitiveRamps = {
57
68
  red: {
58
69
  50: "#FFF4F4",
@@ -241,10 +252,19 @@ var semanticColorsLight = {
241
252
  "surface-overlay": primitiveColors.white,
242
253
  "surface-input": primitiveColors.neutral[50],
243
254
  // Input field background (filled variant)
255
+ // Deepest pressed pit (TD-surface-tokens, S-3) — light-mode counterpart of
256
+ // the dark ramp's `inset` plane; a placeholder pairing, not part of the
257
+ // dark-ramp investigation (surface.contract.test.ts is dark-mode only).
258
+ "surface-inset": primitiveColors.neutral[300],
244
259
  // Background colors (background-*)
245
260
  "background-base": "#EBEBEB",
246
261
  "background-default": primitiveColors.white,
247
262
  "background-subtle": primitiveColors.neutral[50],
263
+ // Frame/bezel chrome (TD-surface-tokens, S-3) — top bar + side nav shell,
264
+ // one step below `background-base` (darker still than `surface-inset`
265
+ // above, mirroring the dark-mode ordering). Placeholder pairing for light
266
+ // mode (see dark-mode note on `surface-inset` above).
267
+ "background-frame": primitiveColors.neutral[400],
248
268
  // Border colors (border-*)
249
269
  "border-default": "#E8E9EB",
250
270
  "border-subtle": primitiveColors.neutral[100],
@@ -260,6 +280,11 @@ var semanticColorsLight = {
260
280
  // Input field border on focus
261
281
  "border-input-error": primitiveColors.red[600],
262
282
  // Input field border on error
283
+ // Alpha hairline separators (surface-independent — composite toward black on
284
+ // light surfaces, mirroring the dark-mode white-alpha family). See §4/S-2.
285
+ "hairline-subtle": "rgba(0, 0, 0, 0.06)",
286
+ "hairline-default": "rgba(0, 0, 0, 0.09)",
287
+ "hairline-strong": "rgba(0, 0, 0, 0.14)",
263
288
  // Interactive states (interactive-*)
264
289
  "interactive-hover": "rgba(55, 65, 81, 0.04)",
265
290
  "interactive-focus": "rgba(55, 65, 81, 0.12)",
@@ -352,25 +377,46 @@ var semanticColorsDark = {
352
377
  "text-inverse": primitiveColors.neutral[900],
353
378
  "text-link": "#828DF8",
354
379
  "text-link-hover": primitiveColors.blue[400],
355
- // Surface colors - dark backgrounds
356
- "surface-base": primitiveColors.charcoal[700],
357
- // main surface
358
- "surface-elevated": primitiveColors.charcoal[600],
359
- // elevated surface
360
- "surface-raised": primitiveColors.charcoal[500],
361
- // raised surface
362
- "surface-overlay": primitiveColors.charcoal[600],
363
- // overlay surface
364
- "surface-input": primitiveColors.charcoal[600],
365
- // input surface
366
- // Background colors
367
- "background-base": primitiveColors.charcoal[900],
368
- // darkest charcoal
369
- "background-default": primitiveColors.charcoal[700],
370
- // main background
371
- "background-subtle": primitiveColors.charcoal[500],
372
- // subtle background
373
- // Border colors
380
+ // Surface colors - dark backgrounds — warm-tapered DERIVED ramp (TD-surface-tokens,
381
+ // S-1, re-spaced S-3). Shipped verbatim from `deriveSurfaceRamp()` — see
382
+ // `surfaceRampDark` in primitives.ts for the full derivation note. `surface-overlay`
383
+ // and `surface-elevated` are distinct (were both #191919 pre-S-1); `surface-input`
384
+ // tracks one plane above `surface-base`, same relative position as before the remap.
385
+ // `background-base` backs `Surface level="background"` (SurfaceContext.SURFACE_LEVEL_TOKEN),
386
+ // so it takes the ramp's `background` (shell/frame) role, NOT `inset`. The ramp's
387
+ // deepest `inset` plane is now promoted to `surface-inset` below (S-3) — still no
388
+ // `SurfaceLevel` member for it (follow-up, alongside the elevation.ts -1/-2 pressed
389
+ // levels — parallel workstream, not this branch).
390
+ "surface-base": surfaceRampDark.base,
391
+ // main surface (#252321, L*13.5)
392
+ "surface-elevated": surfaceRampDark.elevated,
393
+ // elevated surface (#2C2A28, L*17 — nav/rail)
394
+ "surface-raised": surfaceRampDark.raised,
395
+ // raised surface (#31302F, L*20 — cards)
396
+ "surface-overlay": surfaceRampDark.overlay,
397
+ // overlay surface (#373635, L*22.5 — hero/popover)
398
+ "surface-input": surfaceRampDark.elevated,
399
+ // input surface (#2C2A28 — one plane above base)
400
+ "surface-inset": surfaceRampDark.inset,
401
+ // deepest pressed pit (#13100D, L*4.5 — sub-shell well)
402
+ // Background colors — same ramp, the frame/shell end of it.
403
+ "background-base": surfaceRampDark.background,
404
+ // shell / frame (#1C1916, L*9 — Surface level="background")
405
+ "background-default": surfaceRampDark.base,
406
+ // main background (#252321, L*13.5 — matches surface-base)
407
+ "background-subtle": surfaceRampDark.elevated,
408
+ // subtle background (#2C2A28, L*17 — matches surface-elevated)
409
+ // Frame/bezel chrome (S-3) — the top bar + side nav shell; one step BELOW
410
+ // `background-base`, darker even than `surface-inset` — it exits the content
411
+ // ramp entirely rather than sitting in it. See `backgroundFrameDark` in
412
+ // primitives.ts.
413
+ "background-frame": backgroundFrameDark,
414
+ // frame / bezel (#100D0A, L*3.79)
415
+ // Border colors — `border-subtle` (#1C1C1C) previously collided with
416
+ // `surface-raised` (also #1C1C1C, an invisible border on raised cards). The
417
+ // re-spaced ramp above moved `surface-raised` to #2D2C2B, so this value is now
418
+ // distinct from every surface hex without needing to change it — see
419
+ // `surface.contract.test.ts` R2/R4.
374
420
  "border-default": primitiveColors.charcoal[400],
375
421
  // default border
376
422
  "border-subtle": primitiveColors.charcoal[500],
@@ -384,6 +430,14 @@ var semanticColorsDark = {
384
430
  "border-input-hover": primitiveColors.neutral[500],
385
431
  "border-input-focus": "#828DF8",
386
432
  "border-input-error": primitiveColors.red[500],
433
+ // Alpha hairline separators — the primary separation cue (§4/S-2). Self-
434
+ // normalizing: composites toward white by ~the same amount on ANY plane, so
435
+ // one family works at every elevation instead of per-surface border tokens.
436
+ // Shadows are demoted to floating-overlay use only (not shipped as a fill
437
+ // separator here — see elevation.ts, follow-up S-4).
438
+ "hairline-subtle": "rgba(255, 255, 255, 0.06)",
439
+ "hairline-default": "rgba(255, 255, 255, 0.09)",
440
+ "hairline-strong": "rgba(255, 255, 255, 0.14)",
387
441
  // Interactive states
388
442
  "interactive-hover": "rgba(255, 255, 255, 0.04)",
389
443
  "interactive-focus": "rgba(255, 255, 255, 0.12)",