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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
//! ccf-gpui-widgets - Reusable GPUI widgets for building desktop applications
//!
//! This crate provides a collection of ready-to-use UI widgets built on top of GPUI,
//! the GPU-accelerated UI framework from Zed Industries.
//!
//! # Features
//!
//! - **Themeable**: All widgets support custom themes via a global context or per-widget override
//! - **Accessible**: Keyboard navigation support where applicable
//! - **Event-driven**: All widgets emit events for state changes
//! - **Builder pattern**: Fluent API for widget configuration
//!
//! # Quick Start
//!
//! ```ignore
//! use gpui::*;
//! use ccf_gpui_widgets::{Theme, widgets::*};
//!
//! Application::new().run(|cx: &mut App| {
//! // Register keybindings for widgets that need them
//! register_all_keybindings(cx);
//!
//! // Optionally set a global theme
//! cx.set_global(Theme::dark());
//!
//! cx.open_window(WindowOptions::default(), |_window, cx| {
//! cx.new(|cx| {
//! // Create your widgets
//! let input = cx.new(|cx| TextInput::new(cx).placeholder("Enter text..."));
//! let checkbox = cx.new(|cx| Checkbox::new(cx).label("Enable feature"));
//! // ...
//! })
//! }).unwrap();
//!
//! cx.activate(true);
//! });
//! ```
//!
//! # Available Widgets
//!
//! ## Input Widgets
//!
//! - [`TextInput`](widgets::TextInput) - Full-featured text input with cursor, selection, clipboard
//! - [`PasswordInput`](widgets::PasswordInput) - Text input with visibility toggle
//! - [`NumberStepper`](widgets::NumberStepper) - Numeric input with +/- buttons
//! - [`Slider`](widgets::Slider) - Horizontal slider for numeric ranges
//!
//! ## Selection Widgets
//!
//! - [`Checkbox`](widgets::Checkbox) - Simple checkbox with optional label
//! - [`ToggleSwitch`](widgets::ToggleSwitch) - On/off toggle with configurable label position
//! - [`Dropdown`](widgets::Dropdown) - Select/dropdown with keyboard navigation
//! - [`RadioGroup`](widgets::RadioGroup) - Single-selection from multiple choices
//! - [`CheckboxGroup`](widgets::CheckboxGroup) - Multi-selection from multiple choices
//! - [`ColorSwatch`](widgets::ColorSwatch) - Color picker with hex input, HSV canvas
//!
//! ## Display Widgets
//!
//! - [`Tooltip`](widgets::Tooltip) - Hover tooltip
//! - [`ProgressBar`](widgets::ProgressBar) - Progress indicator (determinate/indeterminate)
//! - [`Spinner`](widgets::Spinner) - Loading spinner in multiple sizes
//!
//! ## Layout & Navigation
//!
//! - [`Collapsible`](widgets::Collapsible) - Expandable/collapsible section
//! - [`TabBar`](widgets::TabBar) - Tab navigation with keyboard support
//! - [`ConfirmationDialog`](widgets::ConfirmationDialog) - Modal dialogs (Info/Default/Warning/Danger styles)
//!
//! ## Repeatable Widgets
//!
//! - [`RepeatableTextInput`](widgets::RepeatableTextInput) - Text input with add/remove for lists
//!
//!
//! ## Utilities
//!
//! - [`primary_button`](widgets::primary_button) - Blue/accent styled button
//! - [`secondary_button`](widgets::secondary_button) - Gray styled button
//! - [`danger_button`](widgets::danger_button) - Red styled button
//! - [`with_focus_actions`](widgets::with_focus_actions) - Add Tab/Shift-Tab focus navigation to elements
//!
//! # Feature Flags
//!
//! - `file-picker` - Enables FilePicker and DirectoryPicker widgets (adds `rfd` and `dirs` dependencies)
//! - `full` - Enables all optional features
//!
//! # Theming
//!
//! Widgets use a [`Theme`] struct for colors. You can:
//!
//! 1. Set a global theme: `cx.set_global(Theme::dark())`
//! 2. Use per-widget themes: `TextInput::new(cx).theme(my_theme)`
//! 3. Use the default (dark theme) if nothing is set
//!
//! ```ignore
//! use ccf_gpui_widgets::Theme;
//!
//! // Built-in themes
//! let dark = Theme::dark();
//! let light = Theme::light();
//!
//! // Customize with builder methods (all ~30 fields have with_* methods)
//! let custom = Theme::dark()
//! .with_accent(0x00ff00)
//! .with_primary(0xff0000)
//! .with_bg_input(0x333333)
//! .with_border_input(0x666666)
//! .with_tooltip_bg(0x222222)
//! .with_selection(0x264F78);
//! ```
// Convenient re-exports
pub use ;
pub use register_all_keybindings;
/// Prelude for convenient imports