@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,116 @@
|
|
|
1
|
+
# Switch
|
|
2
|
+
|
|
3
|
+
Source: @flowstack-ui/atom@0.24.0
|
|
4
|
+
Kind: component
|
|
5
|
+
ID: switch
|
|
6
|
+
|
|
7
|
+
# Switch agent guide
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Represent an immediately applied on/off setting with switch semantics, controlled or uncontrolled state, field integration, and optional native form participation.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- A setting becomes active or inactive immediately when the user operates it.
|
|
16
|
+
|
|
17
|
+
## Choose something else when
|
|
18
|
+
|
|
19
|
+
- The choice is a form answer applied later or a command whose pressed state remains active. Use Checkbox or Toggle.
|
|
20
|
+
|
|
21
|
+
## Required composition
|
|
22
|
+
|
|
23
|
+
- Give Root visible text or a native accessible name and add Thumb only when the styled layer needs a decorative movable part. Use name, value, and form when checked state must submit.
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- **MUST:** Give Root a complete accessible name with visible text, aria-label, aria-labelledby, or Field labeling; Thumb remains decorative and aria-hidden.
|
|
28
|
+
- **MUST:** Use checked with onCheckedChange for controlled state or defaultChecked for uncontrolled state, and preserve role=switch with aria-checked.
|
|
29
|
+
- **MUST:** Use Switch only for an immediately applied on/off setting; do not substitute it for a deferred checkbox answer or pressed command.
|
|
30
|
+
- **MUST:** Keep read-only Switch focusable while preventing Enter, Space, pointer, and custom-element activation from changing state.
|
|
31
|
+
- **MUST:** Preserve aligned native submission and required-validity proxies, Field state and descriptions, validation focus, and uncontrolled form reset when form behavior applies.
|
|
32
|
+
|
|
33
|
+
## Common mistakes
|
|
34
|
+
|
|
35
|
+
- **Avoid:** Using Switch for a submit-later checkbox, relying on Thumb as the accessible control, or using disabled when the value should remain focusable and read-only. **Instead:** Choose by timing and semantics, name Root, keep Thumb decorative, and use readOnly for discoverable locked state.
|
|
36
|
+
|
|
37
|
+
## Validation checklist
|
|
38
|
+
|
|
39
|
+
- Verify accessible name, role and checked state, controlled and uncontrolled updates, pointer, Enter, and Space activation, disabled and read-only behavior, Thumb state inheritance, and native and custom asChild/render semantics.
|
|
40
|
+
- Verify named checked-value submission, required validity with and without name, invalid and Field descriptions, inline/native validation focus, form association, and uncontrolled reset.
|
|
41
|
+
|
|
42
|
+
## Related guidance
|
|
43
|
+
|
|
44
|
+
- `checkbox`
|
|
45
|
+
- `toggle`
|
|
46
|
+
- `field`
|
|
47
|
+
- `form`
|
|
48
|
+
|
|
49
|
+
## Machine record
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"schema": "flowstack.agent-component.v1",
|
|
54
|
+
"id": "switch",
|
|
55
|
+
"name": "Switch",
|
|
56
|
+
"package": "@flowstack-ui/atom",
|
|
57
|
+
"layer": "atom",
|
|
58
|
+
"kind": "component",
|
|
59
|
+
"purpose": "Represent an immediately applied on/off setting with switch semantics, controlled or uncontrolled state, field integration, and optional native form participation.",
|
|
60
|
+
"useWhen": [
|
|
61
|
+
"A setting becomes active or inactive immediately when the user operates it."
|
|
62
|
+
],
|
|
63
|
+
"avoidWhen": [
|
|
64
|
+
{
|
|
65
|
+
"condition": "The choice is a form answer applied later or a command whose pressed state remains active.",
|
|
66
|
+
"useInstead": "Checkbox or Toggle"
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"composition": [
|
|
70
|
+
"Give Root visible text or a native accessible name and add Thumb only when the styled layer needs a decorative movable part. Use name, value, and form when checked state must submit."
|
|
71
|
+
],
|
|
72
|
+
"rules": [
|
|
73
|
+
{
|
|
74
|
+
"id": "switch-name",
|
|
75
|
+
"level": "must",
|
|
76
|
+
"statement": "Give Root a complete accessible name with visible text, aria-label, aria-labelledby, or Field labeling; Thumb remains decorative and aria-hidden."
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "switch-state",
|
|
80
|
+
"level": "must",
|
|
81
|
+
"statement": "Use checked with onCheckedChange for controlled state or defaultChecked for uncontrolled state, and preserve role=switch with aria-checked."
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"id": "switch-immediate-setting",
|
|
85
|
+
"level": "must",
|
|
86
|
+
"statement": "Use Switch only for an immediately applied on/off setting; do not substitute it for a deferred checkbox answer or pressed command."
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"id": "switch-readonly",
|
|
90
|
+
"level": "must",
|
|
91
|
+
"statement": "Keep read-only Switch focusable while preventing Enter, Space, pointer, and custom-element activation from changing state."
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"id": "switch-form",
|
|
95
|
+
"level": "must",
|
|
96
|
+
"statement": "Preserve aligned native submission and required-validity proxies, Field state and descriptions, validation focus, and uncontrolled form reset when form behavior applies."
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
"commonMistakes": [
|
|
100
|
+
{
|
|
101
|
+
"mistake": "Using Switch for a submit-later checkbox, relying on Thumb as the accessible control, or using disabled when the value should remain focusable and read-only.",
|
|
102
|
+
"correction": "Choose by timing and semantics, name Root, keep Thumb decorative, and use readOnly for discoverable locked state."
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"validation": [
|
|
106
|
+
"Verify accessible name, role and checked state, controlled and uncontrolled updates, pointer, Enter, and Space activation, disabled and read-only behavior, Thumb state inheritance, and native and custom asChild/render semantics.",
|
|
107
|
+
"Verify named checked-value submission, required validity with and without name, invalid and Field descriptions, inline/native validation focus, form association, and uncontrolled reset."
|
|
108
|
+
],
|
|
109
|
+
"related": [
|
|
110
|
+
"checkbox",
|
|
111
|
+
"toggle",
|
|
112
|
+
"field",
|
|
113
|
+
"form"
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
```
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# Table
|
|
2
|
+
|
|
3
|
+
Source: @flowstack-ui/atom@0.24.0
|
|
4
|
+
Kind: component
|
|
5
|
+
ID: table
|
|
6
|
+
|
|
7
|
+
# Table agent guide
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Render native tabular structure for read-oriented row and column relationships, with caption, section, header, cell, and sort metadata anatomy.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- People primarily read and compare values whose row and column relationships are meaningful, without composite grid navigation or row selection.
|
|
16
|
+
|
|
17
|
+
## Choose something else when
|
|
18
|
+
|
|
19
|
+
- Cells need two-dimensional keyboard navigation or rows need composite selection. Use DataGrid.
|
|
20
|
+
- Rows are hierarchical and expand into nested rows with several columns, or the content has no meaningful column relationships. Use TreeGrid or List.
|
|
21
|
+
|
|
22
|
+
## Required composition
|
|
23
|
+
|
|
24
|
+
- Compose Root with a naming Caption or equivalent accessible name, Header and Body section groups, Row, correctly scoped Head cells, and Cell parts; add Footer only for genuine summary rows and put an interactive control inside Head only when sorting is application-controlled.
|
|
25
|
+
|
|
26
|
+
## Rules
|
|
27
|
+
|
|
28
|
+
- **MUST:** Preserve native table, caption, section, row, th, and td semantics and valid table nesting; do not add an ARIA grid interaction model to read-only data.
|
|
29
|
+
- **MUST:** Give the table an accessible name or useful caption when surrounding context does not already identify it.
|
|
30
|
+
- **MUST:** Use Head for actual headers and choose scope or explicit native header relationships that accurately associate headers with data cells.
|
|
31
|
+
- **MUST:** Treat sortDirection as metadata only; place a labelled interactive control inside a sortable Head and keep sorting, data order, and state application-owned.
|
|
32
|
+
- **MUST:** Do not invent table-level keyboard navigation or Tab stops; only genuine interactive descendants participate in keyboard focus.
|
|
33
|
+
|
|
34
|
+
## Common mistakes
|
|
35
|
+
|
|
36
|
+
- **Avoid:** Using Table because data looks rectangular even though users must navigate cells or select rows as one composite widget. **Instead:** Use DataGrid for a flat interactive grid or TreeGrid for a hierarchical interactive grid.
|
|
37
|
+
- **Avoid:** Setting sortDirection on Head without a keyboard-operable sorting control or expecting Atom to reorder data. **Instead:** Nest a labelled Button or Pressable, update application sorting, and keep sortDirection synchronized with the result.
|
|
38
|
+
|
|
39
|
+
## Validation checklist
|
|
40
|
+
|
|
41
|
+
- Inspect the final DOM for valid native table nesting, an appropriate accessible name, correct header scope or associations, and meaningful caption and footer content.
|
|
42
|
+
- Verify sortable headers expose accurate aria-sort, provide equivalent keyboard and pointer activation through a real control, and update application-owned data without adding table-level focus behavior.
|
|
43
|
+
- Verify server-safe rendering and asChild or render overrides preserve the required native semantics, props, and refs.
|
|
44
|
+
|
|
45
|
+
## Related guidance
|
|
46
|
+
|
|
47
|
+
- `data-grid`
|
|
48
|
+
- `tree-grid`
|
|
49
|
+
- `list`
|
|
50
|
+
- `button`
|
|
51
|
+
|
|
52
|
+
## Machine record
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"schema": "flowstack.agent-component.v1",
|
|
57
|
+
"id": "table",
|
|
58
|
+
"name": "Table",
|
|
59
|
+
"package": "@flowstack-ui/atom",
|
|
60
|
+
"layer": "atom",
|
|
61
|
+
"kind": "component",
|
|
62
|
+
"purpose": "Render native tabular structure for read-oriented row and column relationships, with caption, section, header, cell, and sort metadata anatomy.",
|
|
63
|
+
"useWhen": [
|
|
64
|
+
"People primarily read and compare values whose row and column relationships are meaningful, without composite grid navigation or row selection."
|
|
65
|
+
],
|
|
66
|
+
"avoidWhen": [
|
|
67
|
+
{
|
|
68
|
+
"condition": "Cells need two-dimensional keyboard navigation or rows need composite selection.",
|
|
69
|
+
"useInstead": "DataGrid"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"condition": "Rows are hierarchical and expand into nested rows with several columns, or the content has no meaningful column relationships.",
|
|
73
|
+
"useInstead": "TreeGrid or List"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"composition": [
|
|
77
|
+
"Compose Root with a naming Caption or equivalent accessible name, Header and Body section groups, Row, correctly scoped Head cells, and Cell parts; add Footer only for genuine summary rows and put an interactive control inside Head only when sorting is application-controlled."
|
|
78
|
+
],
|
|
79
|
+
"rules": [
|
|
80
|
+
{
|
|
81
|
+
"id": "table-native-semantics",
|
|
82
|
+
"level": "must",
|
|
83
|
+
"statement": "Preserve native table, caption, section, row, th, and td semantics and valid table nesting; do not add an ARIA grid interaction model to read-only data."
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"id": "table-name",
|
|
87
|
+
"level": "must",
|
|
88
|
+
"statement": "Give the table an accessible name or useful caption when surrounding context does not already identify it."
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"id": "table-header-association",
|
|
92
|
+
"level": "must",
|
|
93
|
+
"statement": "Use Head for actual headers and choose scope or explicit native header relationships that accurately associate headers with data cells."
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"id": "table-sort-boundary",
|
|
97
|
+
"level": "must",
|
|
98
|
+
"statement": "Treat sortDirection as metadata only; place a labelled interactive control inside a sortable Head and keep sorting, data order, and state application-owned."
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"id": "table-keyboard",
|
|
102
|
+
"level": "must",
|
|
103
|
+
"statement": "Do not invent table-level keyboard navigation or Tab stops; only genuine interactive descendants participate in keyboard focus."
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"commonMistakes": [
|
|
107
|
+
{
|
|
108
|
+
"mistake": "Using Table because data looks rectangular even though users must navigate cells or select rows as one composite widget.",
|
|
109
|
+
"correction": "Use DataGrid for a flat interactive grid or TreeGrid for a hierarchical interactive grid."
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"mistake": "Setting sortDirection on Head without a keyboard-operable sorting control or expecting Atom to reorder data.",
|
|
113
|
+
"correction": "Nest a labelled Button or Pressable, update application sorting, and keep sortDirection synchronized with the result."
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
"validation": [
|
|
117
|
+
"Inspect the final DOM for valid native table nesting, an appropriate accessible name, correct header scope or associations, and meaningful caption and footer content.",
|
|
118
|
+
"Verify sortable headers expose accurate aria-sort, provide equivalent keyboard and pointer activation through a real control, and update application-owned data without adding table-level focus behavior.",
|
|
119
|
+
"Verify server-safe rendering and asChild or render overrides preserve the required native semantics, props, and refs."
|
|
120
|
+
],
|
|
121
|
+
"related": [
|
|
122
|
+
"data-grid",
|
|
123
|
+
"tree-grid",
|
|
124
|
+
"list",
|
|
125
|
+
"button"
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
```
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Tabs
|
|
2
|
+
|
|
3
|
+
Source: @flowstack-ui/atom@0.24.0
|
|
4
|
+
Kind: component
|
|
5
|
+
ID: tabs
|
|
6
|
+
|
|
7
|
+
# Tabs agent guide
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Switch among related panels in one page with linked tab semantics, selection state, and roving keyboard focus.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- A small set of related views shares one page and only one panel is normally active.
|
|
16
|
+
|
|
17
|
+
## Choose something else when
|
|
18
|
+
|
|
19
|
+
- Choices navigate to destinations or multiple sections may remain open. Use Link or Accordion.
|
|
20
|
+
|
|
21
|
+
## Required composition
|
|
22
|
+
|
|
23
|
+
- Compose Trigger and optional Indicator inside List, with one matching Content value for each Trigger inside Root.
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- **MUST:** Give every Trigger a unique value and matching Content relationship.
|
|
28
|
+
- **SHOULD:** Use manual activation when changing panels is expensive or selection should require explicit confirmation.
|
|
29
|
+
|
|
30
|
+
## Common mistakes
|
|
31
|
+
|
|
32
|
+
- **Avoid:** Using Tabs as route navigation or placing unmatched panels outside Root. **Instead:** Use links for routes and keep paired Trigger and Content parts in one Tabs context.
|
|
33
|
+
|
|
34
|
+
## Validation checklist
|
|
35
|
+
|
|
36
|
+
- Test arrow, Home, End, Enter, Space, Tab, disabled items, controlled state, orientation, and RTL.
|
|
37
|
+
- Confirm tab/tabpanel IDs and aria relationships remain valid.
|
|
38
|
+
|
|
39
|
+
## Related guidance
|
|
40
|
+
|
|
41
|
+
- `accordion`
|
|
42
|
+
- `bottom-navigation`
|
|
43
|
+
- `navigation-menu`
|
|
44
|
+
|
|
45
|
+
## Machine record
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"schema": "flowstack.agent-component.v1",
|
|
50
|
+
"id": "tabs",
|
|
51
|
+
"name": "Tabs",
|
|
52
|
+
"package": "@flowstack-ui/atom",
|
|
53
|
+
"layer": "atom",
|
|
54
|
+
"kind": "component",
|
|
55
|
+
"purpose": "Switch among related panels in one page with linked tab semantics, selection state, and roving keyboard focus.",
|
|
56
|
+
"useWhen": [
|
|
57
|
+
"A small set of related views shares one page and only one panel is normally active."
|
|
58
|
+
],
|
|
59
|
+
"avoidWhen": [
|
|
60
|
+
{
|
|
61
|
+
"condition": "Choices navigate to destinations or multiple sections may remain open.",
|
|
62
|
+
"useInstead": "Link or Accordion"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"composition": [
|
|
66
|
+
"Compose Trigger and optional Indicator inside List, with one matching Content value for each Trigger inside Root."
|
|
67
|
+
],
|
|
68
|
+
"rules": [
|
|
69
|
+
{
|
|
70
|
+
"id": "tabs-value-pairs",
|
|
71
|
+
"level": "must",
|
|
72
|
+
"statement": "Give every Trigger a unique value and matching Content relationship."
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": "tabs-activation",
|
|
76
|
+
"level": "should",
|
|
77
|
+
"statement": "Use manual activation when changing panels is expensive or selection should require explicit confirmation."
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"commonMistakes": [
|
|
81
|
+
{
|
|
82
|
+
"mistake": "Using Tabs as route navigation or placing unmatched panels outside Root.",
|
|
83
|
+
"correction": "Use links for routes and keep paired Trigger and Content parts in one Tabs context."
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"validation": [
|
|
87
|
+
"Test arrow, Home, End, Enter, Space, Tab, disabled items, controlled state, orientation, and RTL.",
|
|
88
|
+
"Confirm tab/tabpanel IDs and aria relationships remain valid."
|
|
89
|
+
],
|
|
90
|
+
"related": [
|
|
91
|
+
"accordion",
|
|
92
|
+
"bottom-navigation",
|
|
93
|
+
"navigation-menu"
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
```
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Textarea
|
|
2
|
+
|
|
3
|
+
Source: @flowstack-ui/atom@0.24.0
|
|
4
|
+
Kind: component
|
|
5
|
+
ID: textarea
|
|
6
|
+
|
|
7
|
+
# Textarea agent guide
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Provide headless native multi-line text entry with Field relationships and controlled or uncontrolled value handling.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- The user may enter sentences, paragraphs, notes, or other multi-line text.
|
|
16
|
+
|
|
17
|
+
## Choose something else when
|
|
18
|
+
|
|
19
|
+
- The expected value is short and single-line. Use Input.
|
|
20
|
+
|
|
21
|
+
## Required composition
|
|
22
|
+
|
|
23
|
+
- Place Textarea.Root inside one Field.Root with Field.Label and an optional description or character guidance.
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- **MUST:** Give every Textarea an accessible name, normally through Field.Label.
|
|
28
|
+
- **MUST:** Provide a stable name when the value participates in submission.
|
|
29
|
+
|
|
30
|
+
## Common mistakes
|
|
31
|
+
|
|
32
|
+
- **Avoid:** Replacing Textarea with a contenteditable div for ordinary text entry. **Instead:** Use native Textarea unless rich-text behavior is genuinely required.
|
|
33
|
+
|
|
34
|
+
## Validation checklist
|
|
35
|
+
|
|
36
|
+
- Inspect the label and description relationships.
|
|
37
|
+
- Test multi-line keyboard entry, resizing policy, and submitted value.
|
|
38
|
+
|
|
39
|
+
## Related guidance
|
|
40
|
+
|
|
41
|
+
- `field`
|
|
42
|
+
- `form`
|
|
43
|
+
- `input`
|
|
44
|
+
|
|
45
|
+
## Machine record
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"schema": "flowstack.agent-component.v1",
|
|
50
|
+
"id": "textarea",
|
|
51
|
+
"name": "Textarea",
|
|
52
|
+
"package": "@flowstack-ui/atom",
|
|
53
|
+
"layer": "atom",
|
|
54
|
+
"kind": "component",
|
|
55
|
+
"purpose": "Provide headless native multi-line text entry with Field relationships and controlled or uncontrolled value handling.",
|
|
56
|
+
"useWhen": [
|
|
57
|
+
"The user may enter sentences, paragraphs, notes, or other multi-line text."
|
|
58
|
+
],
|
|
59
|
+
"avoidWhen": [
|
|
60
|
+
{
|
|
61
|
+
"condition": "The expected value is short and single-line.",
|
|
62
|
+
"useInstead": "Input"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"composition": [
|
|
66
|
+
"Place Textarea.Root inside one Field.Root with Field.Label and an optional description or character guidance."
|
|
67
|
+
],
|
|
68
|
+
"rules": [
|
|
69
|
+
{
|
|
70
|
+
"id": "textarea-labeled",
|
|
71
|
+
"level": "must",
|
|
72
|
+
"statement": "Give every Textarea an accessible name, normally through Field.Label."
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": "textarea-name",
|
|
76
|
+
"level": "must",
|
|
77
|
+
"statement": "Provide a stable name when the value participates in submission."
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"commonMistakes": [
|
|
81
|
+
{
|
|
82
|
+
"mistake": "Replacing Textarea with a contenteditable div for ordinary text entry.",
|
|
83
|
+
"correction": "Use native Textarea unless rich-text behavior is genuinely required."
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"validation": [
|
|
87
|
+
"Inspect the label and description relationships.",
|
|
88
|
+
"Test multi-line keyboard entry, resizing policy, and submitted value."
|
|
89
|
+
],
|
|
90
|
+
"related": [
|
|
91
|
+
"field",
|
|
92
|
+
"form",
|
|
93
|
+
"input"
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
```
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Toast
|
|
2
|
+
|
|
3
|
+
Source: @flowstack-ui/atom@0.24.0
|
|
4
|
+
Kind: component
|
|
5
|
+
ID: toast
|
|
6
|
+
|
|
7
|
+
# Toast agent guide
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Queue, display, announce, pause, act on, and dismiss short non-blocking updates through declarative or imperative toast state and a persistent accessible notification viewport.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- A short status update is useful but must not interrupt the current task or require a response before work continues.
|
|
16
|
+
|
|
17
|
+
## Choose something else when
|
|
18
|
+
|
|
19
|
+
- Feedback belongs beside a field, is essential or durable, or the user must respond before continuing. Use inline feedback, persistent application content, or AlertDialog.
|
|
20
|
+
|
|
21
|
+
## Required composition
|
|
22
|
+
|
|
23
|
+
- Place one Viewport under Provider for queued and announced toasts. Create imperative toasts with toast helpers or compose declarative Root with concise Title and optional Description; add Action, Cancel, or Close only when the toast needs those dismissing controls.
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- **MUST:** Do not place essential, sole, or response-required information only in Toast because it is transient and never moves focus on appearance.
|
|
28
|
+
- **MUST:** Keep Viewport's persistent polite and assertive announcers as the sole live path; do not add role=status, role=alert, or aria-live to visible store-rendered Root cards.
|
|
29
|
+
- **MUST:** Choose toast type by announcement priority, keep Title and Description concise, and update content only when a meaningful new announcement is intended.
|
|
30
|
+
- **MUST:** Preserve finite duration normalization, hover/focus/page-focus pause policies, labelled hotkey access, focused Escape dismissal, and focus restoration; never move focus merely because a toast appeared.
|
|
31
|
+
- **MUST:** Use Action and Cancel only when running their callbacks should then dismiss; move async interactions that must remain open into separate persistent UI.
|
|
32
|
+
- **MUST:** Keep Close, Escape, timeout, or another obvious dismissal path available; directional swipe is optional enhancement and never the only mechanism.
|
|
33
|
+
- **SHOULD:** Keep safe-area, persistent chrome, software-keyboard, and viewport positioning decisions in the styled or application layer while consuming Atom's logical position and state.
|
|
34
|
+
|
|
35
|
+
## Common mistakes
|
|
36
|
+
|
|
37
|
+
- **Avoid:** Using Toast for validation or confirmation, adding a second live region to visible cards, making swipe the only dismissal, or expecting an action to remain open during async work. **Instead:** Use inline or blocking UI for those jobs, preserve the single announcer path and equivalent dismissal, and move persistent async interaction out of the toast.
|
|
38
|
+
|
|
39
|
+
## Validation checklist
|
|
40
|
+
|
|
41
|
+
- Verify imperative create/update/dismiss and declarative Root, stable IDs, type role priority, duration and maxVisible normalization, queue order and stack anchoring, close inheritance, entry/exit lifecycle, forceMount, auto-close, hover/focus/page pause, and meaningful update announcements exactly once.
|
|
42
|
+
- Verify labelled Viewport and hotkey, polite/assertive persistent announcers, no visible-card live region, focus-within pause, focused and viewport Escape, focus restoration, Action/Cancel/Close callbacks and dismissal, pointer swipe threshold/direction/cancel, non-swipe dismissal, custom renderToast, asChild viewport insertion, portal container, and logical positions.
|
|
43
|
+
|
|
44
|
+
## Related guidance
|
|
45
|
+
|
|
46
|
+
- `alert-dialog`
|
|
47
|
+
- `field`
|
|
48
|
+
|
|
49
|
+
## Machine record
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"schema": "flowstack.agent-component.v1",
|
|
54
|
+
"id": "toast",
|
|
55
|
+
"name": "Toast",
|
|
56
|
+
"package": "@flowstack-ui/atom",
|
|
57
|
+
"layer": "atom",
|
|
58
|
+
"kind": "component",
|
|
59
|
+
"purpose": "Queue, display, announce, pause, act on, and dismiss short non-blocking updates through declarative or imperative toast state and a persistent accessible notification viewport.",
|
|
60
|
+
"useWhen": [
|
|
61
|
+
"A short status update is useful but must not interrupt the current task or require a response before work continues."
|
|
62
|
+
],
|
|
63
|
+
"avoidWhen": [
|
|
64
|
+
{
|
|
65
|
+
"condition": "Feedback belongs beside a field, is essential or durable, or the user must respond before continuing.",
|
|
66
|
+
"useInstead": "inline feedback, persistent application content, or AlertDialog"
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"composition": [
|
|
70
|
+
"Place one Viewport under Provider for queued and announced toasts. Create imperative toasts with toast helpers or compose declarative Root with concise Title and optional Description; add Action, Cancel, or Close only when the toast needs those dismissing controls."
|
|
71
|
+
],
|
|
72
|
+
"rules": [
|
|
73
|
+
{
|
|
74
|
+
"id": "toast-nonessential",
|
|
75
|
+
"level": "must",
|
|
76
|
+
"statement": "Do not place essential, sole, or response-required information only in Toast because it is transient and never moves focus on appearance."
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "toast-single-live-path",
|
|
80
|
+
"level": "must",
|
|
81
|
+
"statement": "Keep Viewport's persistent polite and assertive announcers as the sole live path; do not add role=status, role=alert, or aria-live to visible store-rendered Root cards."
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"id": "toast-priority-content",
|
|
85
|
+
"level": "must",
|
|
86
|
+
"statement": "Choose toast type by announcement priority, keep Title and Description concise, and update content only when a meaningful new announcement is intended."
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"id": "toast-timing-focus",
|
|
90
|
+
"level": "must",
|
|
91
|
+
"statement": "Preserve finite duration normalization, hover/focus/page-focus pause policies, labelled hotkey access, focused Escape dismissal, and focus restoration; never move focus merely because a toast appeared."
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"id": "toast-actions-dismiss",
|
|
95
|
+
"level": "must",
|
|
96
|
+
"statement": "Use Action and Cancel only when running their callbacks should then dismiss; move async interactions that must remain open into separate persistent UI."
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"id": "toast-dismissal-alternative",
|
|
100
|
+
"level": "must",
|
|
101
|
+
"statement": "Keep Close, Escape, timeout, or another obvious dismissal path available; directional swipe is optional enhancement and never the only mechanism."
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"id": "toast-placement-owner",
|
|
105
|
+
"level": "should",
|
|
106
|
+
"statement": "Keep safe-area, persistent chrome, software-keyboard, and viewport positioning decisions in the styled or application layer while consuming Atom's logical position and state."
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"commonMistakes": [
|
|
110
|
+
{
|
|
111
|
+
"mistake": "Using Toast for validation or confirmation, adding a second live region to visible cards, making swipe the only dismissal, or expecting an action to remain open during async work.",
|
|
112
|
+
"correction": "Use inline or blocking UI for those jobs, preserve the single announcer path and equivalent dismissal, and move persistent async interaction out of the toast."
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"validation": [
|
|
116
|
+
"Verify imperative create/update/dismiss and declarative Root, stable IDs, type role priority, duration and maxVisible normalization, queue order and stack anchoring, close inheritance, entry/exit lifecycle, forceMount, auto-close, hover/focus/page pause, and meaningful update announcements exactly once.",
|
|
117
|
+
"Verify labelled Viewport and hotkey, polite/assertive persistent announcers, no visible-card live region, focus-within pause, focused and viewport Escape, focus restoration, Action/Cancel/Close callbacks and dismissal, pointer swipe threshold/direction/cancel, non-swipe dismissal, custom renderToast, asChild viewport insertion, portal container, and logical positions."
|
|
118
|
+
],
|
|
119
|
+
"related": [
|
|
120
|
+
"alert-dialog",
|
|
121
|
+
"field"
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
```
|