@titan-design/react-ui 0.11.0 → 0.12.1

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 (152) hide show
  1. package/dist/bodymap.js +173 -343
  2. package/dist/bodymap.js.map +1 -1
  3. package/dist/bodymap.mjs +173 -343
  4. package/dist/bodymap.mjs.map +1 -1
  5. package/dist/index.d.mts +27 -22
  6. package/dist/index.d.ts +27 -22
  7. package/dist/index.js +366 -561
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.mjs +360 -553
  10. package/dist/index.mjs.map +1 -1
  11. package/dist/pages.js +242 -407
  12. package/dist/pages.js.map +1 -1
  13. package/dist/pages.mjs +242 -407
  14. package/dist/pages.mjs.map +1 -1
  15. package/dist/theme/index.d.mts +250 -1157
  16. package/dist/theme/index.d.ts +250 -1157
  17. package/dist/theme/index.js +234 -408
  18. package/dist/theme/index.js.map +1 -1
  19. package/dist/theme/index.mjs +227 -399
  20. package/dist/theme/index.mjs.map +1 -1
  21. package/dist/theme/tokens-css.js +141 -140
  22. package/dist/theme/tokens-css.js.map +1 -1
  23. package/dist/theme/tokens-css.mjs +141 -140
  24. package/dist/theme/tokens-css.mjs.map +1 -1
  25. package/dist/theme/tokens.d.mts +904 -0
  26. package/dist/theme/tokens.d.ts +904 -0
  27. package/dist/theme/tokens.js +856 -0
  28. package/dist/theme/tokens.js.map +1 -0
  29. package/dist/theme/tokens.mjs +833 -0
  30. package/dist/theme/tokens.mjs.map +1 -0
  31. package/package.json +7 -1
  32. package/src/arch/Architecture.stories.tsx +9 -9
  33. package/src/components/custom/DateTime/DateTime.stories.tsx +1 -1
  34. package/src/components/custom/Fatigue/DualGhostSpark.stories.tsx +3 -3
  35. package/src/components/custom/Fatigue/FatigueLights.stories.tsx +2 -2
  36. package/src/components/custom/Fatigue/GhostSpark.stories.tsx +3 -3
  37. package/src/components/custom/Fatigue/LiveFatigueCard.tsx +1 -1
  38. package/src/components/custom/Fatigue/LiveFatiguePanel.stories.tsx +2 -2
  39. package/src/components/custom/Fatigue/RomProgressionChart.stories.tsx +2 -2
  40. package/src/components/custom/Fatigue/SilverRedPalette.stories.tsx +4 -4
  41. package/src/components/custom/Fatigue/VelocityHero.stories.tsx +3 -3
  42. package/src/components/custom/Fatigue/VerdictHero.stories.tsx +2 -2
  43. package/src/components/custom/Fatigue/fatigue-tokens.ts +12 -12
  44. package/src/components/custom/Sidebar/Sidebar.tsx +4 -4
  45. package/src/components/custom/Table/Table.tsx +2 -2
  46. package/src/components/custom/Workout/ActiveWorkoutPage.tsx +3 -3
  47. package/src/components/custom/Workout/BaseBadge.test.tsx +6 -1
  48. package/src/components/custom/Workout/BaseBadge.tsx +1 -1
  49. package/src/components/custom/Workout/BodyMap.tsx +2 -2
  50. package/src/components/custom/Workout/BodyMapDetailPanel.tsx +2 -2
  51. package/src/components/custom/Workout/DeviationBar.test.tsx +2 -1
  52. package/src/components/custom/Workout/DeviationBar.tsx +3 -2
  53. package/src/components/custom/Workout/ExerciseCard.test.tsx +3 -3
  54. package/src/components/custom/Workout/ExerciseCard.tsx +2 -2
  55. package/src/components/custom/Workout/ExerciseDetailPage.tsx +4 -4
  56. package/src/components/custom/Workout/InputBar.tsx +2 -2
  57. package/src/components/custom/Workout/LiveAuraFrame.stories.tsx +1 -1
  58. package/src/components/custom/Workout/LiveAuraFrame.test.tsx +1 -1
  59. package/src/components/custom/Workout/LiveAuraFrame.tsx +3 -3
  60. package/src/components/custom/Workout/MesoCard.tsx +3 -1
  61. package/src/components/custom/Workout/MuscleGroupChip.tsx +4 -3
  62. package/src/components/custom/Workout/PrHistoryModal.tsx +2 -2
  63. package/src/components/custom/Workout/ProgramPlanningPage.tsx +1 -1
  64. package/src/components/custom/Workout/README.md +1 -1
  65. package/src/components/custom/Workout/ReadinessCheck.tsx +2 -2
  66. package/src/components/custom/Workout/RestTimer.tsx +2 -2
  67. package/src/components/custom/Workout/S3SetTypes.stories.tsx +3 -3
  68. package/src/components/custom/Workout/SessionHeader.stories.tsx +2 -2
  69. package/src/components/custom/Workout/SessionHeader.tsx +1 -1
  70. package/src/components/custom/Workout/SessionRail.stories.tsx +2 -2
  71. package/src/components/custom/Workout/SessionRail.tsx +13 -5
  72. package/src/components/custom/Workout/SetBar.tsx +3 -3
  73. package/src/components/custom/Workout/SetRow.test.tsx +6 -3
  74. package/src/components/custom/Workout/StatusDot.tsx +5 -4
  75. package/src/components/custom/Workout/StrengthTrendChart.tsx +1 -1
  76. package/src/components/custom/Workout/TrainingStatusPage.tsx +2 -2
  77. package/src/components/custom/Workout/VelocityStrip.test.tsx +5 -2
  78. package/src/components/custom/Workout/VelocityStrip.tsx +4 -4
  79. package/src/components/custom/Workout/VolumeLandmarkBar.tsx +3 -3
  80. package/src/components/custom/Workout/WeightBadge.test.tsx +6 -1
  81. package/src/components/custom/Workout/WeightBadge.tsx +2 -1
  82. package/src/components/custom/Workout/WorkoutCard.tsx +3 -1
  83. package/src/components/custom/Workout/WorkoutPill.tsx +5 -2
  84. package/src/components/custom/Workout/ZoneTrack.tsx +4 -4
  85. package/src/components/custom/Workout/setHeadingKit.tsx +14 -8
  86. package/src/components/custom/Workout/velocity-story-kit.tsx +2 -2
  87. package/src/components/custom/charts/SetBarChart.tsx +3 -3
  88. package/src/components/custom/stepper/Stepper.stories.tsx +1 -1
  89. package/src/components/custom/stepper/Stepper.tsx +3 -3
  90. package/src/components/shell/DeviceMenu.tsx +2 -2
  91. package/src/components/shell/README.md +1 -1
  92. package/src/components/shell/SessionRailSpecimen.stories.tsx +1 -1
  93. package/src/components/shell/SideNav.tsx +1 -1
  94. package/src/components/shell/TopBar.tsx +1 -1
  95. package/src/components/ui/autocomplete/Autocomplete.stories.tsx +1 -1
  96. package/src/components/ui/autocomplete/Autocomplete.tsx +1 -1
  97. package/src/components/ui/avatar/Avatar.tsx +2 -2
  98. package/src/components/ui/badge/Badge.tsx +2 -2
  99. package/src/components/ui/card/Card.tsx +3 -3
  100. package/src/components/ui/checkbox/Checkbox.tsx +1 -1
  101. package/src/components/ui/collapse/Collapse.tsx +1 -1
  102. package/src/components/ui/data-row/DataRow.stories.tsx +1 -1
  103. package/src/components/ui/drawer/Drawer.tsx +3 -3
  104. package/src/components/ui/form-field/FormField.tsx +1 -1
  105. package/src/components/ui/help-tip/HelpTip.tsx +1 -1
  106. package/src/components/ui/menu/Menu.tsx +2 -2
  107. package/src/components/ui/pill/Pill.tsx +2 -2
  108. package/src/components/ui/popover/Popover.stories.tsx +2 -2
  109. package/src/components/ui/popover/Popover.tsx +1 -1
  110. package/src/components/ui/progress/Progress.tsx +3 -3
  111. package/src/components/ui/radio/Radio.stories.tsx +1 -1
  112. package/src/components/ui/radio/Radio.tsx +4 -4
  113. package/src/components/ui/select/Select.tsx +3 -3
  114. package/src/components/ui/surface/Surface.stories.tsx +3 -3
  115. package/src/components/ui/surface/Surface.test.tsx +32 -19
  116. package/src/components/ui/surface/Surface.tsx +3 -3
  117. package/src/components/ui/surface/SurfaceContext.ts +19 -29
  118. package/src/components/ui/surface/surface.contract.test.ts +58 -45
  119. package/src/components/ui/switch/Switch.tsx +1 -1
  120. package/src/components/ui/tabs/Tabs.tsx +2 -2
  121. package/src/components/ui/toolbar-button/ToolbarButton.stories.tsx +5 -5
  122. package/src/components/ui/toolbar-button/ToolbarButton.test.tsx +1 -1
  123. package/src/components/ui/toolbar-button/ToolbarButton.tsx +36 -22
  124. package/src/stories/PresetShowcase.stories.tsx +21 -21
  125. package/src/theme/ColorPalettes.stories.tsx +41 -38
  126. package/src/theme/ColorPrimitives.stories.tsx +89 -41
  127. package/src/theme/Depth.stories.tsx +312 -0
  128. package/src/theme/DepthCalibration.stories.tsx +655 -0
  129. package/src/theme/ThemeProvider.tsx +1 -1
  130. package/src/theme/barrel.ts +7 -14
  131. package/src/theme/color-stories.coverage.test.ts +15 -20
  132. package/src/theme/color-story-kit.tsx +1 -1
  133. package/src/theme/color-utils.ts +197 -0
  134. package/src/theme/config.ts +0 -8
  135. package/src/theme/depth-calibration.test.tsx +97 -0
  136. package/src/theme/elevation.test.ts +62 -1
  137. package/src/theme/elevation.ts +34 -8
  138. package/src/theme/global.css +47 -53
  139. package/src/theme/grey-ramp.test.ts +166 -0
  140. package/src/theme/materials.test.ts +106 -0
  141. package/src/theme/materials.ts +211 -0
  142. package/src/theme/presets/audiobook.ts +4 -4
  143. package/src/theme/presets/types.ts +3 -3
  144. package/src/theme/semantic-contrast.test.ts +83 -0
  145. package/src/theme/token-export-guard.test.ts +104 -0
  146. package/src/theme/tokens/primitives.ts +63 -116
  147. package/src/theme/tokens/semantic.ts +130 -82
  148. package/src/utils/colors.ts +1 -1
  149. package/tailwind.config.js +2 -5
  150. package/src/theme/bar-paper.ts +0 -59
  151. package/src/theme/shadows.stories.tsx +0 -523
  152. package/src/theme/shadows.ts +0 -439
