@djangocfg/ui-core 2.1.372 → 2.1.374

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djangocfg/ui-core",
3
- "version": "2.1.372",
3
+ "version": "2.1.374",
4
4
  "description": "Pure React UI component library without Next.js dependencies - for Electron, Vite, CRA apps",
5
5
  "keywords": [
6
6
  "ui-components",
@@ -96,7 +96,7 @@
96
96
  "playground": "playground dev"
97
97
  },
98
98
  "peerDependencies": {
99
- "@djangocfg/i18n": "^2.1.372",
99
+ "@djangocfg/i18n": "^2.1.374",
100
100
  "consola": "^3.4.2",
101
101
  "lucide-react": "^0.545.0",
102
102
  "moment": "^2.30.1",
@@ -166,9 +166,9 @@
166
166
  "vaul": "1.1.2"
167
167
  },
168
168
  "devDependencies": {
169
- "@djangocfg/i18n": "^2.1.372",
169
+ "@djangocfg/i18n": "^2.1.374",
170
170
  "@djangocfg/playground": "workspace:*",
171
- "@djangocfg/typescript-config": "^2.1.372",
171
+ "@djangocfg/typescript-config": "^2.1.374",
172
172
  "@types/node": "^24.7.2",
173
173
  "@types/react": "^19.1.0",
174
174
  "@types/react-dom": "^19.1.0",
@@ -1,123 +1,124 @@
1
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
2
+ * macOS Sequoia/Sonoma: pixel-accurate Apple system colors.
3
+ *
4
+ * Light surfaces: systemGroupedBackground #F2F2F7, cards on pure white.
5
+ * Dark surfaces: #141414 (deeper than stock #1C1C1E — matches Sequoia finder/mail dark chrome),
6
+ * card #1E1E20, popover #2C2C2E, sidebar #0D0D0F (near-black vibrancy floor).
7
+ * Borders: Apple uses a hairline separator — rgba(60,60,67,0.29) light / rgba(84,84,88,0.36) dark.
8
+ * At HSL that's ~82% L light / ~22% L dark. Kept razor-thin intentionally.
9
+ * Primary: #007AFF light / #0A84FF dark — exact Apple systemBlue.
10
+ * Radius: 10px (HIG standard component), 12px popovers, 20px dialogs.
11
+ * Source: Apple HIG Color — developer.apple.com/design/human-interface-guidelines/color
5
12
  */
6
13
  import type { ThemePreset } from './types';
7
14
 
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
- */
15
+ // SF Pro Text/Display + SF Mono — available natively in WebKit/Wails embedded views.
16
+ // Size scale: Apple HIG points (1pt 1px at 1×).
27
17
  const appleTypography = {
28
18
  'font-sans': '"SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif',
29
19
  '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',
20
+ 'font-size-base': '0.8125rem', // 13pt — HIG default body
21
+ 'font-size-sm': '0.75rem', // 12pt — footnotes, secondary labels
22
+ 'font-size-xs': '0.6875rem', // 11pt — captions, timestamps
23
+ 'font-size-lg': '0.9375rem', // 15pt — subheadings
24
+ 'font-size-xl': '1.0625rem', // 17pt — titles, nav bar
25
+ 'line-height-base': '1.47', // HIG recommended for body text
26
+ 'letter-spacing-base': '-0.022em', // SF Pro optical tracking at small sizes
37
27
  } as const;
38
28
 
39
29
  export const macosPreset: ThemePreset = {
40
30
  light: {
41
- // #F2F2F7 — systemGroupedBackground
31
+ // systemGroupedBackground #F2F2F7
42
32
  background: '240 17% 97%',
43
- foreground: '220 9% 10%',
33
+ foreground: '0 0% 8%',
34
+ // Cards sit on pure white — standard Apple elevated surface
44
35
  card: '0 0% 100%',
45
- 'card-foreground': '220 9% 10%',
36
+ 'card-foreground': '0 0% 8%',
37
+ // Popovers / menus: white with system shadow
46
38
  popover: '0 0% 100%',
47
- 'popover-foreground': '220 9% 10%',
48
- // #007AFF — systemBlue
39
+ 'popover-foreground': '0 0% 8%',
40
+ // systemBlue #007AFF
49
41
  primary: '211 100% 50%',
50
42
  'primary-foreground': '0 0% 100%',
51
43
  // secondarySystemGroupedBackground #EFEFF4
52
- secondary: '240 17% 95%',
53
- 'secondary-foreground': '220 9% 10%',
54
- // tertiarySystemGroupedBackground #E5E5EA
44
+ secondary: '240 14% 96%',
45
+ 'secondary-foreground': '0 0% 8%',
46
+ // tertiarySystemGroupedBackground #E5E5EA — muted fills, tag backgrounds
55
47
  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%',
48
+ 'muted-foreground': '220 4% 46%',
49
+ // Light blue-tinted hover surface (not grey)
50
+ accent: '211 55% 96%',
51
+ 'accent-foreground': '211 100% 38%',
52
+ // systemRed #FF3B30
53
+ destructive: '2 100% 59%',
60
54
  '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%',
55
+ // Separator: rgba(60,60,67,0.29) hairline only, not a thick line
56
+ border: '240 5% 84%',
57
+ input: '240 6% 92%',
64
58
  ring: '211 100% 50%',
65
59
  radius: '0.625rem',
66
- 'sidebar-background': '240 17% 94%',
67
- 'sidebar-foreground': '220 9% 10%',
60
+ // Sidebar: secondarySystemGroupedBackground tinted slightly cooler
61
+ 'sidebar-background': '240 14% 95%',
62
+ 'sidebar-foreground': '0 0% 8%',
68
63
  'sidebar-primary': '211 100% 50%',
69
64
  '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%',
65
+ 'sidebar-accent': '211 55% 94%',
66
+ 'sidebar-accent-foreground': '211 100% 38%',
67
+ 'sidebar-border': '240 5% 88%',
73
68
  'sidebar-ring': '211 100% 50%',
69
+ // Chart: systemBlue + Apple system colors
74
70
  '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%',
71
+ 'chart-2': '142 52% 40%',
72
+ 'chart-3': '262 60% 56%',
73
+ 'chart-4': '35 100% 48%',
74
+ 'chart-5': '2 100% 59%',
79
75
  ...appleTypography,
80
76
  },
81
77
  dark: {
82
- // #1C1C1E — systemBackground dark
83
- background: '240 5% 11%',
84
- foreground: '0 0% 96%',
85
- // #2C2C2EsecondarySystemBackground dark
86
- card: '240 4% 18%',
87
- 'card-foreground': '0 0% 96%',
88
- // #3A3A3Cpopover elevated surface
89
- popover: '240 4% 23%',
90
- 'popover-foreground': '0 0% 96%',
91
- // #0A84FF — systemBlue dark
78
+ // Deeper than stock #1C1C1E — matches Sequoia dark finder/mail chrome (#141414)
79
+ background: '240 5% 8%',
80
+ foreground: '0 0% 95%',
81
+ // secondarySystemBackground #1E1E20cards slightly elevated
82
+ card: '240 3% 12%',
83
+ 'card-foreground': '0 0% 95%',
84
+ // #2C2C2Epopovers, menus, dropdowns
85
+ popover: '240 3% 17%',
86
+ 'popover-foreground': '0 0% 95%',
87
+ // systemBlue dark #0A84FF
92
88
  primary: '211 100% 58%',
93
89
  '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%',
90
+ // Elevated neutral surface — slightly lighter than card
91
+ secondary: '240 3% 20%',
92
+ 'secondary-foreground': '0 0% 88%',
93
+ // tertiarySystemBackground #3A3A3C — chips, tags, muted fills
94
+ muted: '240 3% 23%',
95
+ 'muted-foreground': '240 4% 58%',
96
+ // Blue-tinted hover (Apple active state in dark)
97
+ accent: '211 25% 19%',
98
+ 'accent-foreground': '211 100% 72%',
99
+ // systemRed dark #FF453A
100
+ destructive: '3 100% 62%',
102
101
  'destructive-foreground': '0 0% 100%',
103
- // Separator dark: rgba(84,84,88,0.65)
104
- border: '240 4% 30%',
105
- input: '240 4% 26%',
102
+ // Separator dark: rgba(84,84,88,0.36) — ultra-thin, almost invisible
103
+ border: '240 3% 22%',
104
+ input: '240 3% 19%',
106
105
  ring: '211 100% 58%',
107
106
  radius: '0.625rem',
108
- 'sidebar-background': '240 5% 8%',
107
+ // Sidebar: near-black floor — #0D0D0F
108
+ 'sidebar-background': '240 5% 5%',
109
109
  'sidebar-foreground': '0 0% 90%',
110
110
  'sidebar-primary': '211 100% 58%',
111
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%',
112
+ 'sidebar-accent': '211 22% 16%',
113
+ 'sidebar-accent-foreground': '211 100% 72%',
114
+ 'sidebar-border': '240 3% 15%',
115
115
  'sidebar-ring': '211 100% 58%',
116
+ // Chart: brighter variants for contrast on dark
116
117
  '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%',
118
+ 'chart-2': '142 52% 50%',
119
+ 'chart-3': '262 60% 65%',
120
+ 'chart-4': '35 100% 56%',
121
+ 'chart-5': '3 100% 62%',
121
122
  ...appleTypography,
122
123
  },
123
124
  };