@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,152 @@
|
|
|
1
|
+
# RadioGroup
|
|
2
|
+
|
|
3
|
+
Source: @flowstack-ui/brick@0.1.11
|
|
4
|
+
Kind: component
|
|
5
|
+
ID: radio-group
|
|
6
|
+
|
|
7
|
+
# RadioGroup agent guide
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Present a finished short visible form choice set with exactly one selected value while Atom owns radiogroup semantics, roving focus, keyboard selection, validation, and submission.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- A user must choose exactly one option from a short visible list whose choices are best compared together.
|
|
16
|
+
|
|
17
|
+
## Choose something else when
|
|
18
|
+
|
|
19
|
+
- Several choices may be selected, a long list should stay compact, or the controls are pressed commands rather than form answers. Use CheckboxGroup, Select, or ToggleGroup.
|
|
20
|
+
|
|
21
|
+
## Required composition
|
|
22
|
+
|
|
23
|
+
- Give RadioGroup.Root an accessible group name and compose one uniquely valued RadioGroup.Item per visible option. Use Fieldset with Legend, Description, and Error when the set needs visible group labeling or validation context; use name and form when the selected value must submit.
|
|
24
|
+
- Root owns sm, md, or lg size and vertical or horizontal layout. Each Item owns its complete visible option label while Brick supplies the private circular control and checked dot.
|
|
25
|
+
|
|
26
|
+
## Rules
|
|
27
|
+
|
|
28
|
+
- **MUST:** Use RadioGroup for exactly one short visible form choice; use CheckboxGroup for independent choices, Select for a compact longer list, and ToggleGroup for pressed commands.
|
|
29
|
+
- **MUST:** Give Root an accessible group name through native ARIA or Fieldset Legend and give every Item a complete visible or native accessible option name.
|
|
30
|
+
- **MUST:** Give every Item a stable unique value and use value with onValueChange for controlled state or defaultValue for uncontrolled state.
|
|
31
|
+
- **MUST:** Preserve the selected or first enabled Item as the one Tab stop, disabled-item skipping, looping policy, and orientation- and direction-aware Arrow, Home, End, and Space behavior.
|
|
32
|
+
- **MUST:** Use readOnly when the selected value must remain focusable and submitted while preventing pointer, Space, and navigation-driven changes; do not substitute disabled.
|
|
33
|
+
- **MUST:** Preserve group-level required validity, first-enabled validation focus, Fieldset state and descriptions, named hidden-radio submission, and uncontrolled form reset.
|
|
34
|
+
- **SHOULD:** Use vertical for scan-heavy groups and horizontal only when wrapped DOM reading order remains clear under narrow widths, zoom, localization, and RTL.
|
|
35
|
+
- **MUST:** Load styles.css or core.css plus radio-group.css and Fieldset CSS when composed.
|
|
36
|
+
|
|
37
|
+
## Common mistakes
|
|
38
|
+
|
|
39
|
+
- **Avoid:** Omitting the group name, giving every Item a Tab stop, using RadioGroup for independent choices, or disabling a value that should remain read-only. **Instead:** Use the named Atom-owned roving group, choose CheckboxGroup for independent choices, and preserve focus and submission with readOnly.
|
|
40
|
+
- **Avoid:** Treating the private circle or surrounding layout as the option label or applying validation to every row independently. **Instead:** Label every Item with its visible content and keep shared required or invalid messaging at Root or Fieldset scope.
|
|
41
|
+
|
|
42
|
+
## Validation checklist
|
|
43
|
+
|
|
44
|
+
- Verify Root and Item names, unique values, controlled and uncontrolled selection, one roving Tab stop, disabled skipping, vertical and horizontal Arrow keys, Home/End, Space, looping, explicit and inherited LTR and RTL, pointer activation, and composition semantics.
|
|
45
|
+
- Verify read-only focus without value changes, group-level required validation with and without name, first-enabled validation focus, Fieldset descriptions and errors, hidden submission value, form association, and uncontrolled reset.
|
|
46
|
+
- Verify three sizes, vertical and wrapping horizontal layout, long labels, narrow widths, 200% text and 400% zoom, touch targets, light and dark appearance, forced colors, RTL, and complete CSS.
|
|
47
|
+
|
|
48
|
+
## Related guidance
|
|
49
|
+
|
|
50
|
+
- `@flowstack-ui/atom/agents/radio-group`
|
|
51
|
+
- `checkbox-group`
|
|
52
|
+
- `select`
|
|
53
|
+
- `toggle-group`
|
|
54
|
+
- `fieldset`
|
|
55
|
+
- `form`
|
|
56
|
+
|
|
57
|
+
## Machine record
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"schema": "flowstack.agent-component.v1",
|
|
62
|
+
"id": "radio-group",
|
|
63
|
+
"name": "RadioGroup",
|
|
64
|
+
"package": "@flowstack-ui/brick",
|
|
65
|
+
"layer": "brick",
|
|
66
|
+
"kind": "component",
|
|
67
|
+
"purpose": "Present a finished short visible form choice set with exactly one selected value while Atom owns radiogroup semantics, roving focus, keyboard selection, validation, and submission.",
|
|
68
|
+
"useWhen": [
|
|
69
|
+
"A user must choose exactly one option from a short visible list whose choices are best compared together."
|
|
70
|
+
],
|
|
71
|
+
"avoidWhen": [
|
|
72
|
+
{
|
|
73
|
+
"condition": "Several choices may be selected, a long list should stay compact, or the controls are pressed commands rather than form answers.",
|
|
74
|
+
"useInstead": "CheckboxGroup, Select, or ToggleGroup"
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"composition": [
|
|
78
|
+
"Give RadioGroup.Root an accessible group name and compose one uniquely valued RadioGroup.Item per visible option. Use Fieldset with Legend, Description, and Error when the set needs visible group labeling or validation context; use name and form when the selected value must submit.",
|
|
79
|
+
"Root owns sm, md, or lg size and vertical or horizontal layout. Each Item owns its complete visible option label while Brick supplies the private circular control and checked dot."
|
|
80
|
+
],
|
|
81
|
+
"rules": [
|
|
82
|
+
{
|
|
83
|
+
"id": "radio-group-selection",
|
|
84
|
+
"level": "must",
|
|
85
|
+
"statement": "Use RadioGroup for exactly one short visible form choice; use CheckboxGroup for independent choices, Select for a compact longer list, and ToggleGroup for pressed commands."
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"id": "radio-group-names",
|
|
89
|
+
"level": "must",
|
|
90
|
+
"statement": "Give Root an accessible group name through native ARIA or Fieldset Legend and give every Item a complete visible or native accessible option name."
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"id": "radio-group-values",
|
|
94
|
+
"level": "must",
|
|
95
|
+
"statement": "Give every Item a stable unique value and use value with onValueChange for controlled state or defaultValue for uncontrolled state."
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"id": "radio-group-roving",
|
|
99
|
+
"level": "must",
|
|
100
|
+
"statement": "Preserve the selected or first enabled Item as the one Tab stop, disabled-item skipping, looping policy, and orientation- and direction-aware Arrow, Home, End, and Space behavior."
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"id": "radio-group-readonly",
|
|
104
|
+
"level": "must",
|
|
105
|
+
"statement": "Use readOnly when the selected value must remain focusable and submitted while preventing pointer, Space, and navigation-driven changes; do not substitute disabled."
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"id": "radio-group-form",
|
|
109
|
+
"level": "must",
|
|
110
|
+
"statement": "Preserve group-level required validity, first-enabled validation focus, Fieldset state and descriptions, named hidden-radio submission, and uncontrolled form reset."
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"id": "radio-group-responsive",
|
|
114
|
+
"level": "should",
|
|
115
|
+
"statement": "Use vertical for scan-heavy groups and horizontal only when wrapped DOM reading order remains clear under narrow widths, zoom, localization, and RTL."
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"id": "radio-group-css",
|
|
119
|
+
"level": "must",
|
|
120
|
+
"statement": "Load styles.css or core.css plus radio-group.css and Fieldset CSS when composed."
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"commonMistakes": [
|
|
124
|
+
{
|
|
125
|
+
"mistake": "Omitting the group name, giving every Item a Tab stop, using RadioGroup for independent choices, or disabling a value that should remain read-only.",
|
|
126
|
+
"correction": "Use the named Atom-owned roving group, choose CheckboxGroup for independent choices, and preserve focus and submission with readOnly."
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"mistake": "Treating the private circle or surrounding layout as the option label or applying validation to every row independently.",
|
|
130
|
+
"correction": "Label every Item with its visible content and keep shared required or invalid messaging at Root or Fieldset scope."
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
"validation": [
|
|
134
|
+
"Verify Root and Item names, unique values, controlled and uncontrolled selection, one roving Tab stop, disabled skipping, vertical and horizontal Arrow keys, Home/End, Space, looping, explicit and inherited LTR and RTL, pointer activation, and composition semantics.",
|
|
135
|
+
"Verify read-only focus without value changes, group-level required validation with and without name, first-enabled validation focus, Fieldset descriptions and errors, hidden submission value, form association, and uncontrolled reset.",
|
|
136
|
+
"Verify three sizes, vertical and wrapping horizontal layout, long labels, narrow widths, 200% text and 400% zoom, touch targets, light and dark appearance, forced colors, RTL, and complete CSS."
|
|
137
|
+
],
|
|
138
|
+
"related": [
|
|
139
|
+
{
|
|
140
|
+
"kind": "package",
|
|
141
|
+
"package": "@flowstack-ui/atom",
|
|
142
|
+
"id": "radio-group",
|
|
143
|
+
"versionPolicy": "installed-exact"
|
|
144
|
+
},
|
|
145
|
+
"checkbox-group",
|
|
146
|
+
"select",
|
|
147
|
+
"toggle-group",
|
|
148
|
+
"fieldset",
|
|
149
|
+
"form"
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
```
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Rating
|
|
2
|
+
|
|
3
|
+
Source: @flowstack-ui/brick@0.1.11
|
|
4
|
+
Kind: component
|
|
5
|
+
ID: rating
|
|
6
|
+
|
|
7
|
+
# Rating agent guide
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Collect a short ordered score, present a repeated-star aggregate, or present a compact one-star numeric summary.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- A person chooses a score on a short ordered scale, or an aggregate score needs recognizable repeated-star presentation.
|
|
16
|
+
|
|
17
|
+
## Choose something else when
|
|
18
|
+
|
|
19
|
+
- The value is a general numeric setting, a named choice, progress, or status. Use Slider, Radio Group, Progress, or Badge.
|
|
20
|
+
|
|
21
|
+
## Required composition
|
|
22
|
+
|
|
23
|
+
- For input, compose Root with one Item for every endpoint and use it as the sole control in Field or name the standalone Root.
|
|
24
|
+
- For aggregate product or review data, use Display with repeated stars or Summary with one star and a visible value; give either a localized label and do not use readOnly Root as a passive summary.
|
|
25
|
+
|
|
26
|
+
## Rules
|
|
27
|
+
|
|
28
|
+
- **MUST:** Use Root and Item only when the person can choose a score; use Display for aggregate or read-only presentation so passive content does not create a focusable slider.
|
|
29
|
+
- **MUST:** Give Display and Summary a localized label that states the score and maximum, such as label="4.5 out of 5 stars"; use Summary valueText for localized visible formatting and keep adjacent review counts as ordinary text.
|
|
30
|
+
- **MUST:** Provide one visible Field label for an input Rating or a complete accessible name for a standalone Root.
|
|
31
|
+
- **MUST:** Use a valid ordered min and max, positive step, and Item endpoint values; keep repeated selection stable by default and enable allowClear only when clearing to the minimum is intentional.
|
|
32
|
+
- **MUST:** Preserve one focusable slider Root with decorative Items, one-pointer capture, cross-item dragging, vertical page scrolling, cancellation rollback, lost-capture finalization, keyboard steps, and horizontal LTR and RTL behavior.
|
|
33
|
+
- **MUST:** Preserve disabled, read-only, invalid, required-above-minimum validity, Field relationships, named hidden submission, validation focus, and uncontrolled form reset for input Rating.
|
|
34
|
+
- **MUST:** Load styles.css or core.css plus rating.css.
|
|
35
|
+
|
|
36
|
+
## Common mistakes
|
|
37
|
+
|
|
38
|
+
- **Avoid:** Using readOnly Root to show a product's average rating, creating a focusable slider that cannot be changed. **Instead:** Use Rating.Display for aggregate scores and reserve readOnly Root for rare form review states where slider semantics remain meaningful.
|
|
39
|
+
- **Avoid:** Making every star focusable, repeating the score through five accessible icons, or relying on star color alone. **Instead:** Keep one logical Root for input or one labelled Display image for aggregate output; repeated artwork stays decorative.
|
|
40
|
+
- **Avoid:** Using max=1 or an ordinary star Icon to fake a compact aggregate rating. **Instead:** Use Rating.Summary so one decorative star and the visible numeric value share one localized aggregate label.
|
|
41
|
+
|
|
42
|
+
## Validation checklist
|
|
43
|
+
|
|
44
|
+
- For input, check pointer, touch, keyboard, fractional values, form ownership, reset, disabled, read-only, invalid, and Field relationships.
|
|
45
|
+
- For Display and Summary, check the localized accessible name, absence from tab order, aggregate geometry, RTL, forced colors, zoom, and long adjacent review text.
|
|
46
|
+
- Confirm CSS is loaded.
|
|
47
|
+
|
|
48
|
+
## Related guidance
|
|
49
|
+
|
|
50
|
+
- `@flowstack-ui/atom/agents/rating`
|
|
51
|
+
- `field`
|
|
52
|
+
- `slider`
|
|
53
|
+
- `radio-group`
|
|
54
|
+
- `progress`
|
|
55
|
+
- `badge`
|
|
56
|
+
|
|
57
|
+
## Machine record
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"schema": "flowstack.agent-component.v1",
|
|
62
|
+
"id": "rating",
|
|
63
|
+
"name": "Rating",
|
|
64
|
+
"package": "@flowstack-ui/brick",
|
|
65
|
+
"layer": "brick",
|
|
66
|
+
"kind": "component",
|
|
67
|
+
"purpose": "Collect a short ordered score, present a repeated-star aggregate, or present a compact one-star numeric summary.",
|
|
68
|
+
"useWhen": [
|
|
69
|
+
"A person chooses a score on a short ordered scale, or an aggregate score needs recognizable repeated-star presentation."
|
|
70
|
+
],
|
|
71
|
+
"avoidWhen": [
|
|
72
|
+
{
|
|
73
|
+
"condition": "The value is a general numeric setting, a named choice, progress, or status.",
|
|
74
|
+
"useInstead": "Slider, Radio Group, Progress, or Badge"
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"composition": [
|
|
78
|
+
"For input, compose Root with one Item for every endpoint and use it as the sole control in Field or name the standalone Root.",
|
|
79
|
+
"For aggregate product or review data, use Display with repeated stars or Summary with one star and a visible value; give either a localized label and do not use readOnly Root as a passive summary."
|
|
80
|
+
],
|
|
81
|
+
"rules": [
|
|
82
|
+
{
|
|
83
|
+
"id": "rating-input-vs-display",
|
|
84
|
+
"level": "must",
|
|
85
|
+
"statement": "Use Root and Item only when the person can choose a score; use Display for aggregate or read-only presentation so passive content does not create a focusable slider."
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"id": "rating-display-label",
|
|
89
|
+
"level": "must",
|
|
90
|
+
"statement": "Give Display and Summary a localized label that states the score and maximum, such as label=\"4.5 out of 5 stars\"; use Summary valueText for localized visible formatting and keep adjacent review counts as ordinary text."
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"id": "rating-input-name",
|
|
94
|
+
"level": "must",
|
|
95
|
+
"statement": "Provide one visible Field label for an input Rating or a complete accessible name for a standalone Root."
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"id": "rating-scale-clear",
|
|
99
|
+
"level": "must",
|
|
100
|
+
"statement": "Use a valid ordered min and max, positive step, and Item endpoint values; keep repeated selection stable by default and enable allowClear only when clearing to the minimum is intentional."
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"id": "rating-input-behavior",
|
|
104
|
+
"level": "must",
|
|
105
|
+
"statement": "Preserve one focusable slider Root with decorative Items, one-pointer capture, cross-item dragging, vertical page scrolling, cancellation rollback, lost-capture finalization, keyboard steps, and horizontal LTR and RTL behavior."
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"id": "rating-form-state",
|
|
109
|
+
"level": "must",
|
|
110
|
+
"statement": "Preserve disabled, read-only, invalid, required-above-minimum validity, Field relationships, named hidden submission, validation focus, and uncontrolled form reset for input Rating."
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"id": "rating-css",
|
|
114
|
+
"level": "must",
|
|
115
|
+
"statement": "Load styles.css or core.css plus rating.css."
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
"commonMistakes": [
|
|
119
|
+
{
|
|
120
|
+
"mistake": "Using readOnly Root to show a product's average rating, creating a focusable slider that cannot be changed.",
|
|
121
|
+
"correction": "Use Rating.Display for aggregate scores and reserve readOnly Root for rare form review states where slider semantics remain meaningful."
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"mistake": "Making every star focusable, repeating the score through five accessible icons, or relying on star color alone.",
|
|
125
|
+
"correction": "Keep one logical Root for input or one labelled Display image for aggregate output; repeated artwork stays decorative."
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"mistake": "Using max=1 or an ordinary star Icon to fake a compact aggregate rating.",
|
|
129
|
+
"correction": "Use Rating.Summary so one decorative star and the visible numeric value share one localized aggregate label."
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"validation": [
|
|
133
|
+
"For input, check pointer, touch, keyboard, fractional values, form ownership, reset, disabled, read-only, invalid, and Field relationships.",
|
|
134
|
+
"For Display and Summary, check the localized accessible name, absence from tab order, aggregate geometry, RTL, forced colors, zoom, and long adjacent review text.",
|
|
135
|
+
"Confirm CSS is loaded."
|
|
136
|
+
],
|
|
137
|
+
"related": [
|
|
138
|
+
{
|
|
139
|
+
"kind": "package",
|
|
140
|
+
"package": "@flowstack-ui/atom",
|
|
141
|
+
"id": "rating",
|
|
142
|
+
"versionPolicy": "installed-exact"
|
|
143
|
+
},
|
|
144
|
+
"field",
|
|
145
|
+
"slider",
|
|
146
|
+
"radio-group",
|
|
147
|
+
"progress",
|
|
148
|
+
"badge"
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
```
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Reorderable List
|
|
2
|
+
|
|
3
|
+
Source: @flowstack-ui/brick@0.1.11
|
|
4
|
+
Kind: component
|
|
5
|
+
ID: reorderable-list
|
|
6
|
+
|
|
7
|
+
# Reorderable List agent guide
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Provide a finished list for deliberate manual ordering while Atom owns drag, touch, keyboard, focus, announcements, cancellation, and reorder state behavior.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- A person needs to arrange a small linear collection into a meaningful saved order.
|
|
16
|
+
|
|
17
|
+
## Choose something else when
|
|
18
|
+
|
|
19
|
+
- The application is sorting data automatically or changing a table sort key. Use DataGrid or an application-owned sort control.
|
|
20
|
+
- Items move between columns, tree parents, freeform coordinates, or external applications. Use A dedicated Kanban, tree, spatial, or file-transfer composition over Atom DragDrop.
|
|
21
|
+
- The content is static and has no manual ordering job. Use List.
|
|
22
|
+
|
|
23
|
+
## Required composition
|
|
24
|
+
|
|
25
|
+
- Compose Root > Item > Handle + Content + optional Actions containing direct Move controls + DropIndicator.
|
|
26
|
+
- Keep application data keyed by each Item value and update that data from Root onItemsChange; persistence, Undo, conflicts, and validation remain application-owned.
|
|
27
|
+
- Let Brick move direct Actions below Content when a vertical list's own container is narrow; do not add viewport logic or duplicate the item tree for this relationship.
|
|
28
|
+
|
|
29
|
+
## Rules
|
|
30
|
+
|
|
31
|
+
- **MUST:** Use stable unique values for Root items and matching Item values; never use visual indexes as identity.
|
|
32
|
+
- **MUST:** Provide getItemLabel plus localized aria-label values for every Handle and direct Move control.
|
|
33
|
+
- **MUST:** Provide direct movement controls when drag precision, switch access, voice access, or discoverability requires a visible non-drag path.
|
|
34
|
+
- **MUST:** Keep persistence, Undo, optimistic updates, server conflicts, validation, and automatic sorting outside ReorderableList.
|
|
35
|
+
- **MUST:** Load styles.css or core.css plus reorderable-list.css.
|
|
36
|
+
|
|
37
|
+
## Common mistakes
|
|
38
|
+
|
|
39
|
+
- **Avoid:** Using ReorderableList as a sortable table, persisting inside the component, omitting accessible movement names, or making drag the only usable path. **Instead:** Choose the component by user job, keep workflow state in the application, label every control, and expose direct movement where needed.
|
|
40
|
+
|
|
41
|
+
## Validation checklist
|
|
42
|
+
|
|
43
|
+
- Check direct movement, keyboard lift/move/drop/cancel, mouse and touch movement, focus preservation, disabled and read-only states, and announcement copy.
|
|
44
|
+
- Check that narrow vertical lists preserve a useful content measure by moving direct Actions below Content, then check horizontal overflow, RTL, zoom, reduced motion, forced colors, light and dark appearance, focus-ring containment, and insertion feedback.
|
|
45
|
+
|
|
46
|
+
## Related guidance
|
|
47
|
+
|
|
48
|
+
- `list`
|
|
49
|
+
- `data-grid`
|
|
50
|
+
- `tree`
|
|
51
|
+
- `swipeable-item`
|
|
52
|
+
|
|
53
|
+
## Machine record
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"schema": "flowstack.agent-component.v1",
|
|
58
|
+
"id": "reorderable-list",
|
|
59
|
+
"name": "Reorderable List",
|
|
60
|
+
"package": "@flowstack-ui/brick",
|
|
61
|
+
"layer": "brick",
|
|
62
|
+
"kind": "component",
|
|
63
|
+
"purpose": "Provide a finished list for deliberate manual ordering while Atom owns drag, touch, keyboard, focus, announcements, cancellation, and reorder state behavior.",
|
|
64
|
+
"useWhen": [
|
|
65
|
+
"A person needs to arrange a small linear collection into a meaningful saved order."
|
|
66
|
+
],
|
|
67
|
+
"avoidWhen": [
|
|
68
|
+
{
|
|
69
|
+
"condition": "The application is sorting data automatically or changing a table sort key.",
|
|
70
|
+
"useInstead": "DataGrid or an application-owned sort control"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"condition": "Items move between columns, tree parents, freeform coordinates, or external applications.",
|
|
74
|
+
"useInstead": "A dedicated Kanban, tree, spatial, or file-transfer composition over Atom DragDrop"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"condition": "The content is static and has no manual ordering job.",
|
|
78
|
+
"useInstead": "List"
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"composition": [
|
|
82
|
+
"Compose Root > Item > Handle + Content + optional Actions containing direct Move controls + DropIndicator.",
|
|
83
|
+
"Keep application data keyed by each Item value and update that data from Root onItemsChange; persistence, Undo, conflicts, and validation remain application-owned.",
|
|
84
|
+
"Let Brick move direct Actions below Content when a vertical list's own container is narrow; do not add viewport logic or duplicate the item tree for this relationship."
|
|
85
|
+
],
|
|
86
|
+
"rules": [
|
|
87
|
+
{
|
|
88
|
+
"id": "reorderable-list-stable-identity",
|
|
89
|
+
"level": "must",
|
|
90
|
+
"statement": "Use stable unique values for Root items and matching Item values; never use visual indexes as identity."
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"id": "reorderable-list-labels",
|
|
94
|
+
"level": "must",
|
|
95
|
+
"statement": "Provide getItemLabel plus localized aria-label values for every Handle and direct Move control."
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"id": "reorderable-list-alternative",
|
|
99
|
+
"level": "must",
|
|
100
|
+
"statement": "Provide direct movement controls when drag precision, switch access, voice access, or discoverability requires a visible non-drag path."
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"id": "reorderable-list-ownership",
|
|
104
|
+
"level": "must",
|
|
105
|
+
"statement": "Keep persistence, Undo, optimistic updates, server conflicts, validation, and automatic sorting outside ReorderableList."
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"id": "reorderable-list-css",
|
|
109
|
+
"level": "must",
|
|
110
|
+
"statement": "Load styles.css or core.css plus reorderable-list.css."
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"commonMistakes": [
|
|
114
|
+
{
|
|
115
|
+
"mistake": "Using ReorderableList as a sortable table, persisting inside the component, omitting accessible movement names, or making drag the only usable path.",
|
|
116
|
+
"correction": "Choose the component by user job, keep workflow state in the application, label every control, and expose direct movement where needed."
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"validation": [
|
|
120
|
+
"Check direct movement, keyboard lift/move/drop/cancel, mouse and touch movement, focus preservation, disabled and read-only states, and announcement copy.",
|
|
121
|
+
"Check that narrow vertical lists preserve a useful content measure by moving direct Actions below Content, then check horizontal overflow, RTL, zoom, reduced motion, forced colors, light and dark appearance, focus-ring containment, and insertion feedback."
|
|
122
|
+
],
|
|
123
|
+
"related": [
|
|
124
|
+
"list",
|
|
125
|
+
"data-grid",
|
|
126
|
+
"tree",
|
|
127
|
+
"swipeable-item"
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
```
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# ScrollArea
|
|
2
|
+
|
|
3
|
+
Source: @flowstack-ui/brick@0.1.11
|
|
4
|
+
Kind: component
|
|
5
|
+
ID: scroll-area
|
|
6
|
+
|
|
7
|
+
# ScrollArea agent guide
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Style a bounded scroll viewport and native scrollbar presentation while preserving Atom and native input behavior.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- A rail, code region, table wrapper, or bounded panel needs Brick scrollbar presentation and owned overflow behavior.
|
|
16
|
+
|
|
17
|
+
## Choose something else when
|
|
18
|
+
|
|
19
|
+
- Ordinary page or content overflow works with native browser scrolling. Use native overflow.
|
|
20
|
+
|
|
21
|
+
## Required composition
|
|
22
|
+
|
|
23
|
+
- Compose Viewport inside Root and give Root a real size constraint from its parent layout; Brick's current native scrollbar presentation needs no authored Scrollbar or Thumb parts.
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- **MUST:** Provide a bounded size; ScrollArea cannot create meaningful scrolling without a constrained viewport.
|
|
28
|
+
- **MUST:** Identify the parent that owns the maximum or fixed block size before styling Viewport; do not apply a random height directly to the scrolling part.
|
|
29
|
+
- **MUST:** Preserve wheel, trackpad, touch, keyboard, focus, and nested page scrolling.
|
|
30
|
+
- **MUST:** Load styles.css or core.css plus scroll-area.css.
|
|
31
|
+
|
|
32
|
+
## Common mistakes
|
|
33
|
+
|
|
34
|
+
- **Avoid:** Using ScrollArea for every overflow or hiding clipped table content without horizontal scrolling. **Instead:** Use native overflow by default and add ScrollArea with explicit horizontal behavior where it improves the contract.
|
|
35
|
+
|
|
36
|
+
## Validation checklist
|
|
37
|
+
|
|
38
|
+
- Test both axes, mouse, trackpad, touch, keyboard, focus ring, nested scrolling, mobile tables, zoom, and RTL.
|
|
39
|
+
- Confirm the parent constraint, viewport geometry, and CSS are loaded.
|
|
40
|
+
|
|
41
|
+
## Related guidance
|
|
42
|
+
|
|
43
|
+
- `table`
|
|
44
|
+
- `data-grid`
|
|
45
|
+
- `code-block`
|
|
46
|
+
- `sidebar`
|
|
47
|
+
|
|
48
|
+
## Machine record
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"schema": "flowstack.agent-component.v1",
|
|
53
|
+
"id": "scroll-area",
|
|
54
|
+
"name": "ScrollArea",
|
|
55
|
+
"package": "@flowstack-ui/brick",
|
|
56
|
+
"layer": "brick",
|
|
57
|
+
"kind": "component",
|
|
58
|
+
"purpose": "Style a bounded scroll viewport and native scrollbar presentation while preserving Atom and native input behavior.",
|
|
59
|
+
"useWhen": [
|
|
60
|
+
"A rail, code region, table wrapper, or bounded panel needs Brick scrollbar presentation and owned overflow behavior."
|
|
61
|
+
],
|
|
62
|
+
"avoidWhen": [
|
|
63
|
+
{
|
|
64
|
+
"condition": "Ordinary page or content overflow works with native browser scrolling.",
|
|
65
|
+
"useInstead": "native overflow"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"composition": [
|
|
69
|
+
"Compose Viewport inside Root and give Root a real size constraint from its parent layout; Brick's current native scrollbar presentation needs no authored Scrollbar or Thumb parts."
|
|
70
|
+
],
|
|
71
|
+
"rules": [
|
|
72
|
+
{
|
|
73
|
+
"id": "scroll-area-bounded",
|
|
74
|
+
"level": "must",
|
|
75
|
+
"statement": "Provide a bounded size; ScrollArea cannot create meaningful scrolling without a constrained viewport."
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id": "scroll-area-parent-owner",
|
|
79
|
+
"level": "must",
|
|
80
|
+
"statement": "Identify the parent that owns the maximum or fixed block size before styling Viewport; do not apply a random height directly to the scrolling part."
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"id": "scroll-area-native",
|
|
84
|
+
"level": "must",
|
|
85
|
+
"statement": "Preserve wheel, trackpad, touch, keyboard, focus, and nested page scrolling."
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"id": "scroll-area-css",
|
|
89
|
+
"level": "must",
|
|
90
|
+
"statement": "Load styles.css or core.css plus scroll-area.css."
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"commonMistakes": [
|
|
94
|
+
{
|
|
95
|
+
"mistake": "Using ScrollArea for every overflow or hiding clipped table content without horizontal scrolling.",
|
|
96
|
+
"correction": "Use native overflow by default and add ScrollArea with explicit horizontal behavior where it improves the contract."
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
"validation": [
|
|
100
|
+
"Test both axes, mouse, trackpad, touch, keyboard, focus ring, nested scrolling, mobile tables, zoom, and RTL.",
|
|
101
|
+
"Confirm the parent constraint, viewport geometry, and CSS are loaded."
|
|
102
|
+
],
|
|
103
|
+
"related": [
|
|
104
|
+
"table",
|
|
105
|
+
"data-grid",
|
|
106
|
+
"code-block",
|
|
107
|
+
"sidebar"
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
```
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Section
|
|
2
|
+
|
|
3
|
+
Source: @flowstack-ui/brick@0.1.11
|
|
4
|
+
Kind: component
|
|
5
|
+
ID: section
|
|
6
|
+
|
|
7
|
+
# Section agent guide
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Own themeable responsive block rhythm for major semantic page and application regions.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- A thematic page or application region needs consistent large vertical rhythm beyond local component spacing.
|
|
16
|
+
|
|
17
|
+
## Choose something else when
|
|
18
|
+
|
|
19
|
+
- The need is child arrangement, inline measure, visual paint, or a complete content pattern. Use Stack/Grid, Container, Surface, or a qualified Block.
|
|
20
|
+
|
|
21
|
+
## Required composition
|
|
22
|
+
|
|
23
|
+
- Place Container inside Section for measured content; compose Surface with asChild around Section when paint must cover the Section rhythm; use Stack or Grid inside for child relationships.
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- **MUST:** Use Section's named responsive rhythm instead of repeating large page-section padding CSS.
|
|
28
|
+
- **MUST:** Use the default section host only for a thematic grouping, normally with a heading; select as=div when spacing alone has no sectioning meaning.
|
|
29
|
+
- **MUST:** Keep paint in Surface, inline measure in Container, and child arrangement in Stack or Grid rather than adding those responsibilities to Section.
|
|
30
|
+
- **MUST:** Choose a named recipe first; customize documented Section variables only when the theme or one deliberate region needs a value the scale cannot express.
|
|
31
|
+
- **MUST:** Load styles.css or core.css plus section.css.
|
|
32
|
+
|
|
33
|
+
## Common mistakes
|
|
34
|
+
|
|
35
|
+
- **Avoid:** Using Stack gap for page rhythm, Surface inset as section spacing, or Section as a generic div around every group. **Instead:** Assign each responsibility to Section, Surface, Container, Stack, or Grid and use as=div only when Section rhythm is useful without section semantics.
|
|
36
|
+
|
|
37
|
+
## Validation checklist
|
|
38
|
+
|
|
39
|
+
- Check named and responsive rhythm at constrained and wide widths, zoom, RTL, and vertical writing modes.
|
|
40
|
+
- Confirm the section has appropriate document meaning and that Surface asChild composition produces one host when full-width paint is needed.
|
|
41
|
+
|
|
42
|
+
## Related guidance
|
|
43
|
+
|
|
44
|
+
- `container`
|
|
45
|
+
- `surface`
|
|
46
|
+
- `stack`
|
|
47
|
+
- `grid`
|
|
48
|
+
- `interface-composition`
|
|
49
|
+
|
|
50
|
+
## Machine record
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"schema": "flowstack.agent-component.v1",
|
|
55
|
+
"id": "section",
|
|
56
|
+
"name": "Section",
|
|
57
|
+
"package": "@flowstack-ui/brick",
|
|
58
|
+
"layer": "brick",
|
|
59
|
+
"kind": "component",
|
|
60
|
+
"purpose": "Own themeable responsive block rhythm for major semantic page and application regions.",
|
|
61
|
+
"useWhen": [
|
|
62
|
+
"A thematic page or application region needs consistent large vertical rhythm beyond local component spacing."
|
|
63
|
+
],
|
|
64
|
+
"avoidWhen": [
|
|
65
|
+
{
|
|
66
|
+
"condition": "The need is child arrangement, inline measure, visual paint, or a complete content pattern.",
|
|
67
|
+
"useInstead": "Stack/Grid, Container, Surface, or a qualified Block"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"composition": [
|
|
71
|
+
"Place Container inside Section for measured content; compose Surface with asChild around Section when paint must cover the Section rhythm; use Stack or Grid inside for child relationships."
|
|
72
|
+
],
|
|
73
|
+
"rules": [
|
|
74
|
+
{
|
|
75
|
+
"id": "section-rhythm-owner",
|
|
76
|
+
"level": "must",
|
|
77
|
+
"statement": "Use Section's named responsive rhythm instead of repeating large page-section padding CSS."
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"id": "section-semantic-host",
|
|
81
|
+
"level": "must",
|
|
82
|
+
"statement": "Use the default section host only for a thematic grouping, normally with a heading; select as=div when spacing alone has no sectioning meaning."
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "section-boundaries",
|
|
86
|
+
"level": "must",
|
|
87
|
+
"statement": "Keep paint in Surface, inline measure in Container, and child arrangement in Stack or Grid rather than adding those responsibilities to Section."
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"id": "section-customization",
|
|
91
|
+
"level": "must",
|
|
92
|
+
"statement": "Choose a named recipe first; customize documented Section variables only when the theme or one deliberate region needs a value the scale cannot express."
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"id": "section-css",
|
|
96
|
+
"level": "must",
|
|
97
|
+
"statement": "Load styles.css or core.css plus section.css."
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"commonMistakes": [
|
|
101
|
+
{
|
|
102
|
+
"mistake": "Using Stack gap for page rhythm, Surface inset as section spacing, or Section as a generic div around every group.",
|
|
103
|
+
"correction": "Assign each responsibility to Section, Surface, Container, Stack, or Grid and use as=div only when Section rhythm is useful without section semantics."
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"validation": [
|
|
107
|
+
"Check named and responsive rhythm at constrained and wide widths, zoom, RTL, and vertical writing modes.",
|
|
108
|
+
"Confirm the section has appropriate document meaning and that Surface asChild composition produces one host when full-width paint is needed."
|
|
109
|
+
],
|
|
110
|
+
"related": [
|
|
111
|
+
"container",
|
|
112
|
+
"surface",
|
|
113
|
+
"stack",
|
|
114
|
+
"grid",
|
|
115
|
+
"interface-composition"
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
```
|