theme

package
v0.10.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package theme defines lipgloss styles shared across the Jira TUI. The structure mirrors pagerduty-client's theme: package-level style vars derived from a clib theme, applied once via Apply(). All chrome and content styles are derived from clib theme colors so that swapping the underlying theme reskins the entire TUI.

Index

Constants

This section is empty.

Variables

View Source
var (
	StatusToDo       = lipgloss.NewStyle().Foreground(Theme.Blue.GetForeground())
	StatusInProgress = lipgloss.NewStyle().Foreground(Theme.Yellow.GetForeground()).Bold(true)
	StatusDone       = lipgloss.NewStyle().Foreground(Theme.Green.GetForeground())
	StatusBlocked    = lipgloss.NewStyle().Foreground(Theme.Red.GetForeground()).Bold(true)
)

Status styles — mapped to Jira issue status categories.

View Source
var (
	StatusOK  = lipgloss.NewStyle().Foreground(Theme.Green.GetForeground()).Bold(true)
	StatusErr = lipgloss.NewStyle().Foreground(Theme.Red.GetForeground()).Bold(true)
)

Status flash styles for action feedback.

View Source
var (
	Pill        = lipgloss.NewStyle().Padding(0, 1)
	PillDanger  = Pill.Foreground(Theme.Red.GetForeground()).Bold(true)
	PillWarning = Pill.Foreground(Theme.Yellow.GetForeground())
	PillDim     = Pill.Faint(true)
	PillOK      = Pill.Foreground(Theme.Green.GetForeground())
)

Pill styles for header counts.

View Source
var (
	ColorStatusBarFg = Theme.MarkdownText.GetForeground()
	ColorTitleFg     = Theme.MarkdownText.GetForeground()
	ColorHeaderFg    = Theme.Blue.GetForeground()
)

UI chrome colors.

View Source
var (
	HelpKey  = lipgloss.NewStyle().Foreground(Theme.Yellow.GetForeground()).Bold(true)
	HelpDesc = *Theme.Dim
)

HelpKey / HelpDesc style key labels and descriptions in help/hint bars.

View Source
var (
	DetailHeader = lipgloss.NewStyle().Bold(true).Foreground(Theme.Magenta.GetForeground())
	DetailLabel  = lipgloss.NewStyle().Bold(true).Foreground(Theme.Green.GetForeground())
	DetailValue  = lipgloss.NewStyle().Foreground(Theme.MarkdownText.GetForeground())
	DetailDim    = lipgloss.NewStyle().Faint(true)
)

Detail view styles for the issue detail viewport.

View Source
var (
	Paused = lipgloss.NewStyle().Foreground(Theme.Red.GetForeground()).Bold(true)
	Active = lipgloss.NewStyle().Foreground(Theme.Green.GetForeground()).Bold(true)
)

Refresh indicator styles.

View Source
var HelpOverlay = lipgloss.NewStyle().
	Border(lipgloss.RoundedBorder()).
	BorderForeground(Theme.Dim.GetForeground()).
	Padding(1, 2)

HelpOverlay outer container style (rounded border, padded, no bg).

View Source
var PriorityStyles = map[string]lipgloss.Style{
	"Highest": lipgloss.NewStyle().Foreground(Theme.Red.GetForeground()).Bold(true),
	"High":    lipgloss.NewStyle().Foreground(Theme.Orange.GetForeground()).Bold(true),
	"Medium":  lipgloss.NewStyle().Foreground(Theme.Yellow.GetForeground()),
	"Low":     lipgloss.NewStyle().Foreground(Theme.Blue.GetForeground()),
	"Lowest":  lipgloss.NewStyle().Faint(true),
}

Priority styles — Jira priority labels.

View Source
var TableHeader = lipgloss.NewStyle().
	Foreground(ColorHeaderFg).
	Bold(true).
	BorderStyle(lipgloss.NormalBorder()).
	BorderBottom(true)

TableHeader is the column header style for the issue list.

Theme is the shared clib theme instance.

View Source
var Title = lipgloss.NewStyle().Foreground(ColorTitleFg).Bold(true).Padding(0, 1)

Title for section/panel titles.

Functions

func Apply

func Apply(t *clibtheme.Theme)

Apply resets all derived styles to the given clib theme. Runs at most once per process; subsequent calls are no-ops (matching pdc's pattern, which avoids style flicker mid-render).

func EntityColor

func EntityColor(name string) lipgloss.Style

EntityColor returns a deterministic style for a named entity (assignee, project, etc) by hashing into the fixed mid-tone entity palette.

func PriorityStyle

func PriorityStyle(name string) (lipgloss.Style, bool)

PriorityStyle returns the style for a Jira priority name plus an ok flag.

func RenderEntityNames

func RenderEntityNames(names []string) string

RenderEntityNames colors each name individually and joins with ", ".

func Resolve

func Resolve(name string) *clibtheme.Theme

Resolve returns a clib theme for the given preset name. The "auto" name detects the terminal background (the TUI always runs on a TTY) and picks clib's light or dark theme so hash-based entity colors contrast. An empty or unrecognized name falls back to the process default, which honors the JIRA_THEME override before the dark built-in.

func StatusStyle

func StatusStyle(name string) lipgloss.Style

StatusStyle returns the style for a Jira status name. Falls back to the dim style for unknown statuses.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL