euv_ui/theme/token/enum.rs
1/// Semantic surface role pairing a background with its guaranteed-readable foreground and border.
2#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
3pub enum SurfaceRole {
4 /// Application canvas (`background` / `foreground`).
5 #[default]
6 Background,
7 /// Elevated card / popover surface (`card` / `card_foreground`).
8 Card,
9 /// Brand / active / selected surface (`primary` / `primary_foreground`).
10 Primary,
11 /// Secondary button surface (`secondary` / `secondary_foreground`).
12 Secondary,
13 /// Muted track / subtle fill (`muted` / `foreground`).
14 Muted,
15 /// Neutral hover / highlight surface (`accent` / readable foreground).
16 Accent,
17 /// Destructive surface (`destructive` / `destructive_foreground`).
18 Destructive,
19 /// Success surface (`success` / `success_foreground`).
20 Success,
21 /// Warning surface (`warning` / `warning_foreground`).
22 Warning,
23}
24
25/// Canonical interactive state-machine role guaranteeing identical hover/press/active color pairing logic across all 34 themes.
26#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
27pub enum InteractionRole {
28 /// Solid brand-primary action control (`EuvButtonVariant::Primary`).
29 #[default]
30 SolidPrimary,
31 /// Solid destructive action control (`EuvButtonVariant::Destructive`).
32 SolidDestructive,
33 /// Subtle filled secondary control (`EuvButtonVariant::Secondary`).
34 SecondarySurface,
35 /// Hairline-bordered card control (`EuvButtonVariant::Outline`, `EuvDocPager`, `EuvToggle`).
36 OutlineSurface,
37 /// Transparent surface control revealing `Accent` on hover (`EuvButtonVariant::Ghost`, `EuvAccordion` header).
38 GhostSurface,
39 /// Brand-colored text link control revealing `Accent` pill on hover (`EuvButtonVariant::Link`).
40 LinkSurface,
41 /// Segmented/tab pill seated inside a `Muted` track (`EuvTabs`, `EuvSegmented`).
42 SegmentedPill,
43 /// Navigation / TOC / breadcrumb row transitioning `muted_foreground -> accent_fg` on hover (`EuvSidebarNav`, `EuvToc`, `EuvDocToc`, `EuvDocSectionNav`, `EuvBreadcrumb`).
44 NavItem,
45 /// Select / dropdown / combobox / context-menu option item (`EuvSelect`, `EuvDropdown`, `EuvCombobox`, `EuvContextMenu`).
46 OptionItem,
47}