@starci/eslint-grammar-core 0.27.1 → 0.28.0

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.
@@ -0,0 +1,34 @@
1
+ # Button arrows
2
+
3
+ Law module: `button-arrow.ts`. Finding code: `FE_BUTTON_ARROW`. Knowledge: `knowledge/ui/presentation/grammar-laws.yaml#BUTTON-ARROW`.
4
+
5
+ A Button that leads somewhere (a page, a tab, a next step) ends with the Grammar arrow: `endArrow`. It slides toward the reading end on hover and focus and is mirrored in RTL. A Button that does something starts with a `startGlyph`. A typed `→` or a passed-in arrow icon does neither, so the law refuses them. Start and end keep their meaning: the start says what the action is, the end says where it goes.
6
+
7
+ Every rule below is an error in `coreGrammarConfig`; none can be switched off or suppressed inline.
8
+
9
+ ## `starci-grammar/button-arrow`
10
+
11
+ A `Button` bound to `@starci/grammar` is a finding when:
12
+
13
+ - its label (children text, a string, a template, the branches of a conditional) states an arrow: `→ ← ➜ ➔ ⟶ › »` or ASCII `->` (message `label`);
14
+ - its `endContent` is an arrow: an element named `Arrow*` or `ChevronRight*`, or an element whose `source`, `glyph` or `name` is such an identifier or a string naming `arrow`, `chevron-right` or `chevron-end` (message `endContent`);
15
+ - it sets `endArrow` together with `startGlyph` or `startContent` (message `both`; the Button type refuses the pair as well).
16
+
17
+ `Button` takes its label as children only, so there is no string label prop to read. `IconButton` has no label and no `endArrow`; `TextAction` takes `endContent` but no `endArrow`; neither is judged.
18
+
19
+ **Invalid**
20
+
21
+ ```tsx
22
+ <Button href="/runs">View runs →</Button>
23
+ <Button href="/runs" endContent={<Icon source={ArrowRightIcon} />}>View runs</Button>
24
+ <Button href="/runs" endArrow startGlyph="send">View runs</Button>
25
+ ```
26
+
27
+ **Valid**
28
+
29
+ ```tsx
30
+ <Button href="/runs" endArrow>View runs</Button>
31
+ <Button onPress={send} startGlyph="send">Send</Button>
32
+ ```
33
+
34
+ Rule ownership: [FE-RULE-OWNERSHIP](../../../contexts/code/fe/README.md#the-placement-test-fe-rule-ownership).
@@ -0,0 +1,26 @@
1
+ # A control is labelled by its own label prop
2
+
3
+ Law module: `field-label.ts`. Knowledge: `knowledge/ui/presentation/grammar-laws.yaml#FIELD-LABEL`. Finding code: `FE_FIELD_LABEL`.
4
+
5
+ The Field contract spaces label to control 8, control to help 4 and field to field 24 (the Form or the field stack). A `Text` placed beside a control as its label is spaced by whoever placed it.
6
+
7
+ Every rule below is an error in `coreGrammarConfig`; none can be switched off or suppressed inline.
8
+
9
+ ## `starci-grammar/field-label`
10
+
11
+ A Grammar `Text` or `Label`, or a plain `label` or `span` with literal text, standing immediately before a Grammar form control (Input, Select, Textarea, NumberField, ComboBox, Autocomplete, CheckboxGroup, RadioGroup, ChoiceChips, Switch, DatePicker, DateField, TimeField, SearchField, Slider, CopyField) among the same parent's children (looked through fragments, conditions and `.map`), when the control has no `label` prop (an `aria-label` alone does not count), is refused. A control with a spread is not judged.
12
+
13
+ **Invalid**
14
+
15
+ ```tsx
16
+ <Text>Name</Text>
17
+ <Input value={name} onChange={setName} />
18
+ ```
19
+
20
+ **Valid**
21
+
22
+ ```tsx
23
+ <Input label="Name" value={name} onChange={setName} />
24
+ ```
25
+
26
+ Rule ownership: [FE-RULE-OWNERSHIP](../../../contexts/code/fe/README.md#the-placement-test-fe-rule-ownership).
@@ -0,0 +1,31 @@
1
+ # Children stand closer than their container's siblings
2
+
3
+ Law module: `gap-proximity.ts`. Knowledge: `knowledge/ui/presentation/grammar-laws.yaml#GAP-PROXIMITY`. Finding code: `FE_GAP_PROXIMITY`.
4
+
5
+ Inside any container, its children stand at least one step closer than the container stands to its siblings. The gap roles rise strictly: identity 4, inline 8, row 12, section 24, region 32.
6
+
7
+ Every rule below is an error in `coreGrammarConfig`; none can be switched off or suppressed inline.
8
+
9
+ ## `starci-grammar/gap-proximity`
10
+
11
+ A Grammar layout element nested directly in another (through fragments, `cond ? <x/> : null`, `cond && <x/>` and `items.map(() => <x/>)`) whose gap role is not below its parent's is refused. Roles: `Stack` and `Cluster` their literal `gap`; `PaneSection` its `gap` (default `inline`); `Section` row; `Grid` by kind (`cards`, `week`, `week-summary` inline; `sections`, `pair`, `featured`, `form` section; `main-rail` region); `Form` and `Fieldset` section.
12
+
13
+ Left alone: a `SurfaceCard`, `Drawer`, `Dialog`, `AlertDialog` or `Popover` resets the comparison (a surface is its own edge); a field stack (`Stack gap="section"` whose children are all form controls) directly in a `Form` or `Fieldset`; `Grid kind="main-rail"` as parent or child; a non-literal `gap`; an element in between that is not a layout element.
14
+
15
+ **Invalid**
16
+
17
+ ```tsx
18
+ <Stack gap="section"><Stack gap="section"><Text>A</Text></Stack></Stack>
19
+ <Section><Section kind="list" /></Section>
20
+ ```
21
+
22
+ **Valid**
23
+
24
+ ```tsx
25
+ <Stack gap="section"><Stack gap="row"><Text>A</Text></Stack></Stack>
26
+ <Form><Stack gap="section"><Input label="Name" /><Select label="Role" /></Stack></Form>
27
+ ```
28
+
29
+ The message names the child and its role, the parent and its role, and the role to use: one step below the parent (a `Section` or a `Grid` fixes its own role, so the parent steps up or the element is not nested there).
30
+
31
+ Rule ownership: [FE-RULE-OWNERSHIP](../../../contexts/code/fe/README.md#the-placement-test-fe-rule-ownership).
@@ -0,0 +1,28 @@
1
+ # Every console page states its trail
2
+
3
+ Law module: `page-breadcrumbs.ts`. Knowledge: `knowledge/ui/presentation/grammar-laws.yaml#PAGE-BREADCRUMBS`. Finding code: `FE_PAGE_BREADCRUMBS`.
4
+
5
+ Every page of the app console gives the reader a way up. The root page of a console says so with `breadcrumbs: "root"`, which draws no trail.
6
+
7
+ Every rule below is an error in `coreGrammarConfig`; none can be switched off or suppressed inline.
8
+
9
+ ## `starci-grammar/page-breadcrumbs`
10
+
11
+ A Grammar `Page` whose `header` is an object literal (in place, or a `const` of the same file) with no `breadcrumbs` property is refused. Not judged: no `header` (a sign-in card, a landing), a `header` that is not an object literal, a header with a spread.
12
+
13
+ Console pages are the `Page` elements drawn in a page owner or layout owner (`fe.feature`, kind `pages` or `layouts`) that is not a segment boundary (`*ErrorPage`, `*LoadingPage`, `*NotFoundPage`) and is not mounted only under the app's `(auth)` route group, and in an app block (`fe.components`, kind `blocks`), which may draw the page from client data.
14
+
15
+ **Invalid**
16
+
17
+ ```tsx
18
+ <Page header={{ title: "Main account" }}>...</Page>
19
+ ```
20
+
21
+ **Valid**
22
+
23
+ ```tsx
24
+ <Page header={{ title: "Main account", breadcrumbs: { label: "Trail", items } }}>...</Page>
25
+ <Page header={{ title: "Overview", breadcrumbs: "root" }}>...</Page>
26
+ ```
27
+
28
+ Rule ownership: [FE-RULE-OWNERSHIP](../../../contexts/code/fe/README.md#the-placement-test-fe-rule-ownership).
@@ -0,0 +1,30 @@
1
+ # Row titles are not links
2
+
3
+ Law module: `row-title-link.ts`. Finding code: `FE_ROW_TITLE_LINK`. Knowledge: `knowledge/ui/presentation/grammar-laws.yaml#ROW-TITLE-LINK`.
4
+
5
+ When a row opens something, the row is the one pressable and its title is plain text. A `Link` inside the title adds a second target and a second tab stop on the same row for the same destination.
6
+
7
+ Every rule below is an error in `coreGrammarConfig`; none can be switched off or suppressed inline.
8
+
9
+ ## `starci-grammar/row-title-link`
10
+
11
+ - A ListRow data object (a row of the `items` of a list collection, or the `row` of a `<ListRow>`) whose `title` holds a Grammar `Link` while the same object has `onPress`, `onAction`, `href`, `onFollow` or `chevron` (message `row`).
12
+ - A `DataTable` whose rows open (`onRowAction`, or an inline `rows` literal or `.map` whose objects carry an `href`) and whose `renderCell` returns a `Link` for the row-header column: the column marked `isRowHeader`, else the first column of an inline `columns` literal. A `Link` in the branch of another column is not judged; a `Link` outside any column branch is (message `cell`).
13
+
14
+ A row that does not open may hold a link in its title. A Link in the description is not the title.
15
+
16
+ **Invalid**
17
+
18
+ ```tsx
19
+ <Section kind="list" items={[{ id: "a", title: <Link href="/a">A</Link>, href: "/a" }]} />
20
+ <DataTable onRowAction={open} renderCell={(row) => <Link href={row.href}>{row.name}</Link>} … />
21
+ ```
22
+
23
+ **Valid**
24
+
25
+ ```tsx
26
+ <Section kind="list" items={[{ id: "a", title: "A", href: "/a" }]} />
27
+ <DataTable onRowAction={open} renderCell={(row) => <Text isStrong>{row.name}</Text>} … />
28
+ ```
29
+
30
+ Rule ownership: [FE-RULE-OWNERSHIP](../../../contexts/code/fe/README.md#the-placement-test-fe-rule-ownership).
@@ -0,0 +1,26 @@
1
+ # One line, one size
2
+
3
+ Law module: `same-line-size.ts`. Finding code: `FE_SAME_LINE_SIZE`. Knowledge: `knowledge/ui/presentation/grammar-laws.yaml#SAME-LINE-SIZE`.
4
+
5
+ Texts that stand side by side on one line share one size; the size is the size of the line's role (md for a primary line, sm for a secondary or meta line). A line that mixes 14px and 13px words reads as two lines glued together.
6
+
7
+ Every rule below is an error in `coreGrammarConfig`; none can be switched off or suppressed inline.
8
+
9
+ ## `starci-grammar/same-line-size`
10
+
11
+ Among the direct `Text` children of one `Cluster` (and of a `Text` that holds `Text` runs, whose own size is the line size), seen through fragments, `cond && <Text />` and ternaries, the first `Text` sets the line's size (an absent `size` is `md`) and every later `Text` of another size is a finding. A `Text` whose `size` is not a literal, or that has a spread attribute, is skipped. `Badge`, `StatusDot`, `Chip` and `TagGroup` are not `Text`, so they are exempt. Nested Clusters are separate lines.
12
+
13
+ **Invalid**
14
+
15
+ ```tsx
16
+ <Cluster><Text>Deploy</Text><Text size="sm" tone="muted">2 min ago</Text></Cluster>
17
+ ```
18
+
19
+ **Valid**
20
+
21
+ ```tsx
22
+ <Cluster><Text size="sm">Deploy</Text><Text size="sm" tone="muted">2 min ago</Text></Cluster>
23
+ <Cluster><Text>Deploy</Text><Badge>Live</Badge></Cluster>
24
+ ```
25
+
26
+ Rule ownership: [FE-RULE-OWNERSHIP](../../../contexts/code/fe/README.md#the-placement-test-fe-rule-ownership).
@@ -0,0 +1,28 @@
1
+ # A list of rows inside a surface is a nested surface
2
+
3
+ Law module: `surface-in-surface.ts`. Knowledge: `knowledge/ui/presentation/grammar-laws.yaml#SURFACE-IN-SURFACE`. Finding code: `FE_SURFACE_IN_SURFACE`.
4
+
5
+ The Grammar wraps a `Section kind="list"` placed in a card body, a drawer, a dialog, a pane band or a rail as a nested surface (a 1px separator border, the card radius, clipped). A hand-made row list is the bare form.
6
+
7
+ Every rule below is an error in `coreGrammarConfig`; none can be switched off or suppressed inline.
8
+
9
+ ## `starci-grammar/surface-in-surface`
10
+
11
+ A Grammar `Stack`, or a `ul`, `ol` or `div`, whose rendered children include a Grammar `Divider` between other children, inside a `SurfaceCard`, `Drawer`, `Dialog`, `PaneSection` or the `rail` of a `Grid kind="main-rail"`, is refused. A card inside a card is `no-raised-surface-in-surface` and a `Divider` directly in a `body` card is `surface-card-kind`; neither is read again.
12
+
13
+ **Invalid**
14
+
15
+ ```tsx
16
+ <Drawer title="Runs">
17
+ <Stack gap="row">{runs.map((run) => <Fragment key={run.id}><Cluster gap="inline">...</Cluster><Divider /></Fragment>)}</Stack>
18
+ </Drawer>
19
+ ```
20
+
21
+ **Valid**
22
+
23
+ ```tsx
24
+ <Drawer title="Runs"><Section kind="list" items={runs} /></Drawer>
25
+ <SurfaceCard label="Runs" kind="list" items={runs} empty={null} />
26
+ ```
27
+
28
+ Rule ownership: [FE-RULE-OWNERSHIP](../../../contexts/code/fe/README.md#the-placement-test-fe-rule-ownership).
@@ -0,0 +1,32 @@
1
+ # Table and row type
2
+
3
+ Law module: `table-cell-type.ts`. Finding code: `FE_TABLE_CELL_TYPE`. Knowledge: `knowledge/ui/presentation/grammar-laws.yaml#TABLE-CELL-TYPE`.
4
+
5
+ The text of a table cell or a list row is read in a column of equals, so it takes the row type sizes: the primary is md 14 / 500 (`<Text isStrong>`), the secondary is sm 13 muted (`<Text size="sm" tone="muted">`). A heading-size Text, a `Heading`, a `Label` or an `h1`-`h6` there is a heading drawn in a list.
6
+
7
+ Every rule below is an error in `coreGrammarConfig`; none can be switched off or suppressed inline.
8
+
9
+ ## `starci-grammar/table-cell-type`
10
+
11
+ Inside the places below, `Text size="figure"`, any `Heading`, any `Label` and the tags `h1`-`h6` are findings:
12
+
13
+ - the function a `DataTable` takes as `renderCell` (inline, or a function or arrow declared by name in the file), and the `editor` function of a column object in its `columns` literal;
14
+ - the `title` and `description` of a ListRow data object: a row of the `items` of a list collection (`{ kind: "list", items }`, or `Section` / `SurfaceCard` written `kind="list"`, also through a `.map` callback), or the `row` of a `<ListRow>`.
15
+
16
+ A row list declared elsewhere and passed by name is not followed. A `figure` Text outside a cell or row (a KPI) is not judged.
17
+
18
+ **Invalid**
19
+
20
+ ```tsx
21
+ <DataTable renderCell={(row) => <Text size="figure">{row.name}</Text>} … />
22
+ <Section kind="list" items={rows.map((r) => ({ id: r.id, title: <Heading level={3}>{r.name}</Heading> }))} />
23
+ ```
24
+
25
+ **Valid**
26
+
27
+ ```tsx
28
+ <DataTable renderCell={(row) => <Text isStrong>{row.name}</Text>} … />
29
+ <Section kind="list" items={rows.map((r) => ({ id: r.id, title: r.name, description: r.note }))} />
30
+ ```
31
+
32
+ Rule ownership: [FE-RULE-OWNERSHIP](../../../contexts/code/fe/README.md#the-placement-test-fe-rule-ownership).
package/docs/tabs.md ADDED
@@ -0,0 +1,48 @@
1
+ # Tabs: where the pill stands, and how many layers
2
+
3
+ Law module: `tabs.ts`. Knowledge: `grammar-laws.yaml` `TABS-SWITCH-ZONE`, `TABS-DEPTH`. Component law: `contexts/ui/components/tabs.md`.
4
+
5
+ Underline tabs switch panels: the page tabs (`Page header.tabs`) and, inside a tab's panel, a region set. The pill (`appearance="primary"`) is a different thing: a mode or period switch of one block's data. Both rules are errors in `coreGrammarConfig`; none can be switched off or suppressed inline.
6
+
7
+ ## `starci-grammar/tabs-switch-zone`
8
+
9
+ Finding code: `FE_TABS_SWITCH_ZONE`. A `<Tabs appearance="primary">` written in JSX is a finding wherever it stands (a page body, under the page tabs, a pane, a drawer). The pill is drawn only as the `switch` header zone of a card, which has no JSX to write. The item checks (two to four options, no `count`, `href` or `isAttention`) stay in `no-primary-tabs-misuse` (R380).
10
+
11
+ **Invalid**
12
+
13
+ ```tsx
14
+ <Page header={{ title, tabs }}>
15
+ <Tabs appearance="primary" label="Views" items={views} selectedKey={view} onSelect={setView} />
16
+ </Page>
17
+ ```
18
+
19
+ **Valid**
20
+
21
+ ```tsx
22
+ <SurfaceCard kind="list" label="Cash" headers={[{ kind: "switch", label: "Period", items: periods, selectedKey: period, onSelect: setPeriod }]} items={rows} empty={empty} />
23
+ ```
24
+
25
+ ## `starci-grammar/tabs-depth`
26
+
27
+ Finding code: `FE_TABS_DEPTH`. Over the underline `Tabs` of one file. Every tab is one size, so only the layer count is judged.
28
+
29
+ - `depth`: a page stacks at most two underline layers, the page tabs and one region set. A `Tabs` is in the panel of another when it stands inside a conditional, `&&` or `switch` case whose test reads the other's `selectedKey`; it is in the page's panel when it stands in the children of a `Page` whose `header` object carries `tabs`. A `Tabs` that is the third layer is the finding. A `Drawer`, `Dialog`, `Modal`, `Popover` or `Sheet` starts its own surface and ends the climb.
30
+
31
+ **Invalid**
32
+
33
+ ```tsx
34
+ <Page header={{ title, tabs }}>
35
+ <Tabs label="Status" items={statuses} selectedKey={status} onSelect={setStatus} />
36
+ {status === "open" && <Tabs label="Inbox" items={inbox} selectedKey={inboxView} onSelect={setInboxView} />}
37
+ </Page>
38
+ ```
39
+
40
+ **Valid**
41
+
42
+ ```tsx
43
+ <Page header={{ title, tabs }}>
44
+ <Tabs label="Status" items={statuses} selectedKey={status} onSelect={setStatus} />
45
+ </Page>
46
+ ```
47
+
48
+ The rule reads one file. A set whose page tabs are drawn by another file (a layout, or a frame component such as a renderer package) is not judged against them: that link is runtime composition, not an import the rule can follow.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@starci/eslint-grammar-core",
3
- "version": "0.27.1",
3
+ "version": "0.28.0",
4
4
  "description": "ESLint rules for the core Grammar's component, token and composition contracts.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@starci/eslint-canon-fe": "~9.16.0",
45
- "@starci/hfs": "~6.4.0",
45
+ "@starci/hfs": "~6.5.0",
46
46
  "eslint": ">=9",
47
47
  "typescript": ">=5.9"
48
48
  },
@@ -68,6 +68,6 @@
68
68
  "eslint-plugin-react-hooks": "^7.1.1",
69
69
  "typescript": "^6.0.3"
70
70
  },
71
- "gitHead": "247dce2b96806850cc135a4573c9b6069c908ef1",
72
- "starciSource": "5f404cef5ef2ea51c88213874c18642cb6049b737877362c263d05350e5c81e3"
71
+ "gitHead": "74626bff437fb2376bf0866421379f7cfc2d4ef8",
72
+ "starciSource": "1a0619aae1b449f246a08704001747b28fb0850b77649d37181e6b6c49535eac"
73
73
  }
@@ -4,6 +4,7 @@
4
4
  "knowledge/patterns/fe/index.yaml",
5
5
  "knowledge/patterns/fe/ui.yaml",
6
6
  "knowledge/ui/composition/app-shell.yaml",
7
+ "knowledge/ui/presentation/grammar-laws.yaml",
7
8
  "knowledge/ui/proof/anatomy-source.yaml",
8
9
  "modules/goal/source-phrases.yaml"
9
10
  ]
@@ -0,0 +1,102 @@
1
+ schema: starci/knowledge-source@1
2
+ id: ui.presentation.grammar-laws
3
+ title: Grammar presentation laws (owner, 2026-11-09)
4
+ appliesTo: [ui, frontend]
5
+ family: presentation
6
+ purpose: |-
7
+ The spacing, surface, field, typography, link and button laws the owner approved on 2026-11-09. The core Grammar
8
+ owns the values; these rules say what an app composition may not do against them.
9
+ provenance:
10
+ reviewedAt: 2026-11-09
11
+ sources:
12
+ - knowledge/patterns/fe/ui.yaml
13
+ limitations: |-
14
+ Static checks read JSX composition only; the rendered gaps are measured by the Grammar's audit-gap script.
15
+ rules:
16
+ - id: GAP-PROXIMITY
17
+ title: Children stand closer than their container's siblings
18
+ governs: The gap role of a Grammar layout element nested in another.
19
+ cases:
20
+ - id: case-1
21
+ when: A Grammar layout element (Stack, Cluster, PaneSection, Section, Grid, Form) sits directly inside another
22
+ assert: |-
23
+ The child's gap role is at least one step below its parent's (identity 4 < inline 8 < row 12 < section 24 <
24
+ region 32). A field stack (fields 24 apart) inside a Form or a Drawer body is the Field rule's own rhythm.
25
+ - id: SURFACE-IN-SURFACE
26
+ title: A list of rows inside a surface is a nested surface
27
+ governs: Row lists placed inside a card body, a drawer, a dialog or a pane band.
28
+ cases:
29
+ - id: case-1
30
+ when: Rows divided by lines stand inside a surface without being that surface's own full-bleed body
31
+ assert: |-
32
+ The Grammar list draws them in a nested surface: a 1px separator border, the card radius, clipped.
33
+ A hand-made row list (blocks divided by Divider) is the bare form and is refused.
34
+ - id: FIELD-LABEL
35
+ title: A control is labelled by its own label prop
36
+ governs: The label of every form control.
37
+ cases:
38
+ - id: case-1
39
+ when: A form control is composed
40
+ assert: |-
41
+ The label is the control's `label` prop: label to control 8, control to help 4, field to field 24. A Text
42
+ placed beside the control as its label is refused.
43
+ - id: PAGE-BREADCRUMBS
44
+ title: Every console page states its trail
45
+ governs: The header of an app console page.
46
+ cases:
47
+ - id: case-1
48
+ when: An app console page draws a Page header
49
+ assert: |-
50
+ The header carries `breadcrumbs`, or `breadcrumbs="root"` for the root page of its console.
51
+ - id: BUTTON-ARROW
52
+ title: A leads-somewhere button ends with endArrow
53
+ governs: Arrows on Buttons.
54
+ cases:
55
+ - id: case-1
56
+ when: A Button leads somewhere
57
+ assert: |-
58
+ It takes `endArrow`; an arrow typed in its label or passed as end content is refused. A Button that does
59
+ something takes `startGlyph`; never both.
60
+ - id: TABLE-CELL-TYPE
61
+ title: Table and row cells take the row type sizes
62
+ governs: Text inside a DataTable cell or a ListRow.
63
+ cases:
64
+ - id: case-1
65
+ when: Text is drawn in a DataTable cell or a ListRow
66
+ assert: |-
67
+ The primary is md 14 / 500, the secondary sm 13 muted; a heading-size Text is refused.
68
+ - id: SAME-LINE-SIZE
69
+ title: One line, one size
70
+ governs: Text siblings of one inline line.
71
+ cases:
72
+ - id: case-1
73
+ when: Texts stand side by side in one Cluster
74
+ assert: |-
75
+ They share one size; a Badge or a chip is exempt.
76
+ - id: ROW-TITLE-LINK
77
+ title: A row title is never a link when the row opens
78
+ governs: The primary of a ListRow or a DataTable row.
79
+ cases:
80
+ - id: case-1
81
+ when: A row has an action, an href or a chevron
82
+ assert: |-
83
+ Its title is plain text; the row is the one pressable.
84
+ - id: TABS-SWITCH-ZONE
85
+ title: The pill is the switch zone of a card
86
+ governs: Tabs appearance="primary".
87
+ cases:
88
+ - id: case-1
89
+ when: A mode or period of one block's data is switched among two to four short options
90
+ assert: |-
91
+ It is the card's `switch` header zone (`headers={[{ kind: "switch", label, items, selectedKey, onSelect }]}`),
92
+ with no count and no href. A pill written in JSX in a page body, under the page tabs, in a pane or in a drawer
93
+ is refused: views of a page are page tabs, views or filters inside a region are underline `Tabs`.
94
+ - id: TABS-DEPTH
95
+ title: A page stacks two underline layers at most
96
+ governs: Underline Tabs nested through the panels they select.
97
+ cases:
98
+ - id: case-1
99
+ when: An underline Tabs stands in the panel of another, or in the body of a Page whose header carries tabs
100
+ assert: |-
101
+ The page tabs (`Page header.tabs`) and one region set are the two layers; a third nested set is refused.
102
+ Every tab is one size, so only the count of layers is judged.