{"modulePath":"github.com/newstack-cloud/deploy-cli-sdk","version":"v0.10.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package styles\n\n## Variables\n\n```go\nvar (\n\t// Status colors (Tailwind-based)\n\tErrorColor   = lipgloss.AdaptiveColor{Light: \"#b91c1c\", Dark: \"#f87171\"} // red-700 / red-400\n\tWarningColor = lipgloss.AdaptiveColor{Light: \"#c2410c\", Dark: \"#fb923c\"} // orange-700 / orange-400\n\tInfoColor    = lipgloss.AdaptiveColor{Light: \"#1d4ed8\", Dark: \"#60a5fa\"} // blue-700 / blue-400\n\tSuccessColor = lipgloss.AdaptiveColor{Light: \"#15803d\", Dark: \"#4ade80\"} // green-700 / green-400\n\n\t// Neutral colors with light/dark mode support\n\tMutedColor      = lipgloss.AdaptiveColor{Light: \"#666666\", Dark: \"#888888\"}\n\tTextColor       = lipgloss.AdaptiveColor{Light: \"#333333\", Dark: \"#ffffff\"}\n\tTextSubtleColor = lipgloss.AdaptiveColor{Light: \"#999999\", Dark: \"#666666\"}\n)\n```\nShared semantic colors - consistent across all themes. These colors follow user expectations for status indicators.\n\nStatus colors are adaptive: the Light variants are darker (Tailwind -700) shades that stay legible on light terminal backgrounds, and the Dark variants are brighter (Tailwind -400) shades for dark backgrounds. lipgloss selects between them based on the detected terminal background.\n\n## Functions\n\n```go\nfunc NewHuhTheme(palette ColorPalette) *huh.Theme\n```\nNewHuhTheme creates a huh form theme using the provided color palette.\n\n## Types\n\n```go\ntype BluelinkPalette struct{}\n```\nBluelinkPalette implements ColorPalette for the Bluelink CLI theme.\n\n```go\nfunc NewBluelinkPalette() *BluelinkPalette\n```\nNewBluelinkPalette creates a new Bluelink color palette.\n\n```go\nfunc (p *BluelinkPalette) Error() lipgloss.TerminalColor\n```\n\n```go\nfunc (p *BluelinkPalette) Info() lipgloss.TerminalColor\n```\n\n```go\nfunc (p *BluelinkPalette) Muted() lipgloss.TerminalColor\n```\n\n```go\nfunc (p *BluelinkPalette) Name() string\n```\n\n```go\nfunc (p *BluelinkPalette) Primary() lipgloss.TerminalColor\n```\n\n```go\nfunc (p *BluelinkPalette) Secondary() lipgloss.TerminalColor\n```\n\n```go\nfunc (p *BluelinkPalette) Success() lipgloss.TerminalColor\n```\n\n```go\nfunc (p *BluelinkPalette) Text() lipgloss.TerminalColor\n```\n\n```go\nfunc (p *BluelinkPalette) TextSubtle() lipgloss.TerminalColor\n```\n\n```go\nfunc (p *BluelinkPalette) Warning() lipgloss.TerminalColor\n```\n\n```go\ntype CelerityPalette struct{}\n```\nCelerityPalette implements ColorPalette for the Celerity CLI theme.\n\n```go\nfunc NewCelerityPalette() *CelerityPalette\n```\nNewCelerityPalette creates a new Celerity color palette.\n\n```go\nfunc (p *CelerityPalette) Error() lipgloss.TerminalColor\n```\n\n```go\nfunc (p *CelerityPalette) Info() lipgloss.TerminalColor\n```\n\n```go\nfunc (p *CelerityPalette) Muted() lipgloss.TerminalColor\n```\n\n```go\nfunc (p *CelerityPalette) Name() string\n```\n\n```go\nfunc (p *CelerityPalette) Primary() lipgloss.TerminalColor\n```\n\n```go\nfunc (p *CelerityPalette) Secondary() lipgloss.TerminalColor\n```\n\n```go\nfunc (p *CelerityPalette) Success() lipgloss.TerminalColor\n```\n\n```go\nfunc (p *CelerityPalette) Text() lipgloss.TerminalColor\n```\n\n```go\nfunc (p *CelerityPalette) TextSubtle() lipgloss.TerminalColor\n```\n\n```go\nfunc (p *CelerityPalette) Warning() lipgloss.TerminalColor\n```\n\n```go\ntype ColorPalette interface {\n\t// Name returns the theme identifier (e.g., \"bluelink\", \"celerity\").\n\tName() string\n\n\t// Brand colors - these differ per theme\n\tPrimary() lipgloss.TerminalColor\n\tSecondary() lipgloss.TerminalColor\n\n\t// Semantic colors - typically consistent across themes\n\tError() lipgloss.TerminalColor\n\tWarning() lipgloss.TerminalColor\n\tInfo() lipgloss.TerminalColor\n\tSuccess() lipgloss.TerminalColor\n\n\t// UI colors\n\tMuted() lipgloss.TerminalColor\n\tText() lipgloss.TerminalColor\n\tTextSubtle() lipgloss.TerminalColor\n}\n```\nColorPalette defines the color scheme for a CLI theme. Themes must implement this interface to provide their brand colors.\n\n```go\ntype Styles struct {\n\tSelected          lipgloss.Style\n\tSelectedListItem  lipgloss.Style\n\tSelectable        lipgloss.Style\n\tTitle             lipgloss.Style\n\tListItem          lipgloss.Style\n\tPagination        lipgloss.Style\n\tHelp              lipgloss.Style\n\tSuccess           lipgloss.Style\n\tError             lipgloss.Style\n\tWarning           lipgloss.Style\n\tInfo              lipgloss.Style\n\tMuted             lipgloss.Style\n\tSpinner           lipgloss.Style\n\tCategory          lipgloss.Style\n\tLocation          lipgloss.Style\n\tDiagnosticMessage lipgloss.Style\n\tDiagnosticAction  lipgloss.Style\n\tHeader            lipgloss.Style\n\tSelectedNavItem   lipgloss.Style\n\tHint              lipgloss.Style\n\tKey               lipgloss.Style\n\t// For displaying CLI commands (e.g. \"bluelink deploy --name my-stack\")\n\tCommand lipgloss.Style\n\tBorder  func(focused bool) lipgloss.Style\n\n\t// Palette provides access to the underlying colors for custom rendering.\n\tPalette ColorPalette\n}\n```\nStyles holds the styles to be used across command TUI components. This is the theme-agnostic styles struct that works with any ColorPalette.\n\n```go\nfunc NewDefaultStyles(palette ColorPalette) *Styles\n```\nNewDefaultStyles creates a new instance of styles with the default renderer.\n\n```go\nfunc NewStyles(r *lipgloss.Renderer, palette ColorPalette) *Styles\n```\nNewStyles creates a new instance of styles using the provided color palette.\n\n","path":"github.com/newstack-cloud/deploy-cli-sdk/styles","name":"styles","synopsis":"","isRedistributable":true}
