Documentation
¶
Overview ¶
templ: version: v0.3.960
Index ¶
- func Dialog(args DialogArgs) templ.Component
- func DialogClose(args DialogCloseArgs) templ.Component
- func DialogCloseVariants(args DialogCloseArgs) string
- func DialogContent(args DialogContentArgs) templ.Component
- func DialogContentVariants(args DialogContentArgs) string
- func DialogDescription(args DialogDescriptionArgs) templ.Component
- func DialogDescriptionVariants(args DialogDescriptionArgs) string
- func DialogFooter(args DialogFooterArgs) templ.Component
- func DialogFooterVariants(args DialogFooterArgs) string
- func DialogHeader(args DialogHeaderArgs) templ.Component
- func DialogHeaderVariants(args DialogHeaderArgs) string
- func DialogOverlay(args DialogOverlayArgs) templ.Component
- func DialogOverlayVariants(args DialogOverlayArgs) string
- func DialogTitle(args DialogTitleArgs) templ.Component
- func DialogTitleVariants(args DialogTitleArgs) string
- func DialogTrigger(args DialogTriggerArgs) templ.Component
- func DialogVariants(args DialogArgs) string
- type DialogArgs
- type DialogCloseArgs
- type DialogContentArgs
- type DialogDescriptionArgs
- type DialogFooterArgs
- type DialogHandler
- type DialogHeaderArgs
- type DialogOverlayArgs
- type DialogSignals
- type DialogTitleArgs
- type DialogTriggerArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dialog ¶
func Dialog(args DialogArgs) templ.Component
Dialog container - pure Datastar signal-based modal using data-show
func DialogClose ¶
func DialogClose(args DialogCloseArgs) templ.Component
DialogClose - button that closes the dialog using Datastar signals
func DialogCloseVariants ¶
func DialogCloseVariants(args DialogCloseArgs) string
DialogCloseVariants returns the CSS classes for the DialogClose component
func DialogContent ¶
func DialogContent(args DialogContentArgs) templ.Component
DialogContent - content section of the dialog
func DialogContentVariants ¶
func DialogContentVariants(args DialogContentArgs) string
DialogContentVariants returns the CSS classes for the DialogContent component
func DialogDescription ¶
func DialogDescription(args DialogDescriptionArgs) templ.Component
DialogDescription - description element in the dialog header
func DialogDescriptionVariants ¶
func DialogDescriptionVariants(args DialogDescriptionArgs) string
DialogDescriptionVariants returns the CSS classes for the DialogDescription component
func DialogFooter ¶
func DialogFooter(args DialogFooterArgs) templ.Component
DialogFooter - footer section of the dialog
func DialogFooterVariants ¶
func DialogFooterVariants(args DialogFooterArgs) string
DialogFooterVariants returns the CSS classes for the DialogFooter component
func DialogHeader ¶
func DialogHeader(args DialogHeaderArgs) templ.Component
DialogHeader - header section of the dialog
func DialogHeaderVariants ¶
func DialogHeaderVariants(args DialogHeaderArgs) string
DialogHeaderVariants returns the CSS classes for the DialogHeader component
func DialogOverlay ¶
func DialogOverlay(args DialogOverlayArgs) templ.Component
DialogOverlay - backdrop overlay (for styling compatibility)
func DialogOverlayVariants ¶
func DialogOverlayVariants(args DialogOverlayArgs) string
DialogOverlayVariants returns the CSS classes for the DialogOverlay component
func DialogTitle ¶
func DialogTitle(args DialogTitleArgs) templ.Component
DialogTitle - title element in the dialog header
func DialogTitleVariants ¶
func DialogTitleVariants(args DialogTitleArgs) string
DialogTitleVariants returns the CSS classes for the DialogTitle component
func DialogTrigger ¶
func DialogTrigger(args DialogTriggerArgs) templ.Component
DialogTrigger - button or element that opens the dialog using Datastar signals
func DialogVariants ¶
func DialogVariants(args DialogArgs) string
DialogVariants returns the CSS classes for the main Dialog container component
Types ¶
type DialogArgs ¶
type DialogArgs struct {
ID string
DefaultOpen bool // Whether the dialog should be open by default
Class string
Attributes templ.Attributes
}
DialogArgs defines the args for the Dialog container (using Datastar signals)
type DialogCloseArgs ¶
type DialogCloseArgs struct {
DialogID string
ReturnValue string // Optional return value when closing the dialog
Variant string // Button variant: "default", "destructive", "outline", "secondary", "ghost", "link"
Class string
Attributes templ.Attributes
}
DialogCloseArgs defines the args for the DialogClose component
type DialogContentArgs ¶
type DialogContentArgs struct {
Class string
Attributes templ.Attributes
}
DialogContentArgs defines the args for the DialogContent component (for backwards compatibility)
type DialogDescriptionArgs ¶
type DialogDescriptionArgs struct {
Class string
Attributes templ.Attributes
}
DialogDescriptionArgs defines the args for the DialogDescription component
type DialogFooterArgs ¶
type DialogFooterArgs struct {
}
DialogFooterArgs defines the args for the DialogFooter component
type DialogHandler ¶
type DialogHandler struct {
// contains filtered or unexported fields
}
DialogHandler creates handlers for Dialog component functionality
func NewDialogHandler ¶
func NewDialogHandler(signals *utils.SignalManager) *DialogHandler
NewDialogHandler creates a dialog handler
func (*DialogHandler) BuildBackdropClickHandler ¶
func (d *DialogHandler) BuildBackdropClickHandler() string
BuildBackdropClickHandler creates the backdrop click handler for closing dialog
func (*DialogHandler) BuildCloseHandler ¶
func (d *DialogHandler) BuildCloseHandler(returnValue string) string
BuildCloseHandler creates a close handler with optional return value
func (*DialogHandler) BuildEscapeHandler ¶
func (d *DialogHandler) BuildEscapeHandler() string
BuildEscapeHandler creates an escape key handler for closing dialog
type DialogHeaderArgs ¶
type DialogHeaderArgs struct {
Class string
Attributes templ.Attributes
}
DialogHeaderArgs defines the args for the DialogHeader component
type DialogOverlayArgs ¶
type DialogOverlayArgs struct {
ID string
Class string
Attributes templ.Attributes
}
DialogOverlayArgs defines the args for the DialogOverlay component
type DialogSignals ¶
type DialogSignals struct {
Open bool `json:"open"`
}
DialogSignals defines the signal structure for dialog components
type DialogTitleArgs ¶
type DialogTitleArgs struct {
Class string
Attributes templ.Attributes
}
DialogTitleArgs defines the args for the DialogTitle component
type DialogTriggerArgs ¶
type DialogTriggerArgs struct {
DialogID string
AsChild bool
Class string
Attributes templ.Attributes
}
DialogTriggerArgs defines the args for the DialogTrigger component