@djangocfg/ui-core 2.1.394 → 2.1.397

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.
Files changed (34) hide show
  1. package/README.md +14 -0
  2. package/package.json +4 -4
  3. package/src/components/effects/GlowBackground.tsx +1 -1
  4. package/src/components/navigation/sidebar/sidebar.tsx +4 -4
  5. package/src/hooks/index.ts +1 -0
  6. package/src/hooks/tabs/activeTabStore.ts +167 -0
  7. package/src/hooks/tabs/index.ts +17 -0
  8. package/src/hooks/tabs/tabId.ts +44 -0
  9. package/src/hooks/tabs/useActiveTab.ts +64 -0
  10. package/src/styles/README.md +149 -123
  11. package/src/styles/base.css +3 -3
  12. package/src/styles/presets/presets.ts +0 -9
  13. package/src/styles/presets/themes/dense.ts +10 -10
  14. package/src/styles/presets/themes/django-cfg.ts +13 -13
  15. package/src/styles/presets/themes/high-contrast.ts +11 -11
  16. package/src/styles/presets/themes/index.ts +0 -18
  17. package/src/styles/presets/themes/ios.ts +64 -64
  18. package/src/styles/presets/themes/macos.ts +64 -64
  19. package/src/styles/presets/themes/soft.ts +25 -25
  20. package/src/styles/presets/themes/windows.ts +64 -64
  21. package/src/styles/presets/types.ts +26 -12
  22. package/src/styles/theme/dark.css +47 -53
  23. package/src/styles/theme/light.css +47 -53
  24. package/src/styles/theme/tokens.css +128 -113
  25. package/src/styles/utilities.css +44 -6
  26. package/src/styles/presets/themes/catppuccin.ts +0 -38
  27. package/src/styles/presets/themes/dracula.ts +0 -38
  28. package/src/styles/presets/themes/github.ts +0 -38
  29. package/src/styles/presets/themes/gruvbox.ts +0 -38
  30. package/src/styles/presets/themes/material.ts +0 -38
  31. package/src/styles/presets/themes/nord.ts +0 -38
  32. package/src/styles/presets/themes/one-dark.ts +0 -38
  33. package/src/styles/presets/themes/solarized.ts +0 -38
  34. package/src/styles/presets/themes/tokyo-night.ts +0 -38
@@ -2,73 +2,73 @@ import type { ThemePreset } from './types';
2
2
 
3
3
  export const iosPreset: ThemePreset = {
4
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%',
5
+ background: 'hsl(0 0% 98%)',
6
+ foreground: 'hsl(220 9% 12%)',
7
+ card: 'hsl(0 0% 100%)',
8
+ 'card-foreground': 'hsl(220 9% 12%)',
9
+ popover: 'hsl(0 0% 100%)',
10
+ 'popover-foreground': 'hsl(220 9% 12%)',
11
+ primary: 'hsl(211 100% 50%)',
12
+ 'primary-foreground': 'hsl(0 0% 100%)',
13
+ secondary: 'hsl(220 9% 92%)',
14
+ 'secondary-foreground': 'hsl(220 9% 12%)',
15
+ muted: 'hsl(220 9% 94%)',
16
+ 'muted-foreground': 'hsl(220 9% 40%)',
17
+ accent: 'hsl(220 9% 94%)',
18
+ 'accent-foreground': 'hsl(220 9% 12%)',
19
+ destructive: 'hsl(0 100% 58%)',
20
+ 'destructive-foreground': 'hsl(0 0% 100%)',
21
+ border: 'hsl(220 9% 88%)',
22
+ input: 'hsl(220 9% 88%)',
23
+ ring: 'hsl(211 100% 50%)',
24
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%',
25
+ 'sidebar-background': 'hsl(0 0% 99%)',
26
+ 'sidebar-foreground': 'hsl(220 9% 12%)',
27
+ 'sidebar-primary': 'hsl(211 100% 50%)',
28
+ 'sidebar-primary-foreground': 'hsl(0 0% 100%)',
29
+ 'sidebar-accent': 'hsl(220 9% 94%)',
30
+ 'sidebar-accent-foreground': 'hsl(220 9% 12%)',
31
+ 'sidebar-border': 'hsl(220 9% 88%)',
32
+ 'sidebar-ring': 'hsl(211 100% 50%)',
33
+ 'chart-1': 'hsl(211 100% 50%)',
34
+ 'chart-2': 'hsl(145 63% 42%)',
35
+ 'chart-3': 'hsl(262 83% 58%)',
36
+ 'chart-4': 'hsl(35 100% 50%)',
37
+ 'chart-5': 'hsl(346 77% 50%)',
38
38
  },
