@tanrei/mcp 0.0.0-stage → 0.1.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/NOTICE +57 -0
- package/README.md +150 -2
- package/bin/tanrei-mcp.js +15 -0
- package/dist/server.js +4515 -0
- package/dist/vocabulary/docs/governance/mimicry-gaps.json +666 -0
- package/dist/vocabulary/packages/tokens-build/generated/component-catalog.json +1825 -0
- package/dist/vocabulary/specs/accordion.spec.json +1 -0
- package/dist/vocabulary/specs/app-bar.spec.json +1 -0
- package/dist/vocabulary/specs/app-shell.spec.json +1 -0
- package/dist/vocabulary/specs/avatar.spec.json +1 -0
- package/dist/vocabulary/specs/badge.spec.json +1 -0
- package/dist/vocabulary/specs/bottom-sheet.spec.json +1 -0
- package/dist/vocabulary/specs/breadcrumbs.spec.json +1 -0
- package/dist/vocabulary/specs/button-group.spec.json +1 -0
- package/dist/vocabulary/specs/button-with-menu.spec.json +1 -0
- package/dist/vocabulary/specs/button.spec.json +1 -0
- package/dist/vocabulary/specs/calendar.spec.json +1 -0
- package/dist/vocabulary/specs/callout.spec.json +1 -0
- package/dist/vocabulary/specs/card.spec.json +1 -0
- package/dist/vocabulary/specs/carousel.spec.json +1 -0
- package/dist/vocabulary/specs/chat-composer.spec.json +1 -0
- package/dist/vocabulary/specs/checkbox-group.spec.json +1 -0
- package/dist/vocabulary/specs/checkbox.spec.json +1 -0
- package/dist/vocabulary/specs/chip-field.spec.json +1 -0
- package/dist/vocabulary/specs/chip.spec.json +1 -0
- package/dist/vocabulary/specs/code-block.spec.json +1 -0
- package/dist/vocabulary/specs/color-field.spec.json +1 -0
- package/dist/vocabulary/specs/color-input.spec.json +1 -0
- package/dist/vocabulary/specs/combobox-field.spec.json +1 -0
- package/dist/vocabulary/specs/combobox.spec.json +1 -0
- package/dist/vocabulary/specs/component.schema.json +1 -0
- package/dist/vocabulary/specs/copy-button.spec.json +1 -0
- package/dist/vocabulary/specs/date-time-picker.spec.json +1 -0
- package/dist/vocabulary/specs/description-list.spec.json +1 -0
- package/dist/vocabulary/specs/dialog.spec.json +1 -0
- package/dist/vocabulary/specs/divider.spec.json +1 -0
- package/dist/vocabulary/specs/drop-zone.spec.json +1 -0
- package/dist/vocabulary/specs/embedded-text-input.spec.json +1 -0
- package/dist/vocabulary/specs/empty-state.spec.json +1 -0
- package/dist/vocabulary/specs/fab-menu.spec.json +1 -0
- package/dist/vocabulary/specs/field-group.spec.json +1 -0
- package/dist/vocabulary/specs/field.spec.json +1 -0
- package/dist/vocabulary/specs/figure.spec.json +1 -0
- package/dist/vocabulary/specs/file-item.spec.json +1 -0
- package/dist/vocabulary/specs/file-picker.spec.json +1 -0
- package/dist/vocabulary/specs/file-upload.spec.json +1 -0
- package/dist/vocabulary/specs/handle.spec.json +1 -0
- package/dist/vocabulary/specs/image-preview.spec.json +1 -0
- package/dist/vocabulary/specs/inline-code.spec.json +1 -0
- package/dist/vocabulary/specs/inventory.json +1 -0
- package/dist/vocabulary/specs/keyboard-shortcut.spec.json +1 -0
- package/dist/vocabulary/specs/link-card.spec.json +1 -0
- package/dist/vocabulary/specs/link.spec.json +1 -0
- package/dist/vocabulary/specs/list-row.spec.json +1 -0
- package/dist/vocabulary/specs/list.spec.json +1 -0
- package/dist/vocabulary/specs/loading-indicator.spec.json +1 -0
- package/dist/vocabulary/specs/main-action-button.spec.json +1 -0
- package/dist/vocabulary/specs/marquee-text.spec.json +1 -0
- package/dist/vocabulary/specs/menu.spec.json +1 -0
- package/dist/vocabulary/specs/menubar.spec.json +1 -0
- package/dist/vocabulary/specs/meter.spec.json +1 -0
- package/dist/vocabulary/specs/modal-layer.spec.json +1 -0
- package/dist/vocabulary/specs/navigation-bar.spec.json +1 -0
- package/dist/vocabulary/specs/navigation-drawer.spec.json +1 -0
- package/dist/vocabulary/specs/number-field.spec.json +1 -0
- package/dist/vocabulary/specs/number-input.spec.json +1 -0
- package/dist/vocabulary/specs/number-ticker.spec.json +1 -0
- package/dist/vocabulary/specs/one-time-code-field.spec.json +1 -0
- package/dist/vocabulary/specs/one-time-code-input.spec.json +1 -0
- package/dist/vocabulary/specs/page-header.spec.json +1 -0
- package/dist/vocabulary/specs/pagination.spec.json +1 -0
- package/dist/vocabulary/specs/popover.spec.json +1 -0
- package/dist/vocabulary/specs/previous-next-links.spec.json +1 -0
- package/dist/vocabulary/specs/progress-indicator.spec.json +1 -0
- package/dist/vocabulary/specs/prose.spec.json +1 -0
- package/dist/vocabulary/specs/radio-button.spec.json +1 -0
- package/dist/vocabulary/specs/radio-group.spec.json +1 -0
- package/dist/vocabulary/specs/rating.spec.json +1 -0
- package/dist/vocabulary/specs/resizable-frame.spec.json +1 -0
- package/dist/vocabulary/specs/scroll-area.spec.json +1 -0
- package/dist/vocabulary/specs/search.spec.json +1 -0
- package/dist/vocabulary/specs/segmented-button.spec.json +1 -0
- package/dist/vocabulary/specs/select-field.spec.json +1 -0
- package/dist/vocabulary/specs/select.spec.json +1 -0
- package/dist/vocabulary/specs/side-sheet.spec.json +1 -0
- package/dist/vocabulary/specs/size-transition.spec.json +1 -0
- package/dist/vocabulary/specs/skeleton.spec.json +1 -0
- package/dist/vocabulary/specs/slider-field.spec.json +1 -0
- package/dist/vocabulary/specs/slider.spec.json +1 -0
- package/dist/vocabulary/specs/snackbar.spec.json +1 -0
- package/dist/vocabulary/specs/split-view.spec.json +1 -0
- package/dist/vocabulary/specs/stepper.spec.json +1 -0
- package/dist/vocabulary/specs/steps.spec.json +1 -0
- package/dist/vocabulary/specs/swatch.spec.json +1 -0
- package/dist/vocabulary/specs/switch.spec.json +1 -0
- package/dist/vocabulary/specs/tab-view.spec.json +1 -0
- package/dist/vocabulary/specs/table-of-contents.spec.json +1 -0
- package/dist/vocabulary/specs/table.spec.json +1 -0
- package/dist/vocabulary/specs/tabs.spec.json +1 -0
- package/dist/vocabulary/specs/tag-group.spec.json +1 -0
- package/dist/vocabulary/specs/tag.spec.json +1 -0
- package/dist/vocabulary/specs/text-field.spec.json +1 -0
- package/dist/vocabulary/specs/text-input.spec.json +1 -0
- package/dist/vocabulary/specs/timeline.spec.json +1 -0
- package/dist/vocabulary/specs/toolbar.spec.json +1 -0
- package/dist/vocabulary/specs/tooltip.spec.json +1 -0
- package/dist/vocabulary/specs/tree-view.spec.json +1 -0
- package/dist/vocabulary/tanrei.config.json +24 -0
- package/dist/vocabulary/tokens/comp/accordion.tokens.json +459 -0
- package/dist/vocabulary/tokens/comp/app-bar.tokens.json +308 -0
- package/dist/vocabulary/tokens/comp/app-shell.tokens.json +248 -0
- package/dist/vocabulary/tokens/comp/avatar.tokens.json +199 -0
- package/dist/vocabulary/tokens/comp/badge.tokens.json +101 -0
- package/dist/vocabulary/tokens/comp/bottom-sheet.tokens.json +326 -0
- package/dist/vocabulary/tokens/comp/breadcrumbs.tokens.json +253 -0
- package/dist/vocabulary/tokens/comp/button-group.tokens.json +140 -0
- package/dist/vocabulary/tokens/comp/button-with-menu.tokens.json +810 -0
- package/dist/vocabulary/tokens/comp/button.tokens.json +1355 -0
- package/dist/vocabulary/tokens/comp/calendar.tokens.json +500 -0
- package/dist/vocabulary/tokens/comp/callout.tokens.json +510 -0
- package/dist/vocabulary/tokens/comp/card.tokens.json +204 -0
- package/dist/vocabulary/tokens/comp/carousel.tokens.json +469 -0
- package/dist/vocabulary/tokens/comp/chat-composer.tokens.json +343 -0
- package/dist/vocabulary/tokens/comp/checkbox.tokens.json +587 -0
- package/dist/vocabulary/tokens/comp/chip.tokens.json +716 -0
- package/dist/vocabulary/tokens/comp/code-block.tokens.json +473 -0
- package/dist/vocabulary/tokens/comp/color-input.tokens.json +49 -0
- package/dist/vocabulary/tokens/comp/combobox.tokens.json +756 -0
- package/dist/vocabulary/tokens/comp/copy-button.tokens.json +56 -0
- package/dist/vocabulary/tokens/comp/date-time-picker.tokens.json +797 -0
- package/dist/vocabulary/tokens/comp/description-list.tokens.json +203 -0
- package/dist/vocabulary/tokens/comp/dialog.tokens.json +340 -0
- package/dist/vocabulary/tokens/comp/divider.tokens.json +139 -0
- package/dist/vocabulary/tokens/comp/drop-zone.tokens.json +151 -0
- package/dist/vocabulary/tokens/comp/embedded-text-input.tokens.json +103 -0
- package/dist/vocabulary/tokens/comp/empty-state.tokens.json +154 -0
- package/dist/vocabulary/tokens/comp/field-group.tokens.json +211 -0
- package/dist/vocabulary/tokens/comp/field.tokens.json +308 -0
- package/dist/vocabulary/tokens/comp/figure.tokens.json +269 -0
- package/dist/vocabulary/tokens/comp/file-item.tokens.json +445 -0
- package/dist/vocabulary/tokens/comp/file-picker.tokens.json +282 -0
- package/dist/vocabulary/tokens/comp/file-upload.tokens.json +30 -0
- package/dist/vocabulary/tokens/comp/handle.tokens.json +343 -0
- package/dist/vocabulary/tokens/comp/image-preview.tokens.json +327 -0
- package/dist/vocabulary/tokens/comp/inline-code.tokens.json +86 -0
- package/dist/vocabulary/tokens/comp/input-box.tokens.json +1073 -0
- package/dist/vocabulary/tokens/comp/keyboard-shortcut.tokens.json +194 -0
- package/dist/vocabulary/tokens/comp/link-card.tokens.json +321 -0
- package/dist/vocabulary/tokens/comp/link.tokens.json +321 -0
- package/dist/vocabulary/tokens/comp/list-row.tokens.json +249 -0
- package/dist/vocabulary/tokens/comp/list.tokens.json +328 -0
- package/dist/vocabulary/tokens/comp/loading-indicator.tokens.json +218 -0
- package/dist/vocabulary/tokens/comp/main-action-button.tokens.json +418 -0
- package/dist/vocabulary/tokens/comp/marquee-text.tokens.json +110 -0
- package/dist/vocabulary/tokens/comp/menu.tokens.json +1124 -0
- package/dist/vocabulary/tokens/comp/menubar.tokens.json +279 -0
- package/dist/vocabulary/tokens/comp/meter.tokens.json +173 -0
- package/dist/vocabulary/tokens/comp/modal-layer.tokens.json +69 -0
- package/dist/vocabulary/tokens/comp/navigation-bar.tokens.json +448 -0
- package/dist/vocabulary/tokens/comp/navigation-drawer.tokens.json +1126 -0
- package/dist/vocabulary/tokens/comp/number-input.tokens.json +75 -0
- package/dist/vocabulary/tokens/comp/number-ticker.tokens.json +77 -0
- package/dist/vocabulary/tokens/comp/one-time-code-input.tokens.json +246 -0
- package/dist/vocabulary/tokens/comp/page-header.tokens.json +247 -0
- package/dist/vocabulary/tokens/comp/pagination.tokens.json +233 -0
- package/dist/vocabulary/tokens/comp/popover.tokens.json +363 -0
- package/dist/vocabulary/tokens/comp/previous-next-links.tokens.json +194 -0
- package/dist/vocabulary/tokens/comp/progress-indicator.tokens.json +218 -0
- package/dist/vocabulary/tokens/comp/prose.tokens.json +283 -0
- package/dist/vocabulary/tokens/comp/radio-button.tokens.json +413 -0
- package/dist/vocabulary/tokens/comp/rating.tokens.json +230 -0
- package/dist/vocabulary/tokens/comp/resizable-frame.tokens.json +166 -0
- package/dist/vocabulary/tokens/comp/scroll-area.tokens.json +99 -0
- package/dist/vocabulary/tokens/comp/search.tokens.json +761 -0
- package/dist/vocabulary/tokens/comp/segmented-button.tokens.json +414 -0
- package/dist/vocabulary/tokens/comp/select.tokens.json +687 -0
- package/dist/vocabulary/tokens/comp/side-sheet.tokens.json +332 -0
- package/dist/vocabulary/tokens/comp/size-transition.tokens.json +49 -0
- package/dist/vocabulary/tokens/comp/skeleton.tokens.json +114 -0
- package/dist/vocabulary/tokens/comp/slider.tokens.json +436 -0
- package/dist/vocabulary/tokens/comp/snackbar.tokens.json +1160 -0
- package/dist/vocabulary/tokens/comp/split-view.tokens.json +52 -0
- package/dist/vocabulary/tokens/comp/stepper.tokens.json +538 -0
- package/dist/vocabulary/tokens/comp/steps.tokens.json +190 -0
- package/dist/vocabulary/tokens/comp/swatch.tokens.json +208 -0
- package/dist/vocabulary/tokens/comp/switch.tokens.json +350 -0
- package/dist/vocabulary/tokens/comp/tab-view.tokens.json +142 -0
- package/dist/vocabulary/tokens/comp/table-of-contents.tokens.json +429 -0
- package/dist/vocabulary/tokens/comp/table.tokens.json +553 -0
- package/dist/vocabulary/tokens/comp/tabs.tokens.json +1058 -0
- package/dist/vocabulary/tokens/comp/tag-group.tokens.json +68 -0
- package/dist/vocabulary/tokens/comp/tag.tokens.json +551 -0
- package/dist/vocabulary/tokens/comp/text-input.tokens.json +96 -0
- package/dist/vocabulary/tokens/comp/timeline.tokens.json +239 -0
- package/dist/vocabulary/tokens/comp/toolbar.tokens.json +270 -0
- package/dist/vocabulary/tokens/comp/tooltip.tokens.json +391 -0
- package/dist/vocabulary/tokens/comp/tree-view.tokens.json +478 -0
- package/dist/vocabulary/tokens/dial/dial.tokens.json +137 -0
- package/dist/vocabulary/tokens/fidelity/cupertino.fidelity.json +165 -0
- package/dist/vocabulary/tokens/fidelity/m3-like.fidelity.json +388 -0
- package/dist/vocabulary/tokens/fidelity/reference/androidx-material3.json +144 -0
- package/dist/vocabulary/tokens/fidelity/reference/apple-hig.json +196 -0
- package/dist/vocabulary/tokens/fidelity/reference/material-web.json +802 -0
- package/dist/vocabulary/tokens/generated/cupertino/components.json +1749 -0
- package/dist/vocabulary/tokens/generated/cupertino/fidelity.json +162 -0
- package/dist/vocabulary/tokens/generated/m3-like/components.json +1761 -0
- package/dist/vocabulary/tokens/generated/m3-like/fidelity.json +194 -0
- package/dist/vocabulary/tokens/generated/tanrei/components.json +1764 -0
- package/dist/vocabulary/tokens/icon-sets/material-symbols.icon-set.json +279 -0
- package/dist/vocabulary/tokens/ref/typeface.tokens.json +116 -0
- package/dist/vocabulary/tokens/schema/icon-set.schema.json +82 -0
- package/dist/vocabulary/tokens/schema/system.schema.json +859 -0
- package/dist/vocabulary/tokens/sys/behavior.tokens.json +184 -0
- package/dist/vocabulary/tokens/sys/color.vocabulary.json +58 -0
- package/dist/vocabulary/tokens/sys/elevation.tokens.json +362 -0
- package/dist/vocabulary/tokens/sys/measure.tokens.json +442 -0
- package/dist/vocabulary/tokens/sys/motion.tokens.json +1421 -0
- package/dist/vocabulary/tokens/sys/scroll-edge.tokens.json +50 -0
- package/dist/vocabulary/tokens/sys/shape.tokens.json +169 -0
- package/dist/vocabulary/tokens/sys/space.tokens.json +256 -0
- package/dist/vocabulary/tokens/sys/state.tokens.json +83 -0
- package/dist/vocabulary/tokens/sys/typescale.tokens.json +551 -0
- package/dist/vocabulary/tokens/systems/core.system.json +1889 -0
- package/dist/vocabulary/tokens/systems/cupertino.system.json +859 -0
- package/dist/vocabulary/tokens/systems/m3-like/comp/fab-menu.tokens.json +499 -0
- package/dist/vocabulary/tokens/systems/m3-like.system.json +1181 -0
- package/dist/vocabulary/tokens/systems/tanrei.system.json +707 -0
- package/dist/vocabulary/tokens/tanrei.resolver.json +400 -0
- package/package.json +52 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"tabs","title":"Tabs","summary":"Switches between views of the same subject with a row of labelled tabs, one of them selected and marked by an indicator that slides between them and follows a finger dragged across the row: in three weights (primary, secondary, tonal), on a track or straight on the surface the row stands on, as tall as a screen's views need or as low as a header allows, and with the slide or without it.","level":"base","listing":"default","anatomy":[{"id":"tablist","description":"The row that holds the tabs. It lays them out on the track, hugging their content (scrolling when they do not fit) or sharing its width, moves keyboard focus among them, and follows a drag across it with the active indicator."},{"id":"track","description":"The constant background of the whole row, a capsule in the default system: one color per variant, the same whichever tab is selected and whatever state a tab is in, with no outline. Tabs are one choice among equals, so the track never says which one is selected; the active indicator does. It may be left out (track): the row then stands on the surface it is placed on and keeps the track's inset, corners and clip, so that nothing moves. A layer whose tabs sit on a line makes it transparent."},{"id":"container","description":"One tab: its own box, the area that answers hover and a tap and that the tabs lay out side by side (stacked in a column). It is as tall as the row and at least the container height of the row's size (comp.tabs.container.height.small, comp.tabs.container.height.medium, comp.tabs.container.height-with-icon where a primary tab stacks its icon above its label), and its content stands comp.tabs.container.padding-inline in from its start and end edges (none where the tab is drawn as a circle, TAB-14), its icon and label comp.tabs.container.gap apart. It draws nothing of its own: hover, focus and press are drawn in its state layer, inside it."},{"id":"state-layer","description":"One tab's state layer, the area that draws hover, focus and press: the box the active indicator has on this tab while it is selected, or would have if it were. In the default system that is a capsule, or a circle where the tab's content is not wider than it is tall, and in a row that fills it is as wide as the tab; it is never the tab's container, the rectangle of the whole tab, which is still the area that answers hover and a tap. It is drawn with each look's container.color, transparent at rest in the default system, into which hover, focus and press mix that look's state-layer.color (TAB-3), and its corners are container.shape.","drawnWith":["container.color"]},{"id":"icon","description":"A glyph above the label (a primary tab of the medium size) or before it (a secondary or tonal tab, and every tab of the small size).","optional":true},{"id":"label","description":"The tab's text and its accessible name, always on one line. A tab that hugs its content shows it whole; a tab that shares the row's width truncates it with an ellipsis and shows it whole where the platform can. It may be hidden for an icon-only tab (labelHidden) and still name it.","optional":true},{"id":"active-indicator","description":"The thumb: the shape behind the selected tab's content — filled in primary and secondary tabs, a translucent layer in tonal ones — and, with the selected label's color, the mark of the selection in the default system. Its height is the row's less the track's inset, the same on every tab, and on the first and the last tab it lies that same inset from the track's end, so the thumb's round end and the track's are concentric at every row height. In a row that hugs it is as wide as the selected tab's content plus padding, and a circle where that content is not wider than it is tall (an icon, one full-width character, a one-letter label); in a row that fills it is as wide as the tab. It slides to the newly selected tab, or is drawn on it at once where the row's transition is none, and follows a finger dragged across the row, and the label and icon take their covered colors wherever it covers them, so their inversion travels with it."},{"id":"covered-icon","description":"The copy of the icon drawn on the active indicator, in its covered color, wherever the indicator covers the tab: the icon under it is cut away there, so each point of the glyph is drawn once, in the color that stands on what is behind it. Hidden from assistive technology.","optional":true},{"id":"covered-label","description":"The copy of the label drawn on the active indicator, in its covered color, wherever the indicator covers the tab: the label under it is cut away there, so each point of the text is drawn once, in the color that stands on what is behind it. Hidden from assistive technology, which reads the label once.","optional":true},{"id":"underline","description":"The line on the row's bottom edge under the selected tab: as wide as the tab's content in primary tabs, as wide as the tab in secondary tabs. It moves with the active indicator. The default system leaves it transparent; a layer that marks the selection with a line (Material's tabs) colors it."},{"id":"divider","description":"The hairline along the bottom of the whole row, under the underline. The default system leaves it transparent, because its row is a track and needs no line; a layer whose tabs sit on a line colors it."},{"id":"panel","description":"The view a tab shows. The tabs associate the selected tab with it and hide the others; they do not draw it. A row's panels are its own or, where a Tab view draws the row or is linked to it, the Tab view's, which switches and swipes them. A row may have none: it then switches what the product draws below it, and says so by its name alone (TAB-42)."},{"id":"focus-ring","description":"Gap-then-ring indicator shown for keyboard focus, drawn around the tab's state layer, so that it surrounds the place the active indicator has on that tab (a capsule or a circle in the default system), and held inside the track."}],"props":[{"name":"variant","type":"enum","values":["primary","secondary","tonal"],"default":"primary","description":"How much the selection weighs. Primary tabs switch the main views of a screen, at the top of its content: the active indicator is the filled color. Secondary tabs switch within one of those views: the indicator is one step quieter. Tonal tabs are the quiet row, for a choice that should not compete with what it changes — the language of a code sample, a contrast, a unit, a period: the indicator is a tonal layer, under a label that is darker than the others. The three are the same control in every other respect (TAB-50), and each is drawn with or without its track (track), at each size (size).","axis":"tanrei.comp.tabs.variant"},{"name":"size","type":"enum","values":["small","medium"],"default":"medium","description":"The row's height (28 / 36 under the default system; a row shorter than sys.target.minimum reaches its hit area to it, TAB-5) and what shrinks with it: a tab's padding, the active indicator's margins and the icon. Medium is the row of a screen's views, as tall as the Buttons and fields beside it (TAB-63). Small stands in a header or a toolbar, as tall as a small Button; its hit area still meets the minimum target (TAB-5), and its icon stands before the label in every variant. The label's text style, the colors and the motion are the same at both.","axis":"tanrei.comp.tabs.size"},{"name":"track","type":"boolean","default":null,"description":"Whether the row draws its track, the tonal background behind all its tabs. False draws none: the row stands on the surface it is placed on — in a header that is already a bar, on a card, in the heading of a sample — and nothing else changes, neither its size nor a tab's place nor a color of its variant (TAB-49). True draws it. Null, the default, takes comp.tabs.track.visible, the system's choice, which is on in the default system. Independent of variant: each of the three is drawn both ways."},{"name":"fullWidth","type":"boolean","default":false,"description":"False (hug, the default) sizes each tab to its content, never truncating its label, and scrolls the tabs sideways inside the track when they do not fit; the active indicator's width then follows the selected tab's content. True (fill) divides the row's width equally among the tabs and truncates a label that does not fit its share (for two to five short labels); the active indicator's width is then the tab's, the same on every tab."},{"name":"orientation","type":"enum","values":["horizontal","vertical"],"default":"horizontal","description":"The direction the tabs run. Horizontal (the default) is a row above the views it switches. Vertical stacks the tabs in a column at the start edge, beside the views — the categories of a settings page or of a dialog, the sections of one record — with every tab as wide as the column and its icon before its label (TAB-51). It switches views of one subject as a row does; it is not navigation between the destinations of an app, which is the navigation drawer's. fullWidth does not apply to a column (TAB-56)."},{"name":"value","type":"string","default":null,"description":"The value of the selected tab. The tabs set it when a tab is activated, or when a drag across the row is released on another tab, and emit change; the product may also set it. null selects the first enabled tab. While the row is a member of a group (group), the group's choice selects the tab of that value wherever the row has one (TAB-36)."},{"name":"indicatorOffset","type":"number","default":0,"description":"Where the active indicator and the underline are drawn while the Tab view it belongs to is swiped, relative to the selected tab: 0 on it, 1 on the next enabled tab and −1 on the previous one in reading order, and in between for values between. The Tab view sets it; a product leaves it at 0 unless it drives the indicator itself. A drag across the row itself is followed by the tabs (TAB-28) and does not pass through this prop."},{"name":"transition","type":"enum","values":["auto","slide","none"],"default":"auto","description":"How this row draws a new selection: the row's part of the effect of switching views. slide: the active indicator and the underline slide and resize to the newly selected tab, the labels' colors changing under them, and a tab out of view is scrolled in with a motion. none: the new selection is drawn whole in one frame — nothing travels and nothing fades (TAB-43). Auto takes comp.tabs.motion.transition, the design system's answer (slide in the default system). Under both a drag across the row still carries the indicator and hover, focus and press are answered the same; reduced motion draws none whatever this says. A Tab view has a transition of its own for its panels, and the row it draws follows it where it is none (TBV-22, TBV-23)."},{"name":"label","type":"string","default":"","description":"The accessible name of the row: what the views are views of, or, for a row without panels, what is chosen (Contrast, Units). Needed when a screen has more than one row of tabs, and always for a row that has no panel, where nothing else says what the row is for (TAB-42)."},{"name":"group","type":"string","default":"","description":"Names a choice this row shares with other rows of tabs, placed by the product or drawn by a Tab view. Rows that name the same group show the same choice: selecting a tab in one selects the tab of the same value in every other row that has one, at once and without moving focus or the page, and a row that has no tab of that value keeps its own (TAB-36 to TAB-38, TAB-40). Empty (the default): the row's choice is its own. The name is the product's and is compared exactly. On a platform where the product keeps the selection in its own state, rows given the same state are the group, and each platform's mapping says how it is spelled."},{"name":"rememberAs","type":"string","default":"","description":"The key under which a person's choice on this row is kept on their device across pages and visits, and from which it is restored before the row is first drawn (TAB-39). Empty (the default): the row neither reads nor writes any storage; nothing is remembered without a key. The key is the product's own and is used exactly as given, so the product can name it in its privacy notice, read it itself and clear it. Only the chosen tab's value is stored. It needs no group, and a group needs no key: sharing and remembering are separate choices."}],"items":[{"name":"tab","summary":"One tab of the row: a label, an optional icon, and the value that selects it.","props":[{"name":"value","type":"string","default":"","description":"Identifies the tab: the row's value names the selected tab by it, and change carries it. Unique within the row; required."},{"name":"label","type":"string","default":"","description":"The tab's text and its accessible name. Required, even when labelHidden is true."},{"name":"icon","type":"string","default":"","description":"The name of an icon (a glyph of the system's icon set). Give every tab of a row an icon, or none."},{"name":"labelHidden","type":"boolean","default":false,"description":"Draws the icon alone and keeps label as the accessible name (an icon-only tab)."},{"name":"disabled","type":"boolean","default":false,"description":"Prevents selecting the tab; the arrow keys skip it."}]}],"events":[{"name":"change","description":"The user selected another tab, by activating it or by releasing a drag on it; carries its value, which the row's value now holds."}],"states":["enabled","disabled","hovered","focused","pressed","selected"],"behavior":[{"id":"TAB-1","text":"WHEN the user activates an enabled tab that is not selected by pointer, touch, Enter or Space THE tabs SHALL set value to the tab's value and emit change exactly once with it; WHEN the tab is already selected THE tabs SHALL emit nothing."},{"id":"TAB-2","text":"WHILE a tab's disabled is true THE tabs SHALL NOT select it or emit change for it, SHALL skip it with the arrow keys, SHALL NOT make it the Tab stop and SHALL expose the disabled state to assistive technology."},{"id":"TAB-3","text":"WHILE a tab is hovered, keyboard-focused or pressed THE tabs SHALL render its state layer, label, icon, covered label and icon, active indicator, underline and opacity from the component tokens of the highest-precedence active state, with precedence pressed over focused over hovered; focus gained by pointer or touch SHALL NOT select the focused state."},{"id":"TAB-4","text":"WHEN a tab receives keyboard focus THE tabs SHALL show the focus indicator (the ring or the glow, TAB-10) around the tab's state layer (TAB-18), concentric with it and in its shape, so that it surrounds the place the active indicator has on that tab, with its inner edge sys.focus.offset outside the state layer's edge. THE tabs SHALL hold the indicator inside the track, which clips a row that scrolls: WHERE the space above and below the state layer (comp.tabs.track.padding) is less than the indicator reaches, it SHALL be drawn further in by the difference, on every side alike, keeping the state layer's shape. THE indicator SHALL be drawn above the neighbouring tabs and the active indicator, without animation; focus gained by pointer or touch SHALL NOT show it."},{"id":"TAB-5","text":"WHERE a tab is narrower than the minimum target THE tabs SHALL make it at least sys.target.touch wide for touch input and sys.target.pointer wide for fine pointers, in layout, because tabs touch their neighbours, so a hit area cannot extend over them. WHERE the row is shorter than the minimum target (the small size) THE tabs SHALL extend each tab's hit area above and below the row, by the same distance on each side, to sys.target.touch for touch input and sys.target.pointer for fine pointers, without changing the row's height or the place of anything around it; WHERE that extension lies over the row's own panel or over a control beside the row, a press on something that panel or control would itself answer SHALL go to it and not to the tab. A platform that cannot tell the input type SHALL use sys.target.touch."},{"id":"TAB-6","text":"WHILE a tab's disabled is true THE tabs SHALL render its state layer, label, icon, covered label and icon, active indicator, underline and opacity from the disabled component tokens of its variant and, for the selected tab, of its selected parts."},{"id":"TAB-7","text":"WHEN variant or size names a value that the active design system does not have THE tabs SHALL render with the tokens of that prop's default value, and in debug builds report the unknown value."},{"id":"TAB-8","text":"WHEN the tab is pressed by pointer, touch, Enter or Space THE tab SHALL show the pressed state without delay and SHALL keep it visible for at least sys.motion.duration.press-hold, even when the press ends sooner."},{"id":"TAB-9","text":"WHILE pressed THE tab SHALL answer as sys.behavior.pressed-feedback names: overlay applies the pressed tokens to the whole state layer at once; ripple grows the pressed state layer from the point of contact (from the center for keyboard activation); dim applies the pressed opacity to the whole control and draws no state layer; none draws no answer to the press. Under ripple and dim only the state layer's color stays with the state under the press; label, icon, covered label and icon, active indicator, underline, opacity and shape still come from the pressed tokens. Under none every part stays with the state under the press. The ripple grows over comp.tabs.motion.feedback-duration with comp.tabs.motion.state-easing, fades over comp.tabs.motion.state-duration with comp.tabs.motion.state-easing once the press has ended and press-hold has passed, and appears whole where motion is reduced."},{"id":"TAB-10","text":"THE tab SHALL ease its state layer's and track's corners by sys.shape.corner-smoothing (0 is a quarter circle, 0.6 the iOS continuous corner; a platform with only the OS curve draws it for any amount above 0) and show its keyboard focus as sys.behavior.focus-style names (ring or glow); a platform that cannot draw a choice SHALL fall back to the first value and state that in its README."},{"id":"TAB-11","text":"THE tabs SHALL render the tab whose value equals the row's value (or, while the row's value is null, the first enabled tab) from the selected parts of its variant (comp.tabs.primary.selected.label.color and the other selected. parts for primary, and so on) and every other tab from the variant's own parts; WHEN value names no tab THE tabs SHALL render none as selected, show no panel, and in debug builds report the value; WHEN a tab's value is empty or repeats another tab's THE tabs SHALL still render it, treat the first tab with a value as the one that value selects, and in debug builds report the tab."},{"id":"TAB-12","text":"THE tabs SHALL be one Tab stop, the selected tab; WHILE orientation is horizontal and a tab has keyboard focus Right Arrow and Left Arrow SHALL move focus to the next and previous enabled tab, wrapping at the ends, and Home and End to the first and last enabled tab, and each move SHALL also select the tab it reaches and emit change (automatic activation); in a right-to-left layout Left Arrow SHALL move to the next tab and Right Arrow to the previous; WHILE orientation is vertical the arrow keys SHALL move and select as TAB-54 says, and WHERE the row has no panel, in either orientation, as TAB-42 says; in either orientation Tab SHALL move focus from the selected tab into its panel, or, WHERE the row has no panel (TAB-42), to whatever follows the row."},{"id":"TAB-13","text":"WHILE the row has a panel THE tabs SHALL expose the tab list role named by the row's label (over a name the product gives the row on the element, aria-label or aria-labelledby, which names it WHILE label is empty), each tab with the tab role, its selected state, its position and the number of tabs, named by its own label whether or not that label is drawn; THE tabs SHALL expose the selected tab's panel with the tab panel role, named by its tab and associated with it where the platform can express that, SHALL hide the other panels from view and from assistive technology, and SHALL make a panel with no focusable content itself focusable so that Tab reaches it. WHERE the tabs belong to a Tab view, as the row it draws itself (TBV-16) or as a row it is linked to (TBV-17), its panels take the place of the tabs' own (TBV-9, TBV-15), and each tab SHALL be associated with the Tab view's panel of its value. A row that has no panel is not a tab list: it is exposed as the single choice it is, as TAB-42 says."},{"id":"TAB-14","text":"WHILE fullWidth is false THE tabs SHALL size each tab to its content plus the padding of the row's size on each side (comp.tabs.container.padding-inline.medium for medium, comp.tabs.container.padding-inline.small for small; TAB-44), or, WHERE its active indicator is a circle (TAB-16), to that circle and no wider, in either case never narrower than its active indicator or than the minimum target (TAB-5), keep its label on one line and whole however long it is or however large the text, place the tabs so that the first tab's active indicator starts comp.tabs.track.padding in from the track's start edge and the last tab's ends the same distance before the track's end (TAB-34), and scroll them sideways inside the track when they are wider than the space the row has; WHILE fullWidth is true THE tabs SHALL divide the row's width, less comp.tabs.track.padding at each end, equally among the tabs, each at least as wide as the minimum target (the tabs scroll sideways only when the row is too narrow for that), keep each label on one line, and truncate a label wider than its tab less the padding of the row's size on each side (and, beside an icon, less the icon and comp.tabs.container.gap) at the end of the label's own direction (TAB-33), with an ellipsis. A label SHALL NOT wrap onto a second line or break within a word, and an icon SHALL NOT shrink to make room for it."},{"id":"TAB-15","text":"WHEN the row first appears with its selected tab partly or wholly out of view, or a tab becomes selected or receives keyboard focus while part of it is scrolled out of view, THE tabs SHALL scroll the tabs inside the track until the whole tab is visible (at once when the row first appears), over comp.tabs.motion.indicator-duration with comp.tabs.motion.indicator-easing, and at once where motion is reduced. WHERE the tab becomes selected because the row follows its group's choice THE tabs SHALL bring it into view at once (TAB-38). WHILE the row's transition is none (TAB-43) THE tabs SHALL bring a tab that becomes selected into view at once."},{"id":"TAB-16","text":"THE tabs SHALL draw the selected tab's active indicator behind its content and centred on it, as tall as the row less comp.tabs.track.padding above and below, which is the same height on every tab of the row whatever the tab holds. WHILE fullWidth is false the indicator SHALL be as wide as the tab's content (its label and icon as TAB-18 lays them out, the icon alone while the label is hidden) plus the active indicator's padding of the row's size on each side (comp.tabs.active-indicator.padding-inline.medium for medium, comp.tabs.active-indicator.padding-inline.small for small), never wider than the tab; WHERE that content is not wider than it is tall (an icon alone, one full-width character, a one-letter label) the indicator SHALL instead be exactly as wide as it is tall, so that it is a circle. WHILE fullWidth is true the indicator SHALL be as wide as the tab, whatever the tab holds. In either case it SHALL NOT be narrower than it is tall, its width SHALL follow the same rule in every variant, and its four corners SHALL be rounded by comp.tabs.primary.active-indicator.shape for primary, comp.tabs.secondary.active-indicator.shape for secondary and comp.tabs.tonal.active-indicator.shape for tonal, each at most half its height. THE tabs SHALL also draw the selected tab's underline on the bottom edge of the row, above the divider, comp.tabs.primary.underline.thickness thick for primary, comp.tabs.secondary.underline.thickness for secondary and comp.tabs.tonal.underline.thickness for tonal, with the corners that face away from the divider rounded by comp.tabs.primary.underline.shape for primary, comp.tabs.secondary.underline.shape for secondary and comp.tabs.tonal.underline.shape for tonal, spanning the tab's content for primary and the tab's whole width for secondary and tonal. Both are drawn in every system, each in its look's color; a transparent color (the default system's underline, and the active indicator of a system that marks the selection with the line) hides the part without changing the layout. The content the indicator's width is measured from SHALL be the label at the heavier of its two weights (TAB-50), so that no tab, indicator or state layer changes width when the selection moves. A tab with no content (an empty label and no icon, which TAB-22 reports in debug builds) has an underline of no width and a circular active indicator; the report, not a wider indicator, is the remedy."},{"id":"TAB-17","text":"WHEN the selected tab changes while indicatorOffset is 0 and no drag is followed (TAB-28), and the row's transition is slide (TAB-43), THE tabs SHALL slide and resize the active indicator and the underline together from the old tab to the new one over comp.tabs.motion.indicator-duration with comp.tabs.motion.indicator-easing, drawn in the newly selected tab's colors, every frame of the slide being the in-between look of TAB-28 (the indicator as a drag would draw it at that place: its width between the two tabs' indicators, a circle becoming a capsule and a capsule a circle, each label and icon in its covered color exactly where it is covered), and SHALL move them at once where motion is reduced; the panel SHALL change at once unless a linked Tab view switches it (TBV-2). WHEN the row first appears, or the selected tab changes size or place without a new selection (a font arriving, the text size changing, the row resizing), THE tabs SHALL put the active indicator and the underline on it at once, without a slide. WHERE the selected tab changes because the row follows a choice of its group that was made on another row, or one restored from storage, THE tabs SHALL likewise put them on it at once (TAB-38)."},{"id":"TAB-18","text":"THE tabs SHALL make every tab of a row as tall as the row: at least the container height of the row's size (comp.tabs.container.height.medium for medium, comp.tabs.container.height.small for small), at least comp.tabs.container.height-with-icon where a primary tab stacks an icon above a drawn label, and tall enough that the content of its tallest tab keeps the indicator's padding of that size (comp.tabs.active-indicator.padding-block.medium for medium, comp.tabs.active-indicator.padding-block.small for small) between itself and the active indicator's top and bottom edges (TAB-16); each tab's content SHALL be centred in it and clear of the underline's thickness at the bottom edge. THE tabs SHALL draw each tab's state layer, which carries hover, focus and press, in the box the active indicator has on that tab while it is selected, or would have if it were (TAB-16), centred in the tab: as tall as the row less comp.tabs.track.padding above and below; WHILE fullWidth is false as wide as the tab's content plus the active indicator's padding of the row's size on each side (TAB-16), and exactly as wide as it is tall WHERE that content is not wider than it is tall; WHILE fullWidth is true as wide as the tab. Its corners SHALL be rounded by comp.tabs.container.shape, each at most half its height, and THE tabs SHALL NOT draw hover, focus or press on the part of the tab's rectangle outside that box. The state layer SHALL lie above the track and under the active indicator, except on the selected tab, whose state layer SHALL lie above the active indicator and under the focus indicator, drawn from that tab's selected parts (its color is comp.tabs.primary.selected.state-layer.color, comp.tabs.secondary.selected.state-layer.color or comp.tabs.tonal.selected.state-layer.color by variant, the color of the content the indicator covers), so that hover and press show on the selected tab as on any other; the area that answers hover and a press SHALL remain the whole tab (TAB-5): a pointer anywhere on the tab shows the state, in the state layer. A primary tab with an icon and a drawn label SHALL place them as the icon placement of the row's size says (comp.tabs.icon.placement.medium for medium, comp.tabs.icon.placement.small for small, and a size a layer added by its own value, or medium's WHERE the layer declares none): stacked puts the icon above the label, comp.tabs.container.gap apart; inline puts it before the label, comp.tabs.container.gap apart, centred on the label's line. A secondary or tonal tab SHALL place its icon before its label at every size, as inline does. THE tabs SHALL draw the icon at the icon size of the row's size (comp.tabs.icon.size.medium for medium, comp.tabs.icon.size.small for small) through the icon helper with the family and fill of the tab's selection (selected for the selected tab, otherwise unselected), sys.icon.weight and an optical size clamped between sys.icon.optical-size.min and sys.icon.optical-size.max, and the label in comp.tabs.label.typescale."},{"id":"TAB-19","text":"WHILE a tab's labelHidden is true THE tabs SHALL draw only the tab's icon and keep its label as its accessible name; WHILE labelHidden is true and icon is empty THE tabs SHALL draw the label anyway and in debug builds report the tab."},{"id":"TAB-20","text":"THE tabs SHALL draw a line of comp.tabs.divider.thickness in comp.tabs.divider.color along the bottom of the whole row, under the tabs, the active indicator and the underline, across the full width of the row even while its tabs scroll, and SHALL hide it from assistive technology. The line is drawn in every system; a transparent color (the default system's) hides it without changing the layout."},{"id":"TAB-21","text":"WHEN the layout direction is right-to-left THE tabs SHALL order the tabs from the right, start the track and a row of tabs that hug their content at the right edge, truncate a label at the end of the label's own direction (TAB-33: a right-to-left label at its left end, a left-to-right label at its right end), and mirror the slide of the active indicator and the underline; a drag (TAB-28) SHALL still carry them to where the pointer is; WHILE orientation is vertical the column SHALL still run from top to bottom, its start edge being its right one: each tab's icon and label SHALL start at the tab's right edge, and the divider and the underline SHALL lie on the column's left edge (TAB-53)."},{"id":"TAB-22","text":"WHILE a tab's label is not empty THE tabs SHALL expose it as the tab's accessible name, over a name the product gives the tab on the element (aria-label or aria-labelledby); WHILE a tab's label is empty and the product gives the tab a name of its own on the element — aria-label, or aria-labelledby naming an element — THE tabs SHALL leave that name to the tab; WHILE a tab's label is empty and the product gives it none THE tabs SHALL still render the tab and in debug builds report that it has no accessible name."},{"id":"TAB-23","text":"WHEN the colors of a tab change between states or between selected and not selected THE tabs SHALL animate them over comp.tabs.motion.state-duration with comp.tabs.motion.state-easing, and SHALL change them at once where motion is reduced. WHERE a tab becomes selected or stops being selected because the row follows a choice of its group that was made on another row, or one restored from storage, THE tabs SHALL change its colors at once (TAB-38). WHILE the row's transition is none THE tabs SHALL change the colors of a tab that becomes selected or stops being selected at once (TAB-43), and SHALL still animate a change between states. WHEN the row first appears THE tabs SHALL draw every tab's colors, its label's weight (TAB-50) and its icon's fill (TAB-18) at once, as they are in that first frame, without a motion; WHEN a tab is added to a row that is already drawn THE tabs SHALL draw that tab so too. An appearance is not a change between states."},{"id":"TAB-24","text":"THE tabs SHALL draw each tab's label and icon a second time, over the first, in the covered colors of the tab's look (comp.tabs.primary.covered-label.color and comp.tabs.primary.covered-icon.color for a primary tab that is not selected, comp.tabs.primary.selected.covered-label.color and comp.tabs.primary.selected.covered-icon.color for the selected one, and the same parts of secondary and of tonal), clipped to the active indicator's current shape, its corners included, wherever the indicator is drawn; WHILE the indicator slides (TAB-17) the clip SHALL move with it in the same frame, so that each label and icon it passes over changes where it is covered and the newly selected tab's content is wholly in its covered colors when the indicator lands, neither before nor after. THE tabs SHALL NOT approximate the covered colors with a blend mode, and SHALL expose each label to assistive technology once."},{"id":"TAB-25","text":"WHILE a tab's label is truncated (TAB-14) THE tabs SHALL keep the whole label as the tab's accessible name and SHALL show the whole label through the platform's idiom for revealing truncated text where it has one — a plain tooltip on pointer hover and keyboard focus, or on long press where tooltips open that way, or the platform's large-content viewer — without exposing it to assistive technology a second time; WHILE the label fits THE tabs SHALL show no such tooltip."},{"id":"TAB-26","text":"WHILE indicatorOffset is not 0 THE tabs SHALL draw the active indicator and the underline between the selected tab and the next enabled tab (above 0) or the previous enabled tab (below 0) in reading order, each edge at the linear interpolation between its place on the one tab and on the other by the offset's magnitude, clamped to 1, in the selected tab's colors, and SHALL follow the offset in the frame it changes, without a motion of their own; the covered label and icon SHALL follow as TAB-24 says; WHERE there is no enabled tab in the offset's direction THE tabs SHALL draw them on the selected tab. WHEN value changes while indicatorOffset is not 0 THE tabs SHALL place them at once by the new selected tab and the offset, without the slide of TAB-17. WHILE indicatorOffset is not 0 THE tabs SHALL take no drag of their own (TAB-28): the swipe that sets it already has the indicator."},{"id":"TAB-27","text":"THE tabs SHALL draw a track behind the whole row, under the tabs, their state layers and the active indicator: filled, WHILE the row's track is on (TAB-49), with comp.tabs.primary.track.color for primary, comp.tabs.secondary.track.color for secondary and comp.tabs.tonal.track.color for tonal, its corners rounded by comp.tabs.track.shape, each at most half its height, with no outline, as tall as the row, and as wide as the tabs plus comp.tabs.track.padding at each end but never wider than the space the row has; WHILE the tabs do not fit that space THE tabs SHALL keep the track still and scroll the tabs inside it, clipped to its shape (TAB-14). THE track SHALL be the same whichever tab is selected, whatever state any tab is in and while the active indicator moves, because tabs are one choice among equals: only the active indicator marks the selection. THE tabs SHALL hide the track from assistive technology. The track is drawn in every system; a transparent color hides it without changing the layout. So does a row whose track is off (TAB-49): it fills nothing and keeps the track's box, inset, corners and clip."},{"id":"TAB-28","text":"WHEN the user presses the row with touch, a pen or a mouse and drags past the platform's touch slop (8 points where the platform names none), further sideways than up or down, THE tabs SHALL take the drag: the press SHALL activate no tab when it ends (TAB-1), the tab under it SHALL leave its pressed state as it does when a press ends (TAB-8), and from then until the drag ends THE tabs SHALL draw the active indicator and the underline where the pointer is along the row — on an enabled tab while the pointer is at that tab's centre, halfway between two neighbouring enabled tabs while the pointer is where they meet (the middle of any disabled tabs between them), each edge at the linear interpolation in between, and on the first or last enabled tab while the pointer is before or beyond its centre — in the selected tab's colors. Everything that differs between the indicator on the one tab and on the other SHALL change continuously with the pointer, with no threshold: its place, its width (between the two tabs' indicators, a circle widening into a capsule and a capsule narrowing into a circle), the underline's place and width with it, and the color of each label and icon, which is its covered color exactly where the indicator covers it and its own color elsewhere, the clip of TAB-24 moving with the indicator in the same frame. THE tabs SHALL place them in the frame the pointer moves, without a motion of their own; WHEN the drag is taken with the pointer away from where they rest THE tabs SHALL bring them to the pointer's place over comp.tabs.motion.state-duration with comp.tabs.motion.state-easing instead of at once, following the pointer meanwhile. A drag that is further up or down than sideways when it passes the slop SHALL be left to vertical scrolling for its whole length, and a wheel or a trackpad SHALL only scroll. WHILE the tabs do not fit and scroll inside the track (TAB-14) THE tabs SHALL take only a drag that starts on the selected tab, SHALL leave every other sideways drag to scroll the tabs as before, and SHALL scroll the tabs to keep the active indicator in view while a drag carries it toward an end of the track."},{"id":"TAB-29","text":"WHEN the user releases a drag the tabs have taken THE tabs SHALL choose one enabled tab: the one the active indicator is nearer to of the two it lies between (the one after it from halfway on), or, WHEN the release is a fling along the row, the one of those two that the fling is toward; a fling is a release faster than the platform's minimum fling velocity (Android's ViewConfiguration.getScaledMinimumFlingVelocity, Flutter's kMinFlingVelocity) or, where the platform names none (the web, SwiftUI, React Native), 0.5 points per millisecond. A release's velocity is the pointer's over its last moves: WHERE the pointer has not moved for longer than the time after which the platform's velocity tracker takes a pointer as stopped (40 milliseconds in Android's VelocityTracker, Jetpack Compose's VelocityTracker and Flutter's VelocityTracker) or, where the platform names none (the web, SwiftUI, React Native), 40 milliseconds before the release THE tabs SHALL take the release as having no velocity, so that a drag that stops where it is wanted and is let go there is no fling, however fast it moved before it stopped. WHERE the chosen tab is not the selected one THE tabs SHALL set value to the tab's value and emit change exactly once with it, and SHALL slide and resize the active indicator and the underline from where the release left them onto that tab over comp.tabs.motion.indicator-duration with comp.tabs.motion.indicator-easing, as TAB-17 does from a tab; WHERE it is the selected tab THE tabs SHALL return them to it over the same motion and emit nothing. The place where two tabs meet decides only what a release chooses; nothing drawn changes at it. The chosen tab SHALL become the row's Tab stop (TAB-12), and the release SHALL NOT also activate the tab under the pointer."},{"id":"TAB-30","text":"WHEN a drag the tabs have taken is cancelled — the platform cancels the pointer (a system gesture, a lost capture), Escape is pressed while it lasts, or the product sets value or removes or disables a tab the indicator lies between — THE tabs SHALL return the active indicator and the underline to the selected tab (the one the product has just set, where it set one) over comp.tabs.motion.indicator-duration with comp.tabs.motion.indicator-easing and emit nothing. WHILE a drag lasts THE tabs SHALL NOT change value, the panel shown (their own, or a Tab view's, whose shown panel cannot change before a tab is chosen), keyboard focus, or the selected state that each tab exposes to assistive technology, whatever the indicator covers, and SHALL announce nothing: the selection is made, and announced, by the release alone (TAB-29). WHERE motion is reduced THE tabs SHALL still draw the active indicator and the underline where the pointer is, which the person's own finger moves, taking the drag without the catch-up motion of TAB-28, and SHALL put them on their tab at once when the drag is released or cancelled."},{"id":"TAB-31","text":"THE tabs SHALL take its layout direction from where it is used — the direction of the nearest ancestor that sets one, and the platform's own where none does — and SHALL have no direction setting of its own; WHEN that direction changes while the tabs is shown THE tabs SHALL draw itself for the new direction at once, without a motion of its own, keeping the selected tab, scrolled into view as TAB-15 says, and its focus."},{"id":"TAB-32","text":"WHERE the layout direction is right-to-left THE tabs SHALL draw a tab's icon, in both of its copies (TAB-24) mirrored left to right exactly when the system's icon set marks that glyph's name as mirrored or the product forces mirroring for that use, and unmirrored when the product forbids it: the icon helper mirrors the glyph inside its own box, about the box's vertical centre line, changing neither its place, size, color and fill nor the order TAB-21 gives. THE tabs SHALL NOT mirror a glyph itself, and SHALL NOT mirror content the product gives as an image or a view of its own rather than by a glyph's name."},{"id":"TAB-33","text":"THE tabs SHALL lay out a tab's label, in both of its copies (TAB-24) as text of its own direction, isolated from the text around it: each takes the base direction of its first strong character, or the layout direction where it has none, so that a left-to-right word, a number with its sign or unit, a telephone number and an address keep their own order in a right-to-left layout and reorder nothing beside them; THE tabs SHALL still place each label and align its lines by the layout direction, not by the text's own, and SHALL cut a label that does not fit (TAB-14) at the end of its own direction, so that a left-to-right label in a right-to-left layout loses its right end and never its beginning."},{"id":"TAB-34","text":"THE tabs SHALL hold the active indicator the same distance, comp.tabs.track.padding, from the track's top, from its bottom and, on the first and the last tab, from the track's end: at every height the row takes (comp.tabs.container.height.small, comp.tabs.container.height.medium, comp.tabs.container.height-with-icon, or taller with larger text), whether the tabs hug or fill, and whether the indicator is a capsule or a circle; so that wherever the track's corner radius less comp.tabs.track.padding is the indicator's corner radius — at every height while comp.tabs.track.shape and the variant's active-indicator shape are both full, as in the default system — the indicator's end and the track's end are concentric curves. WHERE the first or the last tab is wider than its active indicator (a circle in a tab widened to the minimum target) THE tabs SHALL let that tab reach into the track's inset on that side by half the difference, as far as the track's edge, rather than hold the indicator further in; WHERE half the difference is more than the inset the tab SHALL end at the track's edge in layout and its hit area SHALL extend beyond the track's end as far as the minimum target needs, without affecting layout. A tab's state layer and its focus ring are drawn in the indicator's box and SHALL lie in the same place; WHILE the tabs scroll inside the track the distance SHALL hold at each end once the row is scrolled to that end. All of this SHALL hold whether the track is drawn or not (TAB-49)."},{"id":"TAB-35","text":"WHILE fullWidth is false and every tab of the row draws its icon alone (TAB-19) THE tabs SHALL draw every tab's place — the active indicator on the selected tab, the state layer of each other tab — as a circle of one diameter, the row's height less comp.tabs.track.padding above and below, with the tab's glyph, the icon size of the row's size across (TAB-18), at its center; SHALL set neighbouring circles' centers one tab's width apart, every tab being as wide as the larger of the circle and the minimum target of TAB-5; SHALL make the track as wide as that leaves it and no wider, the first and the last circle concentric with its ends (TAB-34), so that the row is symmetric about its middle and, but for the thumb's place and the glyphs, the same whichever tab is selected; SHALL keep the active indicator that circle, neither wider nor narrower, in every frame while it slides or is dragged from one tab to another (TAB-17, TAB-28); and SHALL give the tabs hit areas that meet halfway between neighbouring circles and reach the track's top, its bottom and, on the first and the last tab, its end, so that every point of the track selects the tab whose circle is nearest and every hit area meets the minimum target. A row of two such tabs stays a row of tabs: each is exposed as a tab with its label as its name, and activating the selected one changes nothing."},{"id":"TAB-36","text":"WHILE group is not empty THE tabs SHALL be a member of the group of that name, together with every other row of tabs in the same document or window whose group is the same string, compared exactly, whether the product placed that row or a Tab view drew it (TBV-16); a group SHALL hold one choice, the value of a tab, or none, and SHALL hold none until TAB-37 or TAB-39 gives it one. WHILE its group holds a choice and the tabs has an enabled tab with that value THE tabs SHALL have that tab selected: it SHALL set value to the choice and emit nothing, in the first frame it is drawn, in the frame the choice changes, and in the frame it gains such a tab, has such a tab enabled, or is given the group. WHILE its group holds no choice, or the tabs has no enabled tab with the choice's value, THE tabs SHALL keep its own value and select as TAB-11 says, SHALL report nothing, and SHALL follow the group again as soon as the choice is the value of one of its enabled tabs. WHILE group is empty THE tabs SHALL share its choice with no other row."},{"id":"TAB-37","text":"WHEN a person selects a tab on a row that is a member of a group (TAB-1, TAB-12, TAB-29), or the product sets value on such a row, after the row has first been drawn, to the value of one of its enabled tabs, THE tabs SHALL make that value its group's choice in the same frame, so that every member follows as TAB-36 says. THE row the person selected on SHALL emit change exactly once, as it does without a group, and every other member SHALL emit nothing, so that each choice a person makes is announced once, by the row it was made on, however many rows follow it; a value set by the product SHALL emit nothing on any member. The value a row has when it is first drawn SHALL NOT become the group's choice, nor SHALL a value that names none of the row's tabs or names a disabled one; a drag across a row before its release (TAB-28) and indicatorOffset SHALL NOT be shared, and the other members wait for the selection."},{"id":"TAB-38","text":"WHEN a group's choice gives a row another selected tab and that row is neither the one a person selected on nor the one the product set (TAB-37), or the choice is one restored from storage (TAB-39), THE tabs SHALL draw that tab as selected at once: the active indicator and the underline on it without the slide of TAB-17, its colors without the motion of TAB-23, the tab brought into view inside the track at once (TAB-15), and its own panel changed at once (TAB-13). THE tabs SHALL NOT move keyboard focus to that row or within it, SHALL NOT show a hovered, focused or pressed state for the change, SHALL NOT scroll anything outside its own track to bring itself into view, and SHALL announce nothing. THE row a person selected on SHALL answer the press, slide and keep keyboard focus as it does without a group, and a row whose value the product set SHALL slide as TAB-17 says. Every member SHALL draw the new choice in the same frame: no frame SHALL show one member with the new choice and another member, which has an enabled tab of that value, with the old one. WHERE a member follows a drag of its own when the choice changes THE tabs SHALL cancel that drag as TAB-30 says for a value the product sets."},{"id":"TAB-39","text":"WHILE rememberAs is not empty THE tabs SHALL keep the person's choice on their device: WHEN a person's selection gives the row another selected tab, made on the row itself or, through its group, on another member (TAB-37), THE tabs SHALL store that tab's value, and nothing else, under exactly the key rememberAs in the storage the platform keeps for the product on the device across pages and visits, once for each key however many members name it; a value set by the product and a choice restored from storage SHALL be stored by no row. WHEN the row is first drawn while a value is stored under its key THE tabs SHALL restore it before that first frame: WHILE the row is a member of a group that holds no choice the stored value SHALL become the group's choice, whether or not this row has a tab with it (a group that already holds a choice keeps it), and WHILE the row has no group the row SHALL select its enabled tab with that value where it has one; no frame SHALL show the row with another tab selected, or another panel, first, and the row SHALL emit nothing. THE tabs SHALL use a stored value only to compare it with its tabs' values, and SHALL NOT draw it, announce it or run it. WHILE rememberAs is empty THE tabs SHALL neither read nor write any storage. IF the storage is missing, blocked or full, or reading or writing it fails, THEN THE tabs SHALL behave as though nothing were stored, keep the choice for as long as the document or window lasts, and raise and report nothing."},{"id":"TAB-40","text":"WHEN a person selects a tab on a row that is a member of a group and, in following that choice, other members change the size of what lies before the row in a region that scrolls, THE tabs SHALL keep the row where the person is using it: in the frame that first draws the new choice the row SHALL be at the place in the window that it had in the frame before, the scroll positions of the regions it scrolls in having been moved by exactly the distance the row would otherwise have moved, at once, with no scrolling motion and with no frame in between that shows the row elsewhere; WHERE a region cannot scroll that far THE tabs SHALL move it as far as it goes. THE tabs SHALL make no such correction for a choice the product set or one restored from storage, where no person has a place to keep, and SHALL leave what lies after the row to move as its own panel's and the other members' new heights require."},{"id":"TAB-41","text":"WHILE many rows are members of one group (a page of sixty code samples) THE tabs SHALL do the work of a choice once for the group and not once for each row: storage SHALL be read at most once for each key in the life of a document or window and written at most once for each key and choice (TAB-39), the place of the row acted on SHALL be measured and corrected once (TAB-40), and a member that follows SHALL run no motion (TAB-38). WHEN a member is removed THE tabs SHALL take it out of its group, and the group SHALL keep its choice for as long as the document or window lasts, with or without members, so that a row drawn later (a view navigated to without a new document) takes it in its first frame."},{"id":"TAB-42","text":"WHILE the row has no panel — none of its own, none of a Tab view that draws it or is linked to it (TAB-13), and none of a component that draws the row together with the panel it switches (the date-time picker's entry-mode tabs, DTM-13) — THE tabs SHALL expose the row as a single choice and not as a tab list: the radio group role named by the row's label, and each tab with the radio role, its checked state (the selected tab checked, every other tab not), its disabled state, its position and the number of tabs, named by its own label whether or not that label is drawn; THE tabs SHALL expose no tab list, tab or tab panel role, SHALL associate no tab with any element as the thing it controls, and SHALL show and hide nothing itself. THE tabs SHALL keep the row one Tab stop, the selected tab (TAB-12), Tab moving focus from it to whatever follows the row. WHILE a tab of such a row has keyboard focus, in either orientation, Right Arrow and Down Arrow SHALL move focus to the next enabled tab and Left Arrow and Up Arrow to the previous one, wrapping at the ends, with Right Arrow and Left Arrow swapped in a right-to-left layout, and Home and End SHALL move it to the first and the last enabled tab; each move SHALL select the tab it reaches and emit change, as the arrows of a radio group check the radio they reach, and Enter and Space SHALL select the focused tab (TAB-1). A selection SHALL be made, announced and emitted exactly as on a row with panels: the checked state is what assistive technology is told, and what the choice changes below the row is the product's to draw on change. WHEN the row gains its first panel or loses its last THE tabs SHALL change what they expose to match, at once, without changing the selection, keyboard focus or anything drawn. WHERE a row has a panel for some of its tabs and not for others it is a tab list (TAB-13): THE tabs SHALL associate each tab that has one with it and SHALL show no panel while a tab without one is selected."},{"id":"TAB-43","text":"THE tabs SHALL draw a new selection as the row's transition names: the name transition gives, or, WHILE transition is auto, the name comp.tabs.motion.transition holds (slide or none); WHEN transition names a value the tabs do not define THE tabs SHALL treat it as auto and in debug builds report it. WHILE the row's transition is slide, TAB-15, TAB-17, TAB-23 and TAB-28 to TAB-30 hold as written. WHILE it is none THE tabs SHALL draw a new selection whole in the frame it is made, whatever made it — a press, a key, the release of a drag, the product, or the row's group: the active indicator and the underline on the newly selected tab at their full size and gone from the tab that was selected, each of the two tabs' labels and icons in the colors of its new look, and the tab brought into view inside the track (TAB-15), with no slide, no resize, no fade and no frame that shows a look in between. THE tabs SHALL still take a drag across the row (TAB-28) and still draw the active indicator where indicatorOffset puts it (TAB-26), each in the frame the pointer or the offset moves, since the person's own finger moves it and no motion is the component's; they SHALL take the drag without the catch-up motion of TAB-28 and SHALL put the active indicator and the underline on their tab at once when the drag is released or cancelled (TAB-29, TAB-30), as TAB-30 says where motion is reduced. A tab's hover, focus and press SHALL be answered as under slide: the state's colors over comp.tabs.motion.state-duration (TAB-23), the press as sys.behavior.pressed-feedback names and held for sys.motion.duration.press-hold (TAB-8, TAB-9), the focus indicator without animation (TAB-4); WHERE the newly selected tab is still hovered, focused or pressed it SHALL be drawn in that state of the selected look. WHERE motion is reduced THE tabs SHALL draw a new selection as none does whatever transition names. Changing transition SHALL NOT change the selected tab, keyboard focus or what the row emits, and a slide that is running when the row's transition becomes none SHALL end on its tab at once."},{"id":"TAB-44","text":"THE tabs SHALL draw the row at its size: every tab at least the container height of that size tall (comp.tabs.container.height.medium for medium, comp.tabs.container.height.small for small), with the tab padding (comp.tabs.container.padding-inline.medium for medium, comp.tabs.container.padding-inline.small for small), the active indicator's margins (comp.tabs.active-indicator.padding-inline.medium for medium, comp.tabs.active-indicator.padding-inline.small for small; comp.tabs.active-indicator.padding-block.medium for medium, comp.tabs.active-indicator.padding-block.small for small) and the icon size (comp.tabs.icon.size.medium for medium, comp.tabs.icon.size.small for small) of that size. Everything else SHALL be the same at every size: the label's text style (comp.tabs.label.typescale), the gap, the track's inset and corners (comp.tabs.track.padding, comp.tabs.track.shape), every color and every motion, what assistive technology is told and the keyboard model. The heights are minimums (TAB-18): with larger text a small row grows as a medium one does, cuts nothing, and scrolls its tabs inside the track rather than the page (TAB-14). WHILE size is small THE tabs SHALL place a tab's icon before its label in every variant (TAB-18) and SHALL meet the minimum target by its hit area (TAB-5). Size, variant, track and transition are independent: each variant SHALL be drawn at each size, and changing size SHALL NOT change the selected tab, keyboard focus or what is scrolled into view."},{"id":"TAB-45","text":"WHERE the platform draws with a person's own forced colors (the web's forced-colors mode, and a platform's equivalent where it has one) THE tabs SHALL draw the active indicator as a filled, opaque shape in the platform's highlight color with the selected tab's label and icon in its highlighted-text color, every other tab's label and icon in its text color, a disabled tab's in its color for disabled text and a disabled selected tab's indicator in that same color, the underline in the highlight color and the divider in the text color, and the focus indicator in the platform's own colors, in every variant alike and with or without the track. THE tabs SHALL NOT rely on the track, on a state layer, on a translucent fill or on a difference between two of the system's own colors to say which tab is selected there: the filled indicator SHALL remain, so that a tonal row without a track, whose indicator is a faint layer in the system's own colors, shows its selection as plainly as a primary one."},{"id":"TAB-49","text":"THE tabs SHALL fill the track (TAB-27) while the row's track is on and SHALL fill nothing behind the row while it is off: on or off as track says while it is true or false, and, WHILE track is null, as comp.tabs.track.visible holds (on in the default system). WHILE the track is off the surface the row is placed on SHALL show between and around the tabs, and THE tabs SHALL change nothing else: the row's size, the inset the track has (comp.tabs.track.padding) above, below and at each end, the place and size of every tab, state layer, active indicator, underline and focus indicator (TAB-4, TAB-34), the corners that clip a row that scrolls (comp.tabs.track.shape, TAB-14), the hit areas, and every color of the row's variant, so that turning the track on or off moves nothing and two rows that differ only in it line up. THE tabs SHALL draw every part in its own color over whatever lies beneath it — the track, or with no track whatever is behind the row — and SHALL NOT assume a surface: a color that is translucent (a state layer, the default system's tonal active indicator) is laid over what is there. The track is decoration, drawn or not, and nothing a person is told changes with it. Track, variant, size and transition are independent: each variant SHALL be drawn with and without its track at each size, and changing track SHALL be drawn at once, without a motion of its own, and SHALL NOT change the selected tab, keyboard focus, what is scrolled into view or what the row emits."},{"id":"TAB-50","text":"THE tabs SHALL draw the three variants alike in everything but their tokens: the same parts in the same places, the same sizes, the same keyboard model, and the same roles, names and states told to assistive technology; a variant says how much the selection weighs, not what the row is. Each variant SHALL read its own parts (comp.tabs.primary.selected.active-indicator.color, comp.tabs.secondary.selected.active-indicator.color, comp.tabs.tonal.selected.active-indicator.color, and so on for every part TAB-3, TAB-6, TAB-11 and TAB-24 name). WHERE an active indicator's color is translucent — the default system's tonal indicator is a layer of the selected tab's content color — THE tabs SHALL draw it once, at that opacity, over the track or the surface beneath it, with the selected tab's state layer (TAB-18) over it; SHALL NOT let two drawings of it overlap and darken while it slides, resizes or is dragged; and SHALL draw the covered label and icon (TAB-24) over it at their own opacity. A tonal tab's label and icon are comp.tabs.tonal.label.color and comp.tabs.tonal.icon.color where the indicator does not cover them and comp.tabs.tonal.selected.covered-label.color and comp.tabs.tonal.selected.covered-icon.color on the selected tab once the indicator has landed, so that in the default system a tonal row tells its selection by the layer and by the darker label together. THE selected tab's label SHALL be drawn, in both of its copies, at the weight of comp.tabs.label.typescale plus comp.tabs.primary.selected.label.emphasis, comp.tabs.secondary.selected.label.emphasis or comp.tabs.tonal.selected.label.emphasis by variant, so that a selection drawn by a faint indicator is also told by something other than color; every other tab's label SHALL keep the typescale's weight, and every tab SHALL keep the width its label needs at the heavier weight whether it is selected or not, so that nothing in the row moves or wraps when the selection does. The weight SHALL change with the label's color (TAB-23), at once where the colors do. A tonal tab with an icon and a drawn label SHALL place the icon before the label at every size (TAB-18)."},{"id":"TAB-51","text":"WHILE orientation is vertical THE tabs SHALL stack the tabs from top to bottom in the order given, in a column at the start edge of the row beside its panels, every tab as wide as the column: the widest tab's content plus the padding of the row's size on each side (comp.tabs.container.padding-inline.medium for medium, comp.tabs.container.padding-inline.small for small; TAB-44), or the width the product gives the tab list where that is wider, and never wider than the space the row has. Each tab's icon SHALL stand before its label in every variant and at every size, comp.tabs.container.gap apart, both at the tab's start edge, and each tab SHALL be at least the container height of the row's size tall and, because the tabs touch their neighbours above and below, at least the minimum target tall in layout (sys.target.touch for touch input, sys.target.pointer for fine pointers; TAB-5). TAB-51 to TAB-61 SHALL hold in place of what TAB-5, TAB-14, TAB-16, TAB-18, TAB-20, TAB-27, TAB-28, TAB-34 and TAB-35 say of a horizontal row's widths, heights, insets and edges; every other behaviour holds in both orientations."},{"id":"TAB-52","text":"WHILE orientation is vertical THE tabs SHALL draw the selected tab's active indicator, and every tab's state layer (TAB-18), as the tab's box less comp.tabs.track.padding on every side: as wide as the column less the inset on each side and as tall as the tab less the inset above and below, whatever the tab holds, never a circle, its corners rounded by the variant's active-indicator shape, each at most half its height (TAB-16); and SHALL slide and resize it from one tab to another along the column over comp.tabs.motion.indicator-duration with comp.tabs.motion.indicator-easing, as TAB-17 says, the covered label and icon following it as TAB-24 says."},{"id":"TAB-53","text":"WHILE orientation is vertical THE tabs SHALL draw the divider (TAB-20) as a line of comp.tabs.divider.thickness in comp.tabs.divider.color along the column's end edge, the side of the panels, the full height of the column, and the selected tab's underline (TAB-16) as a line of the variant's underline thickness on that edge, above the divider and as tall as the selected tab in every variant, its corners that face away from the divider rounded by the variant's underline shape; in a right-to-left layout both SHALL lie on the column's left edge."},{"id":"TAB-54","text":"WHILE orientation is vertical, the row has a panel and a tab has keyboard focus, Down Arrow and Up Arrow SHALL move focus to the next and previous enabled tab, wrapping at the ends, and Home and End to the first and last enabled tab, each move also selecting the tab it reaches and emitting change (automatic activation, TAB-12); Right Arrow and Left Arrow SHALL do nothing, in either layout direction, and are left to the page. A column without a panel moves by every arrow key, as TAB-42 says."},{"id":"TAB-55","text":"WHILE orientation is vertical and the row has a panel THE tabs SHALL expose the tab list as vertical (aria-orientation on the web, the platform's equivalent where it has one) and every other role, name, state and relation as TAB-13 says; WHILE it is horizontal THE tabs SHALL expose the tab list's orientation as the platform's default for a tab list, which is horizontal. A row without a panel (TAB-42) SHALL expose no orientation in either case, because its arrow keys do not depend on it."},{"id":"TAB-56","text":"WHILE orientation is vertical and the tabs are taller than the space the row has, THE tabs SHALL scroll them vertically inside the track, keeping the track still and the tabs clipped to its shape (TAB-27), and SHALL bring a tab into view along the column as TAB-15 says; WHILE orientation is vertical fullWidth SHALL be ignored, and WHERE it is true a debug build SHALL report it."},{"id":"TAB-57","text":"WHILE orientation is vertical THE tabs SHALL take a drag (TAB-28 to TAB-30) only from a mouse or a pen moved past the slop further up or down than sideways, carrying the active indicator and the underline along the column as TAB-28 says along the row, and SHALL leave every touch to scroll the tabs or whatever holds the row, and every drag that goes sideways first to the page."},{"id":"TAB-58","text":"WHILE orientation is vertical THE tabs SHALL round each corner of the track by the smaller of comp.tabs.track.shape and the active indicator's corner radius (the variant's active-indicator shape, at most half the indicator's height) plus comp.tabs.track.padding, so that the track's corners are concentric with the indicator's on the first and the last tab however tall the column is."},{"id":"TAB-59","text":"WHILE orientation is vertical and the row is linked to a Tab view (TBV-17) THE tabs SHALL draw indicatorOffset (TAB-26) along the column, between the selected tab and the enabled tab below it (above 0) or above it (below 0); the row a Tab view draws itself (TBV-16) is horizontal."},{"id":"TAB-60","text":"WHEN orientation names a value the tabs do not define THE tabs SHALL lay the tabs out horizontally, and in debug builds report the value."},{"id":"TAB-61","text":"WHILE orientation is vertical and a tab's label is wider than its tab less the padding of the row's size on each side (and, beside an icon, less the icon and comp.tabs.container.gap) — a column narrower than its widest tab — THE tabs SHALL truncate the label at the end of its own direction (TAB-33) with an ellipsis, on one line, and SHALL show it whole as TAB-25 says."},{"id":"TAB-62","text":"WHERE the platform has ARIA attributes (the web), WHEN the product sets an aria- attribute on the row's host, by the attribute or by the ARIA property that reflects it, THE tabs SHALL move it to the data-aria- attribute of the same name, so that the host is no second node with its name, description or state, and SHALL expose it on the element that carries the row's role (its tab list, or its radio group while the row has no panel) — an id reference by the elements it names in the host's tree or a tree around it. WHEN the product removes the aria- attribute or its data-aria- twin, or sets the ARIA property that reflects it (ariaLabel, ariaDescribedByElements…) to null, THE tabs SHALL take it off that element. A tab's host carries the tab's role itself, so what the product writes on it is not moved, but for a name: WHILE a tab's label is not empty THE tabs SHALL hold the product's aria-label and aria-labelledby on that host as their data-aria- twins, so that label is the tab's whole name although the platform gives aria-labelledby the precedence (TAB-22), and WHEN label is emptied SHALL give them back as they were written; WHEN the product removes one, or its data-aria- twin, or sets the ARIA property that reflects it to null, THE tabs SHALL take it away."},{"id":"TAB-63","text":"WHEN the control height (dial.control.height) is N THE tabs' default row SHALL be N tall: a tab of a medium row whose icon does not stand above its label SHALL be drawn at comp.tabs.container.height.medium, which is sys.control.height.medium held at sys.target.minimum, and a tab of a small row at comp.tabs.container.height.small, the small step, so that a row of tabs stands as tall as the Buttons and fields beside it; a primary tab with its icon above its label holds two lines and keeps comp.tabs.container.height-with-icon. The pointer and touch targets SHALL still hold a tab up where they are taller."}],"accessibility":{"role":"tablist (radiogroup while the row has no panel)","keyboard":[{"keys":"Tab / Shift+Tab","action":"Moves focus to the selected tab, and from it into its panel or, where the row has no panel, to whatever follows the row."},{"keys":"Right Arrow / Left Arrow","action":"Horizontal, or any row without panels: moves focus to the next or previous enabled tab, wrapping, and selects it (mirrored in right-to-left layouts). Vertical with panels: does nothing."},{"keys":"Down Arrow / Up Arrow","action":"Vertical, or any row without panels: moves focus to the next or previous enabled tab, wrapping, and selects it. Horizontal with panels: does nothing (the page scrolls)."},{"keys":"Home / End","action":"Moves focus to the first or last enabled tab and selects it."},{"keys":"Enter or Space","action":"Selects the focused tab (needed only after the product has moved focus without selecting)."},{"keys":"Escape (during a drag)","action":"Cancels a drag that a pointer has in progress; the indicator returns to the selected tab and nothing is selected."}],"labeling":"Each tab is named by its label, drawn or not (labelHidden), and whole even when it is drawn truncated. The row is named by its own label, which in a row without panels says what is chosen. The selected tab's panel is named by its tab; a row with no panel names nothing but itself and its tabs. Icons, the covered copies of labels and icons, the track, the indicator, the underline and the divider are decorative.","minimumTarget":true,"notes":["Activation is automatic: moving focus with the arrow keys selects the tab, as the WAI-ARIA tabs pattern recommends when a panel shows without a noticeable delay. A product whose panels load slowly shows a loading state in the panel; a manual mode (focus first, Enter to select) can be added later as a new prop without breaking this spec.","Tabs and the switch share one model: a thumb on a track that slides to what is chosen and follows a finger. A switch has two states, and its track, outline and handle differ between them; tabs have two or more equal choices, so their track never changes and the active indicator alone moves.","The drag is never the only way (WCAG 2.5.7): every tab is selected by a single tap or click on it, and by the arrow keys. With a screen reader running, a one-finger drag belongs to the reader; tabs are then selected by the reader's activation, as before.","A drag changes what is drawn, continuously (the indicator's place and width, and the labels' colors under it), and nothing that assistive technology is told: no tab is exposed as selected on the way, no panel changes, and no change is emitted for the tabs the indicator passes (TAB-30). There is no threshold in the look; the place where two tabs meet decides only what a release chooses.","Selection is the row's: value holds the selected tab's value, and change carries the new one. A tab's disabled is its own.","Web: `tanrei-tab-panel` elements are matched to tabs by their `value` attribute, whether they are the row's children or a linked `tanrei-tab-view`'s, and get role tabpanel, aria-labelledby and the tab's aria-controls; a row with none is a radio group of radios (TAB-42). SwiftUI, Compose, Flutter and React Native have no tab panel role; there the selected panel follows the row in reading order, and each README says so.","Tabs switch views of one subject. Moving between destinations of an app belongs to the navigation bar or drawer.","A Tab view (`tab-view`) draws its own row of tabs from its panels by default, or is linked to a row placed elsewhere; either way it holds the panels. The link is by value: the Tab view shows the panel of `value`, follows the tabs when a tab is selected, and sets `value` on both and emits its own change when the user swipes it (TBV-2, TBV-4). While a swipe is in progress it sets `indicatorOffset`, which places the active indicator and the underline between two tabs (TAB-26); TAB-24 makes the covered colors follow the indicator wherever it is drawn. A drag across the row and a swipe of the view are one gesture in two places: the indicator follows the finger, the selection is made on release (from halfway, or by a fling), a cancelled gesture returns it, and nothing is announced before the release. They differ in reach: a swipe moves one panel, and the panels travel with it; a drag across the row can pass several tabs, and the panels wait for the release, then switch as for a selected tab (TBV-2). A row without a Tab view shows its own panels (TAB-13).","Text size never hides a label: a tab that hugs its content grows wider and the row scrolls; a tab that shares the row's width truncates its label, which stays the tab's accessible name and is shown whole where the platform can (TAB-25). A product whose labels are long, translated, written by users, or read at large text sizes keeps the default hug.","How a state looks is a value decision of the active design system; components read the state's tokens and never compute the effect themselves.","A shared choice (group) is one decision shown in many places: a person who picks a platform, a language or a unit once should not be asked again by every sample on the page. The rows that follow change silently and at once (TAB-38): nothing is announced, focus stays on the tab the person used, and each row tells assistive technology its selected tab when the person reaches it. A change of content elsewhere on the page is not a change of context (WCAG 3.2.2), but it should not surprise: rows of one group carry the same labels for the same values (WCAG 3.2.4), and a product whose rows are far apart says near the first one that the choice applies to the whole page.","Tabs of different rows are matched by value, never by label, so a choice survives a translated label, an icon-only tab and a change of wording, and a remembered choice still holds after the person changes language.","Remembering (rememberAs) is off unless the product names a key, and what is kept is one short string the product itself wrote as a tab's value: no text a person typed, no identifier, nothing sent anywhere by the component. Whether keeping a preference on the device needs the person's consent where the product is used is the product's to decide, which is why there is no default key and no remembering by default. A person who blocks storage loses nothing but the memory (TAB-39).","The page does not move under the person (TAB-40): a row whose choice changes the height of samples above it stays under the pointer and under keyboard focus, which is what WCAG 2.4.3 and 3.2.2 ask of a control that changes content elsewhere, and what keeps a person using magnification from losing their place.","A row without panels (TAB-42) is still drawn as tabs when one choice changes what is shown below it: Day, Week and Month over a calendar; Standard, Medium and High over the examples of a page; a unit over a table; a filter over a list. It is announced as what it is, one choice among a few: a radio group named by the row's label, whose tabs are radio buttons, the selected one checked. A tab list promises panels: in the WAI-ARIA tabs pattern every tab controls the panel it shows, and a screen reader that says \"tab\" tells a person that a panel follows, so a tab list with no panel is announced wrongly. The radio group keeps what a person does the same: one Tab stop, and arrows that move and select, as a radio group's arrows check what they reach. The row knows which it is from what it holds — its own panels, a Tab view's, or the panel of a component that draws it — and not from a prop, so what it says can never disagree with what follows it: a row is a tab list from the moment it has a panel. The row's label tells a person what they are choosing, and the product draws the result after the row in reading order where it can, so that a person who has chosen finds it by reading on; where the choice reaches the whole page, the label or the words beside the row say so. A choice that sets a value sent with a form is radio buttons, which the form submits.","Variant, track, size and transition say how the row looks and moves, never what it is: every combination is exposed alike, as a tab list where the row has a panel and as a radio group where it has none (TAB-42), with one keyboard model (TAB-49, TAB-50). Primary is the row of a screen's main views, secondary a row inside one of them, tonal the quiet row — in the heading of a sample, in a header, in a toolbar — where the choice should not draw the eye from what it changes.","The selected tab is told to assistive technology as a state, and to sight by the indicator and by its label. A tonal row's indicator is a quiet mark on purpose: in the default system a layer about 1.4:1 from what it lies on, the same step on the track and on any surface, with the selected label darker than the others. It is not held to 3:1 against its ground, as the selected destination of a navigation drawer is not. A person who needs more has the system's medium and high contrast and the platform's forced colors, where the indicator is a filled highlight (TAB-45); a product that cannot accept the quiet mark uses secondary or primary, which are filled.","Without its track (TAB-49) a row has no ground of its own: its labels are held on every surface role of the system, and a product that places a row on a color of its own checks the labels against it, as it does for text.","A small row (TAB-44) is 36 tall in the default system, the minimum target (TAB-5, WCAG 2.5.8). Where a system sets a taller target, its hit area reaches above and below it, which a header or a toolbar has room for. Directly over content that answers a press at its top edge, that content wins the overlap; a product that stacks a small row tight against such content uses the medium size.","transition none (TAB-43) takes away the motion the row plays by itself when the selection changes, in every motion setting; it takes away no way of selecting, and a drag across the row still carries the indicator under the finger. Where motion is reduced every row is drawn that way, and the state colors then change at once too (TAB-23), a ripple appearing whole (TAB-9).","A vertical tab list (orientation vertical) is still tabs: one subject's views, the categories of a settings page or the sections of one record, with the arrow keys of its axis (Down and Up); a column without panels is a radio group, whose arrows move in both axes (TAB-42). It is not a menu of destinations — moving between the pages of an app belongs to the navigation drawer, whose items are links. A column never wraps a label: a column narrower than its widest tab truncates the label, which stays the tab's whole name, and shows it whole in a tooltip (TAB-61)."]},"tokens":"comp.tabs","fixtures":[{"id":"primary","props":{"variant":"primary","value":"overview","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}]},{"id":"secondary","props":{"variant":"secondary","value":"overview","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}]},{"id":"primary-fill","props":{"variant":"primary","fullWidth":true,"value":"overview","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}]},{"id":"secondary-fill","props":{"variant":"secondary","fullWidth":true,"value":"overview","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}]},{"id":"primary-fill-truncated","props":{"variant":"primary","fullWidth":true,"value":"notifications","label":"Account"},"items":[{"kind":"tab","props":{"value":"profile","label":"Profile"}},{"kind":"tab","props":{"value":"activity","label":"Recent activity"}},{"kind":"tab","props":{"value":"notifications","label":"Notification settings"}}]},{"id":"primary-icons","props":{"variant":"primary","value":"overview"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview","icon":"dashboard"}},{"kind":"tab","props":{"value":"activity","label":"Activity","icon":"history"}},{"kind":"tab","props":{"value":"settings","label":"Settings","icon":"settings"}}]},{"id":"secondary-icons","props":{"variant":"secondary","value":"overview"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview","icon":"dashboard"}},{"kind":"tab","props":{"value":"activity","label":"Activity","icon":"history"}},{"kind":"tab","props":{"value":"settings","label":"Settings","icon":"settings"}}]},{"id":"secondary-icons-fill","props":{"variant":"secondary","fullWidth":true,"value":"overview"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview","icon":"dashboard"}},{"kind":"tab","props":{"value":"activity","label":"Activity","icon":"history"}},{"kind":"tab","props":{"value":"settings","label":"Settings","icon":"settings"}}]},{"id":"primary-icon-only","props":{"variant":"primary","value":"overview"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview","icon":"dashboard","labelHidden":true}},{"kind":"tab","props":{"value":"activity","label":"Activity","icon":"history","labelHidden":true}},{"kind":"tab","props":{"value":"settings","label":"Settings","icon":"settings","labelHidden":true}}]},{"id":"primary-icon-only-fill","props":{"variant":"primary","fullWidth":true,"value":"overview"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview","icon":"dashboard","labelHidden":true}},{"kind":"tab","props":{"value":"activity","label":"Activity","icon":"history","labelHidden":true}},{"kind":"tab","props":{"value":"settings","label":"Settings","icon":"settings","labelHidden":true}}]},{"id":"primary-single-characters","props":{"variant":"primary","value":"m","label":"Size"},"items":[{"kind":"tab","props":{"value":"s","label":"S"}},{"kind":"tab","props":{"value":"m","label":"M"}},{"kind":"tab","props":{"value":"l","label":"L"}},{"kind":"tab","props":{"value":"custom","label":"Custom"}}]},{"id":"primary-second-selected","props":{"variant":"primary","value":"activity"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}]},{"id":"primary-scrollable","props":{"variant":"primary","value":"overview"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"deployments","label":"Deployments"}},{"kind":"tab","props":{"value":"analytics","label":"Analytics"}},{"kind":"tab","props":{"value":"logs","label":"Logs"}},{"kind":"tab","props":{"value":"storage","label":"Storage"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}]},{"id":"secondary-scrollable","props":{"variant":"secondary","value":"analytics"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"deployments","label":"Deployments"}},{"kind":"tab","props":{"value":"analytics","label":"Analytics"}},{"kind":"tab","props":{"value":"logs","label":"Logs"}},{"kind":"tab","props":{"value":"storage","label":"Storage"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}]},{"id":"primary-disabled","props":{"variant":"primary","value":"overview"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"billing","label":"Billing","disabled":true}}]},{"id":"secondary-disabled","props":{"variant":"secondary","value":"overview"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"billing","label":"Billing","disabled":true}}]},{"id":"primary-selected-disabled","props":{"variant":"primary","value":"billing"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"billing","label":"Billing","disabled":true}}]},{"id":"primary-two-icons","props":{"variant":"primary","value":"light","label":"Theme"},"items":[{"kind":"tab","props":{"value":"light","label":"Light","icon":"light_mode","labelHidden":true}},{"kind":"tab","props":{"value":"dark","label":"Dark","icon":"dark_mode","labelHidden":true}}]},{"id":"primary-two-icons-second-selected","props":{"variant":"primary","value":"dark","label":"Theme"},"items":[{"kind":"tab","props":{"value":"light","label":"Light","icon":"light_mode","labelHidden":true}},{"kind":"tab","props":{"value":"dark","label":"Dark","icon":"dark_mode","labelHidden":true}}]},{"id":"secondary-two-icons","props":{"variant":"secondary","value":"light","label":"Theme"},"items":[{"kind":"tab","props":{"value":"light","label":"Light","icon":"light_mode","labelHidden":true}},{"kind":"tab","props":{"value":"dark","label":"Dark","icon":"dark_mode","labelHidden":true}}]},{"id":"shared-choice","props":{"variant":"primary","value":"flutter","label":"Platform","group":"fixture-platform"},"items":[{"kind":"tab","props":{"value":"web","label":"Web"}},{"kind":"tab","props":{"value":"react","label":"React"}},{"kind":"tab","props":{"value":"swiftui","label":"SwiftUI"}},{"kind":"tab","props":{"value":"flutter","label":"Flutter"}}]},{"id":"shared-choice-lacking","props":{"variant":"primary","value":"react","label":"Platform","group":"fixture-platform"},"items":[{"kind":"tab","props":{"value":"web","label":"Web"}},{"kind":"tab","props":{"value":"react","label":"React"}}]},{"id":"tonal","props":{"variant":"tonal","value":"overview","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}]},{"id":"primary-no-track","props":{"variant":"primary","track":false,"value":"overview","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}]},{"id":"secondary-no-track","props":{"variant":"secondary","track":false,"value":"overview","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}]},{"id":"tonal-no-track","props":{"variant":"tonal","track":false,"value":"overview","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}]},{"id":"primary-small","props":{"variant":"primary","size":"small","value":"overview","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}]},{"id":"secondary-small","props":{"variant":"secondary","size":"small","value":"overview","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}]},{"id":"tonal-small","props":{"variant":"tonal","size":"small","value":"overview","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}]},{"id":"primary-small-no-track","props":{"variant":"primary","size":"small","track":false,"value":"overview","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}]},{"id":"secondary-small-no-track","props":{"variant":"secondary","size":"small","track":false,"value":"overview","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}]},{"id":"tonal-small-no-track","props":{"variant":"tonal","size":"small","track":false,"value":"overview","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}]},{"id":"tonal-track-on","props":{"variant":"tonal","track":true,"value":"overview","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}]},{"id":"tonal-fill","props":{"variant":"tonal","fullWidth":true,"value":"overview","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}]},{"id":"tonal-no-track-fill","props":{"variant":"tonal","track":false,"fullWidth":true,"value":"overview","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}]},{"id":"primary-small-fill","props":{"variant":"primary","size":"small","fullWidth":true,"value":"overview","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}]},{"id":"tonal-small-no-track-fill","props":{"variant":"tonal","size":"small","track":false,"fullWidth":true,"value":"standard","label":"Contrast"},"items":[{"kind":"tab","props":{"value":"standard","label":"Standard"}},{"kind":"tab","props":{"value":"medium","label":"Medium"}},{"kind":"tab","props":{"value":"high","label":"High"}}]},{"id":"tonal-small-no-track-fill-truncated","props":{"variant":"tonal","size":"small","track":false,"fullWidth":true,"value":"notifications","label":"Account"},"items":[{"kind":"tab","props":{"value":"profile","label":"Profile"}},{"kind":"tab","props":{"value":"activity","label":"Recent activity"}},{"kind":"tab","props":{"value":"notifications","label":"Notification settings"}}]},{"id":"tonal-second-selected","props":{"variant":"tonal","value":"activity","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}]},{"id":"tonal-no-track-second-selected","props":{"variant":"tonal","track":false,"value":"activity","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}]},{"id":"tonal-icons","props":{"variant":"tonal","value":"board"},"items":[{"kind":"tab","props":{"value":"board","label":"Board","icon":"dashboard"}},{"kind":"tab","props":{"value":"activity","label":"Activity","icon":"history"}},{"kind":"tab","props":{"value":"settings","label":"Settings","icon":"settings"}}]},{"id":"tonal-no-track-icons","props":{"variant":"tonal","track":false,"value":"board"},"items":[{"kind":"tab","props":{"value":"board","label":"Board","icon":"dashboard"}},{"kind":"tab","props":{"value":"activity","label":"Activity","icon":"history"}},{"kind":"tab","props":{"value":"settings","label":"Settings","icon":"settings"}}]},{"id":"primary-small-icons","props":{"variant":"primary","size":"small","value":"overview"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview","icon":"dashboard"}},{"kind":"tab","props":{"value":"activity","label":"Activity","icon":"history"}},{"kind":"tab","props":{"value":"settings","label":"Settings","icon":"settings"}}]},{"id":"secondary-small-icons","props":{"variant":"secondary","size":"small","value":"overview"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview","icon":"dashboard"}},{"kind":"tab","props":{"value":"activity","label":"Activity","icon":"history"}},{"kind":"tab","props":{"value":"settings","label":"Settings","icon":"settings"}}]},{"id":"tonal-small-no-track-icons","props":{"variant":"tonal","size":"small","track":false,"value":"overview"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview","icon":"dashboard"}},{"kind":"tab","props":{"value":"activity","label":"Activity","icon":"history"}},{"kind":"tab","props":{"value":"settings","label":"Settings","icon":"settings"}}]},{"id":"tonal-icon-only","props":{"variant":"tonal","value":"overview"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview","icon":"dashboard","labelHidden":true}},{"kind":"tab","props":{"value":"activity","label":"Activity","icon":"history","labelHidden":true}},{"kind":"tab","props":{"value":"settings","label":"Settings","icon":"settings","labelHidden":true}}]},{"id":"tonal-no-track-icon-only","props":{"variant":"tonal","track":false,"value":"overview"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview","icon":"dashboard","labelHidden":true}},{"kind":"tab","props":{"value":"activity","label":"Activity","icon":"history","labelHidden":true}},{"kind":"tab","props":{"value":"settings","label":"Settings","icon":"settings","labelHidden":true}}]},{"id":"primary-no-track-icon-only","props":{"variant":"primary","track":false,"value":"overview"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview","icon":"dashboard","labelHidden":true}},{"kind":"tab","props":{"value":"activity","label":"Activity","icon":"history","labelHidden":true}},{"kind":"tab","props":{"value":"settings","label":"Settings","icon":"settings","labelHidden":true}}]},{"id":"primary-small-icon-only","props":{"variant":"primary","size":"small","value":"overview"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview","icon":"dashboard","labelHidden":true}},{"kind":"tab","props":{"value":"activity","label":"Activity","icon":"history","labelHidden":true}},{"kind":"tab","props":{"value":"settings","label":"Settings","icon":"settings","labelHidden":true}}]},{"id":"tonal-small-no-track-icon-only","props":{"variant":"tonal","size":"small","track":false,"value":"overview"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview","icon":"dashboard","labelHidden":true}},{"kind":"tab","props":{"value":"activity","label":"Activity","icon":"history","labelHidden":true}},{"kind":"tab","props":{"value":"settings","label":"Settings","icon":"settings","labelHidden":true}}]},{"id":"primary-small-single-characters","props":{"variant":"primary","size":"small","value":"m","label":"Size"},"items":[{"kind":"tab","props":{"value":"s","label":"S"}},{"kind":"tab","props":{"value":"m","label":"M"}},{"kind":"tab","props":{"value":"l","label":"L"}},{"kind":"tab","props":{"value":"custom","label":"Custom"}}]},{"id":"tonal-disabled","props":{"variant":"tonal","value":"overview"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"billing","label":"Billing","disabled":true}}]},{"id":"tonal-selected-disabled","props":{"variant":"tonal","value":"billing"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"billing","label":"Billing","disabled":true}}]},{"id":"tonal-no-track-disabled","props":{"variant":"tonal","track":false,"value":"overview"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"billing","label":"Billing","disabled":true}}]},{"id":"tonal-no-track-selected-disabled","props":{"variant":"tonal","track":false,"value":"billing"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"billing","label":"Billing","disabled":true}}]},{"id":"primary-no-track-disabled","props":{"variant":"primary","track":false,"value":"overview"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"billing","label":"Billing","disabled":true}}]},{"id":"secondary-no-track-selected-disabled","props":{"variant":"secondary","track":false,"value":"billing"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"billing","label":"Billing","disabled":true}}]},{"id":"primary-small-disabled","props":{"variant":"primary","size":"small","value":"overview"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"billing","label":"Billing","disabled":true}}]},{"id":"tonal-small-no-track-disabled","props":{"variant":"tonal","size":"small","track":false,"value":"overview"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"billing","label":"Billing","disabled":true}}]},{"id":"primary-long-labels","props":{"variant":"primary","value":"notifications","label":"Account"},"items":[{"kind":"tab","props":{"value":"profile","label":"Profile and sign-in"}},{"kind":"tab","props":{"value":"notifications","label":"Notification settings"}},{"kind":"tab","props":{"value":"billing","label":"Billing and invoices"}},{"kind":"tab","props":{"value":"members","label":"Members and permissions"}},{"kind":"tab","props":{"value":"integrations","label":"Connected services"}}]},{"id":"tonal-long-labels","props":{"variant":"tonal","value":"notifications","label":"Account"},"items":[{"kind":"tab","props":{"value":"profile","label":"Profile and sign-in"}},{"kind":"tab","props":{"value":"notifications","label":"Notification settings"}},{"kind":"tab","props":{"value":"billing","label":"Billing and invoices"}},{"kind":"tab","props":{"value":"members","label":"Members and permissions"}},{"kind":"tab","props":{"value":"integrations","label":"Connected services"}}]},{"id":"tonal-no-track-long-labels","props":{"variant":"tonal","track":false,"value":"notifications","label":"Account"},"items":[{"kind":"tab","props":{"value":"profile","label":"Profile and sign-in"}},{"kind":"tab","props":{"value":"notifications","label":"Notification settings"}},{"kind":"tab","props":{"value":"billing","label":"Billing and invoices"}},{"kind":"tab","props":{"value":"members","label":"Members and permissions"}},{"kind":"tab","props":{"value":"integrations","label":"Connected services"}}]},{"id":"primary-small-long-labels","props":{"variant":"primary","size":"small","value":"notifications","label":"Account"},"items":[{"kind":"tab","props":{"value":"profile","label":"Profile and sign-in"}},{"kind":"tab","props":{"value":"notifications","label":"Notification settings"}},{"kind":"tab","props":{"value":"billing","label":"Billing and invoices"}},{"kind":"tab","props":{"value":"members","label":"Members and permissions"}},{"kind":"tab","props":{"value":"integrations","label":"Connected services"}}]},{"id":"tonal-small-no-track-long-labels","props":{"variant":"tonal","size":"small","track":false,"value":"notifications","label":"Account"},"items":[{"kind":"tab","props":{"value":"profile","label":"Profile and sign-in"}},{"kind":"tab","props":{"value":"notifications","label":"Notification settings"}},{"kind":"tab","props":{"value":"billing","label":"Billing and invoices"}},{"kind":"tab","props":{"value":"members","label":"Members and permissions"}},{"kind":"tab","props":{"value":"integrations","label":"Connected services"}}]},{"id":"primary-rtl","props":{"variant":"primary","value":"overview","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}],"direction":"rtl"},{"id":"secondary-rtl","props":{"variant":"secondary","value":"overview","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}],"direction":"rtl"},{"id":"tonal-rtl","props":{"variant":"tonal","value":"overview","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}],"direction":"rtl"},{"id":"tonal-no-track-rtl","props":{"variant":"tonal","track":false,"value":"overview","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}],"direction":"rtl"},{"id":"primary-small-rtl","props":{"variant":"primary","size":"small","value":"overview","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}],"direction":"rtl"},{"id":"tonal-small-no-track-rtl","props":{"variant":"tonal","size":"small","track":false,"value":"standard","label":"التباين"},"items":[{"kind":"tab","props":{"value":"standard","label":"قياسي"}},{"kind":"tab","props":{"value":"medium","label":"متوسط"}},{"kind":"tab","props":{"value":"high","label":"عالٍ"}}],"direction":"rtl"},{"id":"tonal-small-no-track-icons-rtl","props":{"variant":"tonal","size":"small","track":false,"value":"activity"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview","icon":"dashboard"}},{"kind":"tab","props":{"value":"activity","label":"Activity","icon":"history"}},{"kind":"tab","props":{"value":"settings","label":"Settings","icon":"settings"}}],"direction":"rtl"},{"id":"tonal-small-no-track-long-labels-rtl","props":{"variant":"tonal","size":"small","track":false,"value":"notifications","label":"Account"},"items":[{"kind":"tab","props":{"value":"profile","label":"Profile and sign-in"}},{"kind":"tab","props":{"value":"notifications","label":"Notification settings"}},{"kind":"tab","props":{"value":"billing","label":"Billing and invoices"}},{"kind":"tab","props":{"value":"members","label":"Members and permissions"}},{"kind":"tab","props":{"value":"integrations","label":"Connected services"}}],"direction":"rtl"},{"id":"primary-no-transition","props":{"variant":"primary","transition":"none","value":"overview","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}]},{"id":"tonal-no-transition","props":{"variant":"tonal","transition":"none","value":"overview","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}]},{"id":"primary-slide","props":{"variant":"primary","transition":"slide","value":"overview","label":"Project"},"items":[{"kind":"tab","props":{"value":"overview","label":"Overview"}},{"kind":"tab","props":{"value":"activity","label":"Activity"}},{"kind":"tab","props":{"value":"settings","label":"Settings"}}]},{"id":"tonal-small-no-track-no-transition","props":{"variant":"tonal","size":"small","track":false,"transition":"none","value":"standard","label":"Contrast"},"items":[{"kind":"tab","props":{"value":"standard","label":"Standard"}},{"kind":"tab","props":{"value":"medium","label":"Medium"}},{"kind":"tab","props":{"value":"high","label":"High"}}]},{"id":"tonal-no-track-no-transition","props":{"variant":"tonal","track":false,"transition":"none","value":"web","label":"Platform"},"items":[{"kind":"tab","props":{"value":"web","label":"Web"}},{"kind":"tab","props":{"value":"react","label":"React"}},{"kind":"tab","props":{"value":"swiftui","label":"SwiftUI"}},{"kind":"tab","props":{"value":"compose","label":"Compose"}},{"kind":"tab","props":{"value":"flutter","label":"Flutter"}}]},{"id":"vertical","props":{"variant":"primary","orientation":"vertical","value":"general","label":"Settings"},"items":[{"kind":"tab","props":{"value":"general","label":"General","icon":"settings"}},{"kind":"tab","props":{"value":"notifications","label":"Notifications","icon":"notifications"}},{"kind":"tab","props":{"value":"privacy","label":"Privacy","icon":"lock"}},{"kind":"tab","props":{"value":"appearance","label":"Appearance","icon":"palette"}},{"kind":"tab","props":{"value":"accessibility","label":"Accessibility","icon":"accessibility_new"}}]},{"id":"vertical-small","props":{"variant":"primary","size":"small","orientation":"vertical","value":"general","label":"Settings"},"items":[{"kind":"tab","props":{"value":"general","label":"General","icon":"settings"}},{"kind":"tab","props":{"value":"notifications","label":"Notifications","icon":"notifications"}},{"kind":"tab","props":{"value":"privacy","label":"Privacy","icon":"lock"}},{"kind":"tab","props":{"value":"appearance","label":"Appearance","icon":"palette"}},{"kind":"tab","props":{"value":"accessibility","label":"Accessibility","icon":"accessibility_new"}}]},{"id":"vertical-scroll","props":{"variant":"primary","orientation":"vertical","value":"november","label":"Month"},"items":[{"kind":"tab","props":{"value":"january","label":"January"}},{"kind":"tab","props":{"value":"february","label":"February"}},{"kind":"tab","props":{"value":"march","label":"March"}},{"kind":"tab","props":{"value":"april","label":"April"}},{"kind":"tab","props":{"value":"may","label":"May"}},{"kind":"tab","props":{"value":"june","label":"June"}},{"kind":"tab","props":{"value":"july","label":"July"}},{"kind":"tab","props":{"value":"august","label":"August"}},{"kind":"tab","props":{"value":"september","label":"September"}},{"kind":"tab","props":{"value":"october","label":"October"}},{"kind":"tab","props":{"value":"november","label":"November"}},{"kind":"tab","props":{"value":"december","label":"December"}}]},{"id":"vertical-rtl","props":{"variant":"primary","orientation":"vertical","value":"notifications","label":"Settings"},"items":[{"kind":"tab","props":{"value":"general","label":"General","icon":"settings"}},{"kind":"tab","props":{"value":"notifications","label":"Notifications","icon":"notifications"}},{"kind":"tab","props":{"value":"privacy","label":"Privacy","icon":"lock"}},{"kind":"tab","props":{"value":"appearance","label":"Appearance","icon":"palette"}},{"kind":"tab","props":{"value":"accessibility","label":"Accessibility","icon":"accessibility_new"}}],"direction":"rtl"},{"id":"vertical-disabled-tab","props":{"variant":"primary","orientation":"vertical","value":"general","label":"Settings"},"items":[{"kind":"tab","props":{"value":"general","label":"General","icon":"settings"}},{"kind":"tab","props":{"value":"notifications","label":"Notifications","icon":"notifications"}},{"kind":"tab","props":{"value":"privacy","label":"Privacy","icon":"lock","disabled":true}},{"kind":"tab","props":{"value":"appearance","label":"Appearance","icon":"palette"}},{"kind":"tab","props":{"value":"accessibility","label":"Accessibility","icon":"accessibility_new"}}]},{"id":"vertical-secondary","props":{"variant":"secondary","orientation":"vertical","value":"notifications","label":"Settings"},"items":[{"kind":"tab","props":{"value":"general","label":"General","icon":"settings"}},{"kind":"tab","props":{"value":"notifications","label":"Notifications","icon":"notifications"}},{"kind":"tab","props":{"value":"privacy","label":"Privacy","icon":"lock"}},{"kind":"tab","props":{"value":"appearance","label":"Appearance","icon":"palette"}},{"kind":"tab","props":{"value":"accessibility","label":"Accessibility","icon":"accessibility_new"}}]},{"id":"vertical-no-track","props":{"variant":"tonal","orientation":"vertical","track":false,"value":"notifications","label":"Settings"},"items":[{"kind":"tab","props":{"value":"general","label":"General","icon":"settings"}},{"kind":"tab","props":{"value":"notifications","label":"Notifications","icon":"notifications"}},{"kind":"tab","props":{"value":"privacy","label":"Privacy","icon":"lock"}},{"kind":"tab","props":{"value":"appearance","label":"Appearance","icon":"palette"}},{"kind":"tab","props":{"value":"accessibility","label":"Accessibility","icon":"accessibility_new"}}]}],"platforms":{"web":{"status":"lagging","name":"tanrei-tabs","props":{"variant":"variant","size":"size","track":"track","fullWidth":"fullWidth","orientation":"orientation","value":"value","indicatorOffset":"indicatorOffset","transition":"transition","label":"label","group":"group","rememberAs":"rememberAs"},"events":{"change":"change"},"items":{"tab":{"name":"tanrei-tab","props":{"value":"value","label":"label","icon":"icon","labelHidden":"labelHidden","disabled":"disabled"},"notes":"A child element: `<tanrei-tab value=\"overview\" label=\"Overview\" icon=\"dashboard\">`, with `label-hidden` and `disabled` attributes, as `<option>` in a `<select>`. `data-mirror` (`auto`, the default; `always`; `never`) on a `<tanrei-tab>` is the product's word on mirroring the icon it names, in both of its copies (TAB-32), as on a glyph the product places itself."}},"parts":{"tablist":"tablist","track":"track","container":"tanrei-tab container","state-layer":"tanrei-tab state-layer","icon":"tanrei-tab icon","label":"tanrei-tab label","active-indicator":"tanrei-tab active-indicator","covered-icon":"tanrei-tab covered-icon","covered-label":"tanrei-tab covered-label","underline":"tanrei-tab underline","divider":"divider","panel":"tanrei-tab-panel","focus-ring":"tanrei-tab state-layer@focus-ring"},"notes":"`tanrei-tabs` (variant, full-width, value, label) holds `tanrei-tab` children and, after them, `tanrei-tab-panel` children matched to tabs by their `value` attribute, or is drawn by a `tanrei-tab-view` as its own row, or is named by a linked `tanrei-tab-view` (`tabs=\"<id>\"`) whose `tanrei-tab-panel` children take their place. `indicatorOffset` is a property only, with no attribute: the Tab view writes it in every frame of a drag. `value` names the selected tab, as a `<select>`'s does. It sets role tablist, tab and tabpanel, aria-selected, aria-controls and aria-labelledby (radiogroup and radio with aria-checked on a row without panels, TAB-42), hides the panels that are not selected, and gives a panel with no focusable content tabindex 0. It sets its own `value` before firing `change`, as a native control does. The covered copy of a label and icon (TAB-24) is an `aria-hidden` layer clipped with `clip-path` to the indicator's box, animated with it; a truncated label (`text-overflow: ellipsis`) shows the whole label in a plain tooltip (TAB-25) without `aria-describedby`, since it is already the name. The track is the row's own background, and the tabs scroll inside it. A drag (TAB-28 to TAB-30) is followed with Pointer Events: `pointerdown` on the row, `setPointerCapture` once the drag is taken, `pointermove` placing the indicator, `pointerup` choosing the tab, and `pointercancel`, `lostpointercapture` or Escape cancelling; the `click` that follows a taken drag is swallowed, and `aria-selected` is written only on the release. The in-between look needs no second mechanism: the indicator's inset and width are the same custom properties a slide transitions, written in each frame of a drag, and the covered copy's `clip-path` follows them, so a drag and a slide draw the same frames. `touch-action: pan-y` on a row that does not scroll (and on the selected tab of one that does) leaves sideways drags to the row and vertical ones to the page. A shared choice: `group` and `remember-as` are attributes with the properties `group` and `rememberAs`. A group is the `tanrei-tabs` of one document that name it, those inside shadow trees and those a `tanrei-tab-view` drew included; an iframe is another document. The members and the choice are kept by the module, in a map from the name, and never in the DOM. `remember-as` is a key of the origin's `localStorage`, read synchronously before the row's first render and at most once for each key, every access inside `try`, so a browser that blocks storage or throws on it costs nothing but the memory; a key is the product's to namespace, since `localStorage` is shared by everything on the origin. A member that follows is written (`value`, `aria-selected`, its panels' `hidden`) with its slide and its color transition off for that frame. For TAB-40 the row acted on reads its `getBoundingClientRect().top` before the group is written and once more after, and moves `scrollTop` of its nearest scrolling ancestor (the document's scrolling element where none is nearer) by the difference with `behavior: 'instant'`; a browser that anchors scrolling itself has by then moved some or all of the way, and the row corrects only what is left, so the two never add up. `change` bubbles, so one listener on the document hears each choice once and reads the group from `event.target.group`. The first frame of TAB-39 is the first the element draws: before `tanrei-tabs` is defined the element draws nothing of its own, and a product that shows server-rendered rows before then guards that as it guards any element not yet defined. The value `tonal` of `variant`; `size` is an attribute and a property (`small`, `medium`); both axes are open registries (`TanreiTabsVariantRegistry`, `TanreiTabsSizeRegistry` in `registry.ts`, in the Button's form), and each size's five tokens are read through the same private custom properties, set by a block per size as a variant's are. A small row's tab keeps its 36-high box and carries the hit area of TAB-5 as an inset pseudo-element that reaches above and below it, under any interactive content it overlaps; the row itself is not made taller. `track` is a property that is true, false or null: the attribute is absent for null, present for true and `=\"false\"` for false, as the tooltip's `arrow` is; null reads `--tanrei-comp-tabs-track-visible` from the cascade by a style query, as a separation is read, and off sets the track's fill to none and nothing else. `transition` is an attribute and a property (`auto`, `slide`, `none`); auto reads `--tanrei-comp-tabs-motion-transition`, in the stylesheet by a style query and once in the script for the scroll and the settle after a drag; under none the indicator's and the cover's transitions and the selected look's color transition are off, `scrollIntoView` uses `behavior: 'instant'`, and the drag is taken as it is where motion is reduced. The tonal indicator is one element with a translucent background, so its slide and resize never overlap two drawings of it (TAB-50). A row without panels (TAB-42) has role radiogroup where a row with panels has role tablist, with no aria-orientation, and each `tanrei-tab` role radio with aria-checked in place of aria-selected and no aria-controls. The row has a panel while it holds a `tanrei-tab-panel`, while the `tanrei-tab-view` that draws it or is linked to it has a panel for one of its tabs, or while a Tanrei element that draws the row links its own panel to it (the date-time picker links its time section, DTM-13); the roles follow in the update that re-reads the panels. The roles are read from the panels and never set by the product, so a row cannot claim panels it does not have."},"swiftui":{"status":"lagging","name":"TanreiTabs","props":{"variant":"variant","size":"size","track":"track","fullWidth":"fullWidth","orientation":"orientation","value":"selection","indicatorOffset":"link","transition":"transition","label":"label","group":"selection","rememberAs":"selection"},"events":{"change":"selection"},"items":{"tab":{"name":"TanreiTab","props":{"value":"tag","label":"title","icon":"icon","labelHidden":"labelStyle","disabled":"disabled"},"notes":"`TanreiTab(_ title:, icon:) { panel }.tag(value)` in the row's view builder, as `TabView`'s tagged tabs; `.labelStyle(.iconOnly)` is labelHidden; `disabled` follows `.disabled(_:)`."}},"notes":"`TanreiTabs(selection: Binding<V>, variant:, fullWidth:) { TanreiTab … }`: each tab carries its panel, and only the selected one is shown. The binding holds the selected tab's tag; writing it is change. `label` sets the row's `accessibilityLabel`. A truncated label (`.lineLimit(1)`, `.truncationMode(.tail)`) is shown whole by the large-content viewer and by `.help` on macOS (TAB-25). SwiftUI's `TabView` is an app's tab bar (a navigation bar), not this component. Until it catches up it ships `scrollable:` instead of `fullWidth:`, a line indicator and wrapping fixed labels. `link` is the shared `TanreiTabLink` a linked Tab view is passed too: the tabs read the indicator offset (TAB-26) from it and report their order and disabled tabs to the Tab view through it; without a Tab view it is omitted and the offset is 0. The drag is a `DragGesture(minimumDistance:)` on the row, `simultaneousGesture` with the tabs' taps, its `onChanged` placing the indicator and its `onEnded` reading `predictedEndTranslation` for the fling; the binding is written only in `onEnded`. Until it catches up it also draws no track and follows no drag. A shared choice has no parameter here: rows given the same `Binding` show the same choice, which is the group (TAB-36), and SwiftUI redraws them in one frame. The product keeps a row that lacks a value on a binding of its own, since a selection that names none of a row's tabs selects none (TAB-11), and remembers by backing the binding with `@AppStorage` (or `@SceneStorage`), which is restored before the first frame. TAB-37 to TAB-41 describe a group the component keeps, which this platform does not have: every row slides as TAB-17 says for a value the product sets, since the row cannot tell following from being set; the README says so, and says that a `ScrollView` does not hold a row in place when content above it changes height. Not built on this platform yet: the selected label's added weight from `selected.label.emphasis` with every tab keeping the heavier label's width (TAB-16, TAB-50); the selected tab's state layer over its active indicator (TAB-18); the icon's place read from `icon.placement` of the row's size (TAB-18); `variant: .tonal`; `size: TanreiTabsSize` (`.small`, `.medium`); `track: Bool?` (nil reads the generated choice `trackVisible`); `transition: TanreiTabsTransition` (`.auto`, `.slide`, `.none`; `.auto` reads the generated choice), under `.none` the selection is set without `withAnimation` and the `DragGesture` stays. The hit area of a small row is `.contentShape` on a frame of the minimum target. A row whose tabs carry no panel is the single choice of TAB-42: a container named by `label` without the tab bar trait, each tab a button with the selected trait, as a segmented picker is told; until it catches up every row has the tab bar trait."},"compose":{"status":"lagging","name":"TanreiTabs","props":{"variant":"variant","size":"size","track":"track","fullWidth":"fullWidth","orientation":"orientation","value":"selectedValue","indicatorOffset":"link","transition":"transition","label":"contentDescription","group":"selectedValue","rememberAs":"selectedValue"},"events":{"change":"onSelectedValueChange"},"items":{"tab":{"name":"TanreiTab","props":{"value":"value","label":"label","icon":"icon","labelHidden":"labelHidden","disabled":"enabled"},"notes":"`TanreiTab(value, label, icon, labelHidden, enabled)` called in the `TanreiTabs { }` content lambda. `enabled` is the inverse flag."}},"notes":"`TanreiTabs(selectedValue, onSelectedValueChange, variant, fullWidth, contentDescription) { TanreiTab(…) }`, one composable for rows that hug and rows that fill (Material's `PrimaryTabRow`, `SecondaryTabRow` and `ScrollableTabRow` in one). State hoisting: the caller keeps `selectedValue` and moves it from `onSelectedValueChange`. A truncated label (`maxLines = 1`, `TextOverflow.Ellipsis`) is shown whole in a plain tooltip on long press and hover (TAB-25). Compose has no tab panel role: the product shows the selected tab's content below the row. Until it catches up it ships `scrollable` instead of `fullWidth`, a line indicator and wrapping fixed labels. `link` is the shared `rememberTanreiTabLink()` a linked Tab view is passed too: the tabs read the indicator offset (TAB-26) from it and report their order and disabled tabs to the Tab view through it; without a Tab view it is omitted and the offset is 0. The drag is `Modifier.pointerInput` with `detectHorizontalDragGestures` (or `draggable` with a `DraggableState`) on the row, a `VelocityTracker` giving the fling; `onSelectedValueChange` is called only when the drag ends. Until it catches up it also draws no track and follows no drag. A shared choice has no parameter here: rows given the same hoisted `selectedValue` show the same choice, which is the group (TAB-36), and recompose in one frame. The caller gives a row that lacks a value a state of its own, since a selection that names none of a row's tabs selects none (TAB-11), and remembers by keeping the state in DataStore or `SharedPreferences`, read before the first composition. TAB-37 to TAB-41 describe a group the component keeps, which this platform does not have: every row slides as TAB-17 says for a value the product sets, since the row cannot tell following from being set; the README says so, and says that a `LazyColumn` keeps its first visible item in place when items above change height while a scrolling `Column` does not. Not built on this platform yet: the selected label's added weight from `selected.label.emphasis` with every tab keeping the heavier label's width (TAB-16, TAB-50); the selected tab's state layer over its active indicator (TAB-18); the icon's place read from `icon.placement` of the row's size (TAB-18); `TanreiTabsVariant.Tonal`; `size: TanreiTabsSize` (`Small`, `Medium`); `track: Boolean? = null` (null reads the generated choice `trackVisible`); `transition: TanreiTabsTransition` (`Auto`, `Slide`, `None`), under `None` the indicator is placed with `snapTo` in place of `animateTo` and the drag is still detected. The hit area of a small row is `Modifier.minimumInteractiveComponentSize()` outside the drawn box. The row holds no panel here, since the product draws the content below it, so it is the single choice of TAB-42 until a Tab view links one: a `selectableGroup()` named by `contentDescription`, each tab with `Role.RadioButton` and its selected state; until it catches up every tab has `Role.Tab`."},"flutter":{"status":"lagging","name":"TanreiTabBar","props":{"variant":"variant","size":"size","track":"track","fullWidth":"isScrollable","orientation":"direction","value":"value","indicatorOffset":"link","transition":"transition","label":"semanticLabel","group":"value","rememberAs":"value"},"events":{"change":"onChanged"},"items":{"tab":{"name":"TanreiTab","props":{"value":"value","label":"label","icon":"icon","labelHidden":"labelHidden","disabled":"enabled"},"notes":"`TanreiTab<T>(value:, label:, icon:, labelHidden:, enabled:)` widgets in the bar's `tabs:` list."}},"notes":"`TanreiTabBar<T>(value:, onChanged:, variant:, isScrollable:, semanticLabel:, tabs: [TanreiTab<T>(…)])`, as `TabBar` but selected by value rather than by a `TabController`'s index; the caller moves `value` from `onChanged`. `isScrollable` is the inverse of fullWidth, as in Flutter's `TabBar`, and defaults to true (hug). A truncated label (`maxLines: 1`, `TextOverflow.ellipsis`) is shown whole in a `Tooltip` (TAB-25). `TanreiTabBarView` gives way to the Tab view, `TanreiTabView`, which draws a `TanreiTabBar` itself or is linked by `link:`, a `TanreiTabLink<T>` passed to both, as Flutter's `TabController` is shared by a `TabBar` and a `TabBarView`: the bar reads the indicator offset (TAB-26) from it and reports its order and disabled tabs to the view through it. Until it catches up, `TanreiTabBarView<T>(value:, children:, semanticLabels:)` shows the panel of the selected value and does not swipe. Until it catches up it ships `isScrollable` defaulting to false, a line indicator and wrapping fixed labels. The drag is a `GestureDetector`'s `onHorizontalDragStart`, `onHorizontalDragUpdate` and `onHorizontalDragEnd` on the bar, `DragEndDetails.primaryVelocity` giving the fling; `onChanged` is called only from `onHorizontalDragEnd`. Until it catches up it also draws no track and follows no drag. A shared choice has no parameter here: bars given the same `value` from one piece of the product's state show the same choice, which is the group (TAB-36), and rebuild in one frame. The product gives a bar that lacks a value a state of its own, since a selection that names none of a bar's tabs selects none (TAB-11), and remembers with `shared_preferences` or its own store, read before the first build. TAB-37 to TAB-41 describe a group the component keeps, which this platform does not have: every row slides as TAB-17 says for a value the product sets, since the row cannot tell following from being set; the README says so, and says that a scroll view does not hold a bar in place when content above it changes height. Not built on this platform yet: the selected label's added weight from `selected.label.emphasis` with every tab keeping the heavier label's width (TAB-16, TAB-50); the selected tab's state layer over its active indicator (TAB-18); the icon's place read from `icon.placement` of the row's size (TAB-18); `TanreiTabsVariant.tonal`; `size: TanreiTabsSize` (`small`, `medium`); `bool? track` (null reads the generated choice `trackVisible`); `transition: TanreiTabsTransition` (`auto`, `slide`, `none`), under `none` the controller's value is set without `animateTo` and the horizontal drag is still recognised. The hit area of a small row is a `GestureDetector` box of the minimum target with `HitTestBehavior.translucent`. A row with no linked `TanreiTabBarView` holds no panel and is the single choice of TAB-42: each tab is a radio, `Semantics(checked:, inMutuallyExclusiveGroup: true)`, in place of `SemanticsRole.tab` and `selected`; until it catches up every tab has `SemanticsRole.tab`."},"react-native":{"status":"lagging","name":"Tabs","props":{"variant":"variant","size":"size","track":"track","fullWidth":"fullWidth","orientation":"orientation","value":"value","indicatorOffset":"link","transition":"transition","label":"accessibilityLabel","group":"value","rememberAs":"value"},"events":{"change":"onValueChange"},"items":{"tab":{"name":"Tab","props":{"value":"value","label":"label","icon":"icon","labelHidden":"labelHidden","disabled":"disabled"},"notes":"The element type of the row's `items` array: `{ value, label, icon?, labelHidden?, disabled? }`."}},"notes":"`<Tabs items={Tab[]} value onValueChange variant fullWidth accessibilityLabel>`; controlled, the caller moves `value` from `onValueChange` and renders the selected panel below the row. React Native has no tab panel role, and the row holds no panel (the caller renders it), so the row is the single choice of TAB-42: the `radiogroup` role, and each tab the `radio` role with its checked state. Until it catches up the row has the `tablist` role and each tab the `tab` role with its selected state, and the selected panel follows the row in reading order. A truncated label (`numberOfLines={1}`, `ellipsizeMode=\"tail\"`) keeps the whole label as the tab's `accessibilityLabel`; React Native has no tooltip of its own, so it is not shown whole elsewhere (TAB-25: where the platform has an idiom). Until it catches up it ships `scrollable` instead of `fullWidth`, a line indicator and wrapping fixed labels. `link` is the shared `useTabLink()` a linked Tab view is passed too: the tabs read the indicator offset (TAB-26) from it and report their order and disabled tabs to the Tab view through it; without a Tab view it is omitted and the offset is 0. The drag is a `PanResponder` on the row (or React Native Gesture Handler's `Gesture.Pan()` where the product has it), claiming the responder once the drag passes the slop sideways, with the release's `vx` giving the fling; `onValueChange` is called only on release. Until it catches up it also draws no track and follows no drag. A shared choice has no prop here: rows given the same controlled `value` from one piece of the product's state show the same choice, which is the group (TAB-36), and render in one commit. The product gives a row that lacks a value a state of its own, since a selection that names none of a row's tabs selects none (TAB-11), and remembers with AsyncStorage or its own store; AsyncStorage answers after the first frame, so a product that must not show another tab first reads it before it mounts the screen. TAB-37 to TAB-41 describe a group the component keeps, which this platform does not have: every row slides as TAB-17 says for a value the product sets, since the row cannot tell following from being set; the README says so, and says that a `ScrollView` holds a row in place only with `maintainVisibleContentPosition`. Not built on this platform yet: the selected label's added weight from `selected.label.emphasis` with every tab keeping the heavier label's width (TAB-16, TAB-50); the selected tab's state layer over its active indicator (TAB-18); the icon's place read from `icon.placement` of the row's size (TAB-18); `variant=\"tonal\"`; `size` (`\"small\"`, `\"medium\"`); `track?: boolean | null` (null reads the generated choice `trackVisible`); `transition` (`\"auto\"`, `\"slide\"`, `\"none\"`), under `\"none\"` the indicator's value is set with `setValue` in place of `Animated.timing` and the `PanResponder` stays. The hit area of a small row is `hitSlop`."}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"tag-group","title":"Tag group","summary":"Lays out a set of tags or chips in lines that wrap, spaced for what it holds, and exposes the set as one named list; the members stay what they are, and after a chip is removed focus goes on to the next.","level":"base","listing":"default","anatomy":[{"id":"group","description":"The set: lines of members that start at the start edge and wrap. It draws nothing of its own — no container, no fill, no edge, no padding and no label — and is exposed as one list."},{"id":"member","description":"A tag or a chip of the set: placed and spaced by the group, exposed as an item of its list, and otherwise drawn and behaving as it does anywhere."}],"props":[{"name":"spacing","type":"enum","values":["tags","chips"],"default":"chips","description":"What the set holds, which decides the distances between its members. tags: static tags, as close as words of one group. chips: chips, which take input, with lines far enough apart that each chip keeps its whole touch target.","axis":"tanrei.comp.tag-group.spacing"},{"name":"label","type":"string","default":"","description":"The accessible name of the set (\"Tags\", \"Filters\", \"Suggested fonts\"). It is not drawn: a set that needs a visible name stands under the product's own heading or text, and still takes this. Optional where the set is plain from what surrounds it, recommended for a set of chips."},{"name":"selection","type":"enum","values":["none","single","multiple"],"default":"none","description":"Whether the group holds the selection of its filter chips. none: it holds none, and each filter chip holds its own selected, as alone. single: at most one filter chip is on at a time, named by value. multiple: any number are on, named by values. While it is single or multiple the set is one Tab stop and the arrow keys move between its chips."},{"name":"value","type":"string","default":null,"description":"The value of the filter chip that is on while selection is single; null puts none on. The group sets it when a person switches a chip and emits change; the product may also set it."},{"name":"values","type":"strings","default":[],"description":"The values of the filter chips that are on while selection is multiple: a list of strings (the platforms take a set). An empty list puts none on."}],"events":[{"name":"change","description":"While selection is single or multiple, a person switched a filter chip of the set: carries value (single) or values (multiple) after the change, which the group now holds. In place of the chip's own change, which stops at the group (TGR-19)."}],"items":[{"name":"tag","summary":"A Tag of the set: the tag component, placed and spaced by the group and exposed as an item of its list, otherwise drawn and read as it is anywhere.","component":"tag","props":[{"name":"label","type":"string","default":"","description":"Its text, as the Tag's label."},{"name":"variant","type":"enum","values":["tonal","outlined","filled"],"default":"tonal","description":"Its look, as the Tag's variant."},{"name":"status","type":"enum","values":["default","info","warning","error","success"],"default":"default","description":"What it reports, as the Tag's status."},{"name":"size","type":"enum","values":["small","medium"],"default":"medium","description":"Its height, as the Tag's size. Give every member of a group the same size."},{"name":"icon","type":"string","default":"","description":"The glyph in the Tag's icon slot, by its name in the system's icon set. Empty for none. It is how a fixture fills that slot; in an application the slot is filled as the Tag's own spec says."}]},{"name":"chip","summary":"A Chip of the set: the chip component, placed and spaced by the group and exposed as an item of its list, otherwise drawn and behaving as it does anywhere, with its own state, events and Tab stop.","component":"chip","props":[{"name":"kind","type":"enum","values":["action","filter","input"],"default":"action","description":"What it does, as the Chip's kind."},{"name":"label","type":"string","default":"","description":"Its text and accessible name, as the Chip's label."},{"name":"size","type":"enum","values":["small","medium"],"default":"medium","description":"Its height, as the Chip's size. Give every member of a group the same size."},{"name":"selected","type":"boolean","default":false,"description":"Whether a filter chip is on, as the Chip's selected. While selection is none the chip holds it; while selection is single or multiple the group sets it from value or values (TGR-17)."},{"name":"value","type":"string","default":"","description":"What the group's value and values name a filter chip by, as the Chip's value. Unique within the set; needed while selection is single or multiple."},{"name":"disabled","type":"boolean","default":false,"description":"As the Chip's disabled: one chip of a set may be disabled by itself."},{"name":"href","type":"string","default":"","description":"The destination of an action chip, as the Chip's href: it makes the chip a link."},{"name":"removeLabel","type":"string","default":"","description":"The accessible name of an input chip's remove action, as the Chip's removeLabel."},{"name":"icon","type":"string","default":"","description":"The glyph in the Chip's icon slot, by its name in the system's icon set. Empty for none. It is how a fixture fills that slot; in an application the slot is filled as the Chip's own spec says."}],"events":[{"name":"click","description":"The chip was activated, as the Chip's click."},{"name":"change","description":"A filter chip was switched, as the Chip's change. While selection is single or multiple it stops at the group, whose own change carries the selection (TGR-19)."},{"name":"remove","description":"The person asked to remove an input chip, as the Chip's remove. The product removes it; the group then places the rest and moves focus (TGR-9)."}]}],"states":["enabled"],"behavior":[{"id":"TGR-1","text":"THE tag group SHALL lay out its members in lines: from its start edge, in the order they were given, comp.tag-group.gap.tags apart along a line WHILE spacing is tags and comp.tag-group.gap.chips apart WHILE spacing is chips, each member at its own size and centred on the middle of its line. It SHALL be as wide as its layout gives it and as tall as its lines, SHALL draw no container, fill, edge or elevation of its own, SHALL add no padding around its members, and SHALL NOT draw its label."},{"id":"TGR-2","text":"WHEN a member does not fit in what is left of a line THE tag group SHALL put it, whole, at the start of a new line below, comp.tag-group.row-gap.tags below the line above WHILE spacing is tags and comp.tag-group.row-gap.chips WHILE spacing is chips, measured between the visible bounds of the tallest members of the two lines; it SHALL NOT cut, shrink or split a member to keep it on a line, SHALL NOT scroll its lines, and SHALL NOT hide a member or stand a count in its place: every member it is given is shown. WHERE one member alone is wider than the group THE tag group SHALL give it the group's width on a line of its own, and the member SHALL then cut its own label as its own spec says (TAG-5, CHP-17)."},{"id":"TGR-3","text":"THE tag group SHALL keep its members in the order they were given: it SHALL NOT sort them, move a selected chip forward or group them by kind, and the order in which focus moves through its chips and in which assistive technology reads its members SHALL be that order — along each line from its start, and line after line from the top."},{"id":"TGR-4","text":"THE tag group SHALL take from spacing only the distances of TGR-1 and TGR-2: spacing SHALL NOT change what a member is, how it is drawn or what the group exposes. WHERE the platform can tell what its members are, WHILE spacing is tags and a member takes input (a chip) THE tag group SHALL still render and in debug builds report that a set of chips wants spacing chips, because the lines of tags stand closer than a chip's touch target is high."},{"id":"TGR-5","text":"WHILE the hit areas that two neighbouring chips extend beyond their visible bounds (CHP-5, CHP-21) overlap THE tag group SHALL give every press on a chip's visible bounds to that chip, and a press in the gap between two chips — along a line or between two lines — to the nearer one, so that neighbouring hit areas meet at the middle of the gap. comp.tag-group.row-gap.chips is what keeps each chip's target whole between two lines: at sys.target.touch minus a chip's height or more, no hit areas overlap, as under the default system's value for a medium chip; a small chip on wrapped lines, and a layer that narrows the gap, have targets that meet between the lines."},{"id":"TGR-6","text":"THE tag group SHALL NOT restyle its members: each SHALL render from its own tokens at its own size, answer hover, focus and press itself, hold its own state (a filter chip its selected, which the group sets WHILE selection is single or multiple, TGR-17), emit its own events (but the change of a filter chip the group holds, TGR-19) and keep its own role and name inside the item the group exposes it as (TGR-7). WHILE selection is none each chip SHALL be its own Tab stop — an input chip one, the chip itself, whose remove action is not a stop and which Backspace or Delete removes (CHP-18, CHP-19, CHP-23) — in the order of TGR-3, and the tag group SHALL NOT handle arrow keys, Home or End, SHALL keep no selection of its own, SHALL NOT make its filter chips exclusive, and SHALL emit no event; what a selection changes is TGR-17 to TGR-21. The tag group itself SHALL NOT take focus, whatever its selection. The tag group has no size of its own: members of different sizes on one line are centred on it (TGR-1)."},{"id":"TGR-7","text":"WHILE the tag group holds at least one member THE tag group SHALL expose itself to assistive technology as a list, named by label WHILE label is not empty, and each member as one item of that list, in the order of TGR-3, holding the member as the member exposes itself: a tag as its text (TAG-11), a chip as its button or its link with its state, an input chip with its remove action beside it. WHEN label changes THE tag group SHALL expose the new name at once. WHILE label is empty THE tag group SHALL still expose the list, unnamed. A platform that has no list role SHALL expose a container named by label that holds the members in order, and state that in its README."},{"id":"TGR-8","text":"WHILE the tag group holds no member THE tag group SHALL draw nothing, take no space and expose nothing — no empty list and no name — and SHALL report nothing: a set that has no tags yet, or whose last filter was removed, is not a mistake. WHILE it holds one member THE tag group SHALL lay it out and expose it as a list of one."},{"id":"TGR-9","text":"WHEN a member leaves the tag group while focus is on it — on a chip or on its remove action — THE tag group SHALL move focus to the chip that follows it in the order of TGR-3, or to the chip before it WHERE none follows, on the chip itself and never on its remove action, so that a person who removes several entered items in a row goes on from where they were; it SHALL skip a member that takes no focus (a tag, a disabled chip). WHERE no member that takes focus is left THE tag group SHALL NOT move focus, having nowhere of its own to put it: the product moves it to the control that the set belongs to (CHP-22). THE tag group SHALL NOT remove a member itself and SHALL announce nothing."},{"id":"TGR-10","text":"WHEN a member is added, is removed, is moved to another place in the order or changes its size THE tag group SHALL place its members again by TGR-1 and TGR-2 and SHALL move every member whose place that changes from where it was drawn to its new place over comp.tag-group.motion.move-duration with comp.tag-group.motion.move-easing, along its line and from one line to another, without scaling it; a change that comes while members move SHALL take each of them on from where it is drawn. A member that is added SHALL fade in at its place, and one that is removed SHALL fade out at the place where it was drawn, over comp.tag-group.motion.move-duration with comp.tag-group.motion.move-easing, while the members whose place that changes move; a member removed while it fades in SHALL fade out from the opacity then drawn, and one the product gives back while it fades out SHALL fade in from it (MOT-2). An element the product gives anew in place of a member it removed in the same change, showing the same — the same kind of member with the same label — SHALL be drawn as that member, moving from where that one was drawn, without a fade. THE tag group SHALL change what it exposes at once, not after the motion: a member that is added is an item of the list from the change on, a member that is moved stands at its new place in the order of TGR-3, and a member that is removed is no item of the list while it is drawn fading out — hidden from assistive technology, taking no focus and no press. WHILE a line holds the same members in the same order as before the change, its members SHALL follow the change at once: a member that changes its size, at once or over a motion of its own, carries the members after it on its line, and a line whose height changes carries the lines below. THE tag group's own height SHALL follow its lines at once, and WHEN the width the layout gives the tag group changes THE tag group SHALL place its members again at once and draw at once every member that fades in or out as it will be. WHILE the tag group draws its first frames (MOT-3), and WHEN a member is added to a tag group that held none or its last member is removed (TGR-8), THE tag group SHALL add or remove the member at once. WHERE motion is reduced THE tag group SHALL place its members again at once and keep the fades (MOT-6). A member that has focus while it moves — along its line, to another line, or to another place in the order — SHALL keep it, its focus indicator moving with it, and THE tag group SHALL NOT move focus because a member was added."},{"id":"TGR-11","text":"WHILE the tag group holds content that is not a Tanrei tag or chip THE tag group SHALL still lay it out and expose it as a member, and in debug builds report it; a platform that cannot inspect its content SHALL state the rule in its README and docs page."},{"id":"TGR-12","text":"WHILE the text size is enlarged THE tag group SHALL keep its gaps and let its members grow as their own specs say (TAG-13, CHP-17), wrapping onto as many lines as they then need; at 200% no member SHALL be lost, lie over another or be cut by the group, and the group SHALL need scrolling in no direction of its own."},{"id":"TGR-13","text":"WHERE the platform draws with a person's own forced colors (the web's forced-colors mode, and a platform's equivalent where it has one) THE tag group SHALL draw nothing of its own there either: its members draw themselves as their own specs say (TAG-14), and the distances of TGR-1 and TGR-2 stay what tells them apart."},{"id":"TGR-14","text":"WHERE the layout direction is right-to-left THE tag group SHALL start every line at the right edge and place its members from right to left, in the order they were given, wrapping to a new line below as TGR-2 says; the order of focus and of reading SHALL stay the order of TGR-3. Each member's own content SHALL follow the layout direction as the member's spec says (TAG-15, CHP-25)."},{"id":"TGR-15","text":"THE tag group SHALL take its layout direction from where it is used — the direction of the nearest ancestor that sets one, and the platform's own where none does — and SHALL have no direction setting of its own; WHEN that direction changes while the tag group is shown THE tag group SHALL draw itself for the new direction at once, without a motion of its own, keeping its members, their state and their focus."},{"id":"TGR-16","text":"WHEN spacing names a value that the active design system does not have THE tag group SHALL render with the default value's tokens, and in debug builds report the unknown value."},{"id":"TGR-17","text":"WHILE selection is single or multiple THE tag group SHALL hold the selection of its filter chips by their value: it SHALL set each filter chip's selected to whether value equals the chip's value (single) or values holds it (multiple) WHEN selection, value or values changes, WHEN a filter chip arrives and WHEN a chip's value or kind changes, so that what each chip shows and exposes as its pressed state (CHP-11) is always the group's selection. A chip that is not a filter chip, a tag and other content take no part in it, and are laid out, reached and exposed as WHILE selection is none. WHEN value or values names no member THE tag group SHALL put nothing on for that name and report nothing, because a filter whose chip was taken away is not a mistake; WHEN a member leaves THE tag group SHALL leave value and values as they are and emit nothing. WHEN selection becomes none THE tag group SHALL leave each chip's selected as it then is and hold it no longer. WHEN selection names a value it does not have THE tag group SHALL behave as WHILE it is none, and in debug builds report the value."},{"id":"TGR-18","text":"WHILE selection is single or multiple, WHERE a filter chip's value is empty THE tag group SHALL leave that chip out of its selection — it keeps its own selected and its own change, as WHILE selection is none — and WHERE two filter chips share a value THE tag group SHALL put them on and off together, because they name one thing; in debug builds it SHALL report each, and it SHALL render either way."},{"id":"TGR-19","text":"WHEN the person switches a filter chip that has a value — by pointer, touch, Enter, Space or assistive technology — WHILE selection is single THE tag group SHALL set value to the chip's value WHERE the chip is now on, and switch every other filter chip off, or to null WHERE it is now off, because each chip is a toggle that says it is pressed and a pressed toggle that cannot be released would be untrue; WHILE selection is multiple THE tag group SHALL add the chip's value to values WHERE the chip is now on, or take it out WHERE it is now off. THE tag group SHALL then emit change exactly once, carrying value (single) or values (multiple), which it already holds, and SHALL stop the chip's own change at the group, so that a listener on the group or above it hears one change that carries the selection. THE tag group SHALL emit nothing WHEN the product sets selection, value or values."},{"id":"TGR-20","text":"WHILE selection is single or multiple and the group holds a chip that takes focus THE tag group SHALL be one stop in the focus order, in place of the stops TGR-6 gives each chip: the chip that last had focus WHILE it is still in the group and takes focus, otherwise the first filter chip that is on, otherwise the first chip that takes focus; every other chip, and with it its remove action, SHALL be out of the Tab order and stay focusable by the keys of this rule, by pointer and touch, and by assistive technology. WHILE a chip of the group has focus THE tag group SHALL move focus, without switching or removing anything: on Right Arrow to the chip drawn after it and on Left Arrow to the one drawn before it — in a right-to-left layout the same two keys the other way, so that an arrow always moves the way it points — on Home to the first chip and on End to the last, passing every member that takes no focus (a tag, a disabled chip); focus SHALL NOT wrap, and Up Arrow and Down Arrow SHALL do nothing: the members are one row in their order, however many lines draw it. Enter and Space SHALL stay the focused chip's own — Space switches a filter chip (CHP-11) — and so SHALL Backspace and Delete on an input chip (CHP-19)."},{"id":"TGR-21","text":"WHILE selection is single or multiple, WHEN a member leaves while focus is on it THE tag group SHALL move focus as TGR-9 says, and the chip that then has focus SHALL be the set's stop; WHEN the chip that was the set's stop leaves, is disabled or no longer takes focus while focus is elsewhere THE tag group SHALL make a stop as TGR-20 says of a group whose last-focused chip is gone, so that the set keeps exactly one stop while it holds a chip that takes focus. WHEN selection becomes none THE tag group SHALL give each chip its own stop again."},{"id":"TGR-22","text":"WHERE the platform has ARIA attributes (the web), WHEN the product sets an aria- attribute on the host, by the attribute or by the ARIA property that reflects it, THE tag group SHALL move it to the data-aria- attribute of the same name, so that the host is no second node with its name, description or state, and SHALL expose it on its list — an id reference by the elements it names in the host's tree or a tree around it, a description after its own. WHILE label is not empty it is the list's name, over a name given so; WHILE label is empty, a name given so is the list's name. WHEN the product removes the aria- attribute or its data-aria- twin, or sets the ARIA property that reflects it (ariaLabel, ariaDescribedByElements…) to null, THE tag group SHALL take it off that element."}],"accessibility":{"role":"list","keyboard":[{"keys":"Tab / Shift+Tab","action":"While selection is none: moves focus to each chip of the set in turn, in the order given; an input chip is one stop, its remove action is not in the Tab order. While selection is single or multiple: the set is one stop — the chip that last had focus, else the first chip that is on, else the first chip (TGR-20). A set of tags has no stop."},{"keys":"Left Arrow / Right Arrow, Home / End","action":"While selection is single or multiple: move focus to the chip drawn before or after (the way the arrow points, in a right-to-left layout too), or to the first or the last, without switching anything; focus does not wrap. Up and Down Arrow do nothing. While selection is none the group handles no key."},{"keys":"Enter, Space, Backspace or Delete","action":"The focused chip's own keys, as the Chip says: Space switches a filter chip — and, while selection is single or multiple, changes the group's selection (TGR-19); Backspace or Delete removes an input chip. After a removal, focus is on the chip that followed, or on the one before where none follows (TGR-9)."}],"labeling":"label names the list (\"Tags\", \"Filters\"); it is not drawn. Each member is one list item and keeps its own name inside it: a tag its text, a chip its label, an input chip's remove action its removeLabel. A filter chip's state is its own pressed state, also while the group holds the selection: the chip then shows the group's selection. An empty group exposes nothing.","minimumTarget":true,"notes":["Not interactive by itself: the tag group never takes focus itself, and while selection is none it handles no key (TGR-6), so it has no target of its own to size and minimumTarget holds through its chips, each of which extends its own hit area (CHP-5). What the group owes them is room: gap and row-gap decide how much of each extended hit area a chip keeps beside and between its neighbours (TGR-5).","Why a list, for tags and for chips alike: a list tells a person how many members there are and where they are among them, which is what a set of like things needs — four tags on an article, the third of nine filters. It holds static text, links and buttons equally, so one component needs no setting for its semantics.","Why not a group: a group says that controls belong together and nothing more. It is what a button group is, whose two to four members are different actions; a tag group's members are of one kind and any number.","Why not a list box, also while the group holds a selection: a list box is one control whose options hold the selection (aria-selected), and an option cannot hold a button — an input chip's remove action, or the chip's own button — inside it. React Aria's TagGroup exposes a selectable set as a grid, rows that carry aria-selected and the remove button in a cell; Tanrei's chip is a button whose pressed state already says whether it is on, which is how M3's filter chips and Carbon's selectable tags say it, so a selection keeps the list and each chip its pressed state. One choice among several that is not a filter is a radio group, tabs or a segmented button; a choice from a list is a select.","Why one stop with arrow keys only with a selection: while selection is none each chip is its own Tab stop, as every Button of a button group is (CHP-23), and a set of links or of entered items is crossed by Tab. A set that holds a selection is one control to the person who uses it, as a segmented button's segments and Material's chip set are: one stop, the arrow keys inside it (TGR-20), focus not wrapping, as in the chip field (CHF-13). The list stays, so a screen reader still says how many chips there are and where one is among them.","While selection is none the tag group does not make filter chips exclusive and holds no value: each filter chip is on or off by itself. With selection single the group puts one on at a time and a chip that is on can be switched off, leaving none, because each chip is a toggle; a choice that must always hold one value is a segmented button or a radio group. With multiple any number are on. The group names its chips by their value, as a segmented button names its segments, and its change carries value or values, as the segmented button's does (TGR-19).","After the last member is removed the group is gone and cannot hold focus. The product moves focus to what the set belonged to (the field that adds items, the button that opens the filters); otherwise the platform drops it. The docs page says so with an example.","Removing and selecting together: an input chip has no selected state (CHP-11), so in a set that holds a selection the entered items are reached by the arrow keys and removed by Backspace or Delete as before, and the filter chips are switched; the chip that receives focus after a removal becomes the set's stop (TGR-21). A filter chip that the product takes away leaves value and values as they were (TGR-17): the product, which took it away, changes them where it wants the filter gone.","A removal is not announced by the group. Where it must be (a filter removed far from the list it changes), the product reports it in a live region or with a snackbar.","A status among a set of tags never rests on color alone: each tag says it in words (TAG-11).","A small chip is for dense places where a set stands on one line. On wrapped lines small chips are 24 high and 16 apart under the default system, so their touch targets meet between the lines at 40; a set of small chips that wraps on a touch screen wants medium chips.","Text size: at 200% members grow and the set wraps onto more lines; nothing is cut by the group (TGR-12).","Compose and React Native have no list role for an arbitrary layout: the group is a traversal group whose content description is label and whose collection information gives the count (Compose), or a labelled container (React Native), and each member keeps its own role."]},"tokens":"comp.tag-group","fixtures":[{"id":"tags","props":{"spacing":"tags","label":"Tags"},"items":[{"kind":"tag","props":{"label":"Design tokens"}},{"kind":"tag","props":{"label":"Accessibility"}},{"kind":"tag","props":{"label":"Right-to-left"}}]},{"id":"tags-outlined","props":{"spacing":"tags","label":"Tags"},"items":[{"kind":"tag","props":{"label":"Design tokens","variant":"outlined"}},{"kind":"tag","props":{"label":"Accessibility","variant":"outlined"}},{"kind":"tag","props":{"label":"Right-to-left","variant":"outlined"}},{"kind":"tag","props":{"label":"Typography","variant":"outlined"}}]},{"id":"tags-small","props":{"spacing":"tags","label":"Sizes"},"items":[{"kind":"tag","props":{"label":"small","size":"small","variant":"outlined"}},{"kind":"tag","props":{"label":"medium","size":"small","variant":"outlined"}},{"kind":"tag","props":{"label":"large","size":"small","variant":"outlined"}}]},{"id":"tags-status","props":{"spacing":"tags","label":"Platforms"},"items":[{"kind":"tag","props":{"label":"Web: stable","status":"success","size":"small","icon":"check_circle"}},{"kind":"tag","props":{"label":"SwiftUI: beta","size":"small"}},{"kind":"tag","props":{"label":"Compose: beta","size":"small"}},{"kind":"tag","props":{"label":"Flutter: lagging","status":"warning","size":"small","variant":"outlined"}},{"kind":"tag","props":{"label":"React Native: planned","size":"small","variant":"outlined"}}]},{"id":"tags-current","props":{"spacing":"tags","label":"Choices"},"items":[{"kind":"tag","props":{"label":"divider","variant":"filled","size":"small"}},{"kind":"tag","props":{"label":"gap","size":"small"}}]},{"id":"tags-icons","props":{"spacing":"tags","label":"Tags"},"items":[{"kind":"tag","props":{"label":"Design tokens","icon":"sell"}},{"kind":"tag","props":{"label":"Accessibility","icon":"sell"}},{"kind":"tag","props":{"label":"Right-to-left","icon":"sell"}}]},{"id":"tags-single","props":{"spacing":"tags","label":"Tags"},"items":[{"kind":"tag","props":{"label":"Design tokens"}}]},{"id":"tags-wrap","props":{"spacing":"tags","label":"Tags"},"items":[{"kind":"tag","props":{"label":"Design tokens"}},{"kind":"tag","props":{"label":"Accessibility"}},{"kind":"tag","props":{"label":"Right-to-left"}},{"kind":"tag","props":{"label":"Typography"}},{"kind":"tag","props":{"label":"Color"}},{"kind":"tag","props":{"label":"Motion"}},{"kind":"tag","props":{"label":"Theming"}},{"kind":"tag","props":{"label":"Web Components"}},{"kind":"tag","props":{"label":"SwiftUI"}},{"kind":"tag","props":{"label":"Jetpack Compose"}},{"kind":"tag","props":{"label":"Flutter"}},{"kind":"tag","props":{"label":"React Native"}},{"kind":"tag","props":{"label":"Release notes"}},{"kind":"tag","props":{"label":"Migration"}}]},{"id":"tags-small-wrap","props":{"spacing":"tags","label":"Tags"},"items":[{"kind":"tag","props":{"label":"Design tokens","size":"small"}},{"kind":"tag","props":{"label":"Accessibility","size":"small"}},{"kind":"tag","props":{"label":"Right-to-left","size":"small"}},{"kind":"tag","props":{"label":"Typography","size":"small"}},{"kind":"tag","props":{"label":"Color","size":"small"}},{"kind":"tag","props":{"label":"Motion","size":"small"}},{"kind":"tag","props":{"label":"Theming","size":"small"}},{"kind":"tag","props":{"label":"Web Components","size":"small"}},{"kind":"tag","props":{"label":"SwiftUI","size":"small"}},{"kind":"tag","props":{"label":"Jetpack Compose","size":"small"}},{"kind":"tag","props":{"label":"Flutter","size":"small"}},{"kind":"tag","props":{"label":"React Native","size":"small"}},{"kind":"tag","props":{"label":"Release notes","size":"small"}},{"kind":"tag","props":{"label":"Migration","size":"small"}},{"kind":"tag","props":{"label":"Design tokens","size":"small"}},{"kind":"tag","props":{"label":"Accessibility","size":"small"}},{"kind":"tag","props":{"label":"Right-to-left","size":"small"}},{"kind":"tag","props":{"label":"Typography","size":"small"}},{"kind":"tag","props":{"label":"Color","size":"small"}},{"kind":"tag","props":{"label":"Motion","size":"small"}}]},{"id":"tags-long-member","props":{"spacing":"tags","label":"Tags"},"items":[{"kind":"tag","props":{"label":"Design tokens"}},{"kind":"tag","props":{"label":"A note on why the documentation of a design system should be built from the components it documents, and what that taught us"}},{"kind":"tag","props":{"label":"Color"}}]},{"id":"chips-links","props":{"spacing":"chips","label":"Tags"},"items":[{"kind":"chip","props":{"label":"Design tokens","href":"https://example.com/tanrei"}},{"kind":"chip","props":{"label":"Accessibility","href":"https://example.com/tanrei"}},{"kind":"chip","props":{"label":"Right-to-left","href":"https://example.com/tanrei"}},{"kind":"chip","props":{"label":"Typography","href":"https://example.com/tanrei"}}]},{"id":"chips-filters","props":{"spacing":"chips","label":"Filters"},"items":[{"kind":"chip","props":{"label":"Open","kind":"filter","selected":true}},{"kind":"chip","props":{"label":"Assigned to me","kind":"filter","selected":false}},{"kind":"chip","props":{"label":"Needs review","kind":"filter","selected":true}},{"kind":"chip","props":{"label":"Blocked","kind":"filter","selected":false}},{"kind":"chip","props":{"label":"Has a design","kind":"filter","selected":false}}]},{"id":"chips-filters-wrap","props":{"spacing":"chips","label":"Filters"},"items":[{"kind":"chip","props":{"label":"Open","kind":"filter","selected":true}},{"kind":"chip","props":{"label":"Assigned to me","kind":"filter","selected":false}},{"kind":"chip","props":{"label":"Needs review","kind":"filter","selected":false}},{"kind":"chip","props":{"label":"Blocked","kind":"filter","selected":false}},{"kind":"chip","props":{"label":"Has a design","kind":"filter","selected":false}},{"kind":"chip","props":{"label":"Web","kind":"filter","selected":true}},{"kind":"chip","props":{"label":"iOS","kind":"filter","selected":false}},{"kind":"chip","props":{"label":"Android","kind":"filter","selected":false}},{"kind":"chip","props":{"label":"This week","kind":"filter","selected":true}},{"kind":"chip","props":{"label":"Overdue","kind":"filter","selected":false}},{"kind":"chip","props":{"label":"No owner","kind":"filter","selected":false}},{"kind":"chip","props":{"label":"Archived","kind":"filter","selected":false}}]},{"id":"chips-filters-small","props":{"spacing":"chips","label":"Filters"},"items":[{"kind":"chip","props":{"label":"Open","kind":"filter","size":"small","selected":false}},{"kind":"chip","props":{"label":"Assigned to me","kind":"filter","size":"small","selected":true}},{"kind":"chip","props":{"label":"Needs review","kind":"filter","size":"small","selected":false}},{"kind":"chip","props":{"label":"Blocked","kind":"filter","size":"small","selected":false}}]},{"id":"chips-filters-disabled-member","props":{"spacing":"chips","label":"Filters"},"items":[{"kind":"chip","props":{"label":"Open","kind":"filter","selected":true}},{"kind":"chip","props":{"label":"Archived","kind":"filter","disabled":true}},{"kind":"chip","props":{"label":"Blocked","kind":"filter"}}]},{"id":"chips-filters-multiple","props":{"spacing":"chips","label":"Filters","selection":"multiple","values":["open","review"]},"items":[{"kind":"chip","props":{"label":"Open","kind":"filter","value":"open"}},{"kind":"chip","props":{"label":"Assigned to me","kind":"filter","value":"assigned"}},{"kind":"chip","props":{"label":"Needs review","kind":"filter","value":"review"}},{"kind":"chip","props":{"label":"Blocked","kind":"filter","value":"blocked"}},{"kind":"chip","props":{"label":"Has a design","kind":"filter","value":"design"}}]},{"id":"chips-filters-single","props":{"spacing":"chips","label":"Sort by","selection":"single","value":"updated"},"items":[{"kind":"chip","props":{"label":"Newest","kind":"filter","value":"newest"}},{"kind":"chip","props":{"label":"Recently updated","kind":"filter","value":"updated"}},{"kind":"chip","props":{"label":"Most comments","kind":"filter","value":"comments"}},{"kind":"chip","props":{"label":"Oldest","kind":"filter","value":"oldest"}}]},{"id":"chips-suggestions","props":{"spacing":"chips","label":"Suggested fonts"},"items":[{"kind":"chip","props":{"label":"Inter","icon":"add"}},{"kind":"chip","props":{"label":"Noto Sans JP","icon":"add"}},{"kind":"chip","props":{"label":"Roboto","icon":"add"}},{"kind":"chip","props":{"label":"Source Sans 3","icon":"add"}},{"kind":"chip","props":{"label":"IBM Plex Sans","icon":"add"}}]},{"id":"chips-input","props":{"spacing":"chips","label":"Recipients"},"items":[{"kind":"chip","props":{"label":"Ada Lovelace","kind":"input","removeLabel":"Remove Ada Lovelace"}},{"kind":"chip","props":{"label":"Grace Hopper","kind":"input","removeLabel":"Remove Grace Hopper"}},{"kind":"chip","props":{"label":"Katherine Johnson","kind":"input","removeLabel":"Remove Katherine Johnson"}}]},{"id":"chips-input-add","props":{"spacing":"chips","label":"Recipients"},"items":[{"kind":"chip","props":{"label":"Ada Lovelace","kind":"input","removeLabel":"Remove Ada Lovelace"}},{"kind":"chip","props":{"label":"Grace Hopper","kind":"input","removeLabel":"Remove Grace Hopper"}},{"kind":"chip","props":{"label":"Katherine Johnson","kind":"input","removeLabel":"Remove Katherine Johnson"}},{"kind":"chip","props":{"label":"Add","icon":"add"}}]},{"id":"tags-ja","props":{"spacing":"tags","label":"タグ"},"items":[{"kind":"tag","props":{"label":"デザイントークン"}},{"kind":"tag","props":{"label":"アクセシビリティ"}},{"kind":"tag","props":{"label":"タイポグラフィ"}},{"kind":"tag","props":{"label":"配色"}}]},{"id":"tags-rtl","props":{"spacing":"tags","label":"الوسوم"},"items":[{"kind":"tag","props":{"label":"رموز التصميم"}},{"kind":"tag","props":{"label":"إمكانية الوصول"}},{"kind":"tag","props":{"label":"الطباعة"}},{"kind":"tag","props":{"label":"الألوان"}}],"direction":"rtl"},{"id":"chips-filters-rtl","props":{"spacing":"chips","label":"عوامل التصفية"},"items":[{"kind":"chip","props":{"label":"مفتوح","kind":"filter","selected":true}},{"kind":"chip","props":{"label":"مسند إليّ","kind":"filter","selected":false}},{"kind":"chip","props":{"label":"بحاجة إلى مراجعة","kind":"filter","selected":false}},{"kind":"chip","props":{"label":"محظور","kind":"filter","selected":true}},{"kind":"chip","props":{"label":"له تصميم","kind":"filter","selected":false}},{"kind":"chip","props":{"label":"الويب","kind":"filter","selected":false}},{"kind":"chip","props":{"label":"هذا الأسبوع","kind":"filter","selected":false}},{"kind":"chip","props":{"label":"متأخر","kind":"filter","selected":false}},{"kind":"chip","props":{"label":"بلا مالك","kind":"filter","selected":false}},{"kind":"chip","props":{"label":"مؤرشف","kind":"filter","selected":false}}],"direction":"rtl"},{"id":"ltr-members-rtl","props":{"spacing":"chips","label":"Tags"},"items":[{"kind":"chip","props":{"label":"v2.1 beta","href":"https://example.com/tanrei"}},{"kind":"chip","props":{"label":"Web Components","href":"https://example.com/tanrei"}},{"kind":"chip","props":{"label":"RTL","href":"https://example.com/tanrei"}}],"direction":"rtl"}],"platforms":{"web":{"status":"lagging","name":"tanrei-tag-group","props":{"spacing":"spacing","label":"label","selection":"selection","value":"value","values":"values"},"events":{"change":"change"},"items":{"tag":{"name":"tanrei-tag","props":{"label":"label","variant":"variant","status":"status","size":"size","icon":"slot=\"icon\""},"notes":"A `tanrei-tag` child, as anywhere."},"chip":{"name":"tanrei-chip","props":{"kind":"kind","label":"label","size":"size","selected":"selected","value":"value","disabled":"disabled","href":"href","removeLabel":"removeLabel","icon":"slot=\"icon\""},"events":{"click":"click","change":"change","remove":"remove"},"notes":"A `tanrei-chip` child, as anywhere; `remove-label` is its attribute. The page removes the element on `remove`; the group sees it leave and moves focus (TGR-9)."}},"parts":{"group":"host","member":"slot"},"notes":"`<tanrei-tag-group label=\"Filters\" spacing=\"chips\">` holds `tanrei-tag` and `tanrei-chip` children. The members stay in the product's light DOM, in the default slot: they keep their attributes, events, styles and place in the document, and the group moves none of them. The shadow root holds one element with `role=\"list\"` and `aria-label`, a flex container that wraps (`flex-wrap: wrap; align-items: center; column-gap; row-gap` from the tokens of `spacing`), around the slot; the host has no role, and the group gives each slotted member `role=\"listitem\"` where it has no role of its own and takes it back when the member leaves (`slotchange`), as the carousel exposes its items. A `tanrei-chip` host carries no role itself — its button or link is in its shadow root — so the item holds that control. While the slot is empty the host is `display: none` and the list is not rendered (TGR-8). Removal: a `MutationObserver` and `slotchange` find a member that left while `:focus-within` held on it, and the group calls `focus()` on the next chip (TGR-9). The debug report of TGR-4 looks for a `tanrei-chip` among the slotted elements. Before the element is defined its children are already shown, as the inline elements they are, in source order and separated by the white space between them: a set of tags is readable and a set of chips is operable once the chips themselves are defined; a page that wants the final layout from the first paint adds `tanrei-tag-group:not(:defined) { display: flex; flex-wrap: wrap; gap: … }` with the token's custom properties. The host is `display: block`. Selection (TGR-17 to TGR-21): `selection` and `value` are attributes and properties; `values` is a property (an array), and the `values` attribute is also read, as JSON or as space-separated words, because the fixture harness writes attributes. A chip's `value` is the `tanrei-chip`'s own `value`. While selection is single or multiple the group writes each filter chip's `selected`, stops the chip's `change` at the host and dispatches its own `change` (`detail.value` or `detail.values`), and gives every chip but the set's stop `tabindex=\"-1\"` (a host that delegates focus with a negative tabindex is out of the Tab order, with everything in its shadow root), taking back only the tabindex it gave; it handles the arrow keys, Home and End from a `keydown` listener on the host. Motion (TGR-10): a move is a `translate` animation added to the member's own (`composite: 'add'`), so the member keeps focus and its focus ring travels with it; a member the product moves inside the group is focused again where it had focus. A member that is added fades in by an opacity animation on the element. A member the product removes is put back as the group's child, where it stood, for the length of its fade-out — `inert`, `aria-hidden=\"true\"` and `data-leaving`, absolutely placed at the box it was drawn in (the list is its containing block only while one leaves) — then removed, its own `inert` and `aria-hidden` given back; a script that reads the group's children in that time selects `:not([data-leaving])`. The time and the curve are read from the list's computed transition, which carries the two motion tokens."},"swiftui":{"status":"planned","name":"TanreiTagGroup","props":{"spacing":"spacing","label":"label","selection":"selectionMode","value":"selection","values":"selection"},"events":{"change":"selection"},"items":{"tag":{"name":"TanreiTag","props":{"label":"title","variant":"variant","status":"status","size":"size","icon":"icon"},"notes":"A `TanreiTag` child, as anywhere."},"chip":{"name":"TanreiChip","props":{"kind":"isSelected / onRemove","label":"title","size":"size","selected":"isSelected","value":"value","disabled":"disabled","href":"destination","removeLabel":"removeLabel","icon":"icon"},"events":{"click":"action","change":"isSelected","remove":"onRemove"},"notes":"A `TanreiChip` child, as anywhere."}},"notes":"`TanreiTagGroup(_ label: String = \"\", spacing: .chips) { TanreiChip(…) … }`: a custom `Layout` that flows its subviews into lines by TGR-1 and TGR-2 and follows `layoutDirection`. The container is `.accessibilityElement(children: .contain)` with the label; SwiftUI has no list trait for an arbitrary layout, so VoiceOver reads the label and then each member (TGR-7's fallback). Focus after a removal uses `@AccessibilityFocusState` and `@FocusState` keyed by the members' identities, which the caller gives with `.id(_:)` as in a `ForEach`. Selection: `TanreiTagGroup(selection: $value)` with a `Binding<String?>` (single) or a `Binding<Set<String>>` (multiple), each chip given its value as `TanreiChip(value:)`; the arrow keys come from `focusable()` and `onMoveCommand`."},"compose":{"status":"planned","name":"TanreiTagGroup","props":{"spacing":"spacing","label":"contentDescription","selection":"selectionMode","value":"selectedValue","values":"selectedValues"},"events":{"change":"onSelectionChange"},"items":{"tag":{"name":"TanreiTag","props":{"label":"label","variant":"variant","status":"status","size":"size","icon":"icon"},"notes":"A `TanreiTag` call in the group's content, as anywhere."},"chip":{"name":"TanreiChip","props":{"kind":"onSelectedChange / onRemove","label":"label","size":"size","selected":"selected","value":"value","disabled":"enabled","href":"href","removeLabel":"removeContentDescription","icon":"icon"},"events":{"click":"onClick","change":"onSelectedChange","remove":"onRemove"},"notes":"A `TanreiChip` call in the group's content, as anywhere; `enabled` is disabled's inverse."}},"notes":"`TanreiTagGroup(spacing = TanreiTagGroupSpacing.Chips, contentDescription = \"Filters\") { … }`, built on `FlowRow` with the tokens' horizontal and vertical arrangements. Semantics: a traversal group with `contentDescription` and `collectionInfo` (one row, as many columns as members), each member given `collectionItemInfo`; TalkBack then reads the count. Focus after a removal: the group keeps a `FocusRequester` per member key and requests the next one when a focused member leaves the composition."},"flutter":{"status":"planned","name":"TanreiTagGroup","props":{"spacing":"spacing","label":"semanticLabel","selection":"selectionMode","value":"selectedValue","values":"selectedValues"},"events":{"change":"onSelectionChanged"},"items":{"tag":{"name":"TanreiTag","props":{"label":"label","variant":"variant","status":"status","size":"size","icon":"icon"},"notes":"A `TanreiTag` in `children`, as anywhere."},"chip":{"name":"TanreiChip","props":{"kind":"TanreiChip / TanreiChip.filter / TanreiChip.input","label":"label","size":"size","selected":"selected","value":"value","disabled":"isEnabled","href":"href","removeLabel":"removeSemanticLabel","icon":"icon"},"events":{"click":"onPressed","change":"onSelected","remove":"onDeleted"},"notes":"A `TanreiChip` in `children`, as anywhere. Give each a `Key`, so that the group can tell which one left."}},"notes":"`TanreiTagGroup(spacing: TanreiTagGroupSpacing.chips, semanticLabel: 'Filters', children: […])`, built on `Wrap` with `spacing`, `runSpacing` and `crossAxisAlignment: WrapCrossAlignment.center`; `Wrap` follows `Directionality`. `Semantics(container: true, label:)` around it; Flutter has no list role for a `Wrap`, so the members are read in order after the label. Focus after a removal: the group compares its children's keys between builds and requests focus on the next chip's `FocusNode`."},"react-native":{"status":"planned","name":"TagGroup","props":{"spacing":"spacing","label":"accessibilityLabel","selection":"selectionMode","value":"value","values":"values"},"events":{"change":"onSelectionChange"},"items":{"tag":{"name":"Tag","props":{"label":"label","variant":"variant","status":"status","size":"size","icon":"icon"},"notes":"A `Tag` child, as anywhere."},"chip":{"name":"Chip","props":{"kind":"kind","label":"label","size":"size","selected":"selected","value":"value","disabled":"disabled","href":"href","removeLabel":"removeAccessibilityLabel","icon":"icon"},"events":{"click":"onPress","change":"onSelectedChange","remove":"onRemove"},"notes":"A `Chip` child, as anywhere. Give each a `key`, so that the group can tell which one left."}},"notes":"`<TagGroup spacing=\"chips\" accessibilityLabel=\"Filters\">{…}</TagGroup>`: a `View` with `flexDirection: 'row'`, `flexWrap: 'wrap'`, `alignItems: 'center'`, `columnGap` and `rowGap` from the tokens, `accessibilityRole=\"list\"` (announced on Android; a labelled container on iOS). It reads its children's keys to find the chip that follows a removed one and focuses it through its ref. Follows the app's direction where an ancestor's is not known."}}}
|