1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
//! # egui_sauge
//!
//! A fresh, natural design system for [egui] — sage palette, warm
//! neutrals, WCAG AA contrast, and a ready-to-use component library
//! aimed at IT applications.
//!
//! ## Quickstart
//!
//! ```no_run
//! use eframe::egui;
//! use egui_sauge::{Palette, Density, apply_theme_with, install_fonts, set_locale, Locale};
//!
//! # fn run() -> eframe::Result<()> {
//! eframe::run_native(
//! "My app",
//! eframe::NativeOptions::default(),
//! Box::new(|cc| {
//! install_fonts(&cc.egui_ctx);
//! apply_theme_with(&cc.egui_ctx, &Palette::light(), Density::Comfortable);
//! set_locale(&cc.egui_ctx, Locale::En); // or Locale::Fr
//! Ok(Box::new(MyApp::default()) as Box<dyn eframe::App>)
//! }),
//! )
//! # }
//! # #[derive(Default)]
//! # struct MyApp;
//! # impl eframe::App for MyApp {
//! # fn ui(&mut self, _ui: &mut egui::Ui, _frame: &mut eframe::Frame) {}
//! # }
//! ```
//!
//! ## What you get
//!
//! - [`Palette`] — 20 semantic color roles, light + dark modes, WCAG AA
//! validated by `tests/contrast.rs`.
//! - [`SPACING`] / [`RADIUS`] / [`Elevation`] — numerical token tables.
//! - [`Icon`] — ~80 named icons backed by [Phosphor](https://phosphoricons.com/),
//! plus [`Icon::Glyph`] and [`Icon::Custom`] escape hatches.
//! - [`Density`] preset (`Comfortable` / `Compact`) and [`Locale`] (`En` / `Fr`)
//! read from [`egui::Context`] by every component.
//! - A [`components`] module with buttons, cards, alerts, inputs, dialogs,
//! toasts, navigation primitives, menus + submenus, etc.
//!
//! ## Modules
//!
//! - [`components`] — opinionated, ready-to-use UI atoms and containers.
//!
//! ## See also
//!
//! - `GUIDE.md` — UX/UI playbook (composition, navigation, modal vs side
//! panel, button order, i18n…).
//! - `cargo run --example showcase` — every component in one window.
//!
//! [egui]: https://github.com/emilk/egui
// Pedantic lints we deliberately silence:
// - `must_use_candidate` / `return_self_not_must_use`: every builder here is
// chain-style; #[must_use] would be noise on ~180 setters.
// - `wildcard_imports` inside small private match blocks (locale tr) is
// intentional and local.
pub use ;
pub use ;
pub use ;