39
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%',
40
+ background: 'hsl(240 6% 10%)',
41
+ foreground: 'hsl(0 0% 96%)',
42
+ card: 'hsl(240 6% 14%)',
43
+ 'card-foreground': 'hsl(0 0% 96%)',
44
+ popover: 'hsl(240 6% 16%)',
45
+ 'popover-foreground': 'hsl(0 0% 96%)',
46
+ primary: 'hsl(211 100% 55%)',
47
+ 'primary-foreground': 'hsl(0 0% 100%)',
48
+ secondary: 'hsl(240 5% 26%)',
49
+ 'secondary-foreground': 'hsl(0 0% 96%)',
50
+ muted: 'hsl(240 5% 16%)',
51
+ 'muted-foreground': 'hsl(240 5% 64%)',
52
+ accent: 'hsl(240 5% 18%)',
53
+ 'accent-foreground': 'hsl(0 0% 96%)',
54
+ destructive: 'hsl(0 100% 67%)',
55
+ 'destructive-foreground': 'hsl(0 0% 100%)',
56
+ border: 'hsl(240 5% 22%)',
57
+ input: 'hsl(240 5% 22%)',
58
+ ring: 'hsl(211 100% 55%)',
59
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%',
60
+ 'sidebar-background': 'hsl(240 6% 8%)',
61
+ 'sidebar-foreground': 'hsl(0 0% 96%)',
62
+ 'sidebar-primary': 'hsl(211 100% 55%)',
63
+ 'sidebar-primary-foreground': 'hsl(0 0% 100%)',
64
+ 'sidebar-accent': 'hsl(240 5% 16%)',
65
+ 'sidebar-accent-foreground': 'hsl(0 0% 96%)',
66
+ 'sidebar-border': 'hsl(240 5% 22%)',
67
+ 'sidebar-ring': 'hsl(211 100% 55%)',
68
+ 'chart-1': 'hsl(211 100% 55%)',
69
+ 'chart-2': 'hsl(145 65% 52%)',
70
+ 'chart-3': 'hsl(262 83% 65%)',
71
+ 'chart-4': 'hsl(35 100% 58%)',
72
+ 'chart-5': 'hsl(346 77% 58%)',
73
73
  },
74
74
  };
