euv-ui 0.46.1

Cross-platform UI component library and 17-scheme design system for the euv framework with pixel-consistent rendering across Web, Android, iOS, iPadOS, macOS, Windows, and Linux.
Documentation
use super::*;

/// Universal 4px base spacing step (`xs`).
pub const SPACE_XS: f32 = 4.0;

/// Small spacing step (`sm`).
pub const SPACE_SM: f32 = 8.0;

/// Medium spacing step (`md`).
pub const SPACE_MD: f32 = 12.0;

/// Large spacing step (`lg`).
pub const SPACE_LG: f32 = 16.0;

/// Extra-large spacing step (`xl`).
pub const SPACE_XL: f32 = 20.0;

/// Double extra-large spacing step (`2xl`).
pub const SPACE_2XL: f32 = 24.0;

/// Desktop navigation sidebar width in logical pixels.
pub const NAV_SIDEBAR_WIDTH: f32 = 240.0;

/// Maximum readable content container width in logical pixels.
pub const CONTENT_MAX_WIDTH: f32 = 960.0;

/// Mobile top header bar height in logical pixels.
pub const MOBILE_HEADER_HEIGHT: f32 = 52.0;

/// Z-index layer for normal content.
pub const Z_INDEX_CONTENT: i32 = 1;

/// Z-index layer for sticky app chrome (header / sidebar).
pub const Z_INDEX_CHROME: i32 = 100;

/// Z-index layer for tooltips.
pub const Z_INDEX_TOOLTIP: i32 = 140;

/// Z-index layer for floating popovers and dropdown menus.
pub const Z_INDEX_FLOATING: i32 = 150;

/// Z-index layer for dimmed backdrop overlays.
pub const Z_INDEX_OVERLAY: i32 = 200;

/// Z-index layer for slide-over drawers and sheets.
pub const Z_INDEX_DRAWER: i32 = 201;

/// Z-index layer for modal dialogs.
pub const Z_INDEX_MODAL: i32 = 1000;

/// Z-index layer for toast notifications.
pub const Z_INDEX_TOAST: i32 = 1100;

/// Z-index layer for true edge-to-edge fullscreen portals above shell chrome, modals, and toasts.
pub const Z_INDEX_FULLSCREEN: i32 = 1200;

/// Compile-time lookup table of all 17 schemes x 2 modes (`(scheme_idx << 1) | dark_idx`) semantic palettes.
pub(crate) const THEME_PALETTE_LUT: [ThemePalette; 34] = ThemeTokens::build_palette_lut();

/// Compile-time lookup table of precomputed `[radius_sm, radius_md, radius_lg, radius_xl, control_sm, control_md, control_lg]` per design scheme.
pub(crate) const THEME_GEOMETRY_METRICS_LUT: [[f32; 7]; 17] =
    ThemeTokens::build_geometry_metrics_lut();