@flowstack-ui/agent-tools 0.1.0-bootstrap.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.
- package/.codex-plugin/plugin.json +37 -0
- package/CHANGELOG.md +21 -0
- package/LICENSE +21 -0
- package/README.md +125 -0
- package/docs/architecture.md +77 -0
- package/docs/releasing.md +26 -0
- package/docs/testing.md +32 -0
- package/package.json +63 -0
- package/public/index.json +2073 -0
- package/public/llms.txt +19 -0
- package/public/packages/atom/0.24.0/components/accordion.txt +131 -0
- package/public/packages/atom/0.24.0/components/alert-dialog.txt +112 -0
- package/public/packages/atom/0.24.0/components/app-bar.txt +96 -0
- package/public/packages/atom/0.24.0/components/aspect-ratio.txt +111 -0
- package/public/packages/atom/0.24.0/components/avatar.txt +119 -0
- package/public/packages/atom/0.24.0/components/badge.txt +123 -0
- package/public/packages/atom/0.24.0/components/bottom-navigation.txt +96 -0
- package/public/packages/atom/0.24.0/components/breadcrumb.txt +96 -0
- package/public/packages/atom/0.24.0/components/button.txt +98 -0
- package/public/packages/atom/0.24.0/components/carousel.txt +128 -0
- package/public/packages/atom/0.24.0/components/checkbox-group.txt +118 -0
- package/public/packages/atom/0.24.0/components/checkbox.txt +100 -0
- package/public/packages/atom/0.24.0/components/clipboard.txt +112 -0
- package/public/packages/atom/0.24.0/components/collapsible.txt +112 -0
- package/public/packages/atom/0.24.0/components/color-picker.txt +117 -0
- package/public/packages/atom/0.24.0/components/combobox.txt +126 -0
- package/public/packages/atom/0.24.0/components/context-menu.txt +114 -0
- package/public/packages/atom/0.24.0/components/data-grid.txt +136 -0
- package/public/packages/atom/0.24.0/components/dialog.txt +116 -0
- package/public/packages/atom/0.24.0/components/direction.txt +132 -0
- package/public/packages/atom/0.24.0/components/divider.txt +94 -0
- package/public/packages/atom/0.24.0/components/drag-drop.txt +141 -0
- package/public/packages/atom/0.24.0/components/drawer.txt +96 -0
- package/public/packages/atom/0.24.0/components/dropdown-menu.txt +112 -0
- package/public/packages/atom/0.24.0/components/feed.txt +132 -0
- package/public/packages/atom/0.24.0/components/field.txt +108 -0
- package/public/packages/atom/0.24.0/components/fieldset.txt +96 -0
- package/public/packages/atom/0.24.0/components/file-upload.txt +120 -0
- package/public/packages/atom/0.24.0/components/form.txt +98 -0
- package/public/packages/atom/0.24.0/components/hover-card.txt +114 -0
- package/public/packages/atom/0.24.0/components/image.txt +94 -0
- package/public/packages/atom/0.24.0/components/input.txt +96 -0
- package/public/packages/atom/0.24.0/components/label.txt +121 -0
- package/public/packages/atom/0.24.0/components/link.txt +100 -0
- package/public/packages/atom/0.24.0/components/list.txt +131 -0
- package/public/packages/atom/0.24.0/components/listbox.txt +120 -0
- package/public/packages/atom/0.24.0/components/menu.txt +126 -0
- package/public/packages/atom/0.24.0/components/menubar.txt +120 -0
- package/public/packages/atom/0.24.0/components/modal.txt +118 -0
- package/public/packages/atom/0.24.0/components/multi-select.txt +120 -0
- package/public/packages/atom/0.24.0/components/nav-list.txt +104 -0
- package/public/packages/atom/0.24.0/components/navigation-menu.txt +104 -0
- package/public/packages/atom/0.24.0/components/number-input.txt +124 -0
- package/public/packages/atom/0.24.0/components/otp-field.txt +122 -0
- package/public/packages/atom/0.24.0/components/pagination.txt +111 -0
- package/public/packages/atom/0.24.0/components/password-toggle-field.txt +116 -0
- package/public/packages/atom/0.24.0/components/popover.txt +122 -0
- package/public/packages/atom/0.24.0/components/pressable.txt +94 -0
- package/public/packages/atom/0.24.0/components/progress.txt +130 -0
- package/public/packages/atom/0.24.0/components/radio-group.txt +118 -0
- package/public/packages/atom/0.24.0/components/rating.txt +122 -0
- package/public/packages/atom/0.24.0/components/reorder.txt +141 -0
- package/public/packages/atom/0.24.0/components/scroll-area.txt +96 -0
- package/public/packages/atom/0.24.0/components/select.txt +126 -0
- package/public/packages/atom/0.24.0/components/sidebar.txt +96 -0
- package/public/packages/atom/0.24.0/components/skip-link.txt +96 -0
- package/public/packages/atom/0.24.0/components/slider.txt +124 -0
- package/public/packages/atom/0.24.0/components/swipeable-item.txt +118 -0
- package/public/packages/atom/0.24.0/components/switch.txt +116 -0
- package/public/packages/atom/0.24.0/components/table.txt +128 -0
- package/public/packages/atom/0.24.0/components/tabs.txt +96 -0
- package/public/packages/atom/0.24.0/components/textarea.txt +96 -0
- package/public/packages/atom/0.24.0/components/toast.txt +124 -0
- package/public/packages/atom/0.24.0/components/toggle-group.txt +118 -0
- package/public/packages/atom/0.24.0/components/toggle.txt +110 -0
- package/public/packages/atom/0.24.0/components/toolbar.txt +98 -0
- package/public/packages/atom/0.24.0/components/tooltip.txt +112 -0
- package/public/packages/atom/0.24.0/components/tree-grid.txt +138 -0
- package/public/packages/atom/0.24.0/components/tree.txt +138 -0
- package/public/packages/atom/0.24.0/components/visually-hidden.txt +119 -0
- package/public/packages/atom/0.24.0/docs/guides/agent-knowledge.txt +55 -0
- package/public/packages/atom/0.24.0/docs/guides/getting-started.txt +65 -0
- package/public/packages/atom/0.24.0/docs/guides/imports.txt +26 -0
- package/public/packages/atom/0.24.0/docs/guides/public-api.txt +100 -0
- package/public/packages/atom/0.24.0/guides/behavior-composition.txt +277 -0
- package/public/packages/atom/0.24.0/guides/layer-selection.txt +807 -0
- package/public/packages/atom/0.24.0/index.txt +89 -0
- package/public/packages/brick/0.1.11/components/accordion.txt +158 -0
- package/public/packages/brick/0.1.11/components/alert-dialog.txt +175 -0
- package/public/packages/brick/0.1.11/components/app-bar.txt +134 -0
- package/public/packages/brick/0.1.11/components/appearance.txt +143 -0
- package/public/packages/brick/0.1.11/components/aspect-ratio.txt +136 -0
- package/public/packages/brick/0.1.11/components/avatar.txt +152 -0
- package/public/packages/brick/0.1.11/components/badge.txt +139 -0
- package/public/packages/brick/0.1.11/components/bleed.txt +104 -0
- package/public/packages/brick/0.1.11/components/bottom-navigation.txt +106 -0
- package/public/packages/brick/0.1.11/components/breadcrumb.txt +96 -0
- package/public/packages/brick/0.1.11/components/button.txt +103 -0
- package/public/packages/brick/0.1.11/components/card.txt +132 -0
- package/public/packages/brick/0.1.11/components/carousel.txt +206 -0
- package/public/packages/brick/0.1.11/components/checkbox-group.txt +175 -0
- package/public/packages/brick/0.1.11/components/checkbox.txt +103 -0
- package/public/packages/brick/0.1.11/components/chip.txt +128 -0
- package/public/packages/brick/0.1.11/components/code-block.txt +134 -0
- package/public/packages/brick/0.1.11/components/code.txt +120 -0
- package/public/packages/brick/0.1.11/components/collapsible.txt +179 -0
- package/public/packages/brick/0.1.11/components/color-picker.txt +135 -0
- package/public/packages/brick/0.1.11/components/color-swatch.txt +98 -0
- package/public/packages/brick/0.1.11/components/combobox.txt +157 -0
- package/public/packages/brick/0.1.11/components/container.txt +112 -0
- package/public/packages/brick/0.1.11/components/context-menu.txt +174 -0
- package/public/packages/brick/0.1.11/components/data-grid.txt +199 -0
- package/public/packages/brick/0.1.11/components/data-list.txt +115 -0
- package/public/packages/brick/0.1.11/components/dialog.txt +176 -0
- package/public/packages/brick/0.1.11/components/divider.txt +104 -0
- package/public/packages/brick/0.1.11/components/drawer.txt +146 -0
- package/public/packages/brick/0.1.11/components/dropdown-menu.txt +179 -0
- package/public/packages/brick/0.1.11/components/feed.txt +143 -0
- package/public/packages/brick/0.1.11/components/field.txt +115 -0
- package/public/packages/brick/0.1.11/components/fieldset.txt +103 -0
- package/public/packages/brick/0.1.11/components/file-upload.txt +154 -0
- package/public/packages/brick/0.1.11/components/form.txt +108 -0
- package/public/packages/brick/0.1.11/components/frame.txt +132 -0
- package/public/packages/brick/0.1.11/components/grid.txt +141 -0
- package/public/packages/brick/0.1.11/components/group.txt +136 -0
- package/public/packages/brick/0.1.11/components/hide.txt +121 -0
- package/public/packages/brick/0.1.11/components/hover-card.txt +156 -0
- package/public/packages/brick/0.1.11/components/icon-button.txt +119 -0
- package/public/packages/brick/0.1.11/components/icon.txt +160 -0
- package/public/packages/brick/0.1.11/components/image.txt +163 -0
- package/public/packages/brick/0.1.11/components/input.txt +101 -0
- package/public/packages/brick/0.1.11/components/link-box.txt +161 -0
- package/public/packages/brick/0.1.11/components/link.txt +133 -0
- package/public/packages/brick/0.1.11/components/list.txt +139 -0
- package/public/packages/brick/0.1.11/components/menubar.txt +174 -0
- package/public/packages/brick/0.1.11/components/multi-select.txt +153 -0
- package/public/packages/brick/0.1.11/components/nav-list.txt +130 -0
- package/public/packages/brick/0.1.11/components/navigation-menu.txt +150 -0
- package/public/packages/brick/0.1.11/components/notification-badge.txt +148 -0
- package/public/packages/brick/0.1.11/components/number-input.txt +150 -0
- package/public/packages/brick/0.1.11/components/otp-field.txt +146 -0
- package/public/packages/brick/0.1.11/components/pagination.txt +124 -0
- package/public/packages/brick/0.1.11/components/password-toggle-field.txt +146 -0
- package/public/packages/brick/0.1.11/components/popover.txt +181 -0
- package/public/packages/brick/0.1.11/components/progress-circle.txt +142 -0
- package/public/packages/brick/0.1.11/components/progress.txt +150 -0
- package/public/packages/brick/0.1.11/components/radio-group.txt +152 -0
- package/public/packages/brick/0.1.11/components/rating.txt +151 -0
- package/public/packages/brick/0.1.11/components/reorderable-list.txt +130 -0
- package/public/packages/brick/0.1.11/components/scroll-area.txt +110 -0
- package/public/packages/brick/0.1.11/components/section.txt +118 -0
- package/public/packages/brick/0.1.11/components/segment-group.txt +116 -0
- package/public/packages/brick/0.1.11/components/select.txt +157 -0
- package/public/packages/brick/0.1.11/components/show.txt +121 -0
- package/public/packages/brick/0.1.11/components/sidebar.txt +126 -0
- package/public/packages/brick/0.1.11/components/skeleton.txt +127 -0
- package/public/packages/brick/0.1.11/components/skip-link.txt +102 -0
- package/public/packages/brick/0.1.11/components/slider.txt +147 -0
- package/public/packages/brick/0.1.11/components/stack.txt +155 -0
- package/public/packages/brick/0.1.11/components/status.txt +110 -0
- package/public/packages/brick/0.1.11/components/surface.txt +194 -0
- package/public/packages/brick/0.1.11/components/swipeable-item.txt +154 -0
- package/public/packages/brick/0.1.11/components/switch.txt +152 -0
- package/public/packages/brick/0.1.11/components/table.txt +183 -0
- package/public/packages/brick/0.1.11/components/tabs.txt +136 -0
- package/public/packages/brick/0.1.11/components/text.txt +148 -0
- package/public/packages/brick/0.1.11/components/textarea.txt +101 -0
- package/public/packages/brick/0.1.11/components/toast.txt +150 -0
- package/public/packages/brick/0.1.11/components/toggle-group.txt +149 -0
- package/public/packages/brick/0.1.11/components/toggle.txt +140 -0
- package/public/packages/brick/0.1.11/components/toolbar.txt +118 -0
- package/public/packages/brick/0.1.11/components/tooltip.txt +156 -0
- package/public/packages/brick/0.1.11/components/tree-grid.txt +160 -0
- package/public/packages/brick/0.1.11/components/tree.txt +156 -0
- package/public/packages/brick/0.1.11/components/visually-hidden.txt +123 -0
- package/public/packages/brick/0.1.11/components/z-stack.txt +143 -0
- package/public/packages/brick/0.1.11/docs/guides/agent-knowledge.txt +67 -0
- package/public/packages/brick/0.1.11/docs/guides/appearance-and-tokens.txt +179 -0
- package/public/packages/brick/0.1.11/docs/guides/browser-support.txt +25 -0
- package/public/packages/brick/0.1.11/docs/guides/control-sizing.txt +59 -0
- package/public/packages/brick/0.1.11/docs/guides/installation.txt +79 -0
- package/public/packages/brick/0.1.11/docs/guides/theme-contract.txt +90 -0
- package/public/packages/brick/0.1.11/guides/interface-composition.txt +665 -0
- package/public/packages/brick/0.1.11/guides/layer-selection.txt +1437 -0
- package/public/packages/brick/0.1.11/index.txt +110 -0
- package/public/packages/colors/0.1.1/docs/agent-knowledge.txt +63 -0
- package/public/packages/colors/0.1.1/docs/architecture.txt +74 -0
- package/public/packages/colors/0.1.1/docs/color-foundations.txt +128 -0
- package/public/packages/colors/0.1.1/docs/compatibility.txt +75 -0
- package/public/packages/colors/0.1.1/docs/dependency-qualification.txt +117 -0
- package/public/packages/colors/0.1.1/docs/installation.txt +48 -0
- package/public/packages/colors/0.1.1/docs/palette-generation.txt +151 -0
- package/public/packages/colors/0.1.1/docs/releasing.txt +34 -0
- package/public/packages/colors/0.1.1/docs/testing.txt +51 -0
- package/public/packages/colors/0.1.1/guides/colors-system.txt +282 -0
- package/public/packages/colors/0.1.1/index.txt +29 -0
- package/public/packages/colors/0.1.1/operations/color-conversion.txt +14 -0
- package/public/packages/colors/0.1.1/operations/color-inspection.txt +23 -0
- package/public/packages/colors/0.1.1/operations/color-measurement.txt +18 -0
- package/public/packages/colors/0.1.1/operations/color-provenance.txt +14 -0
- package/public/packages/colors/0.1.1/operations/named-palette-reference.txt +15 -0
- package/public/packages/colors/0.1.1/operations/palette-candidate.txt +37 -0
- package/public/packages/theme/0.1.1/docs/agent-knowledge.txt +44 -0
- package/public/packages/theme/0.1.1/docs/appearances-and-portals.txt +41 -0
- package/public/packages/theme/0.1.1/docs/architecture.txt +121 -0
- package/public/packages/theme/0.1.1/docs/authoring.txt +141 -0
- package/public/packages/theme/0.1.1/docs/colors-interchange.txt +82 -0
- package/public/packages/theme/0.1.1/docs/fonts.txt +40 -0
- package/public/packages/theme/0.1.1/docs/installation.txt +45 -0
- package/public/packages/theme/0.1.1/docs/migration.txt +40 -0
- package/public/packages/theme/0.1.1/docs/testing.txt +64 -0
- package/public/packages/theme/0.1.1/docs/troubleshooting.txt +53 -0
- package/public/packages/theme/0.1.1/guides/theme-system.txt +340 -0
- package/public/packages/theme/0.1.1/index.txt +31 -0
- package/public/packages/theme/0.1.1/operations/brick-contract-compatibility.txt +35 -0
- package/public/packages/theme/0.1.1/operations/colors-interchange.txt +35 -0
- package/public/packages/theme/0.1.1/operations/theme-artifacts.txt +19 -0
- package/public/packages/theme/0.1.1/operations/theme-cli.txt +10 -0
- package/public/packages/theme/0.1.1/operations/theme-compilation.txt +23 -0
- package/public/packages/theme/0.1.1/operations/theme-definition.txt +36 -0
- package/public/packages/theme/0.1.1/operations/theme-validation.txt +19 -0
- package/public/tasks/data.txt +39 -0
- package/public/tasks/forms.txt +65 -0
- package/public/tasks/layout.txt +37 -0
- package/public/tasks/navigation.txt +51 -0
- package/public/tasks/overlays.txt +39 -0
- package/public/tasks/theming.txt +37 -0
- package/skills/flowstack-ui-builder/SKILL.md +35 -0
- package/skills/flowstack-ui-builder/agents/openai.yaml +4 -0
- package/skills/flowstack-ui-builder/scripts/resolve-agent-knowledge.mjs +399 -0
- package/skills/flowstack-ui-compose/SKILL.md +32 -0
- package/skills/flowstack-ui-compose/agents/openai.yaml +4 -0
- package/skills/flowstack-ui-compose/scripts/resolve-agent-knowledge.mjs +399 -0
- package/skills/flowstack-ui-maintainer/SKILL.md +40 -0
- package/skills/flowstack-ui-maintainer/agents/openai.yaml +4 -0
- package/skills/flowstack-ui-maintainer/scripts/resolve-agent-knowledge.mjs +399 -0
- package/skills/flowstack-ui-review/SKILL.md +29 -0
- package/skills/flowstack-ui-review/agents/openai.yaml +4 -0
- package/skills/flowstack-ui-review/scripts/resolve-agent-knowledge.mjs +399 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# ToggleGroup
|
|
2
|
+
|
|
3
|
+
Source: @flowstack-ui/atom@0.24.0
|
|
4
|
+
Kind: component
|
|
5
|
+
ID: toggle-group
|
|
6
|
+
|
|
7
|
+
# ToggleGroup agent guide
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Coordinate related toggle-button commands with single or multiple pressed selection and one orientation-aware roving focus stop.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- Several related commands, such as alignment or formatting controls, should expose pressed state and navigate as one keyboard group.
|
|
16
|
+
|
|
17
|
+
## Choose something else when
|
|
18
|
+
|
|
19
|
+
- The controls are unrelated, represent form answers, or turn settings on and off immediately. Use individual Toggle controls, RadioGroup or CheckboxGroup, or Switch.
|
|
20
|
+
|
|
21
|
+
## Required composition
|
|
22
|
+
|
|
23
|
+
- Give Root an accessible group name, choose type=single or type=multiple, and compose uniquely valued Item parts with visible text or accessible labels.
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- **MUST:** Give Root a concise accessible name and every icon-only Item its own accessible command name.
|
|
28
|
+
- **MUST:** Choose single when at most one command may be pressed and multiple for independent pressed commands; match controlled value and defaultValue shapes to that type.
|
|
29
|
+
- **MUST:** Provide stable unique Item values and route controlled updates through onValueChange.
|
|
30
|
+
- **MUST:** Preserve one roving Tab stop, disabled-item skipping, DOM-order registration, looping policy, orientation-specific Arrow keys, Home/End, and horizontal RTL mirroring.
|
|
31
|
+
- **MUST:** Preserve each Item's button and aria-pressed behavior and Root's group behavior when using asChild or render.
|
|
32
|
+
|
|
33
|
+
## Common mistakes
|
|
34
|
+
|
|
35
|
+
- **Avoid:** Using ToggleGroup for radio form answers, mixing string and array controlled values with the wrong type, or giving every Item a Tab stop. **Instead:** Choose the correct semantic group, keep value shape aligned to type, and retain the owned roving-focus model.
|
|
36
|
+
|
|
37
|
+
## Validation checklist
|
|
38
|
+
|
|
39
|
+
- Verify Root and Item names, single and multiple controlled and uncontrolled state, unique values, pressed semantics, disabled Root and Items, pointer, Enter, Space, and selection callbacks.
|
|
40
|
+
- Verify one roving Tab stop when selected and unselected, DOM-order changes, Arrow navigation by orientation, Home/End, loop boundaries, horizontal LTR/RTL, and native, asChild, and render composition.
|
|
41
|
+
|
|
42
|
+
## Related guidance
|
|
43
|
+
|
|
44
|
+
- `toggle`
|
|
45
|
+
- `radio-group`
|
|
46
|
+
- `checkbox-group`
|
|
47
|
+
- `switch`
|
|
48
|
+
- `toolbar`
|
|
49
|
+
|
|
50
|
+
## Machine record
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"schema": "flowstack.agent-component.v1",
|
|
55
|
+
"id": "toggle-group",
|
|
56
|
+
"name": "ToggleGroup",
|
|
57
|
+
"package": "@flowstack-ui/atom",
|
|
58
|
+
"layer": "atom",
|
|
59
|
+
"kind": "component",
|
|
60
|
+
"purpose": "Coordinate related toggle-button commands with single or multiple pressed selection and one orientation-aware roving focus stop.",
|
|
61
|
+
"useWhen": [
|
|
62
|
+
"Several related commands, such as alignment or formatting controls, should expose pressed state and navigate as one keyboard group."
|
|
63
|
+
],
|
|
64
|
+
"avoidWhen": [
|
|
65
|
+
{
|
|
66
|
+
"condition": "The controls are unrelated, represent form answers, or turn settings on and off immediately.",
|
|
67
|
+
"useInstead": "individual Toggle controls, RadioGroup or CheckboxGroup, or Switch"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"composition": [
|
|
71
|
+
"Give Root an accessible group name, choose type=single or type=multiple, and compose uniquely valued Item parts with visible text or accessible labels."
|
|
72
|
+
],
|
|
73
|
+
"rules": [
|
|
74
|
+
{
|
|
75
|
+
"id": "toggle-group-name",
|
|
76
|
+
"level": "must",
|
|
77
|
+
"statement": "Give Root a concise accessible name and every icon-only Item its own accessible command name."
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"id": "toggle-group-type",
|
|
81
|
+
"level": "must",
|
|
82
|
+
"statement": "Choose single when at most one command may be pressed and multiple for independent pressed commands; match controlled value and defaultValue shapes to that type."
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "toggle-group-values",
|
|
86
|
+
"level": "must",
|
|
87
|
+
"statement": "Provide stable unique Item values and route controlled updates through onValueChange."
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"id": "toggle-group-roving",
|
|
91
|
+
"level": "must",
|
|
92
|
+
"statement": "Preserve one roving Tab stop, disabled-item skipping, DOM-order registration, looping policy, orientation-specific Arrow keys, Home/End, and horizontal RTL mirroring."
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"id": "toggle-group-composition",
|
|
96
|
+
"level": "must",
|
|
97
|
+
"statement": "Preserve each Item's button and aria-pressed behavior and Root's group behavior when using asChild or render."
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"commonMistakes": [
|
|
101
|
+
{
|
|
102
|
+
"mistake": "Using ToggleGroup for radio form answers, mixing string and array controlled values with the wrong type, or giving every Item a Tab stop.",
|
|
103
|
+
"correction": "Choose the correct semantic group, keep value shape aligned to type, and retain the owned roving-focus model."
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"validation": [
|
|
107
|
+
"Verify Root and Item names, single and multiple controlled and uncontrolled state, unique values, pressed semantics, disabled Root and Items, pointer, Enter, Space, and selection callbacks.",
|
|
108
|
+
"Verify one roving Tab stop when selected and unselected, DOM-order changes, Arrow navigation by orientation, Home/End, loop boundaries, horizontal LTR/RTL, and native, asChild, and render composition."
|
|
109
|
+
],
|
|
110
|
+
"related": [
|
|
111
|
+
"toggle",
|
|
112
|
+
"radio-group",
|
|
113
|
+
"checkbox-group",
|
|
114
|
+
"switch",
|
|
115
|
+
"toolbar"
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
```
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Toggle
|
|
2
|
+
|
|
3
|
+
Source: @flowstack-ui/atom@0.24.0
|
|
4
|
+
Kind: component
|
|
5
|
+
ID: toggle
|
|
6
|
+
|
|
7
|
+
# Toggle agent guide
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Represent one command whose pressed state remains on or off with toggle-button semantics and controlled or uncontrolled state.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- One command such as bold, pin, or favorite remains pressed until the user operates it again.
|
|
16
|
+
|
|
17
|
+
## Choose something else when
|
|
18
|
+
|
|
19
|
+
- The control changes an immediate setting, submits a form choice, or belongs to a related keyboard-navigable set of pressed controls. Use Switch, Checkbox, or ToggleGroup.
|
|
20
|
+
|
|
21
|
+
## Required composition
|
|
22
|
+
|
|
23
|
+
- Render Root with visible command text or an accessible label; use asChild or render only when a custom element must preserve the owned button and keyboard contract.
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- **MUST:** Give Root a complete accessible name, especially when its visible content is only an icon.
|
|
28
|
+
- **MUST:** Use pressed with onPressedChange for controlled state or defaultPressed for uncontrolled state and preserve aria-pressed rather than inventing checkbox or switch semantics.
|
|
29
|
+
- **MUST:** Use Toggle for persistent command state, not for an immediate setting or a form answer.
|
|
30
|
+
- **MUST:** Preserve native button behavior or Atom's role, tab stop, Enter, Space, disabled, props, handlers, and refs when composing a non-native element.
|
|
31
|
+
|
|
32
|
+
## Common mistakes
|
|
33
|
+
|
|
34
|
+
- **Avoid:** Using Toggle for a setting or form value, changing its meaning between pressed states, or replacing Atom keyboard handlers in asChild composition. **Instead:** Keep one stable command label and aria-pressed state, choose Switch or Checkbox for other semantics, and merge the owned behavior.
|
|
35
|
+
|
|
36
|
+
## Validation checklist
|
|
37
|
+
|
|
38
|
+
- Verify accessible name, controlled and uncontrolled pressed state, aria-pressed and data state, pointer, Enter, and Space activation, disabled behavior, consumer handler prevention, and ref/native-prop forwarding.
|
|
39
|
+
- Verify native button, asChild, and render paths keep one element with correct button semantics, tab order, children, and disabled exposure.
|
|
40
|
+
|
|
41
|
+
## Related guidance
|
|
42
|
+
|
|
43
|
+
- `toggle-group`
|
|
44
|
+
- `switch`
|
|
45
|
+
- `checkbox`
|
|
46
|
+
- `button`
|
|
47
|
+
|
|
48
|
+
## Machine record
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"schema": "flowstack.agent-component.v1",
|
|
53
|
+
"id": "toggle",
|
|
54
|
+
"name": "Toggle",
|
|
55
|
+
"package": "@flowstack-ui/atom",
|
|
56
|
+
"layer": "atom",
|
|
57
|
+
"kind": "component",
|
|
58
|
+
"purpose": "Represent one command whose pressed state remains on or off with toggle-button semantics and controlled or uncontrolled state.",
|
|
59
|
+
"useWhen": [
|
|
60
|
+
"One command such as bold, pin, or favorite remains pressed until the user operates it again."
|
|
61
|
+
],
|
|
62
|
+
"avoidWhen": [
|
|
63
|
+
{
|
|
64
|
+
"condition": "The control changes an immediate setting, submits a form choice, or belongs to a related keyboard-navigable set of pressed controls.",
|
|
65
|
+
"useInstead": "Switch, Checkbox, or ToggleGroup"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"composition": [
|
|
69
|
+
"Render Root with visible command text or an accessible label; use asChild or render only when a custom element must preserve the owned button and keyboard contract."
|
|
70
|
+
],
|
|
71
|
+
"rules": [
|
|
72
|
+
{
|
|
73
|
+
"id": "toggle-name",
|
|
74
|
+
"level": "must",
|
|
75
|
+
"statement": "Give Root a complete accessible name, especially when its visible content is only an icon."
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id": "toggle-state",
|
|
79
|
+
"level": "must",
|
|
80
|
+
"statement": "Use pressed with onPressedChange for controlled state or defaultPressed for uncontrolled state and preserve aria-pressed rather than inventing checkbox or switch semantics."
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"id": "toggle-command",
|
|
84
|
+
"level": "must",
|
|
85
|
+
"statement": "Use Toggle for persistent command state, not for an immediate setting or a form answer."
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"id": "toggle-composition",
|
|
89
|
+
"level": "must",
|
|
90
|
+
"statement": "Preserve native button behavior or Atom's role, tab stop, Enter, Space, disabled, props, handlers, and refs when composing a non-native element."
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"commonMistakes": [
|
|
94
|
+
{
|
|
95
|
+
"mistake": "Using Toggle for a setting or form value, changing its meaning between pressed states, or replacing Atom keyboard handlers in asChild composition.",
|
|
96
|
+
"correction": "Keep one stable command label and aria-pressed state, choose Switch or Checkbox for other semantics, and merge the owned behavior."
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
"validation": [
|
|
100
|
+
"Verify accessible name, controlled and uncontrolled pressed state, aria-pressed and data state, pointer, Enter, and Space activation, disabled behavior, consumer handler prevention, and ref/native-prop forwarding.",
|
|
101
|
+
"Verify native button, asChild, and render paths keep one element with correct button semantics, tab order, children, and disabled exposure."
|
|
102
|
+
],
|
|
103
|
+
"related": [
|
|
104
|
+
"toggle-group",
|
|
105
|
+
"switch",
|
|
106
|
+
"checkbox",
|
|
107
|
+
"button"
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
```
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Toolbar
|
|
2
|
+
|
|
3
|
+
Source: @flowstack-ui/atom@0.24.0
|
|
4
|
+
Kind: component
|
|
5
|
+
ID: toolbar
|
|
6
|
+
|
|
7
|
+
# Toolbar agent guide
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Group related commands in one ARIA toolbar with orientation-aware roving keyboard focus.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- A compact row or column of related application controls should behave as one keyboard group.
|
|
16
|
+
|
|
17
|
+
## Choose something else when
|
|
18
|
+
|
|
19
|
+
- The items navigate among pages or are unrelated standalone actions. Use NavigationMenu, NavList, or separate Buttons.
|
|
20
|
+
|
|
21
|
+
## Required composition
|
|
22
|
+
|
|
23
|
+
- Compose Button, Link, Separator, and ToggleGroup/ToggleItem parts inside a named Root; keep all toolbar items in logical DOM order.
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- **MUST:** Give the toolbar and icon-only controls useful accessible names.
|
|
28
|
+
- **MUST:** Let Toolbar own item registration and arrow-key focus rather than adding competing tabIndex or key handlers.
|
|
29
|
+
|
|
30
|
+
## Common mistakes
|
|
31
|
+
|
|
32
|
+
- **Avoid:** Using AppBar.Toolbar as an ARIA toolbar or nesting a second roving-focus implementation. **Instead:** Compose Toolbar.Root inside AppBar when grouped controls need toolbar behavior.
|
|
33
|
+
|
|
34
|
+
## Validation checklist
|
|
35
|
+
|
|
36
|
+
- Test orientation, arrows, Home/End if supported, disabled items, toggle state, links, Tab entry/exit, and RTL.
|
|
37
|
+
- Confirm separators and controls expose correct semantics.
|
|
38
|
+
|
|
39
|
+
## Related guidance
|
|
40
|
+
|
|
41
|
+
- `app-bar`
|
|
42
|
+
- `button`
|
|
43
|
+
- `link`
|
|
44
|
+
- `toggle-group`
|
|
45
|
+
|
|
46
|
+
## Machine record
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"schema": "flowstack.agent-component.v1",
|
|
51
|
+
"id": "toolbar",
|
|
52
|
+
"name": "Toolbar",
|
|
53
|
+
"package": "@flowstack-ui/atom",
|
|
54
|
+
"layer": "atom",
|
|
55
|
+
"kind": "component",
|
|
56
|
+
"purpose": "Group related commands in one ARIA toolbar with orientation-aware roving keyboard focus.",
|
|
57
|
+
"useWhen": [
|
|
58
|
+
"A compact row or column of related application controls should behave as one keyboard group."
|
|
59
|
+
],
|
|
60
|
+
"avoidWhen": [
|
|
61
|
+
{
|
|
62
|
+
"condition": "The items navigate among pages or are unrelated standalone actions.",
|
|
63
|
+
"useInstead": "NavigationMenu, NavList, or separate Buttons"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"composition": [
|
|
67
|
+
"Compose Button, Link, Separator, and ToggleGroup/ToggleItem parts inside a named Root; keep all toolbar items in logical DOM order."
|
|
68
|
+
],
|
|
69
|
+
"rules": [
|
|
70
|
+
{
|
|
71
|
+
"id": "toolbar-name",
|
|
72
|
+
"level": "must",
|
|
73
|
+
"statement": "Give the toolbar and icon-only controls useful accessible names."
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"id": "toolbar-roving-focus",
|
|
77
|
+
"level": "must",
|
|
78
|
+
"statement": "Let Toolbar own item registration and arrow-key focus rather than adding competing tabIndex or key handlers."
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"commonMistakes": [
|
|
82
|
+
{
|
|
83
|
+
"mistake": "Using AppBar.Toolbar as an ARIA toolbar or nesting a second roving-focus implementation.",
|
|
84
|
+
"correction": "Compose Toolbar.Root inside AppBar when grouped controls need toolbar behavior."
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"validation": [
|
|
88
|
+
"Test orientation, arrows, Home/End if supported, disabled items, toggle state, links, Tab entry/exit, and RTL.",
|
|
89
|
+
"Confirm separators and controls expose correct semantics."
|
|
90
|
+
],
|
|
91
|
+
"related": [
|
|
92
|
+
"app-bar",
|
|
93
|
+
"button",
|
|
94
|
+
"link",
|
|
95
|
+
"toggle-group"
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
```
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Tooltip
|
|
2
|
+
|
|
3
|
+
Source: @flowstack-ui/atom@0.24.0
|
|
4
|
+
Kind: component
|
|
5
|
+
ID: tooltip
|
|
6
|
+
|
|
7
|
+
# Tooltip agent guide
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Provide a short supplemental text description on hover, focus-visible interaction, and stationary touch long press with an owned aria-describedby relationship.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- A control, especially an unfamiliar icon, needs a brief non-interactive hint in addition to its complete accessible name.
|
|
16
|
+
|
|
17
|
+
## Choose something else when
|
|
18
|
+
|
|
19
|
+
- The information is important enough to remain visible, is a richer passive preview, or contains links, buttons, inputs, or other interaction. Use visible text, HoverCard, or Popover.
|
|
20
|
+
|
|
21
|
+
## Required composition
|
|
22
|
+
|
|
23
|
+
- Compose Root with Trigger and Content; add Provider when descendant tooltips should share timing, Portal only when Content must leave its DOM location, and Arrow only when the styled hint needs a pointer. Plain and rich Content may differ in text structure, but both remain non-interactive tooltips.
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- **MUST:** Give Trigger a complete accessible name independently; Tooltip supplies only a supplemental aria-describedby description while open.
|
|
28
|
+
- **MUST:** Keep both plain and rich Content free of links, buttons, inputs, and other focusable controls; use Popover for interaction.
|
|
29
|
+
- **SHOULD:** Keep plain Content to a short hint and use rich only for concise non-interactive title and supporting text; render important information visibly.
|
|
30
|
+
- **MUST:** Preserve hover, focus-visible, Escape, shared delay, and stationary 700 ms touch long-press behavior, including movement, scroll, second-touch, cancellation, disabled, unmount, compatibility-event, and finite dismissal handling.
|
|
31
|
+
- **MUST:** When Trigger uses asChild or render, preserve its native semantics, Atom handlers and refs, and the generated description relationship.
|
|
32
|
+
|
|
33
|
+
## Common mistakes
|
|
34
|
+
|
|
35
|
+
- **Avoid:** Using Tooltip as the control's accessible name, placing interactive content in the rich variant, hiding essential instructions only on hover, or implementing a second touch long-press timer. **Instead:** Name Trigger independently, keep Content supplemental and non-interactive, show essential information visibly, and rely on Tooltip's owned input contract.
|
|
36
|
+
|
|
37
|
+
## Validation checklist
|
|
38
|
+
|
|
39
|
+
- Verify Trigger's independent name, role=tooltip Content, aria-describedby only while open, controlled and disabled state, provider and local delays, pointer hover, focus-visible opening, pointer transfer into Content, focus leave, top-layer Escape, and exit presence.
|
|
40
|
+
- Verify stationary touch long press, early release, movement tolerance, scrolling, outside touch, second touch, touchcancel, compatibility events, disabled changes, unmount cleanup, plain and rich release-time dismissal, portals, direction, collision placement, and optional Arrow geometry.
|
|
41
|
+
|
|
42
|
+
## Related guidance
|
|
43
|
+
|
|
44
|
+
- `hover-card`
|
|
45
|
+
- `popover`
|
|
46
|
+
|
|
47
|
+
## Machine record
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"schema": "flowstack.agent-component.v1",
|
|
52
|
+
"id": "tooltip",
|
|
53
|
+
"name": "Tooltip",
|
|
54
|
+
"package": "@flowstack-ui/atom",
|
|
55
|
+
"layer": "atom",
|
|
56
|
+
"kind": "component",
|
|
57
|
+
"purpose": "Provide a short supplemental text description on hover, focus-visible interaction, and stationary touch long press with an owned aria-describedby relationship.",
|
|
58
|
+
"useWhen": [
|
|
59
|
+
"A control, especially an unfamiliar icon, needs a brief non-interactive hint in addition to its complete accessible name."
|
|
60
|
+
],
|
|
61
|
+
"avoidWhen": [
|
|
62
|
+
{
|
|
63
|
+
"condition": "The information is important enough to remain visible, is a richer passive preview, or contains links, buttons, inputs, or other interaction.",
|
|
64
|
+
"useInstead": "visible text, HoverCard, or Popover"
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
"composition": [
|
|
68
|
+
"Compose Root with Trigger and Content; add Provider when descendant tooltips should share timing, Portal only when Content must leave its DOM location, and Arrow only when the styled hint needs a pointer. Plain and rich Content may differ in text structure, but both remain non-interactive tooltips."
|
|
69
|
+
],
|
|
70
|
+
"rules": [
|
|
71
|
+
{
|
|
72
|
+
"id": "tooltip-trigger-name",
|
|
73
|
+
"level": "must",
|
|
74
|
+
"statement": "Give Trigger a complete accessible name independently; Tooltip supplies only a supplemental aria-describedby description while open."
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"id": "tooltip-noninteractive",
|
|
78
|
+
"level": "must",
|
|
79
|
+
"statement": "Keep both plain and rich Content free of links, buttons, inputs, and other focusable controls; use Popover for interaction."
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"id": "tooltip-brief-content",
|
|
83
|
+
"level": "should",
|
|
84
|
+
"statement": "Keep plain Content to a short hint and use rich only for concise non-interactive title and supporting text; render important information visibly."
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"id": "tooltip-owned-input",
|
|
88
|
+
"level": "must",
|
|
89
|
+
"statement": "Preserve hover, focus-visible, Escape, shared delay, and stationary 700 ms touch long-press behavior, including movement, scroll, second-touch, cancellation, disabled, unmount, compatibility-event, and finite dismissal handling."
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"id": "tooltip-composition",
|
|
93
|
+
"level": "must",
|
|
94
|
+
"statement": "When Trigger uses asChild or render, preserve its native semantics, Atom handlers and refs, and the generated description relationship."
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"commonMistakes": [
|
|
98
|
+
{
|
|
99
|
+
"mistake": "Using Tooltip as the control's accessible name, placing interactive content in the rich variant, hiding essential instructions only on hover, or implementing a second touch long-press timer.",
|
|
100
|
+
"correction": "Name Trigger independently, keep Content supplemental and non-interactive, show essential information visibly, and rely on Tooltip's owned input contract."
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"validation": [
|
|
104
|
+
"Verify Trigger's independent name, role=tooltip Content, aria-describedby only while open, controlled and disabled state, provider and local delays, pointer hover, focus-visible opening, pointer transfer into Content, focus leave, top-layer Escape, and exit presence.",
|
|
105
|
+
"Verify stationary touch long press, early release, movement tolerance, scrolling, outside touch, second touch, touchcancel, compatibility events, disabled changes, unmount cleanup, plain and rich release-time dismissal, portals, direction, collision placement, and optional Arrow geometry."
|
|
106
|
+
],
|
|
107
|
+
"related": [
|
|
108
|
+
"hover-card",
|
|
109
|
+
"popover"
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
```
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# TreeGrid
|
|
2
|
+
|
|
3
|
+
Source: @flowstack-ui/atom@0.24.0
|
|
4
|
+
Kind: component
|
|
5
|
+
ID: tree-grid
|
|
6
|
+
|
|
7
|
+
# TreeGrid agent guide
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Combine hierarchical row expansion with ARIA grid cell navigation, active-descendant focus, indexed row and cell relationships, optional row selection, and actionable header boundaries.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- Hierarchical parent-child rows expand and each row also exposes several navigable columns, such as a structured file browser.
|
|
16
|
+
|
|
17
|
+
## Choose something else when
|
|
18
|
+
|
|
19
|
+
- The hierarchy has one primary item column, rows are flat, or people only read a noninteractive table. Use Tree, DataGrid, or Table.
|
|
20
|
+
- The application expects Atom to own sorting, filtering, editing, resizing, persistence, or virtualization. Use an application composition around TreeGrid and the relevant utility.
|
|
21
|
+
|
|
22
|
+
## Required composition
|
|
23
|
+
|
|
24
|
+
- Give Root an accessible name and accurate logical totals, then compose Caption when useful, Header and Body rowgroups, uniquely valued Rows with stable parentValue and level metadata, one RowHeader in the tree column, indexed ColumnHeader and Cell parts, and optional Footer summaries. Configure expansion, active-cell state, and selection deliberately.
|
|
25
|
+
|
|
26
|
+
## Rules
|
|
27
|
+
|
|
28
|
+
- **MUST:** Name Root and preserve treegrid, rowgroup, row, rowheader, columnheader, and gridcell relationships with stable row values, parent values, levels, and one-based logical coordinates.
|
|
29
|
+
- **MUST:** Keep DOM focus on Root and preserve active-descendant navigation across visible cells, RTL-aware expand and collapse behavior in the tree column, vertical row movement, Home and End, whole-grid movement, disabled skipping, and loop policy.
|
|
30
|
+
- **MUST:** Mark only real parent Rows expandable, keep descendants hidden from navigation while an ancestor is collapsed, and allow Atom to relocate an active descendant to the collapsed ancestor's tree-column cell.
|
|
31
|
+
- **MUST:** Align scalar, array, or null value with selectionMode, use stable unique Row values, and distinguish selectable=false from disabled for parent, header, and summary rows.
|
|
32
|
+
- **MUST:** Use ColumnHeader onAction for equivalent pointer and Enter activation, keep sortDirection truthful, and keep sorting, editing, filtering, and persistence application-owned.
|
|
33
|
+
- **MUST:** When windowing hierarchical rows, preserve logical totals, indexes, levels, and parent visibility and keep the active cell and collapse destination mounted; Virtualizer owns geometry only.
|
|
34
|
+
|
|
35
|
+
## Common mistakes
|
|
36
|
+
|
|
37
|
+
- **Avoid:** Using TreeGrid for a one-column tree or a read-only hierarchical table without composite cell navigation. **Instead:** Use Tree for one-dimensional hierarchy and prefer simpler native structure when interactive grid behavior is absent.
|
|
38
|
+
- **Avoid:** Deriving parentValue, level, rowIndex, or identity from the current visible slice during virtualization. **Instead:** Supply stable logical hierarchy and full-collection coordinates independent of the rendered window.
|
|
39
|
+
|
|
40
|
+
## Validation checklist
|
|
41
|
+
|
|
42
|
+
- Verify Root naming and complete treegrid relationships, stable unique Row values, parentValue and level metadata, RowHeader ownership, logical row and column indexes, and full totals.
|
|
43
|
+
- Exercise LTR and RTL tree-column expansion, collapse and parent movement, next-cell arrows, vertical visible-row movement, Home and End, whole-grid movement, loop boundaries, disabled cells, and active relocation after collapse.
|
|
44
|
+
- Verify controlled and uncontrolled expansion and active-cell state, none/single/multiple row selection, nonselectable rows, disabled and read-only behavior, actionable header pointer and Enter parity, and truthful sort metadata.
|
|
45
|
+
- For virtualized hierarchies, verify hidden descendants do not enter navigation and the active descendant always resolves to a mounted visible cell.
|
|
46
|
+
|
|
47
|
+
## Related guidance
|
|
48
|
+
|
|
49
|
+
- `tree`
|
|
50
|
+
- `data-grid`
|
|
51
|
+
- `table`
|
|
52
|
+
- `collection`
|
|
53
|
+
- `virtualizer`
|
|
54
|
+
|
|
55
|
+
## Machine record
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"schema": "flowstack.agent-component.v1",
|
|
60
|
+
"id": "tree-grid",
|
|
61
|
+
"name": "TreeGrid",
|
|
62
|
+
"package": "@flowstack-ui/atom",
|
|
63
|
+
"layer": "atom",
|
|
64
|
+
"kind": "component",
|
|
65
|
+
"purpose": "Combine hierarchical row expansion with ARIA grid cell navigation, active-descendant focus, indexed row and cell relationships, optional row selection, and actionable header boundaries.",
|
|
66
|
+
"useWhen": [
|
|
67
|
+
"Hierarchical parent-child rows expand and each row also exposes several navigable columns, such as a structured file browser."
|
|
68
|
+
],
|
|
69
|
+
"avoidWhen": [
|
|
70
|
+
{
|
|
71
|
+
"condition": "The hierarchy has one primary item column, rows are flat, or people only read a noninteractive table.",
|
|
72
|
+
"useInstead": "Tree, DataGrid, or Table"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"condition": "The application expects Atom to own sorting, filtering, editing, resizing, persistence, or virtualization.",
|
|
76
|
+
"useInstead": "an application composition around TreeGrid and the relevant utility"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"composition": [
|
|
80
|
+
"Give Root an accessible name and accurate logical totals, then compose Caption when useful, Header and Body rowgroups, uniquely valued Rows with stable parentValue and level metadata, one RowHeader in the tree column, indexed ColumnHeader and Cell parts, and optional Footer summaries. Configure expansion, active-cell state, and selection deliberately."
|
|
81
|
+
],
|
|
82
|
+
"rules": [
|
|
83
|
+
{
|
|
84
|
+
"id": "tree-grid-name-relationships",
|
|
85
|
+
"level": "must",
|
|
86
|
+
"statement": "Name Root and preserve treegrid, rowgroup, row, rowheader, columnheader, and gridcell relationships with stable row values, parent values, levels, and one-based logical coordinates."
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"id": "tree-grid-focus",
|
|
90
|
+
"level": "must",
|
|
91
|
+
"statement": "Keep DOM focus on Root and preserve active-descendant navigation across visible cells, RTL-aware expand and collapse behavior in the tree column, vertical row movement, Home and End, whole-grid movement, disabled skipping, and loop policy."
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"id": "tree-grid-expansion",
|
|
95
|
+
"level": "must",
|
|
96
|
+
"statement": "Mark only real parent Rows expandable, keep descendants hidden from navigation while an ancestor is collapsed, and allow Atom to relocate an active descendant to the collapsed ancestor's tree-column cell."
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"id": "tree-grid-selection",
|
|
100
|
+
"level": "must",
|
|
101
|
+
"statement": "Align scalar, array, or null value with selectionMode, use stable unique Row values, and distinguish selectable=false from disabled for parent, header, and summary rows."
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"id": "tree-grid-actions",
|
|
105
|
+
"level": "must",
|
|
106
|
+
"statement": "Use ColumnHeader onAction for equivalent pointer and Enter activation, keep sortDirection truthful, and keep sorting, editing, filtering, and persistence application-owned."
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"id": "tree-grid-virtualization",
|
|
110
|
+
"level": "must",
|
|
111
|
+
"statement": "When windowing hierarchical rows, preserve logical totals, indexes, levels, and parent visibility and keep the active cell and collapse destination mounted; Virtualizer owns geometry only."
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"commonMistakes": [
|
|
115
|
+
{
|
|
116
|
+
"mistake": "Using TreeGrid for a one-column tree or a read-only hierarchical table without composite cell navigation.",
|
|
117
|
+
"correction": "Use Tree for one-dimensional hierarchy and prefer simpler native structure when interactive grid behavior is absent."
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"mistake": "Deriving parentValue, level, rowIndex, or identity from the current visible slice during virtualization.",
|
|
121
|
+
"correction": "Supply stable logical hierarchy and full-collection coordinates independent of the rendered window."
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
"validation": [
|
|
125
|
+
"Verify Root naming and complete treegrid relationships, stable unique Row values, parentValue and level metadata, RowHeader ownership, logical row and column indexes, and full totals.",
|
|
126
|
+
"Exercise LTR and RTL tree-column expansion, collapse and parent movement, next-cell arrows, vertical visible-row movement, Home and End, whole-grid movement, loop boundaries, disabled cells, and active relocation after collapse.",
|
|
127
|
+
"Verify controlled and uncontrolled expansion and active-cell state, none/single/multiple row selection, nonselectable rows, disabled and read-only behavior, actionable header pointer and Enter parity, and truthful sort metadata.",
|
|
128
|
+
"For virtualized hierarchies, verify hidden descendants do not enter navigation and the active descendant always resolves to a mounted visible cell."
|
|
129
|
+
],
|
|
130
|
+
"related": [
|
|
131
|
+
"tree",
|
|
132
|
+
"data-grid",
|
|
133
|
+
"table",
|
|
134
|
+
"collection",
|
|
135
|
+
"virtualizer"
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
```
|