style

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoopStyle = &Style{}

Functions

func HasDarkBackground

func HasDarkBackground() bool

Types

type Color

type Color struct {
	// contains filtered or unexported fields
}

func (Color) CellValue

func (c Color) CellValue() tcell.Color

func (Color) Value

func (c Color) Value() lipgloss.TerminalColor

type Style

type Style struct {
	Reload func()
	// contains filtered or unexported fields
}

func NewStyle

func NewStyle(t *ThemeValues, showKeyMap bool) Style

func (Style) ActiveColor

func (s Style) ActiveColor() Color

func (Style) ActiveContrastColor

func (s Style) ActiveContrastColor() Color

func (Style) BorderColor

func (s Style) BorderColor() Color

func (Style) BorderTitleColor

func (s Style) BorderTitleColor() Color

func (Style) ButtonColor

func (s Style) ButtonColor(selected bool) Color

func (Style) ButtonTextColor

func (s Style) ButtonTextColor(selected bool) Color

func (Style) ColorProfile

func (s Style) ColorProfile() termenv.Profile

func (Style) ErrorColor added in v1.1.0

func (s Style) ErrorColor() Color

func (*Style) FormFieldWrapper

func (s *Style) FormFieldWrapper(field string) string

func (Style) HighlightColor

func (s Style) HighlightColor() Color

func (Style) HighlightContrastColor

func (s Style) HighlightContrastColor() Color

func (Style) InfoColor

func (s Style) InfoColor() Color

func (*Style) InputHelp added in v1.6.0

func (s *Style) InputHelp(text string) string

func (*Style) InputHelpStyle added in v1.6.0

func (s *Style) InputHelpStyle() lipgloss.Style

func (*Style) InputIndent added in v1.6.0

func (s *Style) InputIndent(text string) string

func (*Style) InputIndentSyle added in v1.6.0

func (s *Style) InputIndentSyle() lipgloss.Style

func (*Style) MainView

func (s *Style) MainView(view string, help string, resize bool) string

func (*Style) NeedsResize

func (s *Style) NeedsResize() bool

func (Style) PlaceholderColor

func (s Style) PlaceholderColor() Color

func (Style) PreviewColorSchemeName

func (s Style) PreviewColorSchemeName() string

func (*Style) Profile

func (s *Style) Profile() termenv.Profile

func (*Style) PromptDescription added in v1.6.0

func (s *Style) PromptDescription(text string) string

func (*Style) PromptDescriptionStyle added in v1.6.0

func (s *Style) PromptDescriptionStyle() lipgloss.Style

func (*Style) PromptLabel added in v1.6.0

func (s *Style) PromptLabel(text string) string

func (*Style) PromptLabelStyle added in v1.6.0

func (s *Style) PromptLabelStyle() lipgloss.Style

func (*Style) SetSize

func (s *Style) SetSize(width, height int)

func (Style) SnippetColor

func (s Style) SnippetColor() Color

func (Style) SnippetContrastColor

func (s Style) SnippetContrastColor() Color

func (Style) SubduedColor

func (s Style) SubduedColor() Color

func (Style) SuccessColor added in v1.1.0

func (s Style) SuccessColor() Color

func (Style) TextColor

func (s Style) TextColor() Color

func (*Style) Title

func (s *Style) Title(text string) string

func (Style) TitleColor

func (s Style) TitleColor() Color

func (Style) TitleContrastColor

func (s Style) TitleContrastColor() Color

func (*Style) TitleStyle

func (s *Style) TitleStyle() lipgloss.Style

func (Style) VerySubduedColor

func (s Style) VerySubduedColor() Color

type ThemeValues

type ThemeValues struct {
	BorderColor      string `yaml:"borderColor"`
	BorderTitleColor string `yaml:"borderTitleColor"`

	PreviewColorSchemeName string `yaml:"previewColorSchemeName"`

	TextColor string `yaml:"textColor"`

	SubduedColor         string `yaml:"subduedColor"`
	SubduedContrastColor string `yaml:"subduedContrastColor"`

	VerySubduedColor         string `yaml:"verySubduedColor"`
	VerySubduedContrastColor string `yaml:"verySubduedContrastColor"`

	ActiveColor         string `yaml:"activeColor"`
	ActiveContrastColor string `yaml:"activeContrastColor"`

	TitleColor         string `yaml:"titleColor"`
	TitleContrastColor string `yaml:"titleContrastColor"`

	HighlightColor         string `yaml:"highlightColor"`
	HighlightContrastColor string `yaml:"highlightContrastColor"`

	InfoColor         string `yaml:"infoColor"`
	InfoContrastColor string `yaml:"infoContrastColor"`

	SnippetColor         string `yaml:"snippetColor"`
	SnippetContrastColor string `yaml:"snippetContrastColor"`

	SuccessColor string `yaml:"successColor"`
	ErrorColor   string `yaml:"errorColor"`
}

Jump to

Keyboard shortcuts

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