),
key: "flags",
label: "Flags",
},
]
/**
* A disabled tab is out of the *focus* group and still one of the
* *options* — it owns a panel and an id either way. Registration is
* membership, so the arrow keys skip it with nothing in
* `RovingFocus` knowing the word "disabled".
*/
export const AllStates: Story = {
args: { label: "Bay 3", tabs: STATE_TABS },
}
/**
* A tab bar **scrolls**, it does not wrap. A wrapped tablist puts
* tabs on two rows, which breaks both the visual row and the
* mental model the arrow keys give — "right" stops meaning right.
*
* `ContainerBoard` is used here as a width harness rather than as
* a container-query claim: `Tabs` declares no container, because
* nothing about it needs to *know* its width. It just has to
* survive being narrow.
*/
export const Responsive: Story = {
args: { label: "Bay 3", tabs: STATE_TABS },
render: () => (
{(width) => (
)}
),
}
/**
* The falsification point, and the reason `Tabs` is P0.
*
* In `manual`, an arrow key moves focus to a tab that is *not*
* chosen — a state a three-kind model cannot represent at all,
* because it had one notion of "the current one" doing both jobs.
* Arrow through this one and watch the underline stay put until
* Enter.
*/
export const Manual: Story = {
args: {
activation: "manual",
label: "Bay 3 manual",
tabs: BAY_TABS,
},
}
const BAY_ROUTE_TABS: TabLinkItem[] = [
{
href: "/bays/3",
label: "Overview",
},
{
href: "/bays/3/titles",
label: "Titles",
},
{
href: "/bays/3/tracks",
label: "Tracks",
},
{
href: "/bays/3/log",
label: "Log",
},
]
/**
* A tab that is a **place**. Every trigger is a real ``, so
* middle-click, ctrl-click, "open in a new tab" and "copy link
* address" all work — and reloading the page comes back to the same
* section, which is the whole reason to route one.
*
* The bar is a named `