@@ -29,97 +29,97 @@ const appleTypography = {
29
29
  export const macosPreset: ThemePreset = {
30
30
  light: {
31
31
  // systemGroupedBackground #F2F2F7 — main page canvas
32
- background: '240 17% 97%',
33
- foreground: '0 0% 7%',
32
+ background: 'hsl(240 17% 97%)',
33
+ foreground: 'hsl(0 0% 7%)',
34
34
  // Cards: pure white elevated surface — standard Apple insetGrouped cell
35
- card: '0 0% 100%',
36
- 'card-foreground': '0 0% 7%',
35
+ card: 'hsl(0 0% 100%)',
36
+ 'card-foreground': 'hsl(0 0% 7%)',
37
37
  // Popovers / context menus: white with system drop shadow
38
- popover: '0 0% 100%',
39
- 'popover-foreground': '0 0% 7%',
38
+ popover: 'hsl(0 0% 100%)',
39
+ 'popover-foreground': 'hsl(0 0% 7%)',
40
40
  // systemBlue #007AFF
41
- primary: '211 100% 50%',
42
- 'primary-foreground': '0 0% 100%',
41
+ primary: 'hsl(211 100% 50%)',
42
+ 'primary-foreground': 'hsl(0 0% 100%)',
43
43
  // secondarySystemGroupedBackground #EFEFF4 — section headers, nested surfaces
44
- secondary: '240 12% 95%',
45
- 'secondary-foreground': '0 0% 7%',
44
+ secondary: 'hsl(240 12% 95%)',
45
+ 'secondary-foreground': 'hsl(0 0% 7%)',
46
46
  // tertiarySystemGroupedBackground #E5E5EA — chips, tag pills, disabled fills
47
- muted: '240 8% 91%',
48
- 'muted-foreground': '240 3% 44%',
47
+ muted: 'hsl(240 8% 91%)',
48
+ 'muted-foreground': 'hsl(240 3% 44%)',
49
49
  // Blue-tinted hover state — Apple uses a subtle blue wash, never plain grey
50
- accent: '211 50% 96%',
51
- 'accent-foreground': '211 100% 36%',
50
+ accent: 'hsl(211 50% 96%)',
51
+ 'accent-foreground': 'hsl(211 100% 36%)',
52
52
  // systemRed #FF3B30
53
- destructive: '2 100% 59%',
54
- 'destructive-foreground': '0 0% 100%',
53
+ destructive: 'hsl(2 100% 59%)',
54
+ 'destructive-foreground': 'hsl(0 0% 100%)',
55
55
  // Apple opaque separator: rgba(60,60,67,0.29) on white ≈ #C6C6C8 → HSL 240 3% 78%
56
56
  // Kept intentionally light — Apple hairline, not a thick rule
57
- border: '240 3% 78%',
58
- input: '240 8% 93%',
59
- ring: '211 100% 50%',
57
+ border: 'hsl(240 3% 78%)',
58
+ input: 'hsl(240 8% 93%)',
59
+ ring: 'hsl(211 100% 50%)',
60
60
  radius: '0.625rem',
61
61
  // Sidebar: slighly darker than page, matches macOS sidebar material
62
- 'sidebar-background': '240 12% 94%',
63
- 'sidebar-foreground': '0 0% 7%',
64
- 'sidebar-primary': '211 100% 50%',
65
- 'sidebar-primary-foreground': '0 0% 100%',
66
- 'sidebar-accent': '211 50% 93%',
67
- 'sidebar-accent-foreground': '211 100% 36%',
68
- 'sidebar-border': '240 3% 82%',
69
- 'sidebar-ring': '211 100% 50%',
62
+ 'sidebar-background': 'hsl(240 12% 94%)',
63
+ 'sidebar-foreground': 'hsl(0 0% 7%)',
64
+ 'sidebar-primary': 'hsl(211 100% 50%)',
65
+ 'sidebar-primary-foreground': 'hsl(0 0% 100%)',
66
+ 'sidebar-accent': 'hsl(211 50% 93%)',
67
+ 'sidebar-accent-foreground': 'hsl(211 100% 36%)',
68
+ 'sidebar-border': 'hsl(240 3% 82%)',
69
+ 'sidebar-ring': 'hsl(211 100% 50%)',
70
70
  // Chart: systemBlue + Apple tint palette
71
- 'chart-1': '211 100% 50%',
72
- 'chart-2': '142 52% 40%',
73
- 'chart-3': '262 60% 56%',
74
- 'chart-4': '35 100% 48%',
75
- 'chart-5': '2 100% 59%',
71
+ 'chart-1': 'hsl(211 100% 50%)',
72
+ 'chart-2': 'hsl(142 52% 40%)',
73
+ 'chart-3': 'hsl(262 60% 56%)',
74
+ 'chart-4': 'hsl(35 100% 48%)',
75
+ 'chart-5': 'hsl(2 100% 59%)',
76
76
  ...appleTypography,
77
77
  },
78
78
  dark: {
79
79
  // Deeper than stock #1C1C1E — matches Sequoia dark finder/mail chrome (#141414)
80
- background: '240 5% 8%',
81
- foreground: '0 0% 95%',
80
+ background: 'hsl(240 5% 8%)',
81
+ foreground: 'hsl(0 0% 95%)',
82
82
  // secondarySystemBackground #1E1E20 — cards slightly elevated
83
- card: '240 3% 12%',
84
- 'card-foreground': '0 0% 95%',
83
+ card: 'hsl(240 3% 12%)',
84
+ 'card-foreground': 'hsl(0 0% 95%)',
85
85
  // #2C2C2E — popovers, menus, dropdowns
86
- popover: '240 3% 17%',
87
- 'popover-foreground': '0 0% 95%',
86
+ popover: 'hsl(240 3% 17%)',
87
+ 'popover-foreground': 'hsl(0 0% 95%)',
88
88
  // systemBlue dark #0A84FF
89
- primary: '211 100% 58%',
90
- 'primary-foreground': '0 0% 100%',
89
+ primary: 'hsl(211 100% 58%)',
90
+ 'primary-foreground': 'hsl(0 0% 100%)',
91
91
  // Elevated neutral surface — slightly lighter than card
92
- secondary: '240 3% 20%',
93
- 'secondary-foreground': '0 0% 88%',
92
+ secondary: 'hsl(240 3% 20%)',
93
+ 'secondary-foreground': 'hsl(0 0% 88%)',
94
94
  // tertiarySystemBackground #3A3A3C — chips, tags, muted fills
95
- muted: '240 3% 23%',
96
- 'muted-foreground': '240 4% 58%',
95
+ muted: 'hsl(240 3% 23%)',
96
+ 'muted-foreground': 'hsl(240 4% 58%)',
97
97
  // Blue-tinted hover (Apple active state in dark)
98
- accent: '211 25% 19%',
99
- 'accent-foreground': '211 100% 72%',
98
+ accent: 'hsl(211 25% 19%)',
99
+ 'accent-foreground': 'hsl(211 100% 72%)',
100
100
  // systemRed dark #FF453A
101
- destructive: '3 100% 62%',
102
- 'destructive-foreground': '0 0% 100%',
101
+ destructive: 'hsl(3 100% 62%)',
102
+ 'destructive-foreground': 'hsl(0 0% 100%)',
103
103
  // Separator dark: rgba(84,84,88,0.36) — ultra-thin, almost invisible
104
- border: '240 3% 22%',
105
- input: '240 3% 19%',
106
- ring: '211 100% 58%',
104
+ border: 'hsl(240 3% 22%)',
105
+ input: 'hsl(240 3% 19%)',
106
+ ring: 'hsl(211 100% 58%)',
107
107
  radius: '0.625rem',
108
108
  // Sidebar: near-black floor — #0D0D0F
109
- 'sidebar-background': '240 5% 5%',
110
- 'sidebar-foreground': '0 0% 90%',
111
- 'sidebar-primary': '211 100% 58%',
112
- 'sidebar-primary-foreground': '0 0% 100%',
113
- 'sidebar-accent': '211 22% 16%',
114
- 'sidebar-accent-foreground': '211 100% 72%',
115
- 'sidebar-border': '240 3% 15%',
116
- 'sidebar-ring': '211 100% 58%',
109
+ 'sidebar-background': 'hsl(240 5% 5%)',
110
+ 'sidebar-foreground': 'hsl(0 0% 90%)',
111
+ 'sidebar-primary': 'hsl(211 100% 58%)',
112
+ 'sidebar-primary-foreground': 'hsl(0 0% 100%)',
113
+ 'sidebar-accent': 'hsl(211 22% 16%)',
114
+ 'sidebar-accent-foreground': 'hsl(211 100% 72%)',
115
+ 'sidebar-border': 'hsl(240 3% 15%)',
116
+ 'sidebar-ring': 'hsl(211 100% 58%)',
117
117
  // Chart: brighter variants for contrast on dark
118
- 'chart-1': '211 100% 58%',
119
- 'chart-2': '142 52% 50%',
120
- 'chart-3': '262 60% 65%',
121
- 'chart-4': '35 100% 56%',
122
- 'chart-5': '3 100% 62%',
118
+ 'chart-1': 'hsl(211 100% 58%)',
119
+ 'chart-2': 'hsl(142 52% 50%)',
120
+ 'chart-3': 'hsl(262 60% 65%)',
121
+ 'chart-4': 'hsl(35 100% 56%)',
122
+ 'chart-5': 'hsl(3 100% 62%)',
123
123
  ...appleTypography,
124
124
  },
125
125
  };
@@ -2,34 +2,34 @@ import type { ThemePreset } from './types';
2
2
 
3
3
  export const softPreset: ThemePreset = {
4
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%',
5
+ background: 'hsl(0 0% 98%)',
6
+ foreground: 'hsl(240 6% 10%)',
7
+ card: 'hsl(0 0% 100%)',
8
+ 'card-foreground': 'hsl(240 6% 10%)',
9
+ muted: 'hsl(240 5% 96%)',
10
+ 'muted-foreground': 'hsl(240 4% 46%)',
11
+ accent: 'hsl(240 5% 94%)',
12
+ 'accent-foreground': 'hsl(240 6% 10%)',
13
+ border: 'hsl(240 5% 91%)',
14
+ input: 'hsl(240 5% 91%)',
15
15
  radius: '1rem',
16
- 'sidebar-accent': '240 5% 94%',
17
- 'sidebar-border': '240 5% 91%',
16
+ 'sidebar-accent': 'hsl(240 5% 94%)',
17
+ 'sidebar-border': 'hsl(240 5% 91%)',
18
18
  },
19
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%',
20
+ background: 'hsl(240 6% 8%)',
21
+ foreground: 'hsl(0 0% 96%)',
22
+ card: 'hsl(240 5% 12%)',
23
+ 'card-foreground': 'hsl(0 0% 96%)',
24
+ muted: 'hsl(240 4% 16%)',
25
+ 'muted-foreground': 'hsl(240 5% 64%)',
26
+ accent: 'hsl(240 5% 16%)',
27
+ 'accent-foreground': 'hsl(0 0% 96%)',
28
+ border: 'hsl(240 5% 20%)',
29
+ input: 'hsl(240 5% 20%)',
30
30
  radius: '1rem',
31
- 'sidebar-background': '240 6% 6%',
32
- 'sidebar-accent': '240 5% 14%',
33
- 'sidebar-border': '240 5% 20%',
31
+ 'sidebar-background': 'hsl(240 6% 6%)',
32
+ 'sidebar-accent': 'hsl(240 5% 14%)',
33
+ 'sidebar-border': 'hsl(240 5% 20%)',
34
34
  },