@@ -0,0 +1,833 @@
1
+ // src/theme/tokens/primitives.ts
2
+ var primitiveColors = {
3
+ white: "#FFFFFF",
4
+ black: "#000000",
5
+ transparent: "transparent"
6
+ };
7
+ var greyRamp = {
8
+ 50: "#F9F6F3",
9
+ // L*97.0 W6
10
+ 100: "#EDEAE7",
11
+ // L*92.8 W6
12
+ 200: "#D4D1CE",
13
+ // L*84.0 W6 — warm silver
14
+ 300: "#BDBAB7",
15
+ // L*75.7 W6
16
+ 400: "#A29F9D",
17
+ // L*65.7 W5
18
+ 500: "#888684",
19
+ // L*56.0 W4
20
+ 600: "#72716F",
21
+ // L*47.7 W3
22
+ 700: "#5A5958",
23
+ // L*37.9 W2
24
+ 800: "#424140",
25
+ // L*27.6 W2 — generated bridge
26
+ 850: "#373635",
27
+ // L*22.7 W2 — surface overlay
28
+ 875: "#31302F",
29
+ // L*19.9 W2 — surface raised
30
+ 900: "#2C2A28",
31
+ // L*17.2 W4 — surface elevated
32
+ 925: "#252321",
33
+ // L*13.9 W4 — surface base
34
+ 950: "#1C1916",
35
+ // L*9.0 W6 — background base / shell
36
+ 975: "#100D0A"
37
+ // L*3.8 W6 — background frame / bezel
38
+ };
39
+ var SURFACE_PLANE_STEPS = {
40
+ frame: 975,
41
+ background: 950,
42
+ base: 925,
43
+ elevated: 900,
44
+ raised: 875,
45
+ overlay: 850
46
+ };
47
+ var primitiveRamps = {
48
+ red: {
49
+ 50: "#FFF4F4",
50
+ 100: "#FFE3E5",
51
+ 200: "#FFC2C5",
52
+ 300: "#FF9A9D",
53
+ 400: "#F77175",
54
+ 500: "#E05254",
55
+ 600: "#D14343",
56
+ // pin
57
+ 700: "#A4221C",
58
+ 800: "#7E1002",
59
+ 900: "#5A0900",
60
+ 950: "#3D0400"
61
+ },
62
+ orange: {
63
+ 50: "#FFF5ED",
64
+ 100: "#FFE6D4",
65
+ 200: "#FFC7A2",
66
+ 300: "#FFA063",
67
+ 400: "#FF7900",
68
+ // pin
69
+ 500: "#DA5F00",
70
+ 600: "#B94A00",
71
+ 700: "#983804",
72
+ 800: "#6F290F",
73
+ 900: "#4E1C0C",
74
+ 950: "#331107"
75
+ },
76
+ amber: {
77
+ 50: "#FFF7DD",
78
+ 100: "#FFEAA9",
79
+ 200: "#FFD352",
80
+ 300: "#F9B415",
81
+ // pin
82
+ 400: "#E08C00",
83
+ 500: "#C27400",
84
+ 600: "#A45E00",
85
+ 700: "#814D14",
86
+ 800: "#5B3A1A",
87
+ 900: "#442503",
88
+ 950: "#301500"
89
+ },
90
+ green: {
91
+ 50: "#E3FFEE",
92
+ 100: "#B5FFD2",
93
+ 200: "#58F69E",
94
+ 300: "#2ED573",
95
+ // pin
96
+ 400: "#21C05D",
97
+ 500: "#22A444",
98
+ 600: "#298732",
99
+ 700: "#2B6B25",
100
+ 800: "#264D1C",
101
+ 900: "#1B3515",
102
+ 950: "#11220D"
103
+ },
104
+ cyan: {
105
+ 50: "#E6FBFF",
106
+ 100: "#C2F6FF",
107
+ 200: "#62EAFF",
108
+ 300: "#22D3EE",
109
+ // pin
110
+ 400: "#01B5D1",
111
+ 500: "#2697B7",
112
+ 600: "#307B9B",
113
+ 700: "#2A617F",
114
+ 800: "#22465F",
115
+ 900: "#0B3149",
116
+ 950: "#001F36"
117
+ },
118
+ blue: {
119
+ 50: "#EFF8FF",
120
+ 100: "#D9EFFF",
121
+ 200: "#ACDBFF",
122
+ 300: "#78C2FF",
123
+ 400: "#3CA8FF",
124
+ 500: "#2196F3",
125
+ // pin
126
+ 600: "#1072CB",
127
+ 700: "#135AA8",
128
+ 800: "#14407E",
129
+ 900: "#112C5A",
130
+ 950: "#091B3C"
131
+ },
132
+ magenta: {
133
+ 50: "#FFF3F9",
134
+ 100: "#FFE2F1",
135
+ 200: "#FFBDE2",
136
+ 300: "#FF8FD5",
137
+ 400: "#ED69C3",
138
+ 500: "#D548AF",
139
+ 600: "#BA2996",
140
+ 700: "#9C0D7A",
141
+ // pin
142
+ 800: "#77005A",
143
+ 900: "#56003F",
144
+ 950: "#3B0029"
145
+ }
146
+ };
147
+ var categoricalPalette = {
148
+ default: [
149
+ primitiveRamps.blue[500],
150
+ primitiveRamps.magenta[500],
151
+ primitiveRamps.red[500],
152
+ primitiveRamps.orange[400],
153
+ primitiveRamps.green[300],
154
+ primitiveRamps.cyan[300],
155
+ primitiveRamps.amber[600]
156
+ // extended (7th) — pair with a legend
157
+ ],
158
+ dark: [
159
+ primitiveRamps.blue[600],
160
+ primitiveRamps.magenta[600],
161
+ primitiveRamps.red[500],
162
+ primitiveRamps.orange[600],
163
+ primitiveRamps.green[800],
164
+ primitiveRamps.cyan[800],
165
+ primitiveRamps.amber[500]
166
+ // extended (7th) — pair with a legend
167
+ ]
168
+ };
169
+ var CATEGORICAL_CVD_SAFE_MAX = 6;
170
+ function getCategoricalColor(index, variant = "default") {
171
+ const palette = categoricalPalette[variant];
172
+ index = Math.max(0, Math.floor(index));
173
+ return palette[index % palette.length];
174
+ }
175
+ var divergingScale = [
176
+ primitiveRamps.blue[500],
177
+ // under
178
+ primitiveRamps.cyan[300],
179
+ // maintenance
180
+ primitiveRamps.green[200],
181
+ // optimal (light center)
182
+ primitiveRamps.amber[300],
183
+ // approaching
184
+ primitiveRamps.red[600]
185
+ // over
186
+ ];
187
+ var sequentialEffort = [
188
+ primitiveRamps.green[300],
189
+ primitiveRamps.amber[200],
190
+ primitiveRamps.amber[300],
191
+ primitiveRamps.orange[400],
192
+ primitiveRamps.red[600],
193
+ primitiveRamps.red[700]
194
+ ];
195
+ function bestTextColor(hex) {
196
+ const [r, g, b] = [0, 2, 4].map((i) => {
197
+ const c = parseInt(hex.replace("#", "").slice(i, i + 2), 16) / 255;
198
+ return c >= 0.04045 ? ((c + 0.055) / 1.055) ** 2.4 : c / 12.92;
199
+ });
200
+ const l = 0.2126 * r + 0.7152 * g + 0.0722 * b;
201
+ return (l + 0.05) / 0.05 >= 1.05 / (l + 0.05) ? "#000000" : "#FFFFFF";
202
+ }
203
+ var discreteRainbow = [
204
+ "#E8ECFB",
205
+ "#D9CCE3",
206
+ "#D1BBD7",
207
+ "#CAACCB",
208
+ "#BA8DB4",
209
+ "#AE76A3",
210
+ "#AA6F9E",
211
+ "#994F88",
212
+ "#882E72",
213
+ "#1965B0",
214
+ "#437DBF",
215
+ "#5289C7",
216
+ "#6195CF",
217
+ "#7BAFDE",
218
+ "#4EB265",
219
+ "#90C987",
220
+ "#CAE0AB",
221
+ "#F7F056",
222
+ "#F7CB45",
223
+ "#F6C141",
224
+ "#F4A736",
225
+ "#F1932D",
226
+ "#EE8026",
227
+ "#E8601C",
228
+ "#E65518",
229
+ "#DC050C",
230
+ "#A5170E",
231
+ "#72190E",
232
+ "#42150A"
233
+ ];
234
+ var discreteRainbowPalettes = [
235
+ [10],
236
+ [10, 26],
237
+ [10, 18, 26],
238
+ [10, 15, 18, 26],
239
+ [10, 14, 15, 18, 26],
240
+ [10, 14, 15, 17, 18, 26],
241
+ [9, 10, 14, 15, 17, 18, 26],
242
+ [9, 10, 14, 15, 17, 18, 23, 26],
243
+ [9, 10, 14, 15, 17, 18, 23, 26, 28],
244
+ [9, 10, 14, 15, 17, 18, 21, 24, 26, 28],
245
+ [9, 10, 12, 14, 15, 17, 18, 21, 24, 26, 28],
246
+ [3, 6, 9, 10, 12, 14, 15, 17, 18, 21, 24, 26],
247
+ [3, 6, 9, 10, 12, 14, 15, 16, 17, 18, 21, 24, 26],
248
+ [3, 6, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26],
249
+ [3, 6, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28],
250
+ [3, 5, 7, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28],
251
+ [3, 5, 7, 8, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28],
252
+ [3, 5, 7, 8, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26, 27, 28],
253
+ [2, 4, 5, 7, 8, 9, 10, 12, 14, 15, 16, 17, 18, 20, 22, 24, 26, 27, 28],
254
+ [2, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 20, 22, 24, 26, 27, 28],
255
+ [2, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 21, 23, 25, 26, 27, 28],
256
+ [2, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 21, 23, 25, 26, 27, 28, 29],
257
+ [1, 2, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 21, 23, 25, 26, 27, 28, 29]
258
+ ];
259
+ function getDiscreteRainbowColor(index, size) {
260
+ index = Math.max(0, index);
261
+ size = Math.min(Math.max(1, size), discreteRainbowPalettes.length);
262
+ const palette = discreteRainbowPalettes[size - 1];
263
+ if (index >= palette.length) index = index % palette.length;
264
+ return discreteRainbow[palette[index] - 1];
265
+ }
266
+ var primitiveTypography = {
267
+ fontFamilies: {
268
+ sans: ["Inter", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "Helvetica", "Arial", "sans-serif"],
269
+ body: ["Nunito Sans", "sans-serif"],
270
+ heading: ["Space Grotesk", "sans-serif"],
271
+ mono: ["SF Mono", "Monaco", "Inconsolata", "Fira Mono", "Droid Sans Mono", "Source Code Pro", "monospace"]
272
+ },
273
+ fontSizes: {
274
+ xs: "0.75rem",
275
+ // 12px
276
+ sm: "0.875rem",
277
+ // 14px
278
+ base: "1rem",
279
+ // 16px
280
+ lg: "1.125rem",
281
+ // 18px
282
+ xl: "1.5rem",
283
+ // 24px
284
+ "2xl": "2rem",
285
+ // 32px
286
+ "3xl": "2.25rem",
287
+ // 36px
288
+ "4xl": "3rem",
289
+ // 48px
290
+ "5xl": "3.5rem"
291
+ // 56px
292
+ },
293
+ fontWeights: {
294
+ normal: 400,
295
+ medium: 500,
296
+ semibold: 600,
297
+ bold: 700
298
+ },
299
+ lineHeights: {
300
+ none: 1,
301
+ tight: 1.375,
302
+ snug: 1.5,
303
+ normal: 1.57,
304
+ relaxed: 1.66,
305
+ loose: 1.75
306
+ },
307
+ letterSpacing: {
308
+ tighter: "-0.05em",
309
+ tight: "-0.025em",
310
+ normal: "0em",
311
+ wide: "0.025em",
312
+ wider: "0.05em",
313
+ widest: "0.5px"
314
+ }
315
+ };
316
+ var primitiveSpacing = {
317
+ 0: "0",
318
+ px: "1px",
319
+ 0.5: "0.125rem",
320
+ // 2px
321
+ 1: "0.25rem",
322
+ // 4px
323
+ 1.5: "0.375rem",
324
+ // 6px
325
+ 2: "0.5rem",
326
+ // 8px
327
+ 2.5: "0.625rem",
328
+ // 10px
329
+ 3: "0.75rem",
330
+ // 12px
331
+ 3.5: "0.875rem",
332
+ // 14px
333
+ 4: "1rem",
334
+ // 16px
335
+ 5: "1.25rem",
336
+ // 20px
337
+ 6: "1.5rem",
338
+ // 24px
339
+ 7: "1.75rem",
340
+ // 28px
341
+ 8: "2rem",
342
+ // 32px
343
+ 9: "2.25rem",
344
+ // 36px
345
+ 10: "2.5rem",
346
+ // 40px
347
+ 11: "2.75rem",
348
+ // 44px
349
+ 12: "3rem",
350
+ // 48px
351
+ 14: "3.5rem",
352
+ // 56px
353
+ 16: "4rem",
354
+ // 64px
355
+ 20: "5rem",
356
+ // 80px
357
+ 24: "6rem",
358
+ // 96px
359
+ 28: "7rem",
360
+ // 112px
361
+ 32: "8rem"
362
+ // 128px
363
+ };
364
+ var primitiveBorderRadius = {
365
+ none: "0",
366
+ sm: "4px",
367
+ DEFAULT: "8px",
368
+ md: "8px",
369
+ lg: "12px",
370
+ xl: "16px",
371
+ "2xl": "24px",
372
+ full: "9999px"
373
+ };
374
+ var primitiveBreakpoints = {
375
+ xs: 0,
376
+ sm: 600,
377
+ md: 1e3,
378
+ lg: 1200,
379
+ xl: 1920
380
+ };
381
+ var primitiveZIndex = {
382
+ hide: -1,
383
+ auto: "auto",
384
+ base: 0,
385
+ docked: 10,
386
+ dropdown: 1e3,
387
+ sticky: 1100,
388
+ drawer: 1100,
389
+ banner: 1200,
390
+ appBar: 1200,
391
+ overlay: 1300,
392
+ modal: 1400,
393
+ popover: 1500,
394
+ skipLink: 1600,
395
+ toast: 1700,
396
+ tooltip: 1800
397
+ };
398
+
399
+ // src/theme/tokens/semantic.ts
400
+ var semanticColorsLight = {
401
+ // Brand colors (brand-*)
402
+ "brand-primary": primitiveRamps.orange[400],
403
+ "brand-primary-light": primitiveRamps.orange[300],
404
+ "brand-primary-dark": primitiveRamps.orange[500],
405
+ "brand-primary-subtle": "rgba(255, 121, 0, 0.08)",
406
+ "brand-primary-hover": primitiveRamps.orange[500],
407
+ "brand-primary-active": primitiveRamps.orange[600],
408
+ "brand-secondary": primitiveRamps.cyan[600],
409
+ "brand-secondary-light": primitiveRamps.cyan[500],
410
+ "brand-secondary-dark": primitiveRamps.cyan[700],
411
+ "brand-secondary-subtle": "rgba(48, 123, 155, 0.08)",
412
+ "brand-secondary-hover": primitiveRamps.cyan[700],
413
+ "brand-secondary-active": primitiveRamps.cyan[800],
414
+ // Text on brand backgrounds (on-*)
415
+ "on-brand-primary": primitiveColors.white,
416
+ "on-brand-secondary": primitiveColors.white,
417
+ // Status colors (status-*)
418
+ "status-success": primitiveRamps.green[300],
419
+ "status-success-light": primitiveRamps.green[200],
420
+ "status-success-dark": primitiveRamps.green[600],
421
+ "status-success-subtle": primitiveRamps.green[50],
422
+ // Live-session accent — its OWN role, decoupled from success so the two can diverge
423
+ "status-live": primitiveRamps.green[300],
424
+ "status-live-muted": primitiveRamps.green[500],
425
+ "status-error": primitiveRamps.red[600],
426
+ "status-error-light": primitiveRamps.red[500],
427
+ "status-error-dark": primitiveRamps.red[700],
428
+ "status-error-subtle": primitiveRamps.red[50],
429
+ "status-error-vivid": primitiveRamps.red[600],
430
+ // vivid alert red
431
+ "status-error-vivid-light": primitiveRamps.red[500],
432
+ "status-error-vivid-dark": primitiveRamps.red[700],
433
+ "status-error-vivid-subtle": "rgba(255, 71, 87, 0.12)",
434
+ "status-warning": primitiveRamps.amber[300],
435
+ "status-warning-light": primitiveRamps.amber[200],
436
+ "status-warning-dark": primitiveRamps.amber[500],
437
+ "status-warning-subtle": primitiveRamps.amber[50],
438
+ "status-info": primitiveRamps.blue[500],
439
+ "status-info-light": primitiveRamps.blue[300],
440
+ "status-info-dark": primitiveRamps.blue[600],
441
+ "status-info-subtle": primitiveRamps.blue[50],
442
+ // Text on status backgrounds (on-status-*)
443
+ "on-status-success": primitiveColors.white,
444
+ "on-status-error": primitiveColors.white,
445
+ "on-status-warning": primitiveColors.white,
446
+ "on-status-info": primitiveColors.white,
447
+ // Result/outcome indicators (result-*)
448
+ "result-improve": "#4caf50",
449
+ // Green - positive outcome
450
+ "result-improve-light": "rgba(76, 175, 80, 0.12)",
451
+ "result-improve-dark": "#248a24",
452
+ "result-degrade": "#ef5350",
453
+ // Red - negative outcome
454
+ "result-degrade-light": "rgba(239, 83, 80, 0.12)",
455
+ "result-degrade-dark": "#b30000",
456
+ "result-inconclusive": "#9E9A97",
457
+ // Gray - no clear result
458
+ "result-inconclusive-light": "rgba(158, 154, 151, 0.12)",
459
+ "result-neutral": greyRamp[600],
460
+ // Neutral baseline
461
+ // Text on result backgrounds (on-result-*)
462
+ "on-result-improve": primitiveColors.white,
463
+ "on-result-degrade": primitiveColors.white,
464
+ "on-result-inconclusive": primitiveColors.white,
465
+ // Data visualization colors (data-*)
466
+ // First 10 colors from discrete rainbow optimized for charts
467
+ "data-1": discreteRainbow[9],
468
+ // Blue
469
+ "data-2": discreteRainbow[14],
470
+ // Green
471
+ "data-3": discreteRainbow[17],
472
+ // Yellow
473
+ "data-4": discreteRainbow[25],
474
+ // Red
475
+ "data-5": discreteRainbow[8],
476
+ // Purple
477
+ "data-6": discreteRainbow[20],
478
+ // Orange
479
+ "data-7": discreteRainbow[13],
480
+ // Light Blue
481
+ "data-8": discreteRainbow[15],
482
+ // Light Green
483
+ "data-9": discreteRainbow[3],
484
+ // Lavender
485
+ "data-10": discreteRainbow[22],
486
+ // Dark Orange
487
+ // Text colors (text-*)
488
+ "text-primary": "#121828",
489
+ "text-secondary": "#65748B",
490
+ "text-tertiary": greyRamp[400],
491
+ "text-disabled": "rgba(55, 65, 81, 0.48)",
492
+ "text-inverse": primitiveColors.white,
493
+ "text-link": primitiveRamps.blue[600],
494
+ "text-link-hover": primitiveRamps.blue[700],
495
+ // Surface colors (surface-*) - for elevated containers
496
+ "surface-base": primitiveColors.white,
497
+ "surface-elevated": greyRamp[50],
498
+ // slightly off-white for elevated cards
499
+ "surface-raised": greyRamp[100],
500
+ // light gray for raised cards
501
+ "surface-overlay": primitiveColors.white,
502
+ "surface-input": greyRamp[50],
503
+ // Input field background (filled variant)
504
+ // Background colors (background-*)
505
+ "background-base": "#EBEBEB",
506
+ "background-default": primitiveColors.white,
507
+ "background-subtle": greyRamp[50],
508
+ // Frame/bezel chrome — top bar + side nav shell, one step below
509
+ // `background-base`. Placeholder pairing for light mode, which is deferred.
510
+ "background-frame": greyRamp[400],
511
+ // Border colors (border-*)
512
+ "border-prominent": greyRamp[400],
513
+ // high-visibility divider
514
+ "border-focus": primitiveRamps.blue[600],
515
+ "border-input": greyRamp[200],
516
+ // Input field border
517
+ "border-input-hover": greyRamp[400],
518
+ // Input field border on hover
519
+ "border-input-focus": primitiveRamps.blue[600],
520
+ // Input field border on focus
521
+ "border-input-error": primitiveRamps.red[600],
522
+ // Input field border on error
523
+ // Alpha hairline separators (surface-independent — composite toward black on
524
+ // light surfaces, mirroring the dark-mode white-alpha family). See §4/S-2.
525
+ "hairline-subtle": "rgba(0, 0, 0, 0.06)",
526
+ "hairline-default": "rgba(0, 0, 0, 0.09)",
527
+ "hairline-strong": "rgba(0, 0, 0, 0.14)",
528
+ // Interactive states (interactive-*)
529
+ "interactive-hover": "rgba(55, 65, 81, 0.04)",
530
+ "interactive-focus": "rgba(55, 65, 81, 0.12)",
531
+ "interactive-active": "rgba(55, 65, 81, 0.16)",
532
+ "interactive-selected": "rgba(55, 65, 81, 0.08)",
533
+ "interactive-disabled": "rgba(55, 65, 81, 0.12)",
534
+ "interactive-disabled-text": "rgba(55, 65, 81, 0.26)",
535
+ // Divider
536
+ "divider": "#E8E9EB",
537
+ // Avatar default
538
+ "avatar-background": greyRamp[600],
539
+ "avatar-text": primitiveColors.white
540
+ };
541
+ var semanticColorsDark = {
542
+ // Brand colors stay the same in dark mode
543
+ "brand-primary": primitiveRamps.orange[400],
544
+ "brand-primary-light": primitiveRamps.orange[300],
545
+ "brand-primary-dark": primitiveRamps.orange[500],
546
+ "brand-primary-subtle": "rgba(255, 121, 0, 0.12)",
547
+ "brand-primary-hover": primitiveRamps.orange[300],
548
+ "brand-primary-active": primitiveRamps.orange[200],
549
+ "brand-secondary": primitiveRamps.cyan[600],
550
+ "brand-secondary-light": primitiveRamps.cyan[500],
551
+ "brand-secondary-dark": primitiveRamps.cyan[700],
552
+ "brand-secondary-subtle": "rgba(48, 123, 155, 0.12)",
553
+ "brand-secondary-hover": primitiveRamps.cyan[500],
554
+ "brand-secondary-active": primitiveRamps.cyan[400],
555
+ // Text on brand backgrounds
556
+ "on-brand-primary": primitiveColors.white,
557
+ "on-brand-secondary": primitiveColors.white,
558
+ // Status colors
559
+ "status-success": primitiveRamps.green[300],
560
+ "status-success-light": primitiveRamps.green[200],
561
+ "status-success-dark": primitiveRamps.green[600],
562
+ "status-success-subtle": "rgba(46, 213, 115, 0.12)",
563
+ // Live-session accent — its OWN role, decoupled from success so the two can diverge
564
+ "status-live": primitiveRamps.green[300],
565
+ "status-live-muted": primitiveRamps.green[500],
566
+ "status-error": primitiveRamps.red[600],
567
+ "status-error-light": primitiveRamps.red[500],
568
+ "status-error-dark": primitiveRamps.red[700],
569
+ "status-error-subtle": "rgba(209, 67, 67, 0.12)",
570
+ "status-error-vivid": primitiveRamps.red[600],
571
+ "status-error-vivid-light": primitiveRamps.red[500],
572
+ "status-error-vivid-dark": primitiveRamps.red[700],
573
+ "status-error-vivid-subtle": "rgba(255, 71, 87, 0.12)",
574
+ "status-warning": primitiveRamps.amber[300],
575
+ "status-warning-light": primitiveRamps.amber[200],
576
+ "status-warning-dark": primitiveRamps.amber[500],
577
+ "status-warning-subtle": "rgba(249, 180, 21, 0.12)",
578
+ "status-info": primitiveRamps.blue[500],
579
+ "status-info-light": primitiveRamps.blue[300],
580
+ "status-info-dark": primitiveRamps.blue[600],
581
+ "status-info-subtle": "rgba(33, 150, 243, 0.12)",
582
+ // Text on status backgrounds
583
+ "on-status-success": primitiveColors.white,
584
+ "on-status-error": primitiveColors.white,
585
+ "on-status-warning": primitiveColors.white,
586
+ "on-status-info": primitiveColors.white,
587
+ // Result/outcome indicators (result-*)
588
+ "result-improve": "#4caf50",
589
+ "result-improve-light": "rgba(76, 175, 80, 0.16)",
590
+ "result-improve-dark": "#248a24",
591
+ "result-degrade": "#ef5350",
592
+ "result-degrade-light": "rgba(239, 83, 80, 0.16)",
593
+ "result-degrade-dark": "#b30000",
594
+ "result-inconclusive": "#9E9A97",
595
+ "result-inconclusive-light": "rgba(158, 154, 151, 0.16)",
596
+ "result-neutral": greyRamp[400],
597
+ // Text on result backgrounds
598
+ "on-result-improve": primitiveColors.white,
599
+ "on-result-degrade": primitiveColors.white,
600
+ "on-result-inconclusive": primitiveColors.white,
601
+ // Data visualization colors (same in dark mode for consistency)
602
+ "data-1": discreteRainbow[9],
603
+ "data-2": discreteRainbow[14],
604
+ "data-3": discreteRainbow[17],
605
+ "data-4": discreteRainbow[25],
606
+ "data-5": discreteRainbow[8],
607
+ "data-6": discreteRainbow[20],
608
+ "data-7": discreteRainbow[13],
609
+ "data-8": discreteRainbow[15],
610
+ "data-9": discreteRainbow[3],
611
+ "data-10": discreteRainbow[22],
612
+ // Text colors - inverted for dark mode
613
+ "text-primary": greyRamp[50],
614
+ "text-secondary": greyRamp[400],
615
+ // Deliberately ONE step lighter than the L*-nearest match (`greyRamp[600]`).
616
+ // The colour this replaced failed WCAG large-text outright on the three
617
+ // lightest planes — 2.96 / 2.72 / 2.49 against elevated / raised / overlay —
618
+ // and `600` carried that failure forward almost exactly (2.93 / 2.70 / 2.47).
619
+ // `500` clears 3:1 everywhere (3.32–5.34). Contrast beats colour fidelity for
620
+ // text roles; borders and surfaces still use strict L*-nearest. See
621
+ // semantic-contrast.test.ts, which fails if this is moved back down.
622
+ "text-tertiary": greyRamp[500],
623
+ "text-disabled": "rgba(255, 255, 255, 0.38)",
624
+ "text-inverse": greyRamp[950],
625
+ "text-link": "#828DF8",
626
+ "text-link-hover": primitiveRamps.blue[400],
627
+ // Surface colors - dark backgrounds — warm-tapered DERIVED ramp (TD-surface-tokens,
628
+ // S-1, re-spaced S-3). Shipped verbatim from `deriveSurfaceRamp()` — see
629
+ // `surfaceRampDark` in primitives.ts for the full derivation note. `surface-overlay`
630
+ // and `surface-elevated` are distinct (were both #191919 pre-S-1); `surface-input`
631
+ // tracks one plane above `surface-base`, same relative position as before the remap.
632
+ // `background-base` backs `Surface level="background"` (SurfaceContext.SURFACE_LEVEL_TOKEN),
633
+ // so it takes the ramp's shell role. The deepest plane is `background-frame`,
634
+ // which is also the `SurfaceLevel` floor a pressed surface clamps at.
635
+ "surface-base": greyRamp[925],
636
+ // main surface (#252321, L*13.9)
637
+ "surface-elevated": greyRamp[900],
638
+ // elevated surface (#2C2A28, L*17.2 — nav/rail)
639
+ "surface-raised": greyRamp[875],
640
+ // raised surface (#31302F, L*19.9 — cards)
641
+ "surface-overlay": greyRamp[850],
642
+ // overlay surface (#373635, L*22.7 — hero/popover)
643
+ "surface-input": greyRamp[900],
644
+ // input surface (#2C2A28 — one plane above base)
645
+ // Background colors — same ramp, the frame/shell end of it.
646
+ "background-base": greyRamp[950],
647
+ // shell (#1C1916, L*9 — Surface level="background")
648
+ "background-default": greyRamp[925],
649
+ // main background (#252321, L*13.9 — matches surface-base)
650
+ "background-subtle": greyRamp[900],
651
+ // subtle background (#2C2A28, L*17.2 — matches surface-elevated)
652
+ // Frame/bezel chrome — the top bar + side nav shell, one step BELOW
653
+ // `background-base`. It used to be described as sitting OUTSIDE the ramp; it
654
+ // is simply the ramp's last step now, and the floor `<Surface pressed>` clamps at.
655
+ "background-frame": greyRamp[975],
656
+ // frame / bezel (#100D0A, L*3.8)
657
+ // Border colors — solid dark borders are RETIRED (TD-07.14). Not a preference — a structural
658
+ // consequence of one ramp. Every step from 850 to 975 is now a surface plane,
659
+ // so a solid border dark enough to read as a border necessarily equals some
660
+ // plane's fill, which is exactly the collision `surface.contract.test.ts` R2
661
+ // forbids. The only non-plane steps left in that band are 800 and 700, and
662
+ // borders there jump from L*~10-25 to L*~28-38 — a restyle, not a migration.
663
+ //
664
+ // So separation moves to the alpha hairlines, which dark mode already called
665
+ // "the primary separation cue". Being alpha, they composite against whatever
666
+ // plane they land on and cannot collide with any of them — the problem stops
667
+ // existing rather than being re-solved per plane. The three solid tokens were
668
+ // deleted outright; consumers point at the `hairline-*` family below.
669
+ //
670
+ // `border-prominent` stays SOLID: it is the one border meant to be seen
671
+ // outright (4 call sites, high-visibility dividers), and grey-800 is not a
672
+ // plane, so it keeps its job without collision.
673
+ "border-prominent": greyRamp[800],
674
+ // high-visibility divider
675
+ "border-focus": "#828DF8",
676
+ "border-input": greyRamp[700],
677
+ "border-input-hover": greyRamp[600],
678
+ "border-input-focus": "#828DF8",
679
+ "border-input-error": primitiveRamps.red[500],
680
+ // Alpha hairline separators — the primary separation cue (§4/S-2). Self-
681
+ // normalizing: composites toward white by ~the same amount on ANY plane, so
682
+ // one family works at every elevation instead of per-surface border tokens.
683
+ // Shadows are demoted to floating-overlay use only (not shipped as a fill
684
+ // separator here — see elevation.ts, follow-up S-4).
685
+ //
686
+ // RETUNED on the wall (VW-99, S-6). The original .06/.09/.14 were set at a
687
+ // desk. On the panel at ~3 m `subtle` rendered but was indiscernible, and
688
+ // `default` — the load-bearing one, with no solid-border fallback since
689
+ // TD-07.14 — went weak on the lightest plane. `strong` read cleanly with room
690
+ // to spare, which is what made raising the whole family viable.
691
+ //
692
+ // Each tier steps up onto the next MEASURED-GOOD rung rather than an
693
+ // interpolated one: the new `subtle` is the old `default`, and the new
694
+ // `default` is the old `strong` — a value just confirmed legible on all four
695
+ // planes. Spacing goes 1 : 1.56 : 2.33, against the original 1 : 1.5 : 2.33.
696
+ //
697
+ // RUN 2 (VW-99): all three tiers were seen on all four planes — the retune
698
+ // worked — but `subtle` was still "a bit hard to read", so the whole family
699
+ // took a further +.01. That is a comfort margin on a passing row, not a fix
700
+ // for a failing one, which is why it is a flat offset: the 1 : 1.56 : 2.33
701
+ // spacing that the run validated is preserved rather than re-derived.
702
+ //
703
+ // Keep these to TWO decimals. react-native-web quantises alpha to 8 bits, so
704
+ // a 3-decimal value silently rounds on the way to the DOM (.135 renders as
705
+ // .13) — the token would say one thing and paint another.
706
+ //
707
+ // DARK ONLY. The light family above composites toward BLACK on light planes,
708
+ // which this run says nothing about — do not mirror these numbers into it
709
+ // without its own verification.
710
+ "hairline-subtle": "rgba(255, 255, 255, 0.10)",
711
+ "hairline-default": "rgba(255, 255, 255, 0.15)",
712
+ "hairline-strong": "rgba(255, 255, 255, 0.22)",
713
+ // Interactive states
714
+ "interactive-hover": "rgba(255, 255, 255, 0.04)",
715
+ "interactive-focus": "rgba(255, 255, 255, 0.12)",
716
+ "interactive-active": "rgba(255, 255, 255, 0.16)",
717
+ "interactive-selected": "rgba(255, 255, 255, 0.08)",
718
+ "interactive-disabled": "rgba(255, 255, 255, 0.12)",
719
+ "interactive-disabled-text": "rgba(255, 255, 255, 0.26)",
720
+ // Divider
721
+ "divider": "rgba(255, 255, 255, 0.09)",
722
+ // Avatar default
723
+ "avatar-background": greyRamp[700],
724
+ "avatar-text": primitiveColors.white
725
+ };
726
+ var semanticTypography = {
727
+ // Headings (Space Grotesk)
728
+ h1: {
729
+ fontFamily: "heading",
730
+ fontSize: "3.5rem",
731
+ fontWeight: 700,
732
+ lineHeight: 1.375
733
+ },
734
+ h2: {
735
+ fontFamily: "heading",
736
+ fontSize: "3rem",
737
+ fontWeight: 700,
738
+ lineHeight: 1.375
739
+ },
740
+ h3: {
741
+ fontFamily: "heading",
742
+ fontSize: "2.25rem",
743
+ fontWeight: 700,
744
+ lineHeight: 1.375
745
+ },
746
+ h4: {
747
+ fontFamily: "heading",
748
+ fontSize: "2rem",
749
+ fontWeight: 700,
750
+ lineHeight: 1.375
751
+ },
752
+ h5: {
753
+ fontFamily: "heading",
754
+ fontSize: "1.5rem",
755
+ fontWeight: 600,
756
+ lineHeight: 1.375
757
+ },
758
+ h6: {
759
+ fontFamily: "heading",
760
+ fontSize: "1.125rem",
761
+ fontWeight: 600,
762
+ lineHeight: 1.375
763
+ },
764
+ // Body text (Nunito Sans)
765
+ body1: {
766
+ fontFamily: "body",
767
+ fontSize: "1rem",
768
+ fontWeight: 400,
769
+ lineHeight: 1.5
770
+ },
771
+ body2: {
772
+ fontFamily: "body",
773
+ fontSize: "0.875rem",
774
+ fontWeight: 400,
775
+ lineHeight: 1.57
776
+ },
777
+ subtitle1: {
778
+ fontFamily: "body",
779
+ fontSize: "1rem",
780
+ fontWeight: 500,
781
+ lineHeight: 1.75
782
+ },
783
+ subtitle2: {
784
+ fontFamily: "body",
785
+ fontSize: "0.875rem",
786
+ fontWeight: 500,
787
+ lineHeight: 1.57
788
+ },
789
+ caption: {
790
+ fontFamily: "body",
791
+ fontSize: "0.75rem",
792
+ fontWeight: 400,
793
+ lineHeight: 1.66
794
+ },
795
+ overline: {
796
+ fontFamily: "body",
797
+ fontSize: "0.75rem",
798
+ fontWeight: 600,
799
+ lineHeight: 2.5,
800
+ letterSpacing: "0.5px",
801
+ textTransform: "uppercase"
802
+ },
803
+ button: {
804
+ fontFamily: "sans",
805
+ fontSize: "0.875rem",
806
+ fontWeight: 600,
807
+ lineHeight: 1.75
808
+ }
809
+ };
810
+ var buttonSizes = {
811
+ sm: {
812
+ paddingX: "16px",
813
+ paddingY: "6px",
814
+ fontSize: "0.875rem"
815
+ },
816
+ md: {
817
+ paddingX: "20px",
818
+ paddingY: "8px",
819
+ fontSize: "0.875rem"
820
+ },
821
+ lg: {
822
+ paddingX: "24px",
823
+ paddingY: "11px",
824
+ fontSize: "1rem"
825
+ }
826
+ };
827
+ function getSemanticColors(mode) {
828
+ return mode === "dark" ? semanticColorsDark : semanticColorsLight;
829
+ }
830
+
831
+ export { CATEGORICAL_CVD_SAFE_MAX, SURFACE_PLANE_STEPS, bestTextColor, buttonSizes, categoricalPalette, discreteRainbow, divergingScale, getCategoricalColor, getDiscreteRainbowColor, getSemanticColors, greyRamp, primitiveBorderRadius, primitiveBreakpoints, primitiveColors, primitiveRamps, primitiveSpacing, primitiveTypography, primitiveZIndex, semanticColorsDark, semanticColorsLight, semanticTypography, sequentialEffort };
832
+ //# sourceMappingURL=tokens.mjs.map
833
+ //# sourceMappingURL=tokens.mjs.map