Spaces:
Running
Running
Download config/theme.py from Churchgate/facilityxperience: direct link, hf CLI and curl.
- Browser
- Download file 5.52 kB
-
https://huggingface.co/spaces/Churchgate/facilityxperience/resolve/main/config/theme.py
- Command line
-
hf download hf://spaces/Churchgate/facilityxperience/config/theme.py
-
curl -L -o theme.py https://huggingface.co/spaces/Churchgate/facilityxperience/resolve/main/config/theme.py
5.52 kB
| """ | |
| facilityXperience Enterprise Design System | |
| Fortune 500 Caliber Theming Engine | |
| """ | |
| from dataclasses import dataclass, field | |
| from typing import Dict, Optional | |
| from functools import lru_cache | |
| class ColorPalette: | |
| """Enterprise color palette""" | |
| # Core | |
| sapphire: str = "#0A1628" | |
| electric: str = "#2563EB" | |
| electric_light: str = "#DBEAFE" | |
| gold: str = "#D4A853" | |
| gold_light: str = "#F0D78C" | |
| # Neutrals | |
| obsidian: str = "#0F172A" | |
| slate: str = "#1E293B" | |
| graphite: str = "#334155" | |
| steel: str = "#475569" | |
| silver: str = "#94A3B8" | |
| mist: str = "#CBD5E1" | |
| pearl: str = "#F1F5F9" | |
| alabaster: str = "#F8FAFC" | |
| white: str = "#FFFFFF" | |
| # Semantic | |
| success: str = "#10B981" | |
| success_light: str = "#ECFDF5" | |
| warning: str = "#F59E0B" | |
| warning_light: str = "#FFFBEB" | |
| critical: str = "#EF4444" | |
| critical_light: str = "#FEF2F2" | |
| info: str = "#3B82F6" | |
| info_light: str = "#EFF6FF" | |
| # Facility Colors | |
| facilities: Dict[str, str] = field(default_factory=lambda: { | |
| "WTC": "#2563EB", | |
| "AGVL": "#059669", | |
| "FCPL": "#D97706", | |
| "RBPL": "#BE185D", | |
| "VDL": "#7C3AED", | |
| "WAREHOUSES": "#475569", | |
| }) | |
| # Gradients | |
| gradients: Dict[str, str] = field(default_factory=lambda: { | |
| "primary": "linear-gradient(135deg, #2563EB, #1D4ED8)", | |
| "gold": "linear-gradient(135deg, #D4A853, #C49A3C)", | |
| "dark": "linear-gradient(105deg, #0A1628 0%, #0F1F3D 30%, #0A1628 60%, #0F1F3D 100%)", | |
| "ai": "linear-gradient(135deg, #7C3AED, #A78BFA)", | |
| "success": "linear-gradient(135deg, #10B981, #059669)", | |
| }) | |
| class Typography: | |
| """Enterprise typography system""" | |
| font_family: str = "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" | |
| font_mono: str = "'JetBrains Mono', 'Consolas', monospace" | |
| # Scale | |
| text_xs: str = "0.65rem" | |
| text_sm: str = "0.75rem" | |
| text_base: str = "0.85rem" | |
| text_md: str = "0.9rem" | |
| text_lg: str = "1.1rem" | |
| text_xl: str = "1.5rem" | |
| text_2xl: str = "1.8rem" | |
| text_3xl: str = "2.2rem" | |
| text_4xl: str = "3rem" | |
| # Weights | |
| weight_light: int = 300 | |
| weight_regular: int = 400 | |
| weight_medium: int = 500 | |
| weight_semibold: int = 600 | |
| weight_bold: int = 700 | |
| weight_extrabold: int = 800 | |
| weight_black: int = 900 | |
| class Spacing: | |
| """Enterprise spacing system""" | |
| xs: str = "0.25rem" | |
| sm: str = "0.5rem" | |
| md: str = "0.75rem" | |
| base: str = "1rem" | |
| lg: str = "1.25rem" | |
| xl: str = "1.5rem" | |
| xxl: str = "2rem" | |
| xxxl: str = "3rem" | |
| class Shadows: | |
| """Enterprise shadow system""" | |
| sm: str = "0 1px 2px rgba(10, 22, 40, 0.06)" | |
| md: str = "0 4px 6px rgba(10, 22, 40, 0.07), 0 2px 4px rgba(10, 22, 40, 0.06)" | |
| lg: str = "0 10px 15px rgba(10, 22, 40, 0.08), 0 4px 6px rgba(10, 22, 40, 0.05)" | |
| xl: str = "0 20px 25px rgba(10, 22, 40, 0.1), 0 10px 10px rgba(10, 22, 40, 0.04)" | |
| xxl: str = "0 25px 50px rgba(10, 22, 40, 0.12)" | |
| glow_blue: str = "0 0 20px rgba(37, 99, 235, 0.3)" | |
| glow_gold: str = "0 0 20px rgba(212, 168, 83, 0.3)" | |
| class Radii: | |
| """Enterprise border radius system""" | |
| sm: str = "6px" | |
| md: str = "10px" | |
| lg: str = "16px" | |
| xl: str = "24px" | |
| xxl: str = "32px" | |
| full: str = "9999px" | |
| class EnterpriseTheme: | |
| """Complete enterprise theme""" | |
| colors: ColorPalette = field(default_factory=ColorPalette) | |
| typography: Typography = field(default_factory=Typography) | |
| spacing: Spacing = field(default_factory=Spacing) | |
| shadows: Shadows = field(default_factory=Shadows) | |
| radii: Radii = field(default_factory=Radii) | |
| def css_variables(self) -> Dict[str, str]: | |
| """Generate CSS custom properties""" | |
| return { | |
| "--fx-sapphire": self.colors.sapphire, | |
| "--fx-electric": self.colors.electric, | |
| "--fx-electric-light": self.colors.electric_light, | |
| "--fx-gold": self.colors.gold, | |
| "--fx-gold-light": self.colors.gold_light, | |
| "--fx-obsidian": self.colors.obsidian, | |
| "--fx-slate": self.colors.slate, | |
| "--fx-graphite": self.colors.graphite, | |
| "--fx-steel": self.colors.steel, | |
| "--fx-silver": self.colors.silver, | |
| "--fx-mist": self.colors.mist, | |
| "--fx-pearl": self.colors.pearl, | |
| "--fx-alabaster": self.colors.alabaster, | |
| "--fx-white": self.colors.white, | |
| "--fx-success": self.colors.success, | |
| "--fx-warning": self.colors.warning, | |
| "--fx-critical": self.colors.critical, | |
| "--fx-info": self.colors.info, | |
| "--fx-font-family": self.typography.font_family, | |
| "--fx-font-mono": self.typography.font_mono, | |
| "--fx-shadow-sm": self.shadows.sm, | |
| "--fx-shadow-md": self.shadows.md, | |
| "--fx-shadow-lg": self.shadows.lg, | |
| "--fx-shadow-xl": self.shadows.xl, | |
| "--fx-radius-sm": self.radii.sm, | |
| "--fx-radius-md": self.radii.md, | |
| "--fx-radius-lg": self.radii.lg, | |
| "--fx-radius-xl": self.radii.xl, | |
| } | |
| def get_theme() -> EnterpriseTheme: | |
| """Get cached enterprise theme""" | |
| return EnterpriseTheme() |