35
35
  };
@@ -21,87 +21,87 @@ const fluentTypography = {
21
21
  export const windowsPreset: ThemePreset = {
22
22
  light: {
23
23
  // #F3F3F3 — LayerFillColorDefault
24
- background: '0 0% 95%',
25
- foreground: '0 0% 9%',
24
+ background: 'hsl(0 0% 95%)',
25
+ foreground: 'hsl(0 0% 9%)',
26
26
  // CardBackgroundFillColorDefault
27
- card: '0 0% 100%',
28
- 'card-foreground': '0 0% 9%',
29
- popover: '0 0% 100%',
30
- 'popover-foreground': '0 0% 9%',
27
+ card: 'hsl(0 0% 100%)',
28
+ 'card-foreground': 'hsl(0 0% 9%)',
29
+ popover: 'hsl(0 0% 100%)',
30
+ 'popover-foreground': 'hsl(0 0% 9%)',
31
31
  // #0067C0 — AccentDark1 (WCAG AA on white)
32
- primary: '210 100% 38%',
33
- 'primary-foreground': '0 0% 100%',
32
+ primary: 'hsl(210 100% 38%)',
33
+ 'primary-foreground': 'hsl(0 0% 100%)',
34
34
  // SubtleFillColorSecondaryBackground #F0F0F0
35
- secondary: '0 0% 94%',
36
- 'secondary-foreground': '0 0% 9%',
35
+ secondary: 'hsl(0 0% 94%)',
36
+ 'secondary-foreground': 'hsl(0 0% 9%)',
37
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%',
38
+ muted: 'hsl(0 0% 92%)',
39
+ 'muted-foreground': 'hsl(0 0% 42%)',
40
+ accent: 'hsl(210 60% 94%)',
41
+ 'accent-foreground': 'hsl(210 100% 28%)',
42
+ destructive: 'hsl(0 90% 55%)',
43
+ 'destructive-foreground': 'hsl(0 0% 100%)',
44
44
  // ControlStrokeColorDefault: rgba(0,0,0,0.0578)
45
- border: '0 0% 87%',
46
- input: '0 0% 90%',
47
- ring: '210 100% 45%',
45
+ border: 'hsl(0 0% 87%)',
46
+ input: 'hsl(0 0% 90%)',
47
+ ring: 'hsl(210 100% 45%)',
48
48
  // WinUI 3: 4px controls, 8px cards/dialogs
49
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%',
50
+ 'sidebar-background': 'hsl(0 0% 92%)',
51
+ 'sidebar-foreground': 'hsl(0 0% 9%)',
52
+ 'sidebar-primary': 'hsl(210 100% 38%)',
53
+ 'sidebar-primary-foreground': 'hsl(0 0% 100%)',
54
+ 'sidebar-accent': 'hsl(210 50% 93%)',
55
+ 'sidebar-accent-foreground': 'hsl(210 100% 28%)',
56
+ 'sidebar-border': 'hsl(0 0% 86%)',
57
+ 'sidebar-ring': 'hsl(210 100% 45%)',
58
+ 'chart-1': 'hsl(210 100% 38%)',
59
+ 'chart-2': 'hsl(145 63% 38%)',
60
+ 'chart-3': 'hsl(262 83% 55%)',
61
+ 'chart-4': 'hsl(35 100% 48%)',
62
+ 'chart-5': 'hsl(346 77% 50%)',
63
63
  ...fluentTypography,
64
64
  },
65
65
  dark: {
66
66
  // #202020 — SolidBackgroundFillColorBase dark
67
- background: '0 0% 13%',
68
- foreground: '0 0% 96%',
67
+ background: 'hsl(0 0% 13%)',
68
+ foreground: 'hsl(0 0% 96%)',
69
69
  // #2B2B2B — CardBackgroundFillColorDefault dark
70
- card: '0 0% 17%',
71
- 'card-foreground': '0 0% 96%',
70
+ card: 'hsl(0 0% 17%)',
71
+ 'card-foreground': 'hsl(0 0% 96%)',
72
72
  // #323232 — elevated surface
73
- popover: '0 0% 20%',
74
- 'popover-foreground': '0 0% 96%',
73
+ popover: 'hsl(0 0% 20%)',
74
+ 'popover-foreground': 'hsl(0 0% 96%)',
75
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%',
76
+ primary: 'hsl(200 100% 69%)',
77
+ 'primary-foreground': 'hsl(0 0% 9%)',
78
+ secondary: 'hsl(0 0% 22%)',
79
+ 'secondary-foreground': 'hsl(0 0% 90%)',
80
+ muted: 'hsl(0 0% 18%)',
81
+ 'muted-foreground': 'hsl(0 0% 62%)',
82
+ accent: 'hsl(210 25% 20%)',
83
+ 'accent-foreground': 'hsl(200 100% 75%)',
84
+ destructive: 'hsl(0 90% 62%)',
85
+ 'destructive-foreground': 'hsl(0 0% 100%)',
86
86
  // ControlStrokeColorDefault dark: rgba(255,255,255,0.0837)
87
- border: '0 0% 28%',
88
- input: '0 0% 24%',
89
- ring: '200 100% 69%',
87
+ border: 'hsl(0 0% 28%)',
88
+ input: 'hsl(0 0% 24%)',
89
+ ring: 'hsl(200 100% 69%)',
90
90
  radius: '0.375rem',
91
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%',
92
+ 'sidebar-background': 'hsl(0 0% 10%)',
93
+ 'sidebar-foreground': 'hsl(0 0% 90%)',
94
+ 'sidebar-primary': 'hsl(200 100% 69%)',
95
+ 'sidebar-primary-foreground': 'hsl(0 0% 9%)',
96
+ 'sidebar-accent': 'hsl(210 20% 18%)',
97
+ 'sidebar-accent-foreground': 'hsl(200 100% 75%)',
98
+ 'sidebar-border': 'hsl(0 0% 22%)',
99
+ 'sidebar-ring': 'hsl(200 100% 69%)',
100
+ 'chart-1': 'hsl(200 100% 69%)',
101
+ 'chart-2': 'hsl(145 65% 50%)',
102
+ 'chart-3': 'hsl(262 83% 65%)',
103
+ 'chart-4': 'hsl(35 100% 58%)',
104
+ 'chart-5': 'hsl(346 77% 58%)',
105
105
  ...fluentTypography,
106
106
  },
107
107
  };
@@ -3,7 +3,16 @@
3
3
  * non-Next.js consumer can use presets without pulling in @djangocfg/layouts.
4
4
  */
5
5
 
6
- /** Core semantic colors (HSL triplets, no hsl() wrapper) */
6
+ /**
7
+ * Core semantic colors — **fully-wrapped CSS colors** (`hsl(...)`, `oklch(...)`, `#rrggbb`, …).
8
+ *
9
+ * Required by the `@theme inline { --color-X: var(--X); }` shape so Tailwind's
10
+ * opacity modifier (`bg-card/40`) can resolve through `color-mix`. Bare HSL
11
+ * triplets (`240 17% 97%`) silently break every opacity modifier — they used
12
+ * to work via a manual `hsl(var(--X))` wrapper in tokens.css; that wrapper is
13
+ * gone after the v4 refactor. Same rule for `border` / `ring` / `chart-*` /
14
+ * `sidebar-*` (every color-typed key). `radius` + typography keys stay raw.
15
+ */
7
16
  export type ThemeCssVarColorKey =
8
17
  | 'background'
9
18
  | 'foreground'
@@ -63,7 +72,21 @@ export type ThemeCssVarKey =
63
72
  /** Partial map of semantic variables for one color mode */
64
73
  export type ThemeCssVarMap = Partial<Record<ThemeCssVarKey, string>>;
65
74
 
66
- /** Built-in preset IDs */
75
+ /**
76
+ * Built-in preset IDs.
77
+ *
78
+ * Two families:
79
+ * - Brand / OS-native: default, django-cfg, ios, macos, windows
80
+ * (pixel-accurate Apple HIG / Microsoft Fluent tokens — useful for
81
+ * Wails/Electron desktop and mobile web).
82
+ * - Density / accessibility: soft (radius 1rem), dense (0.25rem),
83
+ * high-contrast (a11y).
84
+ *
85
+ * The earlier code-editor vibe palette (catppuccin / dracula / github /
86
+ * gruvbox / material / nord / one-dark / solarized / tokyo-night) was
87
+ * removed in May 2026 — those are for IDE skins, not admin/desktop UI.
88
+ * Re-add a preset only when a real product needs it.
89
+ */
67
90
  export type ThemeStylePresetId =
68
91
  | 'default'
69
92
  | 'django-cfg'
@@ -72,16 +95,7 @@ export type ThemeStylePresetId =
72
95
  | 'windows'
73
96
  | 'soft'
74
97
  | 'dense'
75
- | 'high-contrast'
76
- | 'catppuccin'
77
- | 'dracula'
78
- | 'github'
79
- | 'gruvbox'
80
- | 'material'
81
- | 'nord'
82
- | 'one-dark'
83
- | 'solarized'
84
- | 'tokyo-night';
98
+ | 'high-contrast';
85
99
 
86
100
  /**
87
101
  * Optional style layer: named preset + per-mode overrides.