@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,150 @@
|
|
|
1
|
+
# Toast
|
|
2
|
+
|
|
3
|
+
Source: @flowstack-ui/brick@0.1.11
|
|
4
|
+
Kind: component
|
|
5
|
+
ID: toast
|
|
6
|
+
|
|
7
|
+
# Toast agent guide
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Present queued finished transient updates while Atom owns store identity, timers, announcements, focus, hotkey access, portal, dismissal, swipe, and lifecycle.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- A short non-blocking outcome or process update is useful, can be safely ignored, and remains recoverable or visible elsewhere without interrupting the current task.
|
|
16
|
+
|
|
17
|
+
## Choose something else when
|
|
18
|
+
|
|
19
|
+
- Feedback belongs beside a field, is essential or durable, represents numeric progress, or requires a response before continuing. Use Field or Form feedback, persistent application content, Progress, or AlertDialog.
|
|
20
|
+
|
|
21
|
+
## Required composition
|
|
22
|
+
|
|
23
|
+
- Install one Toaster near the application root. Create imperative updates with toast helpers, or use the public Toast.Root, Icon, Content, Title, Description, Actions, Action, Close, and Viewport parts for advanced rendering while preserving one Atom Provider and Viewport announcement path.
|
|
24
|
+
- Supply concise meaningful title or description, choose type by announcement priority, localize Toaster label and closeLabel, and include an optional action only when it is safe to ignore and may dismiss immediately.
|
|
25
|
+
|
|
26
|
+
## Rules
|
|
27
|
+
|
|
28
|
+
- **MUST:** Never make Toast the sole home of essential, response-required, validation, or durable information because it is transient and does not move focus when it appears.
|
|
29
|
+
- **MUST:** Keep Viewport's persistent polite and assertive announcers as the only live path; do not add role=status, role=alert, or aria-live to visible Root cards.
|
|
30
|
+
- **MUST:** Use warning and error assertion only for genuinely important feedback, keep Title and Description concise, include meaning beyond color and glyph, and update content only when a new announcement is intended.
|
|
31
|
+
- **MUST:** Preserve normalized duration, hover/focus/page-focus pause, localized hotkey access, focused Escape dismissal, and focus restoration; never steal focus merely because a toast appeared.
|
|
32
|
+
- **MUST:** Use Brick's single Action only for a callback that may dismiss immediately; Brick has no Cancel part, and async interaction that must stay open belongs in persistent application UI.
|
|
33
|
+
- **MUST:** Keep Close, Escape, timeout, or another obvious path available; directional swipe is optional and never the sole dismissal mechanism.
|
|
34
|
+
- **MUST:** Choose logical position, responsive/compact/full width, and separated/overlap stacking deliberately; keep safe areas, fixed chrome, software keyboards, narrow screens, zoom, RTL, and viewport offsets under styled or application ownership.
|
|
35
|
+
- **MUST:** Load styles.css or core.css plus toast.css.
|
|
36
|
+
|
|
37
|
+
## Common mistakes
|
|
38
|
+
|
|
39
|
+
- **Avoid:** Using Toast for validation or confirmation, adding a second live region, choosing assertive type by color preference, or expecting Action to remain open during async work. **Instead:** Use inline or blocking UI for those jobs, preserve one announcement path, choose priority semantically, and move persistent async interaction outside Toast.
|
|
40
|
+
- **Avoid:** Making swipe the only dismissal, mounting multiple Toasters casually, or allowing fixed application chrome to cover the viewport. **Instead:** Provide an obvious non-swipe dismissal, keep one application-level viewport, and set documented logical offsets for measured chrome collisions.
|
|
41
|
+
|
|
42
|
+
## Validation checklist
|
|
43
|
+
|
|
44
|
+
- Verify imperative create/update/dismiss and promise flows, declarative Root, stable IDs, type priority, duration and maxVisible normalization, queue and stacking, close inheritance, entry/exit lifecycle, forceMount, auto-close, pause policies, and meaningful updates announced once.
|
|
45
|
+
- Verify localized Viewport label/hotkey, polite/assertive announcers, no visible-card live region, focus-within pause, Escape and restoration, Action and Close callbacks/dismissal, optional swipe threshold/direction/cancel, non-swipe dismissal, custom renderToast, portal container, and logical positions.
|
|
46
|
+
- Verify six types, all width/stacking/position recipes, title-only and description-only geometry, long localized content, safe-area and application offsets, 320px, zoom, RTL, light/dark appearance, forced colors, and reduced motion.
|
|
47
|
+
|
|
48
|
+
## Related guidance
|
|
49
|
+
|
|
50
|
+
- `@flowstack-ui/atom/agents/toast`
|
|
51
|
+
- `alert-dialog`
|
|
52
|
+
- `field`
|
|
53
|
+
- `form`
|
|
54
|
+
- `progress`
|
|
55
|
+
|
|
56
|
+
## Machine record
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"schema": "flowstack.agent-component.v1",
|
|
61
|
+
"id": "toast",
|
|
62
|
+
"name": "Toast",
|
|
63
|
+
"package": "@flowstack-ui/brick",
|
|
64
|
+
"layer": "brick",
|
|
65
|
+
"kind": "component",
|
|
66
|
+
"purpose": "Present queued finished transient updates while Atom owns store identity, timers, announcements, focus, hotkey access, portal, dismissal, swipe, and lifecycle.",
|
|
67
|
+
"useWhen": [
|
|
68
|
+
"A short non-blocking outcome or process update is useful, can be safely ignored, and remains recoverable or visible elsewhere without interrupting the current task."
|
|
69
|
+
],
|
|
70
|
+
"avoidWhen": [
|
|
71
|
+
{
|
|
72
|
+
"condition": "Feedback belongs beside a field, is essential or durable, represents numeric progress, or requires a response before continuing.",
|
|
73
|
+
"useInstead": "Field or Form feedback, persistent application content, Progress, or AlertDialog"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"composition": [
|
|
77
|
+
"Install one Toaster near the application root. Create imperative updates with toast helpers, or use the public Toast.Root, Icon, Content, Title, Description, Actions, Action, Close, and Viewport parts for advanced rendering while preserving one Atom Provider and Viewport announcement path.",
|
|
78
|
+
"Supply concise meaningful title or description, choose type by announcement priority, localize Toaster label and closeLabel, and include an optional action only when it is safe to ignore and may dismiss immediately."
|
|
79
|
+
],
|
|
80
|
+
"rules": [
|
|
81
|
+
{
|
|
82
|
+
"id": "toast-nonessential",
|
|
83
|
+
"level": "must",
|
|
84
|
+
"statement": "Never make Toast the sole home of essential, response-required, validation, or durable information because it is transient and does not move focus when it appears."
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"id": "toast-single-live-path",
|
|
88
|
+
"level": "must",
|
|
89
|
+
"statement": "Keep Viewport's persistent polite and assertive announcers as the only live path; do not add role=status, role=alert, or aria-live to visible Root cards."
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"id": "toast-priority-content",
|
|
93
|
+
"level": "must",
|
|
94
|
+
"statement": "Use warning and error assertion only for genuinely important feedback, keep Title and Description concise, include meaning beyond color and glyph, and update content only when a new announcement is intended."
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"id": "toast-timing-focus",
|
|
98
|
+
"level": "must",
|
|
99
|
+
"statement": "Preserve normalized duration, hover/focus/page-focus pause, localized hotkey access, focused Escape dismissal, and focus restoration; never steal focus merely because a toast appeared."
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"id": "toast-actions-dismiss",
|
|
103
|
+
"level": "must",
|
|
104
|
+
"statement": "Use Brick's single Action only for a callback that may dismiss immediately; Brick has no Cancel part, and async interaction that must stay open belongs in persistent application UI."
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"id": "toast-dismissal",
|
|
108
|
+
"level": "must",
|
|
109
|
+
"statement": "Keep Close, Escape, timeout, or another obvious path available; directional swipe is optional and never the sole dismissal mechanism."
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"id": "toast-responsive",
|
|
113
|
+
"level": "must",
|
|
114
|
+
"statement": "Choose logical position, responsive/compact/full width, and separated/overlap stacking deliberately; keep safe areas, fixed chrome, software keyboards, narrow screens, zoom, RTL, and viewport offsets under styled or application ownership."
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"id": "toast-css",
|
|
118
|
+
"level": "must",
|
|
119
|
+
"statement": "Load styles.css or core.css plus toast.css."
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"commonMistakes": [
|
|
123
|
+
{
|
|
124
|
+
"mistake": "Using Toast for validation or confirmation, adding a second live region, choosing assertive type by color preference, or expecting Action to remain open during async work.",
|
|
125
|
+
"correction": "Use inline or blocking UI for those jobs, preserve one announcement path, choose priority semantically, and move persistent async interaction outside Toast."
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"mistake": "Making swipe the only dismissal, mounting multiple Toasters casually, or allowing fixed application chrome to cover the viewport.",
|
|
129
|
+
"correction": "Provide an obvious non-swipe dismissal, keep one application-level viewport, and set documented logical offsets for measured chrome collisions."
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"validation": [
|
|
133
|
+
"Verify imperative create/update/dismiss and promise flows, declarative Root, stable IDs, type priority, duration and maxVisible normalization, queue and stacking, close inheritance, entry/exit lifecycle, forceMount, auto-close, pause policies, and meaningful updates announced once.",
|
|
134
|
+
"Verify localized Viewport label/hotkey, polite/assertive announcers, no visible-card live region, focus-within pause, Escape and restoration, Action and Close callbacks/dismissal, optional swipe threshold/direction/cancel, non-swipe dismissal, custom renderToast, portal container, and logical positions.",
|
|
135
|
+
"Verify six types, all width/stacking/position recipes, title-only and description-only geometry, long localized content, safe-area and application offsets, 320px, zoom, RTL, light/dark appearance, forced colors, and reduced motion."
|
|
136
|
+
],
|
|
137
|
+
"related": [
|
|
138
|
+
{
|
|
139
|
+
"kind": "package",
|
|
140
|
+
"package": "@flowstack-ui/atom",
|
|
141
|
+
"id": "toast",
|
|
142
|
+
"versionPolicy": "installed-exact"
|
|
143
|
+
},
|
|
144
|
+
"alert-dialog",
|
|
145
|
+
"field",
|
|
146
|
+
"form",
|
|
147
|
+
"progress"
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
```
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# ToggleGroup
|
|
2
|
+
|
|
3
|
+
Source: @flowstack-ui/brick@0.1.11
|
|
4
|
+
Kind: component
|
|
5
|
+
ID: toggle-group
|
|
6
|
+
|
|
7
|
+
# ToggleGroup agent guide
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Coordinate a related set of single- or multiple-selection pressed commands with shared Brick recipes and Atom keyboard behavior.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- Related view, formatting, filter, or presentation commands need a visible pressed state and arrow-key movement.
|
|
16
|
+
|
|
17
|
+
## Choose something else when
|
|
18
|
+
|
|
19
|
+
- One independent command toggles, a form submits one required choice, or the selection changes the displayed panel. Use Toggle, RadioGroup, or Tabs according to the user job.
|
|
20
|
+
|
|
21
|
+
## Required composition
|
|
22
|
+
|
|
23
|
+
- Compose named Item controls directly inside Root, choose single or multiple value semantics deliberately, and let Root own the shared variant, tone, size, shape, attachment, and width policy.
|
|
24
|
+
- Use iconOnly only when an Item contains an icon with a complete accessible name; keep visible labels when the icon is not universally understood.
|
|
25
|
+
|
|
26
|
+
## Rules
|
|
27
|
+
|
|
28
|
+
- **MUST:** Choose single or multiple mode from the command model and keep the value and onValueChange types consistent with that choice.
|
|
29
|
+
- **MUST:** Do not use ToggleGroup for a form choice that requires radio semantics, validation, or ordinary form submission.
|
|
30
|
+
- **MUST:** Give Root an accessible name when surrounding context is insufficient and give every Item a stable complete name.
|
|
31
|
+
- **MUST:** Give every Item a stable unique value, route controlled changes through onValueChange, and keep string values for single mode and string-array values for multiple mode.
|
|
32
|
+
- **MUST:** Preserve one roving Tab stop, DOM-order registration, disabled-item skipping, looping policy, orientation-specific Arrow keys, Home/End, and horizontal RTL mirroring.
|
|
33
|
+
- **MUST:** Use accent or neutral tone for selection emphasis; do not use semantic status colors to imply error, success, warning, or danger.
|
|
34
|
+
- **MUST:** Choose wrapping, orientation, or an alternative narrow layout without changing DOM order or clipping focus; attached groups do not wrap.
|
|
35
|
+
- **MUST:** Load styles.css or core.css plus toggle-group.css.
|
|
36
|
+
|
|
37
|
+
## Common mistakes
|
|
38
|
+
|
|
39
|
+
- **Avoid:** Using ToggleGroup as visual tabs, omitting the group name, or styling every Item independently so selected states drift. **Instead:** Use Tabs for panels, name the command group, and configure the shared variant and tone on Root.
|
|
40
|
+
|
|
41
|
+
## Validation checklist
|
|
42
|
+
|
|
43
|
+
- Check single and multiple values, pressed state, arrows, Home and End, looping, disabled-item skipping, and controlled behavior.
|
|
44
|
+
- Check wrapping or vertical layout, touch targets, focus visibility, themes, zoom, and RTL.
|
|
45
|
+
|
|
46
|
+
## Related guidance
|
|
47
|
+
|
|
48
|
+
- `@flowstack-ui/atom/agents/toggle-group`
|
|
49
|
+
- `toggle`
|
|
50
|
+
- `radio-group`
|
|
51
|
+
- `checkbox-group`
|
|
52
|
+
- `switch`
|
|
53
|
+
- `tabs`
|
|
54
|
+
- `toolbar`
|
|
55
|
+
- `icon`
|
|
56
|
+
|
|
57
|
+
## Machine record
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"schema": "flowstack.agent-component.v1",
|
|
62
|
+
"id": "toggle-group",
|
|
63
|
+
"name": "ToggleGroup",
|
|
64
|
+
"package": "@flowstack-ui/brick",
|
|
65
|
+
"layer": "brick",
|
|
66
|
+
"kind": "component",
|
|
67
|
+
"purpose": "Coordinate a related set of single- or multiple-selection pressed commands with shared Brick recipes and Atom keyboard behavior.",
|
|
68
|
+
"useWhen": [
|
|
69
|
+
"Related view, formatting, filter, or presentation commands need a visible pressed state and arrow-key movement."
|
|
70
|
+
],
|
|
71
|
+
"avoidWhen": [
|
|
72
|
+
{
|
|
73
|
+
"condition": "One independent command toggles, a form submits one required choice, or the selection changes the displayed panel.",
|
|
74
|
+
"useInstead": "Toggle, RadioGroup, or Tabs according to the user job"
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"composition": [
|
|
78
|
+
"Compose named Item controls directly inside Root, choose single or multiple value semantics deliberately, and let Root own the shared variant, tone, size, shape, attachment, and width policy.",
|
|
79
|
+
"Use iconOnly only when an Item contains an icon with a complete accessible name; keep visible labels when the icon is not universally understood."
|
|
80
|
+
],
|
|
81
|
+
"rules": [
|
|
82
|
+
{
|
|
83
|
+
"id": "toggle-group-selection-model",
|
|
84
|
+
"level": "must",
|
|
85
|
+
"statement": "Choose single or multiple mode from the command model and keep the value and onValueChange types consistent with that choice."
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"id": "toggle-group-not-radio",
|
|
89
|
+
"level": "must",
|
|
90
|
+
"statement": "Do not use ToggleGroup for a form choice that requires radio semantics, validation, or ordinary form submission."
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"id": "toggle-group-naming",
|
|
94
|
+
"level": "must",
|
|
95
|
+
"statement": "Give Root an accessible name when surrounding context is insufficient and give every Item a stable complete name."
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"id": "toggle-group-values",
|
|
99
|
+
"level": "must",
|
|
100
|
+
"statement": "Give every Item a stable unique value, route controlled changes through onValueChange, and keep string values for single mode and string-array values for multiple mode."
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"id": "toggle-group-roving",
|
|
104
|
+
"level": "must",
|
|
105
|
+
"statement": "Preserve one roving Tab stop, DOM-order registration, disabled-item skipping, looping policy, orientation-specific Arrow keys, Home/End, and horizontal RTL mirroring."
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"id": "toggle-group-tone",
|
|
109
|
+
"level": "must",
|
|
110
|
+
"statement": "Use accent or neutral tone for selection emphasis; do not use semantic status colors to imply error, success, warning, or danger."
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"id": "toggle-group-responsive-policy",
|
|
114
|
+
"level": "must",
|
|
115
|
+
"statement": "Choose wrapping, orientation, or an alternative narrow layout without changing DOM order or clipping focus; attached groups do not wrap."
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"id": "toggle-group-css",
|
|
119
|
+
"level": "must",
|
|
120
|
+
"statement": "Load styles.css or core.css plus toggle-group.css."
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"commonMistakes": [
|
|
124
|
+
{
|
|
125
|
+
"mistake": "Using ToggleGroup as visual tabs, omitting the group name, or styling every Item independently so selected states drift.",
|
|
126
|
+
"correction": "Use Tabs for panels, name the command group, and configure the shared variant and tone on Root."
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"validation": [
|
|
130
|
+
"Check single and multiple values, pressed state, arrows, Home and End, looping, disabled-item skipping, and controlled behavior.",
|
|
131
|
+
"Check wrapping or vertical layout, touch targets, focus visibility, themes, zoom, and RTL."
|
|
132
|
+
],
|
|
133
|
+
"related": [
|
|
134
|
+
{
|
|
135
|
+
"kind": "package",
|
|
136
|
+
"package": "@flowstack-ui/atom",
|
|
137
|
+
"id": "toggle-group",
|
|
138
|
+
"versionPolicy": "installed-exact"
|
|
139
|
+
},
|
|
140
|
+
"toggle",
|
|
141
|
+
"radio-group",
|
|
142
|
+
"checkbox-group",
|
|
143
|
+
"switch",
|
|
144
|
+
"tabs",
|
|
145
|
+
"toolbar",
|
|
146
|
+
"icon"
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
```
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# Toggle
|
|
2
|
+
|
|
3
|
+
Source: @flowstack-ui/brick@0.1.11
|
|
4
|
+
Kind: component
|
|
5
|
+
ID: toggle
|
|
6
|
+
|
|
7
|
+
# Toggle agent guide
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Present one persistent pressed or unpressed command with Brick recipes and Atom-owned button behavior.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- One command such as Favorite, Pin, Bold, or Show completed needs a persistent pressed state.
|
|
16
|
+
|
|
17
|
+
## Choose something else when
|
|
18
|
+
|
|
19
|
+
- Related pressed commands need shared selection and arrow navigation. Use ToggleGroup.
|
|
20
|
+
- A momentary action, submitted choice, boolean setting, or panel switch is required. Use Button, Checkbox, Switch, or Tabs according to the job.
|
|
21
|
+
|
|
22
|
+
## Required composition
|
|
23
|
+
|
|
24
|
+
- Keep one stable visible or accessible name across pressed states; use iconOnly only with a complete accessible name.
|
|
25
|
+
- Choose variant for the selected-state treatment and accent or neutral tone for its emphasis before applying local customization.
|
|
26
|
+
|
|
27
|
+
## Rules
|
|
28
|
+
|
|
29
|
+
- **MUST:** Use Toggle only when the same command meaning remains valid in pressed and unpressed states.
|
|
30
|
+
- **MUST:** Use accent or neutral tone for selection emphasis; do not use semantic status colors to imply error, success, warning, or danger.
|
|
31
|
+
- **MUST:** Preserve Atom-owned native button semantics, aria-pressed state, activation, disabled behavior, and composition.
|
|
32
|
+
- **MUST:** Use pressed with onPressedChange for controlled state or defaultPressed for uncontrolled state, and keep one stable command name across both aria-pressed states.
|
|
33
|
+
- **MUST:** When using asChild or render, preserve one element with Atom props, handlers, refs, tab stop, Enter and Space activation, button semantics, and disabled exposure.
|
|
34
|
+
- **MUST:** Load styles.css or core.css plus toggle.css.
|
|
35
|
+
|
|
36
|
+
## Common mistakes
|
|
37
|
+
|
|
38
|
+
- **Avoid:** Using Toggle as Checkbox, Switch, Button, or a visual tab, or changing its accessible name with state. **Instead:** Select the component matching the interaction and keep Toggle's command name stable.
|
|
39
|
+
|
|
40
|
+
## Validation checklist
|
|
41
|
+
|
|
42
|
+
- Check pointer and keyboard activation, controlled and uncontrolled state, stable naming, disabled state, and complete icon-only names.
|
|
43
|
+
- Check every adopted variant and accent/neutral tone in light, dark, forced colors, narrow layouts, zoom, and RTL.
|
|
44
|
+
|
|
45
|
+
## Related guidance
|
|
46
|
+
|
|
47
|
+
- `@flowstack-ui/atom/agents/toggle`
|
|
48
|
+
- `toggle-group`
|
|
49
|
+
- `toolbar`
|
|
50
|
+
- `button`
|
|
51
|
+
- `checkbox`
|
|
52
|
+
- `switch`
|
|
53
|
+
- `tabs`
|
|
54
|
+
|
|
55
|
+
## Machine record
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"schema": "flowstack.agent-component.v1",
|
|
60
|
+
"id": "toggle",
|
|
61
|
+
"name": "Toggle",
|
|
62
|
+
"package": "@flowstack-ui/brick",
|
|
63
|
+
"layer": "brick",
|
|
64
|
+
"kind": "component",
|
|
65
|
+
"purpose": "Present one persistent pressed or unpressed command with Brick recipes and Atom-owned button behavior.",
|
|
66
|
+
"useWhen": [
|
|
67
|
+
"One command such as Favorite, Pin, Bold, or Show completed needs a persistent pressed state."
|
|
68
|
+
],
|
|
69
|
+
"avoidWhen": [
|
|
70
|
+
{
|
|
71
|
+
"condition": "Related pressed commands need shared selection and arrow navigation.",
|
|
72
|
+
"useInstead": "ToggleGroup"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"condition": "A momentary action, submitted choice, boolean setting, or panel switch is required.",
|
|
76
|
+
"useInstead": "Button, Checkbox, Switch, or Tabs according to the job"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"composition": [
|
|
80
|
+
"Keep one stable visible or accessible name across pressed states; use iconOnly only with a complete accessible name.",
|
|
81
|
+
"Choose variant for the selected-state treatment and accent or neutral tone for its emphasis before applying local customization."
|
|
82
|
+
],
|
|
83
|
+
"rules": [
|
|
84
|
+
{
|
|
85
|
+
"id": "toggle-role",
|
|
86
|
+
"level": "must",
|
|
87
|
+
"statement": "Use Toggle only when the same command meaning remains valid in pressed and unpressed states."
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"id": "toggle-tone",
|
|
91
|
+
"level": "must",
|
|
92
|
+
"statement": "Use accent or neutral tone for selection emphasis; do not use semantic status colors to imply error, success, warning, or danger."
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"id": "toggle-behavior",
|
|
96
|
+
"level": "must",
|
|
97
|
+
"statement": "Preserve Atom-owned native button semantics, aria-pressed state, activation, disabled behavior, and composition."
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"id": "toggle-state",
|
|
101
|
+
"level": "must",
|
|
102
|
+
"statement": "Use pressed with onPressedChange for controlled state or defaultPressed for uncontrolled state, and keep one stable command name across both aria-pressed states."
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"id": "toggle-composition",
|
|
106
|
+
"level": "must",
|
|
107
|
+
"statement": "When using asChild or render, preserve one element with Atom props, handlers, refs, tab stop, Enter and Space activation, button semantics, and disabled exposure."
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"id": "toggle-css",
|
|
111
|
+
"level": "must",
|
|
112
|
+
"statement": "Load styles.css or core.css plus toggle.css."
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"commonMistakes": [
|
|
116
|
+
{
|
|
117
|
+
"mistake": "Using Toggle as Checkbox, Switch, Button, or a visual tab, or changing its accessible name with state.",
|
|
118
|
+
"correction": "Select the component matching the interaction and keep Toggle's command name stable."
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"validation": [
|
|
122
|
+
"Check pointer and keyboard activation, controlled and uncontrolled state, stable naming, disabled state, and complete icon-only names.",
|
|
123
|
+
"Check every adopted variant and accent/neutral tone in light, dark, forced colors, narrow layouts, zoom, and RTL."
|
|
124
|
+
],
|
|
125
|
+
"related": [
|
|
126
|
+
{
|
|
127
|
+
"kind": "package",
|
|
128
|
+
"package": "@flowstack-ui/atom",
|
|
129
|
+
"id": "toggle",
|
|
130
|
+
"versionPolicy": "installed-exact"
|
|
131
|
+
},
|
|
132
|
+
"toggle-group",
|
|
133
|
+
"toolbar",
|
|
134
|
+
"button",
|
|
135
|
+
"checkbox",
|
|
136
|
+
"switch",
|
|
137
|
+
"tabs"
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
```
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Toolbar
|
|
2
|
+
|
|
3
|
+
Source: @flowstack-ui/brick@0.1.11
|
|
4
|
+
Kind: component
|
|
5
|
+
ID: toolbar
|
|
6
|
+
|
|
7
|
+
# Toolbar agent guide
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Style one logical group of related commands with Atom toolbar semantics and roving keyboard focus.
|
|
12
|
+
|
|
13
|
+
## Use when
|
|
14
|
+
|
|
15
|
+
- Related editor or application controls should behave as one horizontal or vertical keyboard group.
|
|
16
|
+
|
|
17
|
+
## Choose something else when
|
|
18
|
+
|
|
19
|
+
- The items are navigation destinations or unrelated standalone actions. Use NavigationMenu/NavList or separate Button and IconButton controls.
|
|
20
|
+
|
|
21
|
+
## Required composition
|
|
22
|
+
|
|
23
|
+
- Compose Button, Link, Separator, and ToggleGroup/ToggleItem parts inside a named Root; configure Toggle selection through its shared variant and accent/neutral tone, and use Brick icons with concise visible or accessible labels.
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- **MUST:** Use Toolbar rather than adding manual arrow-key handlers or role=toolbar to an AppBar row.
|
|
28
|
+
- **MUST:** Define a deliberate narrow-width wrap, scroll, or alternative composition without breaking roving focus order.
|
|
29
|
+
- **MUST:** Configure Toolbar ToggleItems through their ToggleGroup variant and tone; do not replace Toolbar behavior with a standalone ToggleGroup or style Items independently.
|
|
30
|
+
- **MUST:** Treat neutral as non-accent intent and let Toolbar own its layered selected-surface recipe; do not copy a neutral solid Button fill into ToggleItems.
|
|
31
|
+
- **MUST:** Load styles.css or core.css plus toolbar.css and any composed Icon stylesheet.
|
|
32
|
+
|
|
33
|
+
## Common mistakes
|
|
34
|
+
|
|
35
|
+
- **Avoid:** Using AppBar.Toolbar as the behavior owner or placing unrelated page actions in one roving group. **Instead:** Compose a named Toolbar only around logically related controls.
|
|
36
|
+
|
|
37
|
+
## Validation checklist
|
|
38
|
+
|
|
39
|
+
- Test orientation, arrows, disabled items, links, toggles, separators, Tab entry/exit, focus rings, touch targets, overflow, themes, zoom, and RTL.
|
|
40
|
+
- Confirm names and CSS delivery.
|
|
41
|
+
|
|
42
|
+
## Related guidance
|
|
43
|
+
|
|
44
|
+
- `app-bar`
|
|
45
|
+
- `button`
|
|
46
|
+
- `icon-button`
|
|
47
|
+
- `toggle-group`
|
|
48
|
+
- `divider`
|
|
49
|
+
|
|
50
|
+
## Machine record
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"schema": "flowstack.agent-component.v1",
|
|
55
|
+
"id": "toolbar",
|
|
56
|
+
"name": "Toolbar",
|
|
57
|
+
"package": "@flowstack-ui/brick",
|
|
58
|
+
"layer": "brick",
|
|
59
|
+
"kind": "component",
|
|
60
|
+
"purpose": "Style one logical group of related commands with Atom toolbar semantics and roving keyboard focus.",
|
|
61
|
+
"useWhen": [
|
|
62
|
+
"Related editor or application controls should behave as one horizontal or vertical keyboard group."
|
|
63
|
+
],
|
|
64
|
+
"avoidWhen": [
|
|
65
|
+
{
|
|
66
|
+
"condition": "The items are navigation destinations or unrelated standalone actions.",
|
|
67
|
+
"useInstead": "NavigationMenu/NavList or separate Button and IconButton controls"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"composition": [
|
|
71
|
+
"Compose Button, Link, Separator, and ToggleGroup/ToggleItem parts inside a named Root; configure Toggle selection through its shared variant and accent/neutral tone, and use Brick icons with concise visible or accessible labels."
|
|
72
|
+
],
|
|
73
|
+
"rules": [
|
|
74
|
+
{
|
|
75
|
+
"id": "toolbar-owner",
|
|
76
|
+
"level": "must",
|
|
77
|
+
"statement": "Use Toolbar rather than adding manual arrow-key handlers or role=toolbar to an AppBar row."
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"id": "toolbar-overflow",
|
|
81
|
+
"level": "must",
|
|
82
|
+
"statement": "Define a deliberate narrow-width wrap, scroll, or alternative composition without breaking roving focus order."
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "toolbar-toggle-recipes",
|
|
86
|
+
"level": "must",
|
|
87
|
+
"statement": "Configure Toolbar ToggleItems through their ToggleGroup variant and tone; do not replace Toolbar behavior with a standalone ToggleGroup or style Items independently."
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"id": "toolbar-neutral-recipe",
|
|
91
|
+
"level": "must",
|
|
92
|
+
"statement": "Treat neutral as non-accent intent and let Toolbar own its layered selected-surface recipe; do not copy a neutral solid Button fill into ToggleItems."
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"id": "toolbar-css",
|
|
96
|
+
"level": "must",
|
|
97
|
+
"statement": "Load styles.css or core.css plus toolbar.css and any composed Icon stylesheet."
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"commonMistakes": [
|
|
101
|
+
{
|
|
102
|
+
"mistake": "Using AppBar.Toolbar as the behavior owner or placing unrelated page actions in one roving group.",
|
|
103
|
+
"correction": "Compose a named Toolbar only around logically related controls."
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"validation": [
|
|
107
|
+
"Test orientation, arrows, disabled items, links, toggles, separators, Tab entry/exit, focus rings, touch targets, overflow, themes, zoom, and RTL.",
|
|
108
|
+
"Confirm names and CSS delivery."
|
|
109
|
+
],
|
|
110
|
+
"related": [
|
|
111
|
+
"app-bar",
|
|
112
|
+
"button",
|
|
113
|
+
"icon-button",
|
|
114
|
+
"toggle-group",
|
|
115
|
+
"divider"
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
```
|