@og-ui/tokens 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/dist/contract.d.ts +141 -0
- package/dist/contract.js +16 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/shared.d.ts +33 -0
- package/dist/shared.js +25 -0
- package/dist/themes/aurora.css +196 -0
- package/dist/themes/aurora.d.ts +3 -0
- package/dist/themes/aurora.js +113 -0
- package/dist/themes/aurora.scoped.css +145 -0
- package/dist/themes/brutal.css +196 -0
- package/dist/themes/brutal.d.ts +6 -0
- package/dist/themes/brutal.js +114 -0
- package/dist/themes/brutal.scoped.css +145 -0
- package/dist/themes/clay.css +196 -0
- package/dist/themes/clay.d.ts +3 -0
- package/dist/themes/clay.js +111 -0
- package/dist/themes/clay.scoped.css +145 -0
- package/dist/themes/clean.css +196 -0
- package/dist/themes/clean.d.ts +3 -0
- package/dist/themes/clean.js +111 -0
- package/dist/themes/clean.scoped.css +145 -0
- package/dist/themes/glass.css +196 -0
- package/dist/themes/glass.d.ts +7 -0
- package/dist/themes/glass.js +115 -0
- package/dist/themes/glass.scoped.css +145 -0
- package/dist/themes/index.d.ts +10 -0
- package/dist/themes/index.js +10 -0
- package/dist/themes/liquid-glass.css +196 -0
- package/dist/themes/liquid-glass.d.ts +6 -0
- package/dist/themes/liquid-glass.js +114 -0
- package/dist/themes/liquid-glass.scoped.css +145 -0
- package/dist/themes/neumorphism.css +196 -0
- package/dist/themes/neumorphism.d.ts +2 -0
- package/dist/themes/neumorphism.js +117 -0
- package/dist/themes/neumorphism.scoped.css +145 -0
- package/dist/themes.css +1060 -0
- package/dist/themes.json +958 -0
- package/package.json +36 -3
- package/README.md +0 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Omkar
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The OG UI theme contract.
|
|
3
|
+
*
|
|
4
|
+
* Components never read raw colours or shadows. They read semantic roles from this
|
|
5
|
+
* contract ("a raised surface", "the accent", "the press effect"), and every theme
|
|
6
|
+
* fills the contract in. Swapping themes therefore never touches component code.
|
|
7
|
+
*
|
|
8
|
+
* Adding a field here is a breaking change for theme authors (TypeScript will flag every
|
|
9
|
+
* theme that misses it), which is exactly the point: the contract is the API.
|
|
10
|
+
*/
|
|
11
|
+
/** Any valid CSS value for the property it is used in. */
|
|
12
|
+
export type Css = string;
|
|
13
|
+
/** Colour roles. Values can use `var(--og-accent)` so users can re-tint any theme. */
|
|
14
|
+
export interface ColorTokens {
|
|
15
|
+
/** Page background colour. */
|
|
16
|
+
bg: Css;
|
|
17
|
+
/** Optional page background image (gradients for glass / aurora, graph paper for brutal). 'none' if flat. */
|
|
18
|
+
bgImage: Css;
|
|
19
|
+
/** background-size for bgImage. 'auto' for gradients, e.g. '24px 24px' for a repeating grid. */
|
|
20
|
+
bgSize: Css;
|
|
21
|
+
/** Main text. */
|
|
22
|
+
text: Css;
|
|
23
|
+
/** Text on palette-tinted cards. Usually the same as `text`; ink for full-colour tints. */
|
|
24
|
+
onTint: Css;
|
|
25
|
+
/** Secondary text, hints, placeholders. */
|
|
26
|
+
textMuted: Css;
|
|
27
|
+
/** Hairline borders and dividers. */
|
|
28
|
+
border: Css;
|
|
29
|
+
/** Brand / primary action colour. */
|
|
30
|
+
accent: Css;
|
|
31
|
+
/** Text and icons placed on the accent colour. */
|
|
32
|
+
accentContrast: Css;
|
|
33
|
+
/** Border around accent-filled controls. 'transparent' for most themes, ink for brutalism. */
|
|
34
|
+
accentBorder: Css;
|
|
35
|
+
/** Keyboard focus ring. Must have 3:1 contrast against bg. */
|
|
36
|
+
focusRing: Css;
|
|
37
|
+
success: Css;
|
|
38
|
+
warning: Css;
|
|
39
|
+
danger: Css;
|
|
40
|
+
/**
|
|
41
|
+
* Six categorical colours for tags, avatars, chart series and tinted cards
|
|
42
|
+
* (brutalism gives every card its own colour). Must read on `bg`.
|
|
43
|
+
*/
|
|
44
|
+
palette: [Css, Css, Css, Css, Css, Css];
|
|
45
|
+
}
|
|
46
|
+
/** Extra effects a theme may use. */
|
|
47
|
+
export interface EffectTokens {
|
|
48
|
+
/**
|
|
49
|
+
* Glow around accent controls (aurora and neon looks). A box-shadow value;
|
|
50
|
+
* use '0 0 0 transparent' for none so it can be layered with other shadows.
|
|
51
|
+
*/
|
|
52
|
+
glow: Css;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* A surface recipe: how one "material" looks in this theme.
|
|
56
|
+
* Neumorphism, glass, clay and brutalism differ mostly here.
|
|
57
|
+
*/
|
|
58
|
+
export interface SurfaceTokens {
|
|
59
|
+
/** Fill. May be translucent for glass themes. */
|
|
60
|
+
bg: Css;
|
|
61
|
+
/**
|
|
62
|
+
* Opaque fallback used when the user asks for reduced transparency.
|
|
63
|
+
* Must look acceptable on `color.bg`.
|
|
64
|
+
*/
|
|
65
|
+
bgSolid: Css;
|
|
66
|
+
/** Border colour (width comes from `feel.borderWidth`). Use 'transparent' for none. */
|
|
67
|
+
border: Css;
|
|
68
|
+
/** box-shadow. Keep to two layers at most: shadows are the main paint cost. */
|
|
69
|
+
shadow: Css;
|
|
70
|
+
/**
|
|
71
|
+
* backdrop-filter. Expensive: only `overlay` should normally blur.
|
|
72
|
+
* Small repeated elements (buttons, inputs) should use 'none' and fake it with a translucent bg.
|
|
73
|
+
*/
|
|
74
|
+
backdrop: Css;
|
|
75
|
+
/**
|
|
76
|
+
* Effect slot: painted on a ::before layer above the fill and below the content.
|
|
77
|
+
* Used for glass highlights, clay sheen, liquid-glass specular edges, textures. 'none' if unused.
|
|
78
|
+
*/
|
|
79
|
+
highlight: Css;
|
|
80
|
+
}
|
|
81
|
+
export interface SurfaceSet {
|
|
82
|
+
/** Cards, buttons, anything sitting above the page. */
|
|
83
|
+
raised: SurfaceTokens;
|
|
84
|
+
/** Inputs, wells, pressed states, tracks. */
|
|
85
|
+
inset: SurfaceTokens;
|
|
86
|
+
/** Dialogs, popovers, menus, toasts: things floating over content. */
|
|
87
|
+
overlay: SurfaceTokens;
|
|
88
|
+
}
|
|
89
|
+
/** Everything that changes between light and dark. */
|
|
90
|
+
export interface ModeTokens {
|
|
91
|
+
color: ColorTokens;
|
|
92
|
+
surface: SurfaceSet;
|
|
93
|
+
effect: EffectTokens;
|
|
94
|
+
}
|
|
95
|
+
/** Shape and motion: shared by both modes of a theme. */
|
|
96
|
+
export interface FeelTokens {
|
|
97
|
+
/** `control` is used by buttons and inputs: 'md' look for most themes, pill for liquid glass. */
|
|
98
|
+
radius: {
|
|
99
|
+
sm: Css;
|
|
100
|
+
md: Css;
|
|
101
|
+
lg: Css;
|
|
102
|
+
full: Css;
|
|
103
|
+
control: Css;
|
|
104
|
+
};
|
|
105
|
+
borderWidth: Css;
|
|
106
|
+
fontFamily: Css;
|
|
107
|
+
/** Heading / display font. */
|
|
108
|
+
fontFamilyDisplay: Css;
|
|
109
|
+
/** Code, labels, numbers. */
|
|
110
|
+
fontFamilyMono: Css;
|
|
111
|
+
/**
|
|
112
|
+
* How strongly palette tints fill a card (`og-card--tint-1..6`), e.g. '14%'.
|
|
113
|
+
* '100%' paints the whole card in the palette colour, as brutalism does.
|
|
114
|
+
*/
|
|
115
|
+
tintStrength: Css;
|
|
116
|
+
/** Font weight for buttons, labels, badges. */
|
|
117
|
+
fontWeightStrong: Css;
|
|
118
|
+
/** transform applied while a control is pressed, e.g. 'translateY(1px)' or 'scale(0.97)'. */
|
|
119
|
+
pressTransform: Css;
|
|
120
|
+
/** transform applied on hover for raised controls. 'none' to disable. */
|
|
121
|
+
hoverTransform: Css;
|
|
122
|
+
/** Base transition duration. */
|
|
123
|
+
duration: Css;
|
|
124
|
+
/** Easing curve (springy themes can overshoot). */
|
|
125
|
+
easing: Css;
|
|
126
|
+
}
|
|
127
|
+
export type ModeName = 'light' | 'dark';
|
|
128
|
+
export interface Theme {
|
|
129
|
+
/** Machine name, used in `data-og-theme="<name>"`. kebab-case. */
|
|
130
|
+
name: string;
|
|
131
|
+
/** Human name for pickers and docs. */
|
|
132
|
+
label: string;
|
|
133
|
+
/** One line describing the look. */
|
|
134
|
+
description: string;
|
|
135
|
+
feel: FeelTokens;
|
|
136
|
+
modes: Record<ModeName, ModeTokens>;
|
|
137
|
+
}
|
|
138
|
+
/** Helper that gives theme files full type checking and autocomplete. */
|
|
139
|
+
export declare function defineTheme(theme: Theme): Theme;
|
|
140
|
+
/** The surface names, in a stable order (used by generators). */
|
|
141
|
+
export declare const SURFACES: readonly ["raised", "inset", "overlay"];
|
package/dist/contract.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The OG UI theme contract.
|
|
3
|
+
*
|
|
4
|
+
* Components never read raw colours or shadows. They read semantic roles from this
|
|
5
|
+
* contract ("a raised surface", "the accent", "the press effect"), and every theme
|
|
6
|
+
* fills the contract in. Swapping themes therefore never touches component code.
|
|
7
|
+
*
|
|
8
|
+
* Adding a field here is a breaking change for theme authors (TypeScript will flag every
|
|
9
|
+
* theme that misses it), which is exactly the point: the contract is the API.
|
|
10
|
+
*/
|
|
11
|
+
/** Helper that gives theme files full type checking and autocomplete. */
|
|
12
|
+
export function defineTheme(theme) {
|
|
13
|
+
return theme;
|
|
14
|
+
}
|
|
15
|
+
/** The surface names, in a stable order (used by generators). */
|
|
16
|
+
export const SURFACES = ['raised', 'inset', 'overlay'];
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
package/dist/shared.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** Small shared values theme files can reuse. Themes are free to ignore them. */
|
|
2
|
+
export declare const fonts: {
|
|
3
|
+
sans: string;
|
|
4
|
+
apple: string;
|
|
5
|
+
rounded: string;
|
|
6
|
+
grotesk: string;
|
|
7
|
+
mono: string;
|
|
8
|
+
};
|
|
9
|
+
/** Status colours that read well on light and dark backgrounds. */
|
|
10
|
+
export declare const status: {
|
|
11
|
+
light: {
|
|
12
|
+
success: string;
|
|
13
|
+
warning: string;
|
|
14
|
+
danger: string;
|
|
15
|
+
};
|
|
16
|
+
dark: {
|
|
17
|
+
success: string;
|
|
18
|
+
warning: string;
|
|
19
|
+
danger: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
/** Lets users re-tint any theme with `--og-accent` while the theme keeps a default. */
|
|
23
|
+
export declare const accent: (fallback: string) => string;
|
|
24
|
+
export declare const accentContrast: (fallback: string) => string;
|
|
25
|
+
/** No glow. A real shadow value so it can sit in a comma-separated box-shadow list. */
|
|
26
|
+
export declare const noGlow = "0 0 0 transparent";
|
|
27
|
+
/** A soft accent glow for dark themes. */
|
|
28
|
+
export declare const accentGlow: (fallback: string, strength?: number) => string;
|
|
29
|
+
/** Default categorical palettes, tuned for contrast on light and dark pages. */
|
|
30
|
+
export declare const palettes: {
|
|
31
|
+
readonly light: readonly ["#2563eb", "#db2777", "#059669", "#d97706", "#7c3aed", "#0891b2"];
|
|
32
|
+
readonly dark: readonly ["#60a5fa", "#f472b6", "#34d399", "#fbbf24", "#a78bfa", "#22d3ee"];
|
|
33
|
+
};
|
package/dist/shared.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** Small shared values theme files can reuse. Themes are free to ignore them. */
|
|
2
|
+
export const fonts = {
|
|
3
|
+
sans: `Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif`,
|
|
4
|
+
apple: `-apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", sans-serif`,
|
|
5
|
+
rounded: `Nunito, Quicksand, ui-rounded, ui-sans-serif, system-ui, sans-serif`,
|
|
6
|
+
grotesk: `"Space Grotesk", Archivo, ui-sans-serif, system-ui, sans-serif`,
|
|
7
|
+
mono: `"Geist Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace`,
|
|
8
|
+
};
|
|
9
|
+
/** Status colours that read well on light and dark backgrounds. */
|
|
10
|
+
export const status = {
|
|
11
|
+
light: { success: '#15803d', warning: '#b45309', danger: '#b91c1c' },
|
|
12
|
+
dark: { success: '#22c55e', warning: '#f59e0b', danger: '#fc8181' },
|
|
13
|
+
};
|
|
14
|
+
/** Lets users re-tint any theme with `--og-accent` while the theme keeps a default. */
|
|
15
|
+
export const accent = (fallback) => `var(--og-accent, ${fallback})`;
|
|
16
|
+
export const accentContrast = (fallback) => `var(--og-accent-contrast, ${fallback})`;
|
|
17
|
+
/** No glow. A real shadow value so it can sit in a comma-separated box-shadow list. */
|
|
18
|
+
export const noGlow = '0 0 0 transparent';
|
|
19
|
+
/** A soft accent glow for dark themes. */
|
|
20
|
+
export const accentGlow = (fallback, strength = 55) => `0 0 24px -4px color-mix(in oklab, var(--og-accent, ${fallback}) ${strength}%, transparent)`;
|
|
21
|
+
/** Default categorical palettes, tuned for contrast on light and dark pages. */
|
|
22
|
+
export const palettes = {
|
|
23
|
+
light: ['#2563eb', '#db2777', '#059669', '#d97706', '#7c3aed', '#0891b2'],
|
|
24
|
+
dark: ['#60a5fa', '#f472b6', '#34d399', '#fbbf24', '#a78bfa', '#22d3ee'],
|
|
25
|
+
};
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/*! OG UI tokens: Aurora / mesh gradient. Generated from packages/tokens/src. Do not edit by hand. */
|
|
2
|
+
|
|
3
|
+
/* Aurora / mesh gradient: Luminous mesh-gradient colour fields behind soft, tinted milky panels. */
|
|
4
|
+
:root, [data-og-theme="aurora"] {
|
|
5
|
+
--og-radius-sm: 10px;
|
|
6
|
+
--og-radius-md: 14px;
|
|
7
|
+
--og-radius-lg: 22px;
|
|
8
|
+
--og-radius-full: 9999px;
|
|
9
|
+
--og-radius-control: 14px;
|
|
10
|
+
--og-border-width: 1px;
|
|
11
|
+
--og-font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
12
|
+
--og-font-display: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
13
|
+
--og-font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
14
|
+
--og-font-weight-strong: 600;
|
|
15
|
+
--og-tint-strength: 14%;
|
|
16
|
+
--og-press: scale(0.98);
|
|
17
|
+
--og-hover: none;
|
|
18
|
+
--og-duration: 200ms;
|
|
19
|
+
--og-easing: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
20
|
+
--og-color-bg: #f7f5ff;
|
|
21
|
+
--og-color-bg-image: radial-gradient(at 10% 10%, #c4b5fd 0, transparent 50%), radial-gradient(at 90% 20%, #93c5fd 0, transparent 45%), radial-gradient(at 50% 100%, #fbcfe8 0, transparent 55%);
|
|
22
|
+
--og-color-bg-size: auto;
|
|
23
|
+
--og-color-text: #1e1b4b;
|
|
24
|
+
--og-color-on-tint: #1e1b4b;
|
|
25
|
+
--og-color-text-muted: #55527a;
|
|
26
|
+
--og-color-border: rgba(99, 102, 241, 0.18);
|
|
27
|
+
--og-color-accent: var(--og-accent, #7c3aed);
|
|
28
|
+
--og-color-accent-contrast: var(--og-accent-contrast, #ffffff);
|
|
29
|
+
--og-color-accent-border: transparent;
|
|
30
|
+
--og-color-focus-ring: var(--og-accent, #6d28d9);
|
|
31
|
+
--og-color-success: #15803d;
|
|
32
|
+
--og-color-warning: #b45309;
|
|
33
|
+
--og-color-danger: #b91c1c;
|
|
34
|
+
--og-palette-1: #2563eb;
|
|
35
|
+
--og-palette-2: #db2777;
|
|
36
|
+
--og-palette-3: #059669;
|
|
37
|
+
--og-palette-4: #d97706;
|
|
38
|
+
--og-palette-5: #7c3aed;
|
|
39
|
+
--og-palette-6: #0891b2;
|
|
40
|
+
--og-effect-glow: 0 0 24px -4px color-mix(in oklab, var(--og-accent, #7c3aed) 30%, transparent);
|
|
41
|
+
--og-surface-raised-bg: rgba(255, 255, 255, 0.7);
|
|
42
|
+
--og-surface-raised-bg-solid: #ffffff;
|
|
43
|
+
--og-surface-raised-border: rgba(255, 255, 255, 0.9);
|
|
44
|
+
--og-surface-raised-shadow: 0 10px 30px -12px rgba(76, 29, 149, 0.25);
|
|
45
|
+
--og-surface-raised-backdrop: none;
|
|
46
|
+
--og-surface-raised-highlight: linear-gradient(135deg, rgba(196, 181, 253, 0.25), rgba(147, 197, 253, 0.15) 50%, rgba(251, 207, 232, 0.2));
|
|
47
|
+
--og-surface-inset-bg: rgba(255, 255, 255, 0.55);
|
|
48
|
+
--og-surface-inset-bg-solid: #faf9ff;
|
|
49
|
+
--og-surface-inset-border: rgba(124, 58, 237, 0.2);
|
|
50
|
+
--og-surface-inset-shadow: inset 0 1px 2px rgba(76, 29, 149, 0.08);
|
|
51
|
+
--og-surface-inset-backdrop: none;
|
|
52
|
+
--og-surface-inset-highlight: none;
|
|
53
|
+
--og-surface-overlay-bg: rgba(255, 255, 255, 0.75);
|
|
54
|
+
--og-surface-overlay-bg-solid: #ffffff;
|
|
55
|
+
--og-surface-overlay-border: rgba(255, 255, 255, 0.9);
|
|
56
|
+
--og-surface-overlay-shadow: 0 30px 60px -20px rgba(76, 29, 149, 0.35);
|
|
57
|
+
--og-surface-overlay-backdrop: blur(16px);
|
|
58
|
+
--og-surface-overlay-highlight: linear-gradient(135deg, rgba(196, 181, 253, 0.25), rgba(147, 197, 253, 0.15) 50%, rgba(251, 207, 232, 0.2));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@media (prefers-color-scheme: dark) {
|
|
62
|
+
:root:not([data-og-mode="light"]), [data-og-theme="aurora"]:not([data-og-mode="light"]) {
|
|
63
|
+
--og-color-bg: #0c0a1f;
|
|
64
|
+
--og-color-bg-image: radial-gradient(at 10% 10%, #5b21b6 0, transparent 50%), radial-gradient(at 90% 20%, #1d4ed8 0, transparent 45%), radial-gradient(at 50% 100%, #9d174d 0, transparent 55%);
|
|
65
|
+
--og-color-bg-size: auto;
|
|
66
|
+
--og-color-text: #ede9fe;
|
|
67
|
+
--og-color-on-tint: #ede9fe;
|
|
68
|
+
--og-color-text-muted: #a9a5cc;
|
|
69
|
+
--og-color-border: rgba(167, 139, 250, 0.2);
|
|
70
|
+
--og-color-accent: var(--og-accent, #a78bfa);
|
|
71
|
+
--og-color-accent-contrast: var(--og-accent-contrast, #1a1033);
|
|
72
|
+
--og-color-accent-border: transparent;
|
|
73
|
+
--og-color-focus-ring: var(--og-accent, #c4b5fd);
|
|
74
|
+
--og-color-success: #22c55e;
|
|
75
|
+
--og-color-warning: #f59e0b;
|
|
76
|
+
--og-color-danger: #fc8181;
|
|
77
|
+
--og-palette-1: #60a5fa;
|
|
78
|
+
--og-palette-2: #f472b6;
|
|
79
|
+
--og-palette-3: #34d399;
|
|
80
|
+
--og-palette-4: #fbbf24;
|
|
81
|
+
--og-palette-5: #a78bfa;
|
|
82
|
+
--og-palette-6: #22d3ee;
|
|
83
|
+
--og-effect-glow: 0 0 24px -4px color-mix(in oklab, var(--og-accent, #a78bfa) 55%, transparent);
|
|
84
|
+
--og-surface-raised-bg: rgba(20, 16, 45, 0.6);
|
|
85
|
+
--og-surface-raised-bg-solid: #1b1738;
|
|
86
|
+
--og-surface-raised-border: rgba(167, 139, 250, 0.22);
|
|
87
|
+
--og-surface-raised-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
|
|
88
|
+
--og-surface-raised-backdrop: none;
|
|
89
|
+
--og-surface-raised-highlight: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(59, 130, 246, 0.1) 50%, rgba(236, 72, 153, 0.14));
|
|
90
|
+
--og-surface-inset-bg: rgba(0, 0, 0, 0.25);
|
|
91
|
+
--og-surface-inset-bg-solid: #130f2b;
|
|
92
|
+
--og-surface-inset-border: rgba(167, 139, 250, 0.18);
|
|
93
|
+
--og-surface-inset-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
|
|
94
|
+
--og-surface-inset-backdrop: none;
|
|
95
|
+
--og-surface-inset-highlight: none;
|
|
96
|
+
--og-surface-overlay-bg: rgba(24, 20, 52, 0.7);
|
|
97
|
+
--og-surface-overlay-bg-solid: #1b1738;
|
|
98
|
+
--og-surface-overlay-border: rgba(167, 139, 250, 0.24);
|
|
99
|
+
--og-surface-overlay-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
|
|
100
|
+
--og-surface-overlay-backdrop: blur(16px);
|
|
101
|
+
--og-surface-overlay-highlight: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(59, 130, 246, 0.1) 50%, rgba(236, 72, 153, 0.14));
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
:root[data-og-mode="dark"], [data-og-theme="aurora"][data-og-mode="dark"] {
|
|
106
|
+
--og-color-bg: #0c0a1f;
|
|
107
|
+
--og-color-bg-image: radial-gradient(at 10% 10%, #5b21b6 0, transparent 50%), radial-gradient(at 90% 20%, #1d4ed8 0, transparent 45%), radial-gradient(at 50% 100%, #9d174d 0, transparent 55%);
|
|
108
|
+
--og-color-bg-size: auto;
|
|
109
|
+
--og-color-text: #ede9fe;
|
|
110
|
+
--og-color-on-tint: #ede9fe;
|
|
111
|
+
--og-color-text-muted: #a9a5cc;
|
|
112
|
+
--og-color-border: rgba(167, 139, 250, 0.2);
|
|
113
|
+
--og-color-accent: var(--og-accent, #a78bfa);
|
|
114
|
+
--og-color-accent-contrast: var(--og-accent-contrast, #1a1033);
|
|
115
|
+
--og-color-accent-border: transparent;
|
|
116
|
+
--og-color-focus-ring: var(--og-accent, #c4b5fd);
|
|
117
|
+
--og-color-success: #22c55e;
|
|
118
|
+
--og-color-warning: #f59e0b;
|
|
119
|
+
--og-color-danger: #fc8181;
|
|
120
|
+
--og-palette-1: #60a5fa;
|
|
121
|
+
--og-palette-2: #f472b6;
|
|
122
|
+
--og-palette-3: #34d399;
|
|
123
|
+
--og-palette-4: #fbbf24;
|
|
124
|
+
--og-palette-5: #a78bfa;
|
|
125
|
+
--og-palette-6: #22d3ee;
|
|
126
|
+
--og-effect-glow: 0 0 24px -4px color-mix(in oklab, var(--og-accent, #a78bfa) 55%, transparent);
|
|
127
|
+
--og-surface-raised-bg: rgba(20, 16, 45, 0.6);
|
|
128
|
+
--og-surface-raised-bg-solid: #1b1738;
|
|
129
|
+
--og-surface-raised-border: rgba(167, 139, 250, 0.22);
|
|
130
|
+
--og-surface-raised-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
|
|
131
|
+
--og-surface-raised-backdrop: none;
|
|
132
|
+
--og-surface-raised-highlight: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(59, 130, 246, 0.1) 50%, rgba(236, 72, 153, 0.14));
|
|
133
|
+
--og-surface-inset-bg: rgba(0, 0, 0, 0.25);
|
|
134
|
+
--og-surface-inset-bg-solid: #130f2b;
|
|
135
|
+
--og-surface-inset-border: rgba(167, 139, 250, 0.18);
|
|
136
|
+
--og-surface-inset-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
|
|
137
|
+
--og-surface-inset-backdrop: none;
|
|
138
|
+
--og-surface-inset-highlight: none;
|
|
139
|
+
--og-surface-overlay-bg: rgba(24, 20, 52, 0.7);
|
|
140
|
+
--og-surface-overlay-bg-solid: #1b1738;
|
|
141
|
+
--og-surface-overlay-border: rgba(167, 139, 250, 0.24);
|
|
142
|
+
--og-surface-overlay-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
|
|
143
|
+
--og-surface-overlay-backdrop: blur(16px);
|
|
144
|
+
--og-surface-overlay-highlight: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(59, 130, 246, 0.1) 50%, rgba(236, 72, 153, 0.14));
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/* Density: data-og-density="compact" | "comfortable" (default) on any element. */
|
|
148
|
+
:root, [data-og-density="comfortable"] {
|
|
149
|
+
--og-control-h-sm: 2rem;
|
|
150
|
+
--og-control-h-md: 2.5rem;
|
|
151
|
+
--og-control-h-lg: 3rem;
|
|
152
|
+
--og-control-px: 1rem;
|
|
153
|
+
--og-card-pad: 1.25rem;
|
|
154
|
+
--og-gap: 1rem;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
[data-og-density="compact"] {
|
|
158
|
+
--og-control-h-sm: 1.75rem;
|
|
159
|
+
--og-control-h-md: 2.125rem;
|
|
160
|
+
--og-control-h-lg: 2.5rem;
|
|
161
|
+
--og-control-px: 0.75rem;
|
|
162
|
+
--og-card-pad: 0.875rem;
|
|
163
|
+
--og-gap: 0.625rem;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* Derived values: components read these, never the raw tokens above. */
|
|
167
|
+
:root, [data-og-theme] {
|
|
168
|
+
--og-surface-raised-fill: var(--og-surface-raised-bg);
|
|
169
|
+
--og-surface-raised-filter: var(--og-surface-raised-backdrop);
|
|
170
|
+
--og-surface-inset-fill: var(--og-surface-inset-bg);
|
|
171
|
+
--og-surface-inset-filter: var(--og-surface-inset-backdrop);
|
|
172
|
+
--og-surface-overlay-fill: var(--og-surface-overlay-bg);
|
|
173
|
+
--og-surface-overlay-filter: var(--og-surface-overlay-backdrop);
|
|
174
|
+
--og-motion-hover: var(--og-hover);
|
|
175
|
+
--og-motion-press: var(--og-press);
|
|
176
|
+
--og-motion-duration: var(--og-duration);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
@media (prefers-reduced-transparency: reduce) {
|
|
180
|
+
:root, [data-og-theme] {
|
|
181
|
+
--og-surface-raised-fill: var(--og-surface-raised-bg-solid);
|
|
182
|
+
--og-surface-raised-filter: none;
|
|
183
|
+
--og-surface-inset-fill: var(--og-surface-inset-bg-solid);
|
|
184
|
+
--og-surface-inset-filter: none;
|
|
185
|
+
--og-surface-overlay-fill: var(--og-surface-overlay-bg-solid);
|
|
186
|
+
--og-surface-overlay-filter: none;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
@media (prefers-reduced-motion: reduce) {
|
|
191
|
+
:root, [data-og-theme] {
|
|
192
|
+
--og-motion-hover: none;
|
|
193
|
+
--og-motion-press: none;
|
|
194
|
+
--og-motion-duration: 0.01ms;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { defineTheme } from '../contract.js';
|
|
2
|
+
import { accent, accentContrast, accentGlow, fonts, palettes, status } from '../shared.js';
|
|
3
|
+
/** Aurora / mesh gradient: luminous colour fields behind soft, tinted milky panels. */
|
|
4
|
+
export default defineTheme({
|
|
5
|
+
name: 'aurora',
|
|
6
|
+
label: 'Aurora / mesh gradient',
|
|
7
|
+
description: 'Luminous mesh-gradient colour fields behind soft, tinted milky panels.',
|
|
8
|
+
feel: {
|
|
9
|
+
radius: { sm: '10px', md: '14px', lg: '22px', full: '9999px', control: '14px' },
|
|
10
|
+
borderWidth: '1px',
|
|
11
|
+
fontFamily: fonts.sans,
|
|
12
|
+
fontFamilyDisplay: fonts.sans,
|
|
13
|
+
fontFamilyMono: fonts.mono,
|
|
14
|
+
tintStrength: '14%',
|
|
15
|
+
fontWeightStrong: '600',
|
|
16
|
+
pressTransform: 'scale(0.98)',
|
|
17
|
+
// A 1px lift is barely visible but makes Chrome promote and re-raster each hovered
|
|
18
|
+
// button with its glow and 30px shadow: ~16 ms per hover at 2x CPU, ~10 ms without.
|
|
19
|
+
hoverTransform: 'none',
|
|
20
|
+
duration: '200ms',
|
|
21
|
+
easing: 'cubic-bezier(0.2, 0.8, 0.2, 1)',
|
|
22
|
+
},
|
|
23
|
+
modes: {
|
|
24
|
+
light: {
|
|
25
|
+
color: {
|
|
26
|
+
bg: '#f7f5ff',
|
|
27
|
+
bgImage: 'radial-gradient(at 10% 10%, #c4b5fd 0, transparent 50%), radial-gradient(at 90% 20%, #93c5fd 0, transparent 45%), radial-gradient(at 50% 100%, #fbcfe8 0, transparent 55%)',
|
|
28
|
+
bgSize: 'auto',
|
|
29
|
+
text: '#1e1b4b',
|
|
30
|
+
onTint: '#1e1b4b',
|
|
31
|
+
textMuted: '#55527a',
|
|
32
|
+
border: 'rgba(99, 102, 241, 0.18)',
|
|
33
|
+
accent: accent('#7c3aed'),
|
|
34
|
+
accentContrast: accentContrast('#ffffff'),
|
|
35
|
+
accentBorder: 'transparent',
|
|
36
|
+
focusRing: accent('#6d28d9'),
|
|
37
|
+
...status.light,
|
|
38
|
+
palette: [...palettes.light],
|
|
39
|
+
},
|
|
40
|
+
effect: { glow: accentGlow('#7c3aed', 30) },
|
|
41
|
+
surface: {
|
|
42
|
+
raised: {
|
|
43
|
+
bg: 'rgba(255, 255, 255, 0.7)',
|
|
44
|
+
bgSolid: '#ffffff',
|
|
45
|
+
border: 'rgba(255, 255, 255, 0.9)',
|
|
46
|
+
shadow: '0 10px 30px -12px rgba(76, 29, 149, 0.25)',
|
|
47
|
+
backdrop: 'none',
|
|
48
|
+
highlight: 'linear-gradient(135deg, rgba(196, 181, 253, 0.25), rgba(147, 197, 253, 0.15) 50%, rgba(251, 207, 232, 0.2))',
|
|
49
|
+
},
|
|
50
|
+
inset: {
|
|
51
|
+
bg: 'rgba(255, 255, 255, 0.55)',
|
|
52
|
+
bgSolid: '#faf9ff',
|
|
53
|
+
border: 'rgba(124, 58, 237, 0.2)',
|
|
54
|
+
shadow: 'inset 0 1px 2px rgba(76, 29, 149, 0.08)',
|
|
55
|
+
backdrop: 'none',
|
|
56
|
+
highlight: 'none',
|
|
57
|
+
},
|
|
58
|
+
overlay: {
|
|
59
|
+
bg: 'rgba(255, 255, 255, 0.75)',
|
|
60
|
+
bgSolid: '#ffffff',
|
|
61
|
+
border: 'rgba(255, 255, 255, 0.9)',
|
|
62
|
+
shadow: '0 30px 60px -20px rgba(76, 29, 149, 0.35)',
|
|
63
|
+
backdrop: 'blur(16px)',
|
|
64
|
+
highlight: 'linear-gradient(135deg, rgba(196, 181, 253, 0.25), rgba(147, 197, 253, 0.15) 50%, rgba(251, 207, 232, 0.2))',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
dark: {
|
|
69
|
+
color: {
|
|
70
|
+
bg: '#0c0a1f',
|
|
71
|
+
bgImage: 'radial-gradient(at 10% 10%, #5b21b6 0, transparent 50%), radial-gradient(at 90% 20%, #1d4ed8 0, transparent 45%), radial-gradient(at 50% 100%, #9d174d 0, transparent 55%)',
|
|
72
|
+
bgSize: 'auto',
|
|
73
|
+
text: '#ede9fe',
|
|
74
|
+
onTint: '#ede9fe',
|
|
75
|
+
textMuted: '#a9a5cc',
|
|
76
|
+
border: 'rgba(167, 139, 250, 0.2)',
|
|
77
|
+
accent: accent('#a78bfa'),
|
|
78
|
+
accentContrast: accentContrast('#1a1033'),
|
|
79
|
+
accentBorder: 'transparent',
|
|
80
|
+
focusRing: accent('#c4b5fd'),
|
|
81
|
+
...status.dark,
|
|
82
|
+
palette: [...palettes.dark],
|
|
83
|
+
},
|
|
84
|
+
effect: { glow: accentGlow('#a78bfa') },
|
|
85
|
+
surface: {
|
|
86
|
+
raised: {
|
|
87
|
+
bg: 'rgba(20, 16, 45, 0.6)',
|
|
88
|
+
bgSolid: '#1b1738',
|
|
89
|
+
border: 'rgba(167, 139, 250, 0.22)',
|
|
90
|
+
shadow: '0 10px 30px -12px rgba(0, 0, 0, 0.6)',
|
|
91
|
+
backdrop: 'none',
|
|
92
|
+
highlight: 'linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(59, 130, 246, 0.1) 50%, rgba(236, 72, 153, 0.14))',
|
|
93
|
+
},
|
|
94
|
+
inset: {
|
|
95
|
+
bg: 'rgba(0, 0, 0, 0.25)',
|
|
96
|
+
bgSolid: '#130f2b',
|
|
97
|
+
border: 'rgba(167, 139, 250, 0.18)',
|
|
98
|
+
shadow: 'inset 0 1px 2px rgba(0, 0, 0, 0.4)',
|
|
99
|
+
backdrop: 'none',
|
|
100
|
+
highlight: 'none',
|
|
101
|
+
},
|
|
102
|
+
overlay: {
|
|
103
|
+
bg: 'rgba(24, 20, 52, 0.7)',
|
|
104
|
+
bgSolid: '#1b1738',
|
|
105
|
+
border: 'rgba(167, 139, 250, 0.24)',
|
|
106
|
+
shadow: '0 30px 60px -20px rgba(0, 0, 0, 0.7)',
|
|
107
|
+
backdrop: 'blur(16px)',
|
|
108
|
+
highlight: 'linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(59, 130, 246, 0.1) 50%, rgba(236, 72, 153, 0.14))',
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
});
|