@flowstack-ui/brick 0.1.2 → 0.1.4
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 +57 -0
- package/dist/agents/app-bar.md +42 -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 +48 -0
- package/dist/agents/divider.md +37 -0
- package/dist/agents/drawer.json +56 -0
- package/dist/agents/drawer.md +41 -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 +48 -0
- package/dist/agents/grid.md +37 -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 +174 -0
- package/dist/agents/interface-composition.md +91 -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 +54 -0
- package/dist/agents/nav-list.md +39 -0
- package/dist/agents/navigation-menu.json +76 -0
- package/dist/agents/navigation-menu.md +46 -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 +60 -0
- package/dist/agents/text.md +41 -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/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/icon-button/IconButton.js +2 -2
- package/dist/components/icon-button/IconButton.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/code-block.css +1 -1
- package/dist/styles/code-block.css.map +1 -1
- package/dist/styles/core.css +1 -1
- package/dist/styles/core.css.map +1 -1
- package/dist/styles/navigation-menu.css +1 -1
- package/dist/styles/navigation-menu.css.map +1 -1
- package/dist/styles/swipeable-item.css.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.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
package/README.md
CHANGED
|
@@ -7,6 +7,10 @@ Brick provides static CSS, semantic design tokens, light and dark appearances,
|
|
|
7
7
|
responsive defaults, and documented customization hooks. Components are ready
|
|
8
8
|
to use without requiring an application-level CSS processor.
|
|
9
9
|
|
|
10
|
+
The complete stylesheet also gives the document body a token-driven canvas,
|
|
11
|
+
foreground, and default body typography. Themes change those semantic tokens;
|
|
12
|
+
applications can deliberately override the low-specificity foundation later.
|
|
13
|
+
|
|
10
14
|
## Installation
|
|
11
15
|
|
|
12
16
|
```bash
|
|
@@ -24,7 +28,8 @@ Import the complete stylesheet once in the application root:
|
|
|
24
28
|
import "@flowstack-ui/brick/styles.css";
|
|
25
29
|
```
|
|
26
30
|
|
|
27
|
-
New applications may opt into Brick's separate reset
|
|
31
|
+
New applications may opt into Brick's separate neutral reset for page sizing,
|
|
32
|
+
margin removal, and browser normalization:
|
|
28
33
|
|
|
29
34
|
```ts
|
|
30
35
|
import "@flowstack-ui/brick/reset.css";
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "flowstack.agent-component.v1",
|
|
3
|
+
"id": "app-bar",
|
|
4
|
+
"name": "AppBar",
|
|
5
|
+
"package": "@flowstack-ui/brick",
|
|
6
|
+
"layer": "brick",
|
|
7
|
+
"kind": "component",
|
|
8
|
+
"purpose": "Provide a finished top surface and one-row start, geometrically centered, and end alignment structure built on Atom AppBar.",
|
|
9
|
+
"useWhen": [
|
|
10
|
+
"A page or application header needs branding, navigation, location, search, or persistent actions on one top surface."
|
|
11
|
+
],
|
|
12
|
+
"avoidWhen": [
|
|
13
|
+
{
|
|
14
|
+
"condition": "The need is a complete responsive shell, navigation system, or grouped-control keyboard model.",
|
|
15
|
+
"useInstead": "AppBar composed with Show/Hide, NavigationMenu or NavList, Drawer, and Toolbar as appropriate"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"composition": [
|
|
19
|
+
"Compose Root > Toolbar > Start, Center, and End, then place Brick brand, navigation, text, and action components in the matching sections."
|
|
20
|
+
],
|
|
21
|
+
"rules": [
|
|
22
|
+
{
|
|
23
|
+
"id": "appbar-structural-toolbar",
|
|
24
|
+
"level": "must",
|
|
25
|
+
"statement": "Do not treat AppBar.Toolbar as an ARIA toolbar; compose Toolbar for grouped-control keyboard behavior."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "appbar-responsive-owner",
|
|
29
|
+
"level": "must",
|
|
30
|
+
"statement": "Keep application-specific visibility and wrapping policy outside AppBar and implement it with Brick responsive/layout components."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "appbar-css",
|
|
34
|
+
"level": "must",
|
|
35
|
+
"statement": "Load styles.css or core.css plus app-bar.css."
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"commonMistakes": [
|
|
39
|
+
{
|
|
40
|
+
"mistake": "Hand-building a header row with div and flex CSS or expecting AppBar to create menus and breakpoints.",
|
|
41
|
+
"correction": "Use AppBar for the top surface and compose the dedicated navigation, layout, and visibility owners inside it."
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"validation": [
|
|
45
|
+
"Check geometric centering with unequal side content, truncation, zoom, narrow widths, and RTL.",
|
|
46
|
+
"Confirm landmark names, actions, navigation, and modular CSS are complete."
|
|
47
|
+
],
|
|
48
|
+
"related": [
|
|
49
|
+
"toolbar",
|
|
50
|
+
"navigation-menu",
|
|
51
|
+
"nav-list",
|
|
52
|
+
"drawer",
|
|
53
|
+
"show",
|
|
54
|
+
"hide",
|
|
55
|
+
"stack"
|
|
56
|
+
]
|
|
57
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# AppBar agent guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Provide a finished top surface and one-row start, geometrically centered, and end alignment structure built on Atom AppBar.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
- A page or application header needs branding, navigation, location, search, or persistent actions on one top surface.
|
|
10
|
+
|
|
11
|
+
## Choose something else when
|
|
12
|
+
|
|
13
|
+
- The need is a complete responsive shell, navigation system, or grouped-control keyboard model. Use AppBar composed with Show/Hide, NavigationMenu or NavList, Drawer, and Toolbar as appropriate.
|
|
14
|
+
|
|
15
|
+
## Required composition
|
|
16
|
+
|
|
17
|
+
- Compose Root > Toolbar > Start, Center, and End, then place Brick brand, navigation, text, and action components in the matching sections.
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- **MUST:** Do not treat AppBar.Toolbar as an ARIA toolbar; compose Toolbar for grouped-control keyboard behavior.
|
|
22
|
+
- **MUST:** Keep application-specific visibility and wrapping policy outside AppBar and implement it with Brick responsive/layout components.
|
|
23
|
+
- **MUST:** Load styles.css or core.css plus app-bar.css.
|
|
24
|
+
|
|
25
|
+
## Common mistakes
|
|
26
|
+
|
|
27
|
+
- **Avoid:** Hand-building a header row with div and flex CSS or expecting AppBar to create menus and breakpoints. **Instead:** Use AppBar for the top surface and compose the dedicated navigation, layout, and visibility owners inside it.
|
|
28
|
+
|
|
29
|
+
## Validation checklist
|
|
30
|
+
|
|
31
|
+
- Check geometric centering with unequal side content, truncation, zoom, narrow widths, and RTL.
|
|
32
|
+
- Confirm landmark names, actions, navigation, and modular CSS are complete.
|
|
33
|
+
|
|
34
|
+
## Related guidance
|
|
35
|
+
|
|
36
|
+
- `toolbar`
|
|
37
|
+
- `navigation-menu`
|
|
38
|
+
- `nav-list`
|
|
39
|
+
- `drawer`
|
|
40
|
+
- `show`
|
|
41
|
+
- `hide`
|
|
42
|
+
- `stack`
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "flowstack.agent-component.v1",
|
|
3
|
+
"id": "bottom-navigation",
|
|
4
|
+
"name": "BottomNavigation",
|
|
5
|
+
"package": "@flowstack-ui/brick",
|
|
6
|
+
"layer": "brick",
|
|
7
|
+
"kind": "component",
|
|
8
|
+
"purpose": "Style a short, stable set of primary compact-application destinations with active state and label-visibility recipes.",
|
|
9
|
+
"useWhen": [
|
|
10
|
+
"A compact application needs a small fixed set of primary destinations at the bottom edge."
|
|
11
|
+
],
|
|
12
|
+
"avoidWhen": [
|
|
13
|
+
{
|
|
14
|
+
"condition": "Navigation is longer, grouped, top-level disclosure navigation, or local panel switching.",
|
|
15
|
+
"useInstead": "NavList, NavigationMenu, or Tabs"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"composition": [
|
|
19
|
+
"Place named Items with unique values inside Root; provide href for destinations and include text labels even when the selected visual recipe hides them."
|
|
20
|
+
],
|
|
21
|
+
"rules": [
|
|
22
|
+
{
|
|
23
|
+
"id": "bottom-navigation-labels",
|
|
24
|
+
"level": "must",
|
|
25
|
+
"statement": "Keep every icon destination's text accessible in every label-visibility mode."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "bottom-navigation-overlay",
|
|
29
|
+
"level": "must",
|
|
30
|
+
"statement": "When fixed or sticky, coordinate application content and safe-area spacing outside the component."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "bottom-navigation-css",
|
|
34
|
+
"level": "must",
|
|
35
|
+
"statement": "Load styles.css or core.css plus bottom-navigation.css."
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"commonMistakes": [
|
|
39
|
+
{
|
|
40
|
+
"mistake": "Using BottomNavigation as a generic mobile menu or removing labels from the DOM.",
|
|
41
|
+
"correction": "Use Drawer/NavList for a menu and preserve each Item label."
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"validation": [
|
|
45
|
+
"Check active, disabled, label visibility, safe areas, narrow widths, touch targets, focus, and RTL.",
|
|
46
|
+
"Confirm URL destinations render links and CSS is loaded."
|
|
47
|
+
],
|
|
48
|
+
"related": [
|
|
49
|
+
"nav-list",
|
|
50
|
+
"tabs",
|
|
51
|
+
"icon-button",
|
|
52
|
+
"show",
|
|
53
|
+
"hide"
|
|
54
|
+
]
|
|
55
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# BottomNavigation agent guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Style a short, stable set of primary compact-application destinations with active state and label-visibility recipes.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
- A compact application needs a small fixed set of primary destinations at the bottom edge.
|
|
10
|
+
|
|
11
|
+
## Choose something else when
|
|
12
|
+
|
|
13
|
+
- Navigation is longer, grouped, top-level disclosure navigation, or local panel switching. Use NavList, NavigationMenu, or Tabs.
|
|
14
|
+
|
|
15
|
+
## Required composition
|
|
16
|
+
|
|
17
|
+
- Place named Items with unique values inside Root; provide href for destinations and include text labels even when the selected visual recipe hides them.
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- **MUST:** Keep every icon destination's text accessible in every label-visibility mode.
|
|
22
|
+
- **MUST:** When fixed or sticky, coordinate application content and safe-area spacing outside the component.
|
|
23
|
+
- **MUST:** Load styles.css or core.css plus bottom-navigation.css.
|
|
24
|
+
|
|
25
|
+
## Common mistakes
|
|
26
|
+
|
|
27
|
+
- **Avoid:** Using BottomNavigation as a generic mobile menu or removing labels from the DOM. **Instead:** Use Drawer/NavList for a menu and preserve each Item label.
|
|
28
|
+
|
|
29
|
+
## Validation checklist
|
|
30
|
+
|
|
31
|
+
- Check active, disabled, label visibility, safe areas, narrow widths, touch targets, focus, and RTL.
|
|
32
|
+
- Confirm URL destinations render links and CSS is loaded.
|
|
33
|
+
|
|
34
|
+
## Related guidance
|
|
35
|
+
|
|
36
|
+
- `nav-list`
|
|
37
|
+
- `tabs`
|
|
38
|
+
- `icon-button`
|
|
39
|
+
- `show`
|
|
40
|
+
- `hide`
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "flowstack.agent-component.v1",
|
|
3
|
+
"id": "breadcrumb",
|
|
4
|
+
"name": "Breadcrumb",
|
|
5
|
+
"package": "@flowstack-ui/brick",
|
|
6
|
+
"layer": "brick",
|
|
7
|
+
"kind": "component",
|
|
8
|
+
"purpose": "Present page ancestry as a finished named navigation trail while preserving Atom breadcrumb semantics.",
|
|
9
|
+
"useWhen": [
|
|
10
|
+
"Users need to see the current page's place in a hierarchy and navigate to ancestors."
|
|
11
|
+
],
|
|
12
|
+
"avoidWhen": [
|
|
13
|
+
{
|
|
14
|
+
"condition": "The relationship is result pagination, local panels, or general navigation.",
|
|
15
|
+
"useInstead": "Pagination, Tabs, or NavList"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"composition": [
|
|
19
|
+
"Compose Root > List with Item containing ancestor Link or the one current Page, separated by decorative Separator; use an accessible button when Ellipsis is interactive."
|
|
20
|
+
],
|
|
21
|
+
"rules": [
|
|
22
|
+
{
|
|
23
|
+
"id": "breadcrumb-current",
|
|
24
|
+
"level": "must",
|
|
25
|
+
"statement": "Render one current Page and keep ancestor destinations as Links."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "breadcrumb-css",
|
|
29
|
+
"level": "must",
|
|
30
|
+
"statement": "Load styles.css or core.css plus breadcrumb.css."
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"commonMistakes": [
|
|
34
|
+
{
|
|
35
|
+
"mistake": "Recreating the trail with spans and manual separators or making the current page a link.",
|
|
36
|
+
"correction": "Use the complete Breadcrumb anatomy and its current Page part."
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"validation": [
|
|
40
|
+
"Check landmark naming, current state, collapsed hierarchy, focus rings, overflow, zoom, and RTL.",
|
|
41
|
+
"Confirm separators are decorative and CSS is loaded."
|
|
42
|
+
],
|
|
43
|
+
"related": [
|
|
44
|
+
"link",
|
|
45
|
+
"pagination",
|
|
46
|
+
"nav-list"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Breadcrumb agent guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Present page ancestry as a finished named navigation trail while preserving Atom breadcrumb semantics.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
- Users need to see the current page's place in a hierarchy and navigate to ancestors.
|
|
10
|
+
|
|
11
|
+
## Choose something else when
|
|
12
|
+
|
|
13
|
+
- The relationship is result pagination, local panels, or general navigation. Use Pagination, Tabs, or NavList.
|
|
14
|
+
|
|
15
|
+
## Required composition
|
|
16
|
+
|
|
17
|
+
- Compose Root > List with Item containing ancestor Link or the one current Page, separated by decorative Separator; use an accessible button when Ellipsis is interactive.
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- **MUST:** Render one current Page and keep ancestor destinations as Links.
|
|
22
|
+
- **MUST:** Load styles.css or core.css plus breadcrumb.css.
|
|
23
|
+
|
|
24
|
+
## Common mistakes
|
|
25
|
+
|
|
26
|
+
- **Avoid:** Recreating the trail with spans and manual separators or making the current page a link. **Instead:** Use the complete Breadcrumb anatomy and its current Page part.
|
|
27
|
+
|
|
28
|
+
## Validation checklist
|
|
29
|
+
|
|
30
|
+
- Check landmark naming, current state, collapsed hierarchy, focus rings, overflow, zoom, and RTL.
|
|
31
|
+
- Confirm separators are decorative and CSS is loaded.
|
|
32
|
+
|
|
33
|
+
## Related guidance
|
|
34
|
+
|
|
35
|
+
- `link`
|
|
36
|
+
- `pagination`
|
|
37
|
+
- `nav-list`
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "flowstack.agent-component.v1",
|
|
3
|
+
"id": "button",
|
|
4
|
+
"name": "Button",
|
|
5
|
+
"package": "@flowstack-ui/brick",
|
|
6
|
+
"layer": "brick",
|
|
7
|
+
"kind": "component",
|
|
8
|
+
"purpose": "Render a finished accessible action or emphasized native link with Brick size, tone, variant, loading, and composition contracts.",
|
|
9
|
+
"useWhen": [
|
|
10
|
+
"The user triggers an action such as submit, save, open, dismiss, or retry.",
|
|
11
|
+
"A destination intentionally needs a filled, soft, outlined, or ghost action treatment."
|
|
12
|
+
],
|
|
13
|
+
"avoidWhen": [
|
|
14
|
+
{
|
|
15
|
+
"condition": "A destination should read as ordinary inline or standalone navigation.",
|
|
16
|
+
"useInstead": "Link"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"composition": [
|
|
20
|
+
"Omit href for actions and supply href for emphasized destinations; choose tone, variant, and size from intent and add an icon only when it improves recognition."
|
|
21
|
+
],
|
|
22
|
+
"rules": [
|
|
23
|
+
{
|
|
24
|
+
"id": "button-semantics",
|
|
25
|
+
"level": "must",
|
|
26
|
+
"statement": "Use action mode for operations and href link mode for emphasized destinations; visual prominence never justifies hiding navigation in onPress."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "button-css",
|
|
30
|
+
"level": "must",
|
|
31
|
+
"statement": "Load styles.css or core.css plus button.css."
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"commonMistakes": [
|
|
35
|
+
{
|
|
36
|
+
"mistake": "Navigating from onPress without a real href.",
|
|
37
|
+
"correction": "Use Button href mode for emphasized navigation or Link for ordinary navigation."
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"validation": [
|
|
41
|
+
"Confirm an accessible name and action semantics.",
|
|
42
|
+
"Test focus, keyboard activation, disabled/loading behavior, and contrast in every supported appearance."
|
|
43
|
+
],
|
|
44
|
+
"related": [
|
|
45
|
+
"@flowstack-ui/atom/agents/button",
|
|
46
|
+
"link",
|
|
47
|
+
"form"
|
|
48
|
+
]
|
|
49
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Button agent guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Render a finished accessible action or emphasized native link with Brick size, tone, variant, loading, and composition contracts.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
- The user triggers an action such as submit, save, open, dismiss, or retry.
|
|
10
|
+
- A destination intentionally needs a filled, soft, outlined, or ghost action treatment.
|
|
11
|
+
|
|
12
|
+
## Choose something else when
|
|
13
|
+
|
|
14
|
+
- A destination should read as ordinary inline or standalone navigation. Use Link.
|
|
15
|
+
|
|
16
|
+
## Required composition
|
|
17
|
+
|
|
18
|
+
- Omit href for actions and supply href for emphasized destinations; choose tone, variant, and size from intent and add an icon only when it improves recognition.
|
|
19
|
+
|
|
20
|
+
## Rules
|
|
21
|
+
|
|
22
|
+
- **MUST:** Use action mode for operations and href link mode for emphasized destinations; visual prominence never justifies hiding navigation in onPress.
|
|
23
|
+
- **MUST:** Load styles.css or core.css plus button.css.
|
|
24
|
+
|
|
25
|
+
## Common mistakes
|
|
26
|
+
|
|
27
|
+
- **Avoid:** Navigating from onPress without a real href. **Instead:** Use Button href mode for emphasized navigation or Link for ordinary navigation.
|
|
28
|
+
|
|
29
|
+
## Validation checklist
|
|
30
|
+
|
|
31
|
+
- Confirm an accessible name and action semantics.
|
|
32
|
+
- Test focus, keyboard activation, disabled/loading behavior, and contrast in every supported appearance.
|
|
33
|
+
|
|
34
|
+
## Related guidance
|
|
35
|
+
|
|
36
|
+
- `@flowstack-ui/atom/agents/button`
|
|
37
|
+
- `link`
|
|
38
|
+
- `form`
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "flowstack.agent-component.v1",
|
|
3
|
+
"id": "card",
|
|
4
|
+
"name": "Card",
|
|
5
|
+
"package": "@flowstack-ui/brick",
|
|
6
|
+
"layer": "brick",
|
|
7
|
+
"kind": "component",
|
|
8
|
+
"purpose": "Group content about one subject in a finished static compound surface with header, content, and footer anatomy.",
|
|
9
|
+
"useWhen": [
|
|
10
|
+
"A bounded subject needs a title, supporting content, and optional actions as one visual unit."
|
|
11
|
+
],
|
|
12
|
+
"avoidWhen": [
|
|
13
|
+
{
|
|
14
|
+
"condition": "Only generic background, border, radius, or elevation is needed.",
|
|
15
|
+
"useInstead": "Surface"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"composition": [
|
|
19
|
+
"Compose Card.Root with only the Header, Title, Description, Content, and Footer parts the subject needs."
|
|
20
|
+
],
|
|
21
|
+
"rules": [
|
|
22
|
+
{
|
|
23
|
+
"id": "card-not-clickable-div",
|
|
24
|
+
"level": "must",
|
|
25
|
+
"statement": "Do not turn the whole Card into an unnamed clickable div; place explicit Link or Button controls inside or use a valid link composition."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "card-css",
|
|
29
|
+
"level": "must",
|
|
30
|
+
"statement": "Load styles.css or core.css plus card.css and styles for nested components."
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"commonMistakes": [
|
|
34
|
+
{
|
|
35
|
+
"mistake": "Using Card for every spacing group.",
|
|
36
|
+
"correction": "Use Stack or Surface when there is no bounded card subject."
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"validation": [
|
|
40
|
+
"Check heading order and explicit action names.",
|
|
41
|
+
"Check content flow, focus visibility, narrow widths, and appearance contrast."
|
|
42
|
+
],
|
|
43
|
+
"related": [
|
|
44
|
+
"surface",
|
|
45
|
+
"stack",
|
|
46
|
+
"grid",
|
|
47
|
+
"button",
|
|
48
|
+
"link"
|
|
49
|
+
]
|
|
50
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Card agent guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Group content about one subject in a finished static compound surface with header, content, and footer anatomy.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
- A bounded subject needs a title, supporting content, and optional actions as one visual unit.
|
|
10
|
+
|
|
11
|
+
## Choose something else when
|
|
12
|
+
|
|
13
|
+
- Only generic background, border, radius, or elevation is needed. Use Surface.
|
|
14
|
+
|
|
15
|
+
## Required composition
|
|
16
|
+
|
|
17
|
+
- Compose Card.Root with only the Header, Title, Description, Content, and Footer parts the subject needs.
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- **MUST:** Do not turn the whole Card into an unnamed clickable div; place explicit Link or Button controls inside or use a valid link composition.
|
|
22
|
+
- **MUST:** Load styles.css or core.css plus card.css and styles for nested components.
|
|
23
|
+
|
|
24
|
+
## Common mistakes
|
|
25
|
+
|
|
26
|
+
- **Avoid:** Using Card for every spacing group. **Instead:** Use Stack or Surface when there is no bounded card subject.
|
|
27
|
+
|
|
28
|
+
## Validation checklist
|
|
29
|
+
|
|
30
|
+
- Check heading order and explicit action names.
|
|
31
|
+
- Check content flow, focus visibility, narrow widths, and appearance contrast.
|
|
32
|
+
|
|
33
|
+
## Related guidance
|
|
34
|
+
|
|
35
|
+
- `surface`
|
|
36
|
+
- `stack`
|
|
37
|
+
- `grid`
|
|
38
|
+
- `button`
|
|
39
|
+
- `link`
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "flowstack.agent-component.v1",
|
|
3
|
+
"id": "checkbox",
|
|
4
|
+
"name": "Checkbox",
|
|
5
|
+
"package": "@flowstack-ui/brick",
|
|
6
|
+
"layer": "brick",
|
|
7
|
+
"kind": "component",
|
|
8
|
+
"purpose": "Render a finished independent checked, unchecked, or mixed selection with Atom interaction and form behavior.",
|
|
9
|
+
"useWhen": [
|
|
10
|
+
"A user independently turns an option on or off, or an aggregate parent represents mixed child selection."
|
|
11
|
+
],
|
|
12
|
+
"avoidWhen": [
|
|
13
|
+
{
|
|
14
|
+
"condition": "Exactly one option must be selected from a set.",
|
|
15
|
+
"useInstead": "RadioGroup"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"composition": [
|
|
19
|
+
"Compose Checkbox.Root with Checkbox.Indicator and a visible associated label, usually inside Field or Fieldset."
|
|
20
|
+
],
|
|
21
|
+
"rules": [
|
|
22
|
+
{
|
|
23
|
+
"id": "checkbox-label",
|
|
24
|
+
"level": "must",
|
|
25
|
+
"statement": "Give every checkbox a visible associated label unless context is genuinely redundant and an accessible name remains."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "checkbox-css",
|
|
29
|
+
"level": "must",
|
|
30
|
+
"statement": "Load styles.css or core.css plus checkbox.css and any Field/Fieldset styles used."
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"commonMistakes": [
|
|
34
|
+
{
|
|
35
|
+
"mistake": "Using Checkbox for a one-of-many choice.",
|
|
36
|
+
"correction": "Use RadioGroup for mutually exclusive options."
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"validation": [
|
|
40
|
+
"Toggle with Space, pointer, and touch.",
|
|
41
|
+
"Inspect checked/mixed and disabled states, label hit target, submitted value, focus, and contrast."
|
|
42
|
+
],
|
|
43
|
+
"related": [
|
|
44
|
+
"@flowstack-ui/atom/agents/checkbox",
|
|
45
|
+
"field",
|
|
46
|
+
"fieldset",
|
|
47
|
+
"radio-group"
|
|
48
|
+
]
|
|
49
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Checkbox agent guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Render a finished independent checked, unchecked, or mixed selection with Atom interaction and form behavior.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
- A user independently turns an option on or off, or an aggregate parent represents mixed child selection.
|
|
10
|
+
|
|
11
|
+
## Choose something else when
|
|
12
|
+
|
|
13
|
+
- Exactly one option must be selected from a set. Use RadioGroup.
|
|
14
|
+
|
|
15
|
+
## Required composition
|
|
16
|
+
|
|
17
|
+
- Compose Checkbox.Root with Checkbox.Indicator and a visible associated label, usually inside Field or Fieldset.
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- **MUST:** Give every checkbox a visible associated label unless context is genuinely redundant and an accessible name remains.
|
|
22
|
+
- **MUST:** Load styles.css or core.css plus checkbox.css and any Field/Fieldset styles used.
|
|
23
|
+
|
|
24
|
+
## Common mistakes
|
|
25
|
+
|
|
26
|
+
- **Avoid:** Using Checkbox for a one-of-many choice. **Instead:** Use RadioGroup for mutually exclusive options.
|
|
27
|
+
|
|
28
|
+
## Validation checklist
|
|
29
|
+
|
|
30
|
+
- Toggle with Space, pointer, and touch.
|
|
31
|
+
- Inspect checked/mixed and disabled states, label hit target, submitted value, focus, and contrast.
|
|
32
|
+
|
|
33
|
+
## Related guidance
|
|
34
|
+
|
|
35
|
+
- `@flowstack-ui/atom/agents/checkbox`
|
|
36
|
+
- `field`
|
|
37
|
+
- `fieldset`
|
|
38
|
+
- `radio-group`
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "flowstack.agent-component.v1",
|
|
3
|
+
"id": "container",
|
|
4
|
+
"name": "Container",
|
|
5
|
+
"package": "@flowstack-ui/brick",
|
|
6
|
+
"layer": "brick",
|
|
7
|
+
"kind": "component",
|
|
8
|
+
"purpose": "Own consistent centered content width, logical page gutters, and size variants for sections and application shells.",
|
|
9
|
+
"useWhen": [
|
|
10
|
+
"Page or section content needs a shared maximum inline size and responsive logical gutters."
|
|
11
|
+
],
|
|
12
|
+
"avoidWhen": [
|
|
13
|
+
{
|
|
14
|
+
"condition": "The region needs a visual boundary or only a local one-axis relationship.",
|
|
15
|
+
"useInstead": "Surface/Card or Stack"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"composition": [
|
|
19
|
+
"Place section content inside Container, then use Stack or Grid for internal relationships; let full-bleed backgrounds live outside it."
|
|
20
|
+
],
|
|
21
|
+
"rules": [
|
|
22
|
+
{
|
|
23
|
+
"id": "container-width-owner",
|
|
24
|
+
"level": "must",
|
|
25
|
+
"statement": "Use Container rather than repeating application max-width, auto-margin, and gutter CSS across sections."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "container-not-surface",
|
|
29
|
+
"level": "must",
|
|
30
|
+
"statement": "Do not use Container as a visual card or background owner."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "container-css",
|
|
34
|
+
"level": "must",
|
|
35
|
+
"statement": "Load styles.css or core.css plus container.css."
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"commonMistakes": [
|
|
39
|
+
{
|
|
40
|
+
"mistake": "Applying a separate max-width class to every page section or nesting Containers without a width reason.",
|
|
41
|
+
"correction": "Use one deliberate Container boundary per aligned content region."
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"validation": [
|
|
45
|
+
"Check gutters and max width at all adopted breakpoints, zoom levels, and RTL.",
|
|
46
|
+
"Confirm full-bleed and contained regions align intentionally and CSS is loaded."
|
|
47
|
+
],
|
|
48
|
+
"related": [
|
|
49
|
+
"stack",
|
|
50
|
+
"grid",
|
|
51
|
+
"surface",
|
|
52
|
+
"card"
|
|
53
|
+
]
|
|
54
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Container agent guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Own consistent centered content width, logical page gutters, and size variants for sections and application shells.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
- Page or section content needs a shared maximum inline size and responsive logical gutters.
|
|
10
|
+
|
|
11
|
+
## Choose something else when
|
|
12
|
+
|
|
13
|
+
- The region needs a visual boundary or only a local one-axis relationship. Use Surface/Card or Stack.
|
|
14
|
+
|
|
15
|
+
## Required composition
|
|
16
|
+
|
|
17
|
+
- Place section content inside Container, then use Stack or Grid for internal relationships; let full-bleed backgrounds live outside it.
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- **MUST:** Use Container rather than repeating application max-width, auto-margin, and gutter CSS across sections.
|
|
22
|
+
- **MUST:** Do not use Container as a visual card or background owner.
|
|
23
|
+
- **MUST:** Load styles.css or core.css plus container.css.
|
|
24
|
+
|
|
25
|
+
## Common mistakes
|
|
26
|
+
|
|
27
|
+
- **Avoid:** Applying a separate max-width class to every page section or nesting Containers without a width reason. **Instead:** Use one deliberate Container boundary per aligned content region.
|
|
28
|
+
|
|
29
|
+
## Validation checklist
|
|
30
|
+
|
|
31
|
+
- Check gutters and max width at all adopted breakpoints, zoom levels, and RTL.
|
|
32
|
+
- Confirm full-bleed and contained regions align intentionally and CSS is loaded.
|
|
33
|
+
|
|
34
|
+
## Related guidance
|
|
35
|
+
|
|
36
|
+
- `stack`
|
|
37
|
+
- `grid`
|
|
38
|
+
- `surface`
|
|
39
|
+
- `card`
|