euv-ui 0.40.0

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::*;

/// Adaptive cross-platform application shell (Desktop sidebar + top context bar, iPadOS rail, Mobile header + drawer).
#[derive(Clone, Data, Debug, New)]
pub struct EuvAppShell {
    /// Application brand title shown in sidebar or mobile top bar.
    pub(crate) brand: String,
    /// Mounted sidebar navigation content node.
    #[get(type(copy))]
    pub(crate) sidebar: NodeId,
    /// Mounted main page content node.
    #[get(type(copy))]
    pub(crate) main_content: NodeId,
    /// Active theme tokens.
    #[get(type(copy))]
    pub(crate) tokens: ThemeTokens,
    /// Optional active route signal used to auto-close the mobile drawer on navigation.
    #[new(skip)]
    #[get(skip)]
    pub(crate) route_signal: Option<Signal<String>>,
    /// Optional action controls rendered on the right side of the persistent top header bar.
    #[new(skip)]
    #[get(skip)]
    pub(crate) top_bar_actions: Option<NodeId>,
    /// Optional compact inline actions rendered beside the mobile header Menu button.
    #[new(skip)]
    #[get(skip)]
    pub(crate) mobile_header_actions: Option<NodeId>,
    /// Optional footer widget rendered at the bottom of the navigation sidebar / mobile drawer.
    #[new(skip)]
    #[get(skip)]
    pub(crate) sidebar_footer: Option<NodeId>,
    /// Optional live breadcrumb / page context label rendered in the desktop top header bar.
    #[new(skip)]
    #[get(skip)]
    pub(crate) breadcrumb: Option<Signal<String>>,
}

/// Hairline horizontal or vertical structural divider.
#[derive(Clone, Copy, Data, Debug, New)]
pub struct EuvDivider {
    /// True for vertical divider; false for horizontal.
    #[get(type(copy))]
    pub(crate) vertical: bool,
    /// Active theme tokens.
    #[get(type(copy))]
    pub(crate) tokens: ThemeTokens,
}

/// Zero-boilerplate standardized page wrapper combining `EuvHeader` and uniform vertical section spacing.
#[derive(Clone, Data, Debug, New)]
pub struct EuvPage {
    /// Page title text.
    pub(crate) title: String,
    /// Page subtitle description.
    pub(crate) subtitle: String,
    /// Active theme tokens.
    #[get(type(copy))]
    pub(crate) tokens: ThemeTokens,
    /// Ordered section children rendered beneath the page header.
    #[new(skip)]
    pub(crate) sections: Vec<NodeId>,
}

/// Standardized wrapping horizontal action bar aligning buttons and controls on one center baseline.
#[derive(Clone, Data, Debug, Default, New)]
pub struct EuvActionRow {
    /// Pre-mounted child controls inside the action row.
    #[new(skip)]
    pub(crate) children: Vec<NodeId>,
}

/// Responsive 1/2/3-column KPI stat grid synchronized with the active viewport breakpoint.
#[derive(Clone, Data, Debug, Default, New)]
pub struct EuvStatGrid {
    /// Pre-mounted stat card children.
    #[new(skip)]
    pub(crate) cards: Vec<NodeId>,
}