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
//! Small content components: [`EmptyState`], [`Banner`] (a live region), [`Card`],
//! [`Collapsible`] and [`Accordion`] (at most one section open).
//!
//! Like the [`controls`](crate::controls) they take every string from the caller, register a
//! dotted automation id (`<id>`, plus `<id>.action` and `<id>.dismiss` for their buttons), fill
//! their AccessKit nodes and paint from the design tokens. None of them animates: a collapsible
//! opens and closes in one frame, so they need no reduced-motion handling and ask for no frames.
//!
//! ```
//! # use ashlar_ui::content::{Banner, Card, Collapsible, EmptyState};
//! # use ashlar_ui::controls::Tone;
//! # fn ui(ui: &mut egui::Ui, advanced_open: &mut bool, offline: bool) {
//! if offline {
//! let out = Banner::new("sync.offline", Tone::Warning, "Changes are kept on this computer until the connection is back.")
//! .title("Offline")
//! .action("Retry")
//! .show(ui);
//! if out.action { /* reconnect */ }
//! }
//! Card::new("settings.account").title("Account").show(ui, |ui| { ui.label("Signed in"); });
//! Collapsible::new("settings.advanced", "Advanced", advanced_open).show(ui, |ui| { ui.label("…"); });
//! if EmptyState::new("files.empty", "No files yet").body("Drop files here or create one.").action("New file").show(ui).action {
//! // create a file
//! }
//! # }
//! ```
pub use ;
pub use Card;
pub use chevron as chevron_points;
pub use ;
pub use ;