@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,49 @@
|
|
|
1
|
+
# NavigationMenu agent guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Present polished disclosure navigation while Atom owns trigger geometry, viewport positioning, focus, keyboard, pointer, and dismissal behavior.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
- A top-level site or product navigation combines direct links with disclosure panels of related destinations.
|
|
10
|
+
|
|
11
|
+
## Choose something else when
|
|
12
|
+
|
|
13
|
+
- The content is an action menu, persistent route rail, mobile drawer, or tab switcher. Use DropdownMenu, NavList, Drawer, or Tabs.
|
|
14
|
+
|
|
15
|
+
## Required composition
|
|
16
|
+
|
|
17
|
+
- 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.
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- **MUST:** 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.
|
|
22
|
+
- **MUST:** 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.
|
|
23
|
+
- **MUST:** Do not invent overlay props such as side, align, sideOffset, or alignOffset; NavigationMenu does not expose the floating-overlay positioning API.
|
|
24
|
+
- **MUST:** Keep contents focused on navigation destinations rather than commands or unrelated marketing panels.
|
|
25
|
+
- **MUST:** 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.
|
|
26
|
+
- **MUST:** 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.
|
|
27
|
+
- **MUST:** 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.
|
|
28
|
+
- **MUST:** Load styles.css or core.css plus navigation-menu.css and every child component stylesheet.
|
|
29
|
+
|
|
30
|
+
## Common mistakes
|
|
31
|
+
|
|
32
|
+
- **Avoid:** 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. **Instead:** Keep Viewport and Indicator under Root, let NavigationMenu own geometry and open state, then customize documented recipes, tokens, and public parts.
|
|
33
|
+
- **Avoid:** Adding use client to an entire Next page only to dereference the legacy NavigationMenu runtime object. **Instead:** Use the RSC-safe module-namespace subpath so only the interactive Navigation Menu parts remain client-owned.
|
|
34
|
+
- **Avoid:** 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. **Instead:** Wrap one direct Surface child with the panel Link so the anchor owns interaction and Surface owns container paint and geometry.
|
|
35
|
+
|
|
36
|
+
## Validation checklist
|
|
37
|
+
|
|
38
|
+
- Test hover, click, focus, arrow keys, Escape, outside interaction, links, viewport transitions, active-trigger centering, boundary collision, arrow alignment, zoom, narrow widths, and RTL.
|
|
39
|
+
- Confirm destination semantics, Root-relative geometry, panel focus fallback, documented customization hooks, and CSS delivery.
|
|
40
|
+
- In a React Server Component consumer, confirm the module-namespace form passes a production prerender without promoting the page to use client.
|
|
41
|
+
|
|
42
|
+
## Related guidance
|
|
43
|
+
|
|
44
|
+
- `app-bar`
|
|
45
|
+
- `nav-list`
|
|
46
|
+
- `drawer`
|
|
47
|
+
- `dropdown-menu`
|
|
48
|
+
- `link`
|
|
49
|
+
- `interface-composition`
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "flowstack.agent-component.v1",
|
|
3
|
+
"id": "pagination",
|
|
4
|
+
"name": "Pagination",
|
|
5
|
+
"package": "@flowstack-ui/brick",
|
|
6
|
+
"layer": "brick",
|
|
7
|
+
"kind": "component",
|
|
8
|
+
"purpose": "Present polished movement through ordered result pages with current, boundary, and ellipsis states.",
|
|
9
|
+
"useWhen": [
|
|
10
|
+
"A result set or collection is divided into multiple ordered pages."
|
|
11
|
+
],
|
|
12
|
+
"avoidWhen": [
|
|
13
|
+
{
|
|
14
|
+
"condition": "The controls move between guide articles, ancestors, or local panels.",
|
|
15
|
+
"useInstead": "Link composition, Breadcrumb, or Tabs"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"composition": [
|
|
19
|
+
"Compose Root and List with Previous, Page, Ellipsis, and Next parts; use real destinations when each page has a URL."
|
|
20
|
+
],
|
|
21
|
+
"rules": [
|
|
22
|
+
{
|
|
23
|
+
"id": "pagination-responsive",
|
|
24
|
+
"level": "must",
|
|
25
|
+
"statement": "Adapt visible page ranges at narrow widths without removing previous/next meaning or current-page state."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "pagination-css",
|
|
29
|
+
"level": "must",
|
|
30
|
+
"statement": "Load styles.css or core.css plus pagination.css."
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"commonMistakes": [
|
|
34
|
+
{
|
|
35
|
+
"mistake": "Using Pagination for previous/next documentation guides or allowing controls to wrap into an unreadable grid.",
|
|
36
|
+
"correction": "Use ordinary guide navigation links and reserve Pagination for numbered collections."
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"validation": [
|
|
40
|
+
"Check first, middle, last, current, disabled, ellipsis, long labels, narrow widths, focus, touch targets, and RTL.",
|
|
41
|
+
"Confirm URL pages are links and CSS is loaded."
|
|
42
|
+
],
|
|
43
|
+
"related": [
|
|
44
|
+
"breadcrumb",
|
|
45
|
+
"link",
|
|
46
|
+
"button"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Pagination agent guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Present polished movement through ordered result pages with current, boundary, and ellipsis states.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
- A result set or collection is divided into multiple ordered pages.
|
|
10
|
+
|
|
11
|
+
## Choose something else when
|
|
12
|
+
|
|
13
|
+
- The controls move between guide articles, ancestors, or local panels. Use Link composition, Breadcrumb, or Tabs.
|
|
14
|
+
|
|
15
|
+
## Required composition
|
|
16
|
+
|
|
17
|
+
- Compose Root and List with Previous, Page, Ellipsis, and Next parts; use real destinations when each page has a URL.
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- **MUST:** Adapt visible page ranges at narrow widths without removing previous/next meaning or current-page state.
|
|
22
|
+
- **MUST:** Load styles.css or core.css plus pagination.css.
|
|
23
|
+
|
|
24
|
+
## Common mistakes
|
|
25
|
+
|
|
26
|
+
- **Avoid:** Using Pagination for previous/next documentation guides or allowing controls to wrap into an unreadable grid. **Instead:** Use ordinary guide navigation links and reserve Pagination for numbered collections.
|
|
27
|
+
|
|
28
|
+
## Validation checklist
|
|
29
|
+
|
|
30
|
+
- Check first, middle, last, current, disabled, ellipsis, long labels, narrow widths, focus, touch targets, and RTL.
|
|
31
|
+
- Confirm URL pages are links and CSS is loaded.
|
|
32
|
+
|
|
33
|
+
## Related guidance
|
|
34
|
+
|
|
35
|
+
- `breadcrumb`
|
|
36
|
+
- `link`
|
|
37
|
+
- `button`
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "flowstack.agent-component.v1",
|
|
3
|
+
"id": "scroll-area",
|
|
4
|
+
"name": "ScrollArea",
|
|
5
|
+
"package": "@flowstack-ui/brick",
|
|
6
|
+
"layer": "brick",
|
|
7
|
+
"kind": "component",
|
|
8
|
+
"purpose": "Style a bounded scroll viewport and scrollbar anatomy while preserving Atom and native input behavior.",
|
|
9
|
+
"useWhen": [
|
|
10
|
+
"A rail, code region, table wrapper, or bounded panel needs Brick scrollbar presentation and owned overflow behavior."
|
|
11
|
+
],
|
|
12
|
+
"avoidWhen": [
|
|
13
|
+
{
|
|
14
|
+
"condition": "Ordinary page or content overflow works with native browser scrolling.",
|
|
15
|
+
"useInstead": "native overflow"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"composition": [
|
|
19
|
+
"Compose Viewport and the needed Scrollbar/Thumb parts inside Root, adding Corner for two-axis presentation; give the wrapper a real size constraint."
|
|
20
|
+
],
|
|
21
|
+
"rules": [
|
|
22
|
+
{
|
|
23
|
+
"id": "scroll-area-bounded",
|
|
24
|
+
"level": "must",
|
|
25
|
+
"statement": "Provide a bounded size; ScrollArea cannot create meaningful scrolling without a constrained viewport."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "scroll-area-native",
|
|
29
|
+
"level": "must",
|
|
30
|
+
"statement": "Preserve wheel, trackpad, touch, keyboard, focus, and nested page scrolling."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "scroll-area-css",
|
|
34
|
+
"level": "must",
|
|
35
|
+
"statement": "Load styles.css or core.css plus scroll-area.css."
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"commonMistakes": [
|
|
39
|
+
{
|
|
40
|
+
"mistake": "Using ScrollArea for every overflow or hiding clipped table content without horizontal scrolling.",
|
|
41
|
+
"correction": "Use native overflow by default and add ScrollArea with explicit horizontal behavior where it improves the contract."
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"validation": [
|
|
45
|
+
"Test both axes, mouse, trackpad, touch, keyboard, focus ring, nested scrolling, mobile tables, zoom, and RTL.",
|
|
46
|
+
"Confirm the viewport constraint and CSS are loaded."
|
|
47
|
+
],
|
|
48
|
+
"related": [
|
|
49
|
+
"table",
|
|
50
|
+
"data-grid",
|
|
51
|
+
"code-block",
|
|
52
|
+
"sidebar"
|
|
53
|
+
]
|
|
54
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# ScrollArea agent guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Style a bounded scroll viewport and scrollbar anatomy while preserving Atom and native input behavior.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
- A rail, code region, table wrapper, or bounded panel needs Brick scrollbar presentation and owned overflow behavior.
|
|
10
|
+
|
|
11
|
+
## Choose something else when
|
|
12
|
+
|
|
13
|
+
- Ordinary page or content overflow works with native browser scrolling. Use native overflow.
|
|
14
|
+
|
|
15
|
+
## Required composition
|
|
16
|
+
|
|
17
|
+
- Compose Viewport and the needed Scrollbar/Thumb parts inside Root, adding Corner for two-axis presentation; give the wrapper a real size constraint.
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- **MUST:** Provide a bounded size; ScrollArea cannot create meaningful scrolling without a constrained viewport.
|
|
22
|
+
- **MUST:** Preserve wheel, trackpad, touch, keyboard, focus, and nested page scrolling.
|
|
23
|
+
- **MUST:** Load styles.css or core.css plus scroll-area.css.
|
|
24
|
+
|
|
25
|
+
## Common mistakes
|
|
26
|
+
|
|
27
|
+
- **Avoid:** Using ScrollArea for every overflow or hiding clipped table content without horizontal scrolling. **Instead:** Use native overflow by default and add ScrollArea with explicit horizontal behavior where it improves the contract.
|
|
28
|
+
|
|
29
|
+
## Validation checklist
|
|
30
|
+
|
|
31
|
+
- Test both axes, mouse, trackpad, touch, keyboard, focus ring, nested scrolling, mobile tables, zoom, and RTL.
|
|
32
|
+
- Confirm the viewport constraint and CSS are loaded.
|
|
33
|
+
|
|
34
|
+
## Related guidance
|
|
35
|
+
|
|
36
|
+
- `table`
|
|
37
|
+
- `data-grid`
|
|
38
|
+
- `code-block`
|
|
39
|
+
- `sidebar`
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "flowstack.agent-component.v1",
|
|
3
|
+
"id": "show",
|
|
4
|
+
"name": "Show",
|
|
5
|
+
"package": "@flowstack-ui/brick",
|
|
6
|
+
"layer": "brick",
|
|
7
|
+
"kind": "component",
|
|
8
|
+
"purpose": "Show content only at selected Brick breakpoints through CSS, avoiding JavaScript viewport state and hydration flicker.",
|
|
9
|
+
"useWhen": [
|
|
10
|
+
"A complete region should appear only at selected Brick breakpoints."
|
|
11
|
+
],
|
|
12
|
+
"avoidWhen": [
|
|
13
|
+
{
|
|
14
|
+
"condition": "Content must remain available to assistive technology while visually hidden, or rendering depends on authorization or data.",
|
|
15
|
+
"useInstead": "VisuallyHidden or application conditional rendering"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"composition": [
|
|
19
|
+
"Wrap the smallest complete composition whose responsive presence changes; combine with Hide only for intentional alternate desktop/mobile structures."
|
|
20
|
+
],
|
|
21
|
+
"rules": [
|
|
22
|
+
{
|
|
23
|
+
"id": "show-first-paint",
|
|
24
|
+
"level": "must",
|
|
25
|
+
"statement": "Use Show's CSS breakpoint contract rather than client viewport detection for responsive first paint."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "show-valid-tree",
|
|
29
|
+
"level": "must",
|
|
30
|
+
"statement": "Keep IDs, landmarks, form relationships, and focus order valid in every visible alternative."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "show-css",
|
|
34
|
+
"level": "must",
|
|
35
|
+
"statement": "Load styles.css or core.css plus show.css."
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"commonMistakes": [
|
|
39
|
+
{
|
|
40
|
+
"mistake": "Forgetting show.css or rendering duplicate visible navigation because Show and Hide use the wrong thresholds.",
|
|
41
|
+
"correction": "Load the modular CSS and verify exact breakpoint boundaries."
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"validation": [
|
|
45
|
+
"Test boundary pixels, zoom, first paint, hydration, focus order, landmarks, and duplicate IDs.",
|
|
46
|
+
"Confirm CSS is loaded."
|
|
47
|
+
],
|
|
48
|
+
"related": [
|
|
49
|
+
"hide",
|
|
50
|
+
"visually-hidden",
|
|
51
|
+
"app-bar",
|
|
52
|
+
"drawer"
|
|
53
|
+
]
|
|
54
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Show agent guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Show content only at selected Brick breakpoints through CSS, avoiding JavaScript viewport state and hydration flicker.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
- A complete region should appear only at selected Brick breakpoints.
|
|
10
|
+
|
|
11
|
+
## Choose something else when
|
|
12
|
+
|
|
13
|
+
- Content must remain available to assistive technology while visually hidden, or rendering depends on authorization or data. Use VisuallyHidden or application conditional rendering.
|
|
14
|
+
|
|
15
|
+
## Required composition
|
|
16
|
+
|
|
17
|
+
- Wrap the smallest complete composition whose responsive presence changes; combine with Hide only for intentional alternate desktop/mobile structures.
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- **MUST:** Use Show's CSS breakpoint contract rather than client viewport detection for responsive first paint.
|
|
22
|
+
- **MUST:** Keep IDs, landmarks, form relationships, and focus order valid in every visible alternative.
|
|
23
|
+
- **MUST:** Load styles.css or core.css plus show.css.
|
|
24
|
+
|
|
25
|
+
## Common mistakes
|
|
26
|
+
|
|
27
|
+
- **Avoid:** Forgetting show.css or rendering duplicate visible navigation because Show and Hide use the wrong thresholds. **Instead:** Load the modular CSS and verify exact breakpoint boundaries.
|
|
28
|
+
|
|
29
|
+
## Validation checklist
|
|
30
|
+
|
|
31
|
+
- Test boundary pixels, zoom, first paint, hydration, focus order, landmarks, and duplicate IDs.
|
|
32
|
+
- Confirm CSS is loaded.
|
|
33
|
+
|
|
34
|
+
## Related guidance
|
|
35
|
+
|
|
36
|
+
- `hide`
|
|
37
|
+
- `visually-hidden`
|
|
38
|
+
- `app-bar`
|
|
39
|
+
- `drawer`
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "flowstack.agent-component.v1",
|
|
3
|
+
"id": "sidebar",
|
|
4
|
+
"name": "Sidebar",
|
|
5
|
+
"package": "@flowstack-ui/brick",
|
|
6
|
+
"layer": "brick",
|
|
7
|
+
"kind": "component",
|
|
8
|
+
"purpose": "Provide a finished application-shell side region with expanded, rail, and offcanvas visual states built on Atom Sidebar.",
|
|
9
|
+
"useWhen": [
|
|
10
|
+
"An application shell has persistent navigation or tools that collapse to a rail or leave the layout offcanvas."
|
|
11
|
+
],
|
|
12
|
+
"avoidWhen": [
|
|
13
|
+
{
|
|
14
|
+
"condition": "The side panel is a temporary modal mobile menu or a static content aside.",
|
|
15
|
+
"useInstead": "Drawer or a semantic page region"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"composition": [
|
|
19
|
+
"Compose Root with Trigger, Panel, and Main; place NavList and other Brick content inside Panel and keep one page-level main landmark."
|
|
20
|
+
],
|
|
21
|
+
"rules": [
|
|
22
|
+
{
|
|
23
|
+
"id": "sidebar-layout-owner",
|
|
24
|
+
"level": "must",
|
|
25
|
+
"statement": "Use Sidebar state and public layout hooks instead of manually translating a generic aside and overlapping its active items."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "sidebar-main",
|
|
29
|
+
"level": "must",
|
|
30
|
+
"statement": "Avoid duplicate main landmarks when composing Sidebar.Main into an existing shell."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "sidebar-css",
|
|
34
|
+
"level": "must",
|
|
35
|
+
"statement": "Load styles.css or core.css plus sidebar.css and every composed child stylesheet."
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"commonMistakes": [
|
|
39
|
+
{
|
|
40
|
+
"mistake": "Using Sidebar as a modal drawer or letting highlighted rail items overflow into Main.",
|
|
41
|
+
"correction": "Use Drawer for modal use and validate Sidebar's expanded, rail, and offcanvas geometry."
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"validation": [
|
|
45
|
+
"Check every state, both sides, current navigation item, long labels, icons, counts, trigger, focus, inert offcanvas state, zoom, narrow widths, and RTL.",
|
|
46
|
+
"Confirm landmark names and CSS delivery."
|
|
47
|
+
],
|
|
48
|
+
"related": [
|
|
49
|
+
"nav-list",
|
|
50
|
+
"drawer",
|
|
51
|
+
"app-bar",
|
|
52
|
+
"container",
|
|
53
|
+
"show",
|
|
54
|
+
"hide"
|
|
55
|
+
]
|
|
56
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Sidebar agent guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Provide a finished application-shell side region with expanded, rail, and offcanvas visual states built on Atom Sidebar.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
- An application shell has persistent navigation or tools that collapse to a rail or leave the layout offcanvas.
|
|
10
|
+
|
|
11
|
+
## Choose something else when
|
|
12
|
+
|
|
13
|
+
- The side panel is a temporary modal mobile menu or a static content aside. Use Drawer or a semantic page region.
|
|
14
|
+
|
|
15
|
+
## Required composition
|
|
16
|
+
|
|
17
|
+
- Compose Root with Trigger, Panel, and Main; place NavList and other Brick content inside Panel and keep one page-level main landmark.
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- **MUST:** Use Sidebar state and public layout hooks instead of manually translating a generic aside and overlapping its active items.
|
|
22
|
+
- **MUST:** Avoid duplicate main landmarks when composing Sidebar.Main into an existing shell.
|
|
23
|
+
- **MUST:** Load styles.css or core.css plus sidebar.css and every composed child stylesheet.
|
|
24
|
+
|
|
25
|
+
## Common mistakes
|
|
26
|
+
|
|
27
|
+
- **Avoid:** Using Sidebar as a modal drawer or letting highlighted rail items overflow into Main. **Instead:** Use Drawer for modal use and validate Sidebar's expanded, rail, and offcanvas geometry.
|
|
28
|
+
|
|
29
|
+
## Validation checklist
|
|
30
|
+
|
|
31
|
+
- Check every state, both sides, current navigation item, long labels, icons, counts, trigger, focus, inert offcanvas state, zoom, narrow widths, and RTL.
|
|
32
|
+
- Confirm landmark names and CSS delivery.
|
|
33
|
+
|
|
34
|
+
## Related guidance
|
|
35
|
+
|
|
36
|
+
- `nav-list`
|
|
37
|
+
- `drawer`
|
|
38
|
+
- `app-bar`
|
|
39
|
+
- `container`
|
|
40
|
+
- `show`
|
|
41
|
+
- `hide`
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "flowstack.agent-component.v1",
|
|
3
|
+
"id": "skip-link",
|
|
4
|
+
"name": "SkipLink",
|
|
5
|
+
"package": "@flowstack-ui/brick",
|
|
6
|
+
"layer": "brick",
|
|
7
|
+
"kind": "component",
|
|
8
|
+
"purpose": "Provide a visibly focused skip-navigation control and matching main-content target using Atom focus behavior.",
|
|
9
|
+
"useWhen": [
|
|
10
|
+
"A page repeats header or navigation content before main content."
|
|
11
|
+
],
|
|
12
|
+
"avoidWhen": [
|
|
13
|
+
{
|
|
14
|
+
"condition": "No repeated content precedes the primary content.",
|
|
15
|
+
"useInstead": "normal document focus order"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"composition": [
|
|
19
|
+
"Place Root as the first useful focus target and one matching Target at main content; let Target own the main landmark unless custom-rendered."
|
|
20
|
+
],
|
|
21
|
+
"rules": [
|
|
22
|
+
{
|
|
23
|
+
"id": "skip-link-visible-focus",
|
|
24
|
+
"level": "must",
|
|
25
|
+
"statement": "Keep Root visible and readable when focused in every theme and viewport."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "skip-link-one-main",
|
|
29
|
+
"level": "must",
|
|
30
|
+
"statement": "Do not create duplicate main landmarks around Target."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "skip-link-css",
|
|
34
|
+
"level": "must",
|
|
35
|
+
"statement": "Load styles.css or core.css plus skip-link.css."
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"commonMistakes": [
|
|
39
|
+
{
|
|
40
|
+
"mistake": "Hiding the link permanently, clipping its focus ring, or targeting a missing id.",
|
|
41
|
+
"correction": "Use the matching Root/Target pair and test from the browser chrome."
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"validation": [
|
|
45
|
+
"Tab to Root, activate it, and confirm Target receives visible focus and scrolls into view.",
|
|
46
|
+
"Check themes, zoom, sticky headers, one main landmark, and CSS delivery."
|
|
47
|
+
],
|
|
48
|
+
"related": [
|
|
49
|
+
"app-bar",
|
|
50
|
+
"sidebar",
|
|
51
|
+
"link"
|
|
52
|
+
]
|
|
53
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# SkipLink agent guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Provide a visibly focused skip-navigation control and matching main-content target using Atom focus behavior.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
- A page repeats header or navigation content before main content.
|
|
10
|
+
|
|
11
|
+
## Choose something else when
|
|
12
|
+
|
|
13
|
+
- No repeated content precedes the primary content. Use normal document focus order.
|
|
14
|
+
|
|
15
|
+
## Required composition
|
|
16
|
+
|
|
17
|
+
- Place Root as the first useful focus target and one matching Target at main content; let Target own the main landmark unless custom-rendered.
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- **MUST:** Keep Root visible and readable when focused in every theme and viewport.
|
|
22
|
+
- **MUST:** Do not create duplicate main landmarks around Target.
|
|
23
|
+
- **MUST:** Load styles.css or core.css plus skip-link.css.
|
|
24
|
+
|
|
25
|
+
## Common mistakes
|
|
26
|
+
|
|
27
|
+
- **Avoid:** Hiding the link permanently, clipping its focus ring, or targeting a missing id. **Instead:** Use the matching Root/Target pair and test from the browser chrome.
|
|
28
|
+
|
|
29
|
+
## Validation checklist
|
|
30
|
+
|
|
31
|
+
- Tab to Root, activate it, and confirm Target receives visible focus and scrolls into view.
|
|
32
|
+
- Check themes, zoom, sticky headers, one main landmark, and CSS delivery.
|
|
33
|
+
|
|
34
|
+
## Related guidance
|
|
35
|
+
|
|
36
|
+
- `app-bar`
|
|
37
|
+
- `sidebar`
|
|
38
|
+
- `link`
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "flowstack.agent-component.v1",
|
|
3
|
+
"id": "stack",
|
|
4
|
+
"name": "Stack",
|
|
5
|
+
"package": "@flowstack-ui/brick",
|
|
6
|
+
"layer": "brick",
|
|
7
|
+
"kind": "component",
|
|
8
|
+
"purpose": "Arrange children in one tokenized row or column with logical spacing, alignment, wrapping, and responsive-friendly public props.",
|
|
9
|
+
"useWhen": [
|
|
10
|
+
"Content needs one-dimensional vertical or horizontal layout."
|
|
11
|
+
],
|
|
12
|
+
"avoidWhen": [
|
|
13
|
+
{
|
|
14
|
+
"condition": "Both rows and columns need explicit track control.",
|
|
15
|
+
"useInstead": "Grid"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"composition": [
|
|
19
|
+
"Choose VStack for vertical flow or HStack for horizontal flow; set gap and alignment from the content relationship."
|
|
20
|
+
],
|
|
21
|
+
"rules": [
|
|
22
|
+
{
|
|
23
|
+
"id": "stack-one-dimension",
|
|
24
|
+
"level": "must",
|
|
25
|
+
"statement": "Use Stack for one primary layout axis and allow wrapping only when the resulting order remains clear."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "stack-css",
|
|
29
|
+
"level": "must",
|
|
30
|
+
"statement": "Load styles.css or core.css plus stack.css."
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"commonMistakes": [
|
|
34
|
+
{
|
|
35
|
+
"mistake": "Adding repeated custom flex utilities for ordinary rows and columns.",
|
|
36
|
+
"correction": "Use Stack so spacing and logical-direction behavior stay on the Brick contract."
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"validation": [
|
|
40
|
+
"Check source and visual order at narrow widths and zoom.",
|
|
41
|
+
"Check gap, wrapping, alignment, and RTL behavior."
|
|
42
|
+
],
|
|
43
|
+
"related": [
|
|
44
|
+
"grid",
|
|
45
|
+
"surface",
|
|
46
|
+
"card"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Stack agent guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Arrange children in one tokenized row or column with logical spacing, alignment, wrapping, and responsive-friendly public props.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
- Content needs one-dimensional vertical or horizontal layout.
|
|
10
|
+
|
|
11
|
+
## Choose something else when
|
|
12
|
+
|
|
13
|
+
- Both rows and columns need explicit track control. Use Grid.
|
|
14
|
+
|
|
15
|
+
## Required composition
|
|
16
|
+
|
|
17
|
+
- Choose VStack for vertical flow or HStack for horizontal flow; set gap and alignment from the content relationship.
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- **MUST:** Use Stack for one primary layout axis and allow wrapping only when the resulting order remains clear.
|
|
22
|
+
- **MUST:** Load styles.css or core.css plus stack.css.
|
|
23
|
+
|
|
24
|
+
## Common mistakes
|
|
25
|
+
|
|
26
|
+
- **Avoid:** Adding repeated custom flex utilities for ordinary rows and columns. **Instead:** Use Stack so spacing and logical-direction behavior stay on the Brick contract.
|
|
27
|
+
|
|
28
|
+
## Validation checklist
|
|
29
|
+
|
|
30
|
+
- Check source and visual order at narrow widths and zoom.
|
|
31
|
+
- Check gap, wrapping, alignment, and RTL behavior.
|
|
32
|
+
|
|
33
|
+
## Related guidance
|
|
34
|
+
|
|
35
|
+
- `grid`
|
|
36
|
+
- `surface`
|
|
37
|
+
- `card`
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "flowstack.agent-component.v1",
|
|
3
|
+
"id": "surface",
|
|
4
|
+
"name": "Surface",
|
|
5
|
+
"package": "@flowstack-ui/brick",
|
|
6
|
+
"layer": "brick",
|
|
7
|
+
"kind": "component",
|
|
8
|
+
"purpose": "Apply semantic background layers, boundaries, elevation, radius, and inset without implying a specific content object.",
|
|
9
|
+
"useWhen": [
|
|
10
|
+
"A region needs a semantic visual plane but Card, Dialog, or another purposeful component would add the wrong anatomy."
|
|
11
|
+
],
|
|
12
|
+
"avoidWhen": [
|
|
13
|
+
{
|
|
14
|
+
"condition": "The region represents one bounded subject with card anatomy.",
|
|
15
|
+
"useInstead": "Card"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"composition": [
|
|
19
|
+
"Choose Surface level and boundary by hierarchy, then compose public layout and content components inside."
|
|
20
|
+
],
|
|
21
|
+
"rules": [
|
|
22
|
+
{
|
|
23
|
+
"id": "surface-semantic-level",
|
|
24
|
+
"level": "should",
|
|
25
|
+
"statement": "Choose surface level by information hierarchy, not decoration alone."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"id": "surface-css",
|
|
29
|
+
"level": "must",
|
|
30
|
+
"statement": "Load styles.css or core.css plus surface.css."
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"commonMistakes": [
|
|
34
|
+
{
|
|
35
|
+
"mistake": "Using arbitrary background colors to recreate a surface.",
|
|
36
|
+
"correction": "Use Surface and theme its semantic tokens."
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"validation": [
|
|
40
|
+
"Check foreground contrast against the selected surface in every appearance.",
|
|
41
|
+
"Confirm nested surfaces communicate hierarchy without excessive borders or elevation."
|
|
42
|
+
],
|
|
43
|
+
"related": [
|
|
44
|
+
"card",
|
|
45
|
+
"stack",
|
|
46
|
+
"grid"
|
|
47
|
+
]
|
|
48
|
+
}
|