@titan-design/react-ui 0.9.3 → 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.
- package/dist/bodymap.js +78 -24
- package/dist/bodymap.js.map +1 -1
- package/dist/bodymap.mjs +78 -24
- package/dist/bodymap.mjs.map +1 -1
- package/dist/index.d.mts +31 -8
- package/dist/index.d.ts +31 -8
- package/dist/index.js +214 -113
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +210 -114
- package/dist/index.mjs.map +1 -1
- package/dist/pages.js +214 -157
- package/dist/pages.js.map +1 -1
- package/dist/pages.mjs +214 -157
- package/dist/pages.mjs.map +1 -1
- package/dist/theme/index.d.mts +129 -34
- package/dist/theme/index.d.ts +129 -34
- package/dist/theme/index.js +95 -19
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/index.mjs +92 -20
- package/dist/theme/index.mjs.map +1 -1
- package/dist/theme/tokens-css.js +88 -24
- package/dist/theme/tokens-css.js.map +1 -1
- package/dist/theme/tokens-css.mjs +88 -24
- package/dist/theme/tokens-css.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/custom/Workout/BaseBadge.tsx +5 -5
- package/src/components/custom/Workout/RowInventory.stories.tsx +5 -2
- package/src/components/custom/Workout/S3FullRail.stories.tsx +13 -1
- package/src/components/custom/Workout/SessionHeader.tsx +2 -2
- package/src/components/custom/Workout/SessionRail.stories.tsx +4 -1
- package/src/components/custom/Workout/SessionRail.tsx +5 -5
- package/src/components/custom/Workout/SupersetWrapper.stories.tsx +16 -25
- package/src/components/custom/Workout/SupersetWrapper.tsx +1 -1
- package/src/components/custom/Workout/TempoDisplay.tsx +3 -7
- package/src/components/custom/Workout/VolumeLandmarkBar.stories.tsx +4 -1
- package/src/components/custom/Workout/WorkoutPill.tsx +2 -2
- package/src/components/ui/surface/Surface.stories.tsx +195 -1
- package/src/components/ui/surface/Surface.test.tsx +148 -9
- package/src/components/ui/surface/Surface.tsx +37 -9
- package/src/components/ui/surface/SurfaceContext.ts +48 -8
- package/src/components/ui/surface/index.ts +1 -0
- package/src/components/ui/surface/surface.contract.test.ts +283 -0
- package/src/theme/ColorSystem.stories.tsx +232 -47
- package/src/theme/config.ts +12 -0
- package/src/theme/elevation.ts +90 -67
- package/src/theme/global.css +35 -9
- package/src/theme/tokens/primitives.ts +40 -0
- package/src/theme/tokens/semantic.ts +63 -14
- package/tailwind.config.js +8 -0
package/dist/theme/index.js
CHANGED
|
@@ -79,6 +79,21 @@ var primitiveColors = {
|
|
|
79
79
|
black: "#000000",
|
|
80
80
|
transparent: "transparent"
|
|
81
81
|
};
|
|
82
|
+
var surfaceRampDark = {
|
|
83
|
+
inset: "#13100D",
|
|
84
|
+
// L*4.5 — sub-shell well / pressed
|
|
85
|
+
background: "#1C1916",
|
|
86
|
+
// L*9 — shell / frame
|
|
87
|
+
base: "#252321",
|
|
88
|
+
// L*13.5 — main content plane
|
|
89
|
+
elevated: "#2C2A28",
|
|
90
|
+
// L*17 — nav / rail
|
|
91
|
+
raised: "#31302F",
|
|
92
|
+
// L*20 — cards
|
|
93
|
+
overlay: "#373635"
|
|
94
|
+
// L*22.5 — hero / popover
|
|
95
|
+
};
|
|
96
|
+
var backgroundFrameDark = "#100D0A";
|
|
82
97
|
var primitiveRamps = {
|
|
83
98
|
red: {
|
|
84
99
|
50: "#FFF4F4",
|
|
@@ -546,10 +561,19 @@ var semanticColorsLight = {
|
|
|
546
561
|
"surface-overlay": primitiveColors.white,
|
|
547
562
|
"surface-input": primitiveColors.neutral[50],
|
|
548
563
|
// Input field background (filled variant)
|
|
564
|
+
// Deepest pressed pit (TD-surface-tokens, S-3) — light-mode counterpart of
|
|
565
|
+
// the dark ramp's `inset` plane; a placeholder pairing, not part of the
|
|
566
|
+
// dark-ramp investigation (surface.contract.test.ts is dark-mode only).
|
|
567
|
+
"surface-inset": primitiveColors.neutral[300],
|
|
549
568
|
// Background colors (background-*)
|
|
550
569
|
"background-base": "#EBEBEB",
|
|
551
570
|
"background-default": primitiveColors.white,
|
|
552
571
|
"background-subtle": primitiveColors.neutral[50],
|
|
572
|
+
// Frame/bezel chrome (TD-surface-tokens, S-3) — top bar + side nav shell,
|
|
573
|
+
// one step below `background-base` (darker still than `surface-inset`
|
|
574
|
+
// above, mirroring the dark-mode ordering). Placeholder pairing for light
|
|
575
|
+
// mode (see dark-mode note on `surface-inset` above).
|
|
576
|
+
"background-frame": primitiveColors.neutral[400],
|
|
553
577
|
// Border colors (border-*)
|
|
554
578
|
"border-default": "#E8E9EB",
|
|
555
579
|
"border-subtle": primitiveColors.neutral[100],
|
|
@@ -565,6 +589,11 @@ var semanticColorsLight = {
|
|
|
565
589
|
// Input field border on focus
|
|
566
590
|
"border-input-error": primitiveColors.red[600],
|
|
567
591
|
// Input field border on error
|
|
592
|
+
// Alpha hairline separators (surface-independent — composite toward black on
|
|
593
|
+
// light surfaces, mirroring the dark-mode white-alpha family). See §4/S-2.
|
|
594
|
+
"hairline-subtle": "rgba(0, 0, 0, 0.06)",
|
|
595
|
+
"hairline-default": "rgba(0, 0, 0, 0.09)",
|
|
596
|
+
"hairline-strong": "rgba(0, 0, 0, 0.14)",
|
|
568
597
|
// Interactive states (interactive-*)
|
|
569
598
|
"interactive-hover": "rgba(55, 65, 81, 0.04)",
|
|
570
599
|
"interactive-focus": "rgba(55, 65, 81, 0.12)",
|
|
@@ -657,25 +686,46 @@ var semanticColorsDark = {
|
|
|
657
686
|
"text-inverse": primitiveColors.neutral[900],
|
|
658
687
|
"text-link": "#828DF8",
|
|
659
688
|
"text-link-hover": primitiveColors.blue[400],
|
|
660
|
-
// Surface colors - dark backgrounds
|
|
661
|
-
|
|
662
|
-
//
|
|
663
|
-
|
|
664
|
-
//
|
|
665
|
-
|
|
666
|
-
//
|
|
667
|
-
|
|
668
|
-
//
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
//
|
|
672
|
-
"
|
|
673
|
-
//
|
|
674
|
-
"
|
|
675
|
-
//
|
|
676
|
-
"
|
|
677
|
-
//
|
|
678
|
-
|
|
689
|
+
// Surface colors - dark backgrounds — warm-tapered DERIVED ramp (TD-surface-tokens,
|
|
690
|
+
// S-1, re-spaced S-3). Shipped verbatim from `deriveSurfaceRamp()` — see
|
|
691
|
+
// `surfaceRampDark` in primitives.ts for the full derivation note. `surface-overlay`
|
|
692
|
+
// and `surface-elevated` are distinct (were both #191919 pre-S-1); `surface-input`
|
|
693
|
+
// tracks one plane above `surface-base`, same relative position as before the remap.
|
|
694
|
+
// `background-base` backs `Surface level="background"` (SurfaceContext.SURFACE_LEVEL_TOKEN),
|
|
695
|
+
// so it takes the ramp's `background` (shell/frame) role, NOT `inset`. The ramp's
|
|
696
|
+
// deepest `inset` plane is now promoted to `surface-inset` below (S-3) — still no
|
|
697
|
+
// `SurfaceLevel` member for it (follow-up, alongside the elevation.ts -1/-2 pressed
|
|
698
|
+
// levels — parallel workstream, not this branch).
|
|
699
|
+
"surface-base": surfaceRampDark.base,
|
|
700
|
+
// main surface (#252321, L*13.5)
|
|
701
|
+
"surface-elevated": surfaceRampDark.elevated,
|
|
702
|
+
// elevated surface (#2C2A28, L*17 — nav/rail)
|
|
703
|
+
"surface-raised": surfaceRampDark.raised,
|
|
704
|
+
// raised surface (#31302F, L*20 — cards)
|
|
705
|
+
"surface-overlay": surfaceRampDark.overlay,
|
|
706
|
+
// overlay surface (#373635, L*22.5 — hero/popover)
|
|
707
|
+
"surface-input": surfaceRampDark.elevated,
|
|
708
|
+
// input surface (#2C2A28 — one plane above base)
|
|
709
|
+
"surface-inset": surfaceRampDark.inset,
|
|
710
|
+
// deepest pressed pit (#13100D, L*4.5 — sub-shell well)
|
|
711
|
+
// Background colors — same ramp, the frame/shell end of it.
|
|
712
|
+
"background-base": surfaceRampDark.background,
|
|
713
|
+
// shell / frame (#1C1916, L*9 — Surface level="background")
|
|
714
|
+
"background-default": surfaceRampDark.base,
|
|
715
|
+
// main background (#252321, L*13.5 — matches surface-base)
|
|
716
|
+
"background-subtle": surfaceRampDark.elevated,
|
|
717
|
+
// subtle background (#2C2A28, L*17 — matches surface-elevated)
|
|
718
|
+
// Frame/bezel chrome (S-3) — the top bar + side nav shell; one step BELOW
|
|
719
|
+
// `background-base`, darker even than `surface-inset` — it exits the content
|
|
720
|
+
// ramp entirely rather than sitting in it. See `backgroundFrameDark` in
|
|
721
|
+
// primitives.ts.
|
|
722
|
+
"background-frame": backgroundFrameDark,
|
|
723
|
+
// frame / bezel (#100D0A, L*3.79)
|
|
724
|
+
// Border colors — `border-subtle` (#1C1C1C) previously collided with
|
|
725
|
+
// `surface-raised` (also #1C1C1C, an invisible border on raised cards). The
|
|
726
|
+
// re-spaced ramp above moved `surface-raised` to #2D2C2B, so this value is now
|
|
727
|
+
// distinct from every surface hex without needing to change it — see
|
|
728
|
+
// `surface.contract.test.ts` R2/R4.
|
|
679
729
|
"border-default": primitiveColors.charcoal[400],
|
|
680
730
|
// default border
|
|
681
731
|
"border-subtle": primitiveColors.charcoal[500],
|
|
@@ -689,6 +739,14 @@ var semanticColorsDark = {
|
|
|
689
739
|
"border-input-hover": primitiveColors.neutral[500],
|
|
690
740
|
"border-input-focus": "#828DF8",
|
|
691
741
|
"border-input-error": primitiveColors.red[500],
|
|
742
|
+
// Alpha hairline separators — the primary separation cue (§4/S-2). Self-
|
|
743
|
+
// normalizing: composites toward white by ~the same amount on ANY plane, so
|
|
744
|
+
// one family works at every elevation instead of per-surface border tokens.
|
|
745
|
+
// Shadows are demoted to floating-overlay use only (not shipped as a fill
|
|
746
|
+
// separator here — see elevation.ts, follow-up S-4).
|
|
747
|
+
"hairline-subtle": "rgba(255, 255, 255, 0.06)",
|
|
748
|
+
"hairline-default": "rgba(255, 255, 255, 0.09)",
|
|
749
|
+
"hairline-strong": "rgba(255, 255, 255, 0.14)",
|
|
692
750
|
// Interactive states
|
|
693
751
|
"interactive-hover": "rgba(255, 255, 255, 0.04)",
|
|
694
752
|
"interactive-focus": "rgba(255, 255, 255, 0.12)",
|
|
@@ -866,9 +924,11 @@ var lightThemeCSSVars = {
|
|
|
866
924
|
"--color-surface-base": semanticColorsLight["surface-base"],
|
|
867
925
|
"--color-surface-elevated": semanticColorsLight["surface-elevated"],
|
|
868
926
|
"--color-surface-raised": semanticColorsLight["surface-raised"],
|
|
927
|
+
"--color-surface-inset": semanticColorsLight["surface-inset"],
|
|
869
928
|
"--color-background-base": semanticColorsLight["background-base"],
|
|
870
929
|
"--color-background-default": semanticColorsLight["background-default"],
|
|
871
930
|
"--color-background-subtle": semanticColorsLight["background-subtle"],
|
|
931
|
+
"--color-background-frame": semanticColorsLight["background-frame"],
|
|
872
932
|
"--color-border-default": semanticColorsLight["border-default"],
|
|
873
933
|
"--color-border-subtle": semanticColorsLight["border-subtle"],
|
|
874
934
|
"--color-border-strong": semanticColorsLight["border-strong"],
|
|
@@ -925,6 +985,9 @@ var lightThemeCSSVars = {
|
|
|
925
985
|
"--color-border-input-hover": semanticColorsLight["border-input-hover"],
|
|
926
986
|
"--color-border-input-focus": semanticColorsLight["border-input-focus"],
|
|
927
987
|
"--color-border-input-error": semanticColorsLight["border-input-error"],
|
|
988
|
+
"--color-hairline-subtle": semanticColorsLight["hairline-subtle"],
|
|
989
|
+
"--color-hairline-default": semanticColorsLight["hairline-default"],
|
|
990
|
+
"--color-hairline-strong": semanticColorsLight["hairline-strong"],
|
|
928
991
|
"--color-interactive-disabled-text": semanticColorsLight["interactive-disabled-text"],
|
|
929
992
|
"--color-avatar-background": semanticColorsLight["avatar-background"],
|
|
930
993
|
"--color-avatar-text": semanticColorsLight["avatar-text"],
|
|
@@ -964,9 +1027,11 @@ var darkThemeCSSVars = {
|
|
|
964
1027
|
"--color-surface-base": semanticColorsDark["surface-base"],
|
|
965
1028
|
"--color-surface-elevated": semanticColorsDark["surface-elevated"],
|
|
966
1029
|
"--color-surface-raised": semanticColorsDark["surface-raised"],
|
|
1030
|
+
"--color-surface-inset": semanticColorsDark["surface-inset"],
|
|
967
1031
|
"--color-background-base": semanticColorsDark["background-base"],
|
|
968
1032
|
"--color-background-default": semanticColorsDark["background-default"],
|
|
969
1033
|
"--color-background-subtle": semanticColorsDark["background-subtle"],
|
|
1034
|
+
"--color-background-frame": semanticColorsDark["background-frame"],
|
|
970
1035
|
"--color-border-default": semanticColorsDark["border-default"],
|
|
971
1036
|
"--color-border-subtle": semanticColorsDark["border-subtle"],
|
|
972
1037
|
"--color-border-strong": semanticColorsDark["border-strong"],
|
|
@@ -1023,6 +1088,9 @@ var darkThemeCSSVars = {
|
|
|
1023
1088
|
"--color-border-input-hover": semanticColorsDark["border-input-hover"],
|
|
1024
1089
|
"--color-border-input-focus": semanticColorsDark["border-input-focus"],
|
|
1025
1090
|
"--color-border-input-error": semanticColorsDark["border-input-error"],
|
|
1091
|
+
"--color-hairline-subtle": semanticColorsDark["hairline-subtle"],
|
|
1092
|
+
"--color-hairline-default": semanticColorsDark["hairline-default"],
|
|
1093
|
+
"--color-hairline-strong": semanticColorsDark["hairline-strong"],
|
|
1026
1094
|
"--color-interactive-disabled-text": semanticColorsDark["interactive-disabled-text"],
|
|
1027
1095
|
"--color-avatar-background": semanticColorsDark["avatar-background"],
|
|
1028
1096
|
"--color-avatar-text": semanticColorsDark["avatar-text"],
|
|
@@ -1657,6 +1725,10 @@ function getElevationShadow(baseColor, level, theme, isHovered = false) {
|
|
|
1657
1725
|
elevationShadowCache.set(cacheKey, result);
|
|
1658
1726
|
return result;
|
|
1659
1727
|
}
|
|
1728
|
+
var PRESSED_ELEVATION_LEVEL = -1;
|
|
1729
|
+
function getPressedRecessShadow(fillColor, theme) {
|
|
1730
|
+
return getElevationShadow(fillColor, PRESSED_ELEVATION_LEVEL, theme);
|
|
1731
|
+
}
|
|
1660
1732
|
function getBaseSurfaceColor(theme) {
|
|
1661
1733
|
return theme === "light" ? semanticColorsLight["surface-raised"] : semanticColorsDark["surface-elevated"];
|
|
1662
1734
|
}
|
|
@@ -1988,9 +2060,11 @@ function ThemeProvider({
|
|
|
1988
2060
|
}
|
|
1989
2061
|
|
|
1990
2062
|
exports.CATEGORICAL_CVD_SAFE_MAX = CATEGORICAL_CVD_SAFE_MAX;
|
|
2063
|
+
exports.PRESSED_ELEVATION_LEVEL = PRESSED_ELEVATION_LEVEL;
|
|
1991
2064
|
exports.ThemeProvider = ThemeProvider;
|
|
1992
2065
|
exports.applyThemePreset = applyThemePreset;
|
|
1993
2066
|
exports.audiobookPreset = audiobookPreset;
|
|
2067
|
+
exports.backgroundFrameDark = backgroundFrameDark;
|
|
1994
2068
|
exports.bestTextColor = bestTextColor;
|
|
1995
2069
|
exports.buttonSizes = buttonSizes;
|
|
1996
2070
|
exports.categoricalPalette = categoricalPalette;
|
|
@@ -2014,6 +2088,7 @@ exports.getElevationShadow = getElevationShadow;
|
|
|
2014
2088
|
exports.getElevationSurface = getElevationSurface;
|
|
2015
2089
|
exports.getGlowShadow = getGlowShadow;
|
|
2016
2090
|
exports.getHoverColors = getHoverColors;
|
|
2091
|
+
exports.getPressedRecessShadow = getPressedRecessShadow;
|
|
2017
2092
|
exports.getSemanticColors = getSemanticColors;
|
|
2018
2093
|
exports.getThemeCSSVars = getThemeCSSVars;
|
|
2019
2094
|
exports.getValidatedElevation = getValidatedElevation;
|
|
@@ -2043,6 +2118,7 @@ exports.semanticTypography = semanticTypography;
|
|
|
2043
2118
|
exports.sequentialEffort = sequentialEffort;
|
|
2044
2119
|
exports.shadowColors = shadowColors;
|
|
2045
2120
|
exports.surfaceGradient = surfaceGradient;
|
|
2121
|
+
exports.surfaceRampDark = surfaceRampDark;
|
|
2046
2122
|
exports.validateCssPropertyManifest = validateCssPropertyManifest;
|
|
2047
2123
|
//# sourceMappingURL=index.js.map
|
|
2048
2124
|
//# sourceMappingURL=index.js.map
|