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