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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
// SPDX-License-Identifier: MPL-2.0
// SPDX-FileCopyrightText: 2026 FernTech
//! Tier-3 style protocol for `Button`.
//!
//! See `docs/styling-system.md`. The trait is object-safe so
//! `Rc<dyn ButtonStyle>` can be stored in a theme slot or attached
//! per-call via `Button::style(...)`.
use Rc;
use ;
use ;
use crateBuildContext;
use crateSignal;
use crate;
use crateWidgetId;
/// Closed enum naming the design-language variants of `Button`. Set
/// per-call via `Button::variant(ButtonVariant::Outlined)` or
/// per-app default via a `ComponentDefaults` extension.
///
/// Variants are *hints* the active [`ButtonStyle`] may honour or
/// remap. The IntUI default `RecipeButtonStyle` collapses some pairs:
/// Tinted/Outlined → Plain look, Link → Ghost, Destructive → Filled
/// (the warning lives in the dialog title, not the button).
/// Inputs handed to a [`ButtonStyle::make_body`] call.
///
/// `label` is a pre-built subtree (the active style only arranges
/// chrome around it; it never builds the label itself). The four
/// boolean signals carry the live interaction state — the style can
/// `.zip` / `.map` them to derive a [`crate::styles::WidgetState`] if
/// it wants to pick between per-state recipes.
/// Style protocol for `Button`. The active style owns *all* paint and
/// layering — it receives the label subtree pre-built and arranges
/// background, border, focus ring, padding, etc. around it.
///
/// `'static` (no `Send + Sync`) because the rest of teksilo-core is
/// already single-threaded (`Signal` uses `Rc`); enforcing thread
/// safety here would be inconsistent and pay no benefit.
/// Shared handle for a `ButtonStyle` impl. Cheap to clone; one shared
/// `Rc` is used per theme slot and per-call override.
pub type SharedButtonStyle = ;
/// Tier-2 paint-recipe for one variant of `Button`. The default
/// [`crate::styles::ButtonStyle`] impl shipped in `teksilo-widgets`
/// (`RecipeButtonStyle`) holds a `HashMap<ButtonVariant, ButtonRecipe>`
/// and looks up the recipe at paint time.
///
/// Custom `ButtonStyle` impls can ignore recipes entirely (paint a
/// glassmorphism gradient, run their own canvas code, etc.); the
/// recipe layer is the *default* surface, not an obligation.