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
//! Modal container widget (overlay layer), dialog presets, modal stack management, and animations.
//!
//! # Animation System (bd-39vx.4)
//!
//! Modals support smooth entrance and exit animations:
//!
//! - **Scale-in/out**: Classic modal pop effect
//! - **Fade-in/out**: Opacity transition
//! - **Slide animations**: Slide from top/bottom
//! - **Backdrop fade**: Independent backdrop opacity animation
//! - **Reduced motion**: Respects accessibility preferences
//!
//! Use [`ModalAnimationState`] to track animation progress and compute
//! interpolated values for scale, opacity, and position.
//!
//! # Focus Management (bd-39vx.5)
//!
//! Modals can integrate with [`crate::focus::FocusManager`] for accessibility:
//!
//! - **Auto-focus**: First focusable element receives focus when modal opens
//! - **Focus trap**: Tab navigation is constrained within the modal
//! - **Focus restore**: Previous focus is restored when modal closes
//! - **Escape to close**: Already built into modal handling
//!
//! Use [`FocusAwareModalStack`] as the canonical focus-aware modal API. For
//! lower-level orchestration, pair [`ModalStack::push_with_focus`] with your own
//! `FocusManager`.
//!
//! # Example
//!
//! ```ignore
//! use ftui_widgets::modal::{FocusAwareModalStack, WidgetModalEntry, ModalAnimationState};
//!
//! let mut modals = FocusAwareModalStack::new();
//! let mut animation = ModalAnimationState::new();
//!
//! // Start opening animation
//! animation.start_opening();
//!
//! // Push modal with focus trap
//! modals.push_with_trap(
//! Box::new(WidgetModalEntry::new(dialog).with_focusable_ids(vec![1, 2, 3])),
//! vec![1, 2, 3],
//! );
//! ```
pub use ;
pub use ;
pub use ;
pub use FocusAwareModalStack;
pub use ;