Documentation
¶
Index ¶
Constants ¶
const ( PartLabel = Part("label") PartInput = Part("input") PartError = Part("error") PartRadioGroup = Part("radio-group") )
Parts of the field. The names are generic by design: Part is local to its widget and only becomes a class through a Name, so "label" here produces "tw-field__label" and never collides with the "label" of another widget.
const NameField = Name("tw-field")
NameField is the shared anatomy of the form field.
It is emitted by github.com/tinywasm/form (which builds the markup) and styled by github.com/tinywasm/components/fieldset (which is the global skin of the forms). It lives here because it crosses the boundary between these two libraries, and neither can own it without the other depending on it.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Class ¶
type Class string
Class es un nombre de clase CSS. NO tiene constructor público: la única forma de obtener una es derivarla de un Name. Escribir Class("lo-que-sea") no compila fuera de este paquete.
type Cue ¶
type Cue uint8
Cue es un estado que posee el NAVEGADOR. Solo se estiliza; no se puede escribir desde Go — por eso es un tipo distinto y no tiene Attr().
type Dismissible ¶
type Dismissible interface{ Dismiss() }
type Expandable ¶
type Expandable interface{ Expand(open bool) }
type Kind ¶
type Kind uint8
Kind es el tipo de widget según WAI-ARIA Authoring Practices. Determina el rol, los estados válidos y el teclado esperado. Cerrado a propósito: si un widget no encaja en ninguno, casi siempre es que son dos widgets.
type Name ¶
type Name string
Name identifica un widget. Es el prefijo de TODA clase que emite, así que dos widgets no pueden colisionar aunque elijan el mismo nombre de parte.
type Part ¶
type Part string
Part es una ranura nombrada de la anatomía de un widget (vocabulario Open UI). Es local al widget: "row", "menu", "header". Nunca lleva prefijo.
type Selectable ¶
type Selectable interface{ Select(id string) }
Capacidades — cada costura asevera solo la que necesita (patrón de la casa, el mismo de view.Saver / view.Deleter).