add tui dependencies and base styles
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
package tui
|
||||
|
||||
import "github.com/charmbracelet/lipgloss"
|
||||
|
||||
// Base styles for hyprvoice TUI components
|
||||
var (
|
||||
// Header style for titles and section headers
|
||||
StyleHeader = lipgloss.NewStyle().
|
||||
Bold(true).
|
||||
Foreground(ColorPrimary).
|
||||
MarginBottom(1)
|
||||
|
||||
// Label style for form field labels
|
||||
StyleLabel = lipgloss.NewStyle().
|
||||
Foreground(ColorText).
|
||||
Bold(true)
|
||||
|
||||
// Success style for positive feedback
|
||||
StyleSuccess = lipgloss.NewStyle().
|
||||
Foreground(ColorSuccess)
|
||||
|
||||
// Error style for error messages
|
||||
StyleError = lipgloss.NewStyle().
|
||||
Foreground(ColorError).
|
||||
Bold(true)
|
||||
|
||||
// Warning style for warnings
|
||||
StyleWarning = lipgloss.NewStyle().
|
||||
Foreground(ColorWarning)
|
||||
|
||||
// Muted style for secondary text
|
||||
StyleMuted = lipgloss.NewStyle().
|
||||
Foreground(ColorMuted)
|
||||
|
||||
// Subtle style for hints and descriptions
|
||||
StyleSubtle = lipgloss.NewStyle().
|
||||
Foreground(ColorSubtle).
|
||||
Italic(true)
|
||||
|
||||
// Highlight style for selected/focused items
|
||||
StyleHighlight = lipgloss.NewStyle().
|
||||
Foreground(ColorSecondary).
|
||||
Bold(true)
|
||||
|
||||
// Selected style for chosen options
|
||||
StyleSelected = lipgloss.NewStyle().
|
||||
Foreground(ColorPrimary).
|
||||
Bold(true)
|
||||
|
||||
// Box style for bordered containers
|
||||
StyleBox = lipgloss.NewStyle().
|
||||
Border(lipgloss.RoundedBorder()).
|
||||
BorderForeground(ColorSubtle).
|
||||
Padding(1, 2)
|
||||
|
||||
// FocusedBox style for focused containers
|
||||
StyleFocusedBox = lipgloss.NewStyle().
|
||||
Border(lipgloss.RoundedBorder()).
|
||||
BorderForeground(ColorPrimary).
|
||||
Padding(1, 2)
|
||||
)
|
||||
|
||||
// Logo returns the hyprvoice ASCII art
|
||||
func Logo() string {
|
||||
logo := `
|
||||
_ _
|
||||
| |__ _ _ _ __ _ ____ _(_) ___ ___
|
||||
| '_ \| | | | '_ \| '__\ \ / / |/ __/ _ \
|
||||
| | | | |_| | |_) | | \ V /| | (_| __/
|
||||
|_| |_|\__, | .__/|_| \_/ |_|\___\___|
|
||||
|___/|_| `
|
||||
return StyleHeader.Render(logo)
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package tui
|
||||
|
||||
import "github.com/charmbracelet/lipgloss"
|
||||
|
||||
// Color palette for hyprvoice TUI
|
||||
// Using a modern, accessible color scheme
|
||||
var (
|
||||
// Primary colors
|
||||
ColorPrimary = lipgloss.Color("#7C3AED") // Purple - main accent
|
||||
ColorSecondary = lipgloss.Color("#06B6D4") // Cyan - secondary accent
|
||||
|
||||
// Status colors
|
||||
ColorSuccess = lipgloss.Color("#22C55E") // Green
|
||||
ColorError = lipgloss.Color("#EF4444") // Red
|
||||
ColorWarning = lipgloss.Color("#F59E0B") // Amber
|
||||
|
||||
// Text colors
|
||||
ColorText = lipgloss.Color("#F8FAFC") // Bright white
|
||||
ColorMuted = lipgloss.Color("#94A3B8") // Slate gray
|
||||
ColorSubtle = lipgloss.Color("#64748B") // Darker gray
|
||||
|
||||
// Background colors
|
||||
ColorBg = lipgloss.Color("#0F172A") // Dark slate
|
||||
ColorBgAlt = lipgloss.Color("#1E293B") // Slightly lighter
|
||||
ColorHighlight = lipgloss.Color("#334155") // Selection highlight
|
||||
)
|
||||
Reference in New Issue
Block a user