Documentation
¶
Index ¶
- Constants
- Variables
- func NewBanner() *banner
- func NewMultiSelect() *multiSelect
- func NewProgress() *progress
- func NewSecureInput() *secureInput
- func NewSingleSelect() *singleSelect
- func NewSpinner() *spinner
- func NewStatus() *status
- func NewTextInput() *textInput
- type Choice
- type ProgressPattern
- type StyleMap
Constants ¶
View Source
const ( AlignLeft alignment = iota AlignCenter AlignRight )
View Source
const ( StatusLevelDebug statusLevel = iota StatusLevelSuccess StatusLevelInfo StatusLevelWarn StatusLevelError )
Variables ¶
View Source
var ErrInterrupted = errors.New("prompt interrupted")
View Source
var ErrInvalidSelectionCount = errors.New("max count > min count for multi select prompt")
View Source
var ErrNoSelectionChoices = errors.New("no choices supplied for selection prompt")
View Source
var ErrTerminalTooSmall = errors.New("terminal dimensions too small")
View Source
var ProgressPatternDefault = ProgressPattern{"+", "-", " [", "] "}
--- Presets ---------------------------------------------
View Source
var ProgressPatternHashes = ProgressPattern{"#", "=", " [", "] "}
View Source
var ProgressPatternPipes = ProgressPattern{"|", " ", " ", " "}
View Source
var ProgressPatternSolid = ProgressPattern{"█", "░", " ", " "}
View Source
var SpinnerPatternCircles = []string{"◐ ", "◓ ", "◑ ", "◒ "}
View Source
var SpinnerPatternDefault = []string{"[⠋] ", "[⠙] ", "[⠹] ", "[⠸] ", "[⠼] ", "[⠴] ", "[⠦] ", "[⠧] ", "[⠇] ", "[⠏] "}
--- Presets ---------------------------------------------
View Source
var SpinnerPatternDots = []string{"⣾ ", "⣽ ", "⣻ ", "⢿ ", "⡿ ", "⣟ ", "⣯ ", "⣷ "}
View Source
var SpinnerPatternDotsMini = []string{"⠋ ", "⠙ ", "⠹ ", "⠸ ", "⠼ ", "⠴ ", "⠦ ", "⠧ ", "⠇ ", "⠏ "}
View Source
var SpinnerPatternLine = []string{"- ", "\\ ", "| ", "/ "}
View Source
var SpinnerPatternMoons = []string{"🌑 ", "🌒 ", "🌓 ", "🌔 ", "🌕 ", "🌖 ", "🌗 ", "🌘 "}
View Source
var SpinnerPatternPipes = []string{"╾ ", "│ ", "╸ ", "┤ ", "├ ", "└ ", "┴ ", "┬ ", "┐ ", "┘ "}
View Source
var SpinnerPatternSquares = []string{"▖ ", "▌ ", "▘ ", "▀ ", "▝ ", "▐ ", "▗ ", "▄ "}
Functions ¶
func NewMultiSelect ¶
func NewMultiSelect() *multiSelect
--- Initiation ------------------------------------------
func NewProgress ¶
func NewProgress() *progress
--- Initiation ------------------------------------------
func NewSecureInput ¶
func NewSecureInput() *secureInput
--- Initiation ------------------------------------------
func NewSingleSelect ¶
func NewSingleSelect() *singleSelect
--- Initiation ------------------------------------------
func NewSpinner ¶
func NewSpinner() *spinner
--- Initiation ------------------------------------------
func NewTextInput ¶
func NewTextInput() *textInput
--- Initiation ------------------------------------------
Types ¶
type ProgressPattern ¶
--- Definition -------------------------------------------
type StyleMap ¶
type StyleMap struct {
// Status Messages
StatusSuccessPrefix *termicolr.Style
StatusSuccessLabel *termicolr.Style
StatusDebugPrefix *termicolr.Style
StatusDebugLabel *termicolr.Style
StatusInfoPrefix *termicolr.Style
StatusInfoLabel *termicolr.Style
StatusWarnPrefix *termicolr.Style
StatusWarnLabel *termicolr.Style
StatusErrorPrefix *termicolr.Style
StatusErrorLabel *termicolr.Style
// Banners
BannerLabel *termicolr.Style
BannerLabelPadChar *termicolr.Style
BannerSubLabel *termicolr.Style
BannerSubLabelPadChar *termicolr.Style
// Input Prompts
InputDesc *termicolr.Style
InputPrefix *termicolr.Style
InputLabel *termicolr.Style
InputPlaceholder *termicolr.Style
InputText *termicolr.Style
InputValidationPass *termicolr.Style
InputValidationFail *termicolr.Style
InputHelp *termicolr.Style
// Confirmation Prompts
ConfirmationPrefix *termicolr.Style
ConfirmationLabel *termicolr.Style
ConfirmationDesc *termicolr.Style
ConfirmationHelp *termicolr.Style
ConfirmationSelectedItem *termicolr.Style
ConfirmationUnselectedItem *termicolr.Style
// Selection Prompts
SelectionPrefix *termicolr.Style
SelectionLabel *termicolr.Style
SelectionDesc *termicolr.Style
SelectionHelp *termicolr.Style
SelectionSearchLabel *termicolr.Style
SelectionSearchHint *termicolr.Style
SelectionValidationPass *termicolr.Style
SelectionValidationFail *termicolr.Style
SelectionListItemHeader *termicolr.Style
SelectionListItemLabel *termicolr.Style
SelectionCurrentItemMarker *termicolr.Style
SelectionCurrentItemLabel *termicolr.Style
SelectionSelectedItemMarker *termicolr.Style
SelectionSelectedItemLabel *termicolr.Style
SelectionDisabledItemMarker *termicolr.Style
SelectionDisabledItemLabel *termicolr.Style
// Spinners
SpinnerPrefix *termicolr.Style
SpinnerLabel *termicolr.Style
SpinnerDesc *termicolr.Style
// Progress Bars
ProgressPrefix *termicolr.Style
ProgressLabel *termicolr.Style
ProgressDesc *termicolr.Style
ProgressBarPad *termicolr.Style
ProgressBarDone *termicolr.Style
ProgressBarPending *termicolr.Style
ProgressBarStatus *termicolr.Style
// contains filtered or unexported fields
}
Styling for Asky TUI components (uses termicolr styles).
func StyleMapDefault ¶
DefaultScheme creates a preconfigured scheme based on the given theme.
Click to show internal directories.
Click to hide internal directories.