pota/use/formpota/use/form covers form ergonomics: bare ref functions for common
input behaviors, plus imperative helpers for reading and writing form
state (form2object, object2form, isDisabled, isEditable) and a
focusNextInput stepper.
clickFocusChildrenInput —
ref: clicking the element focuses its first focusable descendantenterFocusNext — ref: Enter advances
focus to the next form elementpreventEnter — ref: block Enter from
newline / submitsizeToInput — ref: grow / shrink a
textarea to fit its contentisDisabled(node) — is the element
:disabled (incl. ancestor <fieldset disabled>)?isEditable(node) — is the user typing into
this element?focusNextInput(node, event) — the
stepper behind enterFocusNextform2object(form, object?, submitter?) —
collect a form into a plain object (optionally merging into an
existing one)object2form(form, values) — write values
back into a form