@thesage/ui 0.0.9
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/fontThemes-Bwf7_lFg.d.mts +842 -0
- package/dist/fontThemes-Bwf7_lFg.d.ts +842 -0
- package/dist/hooks-C8PrmIXy.d.mts +225 -0
- package/dist/hooks-Ct9RBhg-.d.ts +225 -0
- package/dist/hooks.d.mts +3 -0
- package/dist/hooks.d.ts +3 -0
- package/dist/hooks.js +1342 -0
- package/dist/hooks.js.map +1 -0
- package/dist/hooks.mjs +1314 -0
- package/dist/hooks.mjs.map +1 -0
- package/dist/index-CsnncHSm.d.mts +23 -0
- package/dist/index-CsnncHSm.d.ts +23 -0
- package/dist/index.d.mts +2830 -0
- package/dist/index.d.ts +2830 -0
- package/dist/index.js +12637 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +12319 -0
- package/dist/index.mjs.map +1 -0
- package/dist/providers-Dv3LFGtJ.d.mts +17 -0
- package/dist/providers-Dv3LFGtJ.d.ts +17 -0
- package/dist/providers.d.mts +2 -0
- package/dist/providers.d.ts +2 -0
- package/dist/providers.js +1944 -0
- package/dist/providers.js.map +1 -0
- package/dist/providers.mjs +1918 -0
- package/dist/providers.mjs.map +1 -0
- package/dist/tokens.d.mts +831 -0
- package/dist/tokens.d.ts +831 -0
- package/dist/tokens.js +2399 -0
- package/dist/tokens.js.map +1 -0
- package/dist/tokens.mjs +2319 -0
- package/dist/tokens.mjs.map +1 -0
- package/dist/utils-DlJKRVzQ.d.mts +986 -0
- package/dist/utils-xrpHqxXR.d.ts +986 -0
- package/dist/utils.d.mts +4 -0
- package/dist/utils.d.ts +4 -0
- package/dist/utils.js +873 -0
- package/dist/utils.js.map +1 -0
- package/dist/utils.mjs +805 -0
- package/dist/utils.mjs.map +1 -0
- package/dist/validation-Bj1ye-v_.d.mts +114 -0
- package/dist/validation-Bj1ye-v_.d.ts +114 -0
- package/package.json +117 -0
package/dist/tokens.js
ADDED
|
@@ -0,0 +1,2399 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/tokens.ts
|
|
22
|
+
var tokens_exports = {};
|
|
23
|
+
__export(tokens_exports, {
|
|
24
|
+
COLOR_MODES: () => COLOR_MODES,
|
|
25
|
+
THEME_NAMES: () => THEME_NAMES,
|
|
26
|
+
accentColorDerivations: () => accentColorDerivations,
|
|
27
|
+
adjustLightness: () => adjustLightness,
|
|
28
|
+
adjustOpacity: () => adjustOpacity,
|
|
29
|
+
adjustSaturation: () => adjustSaturation,
|
|
30
|
+
baseTokens: () => baseTokens,
|
|
31
|
+
codeColors: () => codeColors,
|
|
32
|
+
colorPalettes: () => colorPalettes,
|
|
33
|
+
computeDerivedTokens: () => computeDerivedTokens,
|
|
34
|
+
fontFamilies: () => fontFamilies,
|
|
35
|
+
fontLoadingConfig: () => fontLoadingConfig,
|
|
36
|
+
fontSizes: () => fontSizes,
|
|
37
|
+
fontThemes: () => fontThemes,
|
|
38
|
+
fontWeights: () => fontWeights,
|
|
39
|
+
generateScale: () => generateScale,
|
|
40
|
+
getAccessibleFontThemes: () => getAccessibleFontThemes,
|
|
41
|
+
getAccessiblePalettes: () => getAccessiblePalettes,
|
|
42
|
+
getContrastRatio: () => getContrastRatio,
|
|
43
|
+
getDependentTokens: () => getDependentTokens,
|
|
44
|
+
getFontThemeById: () => getFontThemeById,
|
|
45
|
+
getFontThemesByCategory: () => getFontThemesByCategory,
|
|
46
|
+
getFontThemesByMood: () => getFontThemesByMood,
|
|
47
|
+
getFontThemesForUseCase: () => getFontThemesForUseCase,
|
|
48
|
+
getFontVariable: () => getFontVariable,
|
|
49
|
+
getLuminance: () => getLuminance,
|
|
50
|
+
getOptimalForeground: () => getOptimalForeground,
|
|
51
|
+
getPalettesByCategory: () => getPalettesByCategory,
|
|
52
|
+
getPalettesByMood: () => getPalettesByMood,
|
|
53
|
+
getPalettesForUseCase: () => getPalettesForUseCase,
|
|
54
|
+
getResponsiveFontSize: () => getResponsiveFontSize,
|
|
55
|
+
getThemeFontVariables: () => getThemeFontVariables,
|
|
56
|
+
hexToHSL: () => hexToHSL,
|
|
57
|
+
hexToRgb: () => hexToRgb,
|
|
58
|
+
hslToHex: () => hslToHex,
|
|
59
|
+
letterSpacing: () => letterSpacing,
|
|
60
|
+
lineHeights: () => lineHeights,
|
|
61
|
+
modeSpecificDerivations: () => modeSpecificDerivations,
|
|
62
|
+
motion: () => motion,
|
|
63
|
+
primaryColorDerivations: () => primaryColorDerivations,
|
|
64
|
+
rotateHue: () => rotateHue,
|
|
65
|
+
sageTokens: () => sageTokens,
|
|
66
|
+
secondaryColorDerivations: () => secondaryColorDerivations,
|
|
67
|
+
semanticLetterSpacing: () => semanticLetterSpacing,
|
|
68
|
+
semanticLineHeights: () => semanticLineHeights,
|
|
69
|
+
semanticSizes: () => semanticSizes,
|
|
70
|
+
semanticWeights: () => semanticWeights,
|
|
71
|
+
spacing: () => spacing,
|
|
72
|
+
studioTokens: () => studioTokens,
|
|
73
|
+
syntaxColors: () => syntaxColors,
|
|
74
|
+
tokenDependencyGraph: () => tokenDependencyGraph,
|
|
75
|
+
typePresets: () => typePresets,
|
|
76
|
+
typography: () => typography,
|
|
77
|
+
typographySystem: () => typographySystem,
|
|
78
|
+
voltTokens: () => voltTokens
|
|
79
|
+
});
|
|
80
|
+
module.exports = __toCommonJS(tokens_exports);
|
|
81
|
+
|
|
82
|
+
// ../tokens/src/base.ts
|
|
83
|
+
var baseTokens = {
|
|
84
|
+
/**
|
|
85
|
+
* Spacing scale (based on 4px grid)
|
|
86
|
+
*/
|
|
87
|
+
spacing: {
|
|
88
|
+
"0": "0",
|
|
89
|
+
"0.5": "0.125rem",
|
|
90
|
+
// 2px
|
|
91
|
+
"1": "0.25rem",
|
|
92
|
+
// 4px
|
|
93
|
+
"2": "0.5rem",
|
|
94
|
+
// 8px
|
|
95
|
+
"3": "0.75rem",
|
|
96
|
+
// 12px
|
|
97
|
+
"4": "1rem",
|
|
98
|
+
// 16px
|
|
99
|
+
"5": "1.25rem",
|
|
100
|
+
// 20px
|
|
101
|
+
"6": "1.5rem",
|
|
102
|
+
// 24px
|
|
103
|
+
"8": "2rem",
|
|
104
|
+
// 32px
|
|
105
|
+
"10": "2.5rem",
|
|
106
|
+
// 40px
|
|
107
|
+
"12": "3rem",
|
|
108
|
+
// 48px
|
|
109
|
+
"16": "4rem",
|
|
110
|
+
// 64px
|
|
111
|
+
"20": "5rem",
|
|
112
|
+
// 80px
|
|
113
|
+
"24": "6rem",
|
|
114
|
+
// 96px
|
|
115
|
+
"32": "8rem"
|
|
116
|
+
// 128px
|
|
117
|
+
},
|
|
118
|
+
/**
|
|
119
|
+
* Typography scales
|
|
120
|
+
*/
|
|
121
|
+
fontSize: {
|
|
122
|
+
"xs": "0.75rem",
|
|
123
|
+
// 12px
|
|
124
|
+
"sm": "0.875rem",
|
|
125
|
+
// 14px
|
|
126
|
+
"base": "1rem",
|
|
127
|
+
// 16px
|
|
128
|
+
"lg": "1.125rem",
|
|
129
|
+
// 18px
|
|
130
|
+
"xl": "1.25rem",
|
|
131
|
+
// 20px
|
|
132
|
+
"2xl": "1.5rem",
|
|
133
|
+
// 24px
|
|
134
|
+
"3xl": "1.875rem",
|
|
135
|
+
// 30px
|
|
136
|
+
"4xl": "2.25rem",
|
|
137
|
+
// 36px
|
|
138
|
+
"5xl": "3rem",
|
|
139
|
+
// 48px
|
|
140
|
+
"6xl": "3.75rem",
|
|
141
|
+
// 60px
|
|
142
|
+
"7xl": "4.5rem",
|
|
143
|
+
// 72px
|
|
144
|
+
"8xl": "6rem"
|
|
145
|
+
// 96px
|
|
146
|
+
},
|
|
147
|
+
fontWeight: {
|
|
148
|
+
light: "300",
|
|
149
|
+
normal: "400",
|
|
150
|
+
medium: "500",
|
|
151
|
+
semibold: "600",
|
|
152
|
+
bold: "700",
|
|
153
|
+
extrabold: "800",
|
|
154
|
+
black: "900"
|
|
155
|
+
},
|
|
156
|
+
lineHeight: {
|
|
157
|
+
none: "1",
|
|
158
|
+
tight: "1.25",
|
|
159
|
+
snug: "1.375",
|
|
160
|
+
normal: "1.5",
|
|
161
|
+
relaxed: "1.625",
|
|
162
|
+
loose: "2"
|
|
163
|
+
},
|
|
164
|
+
/**
|
|
165
|
+
* Border radius
|
|
166
|
+
*/
|
|
167
|
+
borderRadius: {
|
|
168
|
+
none: "0",
|
|
169
|
+
sm: "0.125rem",
|
|
170
|
+
// 2px
|
|
171
|
+
DEFAULT: "0.25rem",
|
|
172
|
+
// 4px
|
|
173
|
+
md: "0.375rem",
|
|
174
|
+
// 6px
|
|
175
|
+
lg: "0.5rem",
|
|
176
|
+
// 8px
|
|
177
|
+
xl: "0.75rem",
|
|
178
|
+
// 12px
|
|
179
|
+
"2xl": "1rem",
|
|
180
|
+
// 16px
|
|
181
|
+
"3xl": "1.5rem",
|
|
182
|
+
// 24px
|
|
183
|
+
full: "9999px"
|
|
184
|
+
},
|
|
185
|
+
/**
|
|
186
|
+
* Motion durations (base values - themes can override)
|
|
187
|
+
*/
|
|
188
|
+
duration: {
|
|
189
|
+
instant: "0ms",
|
|
190
|
+
fast: "150ms",
|
|
191
|
+
normal: "300ms",
|
|
192
|
+
slow: "500ms",
|
|
193
|
+
slower: "800ms"
|
|
194
|
+
},
|
|
195
|
+
/**
|
|
196
|
+
* Easing curves (base values - themes can override)
|
|
197
|
+
*/
|
|
198
|
+
ease: {
|
|
199
|
+
linear: "linear",
|
|
200
|
+
in: "cubic-bezier(0.4, 0, 1, 1)",
|
|
201
|
+
out: "cubic-bezier(0, 0, 0.2, 1)",
|
|
202
|
+
inOut: "cubic-bezier(0.4, 0, 0.2, 1)"
|
|
203
|
+
},
|
|
204
|
+
/**
|
|
205
|
+
* Z-index scale
|
|
206
|
+
*/
|
|
207
|
+
zIndex: {
|
|
208
|
+
"auto": "auto",
|
|
209
|
+
"0": "0",
|
|
210
|
+
"10": "10",
|
|
211
|
+
"20": "20",
|
|
212
|
+
"30": "30",
|
|
213
|
+
"40": "40",
|
|
214
|
+
"50": "50",
|
|
215
|
+
dropdown: "1000",
|
|
216
|
+
sticky: "1020",
|
|
217
|
+
fixed: "1030",
|
|
218
|
+
modalBackdrop: "1040",
|
|
219
|
+
modal: "1050",
|
|
220
|
+
popover: "1060",
|
|
221
|
+
tooltip: "1070"
|
|
222
|
+
},
|
|
223
|
+
/**
|
|
224
|
+
* Focus ring configuration
|
|
225
|
+
*/
|
|
226
|
+
focus: {
|
|
227
|
+
width: "2px",
|
|
228
|
+
offset: "2px",
|
|
229
|
+
style: "solid"
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
var spacing = {
|
|
233
|
+
xs: baseTokens.spacing["1"],
|
|
234
|
+
// 4px — Tight internal padding
|
|
235
|
+
sm: baseTokens.spacing["2"],
|
|
236
|
+
// 8px — Default gap
|
|
237
|
+
md: baseTokens.spacing["4"],
|
|
238
|
+
// 16px — Section padding
|
|
239
|
+
lg: baseTokens.spacing["6"],
|
|
240
|
+
// 24px — Card padding
|
|
241
|
+
xl: baseTokens.spacing["8"],
|
|
242
|
+
// 32px — Section margins
|
|
243
|
+
"2xl": baseTokens.spacing["12"],
|
|
244
|
+
// 48px — Page sections
|
|
245
|
+
"3xl": baseTokens.spacing["16"]
|
|
246
|
+
// 64px — Major divisions
|
|
247
|
+
};
|
|
248
|
+
var typography = {
|
|
249
|
+
fonts: {
|
|
250
|
+
sans: "var(--font-body)",
|
|
251
|
+
serif: "var(--font-heading)",
|
|
252
|
+
mono: "var(--font-mono)"
|
|
253
|
+
},
|
|
254
|
+
sizes: {
|
|
255
|
+
xs: baseTokens.fontSize.xs,
|
|
256
|
+
// 12px — Fine print
|
|
257
|
+
sm: baseTokens.fontSize.sm,
|
|
258
|
+
// 14px — Secondary text
|
|
259
|
+
base: baseTokens.fontSize.base,
|
|
260
|
+
// 16px — Body text
|
|
261
|
+
lg: baseTokens.fontSize.lg,
|
|
262
|
+
// 18px — Lead paragraphs
|
|
263
|
+
xl: baseTokens.fontSize.xl,
|
|
264
|
+
// 20px — Section headers
|
|
265
|
+
"2xl": baseTokens.fontSize["2xl"],
|
|
266
|
+
// 24px — Page headers
|
|
267
|
+
"3xl": baseTokens.fontSize["3xl"]
|
|
268
|
+
// 30px — Hero text
|
|
269
|
+
},
|
|
270
|
+
weights: {
|
|
271
|
+
normal: baseTokens.fontWeight.normal,
|
|
272
|
+
// 400
|
|
273
|
+
medium: baseTokens.fontWeight.medium,
|
|
274
|
+
// 500
|
|
275
|
+
semibold: baseTokens.fontWeight.semibold,
|
|
276
|
+
// 600
|
|
277
|
+
bold: baseTokens.fontWeight.bold
|
|
278
|
+
// 700
|
|
279
|
+
},
|
|
280
|
+
leading: {
|
|
281
|
+
tight: baseTokens.lineHeight.tight,
|
|
282
|
+
// 1.25 — Headings
|
|
283
|
+
normal: baseTokens.lineHeight.normal,
|
|
284
|
+
// 1.5 — Body
|
|
285
|
+
relaxed: baseTokens.lineHeight.relaxed
|
|
286
|
+
// 1.625 — Spacious reading
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
var motion = {
|
|
290
|
+
duration: baseTokens.duration,
|
|
291
|
+
easing: {
|
|
292
|
+
default: baseTokens.ease.out,
|
|
293
|
+
// Most transitions
|
|
294
|
+
spring: "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
295
|
+
// Playful interactions
|
|
296
|
+
linear: baseTokens.ease.linear
|
|
297
|
+
// Progress indicators
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
// ../tokens/src/studio.ts
|
|
302
|
+
var studioTokens = {
|
|
303
|
+
light: {
|
|
304
|
+
colors: {
|
|
305
|
+
// Backgrounds
|
|
306
|
+
background: "#ffffff",
|
|
307
|
+
backgroundSecondary: "#fafafa",
|
|
308
|
+
backgroundTertiary: "#f5f5f5",
|
|
309
|
+
// Foregrounds
|
|
310
|
+
foreground: "#0a0a0a",
|
|
311
|
+
foregroundSecondary: "#525252",
|
|
312
|
+
foregroundTertiary: "#a3a3a3",
|
|
313
|
+
// Brand
|
|
314
|
+
primary: "#0a0a0a",
|
|
315
|
+
primaryForeground: "#ffffff",
|
|
316
|
+
secondary: "#f5f5f5",
|
|
317
|
+
secondaryForeground: "#0a0a0a",
|
|
318
|
+
accent: "#0070f3",
|
|
319
|
+
accentForeground: "#ffffff",
|
|
320
|
+
// Borders
|
|
321
|
+
border: "#d4d4d4",
|
|
322
|
+
borderSubtle: "#f5f5f5",
|
|
323
|
+
// States
|
|
324
|
+
hover: "#fafafa",
|
|
325
|
+
active: "#f0f0f0",
|
|
326
|
+
// Link hover states
|
|
327
|
+
linkHover: "#0a0a0a",
|
|
328
|
+
linkHoverForeground: "#ffffff",
|
|
329
|
+
// Semantic
|
|
330
|
+
success: "#00a86b",
|
|
331
|
+
successForeground: "#ffffff",
|
|
332
|
+
warning: "#f59e0b",
|
|
333
|
+
warningForeground: "#ffffff",
|
|
334
|
+
error: "#ef4444",
|
|
335
|
+
errorForeground: "#ffffff",
|
|
336
|
+
info: "#0070f3",
|
|
337
|
+
infoForeground: "#ffffff",
|
|
338
|
+
// Component-specific colors
|
|
339
|
+
card: "#ffffff",
|
|
340
|
+
cardForeground: "#0a0a0a",
|
|
341
|
+
popover: "#ffffff",
|
|
342
|
+
popoverForeground: "#0a0a0a",
|
|
343
|
+
muted: "#f5f5f5",
|
|
344
|
+
mutedForeground: "#737373",
|
|
345
|
+
destructive: "#ef4444",
|
|
346
|
+
destructiveForeground: "#ffffff",
|
|
347
|
+
input: "#d4d4d4",
|
|
348
|
+
ring: "#0a0a0a",
|
|
349
|
+
// Surface is used by various components
|
|
350
|
+
surface: "#fafafa",
|
|
351
|
+
// Glass effects
|
|
352
|
+
glass: "rgba(255, 255, 255, 0.7)",
|
|
353
|
+
glassBorder: "rgba(0, 0, 0, 0.1)"
|
|
354
|
+
},
|
|
355
|
+
effects: {
|
|
356
|
+
blur: {
|
|
357
|
+
sm: "blur(4px)",
|
|
358
|
+
md: "blur(8px)",
|
|
359
|
+
lg: "blur(16px)",
|
|
360
|
+
xl: "blur(24px)"
|
|
361
|
+
},
|
|
362
|
+
shadow: {
|
|
363
|
+
sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
|
|
364
|
+
md: "0 4px 6px -1px rgba(0, 0, 0, 0.1)",
|
|
365
|
+
lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1)",
|
|
366
|
+
xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1)",
|
|
367
|
+
"2xl": "0 25px 50px -12px rgba(0, 0, 0, 0.25)"
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
dark: {
|
|
372
|
+
colors: {
|
|
373
|
+
// Backgrounds
|
|
374
|
+
background: "#000000",
|
|
375
|
+
backgroundSecondary: "#171717",
|
|
376
|
+
backgroundTertiary: "#262626",
|
|
377
|
+
// Foregrounds
|
|
378
|
+
foreground: "#fafafa",
|
|
379
|
+
foregroundSecondary: "#a3a3a3",
|
|
380
|
+
foregroundTertiary: "#858585",
|
|
381
|
+
// Brand
|
|
382
|
+
primary: "#ffffff",
|
|
383
|
+
primaryForeground: "#0a0a0a",
|
|
384
|
+
secondary: "#262626",
|
|
385
|
+
secondaryForeground: "#fafafa",
|
|
386
|
+
accent: "#0090ff",
|
|
387
|
+
accentForeground: "#ffffff",
|
|
388
|
+
// Borders
|
|
389
|
+
border: "#404040",
|
|
390
|
+
borderSubtle: "#1a1a1a",
|
|
391
|
+
// States
|
|
392
|
+
hover: "#1a1a1a",
|
|
393
|
+
active: "#262626",
|
|
394
|
+
// Link hover states
|
|
395
|
+
linkHover: "#ffffff",
|
|
396
|
+
linkHoverForeground: "#0a0a0a",
|
|
397
|
+
// Semantic
|
|
398
|
+
success: "#10b981",
|
|
399
|
+
successForeground: "#ffffff",
|
|
400
|
+
warning: "#f59e0b",
|
|
401
|
+
warningForeground: "#ffffff",
|
|
402
|
+
error: "#ef4444",
|
|
403
|
+
errorForeground: "#ffffff",
|
|
404
|
+
info: "#0090ff",
|
|
405
|
+
infoForeground: "#ffffff",
|
|
406
|
+
// Component-specific colors
|
|
407
|
+
card: "#0a0a0a",
|
|
408
|
+
cardForeground: "#fafafa",
|
|
409
|
+
popover: "#0a0a0a",
|
|
410
|
+
popoverForeground: "#fafafa",
|
|
411
|
+
muted: "#262626",
|
|
412
|
+
mutedForeground: "#a3a3a3",
|
|
413
|
+
destructive: "#ef4444",
|
|
414
|
+
destructiveForeground: "#ffffff",
|
|
415
|
+
input: "#404040",
|
|
416
|
+
ring: "#d4d4d4",
|
|
417
|
+
// Surface is used by various components
|
|
418
|
+
surface: "#171717",
|
|
419
|
+
// Glass effects
|
|
420
|
+
glass: "rgba(0, 0, 0, 0.7)",
|
|
421
|
+
glassBorder: "rgba(255, 255, 255, 0.1)"
|
|
422
|
+
},
|
|
423
|
+
effects: {
|
|
424
|
+
blur: {
|
|
425
|
+
sm: "blur(4px)",
|
|
426
|
+
md: "blur(8px)",
|
|
427
|
+
lg: "blur(16px)",
|
|
428
|
+
xl: "blur(24px)"
|
|
429
|
+
},
|
|
430
|
+
shadow: {
|
|
431
|
+
sm: "0 1px 2px 0 rgba(0, 0, 0, 0.3)",
|
|
432
|
+
md: "0 4px 6px -1px rgba(0, 0, 0, 0.5)",
|
|
433
|
+
lg: "0 10px 15px -3px rgba(0, 0, 0, 0.6)",
|
|
434
|
+
xl: "0 20px 25px -5px rgba(0, 0, 0, 0.7)",
|
|
435
|
+
"2xl": "0 25px 50px -12px rgba(0, 0, 0, 0.8)"
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
/**
|
|
440
|
+
* Motion personality for Studio theme
|
|
441
|
+
*/
|
|
442
|
+
motion: {
|
|
443
|
+
// Duration scales based on motion slider (0-10)
|
|
444
|
+
getDuration: (intensity) => {
|
|
445
|
+
if (intensity === 0) return "0ms";
|
|
446
|
+
const ms = 150 + (intensity - 1) * 40;
|
|
447
|
+
return `${ms}ms`;
|
|
448
|
+
},
|
|
449
|
+
// Easing curves - smooth and professional
|
|
450
|
+
ease: {
|
|
451
|
+
default: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
452
|
+
// ease-in-out
|
|
453
|
+
in: "cubic-bezier(0.4, 0, 1, 1)",
|
|
454
|
+
out: "cubic-bezier(0, 0, 0.2, 1)",
|
|
455
|
+
spring: "cubic-bezier(0.16, 1, 0.3, 1)"
|
|
456
|
+
// Smooth spring
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
/**
|
|
460
|
+
* Typography for Studio theme
|
|
461
|
+
*/
|
|
462
|
+
typography: {
|
|
463
|
+
heading: {
|
|
464
|
+
fontFamily: "var(--font-geist-sans)",
|
|
465
|
+
fontWeight: "600",
|
|
466
|
+
letterSpacing: "-0.02em"
|
|
467
|
+
},
|
|
468
|
+
body: {
|
|
469
|
+
fontFamily: "var(--font-geist-sans)",
|
|
470
|
+
fontWeight: "400",
|
|
471
|
+
letterSpacing: "0"
|
|
472
|
+
},
|
|
473
|
+
mono: {
|
|
474
|
+
fontFamily: "var(--font-geist-mono)",
|
|
475
|
+
fontWeight: "400",
|
|
476
|
+
letterSpacing: "0"
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
// ../tokens/src/sage.ts
|
|
482
|
+
var sageTokens = {
|
|
483
|
+
light: {
|
|
484
|
+
colors: {
|
|
485
|
+
// Warm, earthy backgrounds
|
|
486
|
+
background: "#faf8f5",
|
|
487
|
+
backgroundSecondary: "#f5f1eb",
|
|
488
|
+
backgroundTertiary: "#ede8e0",
|
|
489
|
+
// Warm neutrals for text
|
|
490
|
+
foreground: "#2d2823",
|
|
491
|
+
foregroundSecondary: "#5a524a",
|
|
492
|
+
foregroundTertiary: "#8a7f72",
|
|
493
|
+
// Muted sage green as primary
|
|
494
|
+
primary: "#7a9b7f",
|
|
495
|
+
primaryForeground: "#faf8f5",
|
|
496
|
+
primaryHover: "#6a8b6f",
|
|
497
|
+
// Secondary - warm stone
|
|
498
|
+
secondary: "#ede8e0",
|
|
499
|
+
secondaryForeground: "#2d2823",
|
|
500
|
+
// Warm terracotta accent
|
|
501
|
+
accent: "#c17a5f",
|
|
502
|
+
accentForeground: "#faf8f5",
|
|
503
|
+
accentHover: "#b16a4f",
|
|
504
|
+
// Semantic colors with muted, organic tones
|
|
505
|
+
success: "#6b8e6f",
|
|
506
|
+
successForeground: "#faf8f5",
|
|
507
|
+
warning: "#d4a574",
|
|
508
|
+
warningForeground: "#2d2823",
|
|
509
|
+
error: "#c17a5f",
|
|
510
|
+
errorForeground: "#faf8f5",
|
|
511
|
+
info: "#8b9dc3",
|
|
512
|
+
infoForeground: "#faf8f5",
|
|
513
|
+
// Borders - warm subtle
|
|
514
|
+
border: "#e0d8cf",
|
|
515
|
+
borderSubtle: "#ede8e0",
|
|
516
|
+
// States
|
|
517
|
+
hover: "#f5f1eb",
|
|
518
|
+
active: "#ede8e0",
|
|
519
|
+
// Link hover states - Muted sage green
|
|
520
|
+
linkHover: "#7a9b7f",
|
|
521
|
+
linkHoverForeground: "#faf8f5",
|
|
522
|
+
// Soft glass effects
|
|
523
|
+
glass: "rgba(250, 248, 245, 0.85)",
|
|
524
|
+
glassBorder: "rgba(122, 155, 127, 0.15)"
|
|
525
|
+
},
|
|
526
|
+
effects: {
|
|
527
|
+
blur: {
|
|
528
|
+
sm: "blur(6px)",
|
|
529
|
+
md: "blur(12px)",
|
|
530
|
+
lg: "blur(20px)",
|
|
531
|
+
xl: "blur(32px)"
|
|
532
|
+
},
|
|
533
|
+
shadow: {
|
|
534
|
+
sm: "0 2px 4px 0 rgba(45, 40, 35, 0.06)",
|
|
535
|
+
md: "0 4px 8px -2px rgba(45, 40, 35, 0.08)",
|
|
536
|
+
lg: "0 8px 16px -4px rgba(45, 40, 35, 0.12)",
|
|
537
|
+
xl: "0 16px 32px -8px rgba(45, 40, 35, 0.16)",
|
|
538
|
+
"2xl": "0 24px 48px -12px rgba(45, 40, 35, 0.20)"
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
},
|
|
542
|
+
dark: {
|
|
543
|
+
colors: {
|
|
544
|
+
// Deep forest backgrounds
|
|
545
|
+
background: "#1a1614",
|
|
546
|
+
backgroundSecondary: "#252220",
|
|
547
|
+
backgroundTertiary: "#2f2b28",
|
|
548
|
+
// Warm light text
|
|
549
|
+
foreground: "#f5f1eb",
|
|
550
|
+
foregroundSecondary: "#c7bfb5",
|
|
551
|
+
foregroundTertiary: "#8a7f72",
|
|
552
|
+
// Brighter sage for dark mode
|
|
553
|
+
primary: "#a8c5ad",
|
|
554
|
+
primaryForeground: "#1a1614",
|
|
555
|
+
primaryHover: "#b8d5bd",
|
|
556
|
+
// Secondary - lighter warm stone
|
|
557
|
+
secondary: "#2f2b28",
|
|
558
|
+
secondaryForeground: "#f5f1eb",
|
|
559
|
+
// Warm peachy accent for dark
|
|
560
|
+
accent: "#e5a78a",
|
|
561
|
+
accentForeground: "#1a1614",
|
|
562
|
+
accentHover: "#f5b79a",
|
|
563
|
+
// Semantic colors adjusted for dark
|
|
564
|
+
success: "#95b89a",
|
|
565
|
+
successForeground: "#1a1614",
|
|
566
|
+
warning: "#e5c59a",
|
|
567
|
+
warningForeground: "#1a1614",
|
|
568
|
+
error: "#e5a78a",
|
|
569
|
+
errorForeground: "#1a1614",
|
|
570
|
+
info: "#a8b5d5",
|
|
571
|
+
infoForeground: "#1a1614",
|
|
572
|
+
// Borders
|
|
573
|
+
border: "#3a3530",
|
|
574
|
+
borderSubtle: "#2f2b28",
|
|
575
|
+
// States
|
|
576
|
+
hover: "#252220",
|
|
577
|
+
active: "#2f2b28",
|
|
578
|
+
// Link hover states - Brighter sage for dark mode
|
|
579
|
+
linkHover: "#a8c5ad",
|
|
580
|
+
linkHoverForeground: "#1a1614",
|
|
581
|
+
// Dark glass effects
|
|
582
|
+
glass: "rgba(26, 22, 20, 0.85)",
|
|
583
|
+
glassBorder: "rgba(168, 197, 173, 0.2)"
|
|
584
|
+
},
|
|
585
|
+
effects: {
|
|
586
|
+
blur: {
|
|
587
|
+
sm: "blur(6px)",
|
|
588
|
+
md: "blur(12px)",
|
|
589
|
+
lg: "blur(20px)",
|
|
590
|
+
xl: "blur(32px)"
|
|
591
|
+
},
|
|
592
|
+
shadow: {
|
|
593
|
+
sm: "0 2px 4px 0 rgba(0, 0, 0, 0.3)",
|
|
594
|
+
md: "0 4px 8px -2px rgba(0, 0, 0, 0.4)",
|
|
595
|
+
lg: "0 8px 16px -4px rgba(0, 0, 0, 0.5)",
|
|
596
|
+
xl: "0 16px 32px -8px rgba(0, 0, 0, 0.6)",
|
|
597
|
+
"2xl": "0 24px 48px -12px rgba(0, 0, 0, 0.7)"
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
},
|
|
601
|
+
motion: {
|
|
602
|
+
getDuration: (intensity) => {
|
|
603
|
+
if (intensity === 0) return "0ms";
|
|
604
|
+
const ms = 300 + (intensity - 1) * 60;
|
|
605
|
+
return `${ms}ms`;
|
|
606
|
+
},
|
|
607
|
+
ease: {
|
|
608
|
+
default: "cubic-bezier(0.33, 1, 0.68, 1)",
|
|
609
|
+
// Organic, flowing
|
|
610
|
+
in: "cubic-bezier(0.4, 0, 1, 1)",
|
|
611
|
+
out: "cubic-bezier(0, 0, 0.2, 1)",
|
|
612
|
+
spring: "cubic-bezier(0.16, 1, 0.3, 1)"
|
|
613
|
+
}
|
|
614
|
+
},
|
|
615
|
+
interactions: {
|
|
616
|
+
hover: {
|
|
617
|
+
overlayColor: "var(--color-interaction-overlay)",
|
|
618
|
+
opacity: "var(--opacity-interaction-hover)"
|
|
619
|
+
},
|
|
620
|
+
active: {
|
|
621
|
+
scale: "var(--scale-interaction-active)"
|
|
622
|
+
},
|
|
623
|
+
focus: {
|
|
624
|
+
ringColor: "var(--color-interaction-focus-ring)",
|
|
625
|
+
ringWidth: "var(--width-interaction-focus-ring)",
|
|
626
|
+
ringOffset: "var(--width-interaction-focus-offset)"
|
|
627
|
+
},
|
|
628
|
+
disabled: {
|
|
629
|
+
opacity: "var(--opacity-interaction-disabled)"
|
|
630
|
+
}
|
|
631
|
+
},
|
|
632
|
+
typography: {
|
|
633
|
+
heading: {
|
|
634
|
+
fontFamily: "var(--font-sage-serif)",
|
|
635
|
+
// Lora serif
|
|
636
|
+
fontWeight: "600",
|
|
637
|
+
letterSpacing: "-0.01em"
|
|
638
|
+
},
|
|
639
|
+
body: {
|
|
640
|
+
fontFamily: "var(--font-sage-sans)",
|
|
641
|
+
// Instrument Sans
|
|
642
|
+
fontWeight: "400",
|
|
643
|
+
letterSpacing: "0"
|
|
644
|
+
},
|
|
645
|
+
mono: {
|
|
646
|
+
fontFamily: "var(--font-sage-mono)",
|
|
647
|
+
fontWeight: "400",
|
|
648
|
+
letterSpacing: "0"
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
};
|
|
652
|
+
|
|
653
|
+
// ../tokens/src/volt.ts
|
|
654
|
+
var voltTokens = {
|
|
655
|
+
light: {
|
|
656
|
+
colors: {
|
|
657
|
+
// Bright, punchy backgrounds
|
|
658
|
+
background: "#ffffff",
|
|
659
|
+
backgroundSecondary: "#f8f9fb",
|
|
660
|
+
backgroundTertiary: "#f0f2f5",
|
|
661
|
+
// Sharp contrast text
|
|
662
|
+
foreground: "#0a0a0a",
|
|
663
|
+
foregroundSecondary: "#4a4a4a",
|
|
664
|
+
foregroundTertiary: "#8a8a8a",
|
|
665
|
+
// Electric blue primary (WCAG AA compliant)
|
|
666
|
+
primary: "#0066ff",
|
|
667
|
+
primaryForeground: "#ffffff",
|
|
668
|
+
primaryHover: "#0052cc",
|
|
669
|
+
// Secondary - cool gray
|
|
670
|
+
secondary: "#f0f2f5",
|
|
671
|
+
secondaryForeground: "#0a0a0a",
|
|
672
|
+
// Vibrant cyan accent
|
|
673
|
+
accent: "#00d9ff",
|
|
674
|
+
accentForeground: "#0a0a0a",
|
|
675
|
+
accentHover: "#00c3e6",
|
|
676
|
+
// Bold semantic colors
|
|
677
|
+
success: "#00cc66",
|
|
678
|
+
successForeground: "#ffffff",
|
|
679
|
+
warning: "#ffaa00",
|
|
680
|
+
warningForeground: "#0a0a0a",
|
|
681
|
+
error: "#ff3366",
|
|
682
|
+
errorForeground: "#ffffff",
|
|
683
|
+
info: "#3399ff",
|
|
684
|
+
infoForeground: "#ffffff",
|
|
685
|
+
// Borders
|
|
686
|
+
border: "#e0e4ea",
|
|
687
|
+
borderSubtle: "#f0f2f5",
|
|
688
|
+
// States
|
|
689
|
+
hover: "#f8f9fb",
|
|
690
|
+
active: "#f0f2f5",
|
|
691
|
+
// Link hover states - Electric blue with high contrast
|
|
692
|
+
linkHover: "#0066ff",
|
|
693
|
+
linkHoverForeground: "#ffffff",
|
|
694
|
+
// Crisp glass effects
|
|
695
|
+
glass: "rgba(255, 255, 255, 0.8)",
|
|
696
|
+
glassBorder: "rgba(0, 102, 255, 0.2)"
|
|
697
|
+
},
|
|
698
|
+
effects: {
|
|
699
|
+
blur: {
|
|
700
|
+
sm: "blur(8px)",
|
|
701
|
+
md: "blur(16px)",
|
|
702
|
+
lg: "blur(32px)",
|
|
703
|
+
xl: "blur(48px)"
|
|
704
|
+
},
|
|
705
|
+
shadow: {
|
|
706
|
+
sm: "0 0 8px rgba(0, 102, 255, 0.15)",
|
|
707
|
+
md: "0 0 16px rgba(0, 102, 255, 0.2)",
|
|
708
|
+
lg: "0 0 24px rgba(0, 102, 255, 0.25)",
|
|
709
|
+
xl: "0 0 32px rgba(0, 102, 255, 0.3)",
|
|
710
|
+
"2xl": "0 0 48px rgba(0, 102, 255, 0.4)"
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
},
|
|
714
|
+
dark: {
|
|
715
|
+
colors: {
|
|
716
|
+
// Pure black cyberpunk background
|
|
717
|
+
background: "#000000",
|
|
718
|
+
backgroundSecondary: "#0a0a0a",
|
|
719
|
+
backgroundTertiary: "#141414",
|
|
720
|
+
// Bright white text
|
|
721
|
+
foreground: "#ffffff",
|
|
722
|
+
foregroundSecondary: "#b3b3b3",
|
|
723
|
+
foregroundTertiary: "#666666",
|
|
724
|
+
// Neon blue primary
|
|
725
|
+
primary: "#0099ff",
|
|
726
|
+
primaryForeground: "#000000",
|
|
727
|
+
primaryHover: "#00aaff",
|
|
728
|
+
// Secondary - dark gray
|
|
729
|
+
secondary: "#141414",
|
|
730
|
+
secondaryForeground: "#ffffff",
|
|
731
|
+
// Neon cyan accent
|
|
732
|
+
accent: "#00ffff",
|
|
733
|
+
accentForeground: "#000000",
|
|
734
|
+
accentHover: "#33ffff",
|
|
735
|
+
// Neon semantic colors
|
|
736
|
+
success: "#00ff99",
|
|
737
|
+
successForeground: "#000000",
|
|
738
|
+
warning: "#ffcc00",
|
|
739
|
+
warningForeground: "#000000",
|
|
740
|
+
error: "#ff0066",
|
|
741
|
+
errorForeground: "#ffffff",
|
|
742
|
+
info: "#66ccff",
|
|
743
|
+
infoForeground: "#000000",
|
|
744
|
+
// Borders
|
|
745
|
+
border: "#1a1a1a",
|
|
746
|
+
borderSubtle: "#141414",
|
|
747
|
+
// States
|
|
748
|
+
hover: "#0a0a0a",
|
|
749
|
+
active: "#141414",
|
|
750
|
+
// Link hover states - Neon cyan (high luma)
|
|
751
|
+
linkHover: "#00ffff",
|
|
752
|
+
linkHoverForeground: "#000000",
|
|
753
|
+
// Dark glass with glow
|
|
754
|
+
glass: "rgba(0, 0, 0, 0.8)",
|
|
755
|
+
glassBorder: "rgba(0, 153, 255, 0.3)"
|
|
756
|
+
},
|
|
757
|
+
effects: {
|
|
758
|
+
blur: {
|
|
759
|
+
sm: "blur(8px)",
|
|
760
|
+
md: "blur(16px)",
|
|
761
|
+
lg: "blur(32px)",
|
|
762
|
+
xl: "blur(48px)"
|
|
763
|
+
},
|
|
764
|
+
shadow: {
|
|
765
|
+
sm: "0 0 12px rgba(0, 153, 255, 0.4)",
|
|
766
|
+
md: "0 0 20px rgba(0, 153, 255, 0.5)",
|
|
767
|
+
lg: "0 0 32px rgba(0, 153, 255, 0.6)",
|
|
768
|
+
xl: "0 0 48px rgba(0, 153, 255, 0.7)",
|
|
769
|
+
"2xl": "0 0 64px rgba(0, 153, 255, 0.8)"
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
},
|
|
773
|
+
motion: {
|
|
774
|
+
getDuration: (intensity) => {
|
|
775
|
+
if (intensity === 0) return "0ms";
|
|
776
|
+
const ms = 100 + (intensity - 1) * 25;
|
|
777
|
+
return `${ms}ms`;
|
|
778
|
+
},
|
|
779
|
+
ease: {
|
|
780
|
+
default: "cubic-bezier(0.16, 1, 0.3, 1)",
|
|
781
|
+
// Snappy spring
|
|
782
|
+
in: "cubic-bezier(0.4, 0, 1, 1)",
|
|
783
|
+
out: "cubic-bezier(0, 0, 0.2, 1)",
|
|
784
|
+
spring: "cubic-bezier(0.68, -0.55, 0.27, 1.55)"
|
|
785
|
+
// Bouncy
|
|
786
|
+
}
|
|
787
|
+
},
|
|
788
|
+
typography: {
|
|
789
|
+
heading: {
|
|
790
|
+
fontFamily: "var(--font-volt-sans)",
|
|
791
|
+
// Space Grotesk
|
|
792
|
+
fontWeight: "700",
|
|
793
|
+
// Bold
|
|
794
|
+
letterSpacing: "-0.03em"
|
|
795
|
+
},
|
|
796
|
+
body: {
|
|
797
|
+
fontFamily: "var(--font-volt-sans)",
|
|
798
|
+
fontWeight: "400",
|
|
799
|
+
letterSpacing: "0"
|
|
800
|
+
},
|
|
801
|
+
mono: {
|
|
802
|
+
fontFamily: "var(--font-volt-mono)",
|
|
803
|
+
// Fira Code
|
|
804
|
+
fontWeight: "400",
|
|
805
|
+
letterSpacing: "0"
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
};
|
|
809
|
+
|
|
810
|
+
// ../tokens/src/typography.ts
|
|
811
|
+
var fontFamilies = {
|
|
812
|
+
studio: {
|
|
813
|
+
heading: "Outfit",
|
|
814
|
+
body: "Manrope",
|
|
815
|
+
mono: "Fira Code",
|
|
816
|
+
description: "Modern geometric sans-serif with clean readability",
|
|
817
|
+
usage: {
|
|
818
|
+
heading: "Headlines, titles, emphasis",
|
|
819
|
+
body: "Paragraphs, UI text, readable content",
|
|
820
|
+
mono: "Code blocks, technical content"
|
|
821
|
+
}
|
|
822
|
+
},
|
|
823
|
+
sage: {
|
|
824
|
+
heading: "Lora",
|
|
825
|
+
// Serif for elegance
|
|
826
|
+
body: "Instrument Sans",
|
|
827
|
+
serif: "Lora",
|
|
828
|
+
// Explicit serif reference
|
|
829
|
+
sans: "Instrument Sans",
|
|
830
|
+
// Explicit sans reference
|
|
831
|
+
mono: "Fira Code",
|
|
832
|
+
description: "Elegant serif headings with modern sans body",
|
|
833
|
+
usage: {
|
|
834
|
+
heading: "Elegant headings, article titles",
|
|
835
|
+
body: "Long-form content, UI text",
|
|
836
|
+
serif: "Pull quotes, emphasis",
|
|
837
|
+
sans: "UI elements, captions",
|
|
838
|
+
mono: "Code blocks, technical content"
|
|
839
|
+
}
|
|
840
|
+
},
|
|
841
|
+
volt: {
|
|
842
|
+
heading: "Space Grotesk",
|
|
843
|
+
body: "Space Grotesk",
|
|
844
|
+
sans: "Space Grotesk",
|
|
845
|
+
mono: "Fira Code",
|
|
846
|
+
description: "Tech-forward, consistent geometric throughout",
|
|
847
|
+
usage: {
|
|
848
|
+
heading: "All headlines",
|
|
849
|
+
body: "All body text (unified typography)",
|
|
850
|
+
sans: "All sans-serif needs",
|
|
851
|
+
mono: "Code blocks, technical content"
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
};
|
|
855
|
+
var fontLoadingConfig = {
|
|
856
|
+
studio: {
|
|
857
|
+
heading: { family: "Outfit", weights: ["300", "400", "500", "600", "700", "800"] },
|
|
858
|
+
body: { family: "Manrope", weights: ["300", "400", "500", "600", "700", "800"] },
|
|
859
|
+
mono: { family: "Fira Code", weights: ["400", "500", "600", "700"] }
|
|
860
|
+
},
|
|
861
|
+
sage: {
|
|
862
|
+
heading: { family: "Lora", weights: ["400", "500", "600", "700"] },
|
|
863
|
+
body: { family: "Instrument Sans", weights: ["400", "500", "600", "700"] },
|
|
864
|
+
mono: { family: "Fira Code", weights: ["400", "500", "600", "700"] }
|
|
865
|
+
},
|
|
866
|
+
volt: {
|
|
867
|
+
heading: { family: "Space Grotesk", weights: ["300", "400", "500", "600", "700"] },
|
|
868
|
+
body: { family: "Space Grotesk", weights: ["300", "400", "500", "600", "700"] },
|
|
869
|
+
mono: { family: "Fira Code", weights: ["400", "500", "600", "700"] }
|
|
870
|
+
}
|
|
871
|
+
};
|
|
872
|
+
var fontSizes = {
|
|
873
|
+
// Body text scale
|
|
874
|
+
xs: { base: "0.75rem", mobile: "0.75rem" },
|
|
875
|
+
// 12px
|
|
876
|
+
sm: { base: "0.875rem", mobile: "0.875rem" },
|
|
877
|
+
// 14px
|
|
878
|
+
base: { base: "1rem", mobile: "1rem" },
|
|
879
|
+
// 16px
|
|
880
|
+
lg: { base: "1.125rem", mobile: "1rem" },
|
|
881
|
+
// 18px / 16px mobile
|
|
882
|
+
xl: { base: "1.25rem", mobile: "1.125rem" },
|
|
883
|
+
// 20px / 18px mobile
|
|
884
|
+
"2xl": { base: "1.5rem", mobile: "1.25rem" },
|
|
885
|
+
// 24px / 20px mobile
|
|
886
|
+
"3xl": { base: "1.875rem", mobile: "1.5rem" },
|
|
887
|
+
// 30px / 24px mobile
|
|
888
|
+
// Heading scale (h6 → h1)
|
|
889
|
+
"4xl": { base: "2.25rem", mobile: "1.875rem" },
|
|
890
|
+
// 36px / 30px - h3
|
|
891
|
+
"5xl": { base: "3rem", mobile: "2.25rem" },
|
|
892
|
+
// 48px / 36px - h2
|
|
893
|
+
"6xl": { base: "3.75rem", mobile: "2.5rem" },
|
|
894
|
+
// 60px / 40px - h1
|
|
895
|
+
"7xl": { base: "4.5rem", mobile: "3rem" },
|
|
896
|
+
// 72px / 48px - Display
|
|
897
|
+
"8xl": { base: "6rem", mobile: "3.75rem" },
|
|
898
|
+
// 96px / 60px - Hero
|
|
899
|
+
"9xl": { base: "8rem", mobile: "4.5rem" }
|
|
900
|
+
// 128px / 72px - Ultra
|
|
901
|
+
};
|
|
902
|
+
var semanticSizes = {
|
|
903
|
+
"heading-1": "hero",
|
|
904
|
+
"heading-2": "5xl",
|
|
905
|
+
"heading-3": "4xl",
|
|
906
|
+
"heading-4": "2xl",
|
|
907
|
+
"heading-5": "xl",
|
|
908
|
+
"heading-6": "lg",
|
|
909
|
+
"body-large": "lg",
|
|
910
|
+
"body": "base",
|
|
911
|
+
"body-small": "sm",
|
|
912
|
+
"caption": "xs"
|
|
913
|
+
};
|
|
914
|
+
var fontWeights = {
|
|
915
|
+
thin: "100",
|
|
916
|
+
extralight: "200",
|
|
917
|
+
light: "300",
|
|
918
|
+
normal: "400",
|
|
919
|
+
medium: "500",
|
|
920
|
+
semibold: "600",
|
|
921
|
+
bold: "700",
|
|
922
|
+
extrabold: "800",
|
|
923
|
+
black: "900"
|
|
924
|
+
};
|
|
925
|
+
var semanticWeights = {
|
|
926
|
+
heading: "bold",
|
|
927
|
+
// Default heading weight
|
|
928
|
+
"heading-light": "semibold",
|
|
929
|
+
"heading-heavy": "extrabold",
|
|
930
|
+
body: "normal",
|
|
931
|
+
// Default body weight
|
|
932
|
+
"body-emphasis": "medium",
|
|
933
|
+
"body-strong": "semibold",
|
|
934
|
+
caption: "normal"
|
|
935
|
+
};
|
|
936
|
+
var lineHeights = {
|
|
937
|
+
none: "1",
|
|
938
|
+
tight: "1.25",
|
|
939
|
+
snug: "1.375",
|
|
940
|
+
normal: "1.5",
|
|
941
|
+
relaxed: "1.625",
|
|
942
|
+
loose: "1.75",
|
|
943
|
+
extraloose: "2"
|
|
944
|
+
};
|
|
945
|
+
var semanticLineHeights = {
|
|
946
|
+
heading: "tight",
|
|
947
|
+
"heading-display": "none",
|
|
948
|
+
// Very tight for large display text
|
|
949
|
+
body: "normal",
|
|
950
|
+
"body-relaxed": "relaxed",
|
|
951
|
+
caption: "snug"
|
|
952
|
+
};
|
|
953
|
+
var letterSpacing = {
|
|
954
|
+
tighter: "-0.05em",
|
|
955
|
+
tight: "-0.025em",
|
|
956
|
+
normal: "0",
|
|
957
|
+
wide: "0.025em",
|
|
958
|
+
wider: "0.05em",
|
|
959
|
+
widest: "0.1em"
|
|
960
|
+
};
|
|
961
|
+
var semanticLetterSpacing = {
|
|
962
|
+
heading: "tight",
|
|
963
|
+
"heading-display": "tighter",
|
|
964
|
+
body: "normal",
|
|
965
|
+
"small-caps": "wider",
|
|
966
|
+
"all-caps": "widest"
|
|
967
|
+
};
|
|
968
|
+
var typePresets = {
|
|
969
|
+
"display-large": {
|
|
970
|
+
size: fontSizes["8xl"],
|
|
971
|
+
weight: fontWeights.bold,
|
|
972
|
+
lineHeight: lineHeights.none,
|
|
973
|
+
letterSpacing: letterSpacing.tighter,
|
|
974
|
+
description: "Large hero text, landing pages"
|
|
975
|
+
},
|
|
976
|
+
"display": {
|
|
977
|
+
size: fontSizes["7xl"],
|
|
978
|
+
weight: fontWeights.bold,
|
|
979
|
+
lineHeight: lineHeights.tight,
|
|
980
|
+
letterSpacing: letterSpacing.tight,
|
|
981
|
+
description: "Hero sections, major headings"
|
|
982
|
+
},
|
|
983
|
+
"heading-1": {
|
|
984
|
+
size: fontSizes["6xl"],
|
|
985
|
+
weight: fontWeights.bold,
|
|
986
|
+
lineHeight: lineHeights.tight,
|
|
987
|
+
letterSpacing: letterSpacing.tight,
|
|
988
|
+
description: "Page titles, h1"
|
|
989
|
+
},
|
|
990
|
+
"heading-2": {
|
|
991
|
+
size: fontSizes["5xl"],
|
|
992
|
+
weight: fontWeights.bold,
|
|
993
|
+
lineHeight: lineHeights.tight,
|
|
994
|
+
letterSpacing: letterSpacing.normal,
|
|
995
|
+
description: "Section titles, h2"
|
|
996
|
+
},
|
|
997
|
+
"heading-3": {
|
|
998
|
+
size: fontSizes["4xl"],
|
|
999
|
+
weight: fontWeights.semibold,
|
|
1000
|
+
lineHeight: lineHeights.snug,
|
|
1001
|
+
letterSpacing: letterSpacing.normal,
|
|
1002
|
+
description: "Subsection titles, h3"
|
|
1003
|
+
},
|
|
1004
|
+
"heading-4": {
|
|
1005
|
+
size: fontSizes["2xl"],
|
|
1006
|
+
weight: fontWeights.semibold,
|
|
1007
|
+
lineHeight: lineHeights.snug,
|
|
1008
|
+
letterSpacing: letterSpacing.normal,
|
|
1009
|
+
description: "Component titles, h4"
|
|
1010
|
+
},
|
|
1011
|
+
"heading-5": {
|
|
1012
|
+
size: fontSizes.xl,
|
|
1013
|
+
weight: fontWeights.medium,
|
|
1014
|
+
lineHeight: lineHeights.normal,
|
|
1015
|
+
letterSpacing: letterSpacing.normal,
|
|
1016
|
+
description: "Small headings, h5"
|
|
1017
|
+
},
|
|
1018
|
+
"heading-6": {
|
|
1019
|
+
size: fontSizes.lg,
|
|
1020
|
+
weight: fontWeights.medium,
|
|
1021
|
+
lineHeight: lineHeights.normal,
|
|
1022
|
+
letterSpacing: letterSpacing.normal,
|
|
1023
|
+
description: "Tiny headings, h6"
|
|
1024
|
+
},
|
|
1025
|
+
"body-large": {
|
|
1026
|
+
size: fontSizes.lg,
|
|
1027
|
+
weight: fontWeights.normal,
|
|
1028
|
+
lineHeight: lineHeights.relaxed,
|
|
1029
|
+
letterSpacing: letterSpacing.normal,
|
|
1030
|
+
description: "Lead paragraphs, intro text"
|
|
1031
|
+
},
|
|
1032
|
+
"body": {
|
|
1033
|
+
size: fontSizes.base,
|
|
1034
|
+
weight: fontWeights.normal,
|
|
1035
|
+
lineHeight: lineHeights.normal,
|
|
1036
|
+
letterSpacing: letterSpacing.normal,
|
|
1037
|
+
description: "Default body text"
|
|
1038
|
+
},
|
|
1039
|
+
"body-small": {
|
|
1040
|
+
size: fontSizes.sm,
|
|
1041
|
+
weight: fontWeights.normal,
|
|
1042
|
+
lineHeight: lineHeights.normal,
|
|
1043
|
+
letterSpacing: letterSpacing.normal,
|
|
1044
|
+
description: "Small body text, fine print"
|
|
1045
|
+
},
|
|
1046
|
+
"caption": {
|
|
1047
|
+
size: fontSizes.xs,
|
|
1048
|
+
weight: fontWeights.normal,
|
|
1049
|
+
lineHeight: lineHeights.snug,
|
|
1050
|
+
letterSpacing: letterSpacing.wide,
|
|
1051
|
+
description: "Captions, labels, metadata"
|
|
1052
|
+
},
|
|
1053
|
+
"overline": {
|
|
1054
|
+
size: fontSizes.xs,
|
|
1055
|
+
weight: fontWeights.semibold,
|
|
1056
|
+
lineHeight: lineHeights.normal,
|
|
1057
|
+
letterSpacing: letterSpacing.widest,
|
|
1058
|
+
description: "Eyebrows, categories, all-caps labels"
|
|
1059
|
+
}
|
|
1060
|
+
};
|
|
1061
|
+
function getFontVariable(theme, type) {
|
|
1062
|
+
return `--font-${theme}-${type}`;
|
|
1063
|
+
}
|
|
1064
|
+
function getThemeFontVariables(theme) {
|
|
1065
|
+
const fonts = fontFamilies[theme];
|
|
1066
|
+
const vars = {};
|
|
1067
|
+
Object.entries(fonts).forEach(([key, value]) => {
|
|
1068
|
+
if (typeof value === "string") {
|
|
1069
|
+
vars[`--font-${theme}-${key}`] = value;
|
|
1070
|
+
}
|
|
1071
|
+
});
|
|
1072
|
+
return vars;
|
|
1073
|
+
}
|
|
1074
|
+
function getResponsiveFontSize(sizeKey) {
|
|
1075
|
+
const size = fontSizes[sizeKey];
|
|
1076
|
+
return `font-size: ${size.mobile}; @media (min-width: 768px) { font-size: ${size.base}; }`;
|
|
1077
|
+
}
|
|
1078
|
+
var typographySystem = {
|
|
1079
|
+
families: fontFamilies,
|
|
1080
|
+
sizes: fontSizes,
|
|
1081
|
+
weights: fontWeights,
|
|
1082
|
+
lineHeights,
|
|
1083
|
+
letterSpacing,
|
|
1084
|
+
presets: typePresets,
|
|
1085
|
+
semantic: {
|
|
1086
|
+
sizes: semanticSizes,
|
|
1087
|
+
weights: semanticWeights,
|
|
1088
|
+
lineHeights: semanticLineHeights,
|
|
1089
|
+
letterSpacing: semanticLetterSpacing
|
|
1090
|
+
},
|
|
1091
|
+
utils: {
|
|
1092
|
+
getFontVariable,
|
|
1093
|
+
getThemeFontVariables,
|
|
1094
|
+
getResponsiveFontSize
|
|
1095
|
+
}
|
|
1096
|
+
};
|
|
1097
|
+
|
|
1098
|
+
// ../tokens/src/syntax.ts
|
|
1099
|
+
var syntaxColors = {
|
|
1100
|
+
light: {
|
|
1101
|
+
comment: "#22863a",
|
|
1102
|
+
// Green for comments
|
|
1103
|
+
keyword: "#8250df",
|
|
1104
|
+
// Purple for keywords (import, export, const, etc.)
|
|
1105
|
+
function: "#6639ba",
|
|
1106
|
+
// Purple for function names
|
|
1107
|
+
string: "#c1592a",
|
|
1108
|
+
// Orange for strings
|
|
1109
|
+
number: "#0a3069",
|
|
1110
|
+
// Blue for numbers
|
|
1111
|
+
boolean: "#0550ae",
|
|
1112
|
+
// Blue for booleans
|
|
1113
|
+
operator: "#1a1a1a",
|
|
1114
|
+
// Almost black for operators
|
|
1115
|
+
property: "#0550ae",
|
|
1116
|
+
// Blue for properties
|
|
1117
|
+
className: "#005cc5",
|
|
1118
|
+
// Blue for class names
|
|
1119
|
+
tag: "#005cc5",
|
|
1120
|
+
// Blue for HTML/JSX tags
|
|
1121
|
+
attribute: "#0550ae",
|
|
1122
|
+
// Blue for attributes
|
|
1123
|
+
variable: "#0550ae",
|
|
1124
|
+
// Blue for variables
|
|
1125
|
+
punctuation: "#57606a",
|
|
1126
|
+
// Gray for punctuation
|
|
1127
|
+
plain: "#1a1a1a"
|
|
1128
|
+
// Default text color
|
|
1129
|
+
},
|
|
1130
|
+
dark: {
|
|
1131
|
+
comment: "#6A9955",
|
|
1132
|
+
// Green for comments
|
|
1133
|
+
keyword: "#C586C0",
|
|
1134
|
+
// Purple for keywords (import, export, const, etc.)
|
|
1135
|
+
function: "#DCDCAA",
|
|
1136
|
+
// Yellow for function names
|
|
1137
|
+
string: "#CE9178",
|
|
1138
|
+
// Orange for strings
|
|
1139
|
+
number: "#B5CEA8",
|
|
1140
|
+
// Light green for numbers
|
|
1141
|
+
boolean: "#569CD6",
|
|
1142
|
+
// Blue for booleans
|
|
1143
|
+
operator: "#D4D4D4",
|
|
1144
|
+
// Light gray for operators
|
|
1145
|
+
property: "#9CDCFE",
|
|
1146
|
+
// Light blue for properties
|
|
1147
|
+
className: "#4EC9B0",
|
|
1148
|
+
// Cyan for class names
|
|
1149
|
+
tag: "#4EC9B0",
|
|
1150
|
+
// Cyan for HTML/JSX tags
|
|
1151
|
+
attribute: "#9CDCFE",
|
|
1152
|
+
// Light blue for attributes
|
|
1153
|
+
variable: "#9CDCFE",
|
|
1154
|
+
// Light blue for variables
|
|
1155
|
+
punctuation: "#808080",
|
|
1156
|
+
// Gray for punctuation
|
|
1157
|
+
plain: "#D4D4D4"
|
|
1158
|
+
// Default text color
|
|
1159
|
+
}
|
|
1160
|
+
};
|
|
1161
|
+
var codeColors = {
|
|
1162
|
+
light: {
|
|
1163
|
+
// Block code background - cool gray for subtle distinction
|
|
1164
|
+
blockBackground: "#F8F9FA",
|
|
1165
|
+
// Inline code background - pale amber for warmth and visibility
|
|
1166
|
+
inlineBackground: "#FEF3E7",
|
|
1167
|
+
// Border color for definition and separation
|
|
1168
|
+
border: "#E1E4E8"
|
|
1169
|
+
},
|
|
1170
|
+
dark: {
|
|
1171
|
+
// Block code background - VS Code-inspired dark background
|
|
1172
|
+
blockBackground: "#1E1E1E",
|
|
1173
|
+
// Inline code background - slightly lighter for contrast
|
|
1174
|
+
inlineBackground: "#252525",
|
|
1175
|
+
// Border color for definition
|
|
1176
|
+
border: "#3D3D3D"
|
|
1177
|
+
}
|
|
1178
|
+
};
|
|
1179
|
+
|
|
1180
|
+
// ../tokens/src/color-palettes.ts
|
|
1181
|
+
var colorPalettes = [
|
|
1182
|
+
// === PROFESSIONAL ===
|
|
1183
|
+
{
|
|
1184
|
+
id: "deep-trust",
|
|
1185
|
+
name: "Deep Trust",
|
|
1186
|
+
description: "Confident navy with subtle warmth",
|
|
1187
|
+
category: "professional",
|
|
1188
|
+
primary: "#1e3a5f",
|
|
1189
|
+
secondary: "#64748b",
|
|
1190
|
+
accent: "#f59e0b",
|
|
1191
|
+
harmony: "Split-Complementary",
|
|
1192
|
+
bestFor: ["Finance", "Legal", "Enterprise SaaS"],
|
|
1193
|
+
rationale: "Navy (trust, authority) paired with Slate (neutral utility) and Amber (approachable warmth). The amber accent draws attention to CTAs without disrupting professional gravitas. High contrast ratios ensure accessibility.",
|
|
1194
|
+
wcagAA: true,
|
|
1195
|
+
wcagAAA: true
|
|
1196
|
+
},
|
|
1197
|
+
{
|
|
1198
|
+
id: "graphite-precision",
|
|
1199
|
+
name: "Graphite Precision",
|
|
1200
|
+
description: "Modern technical authority",
|
|
1201
|
+
category: "professional",
|
|
1202
|
+
primary: "#0f172a",
|
|
1203
|
+
secondary: "#475569",
|
|
1204
|
+
accent: "#0ea5e9",
|
|
1205
|
+
harmony: "Analogous + Accent",
|
|
1206
|
+
bestFor: ["Dev Tools", "Analytics", "SaaS Dashboards"],
|
|
1207
|
+
rationale: "Near-black primary (Slate 900) conveys technical sophistication. Steel secondary provides UI structure. Sky blue accent pops for interactive elements. Inspired by developer tools like VS Code and GitHub.",
|
|
1208
|
+
wcagAA: true,
|
|
1209
|
+
wcagAAA: false
|
|
1210
|
+
},
|
|
1211
|
+
{
|
|
1212
|
+
id: "obsidian-gold",
|
|
1213
|
+
name: "Obsidian Gold",
|
|
1214
|
+
description: "Premium high-end authority",
|
|
1215
|
+
category: "professional",
|
|
1216
|
+
primary: "#09090b",
|
|
1217
|
+
secondary: "#3f3f46",
|
|
1218
|
+
accent: "#ca8a04",
|
|
1219
|
+
harmony: "Complementary",
|
|
1220
|
+
bestFor: ["Luxury Tech", "Premium Services", "High-End Products"],
|
|
1221
|
+
rationale: "Zinc 950 primary delivers true premium feel without harsh black. Zinc 700 secondary creates layered depth for cards and containers. Yellow-700 gold accent signals exclusivity and value.",
|
|
1222
|
+
wcagAA: true,
|
|
1223
|
+
wcagAAA: true
|
|
1224
|
+
},
|
|
1225
|
+
{
|
|
1226
|
+
id: "slate-ember",
|
|
1227
|
+
name: "Slate Ember",
|
|
1228
|
+
description: "Warm corporate modernism",
|
|
1229
|
+
category: "professional",
|
|
1230
|
+
primary: "#334155",
|
|
1231
|
+
secondary: "#94a3b8",
|
|
1232
|
+
accent: "#ea580c",
|
|
1233
|
+
harmony: "Complementary",
|
|
1234
|
+
bestFor: ["Consulting", "B2B Services", "Corporate Sites"],
|
|
1235
|
+
rationale: "Slate 700 primary feels mature yet approachable. Slate 400 secondary lightens UI without losing professionalism. Orange 600 accent energizes without overwhelming\u2014perfect for subtle call-to-action emphasis.",
|
|
1236
|
+
wcagAA: true,
|
|
1237
|
+
wcagAAA: true
|
|
1238
|
+
},
|
|
1239
|
+
// === CREATIVE ===
|
|
1240
|
+
{
|
|
1241
|
+
id: "sunset-gradient",
|
|
1242
|
+
name: "Sunset Gradient",
|
|
1243
|
+
description: "Warm analogous energy flow",
|
|
1244
|
+
category: "creative",
|
|
1245
|
+
primary: "#db2777",
|
|
1246
|
+
secondary: "#f97316",
|
|
1247
|
+
accent: "#fbbf24",
|
|
1248
|
+
harmony: "Analogous",
|
|
1249
|
+
bestFor: ["Design Agencies", "Portfolios", "Creative Studios"],
|
|
1250
|
+
rationale: "Pink 600 \u2192 Orange 500 \u2192 Amber 400 creates natural warmth progression mimicking golden hour. This analogous flow feels cohesive yet dynamic. Works beautifully with white backgrounds and dark text.",
|
|
1251
|
+
wcagAA: true,
|
|
1252
|
+
wcagAAA: false
|
|
1253
|
+
},
|
|
1254
|
+
{
|
|
1255
|
+
id: "electric-violet",
|
|
1256
|
+
name: "Electric Violet",
|
|
1257
|
+
description: "Bold complementary punch",
|
|
1258
|
+
category: "creative",
|
|
1259
|
+
primary: "#7c3aed",
|
|
1260
|
+
secondary: "#be185d",
|
|
1261
|
+
accent: "#fb923c",
|
|
1262
|
+
harmony: "Triadic",
|
|
1263
|
+
bestFor: ["Entertainment", "Events", "Music", "Gaming"],
|
|
1264
|
+
rationale: "Violet 600, Rose 700, and Orange 400 form a dynamic triadic harmony. Each color is equidistant on the wheel, creating maximum visual interest while maintaining balance. Use violet as dominant, rose for sections, orange for CTAs.",
|
|
1265
|
+
wcagAA: true,
|
|
1266
|
+
wcagAAA: false
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
id: "indigo-bloom",
|
|
1270
|
+
name: "Indigo Bloom",
|
|
1271
|
+
description: "Sophisticated feminine power",
|
|
1272
|
+
category: "creative",
|
|
1273
|
+
primary: "#4338ca",
|
|
1274
|
+
secondary: "#be123c",
|
|
1275
|
+
accent: "#d946ef",
|
|
1276
|
+
harmony: "Split-Complementary",
|
|
1277
|
+
bestFor: ["Beauty", "Fashion Tech", "Lifestyle Apps"],
|
|
1278
|
+
rationale: "Indigo 700 anchors with depth and sophistication. Rose 700 provides rich contrast. Fuchsia 500 accent sparkles for highlights and interactions. The palette balances strength with approachability.",
|
|
1279
|
+
wcagAA: true,
|
|
1280
|
+
wcagAAA: true
|
|
1281
|
+
},
|
|
1282
|
+
{
|
|
1283
|
+
id: "coral-reef",
|
|
1284
|
+
name: "Coral Reef",
|
|
1285
|
+
description: "Playful warmth with depth",
|
|
1286
|
+
category: "creative",
|
|
1287
|
+
primary: "#f43f5e",
|
|
1288
|
+
secondary: "#06b6d4",
|
|
1289
|
+
accent: "#fcd34d",
|
|
1290
|
+
harmony: "Triadic",
|
|
1291
|
+
bestFor: ["Social Apps", "Community Platforms", "Lifestyle"],
|
|
1292
|
+
rationale: "Rose 500 (coral), Cyan 500 (ocean), and Amber 300 (sand) evoke tropical vibrancy. This triadic scheme feels energetic yet grounded. Great for apps targeting younger, socially-engaged audiences.",
|
|
1293
|
+
wcagAA: true,
|
|
1294
|
+
wcagAAA: false
|
|
1295
|
+
},
|
|
1296
|
+
// === NATURE ===
|
|
1297
|
+
{
|
|
1298
|
+
id: "forest-floor",
|
|
1299
|
+
name: "Forest Floor",
|
|
1300
|
+
description: "Deep organic earthiness",
|
|
1301
|
+
category: "nature",
|
|
1302
|
+
primary: "#14532d",
|
|
1303
|
+
secondary: "#78350f",
|
|
1304
|
+
accent: "#84cc16",
|
|
1305
|
+
harmony: "Analogous + Accent",
|
|
1306
|
+
bestFor: ["Sustainability", "Wellness", "Organic Products"],
|
|
1307
|
+
rationale: "Green 900 (deep forest) and Amber 900 (rich earth/bark) create grounded warmth. Lime 500 accent represents new growth and vitality. This palette speaks to environmental consciousness and natural authenticity.",
|
|
1308
|
+
wcagAA: true,
|
|
1309
|
+
wcagAAA: true
|
|
1310
|
+
},
|
|
1311
|
+
{
|
|
1312
|
+
id: "ocean-calm",
|
|
1313
|
+
name: "Ocean Calm",
|
|
1314
|
+
description: "Tranquil aquatic serenity",
|
|
1315
|
+
category: "nature",
|
|
1316
|
+
primary: "#0f766e",
|
|
1317
|
+
secondary: "#0284c7",
|
|
1318
|
+
accent: "#22d3ee",
|
|
1319
|
+
harmony: "Analogous",
|
|
1320
|
+
bestFor: ["Healthcare", "Meditation", "Clean Tech"],
|
|
1321
|
+
rationale: "Teal 700, Sky 600, and Cyan 400 form a calming blue-green progression. Mimics depth variations in water. Low emotional intensity promotes trust and calm\u2014ideal for wellness and health applications.",
|
|
1322
|
+
wcagAA: true,
|
|
1323
|
+
wcagAAA: false
|
|
1324
|
+
},
|
|
1325
|
+
{
|
|
1326
|
+
id: "sage-garden",
|
|
1327
|
+
name: "Sage Garden",
|
|
1328
|
+
description: "Botanical mindfulness",
|
|
1329
|
+
category: "nature",
|
|
1330
|
+
primary: "#6366f1",
|
|
1331
|
+
secondary: "#059669",
|
|
1332
|
+
accent: "#fef08a",
|
|
1333
|
+
harmony: "Triadic",
|
|
1334
|
+
bestFor: ["Meditation Apps", "Spa", "Personal Growth"],
|
|
1335
|
+
rationale: "Indigo 500 (lavender energy), Emerald 600 (sage calm), Yellow 200 (morning light). Named colors match actual botanicals. Soft yellow accent provides gentle illumination for key interactions.",
|
|
1336
|
+
wcagAA: true,
|
|
1337
|
+
wcagAAA: false
|
|
1338
|
+
},
|
|
1339
|
+
{
|
|
1340
|
+
id: "desert-dawn",
|
|
1341
|
+
name: "Desert Dawn",
|
|
1342
|
+
description: "Warm arid minimalism",
|
|
1343
|
+
category: "nature",
|
|
1344
|
+
primary: "#d6d3d1",
|
|
1345
|
+
secondary: "#a8a29e",
|
|
1346
|
+
accent: "#c2410c",
|
|
1347
|
+
harmony: "Monochromatic + Accent",
|
|
1348
|
+
bestFor: ["Architecture", "Interior Design", "Artisan Goods"],
|
|
1349
|
+
rationale: "Stone 300 and Stone 400 create subtle warmth typical of desert sands. Orange 700 accent recalls desert flora and sunset. Minimalist yet rich\u2014perfect for showcasing products and photography.",
|
|
1350
|
+
wcagAA: false,
|
|
1351
|
+
wcagAAA: false
|
|
1352
|
+
},
|
|
1353
|
+
// === VIBRANT ===
|
|
1354
|
+
{
|
|
1355
|
+
id: "neon-signal",
|
|
1356
|
+
name: "Neon Signal",
|
|
1357
|
+
description: "High-energy cyberpunk electric",
|
|
1358
|
+
category: "vibrant",
|
|
1359
|
+
primary: "#06b6d4",
|
|
1360
|
+
secondary: "#d946ef",
|
|
1361
|
+
accent: "#fde047",
|
|
1362
|
+
harmony: "Triadic (CMY-based)",
|
|
1363
|
+
bestFor: ["Gaming", "Web3", "Music Streaming", "Youth Apps"],
|
|
1364
|
+
rationale: "Cyan 500, Fuchsia 500, Yellow 300 approximate CMY primaries\u2014the digital/print color model. Creates electric, almost glitch-aesthetic energy. Use sparingly on dark backgrounds for maximum impact.",
|
|
1365
|
+
wcagAA: false,
|
|
1366
|
+
wcagAAA: false
|
|
1367
|
+
},
|
|
1368
|
+
{
|
|
1369
|
+
id: "citrus-burst",
|
|
1370
|
+
name: "Citrus Burst",
|
|
1371
|
+
description: "Maximum fresh impact",
|
|
1372
|
+
category: "vibrant",
|
|
1373
|
+
primary: "#65a30d",
|
|
1374
|
+
secondary: "#7c3aed",
|
|
1375
|
+
accent: "#14b8a6",
|
|
1376
|
+
harmony: "Split-Complementary",
|
|
1377
|
+
bestFor: ["Sports", "Energy Drinks", "Youth Brands"],
|
|
1378
|
+
rationale: "Lime 600, Violet 600, and Teal 500 create intentional visual tension. The near-complementary lime/violet pairing vibrates with energy, while teal accent provides unexpected freshness. Bold and unapologetic.",
|
|
1379
|
+
wcagAA: false,
|
|
1380
|
+
wcagAAA: false
|
|
1381
|
+
},
|
|
1382
|
+
{
|
|
1383
|
+
id: "fire-intensity",
|
|
1384
|
+
name: "Fire Intensity",
|
|
1385
|
+
description: "Passionate warmth progression",
|
|
1386
|
+
category: "vibrant",
|
|
1387
|
+
primary: "#b91c1c",
|
|
1388
|
+
secondary: "#ea580c",
|
|
1389
|
+
accent: "#fbbf24",
|
|
1390
|
+
harmony: "Analogous (Warm)",
|
|
1391
|
+
bestFor: ["Food Delivery", "Fitness", "Action Sports"],
|
|
1392
|
+
rationale: "Red 700 \u2192 Orange 600 \u2192 Amber 400 represents heat intensity from coals to flame to spark. This warm analogous progression demands attention and creates urgency. Best balanced with plenty of whitespace.",
|
|
1393
|
+
wcagAA: true,
|
|
1394
|
+
wcagAAA: false
|
|
1395
|
+
},
|
|
1396
|
+
{
|
|
1397
|
+
id: "aurora-borealis",
|
|
1398
|
+
name: "Aurora Borealis",
|
|
1399
|
+
description: "Ethereal northern lights",
|
|
1400
|
+
category: "vibrant",
|
|
1401
|
+
primary: "#0891b2",
|
|
1402
|
+
secondary: "#7c3aed",
|
|
1403
|
+
accent: "#22c55e",
|
|
1404
|
+
harmony: "Triadic",
|
|
1405
|
+
bestFor: ["Astronomy Apps", "Science", "Innovation"],
|
|
1406
|
+
rationale: "Cyan 600, Violet 600, and Green 500 capture the magical shifting hues of aurora displays. Equally spaced on the wheel, they create visual wonder without chaos. Perfect for science and exploration themes.",
|
|
1407
|
+
wcagAA: true,
|
|
1408
|
+
wcagAAA: false
|
|
1409
|
+
},
|
|
1410
|
+
// === MINIMAL ===
|
|
1411
|
+
{
|
|
1412
|
+
id: "swiss-mono",
|
|
1413
|
+
name: "Swiss Mono",
|
|
1414
|
+
description: "International style precision",
|
|
1415
|
+
category: "minimal",
|
|
1416
|
+
primary: "#000000",
|
|
1417
|
+
secondary: "#52525b",
|
|
1418
|
+
accent: "#2563eb",
|
|
1419
|
+
harmony: "Achromatic + Accent",
|
|
1420
|
+
bestFor: ["Typography", "Photography", "Editorial"],
|
|
1421
|
+
rationale: "Pure black and Zinc 600 honor Swiss International Style. Blue 600 accent (classic 'international blue') provides subtle direction without disrupting minimalist purity. Maximum contrast, zero distraction.",
|
|
1422
|
+
wcagAA: true,
|
|
1423
|
+
wcagAAA: true
|
|
1424
|
+
},
|
|
1425
|
+
{
|
|
1426
|
+
id: "paper-whisper",
|
|
1427
|
+
name: "Paper Whisper",
|
|
1428
|
+
description: "Soft reading comfort",
|
|
1429
|
+
category: "minimal",
|
|
1430
|
+
primary: "#27272a",
|
|
1431
|
+
secondary: "#71717a",
|
|
1432
|
+
accent: "#a1a1aa",
|
|
1433
|
+
harmony: "Monochromatic",
|
|
1434
|
+
bestFor: ["Reading Apps", "Journaling", "Documentation"],
|
|
1435
|
+
rationale: "Zinc 800, 500, and 400 create subtle hierarchy without color distraction. True monochrome reduces cognitive load for reading-heavy interfaces. Accent provides gentle distinction for interactive elements.",
|
|
1436
|
+
wcagAA: true,
|
|
1437
|
+
wcagAAA: true
|
|
1438
|
+
},
|
|
1439
|
+
{
|
|
1440
|
+
id: "cool-slate",
|
|
1441
|
+
name: "Cool Slate",
|
|
1442
|
+
description: "Technical quiet confidence",
|
|
1443
|
+
category: "minimal",
|
|
1444
|
+
primary: "#334155",
|
|
1445
|
+
secondary: "#64748b",
|
|
1446
|
+
accent: "#38bdf8",
|
|
1447
|
+
harmony: "Analogous + Accent",
|
|
1448
|
+
bestFor: ["Architecture Portfolios", "Consulting", "Legal Tech"],
|
|
1449
|
+
rationale: "Slate 700 and 500 create cool, professional atmosphere. Sky 400 accent whispers rather than shouts\u2014perfect for subtle navigation cues and sparse interactive highlights.",
|
|
1450
|
+
wcagAA: true,
|
|
1451
|
+
wcagAAA: true
|
|
1452
|
+
},
|
|
1453
|
+
{
|
|
1454
|
+
id: "warm-neutral",
|
|
1455
|
+
name: "Warm Neutral",
|
|
1456
|
+
description: "Organic minimalism",
|
|
1457
|
+
category: "minimal",
|
|
1458
|
+
primary: "#292524",
|
|
1459
|
+
secondary: "#78716c",
|
|
1460
|
+
accent: "#92400e",
|
|
1461
|
+
harmony: "Monochromatic + Accent",
|
|
1462
|
+
bestFor: ["Artisan E-commerce", "Coffee Brands", "Craft"],
|
|
1463
|
+
rationale: "Stone 800 and 500 provide warmth missing from pure grays. Amber 800 accent recalls coffee, leather, wood\u2014materials with character. Minimal but not cold, modern but not sterile.",
|
|
1464
|
+
wcagAA: true,
|
|
1465
|
+
wcagAAA: true
|
|
1466
|
+
},
|
|
1467
|
+
// === LUXURY ===
|
|
1468
|
+
{
|
|
1469
|
+
id: "royal-velvet",
|
|
1470
|
+
name: "Royal Velvet",
|
|
1471
|
+
description: "Regal opulent depth",
|
|
1472
|
+
category: "luxury",
|
|
1473
|
+
primary: "#4c1d95",
|
|
1474
|
+
secondary: "#1e1b4b",
|
|
1475
|
+
accent: "#d97706",
|
|
1476
|
+
harmony: "Complementary",
|
|
1477
|
+
bestFor: ["VIP Services", "Luxury Hotels", "Private Banking"],
|
|
1478
|
+
rationale: "Violet 900 (deep purple) and Indigo 950 (near-black midnight) create layered richness. Amber 600 gold accent adds warmth and signals value. Historically associated with royalty and exclusivity.",
|
|
1479
|
+
wcagAA: true,
|
|
1480
|
+
wcagAAA: true
|
|
1481
|
+
},
|
|
1482
|
+
{
|
|
1483
|
+
id: "champagne-noir",
|
|
1484
|
+
name: "Champagne Noir",
|
|
1485
|
+
description: "High-fashion sophistication",
|
|
1486
|
+
category: "luxury",
|
|
1487
|
+
primary: "#0c0a09",
|
|
1488
|
+
secondary: "#1c1917",
|
|
1489
|
+
accent: "#d4af37",
|
|
1490
|
+
harmony: "Monochromatic + Metallic",
|
|
1491
|
+
bestFor: ["Fashion", "Jewelry", "Luxury Retail"],
|
|
1492
|
+
rationale: "Stone 950 (warm black) and Stone 900 create subtle depth. True metallic gold (#D4AF37) elevates beyond standard amber. The warmth in blacks prevents coldness while maintaining elegance.",
|
|
1493
|
+
wcagAA: true,
|
|
1494
|
+
wcagAAA: true
|
|
1495
|
+
},
|
|
1496
|
+
{
|
|
1497
|
+
id: "emerald-club",
|
|
1498
|
+
name: "Emerald Club",
|
|
1499
|
+
description: "Old money establishment",
|
|
1500
|
+
category: "luxury",
|
|
1501
|
+
primary: "#064e3b",
|
|
1502
|
+
secondary: "#166534",
|
|
1503
|
+
accent: "#b45309",
|
|
1504
|
+
harmony: "Analogous + Accent",
|
|
1505
|
+
bestFor: ["Private Clubs", "Wealth Management", "Heritage Brands"],
|
|
1506
|
+
rationale: "Emerald 900 and Green 800 create tone-on-tone richness associated with stability and tradition. Bronze/Amber 700 accent recalls old brass and mahogany. Communicates established trustworthiness.",
|
|
1507
|
+
wcagAA: true,
|
|
1508
|
+
wcagAAA: true
|
|
1509
|
+
},
|
|
1510
|
+
{
|
|
1511
|
+
id: "midnight-sapphire",
|
|
1512
|
+
name: "Midnight Sapphire",
|
|
1513
|
+
description: "Contemporary luxury tech",
|
|
1514
|
+
category: "luxury",
|
|
1515
|
+
primary: "#172554",
|
|
1516
|
+
secondary: "#1e3a8a",
|
|
1517
|
+
accent: "#fafafa",
|
|
1518
|
+
harmony: "Monochromatic + Contrast",
|
|
1519
|
+
bestFor: ["Luxury Auto", "Premium Electronics", "Elite Services"],
|
|
1520
|
+
rationale: "Blue 950 and Blue 800 create depth like sapphire gemstone. Pure white (Zinc 50) accent cuts through dramatically. Modern luxury aesthetic\u2014think high-end automotive interfaces.",
|
|
1521
|
+
wcagAA: true,
|
|
1522
|
+
wcagAAA: true
|
|
1523
|
+
},
|
|
1524
|
+
// === PLAYFUL ===
|
|
1525
|
+
{
|
|
1526
|
+
id: "candy-shop",
|
|
1527
|
+
name: "Candy Shop",
|
|
1528
|
+
description: "Joyful youthful sweetness",
|
|
1529
|
+
category: "playful",
|
|
1530
|
+
primary: "#ec4899",
|
|
1531
|
+
secondary: "#8b5cf6",
|
|
1532
|
+
accent: "#facc15",
|
|
1533
|
+
harmony: "Triadic",
|
|
1534
|
+
bestFor: ["Kids Apps", "Toys", "Gaming", "Entertainment"],
|
|
1535
|
+
rationale: "Pink 500 (bubble gum), Violet 500 (grape), Yellow 400 (lemon drop) evoke candy store joy. Classic gender-neutral playful combination. High saturation communicates energy and fun.",
|
|
1536
|
+
wcagAA: false,
|
|
1537
|
+
wcagAAA: false
|
|
1538
|
+
},
|
|
1539
|
+
{
|
|
1540
|
+
id: "sunny-day",
|
|
1541
|
+
name: "Sunny Day",
|
|
1542
|
+
description: "Optimistic primary colors",
|
|
1543
|
+
category: "playful",
|
|
1544
|
+
primary: "#2563eb",
|
|
1545
|
+
secondary: "#16a34a",
|
|
1546
|
+
accent: "#fbbf24",
|
|
1547
|
+
harmony: "Triadic (Primary-based)",
|
|
1548
|
+
bestFor: ["Education", "Children's Apps", "Learning Platforms"],
|
|
1549
|
+
rationale: "Blue 600 (sky), Green 600 (grass), Amber 400 (sun) are universally recognized and accessible. This primary-adjacent scheme feels familiar and approachable to all ages and cultures.",
|
|
1550
|
+
wcagAA: true,
|
|
1551
|
+
wcagAAA: false
|
|
1552
|
+
},
|
|
1553
|
+
{
|
|
1554
|
+
id: "mint-berry",
|
|
1555
|
+
name: "Mint Berry",
|
|
1556
|
+
description: "Fresh dessert sweetness",
|
|
1557
|
+
category: "playful",
|
|
1558
|
+
primary: "#10b981",
|
|
1559
|
+
secondary: "#ec4899",
|
|
1560
|
+
accent: "#06b6d4",
|
|
1561
|
+
harmony: "Split-Complementary",
|
|
1562
|
+
bestFor: ["Food Apps", "Lifestyle", "Wellness for Youth"],
|
|
1563
|
+
rationale: "Emerald 500 (mint), Pink 500 (berry), Cyan 500 (ice) create dessert-inspired freshness. High contrast between green and pink creates visual interest while cyan cools the palette.",
|
|
1564
|
+
wcagAA: false,
|
|
1565
|
+
wcagAAA: false
|
|
1566
|
+
},
|
|
1567
|
+
{
|
|
1568
|
+
id: "rainbow-pop",
|
|
1569
|
+
name: "Rainbow Pop",
|
|
1570
|
+
description: "Maximalist celebration",
|
|
1571
|
+
category: "playful",
|
|
1572
|
+
primary: "#f43f5e",
|
|
1573
|
+
secondary: "#8b5cf6",
|
|
1574
|
+
accent: "#06b6d4",
|
|
1575
|
+
harmony: "Triadic",
|
|
1576
|
+
bestFor: ["Pride Events", "Festivals", "Inclusive Communities"],
|
|
1577
|
+
rationale: "Rose 500, Violet 500, Cyan 500 span the visible spectrum. Celebrates diversity and inclusion through color. Each hue can represent different aspects while maintaining visual harmony.",
|
|
1578
|
+
wcagAA: false,
|
|
1579
|
+
wcagAAA: false
|
|
1580
|
+
},
|
|
1581
|
+
// === ACCESSIBLE ===
|
|
1582
|
+
{
|
|
1583
|
+
id: "high-clarity",
|
|
1584
|
+
name: "High Clarity",
|
|
1585
|
+
description: "Maximum readability",
|
|
1586
|
+
category: "accessible",
|
|
1587
|
+
primary: "#1f2937",
|
|
1588
|
+
secondary: "#4b5563",
|
|
1589
|
+
accent: "#0284c7",
|
|
1590
|
+
harmony: "Monochromatic + Accent",
|
|
1591
|
+
bestFor: ["Government", "Healthcare", "Education"],
|
|
1592
|
+
rationale: "Gray 800 and 600 on white exceed WCAG AAA contrast requirements (7:1+). Sky 600 accent passes AA for large text. Designed for universal accessibility including visual impairments.",
|
|
1593
|
+
wcagAA: true,
|
|
1594
|
+
wcagAAA: true
|
|
1595
|
+
},
|
|
1596
|
+
{
|
|
1597
|
+
id: "safe-contrast",
|
|
1598
|
+
name: "Safe Contrast",
|
|
1599
|
+
description: "Color-blind friendly",
|
|
1600
|
+
category: "accessible",
|
|
1601
|
+
primary: "#0369a1",
|
|
1602
|
+
secondary: "#374151",
|
|
1603
|
+
accent: "#ea580c",
|
|
1604
|
+
harmony: "Complementary",
|
|
1605
|
+
bestFor: ["Data Visualization", "Forms", "Critical Interfaces"],
|
|
1606
|
+
rationale: "Sky 700 and Gray 700 are distinguishable across common color blindness types. Orange 600 accent avoids red-green confusion. Tested with deuteranopia, protanopia, and tritanopia simulations.",
|
|
1607
|
+
wcagAA: true,
|
|
1608
|
+
wcagAAA: false
|
|
1609
|
+
},
|
|
1610
|
+
{
|
|
1611
|
+
id: "gentle-reader",
|
|
1612
|
+
name: "Gentle Reader",
|
|
1613
|
+
description: "Low eye strain",
|
|
1614
|
+
category: "accessible",
|
|
1615
|
+
primary: "#44403c",
|
|
1616
|
+
secondary: "#78716c",
|
|
1617
|
+
accent: "#2563eb",
|
|
1618
|
+
harmony: "Monochromatic + Accent",
|
|
1619
|
+
bestFor: ["Long-Form Reading", "Elderly Users", "Medical"],
|
|
1620
|
+
rationale: "Stone 700 and 500 avoid harsh black while maintaining readability. Reduced contrast prevents eye fatigue for extended reading. Blue 600 accent is universally distinguishable.",
|
|
1621
|
+
wcagAA: true,
|
|
1622
|
+
wcagAAA: true
|
|
1623
|
+
},
|
|
1624
|
+
{
|
|
1625
|
+
id: "clear-signal",
|
|
1626
|
+
name: "Clear Signal",
|
|
1627
|
+
description: "Semantic color safe",
|
|
1628
|
+
category: "accessible",
|
|
1629
|
+
primary: "#1e293b",
|
|
1630
|
+
secondary: "#64748b",
|
|
1631
|
+
accent: "#7c3aed",
|
|
1632
|
+
harmony: "Analogous + Accent",
|
|
1633
|
+
bestFor: ["Medical Interfaces", "Critical Systems", "Accessibility-First"],
|
|
1634
|
+
rationale: "Slate 800 and 500 provide clear hierarchy. Violet 600 accent is visible to most color vision types and doesn't conflict with semantic red/green/yellow states. Reserves those colors for their intended meanings.",
|
|
1635
|
+
wcagAA: true,
|
|
1636
|
+
wcagAAA: true
|
|
1637
|
+
}
|
|
1638
|
+
];
|
|
1639
|
+
function getPalettesByCategory(category) {
|
|
1640
|
+
return colorPalettes.filter((p) => p.category === category);
|
|
1641
|
+
}
|
|
1642
|
+
function getPalettesByMood(mood) {
|
|
1643
|
+
return colorPalettes.filter(
|
|
1644
|
+
(p) => p.description.toLowerCase().includes(mood.toLowerCase()) || p.rationale?.toLowerCase().includes(mood.toLowerCase()) || p.mood?.some((m) => m.toLowerCase().includes(mood.toLowerCase()))
|
|
1645
|
+
);
|
|
1646
|
+
}
|
|
1647
|
+
function getPalettesForUseCase(useCase) {
|
|
1648
|
+
return colorPalettes.filter(
|
|
1649
|
+
(p) => p.bestFor?.some((uc) => uc.toLowerCase().includes(useCase.toLowerCase()))
|
|
1650
|
+
);
|
|
1651
|
+
}
|
|
1652
|
+
function getAccessiblePalettes(level = "AA") {
|
|
1653
|
+
return colorPalettes.filter(
|
|
1654
|
+
(p) => level === "AAA" ? p.wcagAAA : p.wcagAA
|
|
1655
|
+
);
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
// ../tokens/src/color-utils.ts
|
|
1659
|
+
function hexToRgb(hex) {
|
|
1660
|
+
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
1661
|
+
return result ? {
|
|
1662
|
+
r: parseInt(result[1], 16),
|
|
1663
|
+
g: parseInt(result[2], 16),
|
|
1664
|
+
b: parseInt(result[3], 16)
|
|
1665
|
+
} : null;
|
|
1666
|
+
}
|
|
1667
|
+
function hexToHSL(hex) {
|
|
1668
|
+
const rgb = hexToRgb(hex);
|
|
1669
|
+
if (!rgb) return { h: 0, s: 0, l: 0 };
|
|
1670
|
+
const r = rgb.r / 255;
|
|
1671
|
+
const g = rgb.g / 255;
|
|
1672
|
+
const b = rgb.b / 255;
|
|
1673
|
+
const max = Math.max(r, g, b);
|
|
1674
|
+
const min = Math.min(r, g, b);
|
|
1675
|
+
let h = 0, s = 0, l = (max + min) / 2;
|
|
1676
|
+
if (max !== min) {
|
|
1677
|
+
const d = max - min;
|
|
1678
|
+
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
1679
|
+
switch (max) {
|
|
1680
|
+
case r:
|
|
1681
|
+
h = ((g - b) / d + (g < b ? 6 : 0)) / 6;
|
|
1682
|
+
break;
|
|
1683
|
+
case g:
|
|
1684
|
+
h = ((b - r) / d + 2) / 6;
|
|
1685
|
+
break;
|
|
1686
|
+
case b:
|
|
1687
|
+
h = ((r - g) / d + 4) / 6;
|
|
1688
|
+
break;
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
return {
|
|
1692
|
+
h: Math.round(h * 360),
|
|
1693
|
+
s: Math.round(s * 100),
|
|
1694
|
+
l: Math.round(l * 100)
|
|
1695
|
+
};
|
|
1696
|
+
}
|
|
1697
|
+
function hslToHex(h, s, l) {
|
|
1698
|
+
h = h / 360;
|
|
1699
|
+
s = s / 100;
|
|
1700
|
+
l = l / 100;
|
|
1701
|
+
let r, g, b;
|
|
1702
|
+
if (s === 0) {
|
|
1703
|
+
r = g = b = l;
|
|
1704
|
+
} else {
|
|
1705
|
+
const hue2rgb = (p2, q2, t) => {
|
|
1706
|
+
if (t < 0) t += 1;
|
|
1707
|
+
if (t > 1) t -= 1;
|
|
1708
|
+
if (t < 1 / 6) return p2 + (q2 - p2) * 6 * t;
|
|
1709
|
+
if (t < 1 / 2) return q2;
|
|
1710
|
+
if (t < 2 / 3) return p2 + (q2 - p2) * (2 / 3 - t) * 6;
|
|
1711
|
+
return p2;
|
|
1712
|
+
};
|
|
1713
|
+
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
1714
|
+
const p = 2 * l - q;
|
|
1715
|
+
r = hue2rgb(p, q, h + 1 / 3);
|
|
1716
|
+
g = hue2rgb(p, q, h);
|
|
1717
|
+
b = hue2rgb(p, q, h - 1 / 3);
|
|
1718
|
+
}
|
|
1719
|
+
const toHex = (x) => {
|
|
1720
|
+
const hex = Math.round(x * 255).toString(16);
|
|
1721
|
+
return hex.length === 1 ? "0" + hex : hex;
|
|
1722
|
+
};
|
|
1723
|
+
return `#${toHex(r)}${toHex(g)}${toHex(b)}`;
|
|
1724
|
+
}
|
|
1725
|
+
function adjustLightness(hex, percent) {
|
|
1726
|
+
const hsl = hexToHSL(hex);
|
|
1727
|
+
const newL = Math.max(0, Math.min(100, hsl.l + percent));
|
|
1728
|
+
return hslToHex(hsl.h, hsl.s, newL);
|
|
1729
|
+
}
|
|
1730
|
+
function adjustSaturation(hex, percent) {
|
|
1731
|
+
const hsl = hexToHSL(hex);
|
|
1732
|
+
const newS = Math.max(0, Math.min(100, hsl.s + percent));
|
|
1733
|
+
return hslToHex(hsl.h, newS, hsl.l);
|
|
1734
|
+
}
|
|
1735
|
+
function rotateHue(hex, degrees) {
|
|
1736
|
+
const hsl = hexToHSL(hex);
|
|
1737
|
+
const newH = (hsl.h + degrees) % 360;
|
|
1738
|
+
return hslToHex(newH, hsl.s, hsl.l);
|
|
1739
|
+
}
|
|
1740
|
+
function adjustOpacity(hex, opacity) {
|
|
1741
|
+
const rgb = hexToRgb(hex);
|
|
1742
|
+
if (!rgb) return hex;
|
|
1743
|
+
return `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${opacity})`;
|
|
1744
|
+
}
|
|
1745
|
+
function getLuminance(r, g, b) {
|
|
1746
|
+
const [rs, gs, bs] = [r, g, b].map((c) => {
|
|
1747
|
+
const srgb = c / 255;
|
|
1748
|
+
return srgb <= 0.03928 ? srgb / 12.92 : Math.pow((srgb + 0.055) / 1.055, 2.4);
|
|
1749
|
+
});
|
|
1750
|
+
return 0.2126 * rs + 0.7152 * gs + 0.0722 * bs;
|
|
1751
|
+
}
|
|
1752
|
+
function getContrastRatio(hex1, hex2) {
|
|
1753
|
+
const rgb1 = hexToRgb(hex1);
|
|
1754
|
+
const rgb2 = hexToRgb(hex2);
|
|
1755
|
+
if (!rgb1 || !rgb2) return 0;
|
|
1756
|
+
const lum1 = getLuminance(rgb1.r, rgb1.g, rgb1.b);
|
|
1757
|
+
const lum2 = getLuminance(rgb2.r, rgb2.g, rgb2.b);
|
|
1758
|
+
const lighter = Math.max(lum1, lum2);
|
|
1759
|
+
const darker = Math.min(lum1, lum2);
|
|
1760
|
+
return (lighter + 0.05) / (darker + 0.05);
|
|
1761
|
+
}
|
|
1762
|
+
function getOptimalForeground(bgHex, whiteHex = "#ffffff", blackHex = "#000000") {
|
|
1763
|
+
const whiteRatio = getContrastRatio(bgHex, whiteHex);
|
|
1764
|
+
const blackRatio = getContrastRatio(bgHex, blackHex);
|
|
1765
|
+
return whiteRatio > blackRatio ? whiteHex : blackHex;
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
// ../tokens/src/token-graph.ts
|
|
1769
|
+
var primaryColorDerivations = {
|
|
1770
|
+
// Links use primary color
|
|
1771
|
+
"--color-link": {
|
|
1772
|
+
source: "--color-primary",
|
|
1773
|
+
transform: (primary) => primary,
|
|
1774
|
+
description: "Links inherit primary brand color"
|
|
1775
|
+
},
|
|
1776
|
+
// Focus ring uses primary color
|
|
1777
|
+
"--color-ring": {
|
|
1778
|
+
source: "--color-primary",
|
|
1779
|
+
transform: (primary) => primary,
|
|
1780
|
+
description: "Focus rings use primary for brand consistency"
|
|
1781
|
+
},
|
|
1782
|
+
// Link hover is slightly darker primary
|
|
1783
|
+
"--color-link-hover": {
|
|
1784
|
+
source: "--color-primary",
|
|
1785
|
+
transform: (primary) => adjustLightness(primary, -10),
|
|
1786
|
+
description: "Link hover is 10% darker for visual feedback"
|
|
1787
|
+
},
|
|
1788
|
+
// Chart primary series
|
|
1789
|
+
"--chart-1": {
|
|
1790
|
+
source: "--color-primary",
|
|
1791
|
+
transform: (primary) => primary,
|
|
1792
|
+
description: "First chart series uses primary"
|
|
1793
|
+
},
|
|
1794
|
+
// Chart secondary series (lighter tint)
|
|
1795
|
+
"--chart-2": {
|
|
1796
|
+
source: "--color-primary",
|
|
1797
|
+
transform: (primary) => adjustLightness(primary, 20),
|
|
1798
|
+
description: "Second chart series is lighter tint of primary"
|
|
1799
|
+
},
|
|
1800
|
+
// Chart tertiary series (darker shade)
|
|
1801
|
+
"--chart-3": {
|
|
1802
|
+
source: "--color-primary",
|
|
1803
|
+
transform: (primary) => adjustLightness(primary, -15),
|
|
1804
|
+
description: "Third chart series is darker shade of primary"
|
|
1805
|
+
},
|
|
1806
|
+
// Chart quaternary (desaturated primary)
|
|
1807
|
+
"--chart-4": {
|
|
1808
|
+
source: "--color-primary",
|
|
1809
|
+
transform: (primary) => adjustSaturation(primary, -30),
|
|
1810
|
+
description: "Fourth chart series is muted primary"
|
|
1811
|
+
},
|
|
1812
|
+
// Chart quinary (complementary color)
|
|
1813
|
+
"--chart-5": {
|
|
1814
|
+
source: "--color-primary",
|
|
1815
|
+
transform: (primary) => rotateHue(primary, 180),
|
|
1816
|
+
description: "Fifth chart series is complementary to primary"
|
|
1817
|
+
}
|
|
1818
|
+
};
|
|
1819
|
+
var secondaryColorDerivations = {
|
|
1820
|
+
// Hover states
|
|
1821
|
+
"--color-hover": {
|
|
1822
|
+
source: "--color-secondary",
|
|
1823
|
+
transform: (secondary) => secondary,
|
|
1824
|
+
description: "Hover backgrounds use secondary"
|
|
1825
|
+
},
|
|
1826
|
+
// Active states
|
|
1827
|
+
"--color-active": {
|
|
1828
|
+
source: "--color-secondary",
|
|
1829
|
+
transform: (secondary) => adjustLightness(secondary, -5),
|
|
1830
|
+
description: "Active state is slightly darker secondary"
|
|
1831
|
+
},
|
|
1832
|
+
// Muted backgrounds
|
|
1833
|
+
"--color-muted": {
|
|
1834
|
+
source: "--color-secondary",
|
|
1835
|
+
transform: (secondary) => secondary,
|
|
1836
|
+
description: "Muted sections use secondary color"
|
|
1837
|
+
}
|
|
1838
|
+
};
|
|
1839
|
+
var accentColorDerivations = {
|
|
1840
|
+
// Info semantic color uses accent
|
|
1841
|
+
"--color-info": {
|
|
1842
|
+
source: "--color-accent",
|
|
1843
|
+
transform: (accent) => accent,
|
|
1844
|
+
description: "Info semantic color uses accent"
|
|
1845
|
+
},
|
|
1846
|
+
// Info foreground calculated for contrast
|
|
1847
|
+
"--color-info-foreground": {
|
|
1848
|
+
source: "--color-accent",
|
|
1849
|
+
transform: (accent) => getOptimalForeground(accent),
|
|
1850
|
+
description: "Info foreground calculated for contrast"
|
|
1851
|
+
}
|
|
1852
|
+
};
|
|
1853
|
+
var modeSpecificDerivations = {
|
|
1854
|
+
"--color-primary-muted": {
|
|
1855
|
+
light: {
|
|
1856
|
+
source: "--color-primary",
|
|
1857
|
+
transform: (primary) => adjustLightness(primary, 40),
|
|
1858
|
+
description: "Muted primary for light backgrounds"
|
|
1859
|
+
},
|
|
1860
|
+
dark: {
|
|
1861
|
+
source: "--color-primary",
|
|
1862
|
+
transform: (primary) => adjustLightness(primary, -20),
|
|
1863
|
+
description: "Muted primary for dark backgrounds"
|
|
1864
|
+
}
|
|
1865
|
+
},
|
|
1866
|
+
"--color-primary-subtle": {
|
|
1867
|
+
light: {
|
|
1868
|
+
source: "--color-primary",
|
|
1869
|
+
transform: (primary) => adjustOpacity(primary, 0.1),
|
|
1870
|
+
description: "Subtle primary background for light mode"
|
|
1871
|
+
},
|
|
1872
|
+
dark: {
|
|
1873
|
+
source: "--color-primary",
|
|
1874
|
+
transform: (primary) => adjustOpacity(primary, 0.2),
|
|
1875
|
+
description: "Subtle primary background for dark mode"
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
};
|
|
1879
|
+
var tokenDependencyGraph = {
|
|
1880
|
+
primary: primaryColorDerivations,
|
|
1881
|
+
secondary: secondaryColorDerivations,
|
|
1882
|
+
accent: accentColorDerivations,
|
|
1883
|
+
modeSpecific: modeSpecificDerivations
|
|
1884
|
+
};
|
|
1885
|
+
function getDependentTokens(sourceToken) {
|
|
1886
|
+
const dependents = [];
|
|
1887
|
+
Object.entries(primaryColorDerivations).forEach(([token, config]) => {
|
|
1888
|
+
if (config.source === sourceToken) {
|
|
1889
|
+
dependents.push(token);
|
|
1890
|
+
}
|
|
1891
|
+
});
|
|
1892
|
+
Object.entries(secondaryColorDerivations).forEach(([token, config]) => {
|
|
1893
|
+
if (config.source === sourceToken) {
|
|
1894
|
+
dependents.push(token);
|
|
1895
|
+
}
|
|
1896
|
+
});
|
|
1897
|
+
Object.entries(accentColorDerivations).forEach(([token, config]) => {
|
|
1898
|
+
if (config.source === sourceToken) {
|
|
1899
|
+
dependents.push(token);
|
|
1900
|
+
}
|
|
1901
|
+
});
|
|
1902
|
+
return dependents;
|
|
1903
|
+
}
|
|
1904
|
+
function computeDerivedTokens(sourceToken, sourceValue, mode) {
|
|
1905
|
+
const derived = {};
|
|
1906
|
+
Object.entries(primaryColorDerivations).forEach(([token, config]) => {
|
|
1907
|
+
if (config.source === sourceToken) {
|
|
1908
|
+
derived[token] = config.transform(sourceValue);
|
|
1909
|
+
}
|
|
1910
|
+
});
|
|
1911
|
+
Object.entries(secondaryColorDerivations).forEach(([token, config]) => {
|
|
1912
|
+
if (config.source === sourceToken) {
|
|
1913
|
+
derived[token] = config.transform(sourceValue);
|
|
1914
|
+
}
|
|
1915
|
+
});
|
|
1916
|
+
Object.entries(accentColorDerivations).forEach(([token, config]) => {
|
|
1917
|
+
if (config.source === sourceToken) {
|
|
1918
|
+
derived[token] = config.transform(sourceValue);
|
|
1919
|
+
}
|
|
1920
|
+
});
|
|
1921
|
+
Object.entries(modeSpecificDerivations).forEach(([token, configs]) => {
|
|
1922
|
+
const config = configs[mode];
|
|
1923
|
+
if (config.source === sourceToken) {
|
|
1924
|
+
derived[token] = config.transform(sourceValue);
|
|
1925
|
+
}
|
|
1926
|
+
});
|
|
1927
|
+
return derived;
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1930
|
+
// ../tokens/src/fontThemes.ts
|
|
1931
|
+
var fontThemes = [
|
|
1932
|
+
// === PROFESSIONAL ===
|
|
1933
|
+
{
|
|
1934
|
+
id: "studio",
|
|
1935
|
+
name: "Studio",
|
|
1936
|
+
description: "Professional and balanced, perfect for modern SaaS products",
|
|
1937
|
+
category: "professional",
|
|
1938
|
+
heading: "Outfit",
|
|
1939
|
+
body: "Manrope",
|
|
1940
|
+
mono: "Fira Code",
|
|
1941
|
+
headingWeight: "700",
|
|
1942
|
+
bodyWeight: "400",
|
|
1943
|
+
letterSpacing: { heading: "-0.02em", body: "0" },
|
|
1944
|
+
lineHeight: { heading: "1.2", body: "1.6" },
|
|
1945
|
+
wcagReadable: true,
|
|
1946
|
+
mood: ["professional", "modern", "clean"],
|
|
1947
|
+
bestFor: "SaaS products, business sites, dashboards",
|
|
1948
|
+
pairing: "Sans + Sans (Geometric + Humanist)"
|
|
1949
|
+
},
|
|
1950
|
+
{
|
|
1951
|
+
id: "modern-swiss",
|
|
1952
|
+
name: "Modern Swiss",
|
|
1953
|
+
description: "Clean and neutral, maximum readability",
|
|
1954
|
+
category: "professional",
|
|
1955
|
+
heading: "Inter",
|
|
1956
|
+
body: "Inter",
|
|
1957
|
+
mono: "JetBrains Mono",
|
|
1958
|
+
headingWeight: "700",
|
|
1959
|
+
bodyWeight: "400",
|
|
1960
|
+
letterSpacing: { heading: "-0.02em", body: "0" },
|
|
1961
|
+
lineHeight: { heading: "1.2", body: "1.7" },
|
|
1962
|
+
wcagReadable: true,
|
|
1963
|
+
mood: ["minimal", "clean", "modern"],
|
|
1964
|
+
bestFor: "Documentation, dashboards, data-heavy UIs",
|
|
1965
|
+
pairing: "Sans (Single Font)"
|
|
1966
|
+
},
|
|
1967
|
+
{
|
|
1968
|
+
id: "corporate-authority",
|
|
1969
|
+
name: "Corporate Authority",
|
|
1970
|
+
description: "Classic sans-serif with technical precision",
|
|
1971
|
+
category: "professional",
|
|
1972
|
+
heading: "Roboto",
|
|
1973
|
+
body: "Roboto",
|
|
1974
|
+
mono: "Roboto Mono",
|
|
1975
|
+
headingWeight: "700",
|
|
1976
|
+
bodyWeight: "400",
|
|
1977
|
+
letterSpacing: { heading: "-0.01em", body: "0" },
|
|
1978
|
+
lineHeight: { heading: "1.2", body: "1.6" },
|
|
1979
|
+
wcagReadable: true,
|
|
1980
|
+
mood: ["corporate", "reliable", "neutral"],
|
|
1981
|
+
bestFor: "Enterprise software, Google-style products, admin panels",
|
|
1982
|
+
pairing: "Sans (Roboto Family)"
|
|
1983
|
+
},
|
|
1984
|
+
// === EDITORIAL ===
|
|
1985
|
+
{
|
|
1986
|
+
id: "sage",
|
|
1987
|
+
name: "Sage",
|
|
1988
|
+
description: "Elegant serif heading with clean sans body",
|
|
1989
|
+
category: "editorial",
|
|
1990
|
+
heading: "Lora",
|
|
1991
|
+
body: "Instrument Sans",
|
|
1992
|
+
mono: "Fira Code",
|
|
1993
|
+
headingWeight: "600",
|
|
1994
|
+
bodyWeight: "400",
|
|
1995
|
+
letterSpacing: { heading: "-0.01em", body: "0" },
|
|
1996
|
+
lineHeight: { heading: "1.3", body: "1.7" },
|
|
1997
|
+
wcagReadable: true,
|
|
1998
|
+
mood: ["elegant", "warm", "organic"],
|
|
1999
|
+
bestFor: "Editorial sites, blogs, portfolios",
|
|
2000
|
+
pairing: "Serif + Sans (Classic Editorial)"
|
|
2001
|
+
},
|
|
2002
|
+
{
|
|
2003
|
+
id: "editorial-classic",
|
|
2004
|
+
name: "Editorial Classic",
|
|
2005
|
+
description: "Timeless serif pairing for long-form content",
|
|
2006
|
+
category: "editorial",
|
|
2007
|
+
heading: "Playfair Display",
|
|
2008
|
+
body: "Source Sans Pro",
|
|
2009
|
+
mono: "Fira Code",
|
|
2010
|
+
headingWeight: "700",
|
|
2011
|
+
bodyWeight: "400",
|
|
2012
|
+
letterSpacing: { heading: "0", body: "0" },
|
|
2013
|
+
lineHeight: { heading: "1.2", body: "1.7" },
|
|
2014
|
+
wcagReadable: true,
|
|
2015
|
+
mood: ["classic", "elegant", "readable"],
|
|
2016
|
+
bestFor: "Magazines, blogs, long-form articles",
|
|
2017
|
+
pairing: "Serif + Sans (High Contrast)"
|
|
2018
|
+
},
|
|
2019
|
+
{
|
|
2020
|
+
id: "literary",
|
|
2021
|
+
name: "Literary",
|
|
2022
|
+
description: "Sophisticated serif pairing for premium content",
|
|
2023
|
+
category: "editorial",
|
|
2024
|
+
heading: "Merriweather",
|
|
2025
|
+
body: "Lato",
|
|
2026
|
+
mono: "Fira Code",
|
|
2027
|
+
headingWeight: "700",
|
|
2028
|
+
bodyWeight: "400",
|
|
2029
|
+
letterSpacing: { heading: "0", body: "0" },
|
|
2030
|
+
lineHeight: { heading: "1.3", body: "1.7" },
|
|
2031
|
+
wcagReadable: true,
|
|
2032
|
+
mood: ["sophisticated", "literary", "warm"],
|
|
2033
|
+
bestFor: "Publishing, literary journals, premium blogs",
|
|
2034
|
+
pairing: "Serif + Sans (Warm & Readable)"
|
|
2035
|
+
},
|
|
2036
|
+
// === TECH ===
|
|
2037
|
+
{
|
|
2038
|
+
id: "volt",
|
|
2039
|
+
name: "Volt",
|
|
2040
|
+
description: "Bold and electric, one font for everything",
|
|
2041
|
+
category: "tech",
|
|
2042
|
+
heading: "Space Grotesk",
|
|
2043
|
+
body: "Space Grotesk",
|
|
2044
|
+
mono: "Fira Code",
|
|
2045
|
+
headingWeight: "700",
|
|
2046
|
+
bodyWeight: "400",
|
|
2047
|
+
letterSpacing: { heading: "-0.03em", body: "0" },
|
|
2048
|
+
lineHeight: { heading: "1.2", body: "1.6" },
|
|
2049
|
+
wcagReadable: true,
|
|
2050
|
+
mood: ["bold", "modern", "tech"],
|
|
2051
|
+
bestFor: "Tech startups, developer tools, portfolios",
|
|
2052
|
+
pairing: "Sans (Single Font)"
|
|
2053
|
+
},
|
|
2054
|
+
{
|
|
2055
|
+
id: "tech-mono",
|
|
2056
|
+
name: "Tech Monospace",
|
|
2057
|
+
description: "Monospace everything, for the hackers",
|
|
2058
|
+
category: "tech",
|
|
2059
|
+
heading: "JetBrains Mono",
|
|
2060
|
+
body: "JetBrains Mono",
|
|
2061
|
+
mono: "JetBrains Mono",
|
|
2062
|
+
headingWeight: "700",
|
|
2063
|
+
bodyWeight: "400",
|
|
2064
|
+
letterSpacing: { heading: "0", body: "0" },
|
|
2065
|
+
lineHeight: { heading: "1.2", body: "1.6" },
|
|
2066
|
+
wcagReadable: true,
|
|
2067
|
+
mood: ["tech", "hacker", "minimal"],
|
|
2068
|
+
bestFor: "Developer tools, coding tutorials, terminal UIs",
|
|
2069
|
+
pairing: "Mono (Single Font)"
|
|
2070
|
+
},
|
|
2071
|
+
{
|
|
2072
|
+
id: "dev-tools",
|
|
2073
|
+
name: "Dev Tools",
|
|
2074
|
+
description: "GitHub-inspired clean technical aesthetic",
|
|
2075
|
+
category: "tech",
|
|
2076
|
+
heading: "IBM Plex Sans",
|
|
2077
|
+
body: "IBM Plex Sans",
|
|
2078
|
+
mono: "IBM Plex Mono",
|
|
2079
|
+
headingWeight: "600",
|
|
2080
|
+
bodyWeight: "400",
|
|
2081
|
+
letterSpacing: { heading: "-0.01em", body: "0" },
|
|
2082
|
+
lineHeight: { heading: "1.2", body: "1.6" },
|
|
2083
|
+
wcagReadable: true,
|
|
2084
|
+
mood: ["technical", "precise", "modern"],
|
|
2085
|
+
bestFor: "Developer platforms, code editors, documentation",
|
|
2086
|
+
pairing: "Sans (IBM Plex Family)"
|
|
2087
|
+
},
|
|
2088
|
+
// === FRIENDLY ===
|
|
2089
|
+
{
|
|
2090
|
+
id: "friendly-rounded",
|
|
2091
|
+
name: "Friendly & Rounded",
|
|
2092
|
+
description: "Approachable and warm, great for consumer apps",
|
|
2093
|
+
category: "friendly",
|
|
2094
|
+
heading: "Quicksand",
|
|
2095
|
+
body: "Open Sans",
|
|
2096
|
+
mono: "Fira Code",
|
|
2097
|
+
headingWeight: "600",
|
|
2098
|
+
bodyWeight: "400",
|
|
2099
|
+
letterSpacing: { heading: "0", body: "0" },
|
|
2100
|
+
lineHeight: { heading: "1.3", body: "1.7" },
|
|
2101
|
+
wcagReadable: true,
|
|
2102
|
+
mood: ["friendly", "approachable", "warm"],
|
|
2103
|
+
bestFor: "Consumer apps, education, healthcare",
|
|
2104
|
+
pairing: "Rounded Sans + Humanist Sans"
|
|
2105
|
+
},
|
|
2106
|
+
{
|
|
2107
|
+
id: "warm-welcome",
|
|
2108
|
+
name: "Warm Welcome",
|
|
2109
|
+
description: "Inviting and accessible for all audiences",
|
|
2110
|
+
category: "friendly",
|
|
2111
|
+
heading: "Nunito",
|
|
2112
|
+
body: "Nunito Sans",
|
|
2113
|
+
mono: "Fira Code",
|
|
2114
|
+
headingWeight: "700",
|
|
2115
|
+
bodyWeight: "400",
|
|
2116
|
+
letterSpacing: { heading: "-0.01em", body: "0" },
|
|
2117
|
+
lineHeight: { heading: "1.3", body: "1.7" },
|
|
2118
|
+
wcagReadable: true,
|
|
2119
|
+
mood: ["welcoming", "friendly", "accessible"],
|
|
2120
|
+
bestFor: "Community platforms, education, non-profits",
|
|
2121
|
+
pairing: "Rounded Sans (Nunito Family)"
|
|
2122
|
+
},
|
|
2123
|
+
// === MINIMAL ===
|
|
2124
|
+
{
|
|
2125
|
+
id: "minimal-sans",
|
|
2126
|
+
name: "Minimal Sans",
|
|
2127
|
+
description: "Pure simplicity with Work Sans",
|
|
2128
|
+
category: "minimal",
|
|
2129
|
+
heading: "Work Sans",
|
|
2130
|
+
body: "Work Sans",
|
|
2131
|
+
mono: "Fira Code",
|
|
2132
|
+
headingWeight: "600",
|
|
2133
|
+
bodyWeight: "400",
|
|
2134
|
+
letterSpacing: { heading: "-0.02em", body: "0" },
|
|
2135
|
+
lineHeight: { heading: "1.2", body: "1.6" },
|
|
2136
|
+
wcagReadable: true,
|
|
2137
|
+
mood: ["minimal", "clean", "efficient"],
|
|
2138
|
+
bestFor: "Minimalist sites, portfolios, agencies",
|
|
2139
|
+
pairing: "Sans (Single Font)"
|
|
2140
|
+
},
|
|
2141
|
+
{
|
|
2142
|
+
id: "system-ui",
|
|
2143
|
+
name: "System UI",
|
|
2144
|
+
description: "Native system fonts for instant familiarity",
|
|
2145
|
+
category: "minimal",
|
|
2146
|
+
heading: "System UI",
|
|
2147
|
+
body: "System UI",
|
|
2148
|
+
mono: "SF Mono",
|
|
2149
|
+
headingWeight: "700",
|
|
2150
|
+
bodyWeight: "400",
|
|
2151
|
+
letterSpacing: { heading: "-0.01em", body: "0" },
|
|
2152
|
+
lineHeight: { heading: "1.2", body: "1.6" },
|
|
2153
|
+
wcagReadable: true,
|
|
2154
|
+
mood: ["native", "fast", "familiar"],
|
|
2155
|
+
bestFor: "Performance-critical apps, utilities, system tools",
|
|
2156
|
+
pairing: "System Fonts (Zero Load Time)"
|
|
2157
|
+
},
|
|
2158
|
+
// === LUXURY ===
|
|
2159
|
+
{
|
|
2160
|
+
id: "luxury-serif",
|
|
2161
|
+
name: "Luxury Serif",
|
|
2162
|
+
description: "Sophisticated and high-end",
|
|
2163
|
+
category: "luxury",
|
|
2164
|
+
heading: "Cormorant Garamond",
|
|
2165
|
+
body: "Raleway",
|
|
2166
|
+
mono: "Fira Code",
|
|
2167
|
+
headingWeight: "600",
|
|
2168
|
+
bodyWeight: "300",
|
|
2169
|
+
letterSpacing: { heading: "0.02em", body: "0.01em" },
|
|
2170
|
+
lineHeight: { heading: "1.3", body: "1.7" },
|
|
2171
|
+
wcagReadable: false,
|
|
2172
|
+
// Thinner weights
|
|
2173
|
+
mood: ["luxury", "elegant", "sophisticated"],
|
|
2174
|
+
bestFor: "Fashion, luxury brands, high-end services",
|
|
2175
|
+
pairing: "Serif + Thin Sans"
|
|
2176
|
+
},
|
|
2177
|
+
{
|
|
2178
|
+
id: "prestige",
|
|
2179
|
+
name: "Prestige",
|
|
2180
|
+
description: "Refined elegance with Bodoni-inspired display",
|
|
2181
|
+
category: "luxury",
|
|
2182
|
+
heading: "Libre Bodoni",
|
|
2183
|
+
body: "Montserrat",
|
|
2184
|
+
mono: "Fira Code",
|
|
2185
|
+
headingWeight: "700",
|
|
2186
|
+
bodyWeight: "300",
|
|
2187
|
+
letterSpacing: { heading: "0.03em", body: "0.02em" },
|
|
2188
|
+
lineHeight: { heading: "1.2", body: "1.7" },
|
|
2189
|
+
wcagReadable: false,
|
|
2190
|
+
// Display font + thin weight
|
|
2191
|
+
mood: ["prestige", "refined", "luxurious"],
|
|
2192
|
+
bestFor: "Luxury fashion, jewelry, premium services",
|
|
2193
|
+
pairing: "Serif Display + Geometric Sans"
|
|
2194
|
+
},
|
|
2195
|
+
// === CREATIVE ===
|
|
2196
|
+
{
|
|
2197
|
+
id: "creative-bold",
|
|
2198
|
+
name: "Creative Bold",
|
|
2199
|
+
description: "Strong personality with Poppins",
|
|
2200
|
+
category: "creative",
|
|
2201
|
+
heading: "Poppins",
|
|
2202
|
+
body: "Poppins",
|
|
2203
|
+
mono: "Fira Code",
|
|
2204
|
+
headingWeight: "700",
|
|
2205
|
+
bodyWeight: "400",
|
|
2206
|
+
letterSpacing: { heading: "-0.01em", body: "0" },
|
|
2207
|
+
lineHeight: { heading: "1.2", body: "1.6" },
|
|
2208
|
+
wcagReadable: true,
|
|
2209
|
+
mood: ["bold", "creative", "energetic"],
|
|
2210
|
+
bestFor: "Creative agencies, portfolios, marketing sites",
|
|
2211
|
+
pairing: "Geometric Sans (Single Font)"
|
|
2212
|
+
},
|
|
2213
|
+
{
|
|
2214
|
+
id: "artistic-flair",
|
|
2215
|
+
name: "Artistic Flair",
|
|
2216
|
+
description: "Expressive serif with modern sans",
|
|
2217
|
+
category: "creative",
|
|
2218
|
+
heading: "Abril Fatface",
|
|
2219
|
+
body: "Work Sans",
|
|
2220
|
+
mono: "Fira Code",
|
|
2221
|
+
headingWeight: "400",
|
|
2222
|
+
bodyWeight: "400",
|
|
2223
|
+
letterSpacing: { heading: "0", body: "0" },
|
|
2224
|
+
lineHeight: { heading: "1.1", body: "1.6" },
|
|
2225
|
+
wcagReadable: true,
|
|
2226
|
+
mood: ["artistic", "expressive", "bold"],
|
|
2227
|
+
bestFor: "Art galleries, creative studios, designer portfolios",
|
|
2228
|
+
pairing: "Display Serif + Neutral Sans"
|
|
2229
|
+
},
|
|
2230
|
+
// === PLAYFUL ===
|
|
2231
|
+
{
|
|
2232
|
+
id: "playful-rounded",
|
|
2233
|
+
name: "Playful Rounded",
|
|
2234
|
+
description: "Fun and energetic for youth audiences",
|
|
2235
|
+
category: "playful",
|
|
2236
|
+
heading: "Fredoka",
|
|
2237
|
+
body: "Karla",
|
|
2238
|
+
mono: "Fira Code",
|
|
2239
|
+
headingWeight: "700",
|
|
2240
|
+
bodyWeight: "400",
|
|
2241
|
+
letterSpacing: { heading: "0", body: "0" },
|
|
2242
|
+
lineHeight: { heading: "1.3", body: "1.6" },
|
|
2243
|
+
wcagReadable: true,
|
|
2244
|
+
mood: ["playful", "fun", "youthful"],
|
|
2245
|
+
bestFor: "Kids apps, games, entertainment",
|
|
2246
|
+
pairing: "Rounded Display + Grotesque Sans"
|
|
2247
|
+
}
|
|
2248
|
+
];
|
|
2249
|
+
function getFontThemesByCategory(category) {
|
|
2250
|
+
return fontThemes.filter((ft) => ft.category === category);
|
|
2251
|
+
}
|
|
2252
|
+
function getFontThemesByMood(mood) {
|
|
2253
|
+
return fontThemes.filter(
|
|
2254
|
+
(ft) => ft.description.toLowerCase().includes(mood.toLowerCase()) || ft.bestFor?.toLowerCase().includes(mood.toLowerCase()) || ft.mood?.some((m) => m.toLowerCase().includes(mood.toLowerCase()))
|
|
2255
|
+
);
|
|
2256
|
+
}
|
|
2257
|
+
function getFontThemesForUseCase(useCase) {
|
|
2258
|
+
return fontThemes.filter(
|
|
2259
|
+
(ft) => ft.bestFor?.toLowerCase().includes(useCase.toLowerCase())
|
|
2260
|
+
);
|
|
2261
|
+
}
|
|
2262
|
+
function getAccessibleFontThemes() {
|
|
2263
|
+
return fontThemes.filter((ft) => ft.wcagReadable === true);
|
|
2264
|
+
}
|
|
2265
|
+
function getFontThemeById(id) {
|
|
2266
|
+
return fontThemes.find((ft) => ft.id === id);
|
|
2267
|
+
}
|
|
2268
|
+
function generateScale(fontTheme) {
|
|
2269
|
+
const headingWeight = parseInt(fontTheme.headingWeight || "700", 10);
|
|
2270
|
+
const bodyWeight = parseInt(fontTheme.bodyWeight || "400", 10);
|
|
2271
|
+
const headingLetterSpacing = fontTheme.letterSpacing?.heading || "-0.02em";
|
|
2272
|
+
const bodyLetterSpacing = fontTheme.letterSpacing?.body || "0";
|
|
2273
|
+
const headingLineHeight = parseFloat(fontTheme.lineHeight?.heading || "1.2");
|
|
2274
|
+
const bodyLineHeight = parseFloat(fontTheme.lineHeight?.body || "1.6");
|
|
2275
|
+
return {
|
|
2276
|
+
display: {
|
|
2277
|
+
fontFamily: fontTheme.heading,
|
|
2278
|
+
weight: Math.min(headingWeight + 100, 800),
|
|
2279
|
+
// Slightly bolder for display
|
|
2280
|
+
size: 96,
|
|
2281
|
+
lineHeight: 1.1,
|
|
2282
|
+
letterSpacing: "-0.03em"
|
|
2283
|
+
},
|
|
2284
|
+
h1: {
|
|
2285
|
+
fontFamily: fontTheme.heading,
|
|
2286
|
+
weight: headingWeight,
|
|
2287
|
+
size: 64,
|
|
2288
|
+
lineHeight: headingLineHeight,
|
|
2289
|
+
letterSpacing: headingLetterSpacing
|
|
2290
|
+
},
|
|
2291
|
+
h2: {
|
|
2292
|
+
fontFamily: fontTheme.heading,
|
|
2293
|
+
weight: Math.max(headingWeight - 100, 600),
|
|
2294
|
+
// Slightly lighter than H1
|
|
2295
|
+
size: 48,
|
|
2296
|
+
lineHeight: 1.3,
|
|
2297
|
+
letterSpacing: headingLetterSpacing === "-0.02em" ? "-0.01em" : headingLetterSpacing
|
|
2298
|
+
},
|
|
2299
|
+
h3: {
|
|
2300
|
+
fontFamily: fontTheme.heading,
|
|
2301
|
+
weight: Math.max(headingWeight - 100, 600),
|
|
2302
|
+
size: 36,
|
|
2303
|
+
lineHeight: 1.3,
|
|
2304
|
+
letterSpacing: "0"
|
|
2305
|
+
},
|
|
2306
|
+
h4: {
|
|
2307
|
+
fontFamily: fontTheme.heading,
|
|
2308
|
+
weight: Math.max(headingWeight - 100, 600),
|
|
2309
|
+
size: 24,
|
|
2310
|
+
lineHeight: 1.4,
|
|
2311
|
+
letterSpacing: "0"
|
|
2312
|
+
},
|
|
2313
|
+
body: {
|
|
2314
|
+
fontFamily: fontTheme.body,
|
|
2315
|
+
weight: bodyWeight,
|
|
2316
|
+
size: 16,
|
|
2317
|
+
lineHeight: bodyLineHeight,
|
|
2318
|
+
letterSpacing: bodyLetterSpacing
|
|
2319
|
+
},
|
|
2320
|
+
small: {
|
|
2321
|
+
fontFamily: fontTheme.body,
|
|
2322
|
+
weight: bodyWeight,
|
|
2323
|
+
size: 14,
|
|
2324
|
+
lineHeight: 1.5,
|
|
2325
|
+
letterSpacing: "0.01em"
|
|
2326
|
+
},
|
|
2327
|
+
code: {
|
|
2328
|
+
fontFamily: fontTheme.mono,
|
|
2329
|
+
weight: 400,
|
|
2330
|
+
// Code is typically regular weight
|
|
2331
|
+
size: 14,
|
|
2332
|
+
lineHeight: 1.4,
|
|
2333
|
+
letterSpacing: "0"
|
|
2334
|
+
}
|
|
2335
|
+
};
|
|
2336
|
+
}
|
|
2337
|
+
|
|
2338
|
+
// ../tokens/src/index.ts
|
|
2339
|
+
var THEME_NAMES = ["studio", "sage", "volt"];
|
|
2340
|
+
var COLOR_MODES = ["light", "dark"];
|
|
2341
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
2342
|
+
0 && (module.exports = {
|
|
2343
|
+
COLOR_MODES,
|
|
2344
|
+
THEME_NAMES,
|
|
2345
|
+
accentColorDerivations,
|
|
2346
|
+
adjustLightness,
|
|
2347
|
+
adjustOpacity,
|
|
2348
|
+
adjustSaturation,
|
|
2349
|
+
baseTokens,
|
|
2350
|
+
codeColors,
|
|
2351
|
+
colorPalettes,
|
|
2352
|
+
computeDerivedTokens,
|
|
2353
|
+
fontFamilies,
|
|
2354
|
+
fontLoadingConfig,
|
|
2355
|
+
fontSizes,
|
|
2356
|
+
fontThemes,
|
|
2357
|
+
fontWeights,
|
|
2358
|
+
generateScale,
|
|
2359
|
+
getAccessibleFontThemes,
|
|
2360
|
+
getAccessiblePalettes,
|
|
2361
|
+
getContrastRatio,
|
|
2362
|
+
getDependentTokens,
|
|
2363
|
+
getFontThemeById,
|
|
2364
|
+
getFontThemesByCategory,
|
|
2365
|
+
getFontThemesByMood,
|
|
2366
|
+
getFontThemesForUseCase,
|
|
2367
|
+
getFontVariable,
|
|
2368
|
+
getLuminance,
|
|
2369
|
+
getOptimalForeground,
|
|
2370
|
+
getPalettesByCategory,
|
|
2371
|
+
getPalettesByMood,
|
|
2372
|
+
getPalettesForUseCase,
|
|
2373
|
+
getResponsiveFontSize,
|
|
2374
|
+
getThemeFontVariables,
|
|
2375
|
+
hexToHSL,
|
|
2376
|
+
hexToRgb,
|
|
2377
|
+
hslToHex,
|
|
2378
|
+
letterSpacing,
|
|
2379
|
+
lineHeights,
|
|
2380
|
+
modeSpecificDerivations,
|
|
2381
|
+
motion,
|
|
2382
|
+
primaryColorDerivations,
|
|
2383
|
+
rotateHue,
|
|
2384
|
+
sageTokens,
|
|
2385
|
+
secondaryColorDerivations,
|
|
2386
|
+
semanticLetterSpacing,
|
|
2387
|
+
semanticLineHeights,
|
|
2388
|
+
semanticSizes,
|
|
2389
|
+
semanticWeights,
|
|
2390
|
+
spacing,
|
|
2391
|
+
studioTokens,
|
|
2392
|
+
syntaxColors,
|
|
2393
|
+
tokenDependencyGraph,
|
|
2394
|
+
typePresets,
|
|
2395
|
+
typography,
|
|
2396
|
+
typographySystem,
|
|
2397
|
+
voltTokens
|
|
2398
|
+
});
|
|
2399
|
+
//# sourceMappingURL=tokens.js.map
|