ickui

package
v0.2.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ICKButton

type ICKButton struct {
	ick.ICKButton
	dom.UI

	OnClick func() // optional OnClick function called by the default button listeners
}

func Button

func Button(title string, attrs ...string) *ICKButton

func (*ICKButton) AddListeners

func (btn *ICKButton) AddListeners()

func (*ICKButton) SetColor

func (btn *ICKButton) SetColor(c ick.COLOR) *ICKButton

func (*ICKButton) SetDisabled

func (btn *ICKButton) SetDisabled(disabled bool) *ICKButton

func (*ICKButton) SetIcon

func (btn *ICKButton) SetIcon(icon ick.ICKIcon, closing bool) *ICKButton

func (*ICKButton) SetId

func (cmp *ICKButton) SetId(id string) *ICKButton

func (*ICKButton) SetLight

func (btn *ICKButton) SetLight(f bool) *ICKButton

func (*ICKButton) SetLoading

func (btn *ICKButton) SetLoading(f bool) *ICKButton

func (*ICKButton) SetOutlined

func (btn *ICKButton) SetOutlined(f bool) *ICKButton

func (*ICKButton) SetRounded

func (btn *ICKButton) SetRounded(f bool) *ICKButton

func (*ICKButton) SetSize

func (btn *ICKButton) SetSize(sz ick.SIZE) *ICKButton

func (*ICKButton) SetTitle

func (btn *ICKButton) SetTitle(title string) *ICKButton

type ICKCard

type ICKCard struct {
	ick.ICKCard
	dom.UI
}

func Card

func Card(content ickcore.ContentComposer, attrs ...string) *ICKCard

Card main factory

type ICKDelete

type ICKDelete struct {
	ick.ICKDelete
	dom.UI

	// The TargetID will be automatically removed after the clock Timeout duration if not zero.
	// The timer starts when the delete button is rendered (call to addlisteners).
	clock.Clock

	// OnDelete, if it is set, it's called when the deletion occurs and after the targetId has been removed.
	OnDelete func(*ICKDelete)
}

func Delete

func Delete(id string, targetid string) *ICKDelete

func (*ICKDelete) AddListeners

func (del *ICKDelete) AddListeners()

func (*ICKDelete) RemoveListeners

func (del *ICKDelete) RemoveListeners()

func (*ICKDelete) RemoveTarget

func (del *ICKDelete) RemoveTarget()

RemoveTarget stops the timer and the ticker and removes the TargetID from the DOM

func (*ICKDelete) SetSize

func (del *ICKDelete) SetSize(sz ick.SIZE) *ICKDelete

func (*ICKDelete) Wrap

func (del *ICKDelete) Wrap(jsvp js.JSValueProvider)

Wrap implements the JSValueWrapper to enable wrapping of a dom.Element usually to wrap embedded component instantiated during unfolding an html string. Does not need to be overloaded by the component embedding UISnippet.

type ICKInputField

type ICKInputField struct {
	ick.ICKInputField
	dom.UI

	OnChange func(me *ICKInputField, newvalue string)
	// contains filtered or unexported fields
}

func InputField

func InputField(id string, value string, placeholder string, attrs ...string) *ICKInputField

func (*ICKInputField) AddListeners

func (in *ICKInputField) AddListeners()

func (*ICKInputField) OnChangeEvent

func (in *ICKInputField) OnChangeEvent(*event.InputEvent, *dom.Element)

func (*ICKInputField) RefreshHelp

func (in *ICKInputField) RefreshHelp(help string)

func (*ICKInputField) RefreshLabel

func (in *ICKInputField) RefreshLabel()

func (*ICKInputField) RemoveListeners

func (in *ICKInputField) RemoveListeners()

func (*ICKInputField) SetCanToggleVisibility

func (in *ICKInputField) SetCanToggleVisibility(can bool) *ICKInputField

func (*ICKInputField) SetDisabled

func (in *ICKInputField) SetDisabled(f bool) *ICKInputField

func (*ICKInputField) SetHelp

func (in *ICKInputField) SetHelp(help string) *ICKInputField

func (*ICKInputField) SetHidden

func (in *ICKInputField) SetHidden(h bool) *ICKInputField

func (*ICKInputField) SetIcon

func (in *ICKInputField) SetIcon(icon ick.ICKIcon, closing bool) *ICKInputField

func (*ICKInputField) SetLabel

func (in *ICKInputField) SetLabel(lbl string) *ICKInputField

func (*ICKInputField) SetReadOnly

func (in *ICKInputField) SetReadOnly(ro bool) *ICKInputField

func (*ICKInputField) SetState

func (in *ICKInputField) SetState(st ick.INPUT_STATE) *ICKInputField

func (*ICKInputField) ToggleVisibility

func (in *ICKInputField) ToggleVisibility()

type ICKMessage

type ICKMessage struct {
	ick.ICKMessage
	dom.UI

	BtnDelete ICKDelete // The delete button snippet created only if candelete is true
}

func Message

func Message(cnt ickcore.ContentComposer) *ICKMessage

Message factory

func (*ICKMessage) AddListeners

func (msg *ICKMessage) AddListeners()

AddListeners adds the listener to the embedded delete button, if any.

func (*ICKMessage) RemoveListeners

func (msg *ICKMessage) RemoveListeners()

RemoveListeners remove delete button listeners

func (*ICKMessage) SetColor

func (msg *ICKMessage) SetColor(c ick.COLOR) *ICKMessage

SetColor set a message color. Immediate effect to the DOM.

func (*ICKMessage) SetSize

func (msg *ICKMessage) SetSize(s ick.SIZE) *ICKMessage

SetSize set the size of the message. Immediate effect to the DOM.

type ICKNavbar

type ICKNavbar struct {
	ick.ICKNavbar
	dom.UI
}

ICKNavbar is an UISnippet registered with the ick-tag `ick-navbar`.

func NavBar() *ICKNavbar

func (*ICKNavbar) AddListeners

func (nav *ICKNavbar) AddListeners()

func (*ICKNavbar) RemoveListeners

func (nav *ICKNavbar) RemoveListeners()

func (*ICKNavbar) Toggle

func (nav *ICKNavbar) Toggle()

type ICKTagLabel

type ICKTagLabel struct {
	ick.ICKTagLabel
	dom.UI

	BtnDelete ICKDelete // The delete button snippet created only if candelete is true
}

func TagLabel

func TagLabel(text string, c ick.COLOR, attrs ...string) *ICKTagLabel

TagLabel factory

func (*ICKTagLabel) AddListeners

func (t *ICKTagLabel) AddListeners()

AddListeners adds the listener to the embedded delete button, if any.

func (*ICKTagLabel) RemoveListeners

func (t *ICKTagLabel) RemoveListeners()

RemoveListeners remove delete button listeners

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL