Ziya/ui/shared/design-system/tokens/theme.slint
2025-06-27 07:27:24 +07:00

29 lines
No EOL
1.4 KiB
Text

// Global theme management system
export global Theme {
in-out property <bool> is-dark-mode: false;
// Color scheme properties that automatically update based on theme
out property <color> background: is-dark-mode ? #1a1a1a : #ffffff;
out property <color> surface: is-dark-mode ? #2a2a2a : #f5f5f5;
out property <color> primary: #3b82f6;
out property <color> primary-variant: is-dark-mode ? #60a5fa : #2563eb;
out property <color> secondary: is-dark-mode ? #64748b : #475569;
out property <color> text-primary: is-dark-mode ? #ffffff : #1f2937;
out property <color> text-secondary: is-dark-mode ? #d1d5db : #6b7280;
out property <color> border: is-dark-mode ? #374151 : #e5e7eb;
out property <color> accent: is-dark-mode ? #22c55e : #16a34a;
out property <color> error: #ef4444;
out property <color> warning: #f59e0b;
out property <color> success: #10b981;
// Card and container colors
out property <color> card-background: is-dark-mode ? #2a2a2a : #ffffff;
out property <color> card-border: is-dark-mode ? #404040 : #e5e7eb;
// Navigation colors
out property <color> nav-background: is-dark-mode ? #1f1f1f : #f8fafc;
out property <color> nav-active: primary;
out property <color> nav-hover: is-dark-mode ? #374151 : #f1f5f9;
// Theme state is directly modified by components and Rust code
}