@djangocfg/ui-core 2.1.169 → 2.1.170

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.169",
3
+ "version": "2.1.170",
4
4
  "description": "Pure React UI component library without Next.js dependencies - for Electron, Vite, CRA apps",
5
5
  "keywords": [
6
6
  "ui-components",
@@ -81,7 +81,7 @@
81
81
  "playground": "playground dev"
82
82
  },
83
83
  "peerDependencies": {
84
- "@djangocfg/i18n": "^2.1.169",
84
+ "@djangocfg/i18n": "^2.1.170",
85
85
  "react-device-detect": "^2.2.3",
86
86
  "consola": "^3.4.2",
87
87
  "lucide-react": "^0.545.0",
@@ -143,9 +143,9 @@
143
143
  "vaul": "1.1.2"
144
144
  },
145
145
  "devDependencies": {
146
- "@djangocfg/i18n": "^2.1.169",
146
+ "@djangocfg/i18n": "^2.1.170",
147
147
  "@djangocfg/playground": "workspace:*",
148
- "@djangocfg/typescript-config": "^2.1.169",
148
+ "@djangocfg/typescript-config": "^2.1.170",
149
149
  "@types/node": "^24.7.2",
150
150
  "@types/react": "^19.1.0",
151
151
  "@types/react-dom": "^19.1.0",
@@ -29,7 +29,12 @@ export const useResolvedTheme = (): ResolvedTheme => {
29
29
  return 'dark';
30
30
  }
31
31
 
32
- // Check system preference
32
+ // Check if light class is explicitly applied (takes precedence over system)
33
+ if (document.documentElement.classList.contains('light')) {
34
+ return 'light';
35
+ }
36
+
37
+ // Check system preference only if no explicit theme class
33
38
  if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
34
39
  return 'dark';
35
40
  }