@djangocfg/ui-core 2.1.373 → 2.1.375

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.373",
3
+ "version": "2.1.375",
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.373",
99
+ "@djangocfg/i18n": "^2.1.375",
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.373",
169
+ "@djangocfg/i18n": "^2.1.375",
170
170
  "@djangocfg/playground": "workspace:*",
171
- "@djangocfg/typescript-config": "^2.1.373",
171
+ "@djangocfg/typescript-config": "^2.1.375",
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,125 @@
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 — main page canvas
42
32
  background: '240 17% 97%',
43
- foreground: '220 9% 10%',
33
+ foreground: '0 0% 7%',
34
+ // Cards: pure white elevated surface — standard Apple insetGrouped cell
44
35
  card: '0 0% 100%',
45
- 'card-foreground': '220 9% 10%',
36
+ 'card-foreground': '0 0% 7%',
37
+ // Popovers / context menus: white with system drop shadow
46
38
  popover: '0 0% 100%',
47
- 'popover-foreground': '220 9% 10%',
48
- // #007AFF — systemBlue
39
+ 'popover-foreground': '0 0% 7%',
40
+ // systemBlue #007AFF
49
41
  primary: '211 100% 50%',
50
42
  '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%',
43
+ // secondarySystemGroupedBackground #EFEFF4 — section headers, nested surfaces
44
+ secondary: '240 12% 95%',
45
+ 'secondary-foreground': '0 0% 7%',
46
+ // tertiarySystemGroupedBackground #E5E5EA — chips, tag pills, disabled fills
47
+ muted: '240 8% 91%',
48
+ 'muted-foreground': '240 3% 44%',
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%',
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
+ // Apple opaque separator: rgba(60,60,67,0.29) on white ≈ #C6C6C8 → HSL 240 3% 78%
56
+ // Kept intentionally light — Apple hairline, not a thick rule
57
+ border: '240 3% 78%',
58
+ input: '240 8% 93%',
64
59
  ring: '211 100% 50%',
65
60
  radius: '0.625rem',
66
- 'sidebar-background': '240 17% 94%',
67
- 'sidebar-foreground': '220 9% 10%',
61
+ // Sidebar: slighly darker than page, matches macOS sidebar material
62
+ 'sidebar-background': '240 12% 94%',
63
+ 'sidebar-foreground': '0 0% 7%',
68
64
  'sidebar-primary': '211 100% 50%',
69
65
  '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%',
66
+ 'sidebar-accent': '211 50% 93%',
67
+ 'sidebar-accent-foreground': '211 100% 36%',
68
+ 'sidebar-border': '240 3% 82%',
73
69
  'sidebar-ring': '211 100% 50%',
70
+ // Chart: systemBlue + Apple tint palette
74
71
  '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%',
72
+ 'chart-2': '142 52% 40%',
73
+ 'chart-3': '262 60% 56%',
74
+ 'chart-4': '35 100% 48%',
75
+ 'chart-5': '2 100% 59%',
79
76
  ...appleTypography,
80
77
  },
81
78
  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
79
+ // Deeper than stock #1C1C1E — matches Sequoia dark finder/mail chrome (#141414)
80
+ background: '240 5% 8%',
81
+ foreground: '0 0% 95%',
82
+ // secondarySystemBackground #1E1E20cards slightly elevated
83
+ card: '240 3% 12%',
84
+ 'card-foreground': '0 0% 95%',
85
+ // #2C2C2Epopovers, menus, dropdowns
86
+ popover: '240 3% 17%',
87
+ 'popover-foreground': '0 0% 95%',
88
+ // systemBlue dark #0A84FF
92
89
  primary: '211 100% 58%',
93
90
  '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%',
91
+ // Elevated neutral surface — slightly lighter than card
92
+ secondary: '240 3% 20%',
93
+ 'secondary-foreground': '0 0% 88%',
94
+ // tertiarySystemBackground #3A3A3C — chips, tags, muted fills
95
+ muted: '240 3% 23%',
96
+ 'muted-foreground': '240 4% 58%',
97
+ // Blue-tinted hover (Apple active state in dark)
98
+ accent: '211 25% 19%',
99
+ 'accent-foreground': '211 100% 72%',
100
+ // systemRed dark #FF453A
101
+ destructive: '3 100% 62%',
102
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%',
103
+ // Separator dark: rgba(84,84,88,0.36) — ultra-thin, almost invisible
104
+ border: '240 3% 22%',
105
+ input: '240 3% 19%',
106
106
  ring: '211 100% 58%',
107
107
  radius: '0.625rem',
108
- 'sidebar-background': '240 5% 8%',
108
+ // Sidebar: near-black floor — #0D0D0F
109
+ 'sidebar-background': '240 5% 5%',
109
110
  'sidebar-foreground': '0 0% 90%',
110
111
  'sidebar-primary': '211 100% 58%',
111
112
  '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%',
113
+ 'sidebar-accent': '211 22% 16%',
114
+ 'sidebar-accent-foreground': '211 100% 72%',
115
+ 'sidebar-border': '240 3% 15%',
115
116
  'sidebar-ring': '211 100% 58%',
117
+ // Chart: brighter variants for contrast on dark
116
118
  '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%',
119
+ 'chart-2': '142 52% 50%',
120
+ 'chart-3': '262 60% 65%',
121
+ 'chart-4': '35 100% 56%',
122
+ 'chart-5': '3 100% 62%',
121
123
  ...appleTypography,
122
124
  },
123
125
  };