mirror of
https://github.com/phranck/TUIkit.git
synced 2026-06-20 09:54:37 +00:00
- Wire FocusManager.dispatchKeyEvent() into InputHandler as Layer 3 (Tab/Shift+Tab navigation, Enter/Space button activation) - Modal/Alert presenters isolate base content from focus/key systems using RenderContext.isolatedForBackground() so only modal buttons receive focus and key events - ESC automatically dismisses any modal or alert (framework-level) - Fix ContainerView footer layout: Spacer() now fills correctly by constraining footer context to actual inner width - Remove body background color from standard style containers (only block style uses distinct section backgrounds) - Replace all hardcoded ANSI colors with palette semantic colors (.palette.warning/error/info/success) in Alert presets and example app
36 lines
860 B
Swift
36 lines
860 B
Swift
//
|
|
// SpinnersPage.swift
|
|
// TUIkitExample
|
|
//
|
|
// Demo page showcasing the Spinner view with all three styles.
|
|
//
|
|
|
|
import TUIkit
|
|
|
|
/// A demo page showing all Spinner styles.
|
|
struct SpinnersPage: View {
|
|
var body: some View {
|
|
VStack(alignment: .leading, spacing: 1) {
|
|
HeaderView(title: "Spinners")
|
|
|
|
DemoSection("Dots (Braille Rotation)") {
|
|
Spinner("Loading data...")
|
|
}
|
|
|
|
DemoSection("Line (ASCII Rotation)") {
|
|
Spinner("Compiling...", style: .line)
|
|
}
|
|
|
|
DemoSection("Bouncing (Knight Rider)") {
|
|
Spinner("Processing...", style: .bouncing)
|
|
}
|
|
|
|
DemoSection("Custom Color") {
|
|
Spinner("Installing...", style: .bouncing, color: .palette.success)
|
|
}
|
|
|
|
Spacer()
|
|
}
|
|
}
|
|
}
|