Documentation
¶
Overview ¶
Package components provides reusable TUI components.
Package components provides reusable TUI components.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConfirmModal ¶
type ConfirmModal struct {
// contains filtered or unexported fields
}
ConfirmModal is a simple yes/no confirmation dialog.
func NewConfirmModal ¶
func NewConfirmModal(message string) ConfirmModal
NewConfirmModal creates a new confirmation modal.
func (ConfirmModal) Cancelled ¶
func (m ConfirmModal) Cancelled() bool
Cancelled returns true if user cancelled.
func (ConfirmModal) Confirmed ¶
func (m ConfirmModal) Confirmed() bool
Confirmed returns true if user confirmed.
func (ConfirmModal) Update ¶
func (m ConfirmModal) Update(msg tea.Msg) (ConfirmModal, tea.Cmd)
Update handles input for the confirmation modal.
type HelpDialog ¶
type HelpDialog struct {
// contains filtered or unexported fields
}
HelpDialog displays all available keyboard shortcuts.
func NewHelpDialog ¶
func NewHelpDialog(title string, sections []HelpDialogSection, width, height int) *HelpDialog
NewHelpDialog creates a new help dialog with the given sections.
type HelpDialogSection ¶
HelpDialogSection groups related help entries under a title.
type InfoDialog ¶ added in v0.32.0
type InfoDialog struct {
// contains filtered or unexported fields
}
InfoDialog displays structured, optionally status-annotated information.
func NewInfoDialog ¶ added in v0.32.0
func NewInfoDialog(title string, sections []InfoSection, footer, helpText string, width, height int) *InfoDialog
NewInfoDialog creates a new info dialog.
func (*InfoDialog) Overlay ¶ added in v0.32.0
func (d *InfoDialog) Overlay(background string, width, height int) string
Overlay renders the dialog centered over the provided background.
func (*InfoDialog) ScrollDown ¶ added in v0.32.0
func (d *InfoDialog) ScrollDown()
ScrollDown scrolls the viewport down.
func (*InfoDialog) ScrollUp ¶ added in v0.32.0
func (d *InfoDialog) ScrollUp()
ScrollUp scrolls the viewport up.
type InfoItem ¶ added in v0.32.0
type InfoItem struct {
Label string
Value string
Status InfoStatus
}
InfoItem is a single labeled row in an info section.
type InfoSection ¶ added in v0.32.0
InfoSection groups related info items under a section title.
type InfoStatus ¶ added in v0.32.0
type InfoStatus int
InfoStatus represents the status of an info item.
const ( InfoStatusNone InfoStatus = iota InfoStatusPass InfoStatusWarn InfoStatusFail )