What closing value leaves, as the APG asks: the tabs without it, the
tab chosen after (the one after it, or before it at the end, when it was
the chosen one; none once no tab is left), and the index to focus, the
tab that followed it. Focus it with @foldkit/ui's FocusTab: the
focused tab was taken from the page. A value not among tabs changes
nothing and focuses none.
The mixins:key-conflict that resolving the tabs with routes would throw,
or none: the application's routes against Delete, which a closable tab
takes (close is the one the tabs are given), and against each other.
What moves the indicator and highlight: on the tablist, the chosen tab
is measured (--fk-tabs-chosen-x, -y, -w, -h, -display) and one
highlight follows the pointer to the nearest tab (--fk-tabs-hover-*),
growing out of the chosen tab and returning to it. Pass them beside the
style; until they run (before a page hydrates, or without them), each tab
marks itself and the drawn indicator and highlight show nothing.
Arrow keys read by the direction the tablist is drawn in: right to left,
ArrowLeft goes to the next tab, as the APG asks. Upstream's keys know no
direction, and its bundles no view option reaches, so this is a Mount
(ReadingKeys) that reads the key before upstream's handler does. Pass it
beside the style where the page may be right to left. It is not built in
because a Scene test must resolve every Mount with a Message, and this one
has none to give.
Closable tabs, as the APG's tabs with deletion: Delete on a tab sends
onClose, and so does a press on its close button. The button is no tab
stop and hidden from assistive technology, since a tablist holds tabs
alone; the tab names the key in aria-keyshortcuts. Answer onClose
with closing.
Tabs is a nested Submodel: one tablist group plus a tab/panel pair per
item, so the resolver runs once per group and each base ChildAttribute
bundle passes through by identity.
Enabled tabs own click through the base OnClick; a Behavior adding its
own click handler is a conflict rather than a second silent owner. Disabled
tabs publish no click, so the contract still lists it as allowed.
indicator and highlight have no upstream bundle: they are this
package's, drawn first in the tablist, for the marker under the chosen tab
and the hover that follows the pointer, which fluid moves. So are the
rest: item holds a tab and its close button side by side (a button in
a button is not allowed), and label and icon are the tab's words,
trimmed in a box of their own, and a mark before them.
Tabs in one call: the tablist with each row's mark, words and trailing,
and the chosen row's panel below it. The tabs' focus is the Model's
(Bundles.Tabs), the chosen value the application's.