hojicha_pearls/lib.rs
1//! # Hojicha Pearls
2//!
3//! Beautiful UI components and styling for Hojicha TUI applications.
4//!
5//! This crate provides pre-built components and styling utilities to help you
6//! create polished terminal user interfaces quickly.
7//!
8//! ## Components
9//!
10//! - **Button**: Clickable button with customizable styling
11//! - **Spinner**: Animated loading indicators
12//! - **ProgressBar**: Visual progress indication
13//! - **Tabs**: Tab-based navigation
14//! - **Modal**: Overlay dialogs
15//! - **Table**: Data display in tabular format
16//! - **List**: Scrollable lists with selection
17//! - **TextArea**: Multi-line text input
18//! - **TextInput**: Single-line text input
19//! - **Timer**: Countdown/countup timer
20//! - **Stopwatch**: Time tracking component
21//! - **StatusBar**: Application status display
22//! - **Paginator**: Page navigation
23//! - **Viewport**: Scrollable content area
24//!
25//! ## Styling
26//!
27//! - **Theme**: Consistent color schemes
28//! - **Gradient**: Color gradients for visual effects
29//! - **Grid**: Layout grid system
30//! - **Floating**: Floating element positioning
31//! - **Builder**: Fluent style builder API
32
33#![warn(missing_docs)]
34
35pub mod components;
36pub mod style;
37
38// Re-export commonly used components
39pub use components::{
40 Button, Help, List, Modal, Paginator, ProgressBar, Spinner, SpinnerStyle, StatusBar, Stopwatch,
41 StyledList, StyledTable, Table, Tabs, TextArea, TextInput, Timer, Viewport,
42};
43
44// Re-export styling utilities
45pub use style::{Color, ColorProfile, FloatingElement, Gradient, Grid, StyleBuilder, Theme};
46
47/// Prelude for convenient imports
48///
49/// This module provides the most commonly used components and styling utilities.
50/// Import everything with:
51///
52/// ```
53/// use hojicha_pearls::prelude::*;
54/// ```
55///
56/// ## Included Components
57///
58/// ### Input Components
59/// - [`TextInput`] - Single-line text input
60/// - [`TextArea`] - Multi-line text editor
61/// - [`Button`] - Clickable button
62///
63/// ### Display Components
64/// - [`List`] - Scrollable list with selection
65/// - [`Table`] - Data table with headers
66/// - [`Tabs`] - Tab navigation
67/// - [`Modal`] - Overlay dialog
68/// - [`ProgressBar`] - Progress indicator
69/// - [`Spinner`] - Loading animation
70///
71/// ### Styling
72/// - [`Theme`] - Color themes
73/// - [`ColorProfile`] - Component color sets
74/// - [`StyleBuilder`] - Fluent style API
75pub mod prelude {
76 // Input components
77 pub use crate::components::{Button, TextArea, TextInput};
78
79 // Display components
80 pub use crate::components::{List, Modal, ProgressBar, Spinner, SpinnerStyle, Table, Tabs};
81
82 // Common additional components
83 pub use crate::components::{StatusBar, Timer, Viewport};
84
85 // Styling utilities
86 pub use crate::style::{ColorProfile, StyleBuilder, Theme};
87}