@eluan/tokens 0.1.0 → 0.2.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/README.md +5 -5
- package/dist/fonts.css +0 -4
- package/dist/index.d.ts +17 -2
- package/dist/index.js +29 -14
- package/dist/modes.css +41 -20
- package/dist/primitives.css +15 -0
- package/dist/themes.css +64 -155
- package/dist/tokens.css +1 -1
- package/package.json +8 -5
- package/dist/fonts-industrial-retro.css +0 -3
package/README.md
CHANGED
|
@@ -24,22 +24,22 @@ import "@eluan/tokens/css"
|
|
|
24
24
|
Then activate a theme by setting attributes on `<html>` (or use `<EluanProvider>` from `@eluan/core`, which wires this up automatically):
|
|
25
25
|
|
|
26
26
|
```html
|
|
27
|
-
<html data-theme="
|
|
27
|
+
<html data-theme="minimal" data-mode="light" data-spacing="standard" data-curves="slight">
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
## Subpath exports
|
|
31
31
|
|
|
32
32
|
```ts
|
|
33
33
|
import "@eluan/tokens/css" // all tokens
|
|
34
|
-
import "@eluan/tokens/fonts/all" // every theme's fonts
|
|
35
|
-
import "@eluan/tokens/fonts/
|
|
36
|
-
import "@eluan/tokens/fonts/minimal"
|
|
34
|
+
import "@eluan/tokens/fonts/all" // every built-in theme's fonts
|
|
35
|
+
import "@eluan/tokens/fonts/base" // shared mono face only
|
|
36
|
+
import "@eluan/tokens/fonts/minimal" // a single theme's fonts
|
|
37
37
|
import { themes, modes, type Theme } from "@eluan/tokens"
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
## Built-in themes
|
|
41
41
|
|
|
42
|
-
`
|
|
42
|
+
`minimal` is the only built-in theme — it is the neutral, typographic baseline every other look starts from. Define your own via `createTheme()` from `@eluan/core`, or generate a full token set from your brand colors with [`@eluan/theme-generator`](https://github.com/vasfio/eluan/tree/main/packages/theme-generator). See the [theming guide](https://github.com/vasfio/eluan/blob/main/docs/theming.md).
|
|
43
43
|
|
|
44
44
|
## License
|
|
45
45
|
|
package/dist/fonts.css
CHANGED
|
@@ -4,10 +4,6 @@
|
|
|
4
4
|
Only medium weight loaded (max weight across all themes = 500).
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
/* Geist — industrial-retro heading + body */
|
|
8
|
-
@import "@fontsource/geist/400.css";
|
|
9
|
-
@import "@fontsource/geist/500.css";
|
|
10
|
-
|
|
11
7
|
/* Geist Mono — all themes mono */
|
|
12
8
|
@import "@fontsource/geist-mono/400.css";
|
|
13
9
|
@import "@fontsource/geist-mono/500.css";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export declare const modes: readonly ["light", "dim", "dark"];
|
|
2
2
|
export type Mode = (typeof modes)[number];
|
|
3
|
-
export declare const themes: readonly ["
|
|
3
|
+
export declare const themes: readonly ["minimal"];
|
|
4
4
|
export type Theme = (typeof themes)[number];
|
|
5
5
|
export declare const spacingScales: readonly ["compact", "standard", "wide"];
|
|
6
6
|
export type SpacingScale = (typeof spacingScales)[number];
|
|
7
7
|
export declare const curveScales: readonly ["sharp", "slight", "sweeping"];
|
|
8
8
|
export type CurveScale = (typeof curveScales)[number];
|
|
9
|
-
export declare const colorPalettes: readonly ["blazeorange", "bluechill", "blueribbon", "bostonblue", "cerise", "crimson", "electriclime", "electricviolet", "forestgreen", "gossamer", "lochmara", "maitai", "mono", "purpleheart", "redviolet", "rockspray", "seagreen", "teak", "torchred", "violeteggplant"];
|
|
9
|
+
export declare const colorPalettes: readonly ["blazeorange", "bluechill", "blueribbon", "bostonblue", "cerise", "concrete", "crimson", "electriclime", "electricviolet", "forestgreen", "gossamer", "lochmara", "maitai", "mono", "purpleheart", "redviolet", "rockspray", "seagreen", "teak", "torchred", "violeteggplant"];
|
|
10
10
|
export type ColorPalette = (typeof colorPalettes)[number];
|
|
11
11
|
export declare const colorShades: readonly ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "950"];
|
|
12
12
|
export type ColorShade = (typeof colorShades)[number];
|
|
@@ -78,6 +78,20 @@ export declare const primitiveColors: {
|
|
|
78
78
|
readonly 900: "#821d3e";
|
|
79
79
|
readonly 950: "#4d0c20";
|
|
80
80
|
};
|
|
81
|
+
readonly concrete: {
|
|
82
|
+
readonly 0: "#ffffff";
|
|
83
|
+
readonly 50: "#fafbf9";
|
|
84
|
+
readonly 100: "#eef0eb";
|
|
85
|
+
readonly 200: "#d7dace";
|
|
86
|
+
readonly 300: "#bfc4b1";
|
|
87
|
+
readonly 400: "#a7ae93";
|
|
88
|
+
readonly 500: "#909876";
|
|
89
|
+
readonly 600: "#757d5e";
|
|
90
|
+
readonly 700: "#5a6048";
|
|
91
|
+
readonly 800: "#3f4332";
|
|
92
|
+
readonly 900: "#2c2f23";
|
|
93
|
+
readonly 950: "#1b1d15";
|
|
94
|
+
};
|
|
81
95
|
readonly crimson: {
|
|
82
96
|
readonly 50: "#fdf2f2";
|
|
83
97
|
readonly 100: "#fde3e4";
|
|
@@ -389,6 +403,7 @@ export declare const themeFonts: Record<Theme, {
|
|
|
389
403
|
heading: string;
|
|
390
404
|
body: string;
|
|
391
405
|
}>;
|
|
406
|
+
export declare const themeNeutrals: Record<Theme, ColorPalette>;
|
|
392
407
|
/**
|
|
393
408
|
* Dynamically load the font CSS for a given theme.
|
|
394
409
|
* Fonts are loaded once and cached — switching back to a previously
|
package/dist/index.js
CHANGED
|
@@ -8,10 +8,9 @@ export const modes = ["light", "dim", "dark"];
|
|
|
8
8
|
// ============================================
|
|
9
9
|
// Available Themes
|
|
10
10
|
// ============================================
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
];
|
|
11
|
+
// `minimal` is the only built-in theme. Everything else is a consumer theme
|
|
12
|
+
// built with createTheme() from @eluan/core or @eluan/theme-generator.
|
|
13
|
+
export const themes = ["minimal"];
|
|
15
14
|
// ============================================
|
|
16
15
|
// Available Spacing Scales
|
|
17
16
|
// ============================================
|
|
@@ -29,6 +28,7 @@ export const colorPalettes = [
|
|
|
29
28
|
"blueribbon",
|
|
30
29
|
"bostonblue",
|
|
31
30
|
"cerise",
|
|
31
|
+
"concrete",
|
|
32
32
|
"crimson",
|
|
33
33
|
"electriclime",
|
|
34
34
|
"electricviolet",
|
|
@@ -61,7 +61,7 @@ export const colorShades = [
|
|
|
61
61
|
"900",
|
|
62
62
|
"950",
|
|
63
63
|
];
|
|
64
|
-
// Mono
|
|
64
|
+
// Mono and concrete have an extra "0" shade for pure white
|
|
65
65
|
export const monoShades = ["0", ...colorShades];
|
|
66
66
|
// ============================================
|
|
67
67
|
// Primitive Color Values (Layer 1)
|
|
@@ -133,6 +133,20 @@ export const primitiveColors = {
|
|
|
133
133
|
900: "#821d3e",
|
|
134
134
|
950: "#4d0c20",
|
|
135
135
|
},
|
|
136
|
+
concrete: {
|
|
137
|
+
0: "#ffffff",
|
|
138
|
+
50: "#fafbf9",
|
|
139
|
+
100: "#eef0eb",
|
|
140
|
+
200: "#d7dace",
|
|
141
|
+
300: "#bfc4b1",
|
|
142
|
+
400: "#a7ae93",
|
|
143
|
+
500: "#909876",
|
|
144
|
+
600: "#757d5e",
|
|
145
|
+
700: "#5a6048",
|
|
146
|
+
800: "#3f4332",
|
|
147
|
+
900: "#2c2f23",
|
|
148
|
+
950: "#1b1d15",
|
|
149
|
+
},
|
|
136
150
|
crimson: {
|
|
137
151
|
50: "#fdf2f2",
|
|
138
152
|
100: "#fde3e4",
|
|
@@ -459,16 +473,21 @@ export const fontFamilies = {
|
|
|
459
473
|
// Theme → Font Mapping (Google Fonts via @fontsource)
|
|
460
474
|
// ============================================
|
|
461
475
|
export const themeFonts = {
|
|
462
|
-
"industrial-retro": {
|
|
463
|
-
heading: "Geist",
|
|
464
|
-
body: "Geist",
|
|
465
|
-
},
|
|
466
476
|
"minimal": {
|
|
467
477
|
heading: "Inter",
|
|
468
478
|
body: "Inter",
|
|
469
479
|
},
|
|
470
480
|
};
|
|
471
481
|
// ============================================
|
|
482
|
+
// Theme → Neutral Ramp Mapping
|
|
483
|
+
// ============================================
|
|
484
|
+
// Which raw palette each theme aliases to --color-neutral-* (see themes.css).
|
|
485
|
+
// Cross-platform consumers and sync tooling (e.g. Figma variables) can use
|
|
486
|
+
// this to resolve mode backgrounds/foregrounds per theme.
|
|
487
|
+
export const themeNeutrals = {
|
|
488
|
+
"minimal": "mono",
|
|
489
|
+
};
|
|
490
|
+
// ============================================
|
|
472
491
|
// Dynamic Font Loader
|
|
473
492
|
// ============================================
|
|
474
493
|
// Loads theme-specific font CSS on demand via <link> injection.
|
|
@@ -478,7 +497,7 @@ export const themeFonts = {
|
|
|
478
497
|
// useEffect(() => { loadThemeFonts(theme) }, [theme])
|
|
479
498
|
//
|
|
480
499
|
// Usage (vanilla):
|
|
481
|
-
// loadThemeFonts('
|
|
500
|
+
// loadThemeFonts('minimal')
|
|
482
501
|
const _loadedFonts = new Set();
|
|
483
502
|
/**
|
|
484
503
|
* Dynamically load the font CSS for a given theme.
|
|
@@ -493,10 +512,6 @@ export async function loadThemeFonts(theme) {
|
|
|
493
512
|
if (_loadedFonts.has(theme))
|
|
494
513
|
return;
|
|
495
514
|
switch (theme) {
|
|
496
|
-
case "industrial-retro":
|
|
497
|
-
await import("@fontsource/geist/400.css");
|
|
498
|
-
await import("@fontsource/geist/500.css");
|
|
499
|
-
break;
|
|
500
515
|
case "minimal":
|
|
501
516
|
await import("@fontsource/inter/400.css");
|
|
502
517
|
await import("@fontsource/inter/500.css");
|
package/dist/modes.css
CHANGED
|
@@ -11,16 +11,25 @@
|
|
|
11
11
|
|
|
12
12
|
[data-mode="Light"],
|
|
13
13
|
[data-mode="light"] {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
--
|
|
19
|
-
--
|
|
20
|
-
--
|
|
21
|
-
--
|
|
22
|
-
--
|
|
23
|
-
--
|
|
14
|
+
/* Skeuomorphic light ingredients — light falls from the top-left along a
|
|
15
|
+
127deg diagonal. Shadows carry the active theme's neutral-950 tone; the
|
|
16
|
+
surface gradients are translucent overlays that model convex (raised)
|
|
17
|
+
and concave (pressed) faces over any base color. */
|
|
18
|
+
--skeuo-highlight: rgba(255, 255, 255, 0.4);
|
|
19
|
+
--skeuo-shade: color-mix(in srgb, var(--color-neutral-950) 10%, transparent);
|
|
20
|
+
--skeuo-shadow: color-mix(in srgb, var(--color-neutral-950) 7%, transparent);
|
|
21
|
+
--skeuo-surface-raised: linear-gradient(127deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 45%, color-mix(in srgb, var(--color-neutral-950) 5%, transparent) 100%);
|
|
22
|
+
--skeuo-surface-pressed: linear-gradient(127deg, color-mix(in srgb, var(--color-neutral-950) 5%, transparent) 0%, rgba(255, 255, 255, 0.01) 60%, rgba(255, 255, 255, 0.06) 100%);
|
|
23
|
+
--backgrounds-primary: var(--color-neutral-0);
|
|
24
|
+
--backgrounds-secondary: var(--color-neutral-100);
|
|
25
|
+
--backgrounds-tertiary: var(--color-neutral-200);
|
|
26
|
+
--backgrounds-quaternary: var(--color-neutral-300);
|
|
27
|
+
--backgrounds-quinary: var(--color-neutral-400);
|
|
28
|
+
--foregrounds-primary: var(--color-neutral-950);
|
|
29
|
+
--foregrounds-secondary: var(--color-neutral-800);
|
|
30
|
+
--foregrounds-tertiary: var(--color-neutral-600);
|
|
31
|
+
--foregrounds-quaternary: var(--color-neutral-500);
|
|
32
|
+
--foregrounds-quinary: var(--color-neutral-400);
|
|
24
33
|
--maitai-main: var(--color-maitai-500);
|
|
25
34
|
--maitai-background: var(--color-maitai-50);
|
|
26
35
|
--maitai-tint: var(--color-maitai-100);
|
|
@@ -118,6 +127,12 @@
|
|
|
118
127
|
}
|
|
119
128
|
|
|
120
129
|
[data-mode="dim"] {
|
|
130
|
+
/* Skeuomorphic light ingredients (shadows carry the teak-950 tone) */
|
|
131
|
+
--skeuo-highlight: rgba(255, 255, 255, 0.35);
|
|
132
|
+
--skeuo-shade: rgba(51, 35, 25, 0.12);
|
|
133
|
+
--skeuo-shadow: rgba(51, 35, 25, 0.09);
|
|
134
|
+
--skeuo-surface-raised: linear-gradient(127deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.03) 45%, rgba(51, 35, 25, 0.05) 100%);
|
|
135
|
+
--skeuo-surface-pressed: linear-gradient(127deg, rgba(51, 35, 25, 0.05) 0%, rgba(255, 255, 255, 0.01) 60%, rgba(255, 255, 255, 0.05) 100%);
|
|
121
136
|
--backgrounds-primary: var(--color-teak-100);
|
|
122
137
|
--backgrounds-secondary: var(--color-teak-200);
|
|
123
138
|
--backgrounds-tertiary: var(--color-teak-300);
|
|
@@ -225,16 +240,22 @@
|
|
|
225
240
|
}
|
|
226
241
|
|
|
227
242
|
[data-mode="dark"] {
|
|
228
|
-
|
|
229
|
-
--
|
|
230
|
-
--
|
|
231
|
-
--
|
|
232
|
-
--
|
|
233
|
-
--
|
|
234
|
-
--
|
|
235
|
-
--
|
|
236
|
-
--
|
|
237
|
-
--
|
|
243
|
+
/* Skeuomorphic light ingredients — highlights dim, shadows deepen in dark */
|
|
244
|
+
--skeuo-highlight: rgba(255, 255, 255, 0.07);
|
|
245
|
+
--skeuo-shade: rgba(0, 0, 0, 0.4);
|
|
246
|
+
--skeuo-shadow: rgba(0, 0, 0, 0.28);
|
|
247
|
+
--skeuo-surface-raised: linear-gradient(127deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.015) 45%, rgba(0, 0, 0, 0.15) 100%);
|
|
248
|
+
--skeuo-surface-pressed: linear-gradient(127deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.03) 60%, rgba(255, 255, 255, 0.03) 100%);
|
|
249
|
+
--backgrounds-primary: var(--color-neutral-800);
|
|
250
|
+
--backgrounds-secondary: var(--color-neutral-900);
|
|
251
|
+
--backgrounds-tertiary: var(--color-neutral-950);
|
|
252
|
+
--backgrounds-quaternary: var(--color-neutral-700);
|
|
253
|
+
--backgrounds-quinary: var(--color-neutral-600);
|
|
254
|
+
--foregrounds-primary: var(--color-neutral-0);
|
|
255
|
+
--foregrounds-secondary: var(--color-neutral-100);
|
|
256
|
+
--foregrounds-tertiary: var(--color-neutral-200);
|
|
257
|
+
--foregrounds-quaternary: var(--color-neutral-300);
|
|
258
|
+
--foregrounds-quinary: var(--color-neutral-400);
|
|
238
259
|
--maitai-main: var(--color-maitai-500);
|
|
239
260
|
--maitai-background: var(--color-maitai-950);
|
|
240
261
|
--maitai-tint: var(--color-maitai-900);
|
package/dist/primitives.css
CHANGED
|
@@ -75,6 +75,21 @@
|
|
|
75
75
|
--color-cerise-900: #821d3e;
|
|
76
76
|
--color-cerise-950: #4d0c20;
|
|
77
77
|
|
|
78
|
+
/* Concrete — warm mineral grey, ported from Remlo's ink ramp (remlo-apple).
|
|
79
|
+
Steps 0–800 are ink0–ink9; 900/950 extend the same hue for dark surfaces. */
|
|
80
|
+
--color-concrete-0: oklch(100% 0 0); /* #ffffff */
|
|
81
|
+
--color-concrete-50: oklch(98.68% 0.0028 128.49); /* #fafbf9 */
|
|
82
|
+
--color-concrete-100: oklch(95.22% 0.007 124.45); /* #eef0eb */
|
|
83
|
+
--color-concrete-200: oklch(88.27% 0.0165 118.16); /* #d7dace */
|
|
84
|
+
--color-concrete-300: oklch(81.11% 0.0267 118.99); /* #bfc4b1 */
|
|
85
|
+
--color-concrete-400: oklch(73.78% 0.0385 119.16); /* #a7ae93 */
|
|
86
|
+
--color-concrete-500: oklch(66.39% 0.0492 118.51); /* #909876 */
|
|
87
|
+
--color-concrete-600: oklch(57.44% 0.0466 119.64); /* #757d5e */
|
|
88
|
+
--color-concrete-700: oklch(47.67% 0.0377 119.25); /* #5a6048 */
|
|
89
|
+
--color-concrete-800: oklch(37.38% 0.0284 118.54); /* #3f4332 */
|
|
90
|
+
--color-concrete-900: oklch(29.82% 0.0213 119.11); /* #2c2f23 */
|
|
91
|
+
--color-concrete-950: oklch(22.57% 0.0152 119.03); /* #1b1d15 */
|
|
92
|
+
|
|
78
93
|
/* Crimson */
|
|
79
94
|
--color-crimson-50: #fdf2f2;
|
|
80
95
|
--color-crimson-100: #fde3e4;
|
package/dist/themes.css
CHANGED
|
@@ -1,172 +1,81 @@
|
|
|
1
1
|
/* ============================================
|
|
2
2
|
* LAYER 3: Themes
|
|
3
|
-
* Component-level tokens that define the visual identity
|
|
4
|
-
*
|
|
3
|
+
* Component-level tokens that define the visual identity.
|
|
4
|
+
* `minimal` is the only built-in theme; define your own with
|
|
5
|
+
* createTheme() from @eluan/core (or @eluan/theme-generator) — a custom
|
|
6
|
+
* theme inherits this token set and overrides only what it names.
|
|
5
7
|
* Categories: action, container, interactive, destructive,
|
|
6
8
|
* cautionary, important, informative, positive, dataviz
|
|
7
9
|
* ============================================ */
|
|
8
10
|
@import "./modes.css";
|
|
9
11
|
/* ----------------------------------------
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
+
* Neutral ramp — theme-selected alias
|
|
13
|
+
* Each theme points --color-neutral-* at the raw scale that carries its
|
|
14
|
+
* monochrome identity; modes.css derives backgrounds/foregrounds from it,
|
|
15
|
+
* so mode step logic stays shared while the ramp swaps per brand.
|
|
16
|
+
* Custom themes can remap the ramp via createTheme token overrides.
|
|
17
|
+
* The :root default mirrors `minimal` (the sole built-in theme) so unthemed
|
|
18
|
+
* scopes still resolve, and must precede the theme blocks so the attribute
|
|
19
|
+
* selectors win the cascade.
|
|
12
20
|
* ---------------------------------------- */
|
|
13
|
-
|
|
14
|
-
--
|
|
15
|
-
--
|
|
16
|
-
--
|
|
17
|
-
|
|
18
|
-
--
|
|
19
|
-
--
|
|
20
|
-
--
|
|
21
|
-
--
|
|
22
|
-
--
|
|
23
|
-
--
|
|
24
|
-
--
|
|
25
|
-
--
|
|
26
|
-
--container-fg-inverse: var(--backgrounds-primary);
|
|
27
|
-
--interactive-bg: var(--backgrounds-primary);
|
|
28
|
-
--interactive-bg-alt: var(--backgrounds-secondary);
|
|
29
|
-
--interactive-bg-alt2: var(--blazeorange-background);
|
|
30
|
-
--interactive-bg-disabled: var(--backgrounds-tertiary);
|
|
31
|
-
--interactive-bg-hover: var(--backgrounds-tertiary);
|
|
32
|
-
--interactive-bg-active: var(--blazeorange-shade);
|
|
33
|
-
--interactive-bg-selected: var(--blazeorange-shade);
|
|
34
|
-
--interactive-bg-inverse: var(--foregrounds-primary);
|
|
35
|
-
--interactive-border: var(--backgrounds-tertiary);
|
|
36
|
-
--interactive-border-alt: var(--backgrounds-quaternary);
|
|
37
|
-
--interactive-border-disabled: var(--backgrounds-quaternary);
|
|
38
|
-
--interactive-fg: var(--foregrounds-primary);
|
|
39
|
-
--interactive-fg-alt: var(--foregrounds-tertiary);
|
|
40
|
-
--interactive-fg-readonly: var(--foregrounds-secondary);
|
|
41
|
-
--interactive-fg-disabled: var(--foregrounds-quinary);
|
|
42
|
-
--interactive-fg-active: var(--blazeorange-tint);
|
|
43
|
-
--interactive-fg-selected: var(--blazeorange-tint);
|
|
44
|
-
--interactive-fg-inverse: var(--backgrounds-primary);
|
|
45
|
-
--action-primary-bg: var(--blazeorange-main);
|
|
46
|
-
--action-primary-bg-hover: var(--blazeorange-shade);
|
|
47
|
-
--action-primary-bg-active: var(--blazeorange-shade);
|
|
48
|
-
--action-primary-bg-selected: var(--blazeorange-shade);
|
|
49
|
-
--action-primary-bg-disabled: var(--blazeorange-tint);
|
|
50
|
-
--action-primary-bg-inverse: var(--blazeorange-background);
|
|
51
|
-
--action-primary-fg: var(--backgrounds-primary);
|
|
52
|
-
--action-primary-fg-disabled: var(--foregrounds-quinary);
|
|
53
|
-
--action-primary-fg-active: var(--backgrounds-primary);
|
|
54
|
-
--action-primary-fg-selected: var(--backgrounds-primary);
|
|
55
|
-
--action-primary-fg-inverse: var(--blazeorange-foreground);
|
|
56
|
-
--action-secondary-bg-hover: var(--blazeorange-tint);
|
|
57
|
-
--action-secondary-bg-active: var(--blazeorange-main);
|
|
58
|
-
--action-secondary-bg-selected: var(--blazeorange-main);
|
|
59
|
-
--action-secondary-bg-disabled: var(--backgrounds-tertiary);
|
|
60
|
-
--action-secondary-border: var(--blazeorange-main);
|
|
61
|
-
--action-secondary-border-alt: var(--blazeorange-shade);
|
|
62
|
-
--action-secondary-border-disabled: var(--blazeorange-tint);
|
|
63
|
-
--action-secondary-border-inverse: var(--blazeorange-background);
|
|
64
|
-
--action-secondary-fg: var(--blazeorange-main);
|
|
65
|
-
--action-secondary-fg-alt: var(--foregrounds-primary);
|
|
66
|
-
--action-secondary-fg-disabled: var(--foregrounds-quinary);
|
|
67
|
-
--action-secondary-fg-active: var(--backgrounds-primary);
|
|
68
|
-
--action-secondary-fg-selected: var(--backgrounds-primary);
|
|
69
|
-
--action-secondary-fg-inverse: var(--foregrounds-primary);
|
|
70
|
-
--action-tertiary-bg: var(--backgrounds-primary);
|
|
71
|
-
--action-tertiary-bg-alt: var(--backgrounds-secondary);
|
|
72
|
-
--action-tertiary-bg-hover: var(--blazeorange-background);
|
|
73
|
-
--action-tertiary-bg-active: var(--blazeorange-tint);
|
|
74
|
-
--action-tertiary-bg-selected: var(--blazeorange-tint);
|
|
75
|
-
--action-tertiary-bg-disabled: var(--backgrounds-primary);
|
|
76
|
-
--action-tertiary-bg-inverse: var(--backgrounds-primary);
|
|
77
|
-
--action-tertiary-border: var(--blazeorange-main);
|
|
78
|
-
--action-tertiary-border-alt: var(--blazeorange-shade);
|
|
79
|
-
--action-tertiary-border-disabled: var(--backgrounds-quaternary);
|
|
80
|
-
--action-tertiary-border-inverse: var(--blazeorange-tint);
|
|
81
|
-
--action-tertiary-fg: var(--blazeorange-main);
|
|
82
|
-
--action-tertiary-fg-alt: var(--foregrounds-primary);
|
|
83
|
-
--action-tertiary-fg-disabled: var(--foregrounds-quinary);
|
|
84
|
-
--action-tertiary-fg-active: var(--blazeorange-foreground);
|
|
85
|
-
--action-tertiary-fg-selected: var(--blazeorange-foreground);
|
|
86
|
-
--action-tertiary-fg-inverse: var(--backgrounds-primary);
|
|
87
|
-
--destructive-bg: var(--torchred-background);
|
|
88
|
-
--destructive-bg-alt: var(--torchred-tint);
|
|
89
|
-
--destructive-bg-hover: var(--torchred-tint);
|
|
90
|
-
--destructive-bg-active: var(--torchred-shade);
|
|
91
|
-
--destructive-bg-selected: var(--torchred-shade);
|
|
92
|
-
--destructive-bg-disabled: var(--backgrounds-tertiary);
|
|
93
|
-
--destructive-bg-inverse: var(--torchred-shade);
|
|
94
|
-
--destructive-border: var(--torchred-main);
|
|
95
|
-
--destructive-border-alt: var(--torchred-shade);
|
|
96
|
-
--destructive-border-disabled: var(--torchred-tint);
|
|
97
|
-
--destructive-border-inverse: var(--torchred-background);
|
|
98
|
-
--destructive-fg: var(--torchred-foreground);
|
|
99
|
-
--destructive-fg-alt: var(--foregrounds-primary);
|
|
100
|
-
--destructive-fg-disabled: var(--foregrounds-quinary);
|
|
101
|
-
--destructive-fg-active: var(--backgrounds-primary);
|
|
102
|
-
--destructive-fg-selected: var(--backgrounds-primary);
|
|
103
|
-
--destructive-fg-inverse: var(--torchred-background);
|
|
104
|
-
--positive-bg: var(--seagreen-background);
|
|
105
|
-
--positive-bg-alt: var(--seagreen-tint);
|
|
106
|
-
--positive-bg-inverse: var(--seagreen-shade);
|
|
107
|
-
--positive-border: var(--seagreen-main);
|
|
108
|
-
--positive-border-alt: var(--seagreen-shade);
|
|
109
|
-
--positive-border-inverse: var(--seagreen-background);
|
|
110
|
-
--positive-fg: var(--seagreen-foreground);
|
|
111
|
-
--positive-fg-alt: var(--foregrounds-primary);
|
|
112
|
-
--positive-fg-inverse: var(--seagreen-background);
|
|
113
|
-
--cautionary-bg: var(--maitai-background);
|
|
114
|
-
--cautionary-bg-alt: var(--maitai-tint);
|
|
115
|
-
--cautionary-bg-inverse: var(--maitai-shade);
|
|
116
|
-
--cautionary-border: var(--maitai-main);
|
|
117
|
-
--cautionary-border-alt: var(--maitai-shade);
|
|
118
|
-
--cautionary-border-inverse: var(--maitai-background);
|
|
119
|
-
--cautionary-fg: var(--maitai-foreground);
|
|
120
|
-
--cautionary-fg-alt: var(--foregrounds-primary);
|
|
121
|
-
--cautionary-fg-inverse: var(--maitai-background);
|
|
122
|
-
--informative-bg: var(--blueribbon-background);
|
|
123
|
-
--informative-bg-alt: var(--blueribbon-tint);
|
|
124
|
-
--informative-bg-inverse: var(--blueribbon-shade);
|
|
125
|
-
--informative-border: var(--blueribbon-main);
|
|
126
|
-
--informative-border-alt: var(--blueribbon-shade);
|
|
127
|
-
--informative-border-inverse: var(--blueribbon-background);
|
|
128
|
-
--informative-fg: var(--blueribbon-foreground);
|
|
129
|
-
--informative-fg-alt: var(--foregrounds-primary);
|
|
130
|
-
--informative-fg-inverse: var(--blueribbon-background);
|
|
131
|
-
--important-bg: var(--electricviolet-background);
|
|
132
|
-
--important-bg-alt: var(--electricviolet-tint);
|
|
133
|
-
--important-bg-inverse: var(--electricviolet-shade);
|
|
134
|
-
--important-border: var(--electricviolet-main);
|
|
135
|
-
--important-border-alt: var(--electricviolet-shade);
|
|
136
|
-
--important-border-inverse: var(--electricviolet-background);
|
|
137
|
-
--important-fg: var(--electricviolet-foreground);
|
|
138
|
-
--important-fg-alt: var(--foregrounds-primary);
|
|
139
|
-
--important-fg-inverse: var(--electricviolet-background);
|
|
140
|
-
--dataviz-1-main: var(--blazeorange-main);
|
|
141
|
-
--dataviz-1-tint: var(--blazeorange-tint);
|
|
142
|
-
--dataviz-1-shade: var(--blazeorange-shade);
|
|
143
|
-
--dataviz-2-main: var(--blueribbon-main);
|
|
144
|
-
--dataviz-2-tint: var(--blueribbon-tint);
|
|
145
|
-
--dataviz-2-shade: var(--blueribbon-shade);
|
|
146
|
-
--dataviz-3-main: var(--seagreen-main);
|
|
147
|
-
--dataviz-3-tint: var(--seagreen-tint);
|
|
148
|
-
--dataviz-3-shade: var(--seagreen-shade);
|
|
149
|
-
--dataviz-4-main: var(--electricviolet-main);
|
|
150
|
-
--dataviz-4-tint: var(--electricviolet-tint);
|
|
151
|
-
--dataviz-4-shade: var(--electricviolet-shade);
|
|
152
|
-
--dataviz-5-main: var(--maitai-main);
|
|
153
|
-
--dataviz-5-tint: var(--maitai-tint);
|
|
154
|
-
--dataviz-5-shade: var(--maitai-shade);
|
|
155
|
-
--dataviz-6-main: var(--cerise-main);
|
|
156
|
-
--dataviz-6-tint: var(--cerise-tint);
|
|
157
|
-
--dataviz-6-shade: var(--cerise-shade);
|
|
158
|
-
--dataviz-7-main: var(--electriclime-main);
|
|
159
|
-
--dataviz-7-tint: var(--electriclime-tint);
|
|
160
|
-
--dataviz-7-shade: var(--electriclime-shade);
|
|
161
|
-
--dataviz-8-main: var(--lochmara-main);
|
|
162
|
-
--dataviz-8-tint: var(--lochmara-tint);
|
|
163
|
-
--dataviz-8-shade: var(--lochmara-shade);
|
|
21
|
+
:root {
|
|
22
|
+
--color-neutral-0: var(--color-mono-0);
|
|
23
|
+
--color-neutral-50: var(--color-mono-50);
|
|
24
|
+
--color-neutral-100: var(--color-mono-100);
|
|
25
|
+
--color-neutral-200: var(--color-mono-200);
|
|
26
|
+
--color-neutral-300: var(--color-mono-300);
|
|
27
|
+
--color-neutral-400: var(--color-mono-400);
|
|
28
|
+
--color-neutral-500: var(--color-mono-500);
|
|
29
|
+
--color-neutral-600: var(--color-mono-600);
|
|
30
|
+
--color-neutral-700: var(--color-mono-700);
|
|
31
|
+
--color-neutral-800: var(--color-mono-800);
|
|
32
|
+
--color-neutral-900: var(--color-mono-900);
|
|
33
|
+
--color-neutral-950: var(--color-mono-950);
|
|
164
34
|
}
|
|
165
35
|
|
|
166
36
|
[data-theme="minimal"] {
|
|
37
|
+
/* Neutral ramp — mono (pure achromatic grey) */
|
|
38
|
+
--color-neutral-0: var(--color-mono-0);
|
|
39
|
+
--color-neutral-50: var(--color-mono-50);
|
|
40
|
+
--color-neutral-100: var(--color-mono-100);
|
|
41
|
+
--color-neutral-200: var(--color-mono-200);
|
|
42
|
+
--color-neutral-300: var(--color-mono-300);
|
|
43
|
+
--color-neutral-400: var(--color-mono-400);
|
|
44
|
+
--color-neutral-500: var(--color-mono-500);
|
|
45
|
+
--color-neutral-600: var(--color-mono-600);
|
|
46
|
+
--color-neutral-700: var(--color-mono-700);
|
|
47
|
+
--color-neutral-800: var(--color-mono-800);
|
|
48
|
+
--color-neutral-900: var(--color-mono-900);
|
|
49
|
+
--color-neutral-950: var(--color-mono-950);
|
|
167
50
|
--font-heading: "Inter", ui-sans-serif, system-ui, sans-serif;
|
|
168
51
|
--font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
|
|
169
52
|
--font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
53
|
+
/* Skeuomorphism tokens — flat by design in minimal */
|
|
54
|
+
--skeuo-raised: none;
|
|
55
|
+
--skeuo-raised-hover: none;
|
|
56
|
+
--skeuo-pressed: none;
|
|
57
|
+
--skeuo-recessed: none;
|
|
58
|
+
--skeuo-bezel: none;
|
|
59
|
+
--skeuo-surface-raised: none;
|
|
60
|
+
--skeuo-surface-pressed: none;
|
|
61
|
+
--skeuo-dimple: none;
|
|
62
|
+
--skeuo-dimple-size: auto;
|
|
63
|
+
--slider-thumb-width: var(--size-xxs);
|
|
64
|
+
--slider-thumb-height: var(--size-xxs);
|
|
65
|
+
/* Tabs — frozen to the flat minimal look the component rendered before it
|
|
66
|
+
was tokenized (no skeuo; underlaid track, subtle raised active pill). */
|
|
67
|
+
--tabs-list-bg: var(--interactive-bg-alt);
|
|
68
|
+
--tabs-list-shadow: none;
|
|
69
|
+
--tabs-list-radius: var(--curves-md);
|
|
70
|
+
--tabs-list-padding: var(--spacing-xs);
|
|
71
|
+
--tabs-list-gap: 0;
|
|
72
|
+
--tabs-trigger-radius: var(--curves-sm);
|
|
73
|
+
--tabs-trigger-fg: var(--interactive-fg-alt);
|
|
74
|
+
--tabs-trigger-hover-fg: var(--interactive-fg-alt);
|
|
75
|
+
--tabs-trigger-selected-bg: var(--container-bg);
|
|
76
|
+
--tabs-trigger-selected-fg: var(--interactive-fg);
|
|
77
|
+
--tabs-trigger-selected-surface: none;
|
|
78
|
+
--tabs-trigger-selected-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
|
170
79
|
--container-bg: var(--backgrounds-primary);
|
|
171
80
|
--container-bg-alt: var(--backgrounds-secondary);
|
|
172
81
|
--container-bg-inverse: var(--foregrounds-secondary);
|
package/dist/tokens.css
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Layer 3: Themes → Component-level tokens for different visual identities
|
|
8
8
|
*
|
|
9
9
|
* Usage:
|
|
10
|
-
* <html data-mode="light" data-theme="
|
|
10
|
+
* <html data-mode="light" data-theme="minimal">
|
|
11
11
|
* Primitives are always available via :root
|
|
12
12
|
* Mode sets semantic colors (backgrounds, foregrounds, palette tints)
|
|
13
13
|
* Theme sets component tokens (action, container, interactive, etc.)
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eluan/tokens",
|
|
3
3
|
"description": "Design tokens, CSS variables, themes, and fonts for the Eluan design system",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"license": "MIT",
|
|
6
|
+
"author": "Frolda",
|
|
6
7
|
"homepage": "https://github.com/vasfio/eluan#readme",
|
|
7
8
|
"repository": {
|
|
8
9
|
"type": "git",
|
|
@@ -22,6 +23,9 @@
|
|
|
22
23
|
"**/*.css"
|
|
23
24
|
],
|
|
24
25
|
"type": "module",
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=20"
|
|
28
|
+
},
|
|
25
29
|
"main": "./dist/index.js",
|
|
26
30
|
"module": "./dist/index.js",
|
|
27
31
|
"types": "./dist/index.d.ts",
|
|
@@ -33,7 +37,6 @@
|
|
|
33
37
|
"./css": "./dist/tokens.css",
|
|
34
38
|
"./fonts/all": "./dist/fonts.css",
|
|
35
39
|
"./fonts/base": "./dist/fonts-base.css",
|
|
36
|
-
"./fonts/industrial-retro": "./dist/fonts-industrial-retro.css",
|
|
37
40
|
"./fonts/minimal": "./dist/fonts-minimal.css"
|
|
38
41
|
},
|
|
39
42
|
"files": [
|
|
@@ -46,12 +49,12 @@
|
|
|
46
49
|
"typescript": "^5.4.5"
|
|
47
50
|
},
|
|
48
51
|
"dependencies": {
|
|
49
|
-
"@fontsource/geist": "^5.2.8",
|
|
50
52
|
"@fontsource/geist-mono": "^5.2.7",
|
|
51
53
|
"@fontsource/inter": "^5.2.8"
|
|
52
54
|
},
|
|
53
55
|
"scripts": {
|
|
54
|
-
"build": "rm -rf dist && tsc -p tsconfig.build.json && cp src/tokens.css src/primitives.css src/modes.css src/themes.css src/spacing.css src/curves.css src/fonts.css src/fonts-base.css src/fonts-
|
|
55
|
-
"dev": "tsc --watch"
|
|
56
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json && cp src/tokens.css src/primitives.css src/modes.css src/themes.css src/spacing.css src/curves.css src/fonts.css src/fonts-base.css src/fonts-minimal.css dist/",
|
|
57
|
+
"dev": "tsc --watch",
|
|
58
|
+
"lint": "eslint src --report-unused-disable-directives --max-warnings 0"
|
|
56
59
|
}
|
|
57
60
|
}
|