Documentation ¶
Index ¶
- Constants
- Variables
- func UseBatchSpinner(style *BatchSpinnerStyle, payload *BatchSpinnerPayLoad)
- func UseMultiSelect(style *MultiSelectStyle, payload *MultiSelectPayLoad) []int
- func UseRepl(questions []string) []string
- func UseSimpleList(style *SimpleListStyle, payload *SimpleListPayLoad) int
- func UseSpinner(style *SpinnerStyle, payload *SpinnerPayLoad)
- func UseTextInput(style *TextInputStyle, payload *TextInputPayLoad) []string
- type BatchSpinnerPayLoad
- type BatchSpinnerStyle
- type BatchTask
- type FancyListItem
- type FancyListPayLoad
- type FancyListStyle
- type MultiSelectPayLoad
- type MultiSelectStyle
- type SimpleListPayLoad
- type SimpleListStyle
- type SpinnerPayLoad
- type SpinnerStyle
- type TextInputFormat
- type TextInputPayLoad
- type TextInputStyle
Constants ¶
View Source
const ( THEME_INFO = "#8866e9" THEME_PRIMARY = "#006bbb" THEME_SUCCESS = "#027b77" THEME_WARNING = "#ff7b52" THEME_DANGER = "#d251a6" )
View Source
const ( KeySpace = " " KeyDown = "down" KeyUp = "up" KeyJ = "j" KeyQ = "q" KeyK = "k" KeyEnter = "enter" KeyCtrlC = "ctrl+c" KeyCtrlR = "ctrl+r" KeyESC = "esc" KeyTab = "tab" KeyShiftTab = "shift+tab" )
Variables ¶
View Source
var FontColor = lipgloss.NewStyle().Foreground
Functions ¶
func UseBatchSpinner ¶
func UseBatchSpinner(style *BatchSpinnerStyle, payload *BatchSpinnerPayLoad)
func UseMultiSelect ¶
func UseMultiSelect(style *MultiSelectStyle, payload *MultiSelectPayLoad) []int
func UseSimpleList ¶
func UseSimpleList(style *SimpleListStyle, payload *SimpleListPayLoad) int
func UseSpinner ¶
func UseSpinner(style *SpinnerStyle, payload *SpinnerPayLoad)
func UseTextInput ¶
func UseTextInput(style *TextInputStyle, payload *TextInputPayLoad) []string
Types ¶
type BatchSpinnerPayLoad ¶
type BatchSpinnerPayLoad struct {
Task []BatchTask
}
func DefaultBatchSpinnerPayLoad ¶
func DefaultBatchSpinnerPayLoad() *BatchSpinnerPayLoad
type BatchSpinnerStyle ¶
type BatchSpinnerStyle struct { CurrentPkgNameStyle lipgloss.Style DoneStyle lipgloss.Style CheckMark lipgloss.Style ErrorMask lipgloss.Style }
func DefaultBatchSpinnerStyle ¶
func DefaultBatchSpinnerStyle() *BatchSpinnerStyle
type FancyListItem ¶
func UseFancyList ¶
func UseFancyList(style *FancyListStyle, payload *FancyListPayLoad) FancyListItem
func (FancyListItem) Description ¶
func (i FancyListItem) Description() string
func (FancyListItem) FilterValue ¶
func (i FancyListItem) FilterValue() string
func (FancyListItem) Title ¶
func (i FancyListItem) Title() string
type FancyListPayLoad ¶
func DefaultFancyListPayLoad ¶
func DefaultFancyListPayLoad() *FancyListPayLoad
type FancyListStyle ¶
func DefaultFancyListStyle ¶
func DefaultFancyListStyle() *FancyListStyle
type MultiSelectPayLoad ¶
func DefaultMultiSelectPayLoad ¶
func DefaultMultiSelectPayLoad() *MultiSelectPayLoad
type MultiSelectStyle ¶
type MultiSelectStyle struct { }
func DefaultMultiSelectStyle ¶
func DefaultMultiSelectStyle() *MultiSelectStyle
type SimpleListPayLoad ¶
type SimpleListPayLoad struct { Title string Choices []string QuitTextWithChoice string QuitText string ShowQuitText bool }
func DefaultSimpleListPayload ¶
func DefaultSimpleListPayload() *SimpleListPayLoad
type SimpleListStyle ¶
type SimpleListStyle struct {
Width, Height int
QuitTextStyle lipgloss.Style
TitleStyle lipgloss.Style
HelpStyle lipgloss.Style
ItemStyle lipgloss.Style
SelectedItemStyle lipgloss.Style
PaginationStyle lipgloss.Style
}
func DefaultSimpleListStyle ¶
func DefaultSimpleListStyle() *SimpleListStyle
type SpinnerPayLoad ¶
type SpinnerPayLoad struct {
Callback func()
}
type SpinnerStyle ¶
func DefaultSpinnerStyle ¶
func DefaultSpinnerStyle() *SpinnerStyle
type TextInputFormat ¶
type TextInputPayLoad ¶
type TextInputPayLoad struct {
Texts []TextInputFormat
}
func DefaultTextInputPayLoad ¶
func DefaultTextInputPayLoad() *TextInputPayLoad
type TextInputStyle ¶
type TextInputStyle struct { FocusedStyle lipgloss.Style BlurredStyle lipgloss.Style CursorStyle lipgloss.Style NoStyle lipgloss.Style HelpStyle lipgloss.Style CursorModeHelpStyle lipgloss.Style FocusedButton string BlurredButton string }
func DefaultTextStyle ¶
func DefaultTextStyle() *TextInputStyle
Click to show internal directories.
Click to hide internal directories.