@marianmeres/design-tokens 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +85 -0
- package/API.md +271 -0
- package/CLAUDE.md +3 -0
- package/LICENSE +21 -0
- package/README.md +139 -0
- package/dist/colors.d.ts +301 -0
- package/dist/colors.js +301 -0
- package/dist/generate.d.ts +14 -0
- package/dist/generate.js +137 -0
- package/dist/mod.d.ts +13 -0
- package/dist/mod.js +12 -0
- package/dist/reboot-bridge.d.ts +27 -0
- package/dist/reboot-bridge.js +89 -0
- package/dist/themes/blue-orange.d.ts +3 -0
- package/dist/themes/blue-orange.js +117 -0
- package/dist/themes/cyan-red.d.ts +3 -0
- package/dist/themes/cyan-red.js +117 -0
- package/dist/themes/cyan-slate.d.ts +3 -0
- package/dist/themes/cyan-slate.js +117 -0
- package/dist/themes/dds.d.ts +3 -0
- package/dist/themes/dds.js +133 -0
- package/dist/themes/emerald-amber-forest.d.ts +3 -0
- package/dist/themes/emerald-amber-forest.js +117 -0
- package/dist/themes/emerald-pink.d.ts +3 -0
- package/dist/themes/emerald-pink.js +117 -0
- package/dist/themes/fuchsia-emerald.d.ts +3 -0
- package/dist/themes/fuchsia-emerald.js +117 -0
- package/dist/themes/gray.d.ts +3 -0
- package/dist/themes/gray.js +66 -0
- package/dist/themes/indigo-amber.d.ts +3 -0
- package/dist/themes/indigo-amber.js +117 -0
- package/dist/themes/lime-fuchsia-neon.d.ts +3 -0
- package/dist/themes/lime-fuchsia-neon.js +117 -0
- package/dist/themes/mod.d.ts +72 -0
- package/dist/themes/mod.js +71 -0
- package/dist/themes/monokai-cyan.d.ts +3 -0
- package/dist/themes/monokai-cyan.js +119 -0
- package/dist/themes/monokai-green.d.ts +3 -0
- package/dist/themes/monokai-green.js +119 -0
- package/dist/themes/monokai-pink.d.ts +3 -0
- package/dist/themes/monokai-pink.js +119 -0
- package/dist/themes/orange-pink-sunset.d.ts +3 -0
- package/dist/themes/orange-pink-sunset.js +117 -0
- package/dist/themes/pink-emerald.d.ts +3 -0
- package/dist/themes/pink-emerald.js +117 -0
- package/dist/themes/pink-teal.d.ts +3 -0
- package/dist/themes/pink-teal.js +117 -0
- package/dist/themes/purple-yellow.d.ts +3 -0
- package/dist/themes/purple-yellow.js +117 -0
- package/dist/themes/rainbow.d.ts +3 -0
- package/dist/themes/rainbow.js +122 -0
- package/dist/themes/red-blue.d.ts +3 -0
- package/dist/themes/red-blue.js +117 -0
- package/dist/themes/red-cyan.d.ts +3 -0
- package/dist/themes/red-cyan.js +117 -0
- package/dist/themes/red-sky-slate.d.ts +3 -0
- package/dist/themes/red-sky-slate.js +117 -0
- package/dist/themes/red-sky.d.ts +3 -0
- package/dist/themes/red-sky.js +117 -0
- package/dist/themes/rose-teal.d.ts +3 -0
- package/dist/themes/rose-teal.js +117 -0
- package/dist/themes/sky-amber.d.ts +3 -0
- package/dist/themes/sky-amber.js +117 -0
- package/dist/themes/slate-cyan.d.ts +3 -0
- package/dist/themes/slate-cyan.js +117 -0
- package/dist/themes/slate-teal-ocean.d.ts +3 -0
- package/dist/themes/slate-teal-ocean.js +117 -0
- package/dist/themes/stone-orange-earth.d.ts +3 -0
- package/dist/themes/stone-orange-earth.js +117 -0
- package/dist/themes/stone.d.ts +3 -0
- package/dist/themes/stone.js +72 -0
- package/dist/themes/teal-rose.d.ts +3 -0
- package/dist/themes/teal-rose.js +117 -0
- package/dist/themes/violet-lime.d.ts +3 -0
- package/dist/themes/violet-lime.js +117 -0
- package/dist/themes/violet-rose-dusk.d.ts +3 -0
- package/dist/themes/violet-rose-dusk.js +117 -0
- package/dist/themes/zinc.d.ts +3 -0
- package/dist/themes/zinc.js +66 -0
- package/dist/types.d.ts +48 -0
- package/dist/types.js +1 -0
- package/dist/utils.d.ts +11 -0
- package/dist/utils.js +28 -0
- package/package.json +23 -0
package/dist/generate.js
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/** Check if a single color is an object with states or a plain string */
|
|
2
|
+
function isSingleColorObject(value) {
|
|
3
|
+
return typeof value === "object" && "DEFAULT" in value;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Derive hover/active using color-mix (pure CSS, no Tailwind).
|
|
7
|
+
* Light mode: darken. Dark mode: lighten.
|
|
8
|
+
*/
|
|
9
|
+
function deriveColorMixStates(cssVarRef, mode) {
|
|
10
|
+
const mix = mode === "light" ? "black" : "white";
|
|
11
|
+
return {
|
|
12
|
+
hover: `color-mix(in oklch, ${cssVarRef}, ${mix} 10%)`,
|
|
13
|
+
active: `color-mix(in oklch, ${cssVarRef}, ${mix} 20%)`,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
/** Fill missing hover/active on a ColorPair */
|
|
17
|
+
function fillPairStates(pair, prefix, key, mode) {
|
|
18
|
+
if (pair.hover !== undefined && pair.active !== undefined) {
|
|
19
|
+
return pair;
|
|
20
|
+
}
|
|
21
|
+
const derived = deriveColorMixStates(`var(--${prefix}color-${key})`, mode);
|
|
22
|
+
return {
|
|
23
|
+
...pair,
|
|
24
|
+
hover: pair.hover ?? derived.hover,
|
|
25
|
+
active: pair.active ?? derived.active,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/** Fill missing hover/active on a ColorValue */
|
|
29
|
+
function fillColorValueStates(color, prefix, key, mode) {
|
|
30
|
+
if (color.hover !== undefined && color.active !== undefined) {
|
|
31
|
+
return color;
|
|
32
|
+
}
|
|
33
|
+
const derived = deriveColorMixStates(`var(--${prefix}color-${key})`, mode);
|
|
34
|
+
return {
|
|
35
|
+
...color,
|
|
36
|
+
hover: color.hover ?? derived.hover,
|
|
37
|
+
active: color.active ?? derived.active,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/** Generate color tokens for a paired color (with foreground) */
|
|
41
|
+
function generatePairedColorTokens(tokens, key, pair, prefix) {
|
|
42
|
+
tokens[`${prefix}color-${key}`] = pair.DEFAULT;
|
|
43
|
+
tokens[`${prefix}color-${key}-hover`] = pair.hover ?? pair.DEFAULT;
|
|
44
|
+
tokens[`${prefix}color-${key}-active`] = pair.active ?? pair.DEFAULT;
|
|
45
|
+
tokens[`${prefix}color-${key}-foreground`] = pair.foreground;
|
|
46
|
+
tokens[`${prefix}color-${key}-foreground-hover`] = pair.foreground;
|
|
47
|
+
tokens[`${prefix}color-${key}-foreground-active`] = pair.foreground;
|
|
48
|
+
}
|
|
49
|
+
/** Generate color tokens for a single color */
|
|
50
|
+
function generateSingleColorTokens(tokens, key, color, prefix) {
|
|
51
|
+
if (isSingleColorObject(color)) {
|
|
52
|
+
tokens[`${prefix}color-${key}`] = color.DEFAULT;
|
|
53
|
+
tokens[`${prefix}color-${key}-hover`] = color.hover ?? color.DEFAULT;
|
|
54
|
+
tokens[`${prefix}color-${key}-active`] = color.active ?? color.DEFAULT;
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
tokens[`${prefix}color-${key}`] = color;
|
|
58
|
+
tokens[`${prefix}color-${key}-hover`] = color;
|
|
59
|
+
tokens[`${prefix}color-${key}-active`] = color;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Generate CSS token key-value pairs from a TokenSchema.
|
|
64
|
+
*
|
|
65
|
+
* @param schema - The token schema
|
|
66
|
+
* @param prefix - Required CSS variable prefix (e.g. "my-", "site-")
|
|
67
|
+
* @param mode - Light or dark mode (affects auto-derivation direction)
|
|
68
|
+
*/
|
|
69
|
+
export function generateCssTokens(schema, prefix, mode = "light") {
|
|
70
|
+
const tokens = {};
|
|
71
|
+
// Intent colors (auto-derive hover/active via color-mix)
|
|
72
|
+
for (const [key, pair] of Object.entries(schema.colors.intent)) {
|
|
73
|
+
generatePairedColorTokens(tokens, key, fillPairStates(pair, prefix, key, mode), prefix);
|
|
74
|
+
}
|
|
75
|
+
// Surface-intent tokens (auto-derived from intent colors using color-mix)
|
|
76
|
+
const contrastMix = mode === "light" ? "black" : "white";
|
|
77
|
+
for (const key of Object.keys(schema.colors.intent)) {
|
|
78
|
+
tokens[`${prefix}color-surface-${key}`] =
|
|
79
|
+
`color-mix(in srgb, var(--${prefix}color-${key}) 15%, var(--${prefix}color-background))`;
|
|
80
|
+
tokens[`${prefix}color-surface-${key}-foreground`] =
|
|
81
|
+
`color-mix(in srgb, var(--${prefix}color-${key}), ${contrastMix} 10%)`;
|
|
82
|
+
tokens[`${prefix}color-surface-${key}-border`] =
|
|
83
|
+
`color-mix(in srgb, var(--${prefix}color-${key}) 30%, var(--${prefix}color-background))`;
|
|
84
|
+
}
|
|
85
|
+
// Role colors (paired) — auto-derive except "background"
|
|
86
|
+
for (const [key, pair] of Object.entries(schema.colors.role.paired)) {
|
|
87
|
+
const filled = key === "background"
|
|
88
|
+
? pair
|
|
89
|
+
: fillPairStates(pair, prefix, key, mode);
|
|
90
|
+
generatePairedColorTokens(tokens, key, filled, prefix);
|
|
91
|
+
}
|
|
92
|
+
// Role colors (single)
|
|
93
|
+
for (const [key, color] of Object.entries(schema.colors.role.single)) {
|
|
94
|
+
if (isSingleColorObject(color)) {
|
|
95
|
+
generateSingleColorTokens(tokens, key, fillColorValueStates(color, prefix, key, mode), prefix);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
generateSingleColorTokens(tokens, key, color, prefix);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return tokens;
|
|
102
|
+
}
|
|
103
|
+
/** Convert tokens object to a CSS declaration block */
|
|
104
|
+
export function toCssString(tokens, selector = ":root") {
|
|
105
|
+
const maxLen = Math.max(...Object.keys(tokens).map((k) => `--${k}`.length));
|
|
106
|
+
// Group tokens by base color name (preserving order)
|
|
107
|
+
// Extract base: "{prefix}color-{base}-..." → "{base}"
|
|
108
|
+
const getBaseColor = (key) => {
|
|
109
|
+
const match = key.match(/color-([a-z]+-?\d*)/);
|
|
110
|
+
return match ? match[1] : key;
|
|
111
|
+
};
|
|
112
|
+
const groups = new Map();
|
|
113
|
+
for (const [key, value] of Object.entries(tokens)) {
|
|
114
|
+
const base = getBaseColor(key);
|
|
115
|
+
if (!groups.has(base))
|
|
116
|
+
groups.set(base, []);
|
|
117
|
+
groups.get(base).push([key, value]);
|
|
118
|
+
}
|
|
119
|
+
const formatVar = ([key, value]) => {
|
|
120
|
+
const cssKey = `--${key}:`;
|
|
121
|
+
return `\t${cssKey.padEnd(maxLen + 1)} ${value};`;
|
|
122
|
+
};
|
|
123
|
+
const parts = [];
|
|
124
|
+
for (const entries of groups.values()) {
|
|
125
|
+
parts.push(entries.map(formatVar).join("\n"));
|
|
126
|
+
}
|
|
127
|
+
return `${selector} {\n${parts.join("\n\n")}\n}\n`;
|
|
128
|
+
}
|
|
129
|
+
/** Generate complete CSS for a theme (light + optional dark mode) */
|
|
130
|
+
export function generateThemeCss(schema, prefix) {
|
|
131
|
+
let css = toCssString(generateCssTokens(schema.light, prefix, "light"));
|
|
132
|
+
if (schema.dark) {
|
|
133
|
+
css += "\n" +
|
|
134
|
+
toCssString(generateCssTokens(schema.dark, prefix, "dark"), ":root.dark");
|
|
135
|
+
}
|
|
136
|
+
return css;
|
|
137
|
+
}
|
package/dist/mod.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS custom property generator for design token systems.
|
|
3
|
+
*
|
|
4
|
+
* Takes a structured color token schema and produces CSS variables for
|
|
5
|
+
* light and dark modes, with automatic hover/active state derivation
|
|
6
|
+
* using `color-mix()`.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
export { generateCssTokens, generateThemeCss, toCssString } from "./generate.js";
|
|
11
|
+
export type { ColorPair, ColorValue, GeneratedTokens, IntentColorKey, RolePairedKey, RoleSingleKey, SingleColor, ThemeSchema, TokenSchema, WithOptional, WithRequired, } from "./types.js";
|
|
12
|
+
export { hexToRgb, hexToRgbTriplet } from "./utils.js";
|
|
13
|
+
export { colors } from "./colors.js";
|
package/dist/mod.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CSS custom property generator for design token systems.
|
|
3
|
+
*
|
|
4
|
+
* Takes a structured color token schema and produces CSS variables for
|
|
5
|
+
* light and dark modes, with automatic hover/active state derivation
|
|
6
|
+
* using `color-mix()`.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
export { generateCssTokens, generateThemeCss, toCssString } from "./generate.js";
|
|
11
|
+
export { hexToRgb, hexToRgbTriplet } from "./utils.js";
|
|
12
|
+
export { colors } from "./colors.js";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bootstrap Reboot CSS variable bridge.
|
|
3
|
+
*
|
|
4
|
+
* Maps design tokens to the `--bs-*` variables that Bootstrap Reboot's
|
|
5
|
+
* CSS rules consume, enabling drop-in theming of Reboot-styled pages.
|
|
6
|
+
*
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
import type { GeneratedTokens, ThemeSchema } from "./types.js";
|
|
10
|
+
/**
|
|
11
|
+
* Generate Bootstrap Reboot bridge CSS variables from design tokens.
|
|
12
|
+
*
|
|
13
|
+
* Maps design tokens to the --bs-* variables that Reboot's CSS rules actually use.
|
|
14
|
+
* For RGB triplet variables (--bs-*-rgb), hex values are parsed automatically.
|
|
15
|
+
* Non-hex values are passed through for hex fields but cannot produce RGB triplets.
|
|
16
|
+
*
|
|
17
|
+
* @param tokens - Generated token key-value pairs (from generateCssTokens)
|
|
18
|
+
* @param prefix - The same prefix used in generateCssTokens
|
|
19
|
+
*/
|
|
20
|
+
export declare function generateRebootBridge(tokens: GeneratedTokens, prefix: string): GeneratedTokens;
|
|
21
|
+
/**
|
|
22
|
+
* Generate complete themed CSS including both design tokens AND reboot bridge.
|
|
23
|
+
*
|
|
24
|
+
* @param schema - Theme schema with light (required) and dark (optional) modes
|
|
25
|
+
* @param prefix - Required CSS variable prefix
|
|
26
|
+
*/
|
|
27
|
+
export declare function generateThemedCss(schema: ThemeSchema, prefix: string): string;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bootstrap Reboot CSS variable bridge.
|
|
3
|
+
*
|
|
4
|
+
* Maps design tokens to the `--bs-*` variables that Bootstrap Reboot's
|
|
5
|
+
* CSS rules consume, enabling drop-in theming of Reboot-styled pages.
|
|
6
|
+
*
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
9
|
+
import { generateCssTokens, toCssString } from "./generate.js";
|
|
10
|
+
import { hexToRgbTriplet } from "./utils.js";
|
|
11
|
+
/**
|
|
12
|
+
* Generate Bootstrap Reboot bridge CSS variables from design tokens.
|
|
13
|
+
*
|
|
14
|
+
* Maps design tokens to the --bs-* variables that Reboot's CSS rules actually use.
|
|
15
|
+
* For RGB triplet variables (--bs-*-rgb), hex values are parsed automatically.
|
|
16
|
+
* Non-hex values are passed through for hex fields but cannot produce RGB triplets.
|
|
17
|
+
*
|
|
18
|
+
* @param tokens - Generated token key-value pairs (from generateCssTokens)
|
|
19
|
+
* @param prefix - The same prefix used in generateCssTokens
|
|
20
|
+
*/
|
|
21
|
+
export function generateRebootBridge(tokens, prefix) {
|
|
22
|
+
const bridge = {};
|
|
23
|
+
const get = (key) => tokens[`${prefix}color-${key}`];
|
|
24
|
+
// Helper: set a --bs-* var and optionally its -rgb triplet companion
|
|
25
|
+
const set = (bsKey, value) => {
|
|
26
|
+
if (value === undefined)
|
|
27
|
+
return;
|
|
28
|
+
bridge[`bs-${bsKey}`] = value;
|
|
29
|
+
};
|
|
30
|
+
const setWithRgb = (bsKey, value) => {
|
|
31
|
+
if (value === undefined)
|
|
32
|
+
return;
|
|
33
|
+
bridge[`bs-${bsKey}`] = value;
|
|
34
|
+
const triplet = hexToRgbTriplet(value);
|
|
35
|
+
if (triplet)
|
|
36
|
+
bridge[`bs-${bsKey}-rgb`] = triplet;
|
|
37
|
+
};
|
|
38
|
+
// Body
|
|
39
|
+
setWithRgb("body-bg", get("background"));
|
|
40
|
+
setWithRgb("body-color", get("background-foreground"));
|
|
41
|
+
// Links
|
|
42
|
+
setWithRgb("link-color", get("primary"));
|
|
43
|
+
set("link-decoration", undefined); // leave as reboot default
|
|
44
|
+
// Link hover — use primary-hover token value
|
|
45
|
+
const primaryHover = tokens[`${prefix}color-primary-hover`];
|
|
46
|
+
if (primaryHover) {
|
|
47
|
+
setWithRgb("link-hover-color", primaryHover);
|
|
48
|
+
}
|
|
49
|
+
// Border
|
|
50
|
+
set("border-color", get("border"));
|
|
51
|
+
// Heading
|
|
52
|
+
set("heading-color", get("background-foreground"));
|
|
53
|
+
// Code
|
|
54
|
+
const accent = get("accent");
|
|
55
|
+
if (accent)
|
|
56
|
+
set("code-color", accent);
|
|
57
|
+
// Semantic colors
|
|
58
|
+
set("primary", get("primary"));
|
|
59
|
+
set("danger", get("destructive"));
|
|
60
|
+
set("warning", get("warning"));
|
|
61
|
+
set("success", get("success"));
|
|
62
|
+
// Secondary (muted)
|
|
63
|
+
set("secondary-color", get("muted-foreground"));
|
|
64
|
+
set("secondary-bg", get("muted"));
|
|
65
|
+
// Highlight
|
|
66
|
+
set("highlight-color", get("background-foreground"));
|
|
67
|
+
set("highlight-bg", get("warning"));
|
|
68
|
+
return bridge;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Generate complete themed CSS including both design tokens AND reboot bridge.
|
|
72
|
+
*
|
|
73
|
+
* @param schema - Theme schema with light (required) and dark (optional) modes
|
|
74
|
+
* @param prefix - Required CSS variable prefix
|
|
75
|
+
*/
|
|
76
|
+
export function generateThemedCss(schema, prefix) {
|
|
77
|
+
// Light mode
|
|
78
|
+
const lightTokens = generateCssTokens(schema.light, prefix, "light");
|
|
79
|
+
const lightBridge = generateRebootBridge(lightTokens, prefix);
|
|
80
|
+
let css = toCssString({ ...lightTokens, ...lightBridge });
|
|
81
|
+
// Dark mode
|
|
82
|
+
if (schema.dark) {
|
|
83
|
+
const darkTokens = generateCssTokens(schema.dark, prefix, "dark");
|
|
84
|
+
const darkBridge = generateRebootBridge(darkTokens, prefix);
|
|
85
|
+
css += "\n" +
|
|
86
|
+
toCssString({ ...darkTokens, ...darkBridge }, ":root.dark");
|
|
87
|
+
}
|
|
88
|
+
return css;
|
|
89
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { colors } from "../colors.js";
|
|
2
|
+
const light = {
|
|
3
|
+
colors: {
|
|
4
|
+
intent: {
|
|
5
|
+
primary: {
|
|
6
|
+
DEFAULT: colors.blue[600],
|
|
7
|
+
foreground: colors.white,
|
|
8
|
+
},
|
|
9
|
+
accent: {
|
|
10
|
+
DEFAULT: colors.orange[500],
|
|
11
|
+
foreground: colors.white,
|
|
12
|
+
},
|
|
13
|
+
destructive: {
|
|
14
|
+
DEFAULT: colors.rose[600],
|
|
15
|
+
foreground: colors.white,
|
|
16
|
+
},
|
|
17
|
+
warning: {
|
|
18
|
+
DEFAULT: colors.orange[500],
|
|
19
|
+
foreground: colors.white,
|
|
20
|
+
},
|
|
21
|
+
success: {
|
|
22
|
+
DEFAULT: colors.teal[600],
|
|
23
|
+
foreground: colors.white,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
role: {
|
|
27
|
+
paired: {
|
|
28
|
+
background: {
|
|
29
|
+
DEFAULT: colors.white,
|
|
30
|
+
foreground: colors.stone[900],
|
|
31
|
+
},
|
|
32
|
+
muted: {
|
|
33
|
+
DEFAULT: colors.stone[100],
|
|
34
|
+
foreground: colors.stone[500],
|
|
35
|
+
},
|
|
36
|
+
surface: {
|
|
37
|
+
DEFAULT: colors.stone[200],
|
|
38
|
+
foreground: colors.stone[900],
|
|
39
|
+
},
|
|
40
|
+
"surface-1": {
|
|
41
|
+
DEFAULT: colors.stone[300],
|
|
42
|
+
foreground: colors.stone[900],
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
single: {
|
|
46
|
+
foreground: colors.stone[900],
|
|
47
|
+
border: {
|
|
48
|
+
DEFAULT: colors.stone[300],
|
|
49
|
+
},
|
|
50
|
+
input: {
|
|
51
|
+
DEFAULT: colors.white,
|
|
52
|
+
hover: colors.stone[50],
|
|
53
|
+
},
|
|
54
|
+
ring: `color-mix(in srgb, ${colors.blue[600]} 20%, transparent)`,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
const dark = {
|
|
60
|
+
colors: {
|
|
61
|
+
intent: {
|
|
62
|
+
primary: {
|
|
63
|
+
DEFAULT: colors.blue[500],
|
|
64
|
+
foreground: colors.white,
|
|
65
|
+
},
|
|
66
|
+
accent: {
|
|
67
|
+
DEFAULT: colors.orange[400],
|
|
68
|
+
foreground: colors.white,
|
|
69
|
+
},
|
|
70
|
+
destructive: {
|
|
71
|
+
DEFAULT: colors.rose[500],
|
|
72
|
+
foreground: colors.white,
|
|
73
|
+
},
|
|
74
|
+
warning: {
|
|
75
|
+
DEFAULT: colors.orange[400],
|
|
76
|
+
foreground: colors.white,
|
|
77
|
+
},
|
|
78
|
+
success: {
|
|
79
|
+
DEFAULT: colors.teal[500],
|
|
80
|
+
foreground: colors.white,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
role: {
|
|
84
|
+
paired: {
|
|
85
|
+
background: {
|
|
86
|
+
DEFAULT: colors.stone[900],
|
|
87
|
+
foreground: colors.stone[50],
|
|
88
|
+
},
|
|
89
|
+
muted: {
|
|
90
|
+
DEFAULT: colors.stone[800],
|
|
91
|
+
foreground: colors.stone[400],
|
|
92
|
+
},
|
|
93
|
+
surface: {
|
|
94
|
+
DEFAULT: colors.stone[700],
|
|
95
|
+
foreground: colors.stone[300],
|
|
96
|
+
},
|
|
97
|
+
"surface-1": {
|
|
98
|
+
DEFAULT: colors.stone[600],
|
|
99
|
+
foreground: colors.stone[200],
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
single: {
|
|
103
|
+
foreground: colors.stone[50],
|
|
104
|
+
border: {
|
|
105
|
+
DEFAULT: colors.stone[700],
|
|
106
|
+
},
|
|
107
|
+
input: {
|
|
108
|
+
DEFAULT: colors.stone[900],
|
|
109
|
+
hover: colors.stone[800],
|
|
110
|
+
},
|
|
111
|
+
ring: `color-mix(in srgb, ${colors.blue[400]} 25%, transparent)`,
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
};
|
|
116
|
+
const theme = { light, dark };
|
|
117
|
+
export default theme;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { colors } from "../colors.js";
|
|
2
|
+
const light = {
|
|
3
|
+
colors: {
|
|
4
|
+
intent: {
|
|
5
|
+
primary: {
|
|
6
|
+
DEFAULT: colors.cyan[600],
|
|
7
|
+
foreground: colors.white,
|
|
8
|
+
},
|
|
9
|
+
accent: {
|
|
10
|
+
DEFAULT: colors.red[500],
|
|
11
|
+
foreground: colors.white,
|
|
12
|
+
},
|
|
13
|
+
destructive: {
|
|
14
|
+
DEFAULT: colors.red[600],
|
|
15
|
+
foreground: colors.white,
|
|
16
|
+
},
|
|
17
|
+
warning: {
|
|
18
|
+
DEFAULT: colors.orange[500],
|
|
19
|
+
foreground: colors.white,
|
|
20
|
+
},
|
|
21
|
+
success: {
|
|
22
|
+
DEFAULT: colors.teal[600],
|
|
23
|
+
foreground: colors.white,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
role: {
|
|
27
|
+
paired: {
|
|
28
|
+
background: {
|
|
29
|
+
DEFAULT: colors.white,
|
|
30
|
+
foreground: colors.stone[900],
|
|
31
|
+
},
|
|
32
|
+
muted: {
|
|
33
|
+
DEFAULT: colors.stone[100],
|
|
34
|
+
foreground: colors.stone[500],
|
|
35
|
+
},
|
|
36
|
+
surface: {
|
|
37
|
+
DEFAULT: colors.stone[200],
|
|
38
|
+
foreground: colors.stone[900],
|
|
39
|
+
},
|
|
40
|
+
"surface-1": {
|
|
41
|
+
DEFAULT: colors.stone[300],
|
|
42
|
+
foreground: colors.stone[900],
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
single: {
|
|
46
|
+
foreground: colors.stone[900],
|
|
47
|
+
border: {
|
|
48
|
+
DEFAULT: colors.stone[300],
|
|
49
|
+
},
|
|
50
|
+
input: {
|
|
51
|
+
DEFAULT: colors.white,
|
|
52
|
+
hover: colors.stone[50],
|
|
53
|
+
},
|
|
54
|
+
ring: `color-mix(in srgb, ${colors.cyan[600]} 20%, transparent)`,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
const dark = {
|
|
60
|
+
colors: {
|
|
61
|
+
intent: {
|
|
62
|
+
primary: {
|
|
63
|
+
DEFAULT: colors.cyan[500],
|
|
64
|
+
foreground: colors.white,
|
|
65
|
+
},
|
|
66
|
+
accent: {
|
|
67
|
+
DEFAULT: colors.red[400],
|
|
68
|
+
foreground: colors.white,
|
|
69
|
+
},
|
|
70
|
+
destructive: {
|
|
71
|
+
DEFAULT: colors.red[500],
|
|
72
|
+
foreground: colors.white,
|
|
73
|
+
},
|
|
74
|
+
warning: {
|
|
75
|
+
DEFAULT: colors.orange[400],
|
|
76
|
+
foreground: colors.white,
|
|
77
|
+
},
|
|
78
|
+
success: {
|
|
79
|
+
DEFAULT: colors.teal[500],
|
|
80
|
+
foreground: colors.white,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
role: {
|
|
84
|
+
paired: {
|
|
85
|
+
background: {
|
|
86
|
+
DEFAULT: colors.stone[900],
|
|
87
|
+
foreground: colors.stone[50],
|
|
88
|
+
},
|
|
89
|
+
muted: {
|
|
90
|
+
DEFAULT: colors.stone[800],
|
|
91
|
+
foreground: colors.stone[400],
|
|
92
|
+
},
|
|
93
|
+
surface: {
|
|
94
|
+
DEFAULT: colors.stone[700],
|
|
95
|
+
foreground: colors.stone[300],
|
|
96
|
+
},
|
|
97
|
+
"surface-1": {
|
|
98
|
+
DEFAULT: colors.stone[600],
|
|
99
|
+
foreground: colors.stone[200],
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
single: {
|
|
103
|
+
foreground: colors.stone[50],
|
|
104
|
+
border: {
|
|
105
|
+
DEFAULT: colors.stone[700],
|
|
106
|
+
},
|
|
107
|
+
input: {
|
|
108
|
+
DEFAULT: colors.stone[900],
|
|
109
|
+
hover: colors.stone[800],
|
|
110
|
+
},
|
|
111
|
+
ring: `color-mix(in srgb, ${colors.cyan[400]} 25%, transparent)`,
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
};
|
|
116
|
+
const theme = { light, dark };
|
|
117
|
+
export default theme;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { colors } from "../colors.js";
|
|
2
|
+
const light = {
|
|
3
|
+
colors: {
|
|
4
|
+
intent: {
|
|
5
|
+
primary: {
|
|
6
|
+
DEFAULT: colors.cyan[600],
|
|
7
|
+
foreground: colors.white,
|
|
8
|
+
},
|
|
9
|
+
accent: {
|
|
10
|
+
DEFAULT: colors.slate[500],
|
|
11
|
+
foreground: colors.white,
|
|
12
|
+
},
|
|
13
|
+
destructive: {
|
|
14
|
+
DEFAULT: colors.rose[600],
|
|
15
|
+
foreground: colors.white,
|
|
16
|
+
},
|
|
17
|
+
warning: {
|
|
18
|
+
DEFAULT: colors.amber[500],
|
|
19
|
+
foreground: colors.white,
|
|
20
|
+
},
|
|
21
|
+
success: {
|
|
22
|
+
DEFAULT: colors.teal[600],
|
|
23
|
+
foreground: colors.white,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
role: {
|
|
27
|
+
paired: {
|
|
28
|
+
background: {
|
|
29
|
+
DEFAULT: colors.white,
|
|
30
|
+
foreground: colors.neutral[900],
|
|
31
|
+
},
|
|
32
|
+
muted: {
|
|
33
|
+
DEFAULT: colors.neutral[100],
|
|
34
|
+
foreground: colors.neutral[500],
|
|
35
|
+
},
|
|
36
|
+
surface: {
|
|
37
|
+
DEFAULT: colors.neutral[200],
|
|
38
|
+
foreground: colors.neutral[900],
|
|
39
|
+
},
|
|
40
|
+
"surface-1": {
|
|
41
|
+
DEFAULT: colors.neutral[300],
|
|
42
|
+
foreground: colors.neutral[900],
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
single: {
|
|
46
|
+
foreground: colors.neutral[900],
|
|
47
|
+
border: {
|
|
48
|
+
DEFAULT: colors.neutral[300],
|
|
49
|
+
},
|
|
50
|
+
input: {
|
|
51
|
+
DEFAULT: colors.white,
|
|
52
|
+
hover: colors.neutral[50],
|
|
53
|
+
},
|
|
54
|
+
ring: `color-mix(in srgb, ${colors.cyan[600]} 20%, transparent)`,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
const dark = {
|
|
60
|
+
colors: {
|
|
61
|
+
intent: {
|
|
62
|
+
primary: {
|
|
63
|
+
DEFAULT: colors.cyan[500],
|
|
64
|
+
foreground: colors.white,
|
|
65
|
+
},
|
|
66
|
+
accent: {
|
|
67
|
+
DEFAULT: colors.slate[400],
|
|
68
|
+
foreground: colors.white,
|
|
69
|
+
},
|
|
70
|
+
destructive: {
|
|
71
|
+
DEFAULT: colors.rose[500],
|
|
72
|
+
foreground: colors.white,
|
|
73
|
+
},
|
|
74
|
+
warning: {
|
|
75
|
+
DEFAULT: colors.amber[400],
|
|
76
|
+
foreground: colors.black,
|
|
77
|
+
},
|
|
78
|
+
success: {
|
|
79
|
+
DEFAULT: colors.teal[500],
|
|
80
|
+
foreground: colors.white,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
role: {
|
|
84
|
+
paired: {
|
|
85
|
+
background: {
|
|
86
|
+
DEFAULT: colors.neutral[900],
|
|
87
|
+
foreground: colors.neutral[50],
|
|
88
|
+
},
|
|
89
|
+
muted: {
|
|
90
|
+
DEFAULT: colors.neutral[800],
|
|
91
|
+
foreground: colors.neutral[400],
|
|
92
|
+
},
|
|
93
|
+
surface: {
|
|
94
|
+
DEFAULT: colors.neutral[700],
|
|
95
|
+
foreground: colors.neutral[300],
|
|
96
|
+
},
|
|
97
|
+
"surface-1": {
|
|
98
|
+
DEFAULT: colors.neutral[600],
|
|
99
|
+
foreground: colors.neutral[200],
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
single: {
|
|
103
|
+
foreground: colors.neutral[50],
|
|
104
|
+
border: {
|
|
105
|
+
DEFAULT: colors.neutral[700],
|
|
106
|
+
},
|
|
107
|
+
input: {
|
|
108
|
+
DEFAULT: colors.neutral[900],
|
|
109
|
+
hover: colors.neutral[800],
|
|
110
|
+
},
|
|
111
|
+
ring: `color-mix(in srgb, ${colors.cyan[400]} 25%, transparent)`,
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
};
|
|
116
|
+
const theme = { light, dark };
|
|
117
|
+
export default theme;
|