@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,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "flowstack.agent-component.v1",
|
|
3
|
+
"id": "hide",
|
|
4
|
+
"name": "Hide",
|
|
5
|
+
"package": "@flowstack-ui/brick",
|
|
6
|
+
"layer": "brick",
|
|
7
|
+
"kind": "component",
|
|
8
|
+
"purpose": "Hide content through Brick's CSS breakpoint contract without JavaScript viewport state or hydration flicker.",
|
|
9
|
+
"useWhen": [
|
|
10
|
+
"One composition should be absent at selected Brick breakpoints while remaining present elsewhere."
|
|
11
|
+
],
|
|
12
|
+
"avoidWhen": [
|
|
13
|
+
{
|
|
14
|
+
"condition": "Content should be visually hidden but remain available to assistive technology, or should not render for business reasons.",
|
|
15
|
+
"useInstead": "VisuallyHidden or application conditional rendering"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"composition": [
|
|
19
|
+
"Wrap the smallest complete region whose presence changes; pair with Show only when desktop and mobile genuinely need distinct compositions."
|
|
20
|
+
],
|
|
21
|
+
"rules": [
|
|
22
|
+
{
|
|
23
|
+
"id": "hide-css-breakpoint",
|
|
24
|
+
"level": "must",
|
|
25
|
+
"statement": "Use Hide instead of JavaScript matchMedia for first-paint responsive visibility."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "hide-no-semantic-loss",
|
|
29
|
+
"level": "must",
|
|
30
|
+
"statement": "Do not hide the only accessible name, error, instruction, or required content at a breakpoint."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "hide-css",
|
|
34
|
+
"level": "must",
|
|
35
|
+
"statement": "Load styles.css or core.css plus hide.css."
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"commonMistakes": [
|
|
39
|
+
{
|
|
40
|
+
"mistake": "Using Hide without its modular CSS or duplicating two interactive trees with conflicting IDs.",
|
|
41
|
+
"correction": "Load hide.css and verify alternate compositions have independent valid relationships."
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"validation": [
|
|
45
|
+
"Test boundary pixels, zoom, first paint, hydration, focus order, and duplicate IDs across all visibility states.",
|
|
46
|
+
"Confirm CSS is loaded."
|
|
47
|
+
],
|
|
48
|
+
"related": [
|
|
49
|
+
"show",
|
|
50
|
+
"visually-hidden",
|
|
51
|
+
"app-bar",
|
|
52
|
+
"drawer"
|
|
53
|
+
]
|
|
54
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Hide agent guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Hide content through Brick's CSS breakpoint contract without JavaScript viewport state or hydration flicker.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
- One composition should be absent at selected Brick breakpoints while remaining present elsewhere.
|
|
10
|
+
|
|
11
|
+
## Choose something else when
|
|
12
|
+
|
|
13
|
+
- Content should be visually hidden but remain available to assistive technology, or should not render for business reasons. Use VisuallyHidden or application conditional rendering.
|
|
14
|
+
|
|
15
|
+
## Required composition
|
|
16
|
+
|
|
17
|
+
- Wrap the smallest complete region whose presence changes; pair with Show only when desktop and mobile genuinely need distinct compositions.
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- **MUST:** Use Hide instead of JavaScript matchMedia for first-paint responsive visibility.
|
|
22
|
+
- **MUST:** Do not hide the only accessible name, error, instruction, or required content at a breakpoint.
|
|
23
|
+
- **MUST:** Load styles.css or core.css plus hide.css.
|
|
24
|
+
|
|
25
|
+
## Common mistakes
|
|
26
|
+
|
|
27
|
+
- **Avoid:** Using Hide without its modular CSS or duplicating two interactive trees with conflicting IDs. **Instead:** Load hide.css and verify alternate compositions have independent valid relationships.
|
|
28
|
+
|
|
29
|
+
## Validation checklist
|
|
30
|
+
|
|
31
|
+
- Test boundary pixels, zoom, first paint, hydration, focus order, and duplicate IDs across all visibility states.
|
|
32
|
+
- Confirm CSS is loaded.
|
|
33
|
+
|
|
34
|
+
## Related guidance
|
|
35
|
+
|
|
36
|
+
- `show`
|
|
37
|
+
- `visually-hidden`
|
|
38
|
+
- `app-bar`
|
|
39
|
+
- `drawer`
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "flowstack.agent-component.v1",
|
|
3
|
+
"id": "icon-button",
|
|
4
|
+
"name": "IconButton",
|
|
5
|
+
"package": "@flowstack-ui/brick",
|
|
6
|
+
"layer": "brick",
|
|
7
|
+
"kind": "component",
|
|
8
|
+
"purpose": "Provide a compact finished action control for a single recognizable icon with an explicit accessible name.",
|
|
9
|
+
"useWhen": [
|
|
10
|
+
"A familiar icon represents one action and visible button text would be redundant in the available space."
|
|
11
|
+
],
|
|
12
|
+
"avoidWhen": [
|
|
13
|
+
{
|
|
14
|
+
"condition": "The control navigates, needs visible explanatory text, or is an arbitrary clickable surface.",
|
|
15
|
+
"useInstead": "Link, Button, or another owning component"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"composition": [
|
|
19
|
+
"Place one decorative Icon or SVG inside IconButton and provide an accessible label through the component's naming API."
|
|
20
|
+
],
|
|
21
|
+
"rules": [
|
|
22
|
+
{
|
|
23
|
+
"id": "icon-button-name",
|
|
24
|
+
"level": "must",
|
|
25
|
+
"statement": "Give every IconButton a concise discernible accessible name; the icon alone is not a name."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "icon-button-action",
|
|
29
|
+
"level": "must",
|
|
30
|
+
"statement": "Use IconButton for actions, not ordinary navigation."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "icon-button-css",
|
|
34
|
+
"level": "must",
|
|
35
|
+
"statement": "Load styles.css or core.css plus icon-button.css and icon.css when using Brick Icon."
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"commonMistakes": [
|
|
39
|
+
{
|
|
40
|
+
"mistake": "Using a random glyph, code icon for GitHub, or unlabeled SVG inside a generic button.",
|
|
41
|
+
"correction": "Use the correct icon asset in a named IconButton."
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"validation": [
|
|
45
|
+
"Check accessible name, icon alignment, touch target, focus ring, disabled/loading states, contrast, and forced colors.",
|
|
46
|
+
"Confirm component CSS is loaded."
|
|
47
|
+
],
|
|
48
|
+
"related": [
|
|
49
|
+
"button",
|
|
50
|
+
"icon",
|
|
51
|
+
"toolbar",
|
|
52
|
+
"tooltip"
|
|
53
|
+
]
|
|
54
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# IconButton agent guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Provide a compact finished action control for a single recognizable icon with an explicit accessible name.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
- A familiar icon represents one action and visible button text would be redundant in the available space.
|
|
10
|
+
|
|
11
|
+
## Choose something else when
|
|
12
|
+
|
|
13
|
+
- The control navigates, needs visible explanatory text, or is an arbitrary clickable surface. Use Link, Button, or another owning component.
|
|
14
|
+
|
|
15
|
+
## Required composition
|
|
16
|
+
|
|
17
|
+
- Place one decorative Icon or SVG inside IconButton and provide an accessible label through the component's naming API.
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- **MUST:** Give every IconButton a concise discernible accessible name; the icon alone is not a name.
|
|
22
|
+
- **MUST:** Use IconButton for actions, not ordinary navigation.
|
|
23
|
+
- **MUST:** Load styles.css or core.css plus icon-button.css and icon.css when using Brick Icon.
|
|
24
|
+
|
|
25
|
+
## Common mistakes
|
|
26
|
+
|
|
27
|
+
- **Avoid:** Using a random glyph, code icon for GitHub, or unlabeled SVG inside a generic button. **Instead:** Use the correct icon asset in a named IconButton.
|
|
28
|
+
|
|
29
|
+
## Validation checklist
|
|
30
|
+
|
|
31
|
+
- Check accessible name, icon alignment, touch target, focus ring, disabled/loading states, contrast, and forced colors.
|
|
32
|
+
- Confirm component CSS is loaded.
|
|
33
|
+
|
|
34
|
+
## Related guidance
|
|
35
|
+
|
|
36
|
+
- `button`
|
|
37
|
+
- `icon`
|
|
38
|
+
- `toolbar`
|
|
39
|
+
- `tooltip`
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "flowstack.agent-component.v1",
|
|
3
|
+
"id": "image",
|
|
4
|
+
"name": "Image",
|
|
5
|
+
"package": "@flowstack-ui/brick",
|
|
6
|
+
"layer": "brick",
|
|
7
|
+
"kind": "component",
|
|
8
|
+
"purpose": "Provide styled resilient media with Atom loading/fallback behavior, sizing recipes, and accessible image semantics.",
|
|
9
|
+
"useWhen": [
|
|
10
|
+
"A product image, brand asset, illustration, or content image needs Brick sizing, fit, radius, loading, or fallback presentation."
|
|
11
|
+
],
|
|
12
|
+
"avoidWhen": [
|
|
13
|
+
{
|
|
14
|
+
"condition": "A framework optimizer provides a required measured optimization Brick does not expose.",
|
|
15
|
+
"useInstead": "a documented Image adapter that preserves semantics and reports the capability gap"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"composition": [
|
|
19
|
+
"Compose Image.Content and optional Image.Fallback inside Image.Root; use Brick Stack or layout components around it rather than wrapper spans for alignment."
|
|
20
|
+
],
|
|
21
|
+
"rules": [
|
|
22
|
+
{
|
|
23
|
+
"id": "image-brick-first",
|
|
24
|
+
"level": "must",
|
|
25
|
+
"statement": "Use Brick Image for ordinary interface media; document any native or framework image fallback and the missing capability."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "image-alt",
|
|
29
|
+
"level": "must",
|
|
30
|
+
"statement": "Provide meaningful alt text, or alt=\"\" for a decorative image."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "image-layout",
|
|
34
|
+
"level": "should",
|
|
35
|
+
"statement": "Reserve dimensions or aspect ratio to prevent layout shift."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "image-css",
|
|
39
|
+
"level": "must",
|
|
40
|
+
"statement": "Load styles.css or core.css plus image.css."
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"commonMistakes": [
|
|
44
|
+
{
|
|
45
|
+
"mistake": "Using next/image automatically, wrapping Image in spans for ordinary alignment, or duplicating the caption in alt text.",
|
|
46
|
+
"correction": "Start with Brick Image, use Brick layout components, and adapt only for a measured missing optimizer capability."
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"validation": [
|
|
50
|
+
"Check loaded, loading, error, cached, responsive size, crop, layout shift, alt text, contrast of fallback content, and RTL where relevant.",
|
|
51
|
+
"Confirm CSS and any adapter report are complete."
|
|
52
|
+
],
|
|
53
|
+
"related": [
|
|
54
|
+
"aspect-ratio",
|
|
55
|
+
"stack",
|
|
56
|
+
"avatar",
|
|
57
|
+
"surface"
|
|
58
|
+
]
|
|
59
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Image agent guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Provide styled resilient media with Atom loading/fallback behavior, sizing recipes, and accessible image semantics.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
- A product image, brand asset, illustration, or content image needs Brick sizing, fit, radius, loading, or fallback presentation.
|
|
10
|
+
|
|
11
|
+
## Choose something else when
|
|
12
|
+
|
|
13
|
+
- A framework optimizer provides a required measured optimization Brick does not expose. Use a documented Image adapter that preserves semantics and reports the capability gap.
|
|
14
|
+
|
|
15
|
+
## Required composition
|
|
16
|
+
|
|
17
|
+
- Compose Image.Content and optional Image.Fallback inside Image.Root; use Brick Stack or layout components around it rather than wrapper spans for alignment.
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- **MUST:** Use Brick Image for ordinary interface media; document any native or framework image fallback and the missing capability.
|
|
22
|
+
- **MUST:** Provide meaningful alt text, or alt="" for a decorative image.
|
|
23
|
+
- **SHOULD:** Reserve dimensions or aspect ratio to prevent layout shift.
|
|
24
|
+
- **MUST:** Load styles.css or core.css plus image.css.
|
|
25
|
+
|
|
26
|
+
## Common mistakes
|
|
27
|
+
|
|
28
|
+
- **Avoid:** Using next/image automatically, wrapping Image in spans for ordinary alignment, or duplicating the caption in alt text. **Instead:** Start with Brick Image, use Brick layout components, and adapt only for a measured missing optimizer capability.
|
|
29
|
+
|
|
30
|
+
## Validation checklist
|
|
31
|
+
|
|
32
|
+
- Check loaded, loading, error, cached, responsive size, crop, layout shift, alt text, contrast of fallback content, and RTL where relevant.
|
|
33
|
+
- Confirm CSS and any adapter report are complete.
|
|
34
|
+
|
|
35
|
+
## Related guidance
|
|
36
|
+
|
|
37
|
+
- `aspect-ratio`
|
|
38
|
+
- `stack`
|
|
39
|
+
- `avatar`
|
|
40
|
+
- `surface`
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "flowstack.agent-component.v1",
|
|
3
|
+
"id": "input",
|
|
4
|
+
"name": "Input",
|
|
5
|
+
"package": "@flowstack-ui/brick",
|
|
6
|
+
"layer": "brick",
|
|
7
|
+
"kind": "component",
|
|
8
|
+
"purpose": "Render finished native single-line text entry with Brick sizing, states, and Atom field integration.",
|
|
9
|
+
"useWhen": [
|
|
10
|
+
"The user enters a single-line text, email, search, URL, telephone, or supported native input value."
|
|
11
|
+
],
|
|
12
|
+
"avoidWhen": [
|
|
13
|
+
{
|
|
14
|
+
"condition": "The value needs multiple lines.",
|
|
15
|
+
"useInstead": "Textarea"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"composition": [
|
|
19
|
+
"Place Input inside one Field.Root after Field.Label; provide name, type, and autocomplete appropriate to the data."
|
|
20
|
+
],
|
|
21
|
+
"rules": [
|
|
22
|
+
{
|
|
23
|
+
"id": "input-label",
|
|
24
|
+
"level": "must",
|
|
25
|
+
"statement": "Use a persistent accessible label; placeholder is not a replacement."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "input-css",
|
|
29
|
+
"level": "must",
|
|
30
|
+
"statement": "Load styles.css or core.css plus input.css and field.css when composed with Field."
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"commonMistakes": [
|
|
34
|
+
{
|
|
35
|
+
"mistake": "Using placeholder as the only visible label.",
|
|
36
|
+
"correction": "Compose Input with Field.Label and use placeholder only as optional example text."
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"validation": [
|
|
40
|
+
"Inspect label, name, type, autocomplete, and messaging relationships.",
|
|
41
|
+
"Test focus, entry, autofill, invalid/disabled states, zoom, and both appearances."
|
|
42
|
+
],
|
|
43
|
+
"related": [
|
|
44
|
+
"@flowstack-ui/atom/agents/input",
|
|
45
|
+
"field",
|
|
46
|
+
"textarea"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Input agent guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Render finished native single-line text entry with Brick sizing, states, and Atom field integration.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
- The user enters a single-line text, email, search, URL, telephone, or supported native input value.
|
|
10
|
+
|
|
11
|
+
## Choose something else when
|
|
12
|
+
|
|
13
|
+
- The value needs multiple lines. Use Textarea.
|
|
14
|
+
|
|
15
|
+
## Required composition
|
|
16
|
+
|
|
17
|
+
- Place Input inside one Field.Root after Field.Label; provide name, type, and autocomplete appropriate to the data.
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- **MUST:** Use a persistent accessible label; placeholder is not a replacement.
|
|
22
|
+
- **MUST:** Load styles.css or core.css plus input.css and field.css when composed with Field.
|
|
23
|
+
|
|
24
|
+
## Common mistakes
|
|
25
|
+
|
|
26
|
+
- **Avoid:** Using placeholder as the only visible label. **Instead:** Compose Input with Field.Label and use placeholder only as optional example text.
|
|
27
|
+
|
|
28
|
+
## Validation checklist
|
|
29
|
+
|
|
30
|
+
- Inspect label, name, type, autocomplete, and messaging relationships.
|
|
31
|
+
- Test focus, entry, autofill, invalid/disabled states, zoom, and both appearances.
|
|
32
|
+
|
|
33
|
+
## Related guidance
|
|
34
|
+
|
|
35
|
+
- `@flowstack-ui/atom/agents/input`
|
|
36
|
+
- `field`
|
|
37
|
+
- `textarea`
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "flowstack.agent-guide.v1",
|
|
3
|
+
"id": "interface-composition",
|
|
4
|
+
"name": "Brick interface composition",
|
|
5
|
+
"package": "@flowstack-ui/brick",
|
|
6
|
+
"layer": "brick",
|
|
7
|
+
"kind": "guide",
|
|
8
|
+
"purpose": "Build complete interfaces from Brick's structural, content, navigation, action, responsive, and surface components before adding narrow application styling.",
|
|
9
|
+
"decisionOrder": [
|
|
10
|
+
"Map the page into landmarks, bounded regions, layout relationships, content, navigation, actions, media, and responsive changes.",
|
|
11
|
+
"Choose the Brick owner for each relationship and read every selected component guide before implementation.",
|
|
12
|
+
"Compose from the outside inward: AppBar or page landmark, Container, Grid or Stack, Surface or Card, then content and controls.",
|
|
13
|
+
"Follow the customization order completely: component owner, supported props, semantic theme tokens, component tokens, public parts, and only then a narrow stable-hook escape hatch.",
|
|
14
|
+
"Audit responsive behavior, accessibility, CSS delivery, and native fallbacks before treating the composition as complete."
|
|
15
|
+
],
|
|
16
|
+
"selection": [
|
|
17
|
+
{
|
|
18
|
+
"intent": "page width and gutters",
|
|
19
|
+
"use": "Container",
|
|
20
|
+
"note": "Do not reproduce max-width and inline padding on every section."
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"intent": "row or column relationship",
|
|
24
|
+
"use": "HStack or VStack",
|
|
25
|
+
"note": "Use Stack when direction is selected dynamically."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"intent": "track-based responsive layout",
|
|
29
|
+
"use": "Grid",
|
|
30
|
+
"note": "Use Stack when only one axis matters."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"intent": "visual region",
|
|
34
|
+
"use": "Surface or Card",
|
|
35
|
+
"note": "Use Card for titled or actionable contained content and Surface for a general visual boundary."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"intent": "brand or content image",
|
|
39
|
+
"use": "Image",
|
|
40
|
+
"note": "Keep alt text and fallback behavior intentional."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"intent": "site navigation",
|
|
44
|
+
"use": "NavigationMenu or NavList",
|
|
45
|
+
"note": "Use NavigationMenu for disclosure navigation and NavList for persistent route lists."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"intent": "responsive desktop and mobile alternatives",
|
|
49
|
+
"use": "Show and Hide",
|
|
50
|
+
"note": "Keep one CSS-controlled breakpoint contract and avoid hydration-dependent visibility; distinct navigation patterns should consume one application-owned destination model."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"intent": "grouped application actions",
|
|
54
|
+
"use": "Toolbar",
|
|
55
|
+
"note": "Do not use AppBar.Toolbar as an ARIA toolbar."
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"rules": [
|
|
59
|
+
{
|
|
60
|
+
"id": "interface-outside-in",
|
|
61
|
+
"level": "must",
|
|
62
|
+
"statement": "Assign page structure to Brick components before writing element-level CSS."
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"id": "interface-correct-owner",
|
|
66
|
+
"level": "must",
|
|
67
|
+
"statement": "Do not use Stack, Surface, Button, or another convenient component when a more specific Brick navigation, media, content, or interaction component owns the job."
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"id": "interface-native-semantics",
|
|
71
|
+
"level": "must",
|
|
72
|
+
"statement": "Preserve document landmarks and semantic elements when Brick does not provide an owner; Brick-first is not permission to erase HTML meaning."
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": "interface-responsive-navigation-data",
|
|
76
|
+
"level": "must",
|
|
77
|
+
"statement": "When desktop and mobile require distinct navigation components, share application-owned destination labels, hrefs, values, and ordering while preserving each pattern's correct Brick anatomy; do not duplicate navigation content or force one interaction tree across breakpoints."
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"id": "interface-responsive-overlay-state",
|
|
81
|
+
"level": "must",
|
|
82
|
+
"statement": "Use Show and Hide for first-paint visibility; when a controlled interactive overlay may remain open across a breakpoint, synchronize its application state at that boundary so a hidden modal cannot retain focus, scroll lock, or isolation."
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "interface-theme-first",
|
|
86
|
+
"level": "should",
|
|
87
|
+
"statement": "Express reusable brand values through semantic Brick tokens and a theme rather than repeating literal application values."
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"id": "interface-document-foundation",
|
|
91
|
+
"level": "must",
|
|
92
|
+
"statement": "When styles.css or styles/core.css is loaded, change the document canvas, foreground, and body typography through semantic Brick tokens instead of repeating the body bindings that Brick's foundation already owns."
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"id": "interface-customization-order",
|
|
96
|
+
"level": "must",
|
|
97
|
+
"statement": "Do not write a direct declaration against a Brick part until the correct component, supported props, semantic tokens, component tokens, and public compound parts have been checked in order."
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"id": "interface-public-hooks-only",
|
|
101
|
+
"level": "must",
|
|
102
|
+
"statement": "Target only documented Brick tokens, public compound parts, stable brick-* base classes, documented slots, and documented state attributes; inspected internal wrappers or implementation selectors are not APIs."
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"id": "interface-report-token-gap",
|
|
106
|
+
"level": "must",
|
|
107
|
+
"statement": "When a direct stable-hook override remains because no public prop or token expresses the requirement, emit the required customization gap report and classify its owner before treating the interface as complete."
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"id": "interface-extract-evidence",
|
|
111
|
+
"level": "should",
|
|
112
|
+
"statement": "Classify repeated purposeful sections as Block candidates and repeated page arrangements as Blueprint candidates only after real reuse evidence."
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"customization": {
|
|
116
|
+
"order": [
|
|
117
|
+
{
|
|
118
|
+
"owner": "Correct Brick component",
|
|
119
|
+
"instruction": "Select the component whose semantic, behavioral, layout, content, navigation, or surface contract owns the job; styling a convenient substitute is not equivalent."
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"owner": "Supported props and recipes",
|
|
123
|
+
"instruction": "Use the component's documented variant, tone, size, density, orientation, placement, and other closed recipes when they express the result."
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"owner": "Semantic theme tokens",
|
|
127
|
+
"instruction": "Assign reusable brand color, typography, spacing, radius, surface, focus, and motion roles through a theme scope, preserving required foreground/background and interaction-state pairs."
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"owner": "Documented component tokens",
|
|
131
|
+
"instruction": "Use stable --brick-<component>-* variables for supported anatomy-specific adjustments instead of overriding the declaration that consumes them."
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"owner": "Public compound parts",
|
|
135
|
+
"instruction": "Place product-specific composition classes on the public part that owns the region; do not create slot maps or select private wrappers."
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"owner": "Narrow stable-hook escape hatch",
|
|
139
|
+
"instruction": "Use className or style only for application-owned composition or a value Brick does not expose, and target a documented public hook when direct CSS is unavoidable."
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
"classNamePolicy": "className scopes a product composition or supplies consumer-defined token values. It must not replace a supported prop, repeat a reusable theme value, or depend on undocumented anatomy.",
|
|
143
|
+
"directCssPolicy": "Direct declarations on a stable Brick class are a last resort. Keep them narrow, preserve component state and accessibility, verify the affected responsive and appearance states, and report the missing public capability.",
|
|
144
|
+
"gapReport": {
|
|
145
|
+
"requiredWhen": "Emit this record for every native/framework fallback or direct stable-hook declaration that remains after the ordered search.",
|
|
146
|
+
"fields": [
|
|
147
|
+
"interfaceJob",
|
|
148
|
+
"brickOwnerSearched",
|
|
149
|
+
"supportedPropsChecked",
|
|
150
|
+
"semanticTokensChecked",
|
|
151
|
+
"componentTokensChecked",
|
|
152
|
+
"publicPartsChecked",
|
|
153
|
+
"fallbackOrOverride",
|
|
154
|
+
"missingCapability",
|
|
155
|
+
"proposedOwner",
|
|
156
|
+
"verification"
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"nativeFallback": {
|
|
161
|
+
"check": "Review the interface map against the manifest and selected component guides, including layout, text, image, visibility, and navigation owners.",
|
|
162
|
+
"use": "Keep native landmarks and product-specific semantic structures where no Brick component adds a useful contract; add only narrow composition classes.",
|
|
163
|
+
"report": "Record what Brick lacked, whether an adapter or new component is warranted, and whether the pattern belongs to Theme, Block, Blueprint, or the application."
|
|
164
|
+
},
|
|
165
|
+
"validation": [
|
|
166
|
+
"Inspect the rendered DOM, accessible names, heading order, landmarks, focus order, keyboard operation, touch targets, contrast, zoom, and RTL behavior.",
|
|
167
|
+
"Test every adopted breakpoint without JavaScript-dependent first-paint flicker.",
|
|
168
|
+
"Confirm layout primitives own ordinary gap, alignment, wrapping, width, and visibility before accepting custom CSS.",
|
|
169
|
+
"Confirm repeated CSS values are theme tokens, component-specific values use documented component tokens, and every remaining direct stable-hook declaration has a complete customization gap report.",
|
|
170
|
+
"Run the package's CSS-delivery check and the application's accessibility, browser, and performance checks."
|
|
171
|
+
],
|
|
172
|
+
"related": [
|
|
173
|
+
"layer-selection",
|
|
174
|
+
"app-bar",
|
|
175
|
+
"container",
|
|
176
|
+
"stack",
|
|
177
|
+
"grid",
|
|
178
|
+
"surface",
|
|
179
|
+
"card",
|
|
180
|
+
"navigation-menu",
|
|
181
|
+
"show",
|
|
182
|
+
"hide"
|
|
183
|
+
]
|
|
184
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Brick interface composition
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Build complete interfaces from Brick's structural, content, navigation, action, responsive, and surface components before adding narrow application styling.
|
|
6
|
+
|
|
7
|
+
## Decision order
|
|
8
|
+
|
|
9
|
+
1. Map the page into landmarks, bounded regions, layout relationships, content, navigation, actions, media, and responsive changes.
|
|
10
|
+
2. Choose the Brick owner for each relationship and read every selected component guide before implementation.
|
|
11
|
+
3. Compose from the outside inward: AppBar or page landmark, Container, Grid or Stack, Surface or Card, then content and controls.
|
|
12
|
+
4. Follow the customization order completely: component owner, supported props, semantic theme tokens, component tokens, public parts, and only then a narrow stable-hook escape hatch.
|
|
13
|
+
5. Audit responsive behavior, accessibility, CSS delivery, and native fallbacks before treating the composition as complete.
|
|
14
|
+
|
|
15
|
+
## Selection map
|
|
16
|
+
|
|
17
|
+
- **page width and gutters:** use Container. Do not reproduce max-width and inline padding on every section.
|
|
18
|
+
- **row or column relationship:** use HStack or VStack. Use Stack when direction is selected dynamically.
|
|
19
|
+
- **track-based responsive layout:** use Grid. Use Stack when only one axis matters.
|
|
20
|
+
- **visual region:** use Surface or Card. Use Card for titled or actionable contained content and Surface for a general visual boundary.
|
|
21
|
+
- **brand or content image:** use Image. Keep alt text and fallback behavior intentional.
|
|
22
|
+
- **site navigation:** use NavigationMenu or NavList. Use NavigationMenu for disclosure navigation and NavList for persistent route lists.
|
|
23
|
+
- **responsive desktop and mobile alternatives:** use Show and Hide. Keep one CSS-controlled breakpoint contract and avoid hydration-dependent visibility; distinct navigation patterns should consume one application-owned destination model.
|
|
24
|
+
- **grouped application actions:** use Toolbar. Do not use AppBar.Toolbar as an ARIA toolbar.
|
|
25
|
+
|
|
26
|
+
## Rules
|
|
27
|
+
|
|
28
|
+
- **MUST:** Assign page structure to Brick components before writing element-level CSS.
|
|
29
|
+
- **MUST:** Do not use Stack, Surface, Button, or another convenient component when a more specific Brick navigation, media, content, or interaction component owns the job.
|
|
30
|
+
- **MUST:** Preserve document landmarks and semantic elements when Brick does not provide an owner; Brick-first is not permission to erase HTML meaning.
|
|
31
|
+
- **MUST:** When desktop and mobile require distinct navigation components, share application-owned destination labels, hrefs, values, and ordering while preserving each pattern's correct Brick anatomy; do not duplicate navigation content or force one interaction tree across breakpoints.
|
|
32
|
+
- **MUST:** Use Show and Hide for first-paint visibility; when a controlled interactive overlay may remain open across a breakpoint, synchronize its application state at that boundary so a hidden modal cannot retain focus, scroll lock, or isolation.
|
|
33
|
+
- **SHOULD:** Express reusable brand values through semantic Brick tokens and a theme rather than repeating literal application values.
|
|
34
|
+
- **MUST:** When styles.css or styles/core.css is loaded, change the document canvas, foreground, and body typography through semantic Brick tokens instead of repeating the body bindings that Brick's foundation already owns.
|
|
35
|
+
- **MUST:** Do not write a direct declaration against a Brick part until the correct component, supported props, semantic tokens, component tokens, and public compound parts have been checked in order.
|
|
36
|
+
- **MUST:** Target only documented Brick tokens, public compound parts, stable brick-* base classes, documented slots, and documented state attributes; inspected internal wrappers or implementation selectors are not APIs.
|
|
37
|
+
- **MUST:** When a direct stable-hook override remains because no public prop or token expresses the requirement, emit the required customization gap report and classify its owner before treating the interface as complete.
|
|
38
|
+
- **SHOULD:** Classify repeated purposeful sections as Block candidates and repeated page arrangements as Blueprint candidates only after real reuse evidence.
|
|
39
|
+
|
|
40
|
+
## Customization order
|
|
41
|
+
|
|
42
|
+
1. **Correct Brick component:** Select the component whose semantic, behavioral, layout, content, navigation, or surface contract owns the job; styling a convenient substitute is not equivalent.
|
|
43
|
+
2. **Supported props and recipes:** Use the component's documented variant, tone, size, density, orientation, placement, and other closed recipes when they express the result.
|
|
44
|
+
3. **Semantic theme tokens:** Assign reusable brand color, typography, spacing, radius, surface, focus, and motion roles through a theme scope, preserving required foreground/background and interaction-state pairs.
|
|
45
|
+
4. **Documented component tokens:** Use stable --brick-<component>-* variables for supported anatomy-specific adjustments instead of overriding the declaration that consumes them.
|
|
46
|
+
5. **Public compound parts:** Place product-specific composition classes on the public part that owns the region; do not create slot maps or select private wrappers.
|
|
47
|
+
6. **Narrow stable-hook escape hatch:** Use className or style only for application-owned composition or a value Brick does not expose, and target a documented public hook when direct CSS is unavoidable.
|
|
48
|
+
|
|
49
|
+
**Class name policy:** className scopes a product composition or supplies consumer-defined token values. It must not replace a supported prop, repeat a reusable theme value, or depend on undocumented anatomy.
|
|
50
|
+
|
|
51
|
+
**Direct CSS policy:** Direct declarations on a stable Brick class are a last resort. Keep them narrow, preserve component state and accessibility, verify the affected responsive and appearance states, and report the missing public capability.
|
|
52
|
+
|
|
53
|
+
### Required gap report
|
|
54
|
+
|
|
55
|
+
Emit this record for every native/framework fallback or direct stable-hook declaration that remains after the ordered search.
|
|
56
|
+
|
|
57
|
+
- `interfaceJob`
|
|
58
|
+
- `brickOwnerSearched`
|
|
59
|
+
- `supportedPropsChecked`
|
|
60
|
+
- `semanticTokensChecked`
|
|
61
|
+
- `componentTokensChecked`
|
|
62
|
+
- `publicPartsChecked`
|
|
63
|
+
- `fallbackOrOverride`
|
|
64
|
+
- `missingCapability`
|
|
65
|
+
- `proposedOwner`
|
|
66
|
+
- `verification`
|
|
67
|
+
|
|
68
|
+
## Native fallback
|
|
69
|
+
|
|
70
|
+
1. Review the interface map against the manifest and selected component guides, including layout, text, image, visibility, and navigation owners.
|
|
71
|
+
2. Keep native landmarks and product-specific semantic structures where no Brick component adds a useful contract; add only narrow composition classes.
|
|
72
|
+
3. Record what Brick lacked, whether an adapter or new component is warranted, and whether the pattern belongs to Theme, Block, Blueprint, or the application.
|
|
73
|
+
|
|
74
|
+
## Validation checklist
|
|
75
|
+
|
|
76
|
+
- Inspect the rendered DOM, accessible names, heading order, landmarks, focus order, keyboard operation, touch targets, contrast, zoom, and RTL behavior.
|
|
77
|
+
- Test every adopted breakpoint without JavaScript-dependent first-paint flicker.
|
|
78
|
+
- Confirm layout primitives own ordinary gap, alignment, wrapping, width, and visibility before accepting custom CSS.
|
|
79
|
+
- Confirm repeated CSS values are theme tokens, component-specific values use documented component tokens, and every remaining direct stable-hook declaration has a complete customization gap report.
|
|
80
|
+
- Run the package's CSS-delivery check and the application's accessibility, browser, and performance checks.
|
|
81
|
+
|
|
82
|
+
## Related guidance
|
|
83
|
+
|
|
84
|
+
- `layer-selection`
|
|
85
|
+
- `app-bar`
|
|
86
|
+
- `container`
|
|
87
|
+
- `stack`
|
|
88
|
+
- `grid`
|
|
89
|
+
- `surface`
|
|
90
|
+
- `card`
|
|
91
|
+
- `navigation-menu`
|
|
92
|
+
- `show`
|
|
93
|
+
- `hide`
|