@djangocfg/ui-core 2.1.357 → 2.1.359
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/package.json +9 -4
- package/src/styles/base.css +15 -0
- package/src/styles/presets/build.ts +64 -0
- package/src/styles/presets/index.ts +15 -0
- package/src/styles/presets/presets.ts +24 -0
- package/src/styles/presets/themes/catppuccin.ts +38 -0
- package/src/styles/presets/themes/default.ts +6 -0
- package/src/styles/presets/themes/dense.ts +20 -0
- package/src/styles/presets/themes/django-cfg.ts +21 -0
- package/src/styles/presets/themes/dracula.ts +38 -0
- package/src/styles/presets/themes/github.ts +38 -0
- package/src/styles/presets/themes/gruvbox.ts +38 -0
- package/src/styles/presets/themes/high-contrast.ts +19 -0
- package/src/styles/presets/themes/index.ts +42 -0
- package/src/styles/presets/themes/ios.ts +74 -0
- package/src/styles/presets/themes/macos.ts +123 -0
- package/src/styles/presets/themes/material.ts +38 -0
- package/src/styles/presets/themes/nord.ts +38 -0
- package/src/styles/presets/themes/one-dark.ts +38 -0
- package/src/styles/presets/themes/soft.ts +35 -0
- package/src/styles/presets/themes/solarized.ts +38 -0
- package/src/styles/presets/themes/tokyo-night.ts +38 -0
- package/src/styles/presets/themes/types.ts +6 -0
- package/src/styles/presets/themes/windows.ts +107 -0
- package/src/styles/presets/types.ts +97 -0
- package/src/styles/utilities.css +20 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/ui-core",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.359",
|
|
4
4
|
"description": "Pure React UI component library without Next.js dependencies - for Electron, Vite, CRA apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui-components",
|
|
@@ -77,6 +77,11 @@
|
|
|
77
77
|
"types": "./src/styles/palette/index.ts",
|
|
78
78
|
"import": "./src/styles/palette/index.ts",
|
|
79
79
|
"require": "./src/styles/palette/index.ts"
|
|
80
|
+
},
|
|
81
|
+
"./styles/presets": {
|
|
82
|
+
"types": "./src/styles/presets/index.ts",
|
|
83
|
+
"import": "./src/styles/presets/index.ts",
|
|
84
|
+
"require": "./src/styles/presets/index.ts"
|
|
80
85
|
}
|
|
81
86
|
},
|
|
82
87
|
"files": [
|
|
@@ -91,7 +96,7 @@
|
|
|
91
96
|
"playground": "playground dev"
|
|
92
97
|
},
|
|
93
98
|
"peerDependencies": {
|
|
94
|
-
"@djangocfg/i18n": "^2.1.
|
|
99
|
+
"@djangocfg/i18n": "^2.1.359",
|
|
95
100
|
"consola": "^3.4.2",
|
|
96
101
|
"lucide-react": "^0.545.0",
|
|
97
102
|
"moment": "^2.30.1",
|
|
@@ -161,9 +166,9 @@
|
|
|
161
166
|
"vaul": "1.1.2"
|
|
162
167
|
},
|
|
163
168
|
"devDependencies": {
|
|
164
|
-
"@djangocfg/i18n": "^2.1.
|
|
169
|
+
"@djangocfg/i18n": "^2.1.359",
|
|
165
170
|
"@djangocfg/playground": "workspace:*",
|
|
166
|
-
"@djangocfg/typescript-config": "^2.1.
|
|
171
|
+
"@djangocfg/typescript-config": "^2.1.359",
|
|
167
172
|
"@types/node": "^24.7.2",
|
|
168
173
|
"@types/react": "^19.1.0",
|
|
169
174
|
"@types/react-dom": "^19.1.0",
|
package/src/styles/base.css
CHANGED
|
@@ -11,6 +11,17 @@
|
|
|
11
11
|
--radius-popover: 0.75rem;
|
|
12
12
|
--radius-dialog: 1.5rem;
|
|
13
13
|
--radius-tooltip: 0.375rem;
|
|
14
|
+
|
|
15
|
+
/* Typography tokens — overridable per preset */
|
|
16
|
+
--font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
17
|
+
--font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
|
18
|
+
--font-size-base: 0.875rem;
|
|
19
|
+
--font-size-sm: 0.8125rem;
|
|
20
|
+
--font-size-xs: 0.75rem;
|
|
21
|
+
--font-size-lg: 1rem;
|
|
22
|
+
--font-size-xl: 1.125rem;
|
|
23
|
+
--line-height-base: 1.5;
|
|
24
|
+
--letter-spacing-base: 0em;
|
|
14
25
|
}
|
|
15
26
|
|
|
16
27
|
/* Base element styles */
|
|
@@ -25,5 +36,9 @@ html {
|
|
|
25
36
|
body {
|
|
26
37
|
background-color: hsl(var(--background));
|
|
27
38
|
color: hsl(var(--foreground));
|
|
39
|
+
font-family: var(--font-sans);
|
|
40
|
+
font-size: var(--font-size-base);
|
|
41
|
+
line-height: var(--line-height-base);
|
|
42
|
+
letter-spacing: var(--letter-spacing-base);
|
|
28
43
|
font-feature-settings: "rlig" 1, "calt" 1;
|
|
29
44
|
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { ThemeCssVarMap, ThemeStyleConfig, ThemeStylePresetId } from './types';
|
|
2
|
+
import { THEME_STYLE_PRESETS } from './presets';
|
|
3
|
+
|
|
4
|
+
function mergeLayer(base: ThemeCssVarMap | undefined, over: ThemeCssVarMap | undefined): ThemeCssVarMap {
|
|
5
|
+
return { ...base, ...over };
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Tailwind v4 `rounded-*` utilities are backed by `--radius-*` scale variables.
|
|
10
|
+
* When semantic `radius` is present, emit the derived scale too.
|
|
11
|
+
*/
|
|
12
|
+
function withTailwindRadiusScale(vars: ThemeCssVarMap): Array<[string, string]> {
|
|
13
|
+
const entries = Object.entries(vars);
|
|
14
|
+
const radius = vars.radius;
|
|
15
|
+
if (!radius) return entries;
|
|
16
|
+
|
|
17
|
+
const r = String(radius).trim();
|
|
18
|
+
if (!r) return entries;
|
|
19
|
+
|
|
20
|
+
const scale: Array<[string, string]> = [
|
|
21
|
+
['radius-xs', `calc(${r} - 6px)`],
|
|
22
|
+
['radius-sm', `calc(${r} - 4px)`],
|
|
23
|
+
['radius-md', `calc(${r} - 2px)`],
|
|
24
|
+
['radius-lg', r],
|
|
25
|
+
['radius-xl', `calc(${r} + 4px)`],
|
|
26
|
+
['radius-2xl', `calc(${r} + 8px)`],
|
|
27
|
+
['radius-3xl', `calc(${r} + 12px)`],
|
|
28
|
+
['radius-4xl', `calc(${r} + 16px)`],
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
return [...entries, ...scale];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Build a stylesheet fragment: preset → vars.light / vars.dark.
|
|
36
|
+
* Inject this after globals (later rule wins).
|
|
37
|
+
*/
|
|
38
|
+
export function buildThemeStyleSheet(style?: ThemeStyleConfig): string {
|
|
39
|
+
if (!style) return '';
|
|
40
|
+
|
|
41
|
+
const presetId: ThemeStylePresetId = style.preset ?? 'default';
|
|
42
|
+
const preset = THEME_STYLE_PRESETS[presetId] ?? THEME_STYLE_PRESETS.default;
|
|
43
|
+
|
|
44
|
+
const light = mergeLayer(preset.light, style.vars?.light);
|
|
45
|
+
const dark = mergeLayer(preset.dark, style.vars?.dark);
|
|
46
|
+
|
|
47
|
+
const blocks: string[] = [];
|
|
48
|
+
|
|
49
|
+
if (Object.keys(light).length > 0) {
|
|
50
|
+
const body = withTailwindRadiusScale(light)
|
|
51
|
+
.map(([k, v]) => ` --${k}: ${v};`)
|
|
52
|
+
.join('\n');
|
|
53
|
+
blocks.push(`:root {\n${body}\n}`);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (Object.keys(dark).length > 0) {
|
|
57
|
+
const body = withTailwindRadiusScale(dark)
|
|
58
|
+
.map(([k, v]) => ` --${k}: ${v};`)
|
|
59
|
+
.join('\n');
|
|
60
|
+
blocks.push(`.dark {\n${body}\n}`);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return blocks.join('\n\n');
|
|
64
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type {
|
|
2
|
+
ThemeCssVarChartKey,
|
|
3
|
+
ThemeCssVarChromeKey,
|
|
4
|
+
ThemeCssVarColorKey,
|
|
5
|
+
ThemeCssVarKey,
|
|
6
|
+
ThemeCssVarMap,
|
|
7
|
+
ThemeCssVarSidebarKey,
|
|
8
|
+
ThemeCssVarTypographyKey,
|
|
9
|
+
ThemeStyleConfig,
|
|
10
|
+
ThemeStylePresetId,
|
|
11
|
+
} from './types';
|
|
12
|
+
|
|
13
|
+
export { THEME_STYLE_PRESETS, THEME_STYLE_PRESET_ORDER } from './presets';
|
|
14
|
+
|
|
15
|
+
export { buildThemeStyleSheet } from './build';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ThemeStylePresetId } from './types';
|
|
2
|
+
import { THEME_PRESETS } from './themes';
|
|
3
|
+
|
|
4
|
+
export const THEME_STYLE_PRESET_ORDER = [
|
|
5
|
+
'default',
|
|
6
|
+
'django-cfg',
|
|
7
|
+
'ios',
|
|
8
|
+
'macos',
|
|
9
|
+
'windows',
|
|
10
|
+
'soft',
|
|
11
|
+
'dense',
|
|
12
|
+
'high-contrast',
|
|
13
|
+
'catppuccin',
|
|
14
|
+
'dracula',
|
|
15
|
+
'github',
|
|
16
|
+
'gruvbox',
|
|
17
|
+
'material',
|
|
18
|
+
'nord',
|
|
19
|
+
'one-dark',
|
|
20
|
+
'solarized',
|
|
21
|
+
'tokyo-night',
|
|
22
|
+
] as const satisfies readonly ThemeStylePresetId[];
|
|
23
|
+
|
|
24
|
+
export const THEME_STYLE_PRESETS = THEME_PRESETS;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ThemePreset } from './types';
|
|
2
|
+
|
|
3
|
+
export const catppuccinPreset: ThemePreset = {
|
|
4
|
+
light: {
|
|
5
|
+
background: '220 23% 95%', foreground: '234 16% 35%',
|
|
6
|
+
card: '220 23% 97%', 'card-foreground': '234 16% 35%',
|
|
7
|
+
popover: '220 23% 97%', 'popover-foreground': '234 16% 35%',
|
|
8
|
+
primary: '217 92% 66%', 'primary-foreground': '0 0% 9%',
|
|
9
|
+
secondary: '267 84% 71%', 'secondary-foreground': '0 0% 9%',
|
|
10
|
+
muted: '220 23% 92%', 'muted-foreground': '234 16% 65%',
|
|
11
|
+
accent: '189 71% 63%', 'accent-foreground': '234 16% 35%',
|
|
12
|
+
destructive: '343 81% 65%', 'destructive-foreground': '0 0% 98%',
|
|
13
|
+
border: '220 23% 85%', input: '220 23% 85%', ring: '217 92% 66%',
|
|
14
|
+
radius: '0.75rem',
|
|
15
|
+
'sidebar-background': '220 23% 93%', 'sidebar-foreground': '234 16% 35%',
|
|
16
|
+
'sidebar-primary': '217 92% 66%', 'sidebar-primary-foreground': '0 0% 9%',
|
|
17
|
+
'sidebar-accent': '220 23% 91%', 'sidebar-accent-foreground': '234 16% 35%',
|
|
18
|
+
'sidebar-border': '220 23% 85%', 'sidebar-ring': '217 92% 66%',
|
|
19
|
+
'chart-1': '217 92% 66%', 'chart-2': '115 54% 66%', 'chart-3': '262 83% 58%', 'chart-4': '41 86% 73%', 'chart-5': '343 81% 65%',
|
|
20
|
+
},
|
|
21
|
+
dark: {
|
|
22
|
+
background: '240 21% 15%', foreground: '226 64% 88%',
|
|
23
|
+
card: '240 21% 19%', 'card-foreground': '226 64% 88%',
|
|
24
|
+
popover: '240 21% 19%', 'popover-foreground': '226 64% 88%',
|
|
25
|
+
primary: '217 92% 76%', 'primary-foreground': '0 0% 9%',
|
|
26
|
+
secondary: '267 84% 81%', 'secondary-foreground': '0 0% 9%',
|
|
27
|
+
muted: '240 21% 21%', 'muted-foreground': '226 64% 68%',
|
|
28
|
+
accent: '189 71% 73%', 'accent-foreground': '226 64% 88%',
|
|
29
|
+
destructive: '343 81% 75%', 'destructive-foreground': '0 0% 98%',
|
|
30
|
+
border: '240 21% 28%', input: '240 21% 28%', ring: '217 92% 76%',
|
|
31
|
+
radius: '0.75rem',
|
|
32
|
+
'sidebar-background': '240 21% 13%', 'sidebar-foreground': '226 64% 88%',
|
|
33
|
+
'sidebar-primary': '217 92% 76%', 'sidebar-primary-foreground': '0 0% 9%',
|
|
34
|
+
'sidebar-accent': '240 21% 11%', 'sidebar-accent-foreground': '226 64% 88%',
|
|
35
|
+
'sidebar-border': '240 21% 28%', 'sidebar-ring': '217 92% 76%',
|
|
36
|
+
'chart-1': '217 92% 76%', 'chart-2': '115 54% 76%', 'chart-3': '262 83% 58%', 'chart-4': '41 86% 83%', 'chart-5': '343 81% 75%',
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ThemePreset } from './types';
|
|
2
|
+
|
|
3
|
+
export const densePreset: ThemePreset = {
|
|
4
|
+
light: {
|
|
5
|
+
radius: '0.25rem',
|
|
6
|
+
border: '0 0% 82%',
|
|
7
|
+
input: '0 0% 82%',
|
|
8
|
+
muted: '0 0% 94%',
|
|
9
|
+
card: '0 0% 100%',
|
|
10
|
+
accent: '0 0% 93%',
|
|
11
|
+
},
|
|
12
|
+
dark: {
|
|
13
|
+
radius: '0.25rem',
|
|
14
|
+
border: '0 0% 24%',
|
|
15
|
+
input: '0 0% 24%',
|
|
16
|
+
muted: '0 0% 12%',
|
|
17
|
+
card: '0 0% 10%',
|
|
18
|
+
accent: '0 0% 14%',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ThemePreset } from './types';
|
|
2
|
+
|
|
3
|
+
export const djangoCfgPreset: ThemePreset = {
|
|
4
|
+
light: {
|
|
5
|
+
primary: '192 90% 35%',
|
|
6
|
+
'primary-foreground': '0 0% 100%',
|
|
7
|
+
ring: '192 90% 35%',
|
|
8
|
+
'sidebar-primary': '192 90% 35%',
|
|
9
|
+
'sidebar-ring': '192 90% 35%',
|
|
10
|
+
'chart-1': '192 90% 35%',
|
|
11
|
+
},
|
|
12
|
+
dark: {
|
|
13
|
+
primary: '189 100% 50%',
|
|
14
|
+
'primary-foreground': '0 0% 9%',
|
|
15
|
+
ring: '189 100% 50%',
|
|
16
|
+
'sidebar-primary': '189 100% 50%',
|
|
17
|
+
'sidebar-primary-foreground': '0 0% 9%',
|
|
18
|
+
'sidebar-ring': '189 100% 50%',
|
|
19
|
+
'chart-1': '189 100% 50%',
|
|
20
|
+
},
|
|
21
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ThemePreset } from './types';
|
|
2
|
+
|
|
3
|
+
export const draculaPreset: ThemePreset = {
|
|
4
|
+
light: {
|
|
5
|
+
background: '265 20% 96%', foreground: '231 15% 18%',
|
|
6
|
+
card: '265 20% 98%', 'card-foreground': '231 15% 18%',
|
|
7
|
+
popover: '265 20% 98%', 'popover-foreground': '231 15% 18%',
|
|
8
|
+
primary: '265 89% 68%', 'primary-foreground': '0 0% 9%',
|
|
9
|
+
secondary: '326 100% 64%', 'secondary-foreground': '0 0% 9%',
|
|
10
|
+
muted: '265 20% 93%', 'muted-foreground': '231 15% 48%',
|
|
11
|
+
accent: '191 97% 67%', 'accent-foreground': '231 15% 18%',
|
|
12
|
+
destructive: '0 100% 57%', 'destructive-foreground': '0 0% 98%',
|
|
13
|
+
border: '265 20% 86%', input: '265 20% 86%', ring: '265 89% 68%',
|
|
14
|
+
radius: '0.5rem',
|
|
15
|
+
'sidebar-background': '265 20% 94%', 'sidebar-foreground': '231 15% 18%',
|
|
16
|
+
'sidebar-primary': '265 89% 68%', 'sidebar-primary-foreground': '0 0% 9%',
|
|
17
|
+
'sidebar-accent': '265 20% 92%', 'sidebar-accent-foreground': '231 15% 18%',
|
|
18
|
+
'sidebar-border': '265 20% 86%', 'sidebar-ring': '265 89% 68%',
|
|
19
|
+
'chart-1': '265 89% 68%', 'chart-2': '135 94% 55%', 'chart-3': '262 83% 58%', 'chart-4': '65 92% 66%', 'chart-5': '0 100% 57%',
|
|
20
|
+
},
|
|
21
|
+
dark: {
|
|
22
|
+
background: '231 15% 18%', foreground: '60 30% 96%',
|
|
23
|
+
card: '231 15% 22%', 'card-foreground': '60 30% 96%',
|
|
24
|
+
popover: '231 15% 22%', 'popover-foreground': '60 30% 96%',
|
|
25
|
+
primary: '265 89% 78%', 'primary-foreground': '0 0% 9%',
|
|
26
|
+
secondary: '326 100% 74%', 'secondary-foreground': '0 0% 9%',
|
|
27
|
+
muted: '231 15% 24%', 'muted-foreground': '231 15% 64%',
|
|
28
|
+
accent: '191 97% 77%', 'accent-foreground': '60 30% 96%',
|
|
29
|
+
destructive: '0 100% 67%', 'destructive-foreground': '0 0% 98%',
|
|
30
|
+
border: '231 15% 28%', input: '231 15% 28%', ring: '265 89% 78%',
|
|
31
|
+
radius: '0.5rem',
|
|
32
|
+
'sidebar-background': '231 15% 16%', 'sidebar-foreground': '60 30% 96%',
|
|
33
|
+
'sidebar-primary': '265 89% 78%', 'sidebar-primary-foreground': '0 0% 9%',
|
|
34
|
+
'sidebar-accent': '231 15% 14%', 'sidebar-accent-foreground': '60 30% 96%',
|
|
35
|
+
'sidebar-border': '231 15% 28%', 'sidebar-ring': '265 89% 78%',
|
|
36
|
+
'chart-1': '265 89% 78%', 'chart-2': '135 94% 65%', 'chart-3': '262 83% 58%', 'chart-4': '65 92% 76%', 'chart-5': '0 100% 67%',
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ThemePreset } from './types';
|
|
2
|
+
|
|
3
|
+
export const githubPreset: ThemePreset = {
|
|
4
|
+
light: {
|
|
5
|
+
background: '0 0% 100%', foreground: '210 12% 16%',
|
|
6
|
+
card: '0 0% 100%', 'card-foreground': '210 12% 16%',
|
|
7
|
+
popover: '0 0% 100%', 'popover-foreground': '210 12% 16%',
|
|
8
|
+
primary: '212 92% 43%', 'primary-foreground': '0 0% 98%',
|
|
9
|
+
secondary: '210 18% 87%', 'secondary-foreground': '0 0% 9%',
|
|
10
|
+
muted: '0 0% 97%', 'muted-foreground': '210 12% 46%',
|
|
11
|
+
accent: '0 0% 95%', 'accent-foreground': '210 12% 16%',
|
|
12
|
+
destructive: '356 72% 44%', 'destructive-foreground': '0 0% 98%',
|
|
13
|
+
border: '0 0% 90%', input: '0 0% 90%', ring: '212 92% 43%',
|
|
14
|
+
radius: '0.375rem',
|
|
15
|
+
'sidebar-background': '0 0% 98%', 'sidebar-foreground': '210 12% 16%',
|
|
16
|
+
'sidebar-primary': '212 92% 43%', 'sidebar-primary-foreground': '0 0% 98%',
|
|
17
|
+
'sidebar-accent': '0 0% 96%', 'sidebar-accent-foreground': '210 12% 16%',
|
|
18
|
+
'sidebar-border': '0 0% 90%', 'sidebar-ring': '212 92% 43%',
|
|
19
|
+
'chart-1': '212 92% 43%', 'chart-2': '137 55% 36%', 'chart-3': '262 83% 58%', 'chart-4': '32 100% 50%', 'chart-5': '356 72% 44%',
|
|
20
|
+
},
|
|
21
|
+
dark: {
|
|
22
|
+
background: '210 11% 7%', foreground: '213 18% 88%',
|
|
23
|
+
card: '210 11% 11%', 'card-foreground': '213 18% 88%',
|
|
24
|
+
popover: '210 11% 11%', 'popover-foreground': '213 18% 88%',
|
|
25
|
+
primary: '212 92% 60%', 'primary-foreground': '0 0% 9%',
|
|
26
|
+
secondary: '215 14% 34%', 'secondary-foreground': '0 0% 98%',
|
|
27
|
+
muted: '210 11% 13%', 'muted-foreground': '213 18% 58%',
|
|
28
|
+
accent: '210 11% 16%', 'accent-foreground': '213 18% 88%',
|
|
29
|
+
destructive: '356 72% 60%', 'destructive-foreground': '0 0% 98%',
|
|
30
|
+
border: '210 11% 20%', input: '210 11% 20%', ring: '212 92% 60%',
|
|
31
|
+
radius: '0.375rem',
|
|
32
|
+
'sidebar-background': '210 11% 5%', 'sidebar-foreground': '213 18% 88%',
|
|
33
|
+
'sidebar-primary': '212 92% 60%', 'sidebar-primary-foreground': '0 0% 9%',
|
|
34
|
+
'sidebar-accent': '210 11% 12%', 'sidebar-accent-foreground': '213 18% 88%',
|
|
35
|
+
'sidebar-border': '210 11% 20%', 'sidebar-ring': '212 92% 60%',
|
|
36
|
+
'chart-1': '212 92% 60%', 'chart-2': '137 56% 48%', 'chart-3': '262 83% 58%', 'chart-4': '29 100% 61%', 'chart-5': '356 72% 60%',
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ThemePreset } from './types';
|
|
2
|
+
|
|
3
|
+
export const gruvboxPreset: ThemePreset = {
|
|
4
|
+
light: {
|
|
5
|
+
background: '48 87% 94%', foreground: '24 20% 29%',
|
|
6
|
+
card: '48 87% 96%', 'card-foreground': '24 20% 29%',
|
|
7
|
+
popover: '48 87% 96%', 'popover-foreground': '24 20% 29%',
|
|
8
|
+
primary: '205 82% 31%', 'primary-foreground': '0 0% 98%',
|
|
9
|
+
secondary: '175 62% 31%', 'secondary-foreground': '0 0% 98%',
|
|
10
|
+
muted: '48 87% 91%', 'muted-foreground': '24 20% 59%',
|
|
11
|
+
accent: '48 87% 89%', 'accent-foreground': '24 20% 29%',
|
|
12
|
+
destructive: '4 79% 49%', 'destructive-foreground': '0 0% 98%',
|
|
13
|
+
border: '48 87% 84%', input: '48 87% 84%', ring: '205 82% 31%',
|
|
14
|
+
radius: '0.375rem',
|
|
15
|
+
'sidebar-background': '48 87% 92%', 'sidebar-foreground': '24 20% 29%',
|
|
16
|
+
'sidebar-primary': '205 82% 31%', 'sidebar-primary-foreground': '0 0% 98%',
|
|
17
|
+
'sidebar-accent': '48 87% 90%', 'sidebar-accent-foreground': '24 20% 29%',
|
|
18
|
+
'sidebar-border': '48 87% 84%', 'sidebar-ring': '205 82% 31%',
|
|
19
|
+
'chart-1': '205 82% 31%', 'chart-2': '104 41% 40%', 'chart-3': '262 83% 58%', 'chart-4': '36 100% 40%', 'chart-5': '4 79% 49%',
|
|
20
|
+
},
|
|
21
|
+
dark: {
|
|
22
|
+
background: '0 0% 16%', foreground: '43 16% 78%',
|
|
23
|
+
card: '0 0% 20%', 'card-foreground': '43 16% 78%',
|
|
24
|
+
popover: '0 0% 20%', 'popover-foreground': '43 16% 78%',
|
|
25
|
+
primary: '205 82% 53%', 'primary-foreground': '0 0% 9%',
|
|
26
|
+
secondary: '175 62% 53%', 'secondary-foreground': '0 0% 9%',
|
|
27
|
+
muted: '0 0% 22%', 'muted-foreground': '43 16% 58%',
|
|
28
|
+
accent: '0 0% 24%', 'accent-foreground': '43 16% 78%',
|
|
29
|
+
destructive: '4 79% 63%', 'destructive-foreground': '0 0% 98%',
|
|
30
|
+
border: '0 0% 26%', input: '0 0% 26%', ring: '205 82% 53%',
|
|
31
|
+
radius: '0.375rem',
|
|
32
|
+
'sidebar-background': '0 0% 14%', 'sidebar-foreground': '43 16% 78%',
|
|
33
|
+
'sidebar-primary': '205 82% 53%', 'sidebar-primary-foreground': '0 0% 9%',
|
|
34
|
+
'sidebar-accent': '0 0% 12%', 'sidebar-accent-foreground': '43 16% 78%',
|
|
35
|
+
'sidebar-border': '0 0% 26%', 'sidebar-ring': '205 82% 53%',
|
|
36
|
+
'chart-1': '205 82% 53%', 'chart-2': '104 41% 58%', 'chart-3': '262 83% 58%', 'chart-4': '39 100% 57%', 'chart-5': '4 79% 63%',
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ThemePreset } from './types';
|
|
2
|
+
|
|
3
|
+
export const highContrastPreset: ThemePreset = {
|
|
4
|
+
light: {
|
|
5
|
+
border: '0 0% 72%',
|
|
6
|
+
input: '0 0% 72%',
|
|
7
|
+
'muted-foreground': '0 0% 32%',
|
|
8
|
+
foreground: '0 0% 6%',
|
|
9
|
+
ring: '0 0% 20%',
|
|
10
|
+
},
|
|
11
|
+
dark: {
|
|
12
|
+
border: '0 0% 38%',
|
|
13
|
+
input: '0 0% 38%',
|
|
14
|
+
'muted-foreground': '0 0% 78%',
|
|
15
|
+
foreground: '0 0% 100%',
|
|
16
|
+
background: '0 0% 6%',
|
|
17
|
+
ring: '0 0% 85%',
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ThemeStylePresetId } from '../types';
|
|
2
|
+
import type { ThemePreset } from './types';
|
|
3
|
+
|
|
4
|
+
import { defaultPreset } from './default';
|
|
5
|
+
import { djangoCfgPreset } from './django-cfg';
|
|
6
|
+
import { iosPreset } from './ios';
|
|
7
|
+
import { macosPreset } from './macos';
|
|
8
|
+
import { windowsPreset } from './windows';
|
|
9
|
+
import { softPreset } from './soft';
|
|
10
|
+
import { densePreset } from './dense';
|
|
11
|
+
import { highContrastPreset } from './high-contrast';
|
|
12
|
+
import { catppuccinPreset } from './catppuccin';
|
|
13
|
+
import { draculaPreset } from './dracula';
|
|
14
|
+
import { githubPreset } from './github';
|
|
15
|
+
import { gruvboxPreset } from './gruvbox';
|
|
16
|
+
import { materialPreset } from './material';
|
|
17
|
+
import { nordPreset } from './nord';
|
|
18
|
+
import { oneDarkPreset } from './one-dark';
|
|
19
|
+
import { solarizedPreset } from './solarized';
|
|
20
|
+
import { tokyoNightPreset } from './tokyo-night';
|
|
21
|
+
|
|
22
|
+
export type { ThemePreset };
|
|
23
|
+
|
|
24
|
+
export const THEME_PRESETS: Record<ThemeStylePresetId, ThemePreset> = {
|
|
25
|
+
'default': defaultPreset,
|
|
26
|
+
'django-cfg': djangoCfgPreset,
|
|
27
|
+
'ios': iosPreset,
|
|
28
|
+
'macos': macosPreset,
|
|
29
|
+
'windows': windowsPreset,
|
|
30
|
+
'soft': softPreset,
|
|
31
|
+
'dense': densePreset,
|
|
32
|
+
'high-contrast': highContrastPreset,
|
|
33
|
+
'catppuccin': catppuccinPreset,
|
|
34
|
+
'dracula': draculaPreset,
|
|
35
|
+
'github': githubPreset,
|
|
36
|
+
'gruvbox': gruvboxPreset,
|
|
37
|
+
'material': materialPreset,
|
|
38
|
+
'nord': nordPreset,
|
|
39
|
+
'one-dark': oneDarkPreset,
|
|
40
|
+
'solarized': solarizedPreset,
|
|
41
|
+
'tokyo-night': tokyoNightPreset,
|
|
42
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { ThemePreset } from './types';
|
|
2
|
+
|
|
3
|
+
export const iosPreset: ThemePreset = {
|
|
4
|
+
light: {
|
|
5
|
+
background: '0 0% 98%',
|
|
6
|
+
foreground: '220 9% 12%',
|
|
7
|
+
card: '0 0% 100%',
|
|
8
|
+
'card-foreground': '220 9% 12%',
|
|
9
|
+
popover: '0 0% 100%',
|
|
10
|
+
'popover-foreground': '220 9% 12%',
|
|
11
|
+
primary: '211 100% 50%',
|
|
12
|
+
'primary-foreground': '0 0% 100%',
|
|
13
|
+
secondary: '220 9% 92%',
|
|
14
|
+
'secondary-foreground': '220 9% 12%',
|
|
15
|
+
muted: '220 9% 94%',
|
|
16
|
+
'muted-foreground': '220 9% 40%',
|
|
17
|
+
accent: '220 9% 94%',
|
|
18
|
+
'accent-foreground': '220 9% 12%',
|
|
19
|
+
destructive: '0 100% 58%',
|
|
20
|
+
'destructive-foreground': '0 0% 100%',
|
|
21
|
+
border: '220 9% 88%',
|
|
22
|
+
input: '220 9% 88%',
|
|
23
|
+
ring: '211 100% 50%',
|
|
24
|
+
radius: '0.75rem',
|
|
25
|
+
'sidebar-background': '0 0% 99%',
|
|
26
|
+
'sidebar-foreground': '220 9% 12%',
|
|
27
|
+
'sidebar-primary': '211 100% 50%',
|
|
28
|
+
'sidebar-primary-foreground': '0 0% 100%',
|
|
29
|
+
'sidebar-accent': '220 9% 94%',
|
|
30
|
+
'sidebar-accent-foreground': '220 9% 12%',
|
|
31
|
+
'sidebar-border': '220 9% 88%',
|
|
32
|
+
'sidebar-ring': '211 100% 50%',
|
|
33
|
+
'chart-1': '211 100% 50%',
|
|
34
|
+
'chart-2': '145 63% 42%',
|
|
35
|
+
'chart-3': '262 83% 58%',
|
|
36
|
+
'chart-4': '35 100% 50%',
|
|
37
|
+
'chart-5': '346 77% 50%',
|
|
38
|
+
},
|
|
39
|
+
dark: {
|
|
40
|
+
background: '240 6% 10%',
|
|
41
|
+
foreground: '0 0% 96%',
|
|
42
|
+
card: '240 6% 14%',
|
|
43
|
+
'card-foreground': '0 0% 96%',
|
|
44
|
+
popover: '240 6% 16%',
|
|
45
|
+
'popover-foreground': '0 0% 96%',
|
|
46
|
+
primary: '211 100% 55%',
|
|
47
|
+
'primary-foreground': '0 0% 100%',
|
|
48
|
+
secondary: '240 5% 26%',
|
|
49
|
+
'secondary-foreground': '0 0% 96%',
|
|
50
|
+
muted: '240 5% 16%',
|
|
51
|
+
'muted-foreground': '240 5% 64%',
|
|
52
|
+
accent: '240 5% 18%',
|
|
53
|
+
'accent-foreground': '0 0% 96%',
|
|
54
|
+
destructive: '0 100% 67%',
|
|
55
|
+
'destructive-foreground': '0 0% 100%',
|
|
56
|
+
border: '240 5% 22%',
|
|
57
|
+
input: '240 5% 22%',
|
|
58
|
+
ring: '211 100% 55%',
|
|
59
|
+
radius: '0.75rem',
|
|
60
|
+
'sidebar-background': '240 6% 8%',
|
|
61
|
+
'sidebar-foreground': '0 0% 96%',
|
|
62
|
+
'sidebar-primary': '211 100% 55%',
|
|
63
|
+
'sidebar-primary-foreground': '0 0% 100%',
|
|
64
|
+
'sidebar-accent': '240 5% 16%',
|
|
65
|
+
'sidebar-accent-foreground': '0 0% 96%',
|
|
66
|
+
'sidebar-border': '240 5% 22%',
|
|
67
|
+
'sidebar-ring': '211 100% 55%',
|
|
68
|
+
'chart-1': '211 100% 55%',
|
|
69
|
+
'chart-2': '145 65% 52%',
|
|
70
|
+
'chart-3': '262 83% 65%',
|
|
71
|
+
'chart-4': '35 100% 58%',
|
|
72
|
+
'chart-5': '346 77% 58%',
|
|
73
|
+
},
|
|
74
|
+
};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* macOS Sonoma: systemGroupedBackground (#F2F2F7), systemBlue (#007AFF / #0A84FF),
|
|
3
|
+
* 10px radius, hairline borders, vibrancy-ready surfaces.
|
|
4
|
+
* Source: Apple HIG Color — https://developer.apple.com/design/human-interface-guidelines/color
|
|
5
|
+
*/
|
|
6
|
+
import type { ThemePreset } from './types';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Apple HIG typography for Wails/WebKit embedded WebView.
|
|
10
|
+
*
|
|
11
|
+
* In native WebKit (Wails, Electron macOS) system fonts are accessible directly.
|
|
12
|
+
* SF Pro Text — optimised for 11–19 pt (UI text, body, labels)
|
|
13
|
+
* SF Pro Display — optimised for 20 pt+ (headlines); browser/WebKit switches automatically
|
|
14
|
+
* via -apple-system, but in embedded WebView naming it explicitly helps some engines.
|
|
15
|
+
* SF Mono — Apple's monospaced companion, available system-wide on macOS 10.12+
|
|
16
|
+
*
|
|
17
|
+
* Size scale matches Apple HIG points → rem (1pt ≈ 1px at 1x):
|
|
18
|
+
* xs 11pt → 0.6875rem (captions, timestamps)
|
|
19
|
+
* sm 12pt → 0.75rem (footnotes, secondary labels)
|
|
20
|
+
* base 13pt → 0.8125rem (body, default UI text — HIG "default")
|
|
21
|
+
* lg 15pt → 0.9375rem (subheadings, emphasized body)
|
|
22
|
+
* xl 17pt → 1.0625rem (titles, navigation bar)
|
|
23
|
+
*
|
|
24
|
+
* line-height 1.4 matches HIG recommended tight leading for UI elements.
|
|
25
|
+
* letter-spacing -0.01em matches SF Pro's optical tracking at small sizes.
|
|
26
|
+
*/
|
|
27
|
+
const appleTypography = {
|
|
28
|
+
'font-sans': '"SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif',
|
|
29
|
+
'font-mono': '"SF Mono", ui-monospace, Menlo, "Courier New", monospace',
|
|
30
|
+
'font-size-base': '0.8125rem',
|
|
31
|
+
'font-size-sm': '0.75rem',
|
|
32
|
+
'font-size-xs': '0.6875rem',
|
|
33
|
+
'font-size-lg': '0.9375rem',
|
|
34
|
+
'font-size-xl': '1.0625rem',
|
|
35
|
+
'line-height-base': '1.4',
|
|
36
|
+
'letter-spacing-base': '-0.01em',
|
|
37
|
+
} as const;
|
|
38
|
+
|
|
39
|
+
export const macosPreset: ThemePreset = {
|
|
40
|
+
light: {
|
|
41
|
+
// #F2F2F7 — systemGroupedBackground
|
|
42
|
+
background: '240 17% 97%',
|
|
43
|
+
foreground: '220 9% 10%',
|
|
44
|
+
card: '0 0% 100%',
|
|
45
|
+
'card-foreground': '220 9% 10%',
|
|
46
|
+
popover: '0 0% 100%',
|
|
47
|
+
'popover-foreground': '220 9% 10%',
|
|
48
|
+
// #007AFF — systemBlue
|
|
49
|
+
primary: '211 100% 50%',
|
|
50
|
+
'primary-foreground': '0 0% 100%',
|
|
51
|
+
// secondarySystemGroupedBackground #EFEFF4
|
|
52
|
+
secondary: '240 17% 95%',
|
|
53
|
+
'secondary-foreground': '220 9% 10%',
|
|
54
|
+
// tertiarySystemGroupedBackground #E5E5EA
|
|
55
|
+
muted: '240 6% 90%',
|
|
56
|
+
'muted-foreground': '220 9% 40%',
|
|
57
|
+
accent: '211 60% 95%',
|
|
58
|
+
'accent-foreground': '211 100% 35%',
|
|
59
|
+
destructive: '0 100% 58%',
|
|
60
|
+
'destructive-foreground': '0 0% 100%',
|
|
61
|
+
// Separator: rgba(60,60,67,0.29) → HSL approx
|
|
62
|
+
border: '240 6% 82%',
|
|
63
|
+
input: '240 6% 88%',
|
|
64
|
+
ring: '211 100% 50%',
|
|
65
|
+
radius: '0.625rem',
|
|
66
|
+
'sidebar-background': '240 17% 94%',
|
|
67
|
+
'sidebar-foreground': '220 9% 10%',
|
|
68
|
+
'sidebar-primary': '211 100% 50%',
|
|
69
|
+
'sidebar-primary-foreground': '0 0% 100%',
|
|
70
|
+
'sidebar-accent': '211 60% 93%',
|
|
71
|
+
'sidebar-accent-foreground': '211 100% 35%',
|
|
72
|
+
'sidebar-border': '240 6% 86%',
|
|
73
|
+
'sidebar-ring': '211 100% 50%',
|
|
74
|
+
'chart-1': '211 100% 50%',
|
|
75
|
+
'chart-2': '146 50% 36%',
|
|
76
|
+
'chart-3': '262 83% 58%',
|
|
77
|
+
'chart-4': '35 100% 50%',
|
|
78
|
+
'chart-5': '346 77% 50%',
|
|
79
|
+
...appleTypography,
|
|
80
|
+
},
|
|
81
|
+
dark: {
|
|
82
|
+
// #1C1C1E — systemBackground dark
|
|
83
|
+
background: '240 5% 11%',
|
|
84
|
+
foreground: '0 0% 96%',
|
|
85
|
+
// #2C2C2E — secondarySystemBackground dark
|
|
86
|
+
card: '240 4% 18%',
|
|
87
|
+
'card-foreground': '0 0% 96%',
|
|
88
|
+
// #3A3A3C — popover elevated surface
|
|
89
|
+
popover: '240 4% 23%',
|
|
90
|
+
'popover-foreground': '0 0% 96%',
|
|
91
|
+
// #0A84FF — systemBlue dark
|
|
92
|
+
primary: '211 100% 58%',
|
|
93
|
+
'primary-foreground': '0 0% 100%',
|
|
94
|
+
secondary: '240 5% 24%',
|
|
95
|
+
'secondary-foreground': '0 0% 90%',
|
|
96
|
+
// #3A3A3C — tertiarySystemBackground dark
|
|
97
|
+
muted: '240 4% 23%',
|
|
98
|
+
'muted-foreground': '240 5% 60%',
|
|
99
|
+
accent: '211 30% 20%',
|
|
100
|
+
'accent-foreground': '211 100% 70%',
|
|
101
|
+
destructive: '0 100% 65%',
|
|
102
|
+
'destructive-foreground': '0 0% 100%',
|
|
103
|
+
// Separator dark: rgba(84,84,88,0.65)
|
|
104
|
+
border: '240 4% 30%',
|
|
105
|
+
input: '240 4% 26%',
|
|
106
|
+
ring: '211 100% 58%',
|
|
107
|
+
radius: '0.625rem',
|
|
108
|
+
'sidebar-background': '240 5% 8%',
|
|
109
|
+
'sidebar-foreground': '0 0% 90%',
|
|
110
|
+
'sidebar-primary': '211 100% 58%',
|
|
111
|
+
'sidebar-primary-foreground': '0 0% 100%',
|
|
112
|
+
'sidebar-accent': '211 25% 18%',
|
|
113
|
+
'sidebar-accent-foreground': '211 100% 70%',
|
|
114
|
+
'sidebar-border': '240 4% 20%',
|
|
115
|
+
'sidebar-ring': '211 100% 58%',
|
|
116
|
+
'chart-1': '211 100% 58%',
|
|
117
|
+
'chart-2': '146 50% 48%',
|
|
118
|
+
'chart-3': '262 83% 65%',
|
|
119
|
+
'chart-4': '35 100% 58%',
|
|
120
|
+
'chart-5': '346 77% 58%',
|
|
121
|
+
...appleTypography,
|
|
122
|
+
},
|
|
123
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ThemePreset } from './types';
|
|
2
|
+
|
|
3
|
+
export const materialPreset: ThemePreset = {
|
|
4
|
+
light: {
|
|
5
|
+
background: '0 0% 99%', foreground: '270 6% 13%',
|
|
6
|
+
card: '0 0% 100%', 'card-foreground': '270 6% 13%',
|
|
7
|
+
popover: '0 0% 100%', 'popover-foreground': '270 6% 13%',
|
|
8
|
+
primary: '258 89% 48%', 'primary-foreground': '0 0% 98%',
|
|
9
|
+
secondary: '264 7% 44%', 'secondary-foreground': '0 0% 98%',
|
|
10
|
+
muted: '0 0% 96%', 'muted-foreground': '270 6% 43%',
|
|
11
|
+
accent: '0 0% 94%', 'accent-foreground': '270 6% 13%',
|
|
12
|
+
destructive: '358 100% 45%', 'destructive-foreground': '0 0% 98%',
|
|
13
|
+
border: '0 0% 89%', input: '0 0% 89%', ring: '258 89% 48%',
|
|
14
|
+
radius: '0.75rem',
|
|
15
|
+
'sidebar-background': '0 0% 97%', 'sidebar-foreground': '270 6% 13%',
|
|
16
|
+
'sidebar-primary': '258 89% 48%', 'sidebar-primary-foreground': '0 0% 98%',
|
|
17
|
+
'sidebar-accent': '0 0% 95%', 'sidebar-accent-foreground': '270 6% 13%',
|
|
18
|
+
'sidebar-border': '0 0% 89%', 'sidebar-ring': '258 89% 48%',
|
|
19
|
+
'chart-1': '258 89% 48%', 'chart-2': '145 63% 42%', 'chart-3': '262 83% 58%', 'chart-4': '36 100% 50%', 'chart-5': '358 100% 45%',
|
|
20
|
+
},
|
|
21
|
+
dark: {
|
|
22
|
+
background: '270 6% 13%', foreground: '270 3% 90%',
|
|
23
|
+
card: '270 6% 17%', 'card-foreground': '270 3% 90%',
|
|
24
|
+
popover: '270 6% 17%', 'popover-foreground': '270 3% 90%',
|
|
25
|
+
primary: '258 100% 87%', 'primary-foreground': '0 0% 9%',
|
|
26
|
+
secondary: '264 14% 71%', 'secondary-foreground': '0 0% 9%',
|
|
27
|
+
muted: '270 6% 19%', 'muted-foreground': '270 3% 60%',
|
|
28
|
+
accent: '270 6% 22%', 'accent-foreground': '270 3% 90%',
|
|
29
|
+
destructive: '358 100% 70%', 'destructive-foreground': '0 0% 98%',
|
|
30
|
+
border: '270 6% 26%', input: '270 6% 26%', ring: '258 100% 87%',
|
|
31
|
+
radius: '0.75rem',
|
|
32
|
+
'sidebar-background': '270 6% 11%', 'sidebar-foreground': '270 3% 90%',
|
|
33
|
+
'sidebar-primary': '258 100% 87%', 'sidebar-primary-foreground': '0 0% 9%',
|
|
34
|
+
'sidebar-accent': '270 6% 18%', 'sidebar-accent-foreground': '270 3% 90%',
|
|
35
|
+
'sidebar-border': '270 6% 26%', 'sidebar-ring': '258 100% 87%',
|
|
36
|
+
'chart-1': '258 100% 87%', 'chart-2': '145 63% 58%', 'chart-3': '262 83% 58%', 'chart-4': '36 100% 63%', 'chart-5': '358 100% 70%',
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ThemePreset } from './types';
|
|
2
|
+
|
|
3
|
+
export const nordPreset: ThemePreset = {
|
|
4
|
+
light: {
|
|
5
|
+
background: '220 16% 96%', foreground: '220 16% 22%',
|
|
6
|
+
card: '220 16% 98%', 'card-foreground': '220 16% 22%',
|
|
7
|
+
popover: '220 16% 98%', 'popover-foreground': '220 16% 22%',
|
|
8
|
+
primary: '213 32% 52%', 'primary-foreground': '0 0% 9%',
|
|
9
|
+
secondary: '179 25% 65%', 'secondary-foreground': '0 0% 9%',
|
|
10
|
+
muted: '220 16% 93%', 'muted-foreground': '220 16% 52%',
|
|
11
|
+
accent: '220 16% 91%', 'accent-foreground': '220 16% 22%',
|
|
12
|
+
destructive: '354 42% 56%', 'destructive-foreground': '0 0% 98%',
|
|
13
|
+
border: '220 16% 86%', input: '220 16% 86%', ring: '213 32% 52%',
|
|
14
|
+
radius: '0.5rem',
|
|
15
|
+
'sidebar-background': '220 16% 94%', 'sidebar-foreground': '220 16% 22%',
|
|
16
|
+
'sidebar-primary': '213 32% 52%', 'sidebar-primary-foreground': '0 0% 9%',
|
|
17
|
+
'sidebar-accent': '220 16% 92%', 'sidebar-accent-foreground': '220 16% 22%',
|
|
18
|
+
'sidebar-border': '220 16% 86%', 'sidebar-ring': '213 32% 52%',
|
|
19
|
+
'chart-1': '213 32% 52%', 'chart-2': '92 28% 65%', 'chart-3': '262 83% 58%', 'chart-4': '14 51% 63%', 'chart-5': '354 42% 56%',
|
|
20
|
+
},
|
|
21
|
+
dark: {
|
|
22
|
+
background: '220 16% 22%', foreground: '218 27% 94%',
|
|
23
|
+
card: '220 16% 26%', 'card-foreground': '218 27% 94%',
|
|
24
|
+
popover: '220 16% 26%', 'popover-foreground': '218 27% 94%',
|
|
25
|
+
primary: '213 32% 52%', 'primary-foreground': '0 0% 9%',
|
|
26
|
+
secondary: '179 25% 65%', 'secondary-foreground': '0 0% 9%',
|
|
27
|
+
muted: '220 16% 28%', 'muted-foreground': '218 27% 64%',
|
|
28
|
+
accent: '220 16% 30%', 'accent-foreground': '218 27% 94%',
|
|
29
|
+
destructive: '354 42% 56%', 'destructive-foreground': '0 0% 98%',
|
|
30
|
+
border: '220 16% 32%', input: '220 16% 32%', ring: '213 32% 52%',
|
|
31
|
+
radius: '0.5rem',
|
|
32
|
+
'sidebar-background': '220 16% 20%', 'sidebar-foreground': '218 27% 94%',
|
|
33
|
+
'sidebar-primary': '213 32% 52%', 'sidebar-primary-foreground': '0 0% 9%',
|
|
34
|
+
'sidebar-accent': '220 16% 18%', 'sidebar-accent-foreground': '218 27% 94%',
|
|
35
|
+
'sidebar-border': '220 16% 32%', 'sidebar-ring': '213 32% 52%',
|
|
36
|
+
'chart-1': '213 32% 52%', 'chart-2': '92 28% 65%', 'chart-3': '262 83% 58%', 'chart-4': '14 51% 63%', 'chart-5': '354 42% 56%',
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ThemePreset } from './types';
|
|
2
|
+
|
|
3
|
+
export const oneDarkPreset: ThemePreset = {
|
|
4
|
+
light: {
|
|
5
|
+
background: '0 0% 98%', foreground: '230 8% 24%',
|
|
6
|
+
card: '0 0% 100%', 'card-foreground': '230 8% 24%',
|
|
7
|
+
popover: '0 0% 100%', 'popover-foreground': '230 8% 24%',
|
|
8
|
+
primary: '207 82% 56%', 'primary-foreground': '0 0% 9%',
|
|
9
|
+
secondary: '187 47% 45%', 'secondary-foreground': '0 0% 98%',
|
|
10
|
+
muted: '0 0% 95%', 'muted-foreground': '230 8% 54%',
|
|
11
|
+
accent: '286 60% 57%', 'accent-foreground': '230 8% 24%',
|
|
12
|
+
destructive: '355 65% 55%', 'destructive-foreground': '0 0% 98%',
|
|
13
|
+
border: '0 0% 88%', input: '0 0% 88%', ring: '207 82% 56%',
|
|
14
|
+
radius: '0.5rem',
|
|
15
|
+
'sidebar-background': '0 0% 96%', 'sidebar-foreground': '230 8% 24%',
|
|
16
|
+
'sidebar-primary': '207 82% 56%', 'sidebar-primary-foreground': '0 0% 9%',
|
|
17
|
+
'sidebar-accent': '0 0% 94%', 'sidebar-accent-foreground': '230 8% 24%',
|
|
18
|
+
'sidebar-border': '0 0% 88%', 'sidebar-ring': '207 82% 56%',
|
|
19
|
+
'chart-1': '207 82% 56%', 'chart-2': '95 38% 52%', 'chart-3': '262 83% 58%', 'chart-4': '29 54% 51%', 'chart-5': '355 65% 55%',
|
|
20
|
+
},
|
|
21
|
+
dark: {
|
|
22
|
+
background: '220 13% 18%', foreground: '220 14% 71%',
|
|
23
|
+
card: '220 13% 22%', 'card-foreground': '220 14% 71%',
|
|
24
|
+
popover: '220 13% 22%', 'popover-foreground': '220 14% 71%',
|
|
25
|
+
primary: '207 82% 66%', 'primary-foreground': '0 0% 9%',
|
|
26
|
+
secondary: '187 47% 55%', 'secondary-foreground': '0 0% 9%',
|
|
27
|
+
muted: '220 13% 24%', 'muted-foreground': '220 14% 55%',
|
|
28
|
+
accent: '286 60% 67%', 'accent-foreground': '220 14% 71%',
|
|
29
|
+
destructive: '355 65% 65%', 'destructive-foreground': '0 0% 98%',
|
|
30
|
+
border: '220 13% 28%', input: '220 13% 28%', ring: '207 82% 66%',
|
|
31
|
+
radius: '0.5rem',
|
|
32
|
+
'sidebar-background': '220 13% 16%', 'sidebar-foreground': '220 14% 71%',
|
|
33
|
+
'sidebar-primary': '207 82% 66%', 'sidebar-primary-foreground': '0 0% 9%',
|
|
34
|
+
'sidebar-accent': '220 13% 14%', 'sidebar-accent-foreground': '220 14% 71%',
|
|
35
|
+
'sidebar-border': '220 13% 28%', 'sidebar-ring': '207 82% 66%',
|
|
36
|
+
'chart-1': '207 82% 66%', 'chart-2': '95 38% 62%', 'chart-3': '262 83% 58%', 'chart-4': '29 54% 61%', 'chart-5': '355 65% 65%',
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ThemePreset } from './types';
|
|
2
|
+
|
|
3
|
+
export const softPreset: ThemePreset = {
|
|
4
|
+
light: {
|
|
5
|
+
background: '0 0% 98%',
|
|
6
|
+
foreground: '240 6% 10%',
|
|
7
|
+
card: '0 0% 100%',
|
|
8
|
+
'card-foreground': '240 6% 10%',
|
|
9
|
+
muted: '240 5% 96%',
|
|
10
|
+
'muted-foreground': '240 4% 46%',
|
|
11
|
+
accent: '240 5% 94%',
|
|
12
|
+
'accent-foreground': '240 6% 10%',
|
|
13
|
+
border: '240 5% 91%',
|
|
14
|
+
input: '240 5% 91%',
|
|
15
|
+
radius: '1rem',
|
|
16
|
+
'sidebar-accent': '240 5% 94%',
|
|
17
|
+
'sidebar-border': '240 5% 91%',
|
|
18
|
+
},
|
|
19
|
+
dark: {
|
|
20
|
+
background: '240 6% 8%',
|
|
21
|
+
foreground: '0 0% 96%',
|
|
22
|
+
card: '240 5% 12%',
|
|
23
|
+
'card-foreground': '0 0% 96%',
|
|
24
|
+
muted: '240 4% 16%',
|
|
25
|
+
'muted-foreground': '240 5% 64%',
|
|
26
|
+
accent: '240 5% 16%',
|
|
27
|
+
'accent-foreground': '0 0% 96%',
|
|
28
|
+
border: '240 5% 20%',
|
|
29
|
+
input: '240 5% 20%',
|
|
30
|
+
radius: '1rem',
|
|
31
|
+
'sidebar-background': '240 6% 6%',
|
|
32
|
+
'sidebar-accent': '240 5% 14%',
|
|
33
|
+
'sidebar-border': '240 5% 20%',
|
|
34
|
+
},
|
|
35
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ThemePreset } from './types';
|
|
2
|
+
|
|
3
|
+
export const solarizedPreset: ThemePreset = {
|
|
4
|
+
light: {
|
|
5
|
+
background: '44 87% 94%', foreground: '192 81% 14%',
|
|
6
|
+
card: '44 87% 96%', 'card-foreground': '192 81% 14%',
|
|
7
|
+
popover: '44 87% 96%', 'popover-foreground': '192 81% 14%',
|
|
8
|
+
primary: '205 69% 49%', 'primary-foreground': '0 0% 98%',
|
|
9
|
+
secondary: '175 59% 40%', 'secondary-foreground': '0 0% 98%',
|
|
10
|
+
muted: '44 87% 91%', 'muted-foreground': '192 81% 44%',
|
|
11
|
+
accent: '44 87% 89%', 'accent-foreground': '192 81% 14%',
|
|
12
|
+
destructive: '1 79% 55%', 'destructive-foreground': '0 0% 98%',
|
|
13
|
+
border: '44 87% 84%', input: '44 87% 84%', ring: '205 69% 49%',
|
|
14
|
+
radius: '0.25rem',
|
|
15
|
+
'sidebar-background': '44 87% 92%', 'sidebar-foreground': '192 81% 14%',
|
|
16
|
+
'sidebar-primary': '205 69% 49%', 'sidebar-primary-foreground': '0 0% 98%',
|
|
17
|
+
'sidebar-accent': '44 87% 90%', 'sidebar-accent-foreground': '192 81% 14%',
|
|
18
|
+
'sidebar-border': '44 87% 84%', 'sidebar-ring': '205 69% 49%',
|
|
19
|
+
'chart-1': '205 69% 49%', 'chart-2': '68 100% 30%', 'chart-3': '262 83% 58%', 'chart-4': '45 100% 35%', 'chart-5': '1 79% 55%',
|
|
20
|
+
},
|
|
21
|
+
dark: {
|
|
22
|
+
background: '192 100% 11%', foreground: '44 87% 94%',
|
|
23
|
+
card: '192 100% 15%', 'card-foreground': '44 87% 94%',
|
|
24
|
+
popover: '192 100% 15%', 'popover-foreground': '44 87% 94%',
|
|
25
|
+
primary: '205 69% 49%', 'primary-foreground': '0 0% 98%',
|
|
26
|
+
secondary: '175 59% 40%', 'secondary-foreground': '0 0% 98%',
|
|
27
|
+
muted: '192 100% 17%', 'muted-foreground': '44 87% 60%',
|
|
28
|
+
accent: '192 100% 20%', 'accent-foreground': '44 87% 94%',
|
|
29
|
+
destructive: '1 79% 55%', 'destructive-foreground': '0 0% 98%',
|
|
30
|
+
border: '192 100% 22%', input: '192 100% 22%', ring: '205 69% 49%',
|
|
31
|
+
radius: '0.25rem',
|
|
32
|
+
'sidebar-background': '192 100% 9%', 'sidebar-foreground': '44 87% 94%',
|
|
33
|
+
'sidebar-primary': '205 69% 49%', 'sidebar-primary-foreground': '0 0% 98%',
|
|
34
|
+
'sidebar-accent': '192 100% 14%', 'sidebar-accent-foreground': '44 87% 94%',
|
|
35
|
+
'sidebar-border': '192 100% 22%', 'sidebar-ring': '205 69% 49%',
|
|
36
|
+
'chart-1': '205 69% 49%', 'chart-2': '68 100% 45%', 'chart-3': '262 83% 58%', 'chart-4': '45 100% 51%', 'chart-5': '1 79% 55%',
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ThemePreset } from './types';
|
|
2
|
+
|
|
3
|
+
export const tokyoNightPreset: ThemePreset = {
|
|
4
|
+
light: {
|
|
5
|
+
background: '0 0% 99%', foreground: '240 7% 30%',
|
|
6
|
+
card: '0 0% 100%', 'card-foreground': '240 7% 30%',
|
|
7
|
+
popover: '0 0% 100%', 'popover-foreground': '240 7% 30%',
|
|
8
|
+
primary: '207 82% 56%', 'primary-foreground': '0 0% 9%',
|
|
9
|
+
secondary: '199 76% 59%', 'secondary-foreground': '0 0% 9%',
|
|
10
|
+
muted: '0 0% 96%', 'muted-foreground': '240 7% 60%',
|
|
11
|
+
accent: '180 58% 60%', 'accent-foreground': '240 7% 30%',
|
|
12
|
+
destructive: '2 56% 53%', 'destructive-foreground': '0 0% 98%',
|
|
13
|
+
border: '0 0% 89%', input: '0 0% 89%', ring: '207 82% 56%',
|
|
14
|
+
radius: '0.5rem',
|
|
15
|
+
'sidebar-background': '0 0% 97%', 'sidebar-foreground': '240 7% 30%',
|
|
16
|
+
'sidebar-primary': '207 82% 56%', 'sidebar-primary-foreground': '0 0% 9%',
|
|
17
|
+
'sidebar-accent': '0 0% 95%', 'sidebar-accent-foreground': '240 7% 30%',
|
|
18
|
+
'sidebar-border': '0 0% 89%', 'sidebar-ring': '207 82% 56%',
|
|
19
|
+
'chart-1': '207 82% 56%', 'chart-2': '158 64% 42%', 'chart-3': '262 83% 58%', 'chart-4': '32 93% 56%', 'chart-5': '2 56% 53%',
|
|
20
|
+
},
|
|
21
|
+
dark: {
|
|
22
|
+
background: '235 18% 12%', foreground: '230 8% 76%',
|
|
23
|
+
card: '235 18% 16%', 'card-foreground': '230 8% 76%',
|
|
24
|
+
popover: '235 18% 16%', 'popover-foreground': '230 8% 76%',
|
|
25
|
+
primary: '207 82% 66%', 'primary-foreground': '0 0% 9%',
|
|
26
|
+
secondary: '199 76% 69%', 'secondary-foreground': '0 0% 9%',
|
|
27
|
+
muted: '235 18% 18%', 'muted-foreground': '230 8% 56%',
|
|
28
|
+
accent: '180 58% 70%', 'accent-foreground': '230 8% 76%',
|
|
29
|
+
destructive: '2 56% 63%', 'destructive-foreground': '0 0% 98%',
|
|
30
|
+
border: '235 18% 22%', input: '235 18% 22%', ring: '207 82% 66%',
|
|
31
|
+
radius: '0.5rem',
|
|
32
|
+
'sidebar-background': '235 18% 10%', 'sidebar-foreground': '230 8% 76%',
|
|
33
|
+
'sidebar-primary': '207 82% 66%', 'sidebar-primary-foreground': '0 0% 9%',
|
|
34
|
+
'sidebar-accent': '235 18% 15%', 'sidebar-accent-foreground': '230 8% 76%',
|
|
35
|
+
'sidebar-border': '235 18% 22%', 'sidebar-ring': '207 82% 66%',
|
|
36
|
+
'chart-1': '207 82% 66%', 'chart-2': '158 64% 52%', 'chart-3': '262 83% 58%', 'chart-4': '32 93% 66%', 'chart-5': '2 56% 63%',
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Windows 11 Fluent Design: LayerFillColorDefault (#F3F3F3), AccentDark1 (#0067C0),
|
|
3
|
+
* 6px radius (WinUI 3 cards), subtle Mica-style chrome.
|
|
4
|
+
* Source: Microsoft Fluent 2 Design Tokens — https://fluent2.microsoft.design/color
|
|
5
|
+
*/
|
|
6
|
+
import type { ThemePreset } from './types';
|
|
7
|
+
|
|
8
|
+
/** Segoe UI Variable typography (Fluent Design: 14pt base, neutral spacing) */
|
|
9
|
+
const fluentTypography = {
|
|
10
|
+
'font-sans': '"Segoe UI Variable", "Segoe UI", ui-sans-serif, system-ui, sans-serif',
|
|
11
|
+
'font-mono': '"Cascadia Code", "Cascadia Mono", Consolas, "Courier New", monospace',
|
|
12
|
+
'font-size-base': '0.875rem',
|
|
13
|
+
'font-size-sm': '0.8125rem',
|
|
14
|
+
'font-size-xs': '0.75rem',
|
|
15
|
+
'font-size-lg': '1rem',
|
|
16
|
+
'font-size-xl': '1.125rem',
|
|
17
|
+
'line-height-base': '1.5',
|
|
18
|
+
'letter-spacing-base': '0em',
|
|
19
|
+
} as const;
|
|
20
|
+
|
|
21
|
+
export const windowsPreset: ThemePreset = {
|
|
22
|
+
light: {
|
|
23
|
+
// #F3F3F3 — LayerFillColorDefault
|
|
24
|
+
background: '0 0% 95%',
|
|
25
|
+
foreground: '0 0% 9%',
|
|
26
|
+
// CardBackgroundFillColorDefault
|
|
27
|
+
card: '0 0% 100%',
|
|
28
|
+
'card-foreground': '0 0% 9%',
|
|
29
|
+
popover: '0 0% 100%',
|
|
30
|
+
'popover-foreground': '0 0% 9%',
|
|
31
|
+
// #0067C0 — AccentDark1 (WCAG AA on white)
|
|
32
|
+
primary: '210 100% 38%',
|
|
33
|
+
'primary-foreground': '0 0% 100%',
|
|
34
|
+
// SubtleFillColorSecondaryBackground #F0F0F0
|
|
35
|
+
secondary: '0 0% 94%',
|
|
36
|
+
'secondary-foreground': '0 0% 9%',
|
|
37
|
+
// SubtleFillColorTertiaryBackground #EBEBEB
|
|
38
|
+
muted: '0 0% 92%',
|
|
39
|
+
'muted-foreground': '0 0% 42%',
|
|
40
|
+
accent: '210 60% 94%',
|
|
41
|
+
'accent-foreground': '210 100% 28%',
|
|
42
|
+
destructive: '0 90% 55%',
|
|
43
|
+
'destructive-foreground': '0 0% 100%',
|
|
44
|
+
// ControlStrokeColorDefault: rgba(0,0,0,0.0578)
|
|
45
|
+
border: '0 0% 87%',
|
|
46
|
+
input: '0 0% 90%',
|
|
47
|
+
ring: '210 100% 45%',
|
|
48
|
+
// WinUI 3: 4px controls, 8px cards/dialogs
|
|
49
|
+
radius: '0.375rem',
|
|
50
|
+
'sidebar-background': '0 0% 92%',
|
|
51
|
+
'sidebar-foreground': '0 0% 9%',
|
|
52
|
+
'sidebar-primary': '210 100% 38%',
|
|
53
|
+
'sidebar-primary-foreground': '0 0% 100%',
|
|
54
|
+
'sidebar-accent': '210 50% 93%',
|
|
55
|
+
'sidebar-accent-foreground': '210 100% 28%',
|
|
56
|
+
'sidebar-border': '0 0% 86%',
|
|
57
|
+
'sidebar-ring': '210 100% 45%',
|
|
58
|
+
'chart-1': '210 100% 38%',
|
|
59
|
+
'chart-2': '145 63% 38%',
|
|
60
|
+
'chart-3': '262 83% 55%',
|
|
61
|
+
'chart-4': '35 100% 48%',
|
|
62
|
+
'chart-5': '346 77% 50%',
|
|
63
|
+
...fluentTypography,
|
|
64
|
+
},
|
|
65
|
+
dark: {
|
|
66
|
+
// #202020 — SolidBackgroundFillColorBase dark
|
|
67
|
+
background: '0 0% 13%',
|
|
68
|
+
foreground: '0 0% 96%',
|
|
69
|
+
// #2B2B2B — CardBackgroundFillColorDefault dark
|
|
70
|
+
card: '0 0% 17%',
|
|
71
|
+
'card-foreground': '0 0% 96%',
|
|
72
|
+
// #323232 — elevated surface
|
|
73
|
+
popover: '0 0% 20%',
|
|
74
|
+
'popover-foreground': '0 0% 96%',
|
|
75
|
+
// #60CDFF — AccentLight2 dark mode
|
|
76
|
+
primary: '200 100% 69%',
|
|
77
|
+
'primary-foreground': '0 0% 9%',
|
|
78
|
+
secondary: '0 0% 22%',
|
|
79
|
+
'secondary-foreground': '0 0% 90%',
|
|
80
|
+
muted: '0 0% 18%',
|
|
81
|
+
'muted-foreground': '0 0% 62%',
|
|
82
|
+
accent: '210 25% 20%',
|
|
83
|
+
'accent-foreground': '200 100% 75%',
|
|
84
|
+
destructive: '0 90% 62%',
|
|
85
|
+
'destructive-foreground': '0 0% 100%',
|
|
86
|
+
// ControlStrokeColorDefault dark: rgba(255,255,255,0.0837)
|
|
87
|
+
border: '0 0% 28%',
|
|
88
|
+
input: '0 0% 24%',
|
|
89
|
+
ring: '200 100% 69%',
|
|
90
|
+
radius: '0.375rem',
|
|
91
|
+
// NavigationView pane background
|
|
92
|
+
'sidebar-background': '0 0% 10%',
|
|
93
|
+
'sidebar-foreground': '0 0% 90%',
|
|
94
|
+
'sidebar-primary': '200 100% 69%',
|
|
95
|
+
'sidebar-primary-foreground': '0 0% 9%',
|
|
96
|
+
'sidebar-accent': '210 20% 18%',
|
|
97
|
+
'sidebar-accent-foreground': '200 100% 75%',
|
|
98
|
+
'sidebar-border': '0 0% 22%',
|
|
99
|
+
'sidebar-ring': '200 100% 69%',
|
|
100
|
+
'chart-1': '200 100% 69%',
|
|
101
|
+
'chart-2': '145 65% 50%',
|
|
102
|
+
'chart-3': '262 83% 65%',
|
|
103
|
+
'chart-4': '35 100% 58%',
|
|
104
|
+
'chart-5': '346 77% 58%',
|
|
105
|
+
...fluentTypography,
|
|
106
|
+
},
|
|
107
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme preset types — lives in ui-core so Wails, Electron, and any
|
|
3
|
+
* non-Next.js consumer can use presets without pulling in @djangocfg/layouts.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/** Core semantic colors (HSL triplets, no hsl() wrapper) */
|
|
7
|
+
export type ThemeCssVarColorKey =
|
|
8
|
+
| 'background'
|
|
9
|
+
| 'foreground'
|
|
10
|
+
| 'card'
|
|
11
|
+
| 'card-foreground'
|
|
12
|
+
| 'popover'
|
|
13
|
+
| 'popover-foreground'
|
|
14
|
+
| 'primary'
|
|
15
|
+
| 'primary-foreground'
|
|
16
|
+
| 'secondary'
|
|
17
|
+
| 'secondary-foreground'
|
|
18
|
+
| 'muted'
|
|
19
|
+
| 'muted-foreground'
|
|
20
|
+
| 'accent'
|
|
21
|
+
| 'accent-foreground'
|
|
22
|
+
| 'destructive'
|
|
23
|
+
| 'destructive-foreground';
|
|
24
|
+
|
|
25
|
+
/** Layout / focus tokens — `radius` is a CSS length, rest are HSL */
|
|
26
|
+
export type ThemeCssVarChromeKey = 'border' | 'input' | 'ring' | 'radius';
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Typography tokens — override system font stack and scale per preset.
|
|
30
|
+
* Values are plain CSS (not HSL): font-family strings, rem lengths, unitless line-height, em letter-spacing.
|
|
31
|
+
*/
|
|
32
|
+
export type ThemeCssVarTypographyKey =
|
|
33
|
+
| 'font-sans'
|
|
34
|
+
| 'font-mono'
|
|
35
|
+
| 'font-size-base'
|
|
36
|
+
| 'font-size-sm'
|
|
37
|
+
| 'font-size-xs'
|
|
38
|
+
| 'font-size-lg'
|
|
39
|
+
| 'font-size-xl'
|
|
40
|
+
| 'line-height-base'
|
|
41
|
+
| 'letter-spacing-base';
|
|
42
|
+
|
|
43
|
+
export type ThemeCssVarSidebarKey =
|
|
44
|
+
| 'sidebar-background'
|
|
45
|
+
| 'sidebar-foreground'
|
|
46
|
+
| 'sidebar-primary'
|
|
47
|
+
| 'sidebar-primary-foreground'
|
|
48
|
+
| 'sidebar-accent'
|
|
49
|
+
| 'sidebar-accent-foreground'
|
|
50
|
+
| 'sidebar-border'
|
|
51
|
+
| 'sidebar-ring';
|
|
52
|
+
|
|
53
|
+
export type ThemeCssVarChartKey = 'chart-1' | 'chart-2' | 'chart-3' | 'chart-4' | 'chart-5';
|
|
54
|
+
|
|
55
|
+
/** All keys that map to `--${key}` in ui-core CSS files */
|
|
56
|
+
export type ThemeCssVarKey =
|
|
57
|
+
| ThemeCssVarColorKey
|
|
58
|
+
| ThemeCssVarChromeKey
|
|
59
|
+
| ThemeCssVarTypographyKey
|
|
60
|
+
| ThemeCssVarSidebarKey
|
|
61
|
+
| ThemeCssVarChartKey;
|
|
62
|
+
|
|
63
|
+
/** Partial map of semantic variables for one color mode */
|
|
64
|
+
export type ThemeCssVarMap = Partial<Record<ThemeCssVarKey, string>>;
|
|
65
|
+
|
|
66
|
+
/** Built-in preset IDs */
|
|
67
|
+
export type ThemeStylePresetId =
|
|
68
|
+
| 'default'
|
|
69
|
+
| 'django-cfg'
|
|
70
|
+
| 'ios'
|
|
71
|
+
| 'macos'
|
|
72
|
+
| 'windows'
|
|
73
|
+
| 'soft'
|
|
74
|
+
| 'dense'
|
|
75
|
+
| 'high-contrast'
|
|
76
|
+
| 'catppuccin'
|
|
77
|
+
| 'dracula'
|
|
78
|
+
| 'github'
|
|
79
|
+
| 'gruvbox'
|
|
80
|
+
| 'material'
|
|
81
|
+
| 'nord'
|
|
82
|
+
| 'one-dark'
|
|
83
|
+
| 'solarized'
|
|
84
|
+
| 'tokyo-night';
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Optional style layer: named preset + per-mode overrides.
|
|
88
|
+
* Merged: globals (CSS imports) → preset → vars.light / vars.dark
|
|
89
|
+
*/
|
|
90
|
+
export interface ThemeStyleConfig {
|
|
91
|
+
/** @default 'default' */
|
|
92
|
+
preset?: ThemeStylePresetId;
|
|
93
|
+
vars?: {
|
|
94
|
+
light?: ThemeCssVarMap;
|
|
95
|
+
dark?: ThemeCssVarMap;
|
|
96
|
+
};
|
|
97
|
+
}
|
package/src/styles/utilities.css
CHANGED
|
@@ -206,3 +206,23 @@
|
|
|
206
206
|
.animate-flipOut {
|
|
207
207
|
animation: flipOut 0.3s ease-in;
|
|
208
208
|
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Glass surface utilities — OS-native translucency effects.
|
|
212
|
+
* Apply to panels/sidebars that sit over a blurred background.
|
|
213
|
+
* Requires `isolation: isolate` and a background image/color on a parent.
|
|
214
|
+
*/
|
|
215
|
+
|
|
216
|
+
/* macOS Vibrancy — strong blur, 72% opacity, high saturation */
|
|
217
|
+
.glass-macos {
|
|
218
|
+
backdrop-filter: blur(20px) saturate(180%);
|
|
219
|
+
-webkit-backdrop-filter: blur(20px) saturate(180%);
|
|
220
|
+
background-color: hsl(var(--background) / 0.72);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/* Windows 11 Mica / Acrylic — deeper blur, softer opacity */
|
|
224
|
+
.glass-win11 {
|
|
225
|
+
backdrop-filter: blur(60px) saturate(125%);
|
|
226
|
+
-webkit-backdrop-filter: blur(60px) saturate(125%);
|
|
227
|
+
background-color: hsl(var(--background) / 0.85);
|
|
228
|
+
}
|