mirror of
https://github.com/zoriya/bubbles.git
synced 2026-08-16 01:43:21 +00:00
chore(list): fix v2 errors
This commit is contained in:
+56
-37
@@ -39,6 +39,42 @@ type Styles struct {
|
||||
DividerDot lipgloss.Style
|
||||
}
|
||||
|
||||
// BaseStyles returns a set of base styles for this list component. No color
|
||||
// will be applied. You can use this as a starting point for your own styles,
|
||||
// if you like.
|
||||
func BaseStyles() Styles {
|
||||
var s Styles
|
||||
|
||||
s.TitleBar = lipgloss.NewStyle().
|
||||
Padding(0, 0, 1, 2)
|
||||
s.Title = lipgloss.NewStyle().
|
||||
Padding(0, 1)
|
||||
s.Spinner = lipgloss.NewStyle()
|
||||
s.FilterPrompt = lipgloss.NewStyle()
|
||||
s.FilterCursor = lipgloss.NewStyle()
|
||||
s.DefaultFilterCharacterMatch = lipgloss.NewStyle().
|
||||
Underline(true)
|
||||
s.StatusBar = lipgloss.NewStyle().
|
||||
Padding(0, 0, 1, 2)
|
||||
s.StatusEmpty = lipgloss.NewStyle()
|
||||
s.StatusBarActiveFilter = lipgloss.NewStyle()
|
||||
s.StatusBarFilterCount = lipgloss.NewStyle()
|
||||
s.NoItems = lipgloss.NewStyle()
|
||||
s.ArabicPagination = lipgloss.NewStyle()
|
||||
s.PaginationStyle = lipgloss.NewStyle().
|
||||
PaddingLeft(2) //nolint:gomnd
|
||||
s.HelpStyle = lipgloss.NewStyle().
|
||||
Padding(1, 0, 0, 2)
|
||||
s.ActivePaginationDot = lipgloss.NewStyle().
|
||||
SetString(bullet)
|
||||
s.InactivePaginationDot = lipgloss.NewStyle().
|
||||
SetString(bullet)
|
||||
s.DividerDot = lipgloss.NewStyle().
|
||||
SetString(" " + bullet + " ")
|
||||
|
||||
return s
|
||||
}
|
||||
|
||||
// LightStyles returns a set of light style definitions for this list Bubble.
|
||||
func LightStyles() Styles {
|
||||
return newStyles(false)
|
||||
@@ -57,53 +93,36 @@ func newStyles(isDark bool) (s Styles) {
|
||||
verySubduedColor := lightDark("#DDDADA", "#3C3C3C")
|
||||
subduedColor := lightDark("#9B9B9B", "#5C5C5C")
|
||||
|
||||
s.TitleBar = lipgloss.NewStyle().Padding(0, 0, 1, 2)
|
||||
|
||||
s.Title = lipgloss.NewStyle().
|
||||
s.Title = s.Title.
|
||||
Background(lipgloss.Color("62")).
|
||||
Foreground(lipgloss.Color("230")).
|
||||
Padding(0, 1)
|
||||
|
||||
s.Spinner = lipgloss.NewStyle().
|
||||
Foreground(lipgloss.Color("230"))
|
||||
s.Spinner = s.Spinner.
|
||||
Foreground(lightDark("#8E8E8E", "#747373"))
|
||||
|
||||
s.FilterPrompt = lipgloss.NewStyle().
|
||||
s.FilterPrompt = s.FilterPrompt.
|
||||
Foreground(lightDark("#04B575", "#ECFD65"))
|
||||
|
||||
s.FilterCursor = lipgloss.NewStyle().
|
||||
s.FilterCursor = s.FilterCursor.
|
||||
Foreground(lightDark("#EE6FF8", "#EE6FF8"))
|
||||
|
||||
s.DefaultFilterCharacterMatch = lipgloss.NewStyle().Underline(true)
|
||||
|
||||
s.StatusBar = lipgloss.NewStyle().
|
||||
Foreground(lightDark("#A49FA5", "#777777")).
|
||||
Padding(0, 0, 1, 2)
|
||||
|
||||
s.StatusEmpty = lipgloss.NewStyle().Foreground(subduedColor)
|
||||
|
||||
s.StatusBarActiveFilter = lipgloss.NewStyle().
|
||||
s.StatusBar = s.StatusBar.
|
||||
Foreground(lightDark("#A49FA5", "#777777"))
|
||||
s.StatusEmpty = s.StatusEmpty.
|
||||
Foreground(subduedColor)
|
||||
s.StatusBarActiveFilter = s.StatusBarActiveFilter.
|
||||
Foreground(lightDark("#1a1a1a", "#dddddd"))
|
||||
|
||||
s.StatusBarFilterCount = lipgloss.NewStyle().Foreground(verySubduedColor)
|
||||
|
||||
s.NoItems = lipgloss.NewStyle().
|
||||
s.StatusBarFilterCount = s.StatusBarFilterCount.
|
||||
Foreground(verySubduedColor)
|
||||
s.NoItems = s.NoItems.
|
||||
Foreground(lightDark("#909090", "#626262"))
|
||||
|
||||
s.ArabicPagination = lipgloss.NewStyle().Foreground(subduedColor)
|
||||
|
||||
s.PaginationStyle = lipgloss.NewStyle().PaddingLeft(2) //nolint:gomnd
|
||||
|
||||
s.HelpStyle = lipgloss.NewStyle().Padding(1, 0, 0, 2)
|
||||
|
||||
s.ActivePaginationDot = lipgloss.NewStyle().
|
||||
s.ArabicPagination = s.ArabicPagination.
|
||||
Foreground(subduedColor)
|
||||
s.HelpStyle = s.HelpStyle.
|
||||
Padding(1, 0, 0, 2)
|
||||
s.ActivePaginationDot = s.ActivePaginationDot.
|
||||
Foreground(lightDark("#847A85", "#979797")).
|
||||
SetString(bullet)
|
||||
|
||||
s.InactivePaginationDot = lipgloss.NewStyle().
|
||||
s.InactivePaginationDot = s.InactivePaginationDot.
|
||||
Foreground(verySubduedColor).
|
||||
SetString(bullet)
|
||||
|
||||
s.DividerDot = lipgloss.NewStyle().
|
||||
s.DividerDot = s.DividerDot.
|
||||
Foreground(verySubduedColor).
|
||||
SetString(" " + bullet + " ")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user