@flowstack-ui/brick 0.1.3 → 0.1.5
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/README.md +6 -1
- package/dist/agents/app-bar.json +69 -0
- package/dist/agents/app-bar.md +46 -0
- package/dist/agents/bottom-navigation.json +55 -0
- package/dist/agents/bottom-navigation.md +40 -0
- package/dist/agents/breadcrumb.json +48 -0
- package/dist/agents/breadcrumb.md +37 -0
- package/dist/agents/button.json +49 -0
- package/dist/agents/button.md +38 -0
- package/dist/agents/card.json +50 -0
- package/dist/agents/card.md +39 -0
- package/dist/agents/checkbox.json +49 -0
- package/dist/agents/checkbox.md +38 -0
- package/dist/agents/container.json +54 -0
- package/dist/agents/container.md +39 -0
- package/dist/agents/divider.json +54 -0
- package/dist/agents/divider.md +39 -0
- package/dist/agents/drawer.json +76 -0
- package/dist/agents/drawer.md +46 -0
- package/dist/agents/field.json +57 -0
- package/dist/agents/field.md +42 -0
- package/dist/agents/fieldset.json +49 -0
- package/dist/agents/fieldset.md +38 -0
- package/dist/agents/form.json +49 -0
- package/dist/agents/form.md +38 -0
- package/dist/agents/grid.json +57 -0
- package/dist/agents/grid.md +39 -0
- package/dist/agents/hide.json +54 -0
- package/dist/agents/hide.md +39 -0
- package/dist/agents/icon-button.json +54 -0
- package/dist/agents/icon-button.md +39 -0
- package/dist/agents/image.json +59 -0
- package/dist/agents/image.md +40 -0
- package/dist/agents/input.json +48 -0
- package/dist/agents/input.md +37 -0
- package/dist/agents/interface-composition.json +184 -0
- package/dist/agents/interface-composition.md +93 -0
- package/dist/agents/layer-selection.json +107 -0
- package/dist/agents/layer-selection.md +57 -0
- package/dist/agents/link.json +47 -0
- package/dist/agents/link.md +36 -0
- package/dist/agents/manifest.json +207 -0
- package/dist/agents/nav-list.json +65 -0
- package/dist/agents/nav-list.md +42 -0
- package/dist/agents/navigation-menu.json +90 -0
- package/dist/agents/navigation-menu.md +49 -0
- package/dist/agents/pagination.json +48 -0
- package/dist/agents/pagination.md +37 -0
- package/dist/agents/scroll-area.json +54 -0
- package/dist/agents/scroll-area.md +39 -0
- package/dist/agents/show.json +54 -0
- package/dist/agents/show.md +39 -0
- package/dist/agents/sidebar.json +56 -0
- package/dist/agents/sidebar.md +41 -0
- package/dist/agents/skip-link.json +53 -0
- package/dist/agents/skip-link.md +38 -0
- package/dist/agents/stack.json +48 -0
- package/dist/agents/stack.md +37 -0
- package/dist/agents/surface.json +48 -0
- package/dist/agents/surface.md +37 -0
- package/dist/agents/tabs.json +54 -0
- package/dist/agents/tabs.md +39 -0
- package/dist/agents/text.json +65 -0
- package/dist/agents/text.md +42 -0
- package/dist/agents/textarea.json +48 -0
- package/dist/agents/textarea.md +37 -0
- package/dist/agents/toolbar.json +55 -0
- package/dist/agents/toolbar.md +40 -0
- package/dist/components/alert-dialog/AlertDialog.d.ts +7 -0
- package/dist/components/alert-dialog/AlertDialog.d.ts.map +1 -1
- package/dist/components/alert-dialog/AlertDialog.js +2 -2
- package/dist/components/alert-dialog/AlertDialog.js.map +1 -1
- package/dist/components/alert-dialog/index.d.ts +1 -1
- package/dist/components/alert-dialog/index.d.ts.map +1 -1
- package/dist/components/alert-dialog/index.js.map +1 -1
- package/dist/components/button/Button.js +2 -2
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/chip/Chip.js +4 -4
- package/dist/components/chip/Chip.js.map +1 -1
- package/dist/components/dialog/Dialog.d.ts +7 -0
- package/dist/components/dialog/Dialog.d.ts.map +1 -1
- package/dist/components/dialog/Dialog.js +2 -2
- package/dist/components/dialog/Dialog.js.map +1 -1
- package/dist/components/dialog/index.d.ts +1 -1
- package/dist/components/dialog/index.d.ts.map +1 -1
- package/dist/components/dialog/index.js.map +1 -1
- package/dist/components/drawer/Drawer.d.ts +8 -1
- package/dist/components/drawer/Drawer.d.ts.map +1 -1
- package/dist/components/drawer/Drawer.js +3 -2
- package/dist/components/drawer/Drawer.js.map +1 -1
- package/dist/components/drawer/index.d.ts +1 -1
- package/dist/components/drawer/index.d.ts.map +1 -1
- package/dist/components/drawer/index.js.map +1 -1
- package/dist/components/grid/Grid.d.ts +9 -2
- package/dist/components/grid/Grid.d.ts.map +1 -1
- package/dist/components/grid/Grid.js +51 -4
- package/dist/components/grid/Grid.js.map +1 -1
- package/dist/components/icon-button/IconButton.js +2 -2
- package/dist/components/icon-button/IconButton.js.map +1 -1
- package/dist/components/navigation-menu/NavigationMenu.d.ts +6 -3
- package/dist/components/navigation-menu/NavigationMenu.d.ts.map +1 -1
- package/dist/components/navigation-menu/NavigationMenu.js +2 -2
- package/dist/components/navigation-menu/NavigationMenu.js.map +1 -1
- package/dist/components/navigation-menu/index.d.ts +1 -1
- package/dist/components/navigation-menu/index.d.ts.map +1 -1
- package/dist/components/navigation-menu/index.js.map +1 -1
- package/dist/components/text/Text.d.ts +1 -1
- package/dist/components/text/Text.d.ts.map +1 -1
- package/dist/components/text/Text.js.map +1 -1
- package/dist/drawer.d.ts +1 -0
- package/dist/drawer.d.ts.map +1 -1
- package/dist/drawer.js +1 -0
- package/dist/drawer.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/navigation-menu.d.ts +1 -0
- package/dist/navigation-menu.d.ts.map +1 -1
- package/dist/navigation-menu.js +1 -0
- package/dist/navigation-menu.js.map +1 -1
- package/dist/styles/alert-dialog.css +1 -1
- package/dist/styles/alert-dialog.css.map +1 -1
- package/dist/styles/badge.css +1 -1
- package/dist/styles/badge.css.map +1 -1
- package/dist/styles/code-block.css.map +1 -1
- package/dist/styles/context-menu.css.map +1 -1
- package/dist/styles/core.css +1 -1
- package/dist/styles/core.css.map +1 -1
- package/dist/styles/dialog.css +1 -1
- package/dist/styles/dialog.css.map +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/drawer.css.map +1 -1
- package/dist/styles/dropdown-menu.css.map +1 -1
- package/dist/styles/nav-list.css +1 -1
- package/dist/styles/nav-list.css.map +1 -1
- package/dist/styles/navigation-menu.css +1 -1
- package/dist/styles/navigation-menu.css.map +1 -1
- package/dist/styles/sidebar.css.map +1 -1
- package/dist/styles/text.css +1 -1
- package/dist/styles/text.css.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/dist/tokens.css +1 -1
- package/dist/tokens.css.map +1 -1
- package/docs/guides/agent-knowledge.md +44 -0
- package/docs/guides/appearance-and-tokens.md +6 -0
- package/docs/guides/installation.md +11 -6
- package/package.json +11 -5
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "flowstack.agent-guide.v1",
|
|
3
|
+
"id": "layer-selection",
|
|
4
|
+
"name": "Brick layer selection",
|
|
5
|
+
"package": "@flowstack-ui/brick",
|
|
6
|
+
"layer": "brick",
|
|
7
|
+
"kind": "guide",
|
|
8
|
+
"purpose": "Choose the correct FLOWSTACK layer and require Brick-first composition when building a finished interface with Brick.",
|
|
9
|
+
"decisionOrder": [
|
|
10
|
+
"Describe the interface job and semantic relationship before choosing markup or appearance.",
|
|
11
|
+
"Search Brick's package guides and component manifest for a component that owns the job.",
|
|
12
|
+
"Use Brick public components for finished interface structure, controls, navigation, content, media, responsive visibility, and visual surfaces.",
|
|
13
|
+
"Let Brick consume Atom; do not import Atom directly in an ordinary Brick application.",
|
|
14
|
+
"Keep purposeful sections in Blocks, page arrangements in Blueprints, theme values in a Theme, and business behavior in the application."
|
|
15
|
+
],
|
|
16
|
+
"selection": [
|
|
17
|
+
{
|
|
18
|
+
"intent": "text with Brick typography",
|
|
19
|
+
"use": "Text",
|
|
20
|
+
"note": "Choose the semantic rendered element through its public API."
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"intent": "one-dimensional alignment",
|
|
24
|
+
"use": "Stack, HStack, or VStack",
|
|
25
|
+
"note": "Use Grid for two-dimensional track relationships."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"intent": "bounded page width",
|
|
29
|
+
"use": "Container",
|
|
30
|
+
"note": "Use Surface or Card when the region also needs a visual boundary."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"intent": "top application or page bar",
|
|
34
|
+
"use": "AppBar",
|
|
35
|
+
"note": "Compose navigation and action components inside its sections."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"intent": "responsive presence",
|
|
39
|
+
"use": "Show or Hide",
|
|
40
|
+
"note": "Use CSS media visibility rather than rendering two JavaScript-controlled trees."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"intent": "image with resilient loading",
|
|
44
|
+
"use": "Image",
|
|
45
|
+
"note": "Use an adapter only when a framework image optimizer provides a measured capability Brick lacks."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"intent": "navigation destination",
|
|
49
|
+
"use": "Link or Button with href",
|
|
50
|
+
"note": "Use Link for ordinary navigation and Button only for an emphasized destination."
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"rules": [
|
|
54
|
+
{
|
|
55
|
+
"id": "brick-first",
|
|
56
|
+
"level": "must",
|
|
57
|
+
"statement": "Use an existing Brick component when it owns the interface job instead of recreating it with native elements and application CSS."
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"id": "brick-no-direct-atom",
|
|
61
|
+
"level": "must",
|
|
62
|
+
"statement": "Do not import @flowstack-ui/atom directly in an application that has selected Brick; report a Brick gap if the finished component is missing."
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"id": "brick-css-contract",
|
|
66
|
+
"level": "must",
|
|
67
|
+
"statement": "Load styles.css once, or core.css once plus every rendered component's modular stylesheet; never mix the two delivery modes."
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"id": "brick-semantic-choice",
|
|
71
|
+
"level": "must",
|
|
72
|
+
"statement": "Choose components by semantic and interaction intent rather than by visual resemblance."
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": "brick-customization-contract",
|
|
76
|
+
"level": "must",
|
|
77
|
+
"statement": "After selecting a Brick owner, follow interface-composition's ordered prop, semantic-token, component-token, public-part, and stable-hook customization contract."
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"id": "brick-report-fallback",
|
|
81
|
+
"level": "should",
|
|
82
|
+
"statement": "Record intentional native or framework fallbacks with the searched Brick component and missing capability."
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"nativeFallback": {
|
|
86
|
+
"check": "Search the Brick manifest, package guide selection map, component docs, and public exports before writing native markup or replacement CSS.",
|
|
87
|
+
"use": "Use semantic native HTML only for document or application structure Brick does not own, or through a documented adapter when a framework supplies a required measured capability.",
|
|
88
|
+
"report": "Record the fallback as a Brick gap, adapter need, higher-layer composition, or intentional application-owned element before continuing."
|
|
89
|
+
},
|
|
90
|
+
"validation": [
|
|
91
|
+
"List every native layout, text, image, navigation, and interactive element and name why Brick does not own it; list every direct Brick stable-hook declaration and its completed customization gap report.",
|
|
92
|
+
"Confirm there are no direct @flowstack-ui/atom imports.",
|
|
93
|
+
"Confirm every rendered Brick component has its required modular CSS or the complete stylesheet is loaded once.",
|
|
94
|
+
"Classify each repeated composition as component, theme, Block, Blueprint, adapter, or application ownership."
|
|
95
|
+
],
|
|
96
|
+
"related": [
|
|
97
|
+
"interface-composition",
|
|
98
|
+
"app-bar",
|
|
99
|
+
"container",
|
|
100
|
+
"stack",
|
|
101
|
+
"grid",
|
|
102
|
+
"text",
|
|
103
|
+
"image",
|
|
104
|
+
"show",
|
|
105
|
+
"hide"
|
|
106
|
+
]
|
|
107
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Brick layer selection
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Choose the correct FLOWSTACK layer and require Brick-first composition when building a finished interface with Brick.
|
|
6
|
+
|
|
7
|
+
## Decision order
|
|
8
|
+
|
|
9
|
+
1. Describe the interface job and semantic relationship before choosing markup or appearance.
|
|
10
|
+
2. Search Brick's package guides and component manifest for a component that owns the job.
|
|
11
|
+
3. Use Brick public components for finished interface structure, controls, navigation, content, media, responsive visibility, and visual surfaces.
|
|
12
|
+
4. Let Brick consume Atom; do not import Atom directly in an ordinary Brick application.
|
|
13
|
+
5. Keep purposeful sections in Blocks, page arrangements in Blueprints, theme values in a Theme, and business behavior in the application.
|
|
14
|
+
|
|
15
|
+
## Selection map
|
|
16
|
+
|
|
17
|
+
- **text with Brick typography:** use Text. Choose the semantic rendered element through its public API.
|
|
18
|
+
- **one-dimensional alignment:** use Stack, HStack, or VStack. Use Grid for two-dimensional track relationships.
|
|
19
|
+
- **bounded page width:** use Container. Use Surface or Card when the region also needs a visual boundary.
|
|
20
|
+
- **top application or page bar:** use AppBar. Compose navigation and action components inside its sections.
|
|
21
|
+
- **responsive presence:** use Show or Hide. Use CSS media visibility rather than rendering two JavaScript-controlled trees.
|
|
22
|
+
- **image with resilient loading:** use Image. Use an adapter only when a framework image optimizer provides a measured capability Brick lacks.
|
|
23
|
+
- **navigation destination:** use Link or Button with href. Use Link for ordinary navigation and Button only for an emphasized destination.
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- **MUST:** Use an existing Brick component when it owns the interface job instead of recreating it with native elements and application CSS.
|
|
28
|
+
- **MUST:** Do not import @flowstack-ui/atom directly in an application that has selected Brick; report a Brick gap if the finished component is missing.
|
|
29
|
+
- **MUST:** Load styles.css once, or core.css once plus every rendered component's modular stylesheet; never mix the two delivery modes.
|
|
30
|
+
- **MUST:** Choose components by semantic and interaction intent rather than by visual resemblance.
|
|
31
|
+
- **MUST:** After selecting a Brick owner, follow interface-composition's ordered prop, semantic-token, component-token, public-part, and stable-hook customization contract.
|
|
32
|
+
- **SHOULD:** Record intentional native or framework fallbacks with the searched Brick component and missing capability.
|
|
33
|
+
|
|
34
|
+
## Native fallback
|
|
35
|
+
|
|
36
|
+
1. Search the Brick manifest, package guide selection map, component docs, and public exports before writing native markup or replacement CSS.
|
|
37
|
+
2. Use semantic native HTML only for document or application structure Brick does not own, or through a documented adapter when a framework supplies a required measured capability.
|
|
38
|
+
3. Record the fallback as a Brick gap, adapter need, higher-layer composition, or intentional application-owned element before continuing.
|
|
39
|
+
|
|
40
|
+
## Validation checklist
|
|
41
|
+
|
|
42
|
+
- List every native layout, text, image, navigation, and interactive element and name why Brick does not own it; list every direct Brick stable-hook declaration and its completed customization gap report.
|
|
43
|
+
- Confirm there are no direct @flowstack-ui/atom imports.
|
|
44
|
+
- Confirm every rendered Brick component has its required modular CSS or the complete stylesheet is loaded once.
|
|
45
|
+
- Classify each repeated composition as component, theme, Block, Blueprint, adapter, or application ownership.
|
|
46
|
+
|
|
47
|
+
## Related guidance
|
|
48
|
+
|
|
49
|
+
- `interface-composition`
|
|
50
|
+
- `app-bar`
|
|
51
|
+
- `container`
|
|
52
|
+
- `stack`
|
|
53
|
+
- `grid`
|
|
54
|
+
- `text`
|
|
55
|
+
- `image`
|
|
56
|
+
- `show`
|
|
57
|
+
- `hide`
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "flowstack.agent-component.v1",
|
|
3
|
+
"id": "link",
|
|
4
|
+
"name": "Link",
|
|
5
|
+
"package": "@flowstack-ui/brick",
|
|
6
|
+
"layer": "brick",
|
|
7
|
+
"kind": "component",
|
|
8
|
+
"purpose": "Render finished native navigation as inline, standalone, or button-like content without changing its link semantics.",
|
|
9
|
+
"useWhen": [
|
|
10
|
+
"The user moves to a route, URL, document, download, email address, or telephone destination."
|
|
11
|
+
],
|
|
12
|
+
"avoidWhen": [
|
|
13
|
+
{
|
|
14
|
+
"condition": "The interaction changes current state without navigating.",
|
|
15
|
+
"useInstead": "Button"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"composition": [
|
|
19
|
+
"Provide a real href or compose a router-owned anchor, then choose a visual variant independently from navigation semantics."
|
|
20
|
+
],
|
|
21
|
+
"rules": [
|
|
22
|
+
{
|
|
23
|
+
"id": "link-destination",
|
|
24
|
+
"level": "must",
|
|
25
|
+
"statement": "Preserve anchor semantics and a real destination even when the link looks like a button."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "link-css",
|
|
29
|
+
"level": "must",
|
|
30
|
+
"statement": "Load styles.css or core.css plus link.css."
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"commonMistakes": [
|
|
34
|
+
{
|
|
35
|
+
"mistake": "Replacing a destination with Button because the design is prominent.",
|
|
36
|
+
"correction": "Use Link and select the appropriate Brick variant."
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"validation": [
|
|
40
|
+
"Inspect href and accessible name.",
|
|
41
|
+
"Test focus, Enter navigation, visited/external behavior when relevant, and contrast."
|
|
42
|
+
],
|
|
43
|
+
"related": [
|
|
44
|
+
"@flowstack-ui/atom/agents/link",
|
|
45
|
+
"button"
|
|
46
|
+
]
|
|
47
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Link agent guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Render finished native navigation as inline, standalone, or button-like content without changing its link semantics.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
- The user moves to a route, URL, document, download, email address, or telephone destination.
|
|
10
|
+
|
|
11
|
+
## Choose something else when
|
|
12
|
+
|
|
13
|
+
- The interaction changes current state without navigating. Use Button.
|
|
14
|
+
|
|
15
|
+
## Required composition
|
|
16
|
+
|
|
17
|
+
- Provide a real href or compose a router-owned anchor, then choose a visual variant independently from navigation semantics.
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- **MUST:** Preserve anchor semantics and a real destination even when the link looks like a button.
|
|
22
|
+
- **MUST:** Load styles.css or core.css plus link.css.
|
|
23
|
+
|
|
24
|
+
## Common mistakes
|
|
25
|
+
|
|
26
|
+
- **Avoid:** Replacing a destination with Button because the design is prominent. **Instead:** Use Link and select the appropriate Brick variant.
|
|
27
|
+
|
|
28
|
+
## Validation checklist
|
|
29
|
+
|
|
30
|
+
- Inspect href and accessible name.
|
|
31
|
+
- Test focus, Enter navigation, visited/external behavior when relevant, and contrast.
|
|
32
|
+
|
|
33
|
+
## Related guidance
|
|
34
|
+
|
|
35
|
+
- `@flowstack-ui/atom/agents/link`
|
|
36
|
+
- `button`
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "flowstack.agent-manifest.v1",
|
|
3
|
+
"package": "@flowstack-ui/brick",
|
|
4
|
+
"packageVersion": "0.1.5",
|
|
5
|
+
"components": [
|
|
6
|
+
{
|
|
7
|
+
"id": "app-bar",
|
|
8
|
+
"name": "AppBar",
|
|
9
|
+
"json": "./app-bar.json",
|
|
10
|
+
"markdown": "./app-bar.md"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"id": "bottom-navigation",
|
|
14
|
+
"name": "BottomNavigation",
|
|
15
|
+
"json": "./bottom-navigation.json",
|
|
16
|
+
"markdown": "./bottom-navigation.md"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "breadcrumb",
|
|
20
|
+
"name": "Breadcrumb",
|
|
21
|
+
"json": "./breadcrumb.json",
|
|
22
|
+
"markdown": "./breadcrumb.md"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": "button",
|
|
26
|
+
"name": "Button",
|
|
27
|
+
"json": "./button.json",
|
|
28
|
+
"markdown": "./button.md"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"id": "card",
|
|
32
|
+
"name": "Card",
|
|
33
|
+
"json": "./card.json",
|
|
34
|
+
"markdown": "./card.md"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "checkbox",
|
|
38
|
+
"name": "Checkbox",
|
|
39
|
+
"json": "./checkbox.json",
|
|
40
|
+
"markdown": "./checkbox.md"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "container",
|
|
44
|
+
"name": "Container",
|
|
45
|
+
"json": "./container.json",
|
|
46
|
+
"markdown": "./container.md"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"id": "divider",
|
|
50
|
+
"name": "Divider",
|
|
51
|
+
"json": "./divider.json",
|
|
52
|
+
"markdown": "./divider.md"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"id": "drawer",
|
|
56
|
+
"name": "Drawer",
|
|
57
|
+
"json": "./drawer.json",
|
|
58
|
+
"markdown": "./drawer.md"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"id": "field",
|
|
62
|
+
"name": "Field",
|
|
63
|
+
"json": "./field.json",
|
|
64
|
+
"markdown": "./field.md"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"id": "fieldset",
|
|
68
|
+
"name": "Fieldset",
|
|
69
|
+
"json": "./fieldset.json",
|
|
70
|
+
"markdown": "./fieldset.md"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": "form",
|
|
74
|
+
"name": "Form",
|
|
75
|
+
"json": "./form.json",
|
|
76
|
+
"markdown": "./form.md"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"id": "grid",
|
|
80
|
+
"name": "Grid",
|
|
81
|
+
"json": "./grid.json",
|
|
82
|
+
"markdown": "./grid.md"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "hide",
|
|
86
|
+
"name": "Hide",
|
|
87
|
+
"json": "./hide.json",
|
|
88
|
+
"markdown": "./hide.md"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"id": "icon-button",
|
|
92
|
+
"name": "IconButton",
|
|
93
|
+
"json": "./icon-button.json",
|
|
94
|
+
"markdown": "./icon-button.md"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"id": "image",
|
|
98
|
+
"name": "Image",
|
|
99
|
+
"json": "./image.json",
|
|
100
|
+
"markdown": "./image.md"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"id": "input",
|
|
104
|
+
"name": "Input",
|
|
105
|
+
"json": "./input.json",
|
|
106
|
+
"markdown": "./input.md"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"id": "link",
|
|
110
|
+
"name": "Link",
|
|
111
|
+
"json": "./link.json",
|
|
112
|
+
"markdown": "./link.md"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"id": "nav-list",
|
|
116
|
+
"name": "NavList",
|
|
117
|
+
"json": "./nav-list.json",
|
|
118
|
+
"markdown": "./nav-list.md"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"id": "navigation-menu",
|
|
122
|
+
"name": "NavigationMenu",
|
|
123
|
+
"json": "./navigation-menu.json",
|
|
124
|
+
"markdown": "./navigation-menu.md"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"id": "pagination",
|
|
128
|
+
"name": "Pagination",
|
|
129
|
+
"json": "./pagination.json",
|
|
130
|
+
"markdown": "./pagination.md"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"id": "scroll-area",
|
|
134
|
+
"name": "ScrollArea",
|
|
135
|
+
"json": "./scroll-area.json",
|
|
136
|
+
"markdown": "./scroll-area.md"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"id": "show",
|
|
140
|
+
"name": "Show",
|
|
141
|
+
"json": "./show.json",
|
|
142
|
+
"markdown": "./show.md"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"id": "sidebar",
|
|
146
|
+
"name": "Sidebar",
|
|
147
|
+
"json": "./sidebar.json",
|
|
148
|
+
"markdown": "./sidebar.md"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"id": "skip-link",
|
|
152
|
+
"name": "SkipLink",
|
|
153
|
+
"json": "./skip-link.json",
|
|
154
|
+
"markdown": "./skip-link.md"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"id": "stack",
|
|
158
|
+
"name": "Stack",
|
|
159
|
+
"json": "./stack.json",
|
|
160
|
+
"markdown": "./stack.md"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"id": "surface",
|
|
164
|
+
"name": "Surface",
|
|
165
|
+
"json": "./surface.json",
|
|
166
|
+
"markdown": "./surface.md"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"id": "tabs",
|
|
170
|
+
"name": "Tabs",
|
|
171
|
+
"json": "./tabs.json",
|
|
172
|
+
"markdown": "./tabs.md"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"id": "text",
|
|
176
|
+
"name": "Text",
|
|
177
|
+
"json": "./text.json",
|
|
178
|
+
"markdown": "./text.md"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"id": "textarea",
|
|
182
|
+
"name": "Textarea",
|
|
183
|
+
"json": "./textarea.json",
|
|
184
|
+
"markdown": "./textarea.md"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"id": "toolbar",
|
|
188
|
+
"name": "Toolbar",
|
|
189
|
+
"json": "./toolbar.json",
|
|
190
|
+
"markdown": "./toolbar.md"
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
"guides": [
|
|
194
|
+
{
|
|
195
|
+
"id": "interface-composition",
|
|
196
|
+
"name": "Brick interface composition",
|
|
197
|
+
"json": "./interface-composition.json",
|
|
198
|
+
"markdown": "./interface-composition.md"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"id": "layer-selection",
|
|
202
|
+
"name": "Brick layer selection",
|
|
203
|
+
"json": "./layer-selection.json",
|
|
204
|
+
"markdown": "./layer-selection.md"
|
|
205
|
+
}
|
|
206
|
+
]
|
|
207
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "flowstack.agent-component.v1",
|
|
3
|
+
"id": "nav-list",
|
|
4
|
+
"name": "NavList",
|
|
5
|
+
"package": "@flowstack-ui/brick",
|
|
6
|
+
"layer": "brick",
|
|
7
|
+
"kind": "component",
|
|
8
|
+
"purpose": "Style persistent route navigation with current state, optional section labels, and collapsible grouped content.",
|
|
9
|
+
"useWhen": [
|
|
10
|
+
"A sidebar, drawer, rail, or page region contains a persistent list of destinations, optionally grouped."
|
|
11
|
+
],
|
|
12
|
+
"avoidWhen": [
|
|
13
|
+
{
|
|
14
|
+
"condition": "Navigation uses top-bar disclosure panels or local tab panels.",
|
|
15
|
+
"useInstead": "NavigationMenu or Tabs"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"composition": [
|
|
19
|
+
"Compose Root > List > Item > Link; use SectionLabel for static groups and add SectionTrigger plus SectionContent only for real collapsible groups. When repeated rows need Dividers, each Item owns its complete row or collapsible Section before the following boundary."
|
|
20
|
+
],
|
|
21
|
+
"rules": [
|
|
22
|
+
{
|
|
23
|
+
"id": "nav-list-current",
|
|
24
|
+
"level": "must",
|
|
25
|
+
"statement": "Set current destination state from the route and keep route items as links."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "nav-list-layout",
|
|
29
|
+
"level": "must",
|
|
30
|
+
"statement": "Use NavList's section and item anatomy rather than rebuilding rows, badges, icons, and collapse behavior with arbitrary divs."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "nav-list-group-boundary",
|
|
34
|
+
"level": "must",
|
|
35
|
+
"statement": "Place a Divider after the complete navigation item or collapsible section it separates; never place it between a SectionTrigger and the SectionContent that trigger controls, and keep repeated boundaries under one consistent layout owner."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "nav-list-shell-alignment",
|
|
39
|
+
"level": "must",
|
|
40
|
+
"statement": "Use the logical row-padding tokens when labels and trailing artwork need independent alignment with a surrounding shell; do not shift indicators with margins or transforms."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "nav-list-css",
|
|
44
|
+
"level": "must",
|
|
45
|
+
"statement": "Load styles.css or core.css plus nav-list.css."
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"commonMistakes": [
|
|
49
|
+
{
|
|
50
|
+
"mistake": "Using buttons for routes, adding a collapsible trigger that controls no content, placing a Divider between a trigger and its controlled destinations, or moving disclosure indicators with positional CSS.",
|
|
51
|
+
"correction": "Use Link for destinations, SectionLabel alone for static groups, keep a collapsible Section intact before its boundary, and use the logical row-padding tokens for shell alignment."
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"validation": [
|
|
55
|
+
"Check current, hover, focus, collapsed, expanded, complete-group divider placement, long labels, icons, counts, zoom, narrow widths, and RTL.",
|
|
56
|
+
"Confirm links and section relationships remain semantic and CSS is loaded."
|
|
57
|
+
],
|
|
58
|
+
"related": [
|
|
59
|
+
"sidebar",
|
|
60
|
+
"drawer",
|
|
61
|
+
"navigation-menu",
|
|
62
|
+
"link",
|
|
63
|
+
"divider"
|
|
64
|
+
]
|
|
65
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# NavList agent guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Style persistent route navigation with current state, optional section labels, and collapsible grouped content.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
- A sidebar, drawer, rail, or page region contains a persistent list of destinations, optionally grouped.
|
|
10
|
+
|
|
11
|
+
## Choose something else when
|
|
12
|
+
|
|
13
|
+
- Navigation uses top-bar disclosure panels or local tab panels. Use NavigationMenu or Tabs.
|
|
14
|
+
|
|
15
|
+
## Required composition
|
|
16
|
+
|
|
17
|
+
- Compose Root > List > Item > Link; use SectionLabel for static groups and add SectionTrigger plus SectionContent only for real collapsible groups. When repeated rows need Dividers, each Item owns its complete row or collapsible Section before the following boundary.
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- **MUST:** Set current destination state from the route and keep route items as links.
|
|
22
|
+
- **MUST:** Use NavList's section and item anatomy rather than rebuilding rows, badges, icons, and collapse behavior with arbitrary divs.
|
|
23
|
+
- **MUST:** Place a Divider after the complete navigation item or collapsible section it separates; never place it between a SectionTrigger and the SectionContent that trigger controls, and keep repeated boundaries under one consistent layout owner.
|
|
24
|
+
- **MUST:** Use the logical row-padding tokens when labels and trailing artwork need independent alignment with a surrounding shell; do not shift indicators with margins or transforms.
|
|
25
|
+
- **MUST:** Load styles.css or core.css plus nav-list.css.
|
|
26
|
+
|
|
27
|
+
## Common mistakes
|
|
28
|
+
|
|
29
|
+
- **Avoid:** Using buttons for routes, adding a collapsible trigger that controls no content, placing a Divider between a trigger and its controlled destinations, or moving disclosure indicators with positional CSS. **Instead:** Use Link for destinations, SectionLabel alone for static groups, keep a collapsible Section intact before its boundary, and use the logical row-padding tokens for shell alignment.
|
|
30
|
+
|
|
31
|
+
## Validation checklist
|
|
32
|
+
|
|
33
|
+
- Check current, hover, focus, collapsed, expanded, complete-group divider placement, long labels, icons, counts, zoom, narrow widths, and RTL.
|
|
34
|
+
- Confirm links and section relationships remain semantic and CSS is loaded.
|
|
35
|
+
|
|
36
|
+
## Related guidance
|
|
37
|
+
|
|
38
|
+
- `sidebar`
|
|
39
|
+
- `drawer`
|
|
40
|
+
- `navigation-menu`
|
|
41
|
+
- `link`
|
|
42
|
+
- `divider`
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "flowstack.agent-component.v1",
|
|
3
|
+
"id": "navigation-menu",
|
|
4
|
+
"name": "NavigationMenu",
|
|
5
|
+
"package": "@flowstack-ui/brick",
|
|
6
|
+
"layer": "brick",
|
|
7
|
+
"kind": "component",
|
|
8
|
+
"purpose": "Present polished disclosure navigation while Atom owns trigger geometry, viewport positioning, focus, keyboard, pointer, and dismissal behavior.",
|
|
9
|
+
"useWhen": [
|
|
10
|
+
"A top-level site or product navigation combines direct links with disclosure panels of related destinations."
|
|
11
|
+
],
|
|
12
|
+
"avoidWhen": [
|
|
13
|
+
{
|
|
14
|
+
"condition": "The content is an action menu, persistent route rail, mobile drawer, or tab switcher.",
|
|
15
|
+
"useInstead": "DropdownMenu, NavList, Drawer, or Tabs"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"composition": [
|
|
19
|
+
"Compose Root > List > Item containing Link or Trigger plus Content, with Viewport and optional Indicator/Arrow according to the documented anatomy; lay out content with Brick components."
|
|
20
|
+
],
|
|
21
|
+
"rules": [
|
|
22
|
+
{
|
|
23
|
+
"id": "navigation-menu-positioning",
|
|
24
|
+
"level": "must",
|
|
25
|
+
"statement": "Keep Indicator and Viewport inside the Root-owned coordinate system and let Atom's measured trigger and viewport geometry position them; use documented NavigationMenu tokens and public parts for visual customization."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "navigation-menu-horizontal-position",
|
|
29
|
+
"level": "must",
|
|
30
|
+
"statement": "Let the horizontal Viewport use Atom's active-trigger-centered, collision-aware position; do not re-center it on the full Navigation Menu list or page header."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "navigation-menu-public-api",
|
|
34
|
+
"level": "must",
|
|
35
|
+
"statement": "Do not invent overlay props such as side, align, sideOffset, or alignOffset; NavigationMenu does not expose the floating-overlay positioning API."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "navigation-menu-destinations",
|
|
39
|
+
"level": "must",
|
|
40
|
+
"statement": "Keep contents focused on navigation destinations rather than commands or unrelated marketing panels."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "navigation-menu-panel-link",
|
|
44
|
+
"level": "must",
|
|
45
|
+
"statement": "Use Link variant=panel with one direct Surface child when one rich destination should own the complete clickable area; let Surface own inset, radius, border, elevation, and background, and keep all composed children non-interactive and concise."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "navigation-menu-panel-focus",
|
|
49
|
+
"level": "must",
|
|
50
|
+
"statement": "Preserve the panel Link's focus fallback; with a direct Surface the ring follows that Surface, and without one the Link itself must remain visibly focused."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"id": "navigation-menu-rsc-import",
|
|
54
|
+
"level": "must",
|
|
55
|
+
"statement": "In React Server Components, import the component subpath as import * as NavigationMenu from @flowstack-ui/brick/navigation-menu; use the legacy root-package runtime object only inside a client-owned module."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"id": "navigation-menu-css",
|
|
59
|
+
"level": "must",
|
|
60
|
+
"statement": "Load styles.css or core.css plus navigation-menu.css and every child component stylesheet."
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"commonMistakes": [
|
|
64
|
+
{
|
|
65
|
+
"mistake": "Anchoring the panel or arrow to the logo/page, adding custom hover state that fights Atom, or applying Popover-style offset props that NavigationMenu does not own.",
|
|
66
|
+
"correction": "Keep Viewport and Indicator under Root, let NavigationMenu own geometry and open state, then customize documented recipes, tokens, and public parts."
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"mistake": "Adding use client to an entire Next page only to dereference the legacy NavigationMenu runtime object.",
|
|
70
|
+
"correction": "Use the RSC-safe module-namespace subpath so only the interactive Navigation Menu parts remain client-owned."
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"mistake": "Placing a small link inside a separately clickable-looking Surface, styling NavigationMenu.Link as a duplicate Surface, or nesting a Link or Button inside NavigationMenu.Link.",
|
|
74
|
+
"correction": "Wrap one direct Surface child with the panel Link so the anchor owns interaction and Surface owns container paint and geometry."
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"validation": [
|
|
78
|
+
"Test hover, click, focus, arrow keys, Escape, outside interaction, links, viewport transitions, active-trigger centering, boundary collision, arrow alignment, zoom, narrow widths, and RTL.",
|
|
79
|
+
"Confirm destination semantics, Root-relative geometry, panel focus fallback, documented customization hooks, and CSS delivery.",
|
|
80
|
+
"In a React Server Component consumer, confirm the module-namespace form passes a production prerender without promoting the page to use client."
|
|
81
|
+
],
|
|
82
|
+
"related": [
|
|
83
|
+
"app-bar",
|
|
84
|
+
"nav-list",
|
|
85
|
+
"drawer",
|
|
86
|
+
"dropdown-menu",
|
|
87
|
+
"link",
|
|
88
|
+
"interface-composition"
|
|
89
|
+
]
|
|
90
|
+
}
|