@flowstack-ui/brick 0.1.4 → 0.1.6
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 +14 -2
- package/dist/agents/accordion.json +80 -0
- package/dist/agents/accordion.md +48 -0
- package/dist/agents/app-bar.json +20 -3
- package/dist/agents/app-bar.md +7 -2
- package/dist/agents/appearance.json +84 -0
- package/dist/agents/appearance.md +48 -0
- package/dist/agents/badge.json +64 -0
- package/dist/agents/badge.md +41 -0
- package/dist/agents/card.json +5 -0
- package/dist/agents/card.md +1 -0
- package/dist/agents/carousel.json +131 -0
- package/dist/agents/carousel.md +64 -0
- package/dist/agents/collapsible.json +81 -0
- package/dist/agents/collapsible.md +49 -0
- package/dist/agents/container.json +10 -4
- package/dist/agents/container.md +4 -2
- package/dist/agents/divider.json +11 -5
- package/dist/agents/divider.md +5 -3
- package/dist/agents/drawer.json +34 -4
- package/dist/agents/drawer.md +10 -2
- package/dist/agents/frame.json +74 -0
- package/dist/agents/frame.md +47 -0
- package/dist/agents/grid.json +18 -0
- package/dist/agents/grid.md +4 -0
- package/dist/agents/icon.json +98 -0
- package/dist/agents/icon.md +51 -0
- package/dist/agents/image.json +18 -2
- package/dist/agents/image.md +5 -1
- package/dist/agents/interface-composition.json +153 -6
- package/dist/agents/interface-composition.md +42 -6
- package/dist/agents/layer-selection.json +13 -1
- package/dist/agents/layer-selection.md +4 -0
- package/dist/agents/list.json +80 -0
- package/dist/agents/list.md +48 -0
- package/dist/agents/manifest.json +61 -1
- package/dist/agents/nav-list.json +16 -5
- package/dist/agents/nav-list.md +6 -3
- package/dist/agents/navigation-menu.json +15 -1
- package/dist/agents/navigation-menu.md +4 -1
- package/dist/agents/scroll-area.json +8 -3
- package/dist/agents/scroll-area.md +4 -3
- package/dist/agents/section.json +65 -0
- package/dist/agents/section.md +42 -0
- package/dist/agents/stack.json +29 -5
- package/dist/agents/stack.md +14 -4
- package/dist/agents/surface.json +42 -4
- package/dist/agents/surface.md +13 -2
- package/dist/agents/tabs.json +17 -2
- package/dist/agents/tabs.md +8 -1
- package/dist/agents/text.json +19 -4
- package/dist/agents/text.md +6 -3
- package/dist/agents/z-stack.json +66 -0
- package/dist/agents/z-stack.md +41 -0
- package/dist/appearance.d.ts +2 -0
- package/dist/appearance.d.ts.map +1 -0
- package/dist/appearance.js +2 -0
- package/dist/appearance.js.map +1 -0
- package/dist/carousel.d.ts +3 -0
- package/dist/carousel.d.ts.map +1 -0
- package/dist/carousel.js +3 -0
- package/dist/carousel.js.map +1 -0
- package/dist/components/_responsive-value/ResponsiveValue.d.ts +9 -0
- package/dist/components/_responsive-value/ResponsiveValue.d.ts.map +1 -0
- package/dist/components/_responsive-value/ResponsiveValue.js +22 -0
- package/dist/components/_responsive-value/ResponsiveValue.js.map +1 -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/appearance/Appearance.d.ts +14 -0
- package/dist/components/appearance/Appearance.d.ts.map +1 -0
- package/dist/components/appearance/Appearance.js +39 -0
- package/dist/components/appearance/Appearance.js.map +1 -0
- package/dist/components/appearance/index.d.ts +2 -0
- package/dist/components/appearance/index.d.ts.map +1 -0
- package/dist/components/appearance/index.js +2 -0
- package/dist/components/appearance/index.js.map +1 -0
- package/dist/components/card/Card.d.ts +1 -0
- package/dist/components/card/Card.d.ts.map +1 -1
- package/dist/components/card/Card.js +2 -1
- package/dist/components/card/Card.js.map +1 -1
- package/dist/components/carousel/Carousel.d.ts +80 -0
- package/dist/components/carousel/Carousel.d.ts.map +1 -0
- package/dist/components/carousel/Carousel.js +90 -0
- package/dist/components/carousel/Carousel.js.map +1 -0
- package/dist/components/carousel/index.d.ts +2 -0
- package/dist/components/carousel/index.d.ts.map +1 -0
- package/dist/components/carousel/index.js +2 -0
- package/dist/components/carousel/index.js.map +1 -0
- 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/divider/Divider.js +2 -2
- package/dist/components/divider/Divider.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/frame/Frame.d.ts +28 -0
- package/dist/components/frame/Frame.d.ts.map +1 -0
- package/dist/components/frame/Frame.js +84 -0
- package/dist/components/frame/Frame.js.map +1 -0
- package/dist/components/frame/index.d.ts +2 -0
- package/dist/components/frame/index.d.ts.map +1 -0
- package/dist/components/frame/index.js +2 -0
- package/dist/components/frame/index.js.map +1 -0
- package/dist/components/grid/Grid.d.ts +28 -11
- package/dist/components/grid/Grid.d.ts.map +1 -1
- package/dist/components/grid/Grid.js +77 -14
- package/dist/components/grid/Grid.js.map +1 -1
- package/dist/components/grid/index.d.ts +1 -1
- package/dist/components/grid/index.d.ts.map +1 -1
- package/dist/components/grid/index.js.map +1 -1
- package/dist/components/image/Image.d.ts +4 -0
- package/dist/components/image/Image.d.ts.map +1 -1
- package/dist/components/image/Image.js +4 -4
- package/dist/components/image/Image.js.map +1 -1
- package/dist/components/image/index.d.ts +1 -1
- package/dist/components/image/index.d.ts.map +1 -1
- package/dist/components/image/index.js +1 -1
- package/dist/components/image/index.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/section/Section.d.ts +18 -0
- package/dist/components/section/Section.d.ts.map +1 -0
- package/dist/components/section/Section.js +29 -0
- package/dist/components/section/Section.js.map +1 -0
- package/dist/components/section/index.d.ts +2 -0
- package/dist/components/section/index.d.ts.map +1 -0
- package/dist/components/section/index.js +2 -0
- package/dist/components/section/index.js.map +1 -0
- package/dist/components/stack/Stack.d.ts +33 -8
- package/dist/components/stack/Stack.d.ts.map +1 -1
- package/dist/components/stack/Stack.js +71 -14
- package/dist/components/stack/Stack.js.map +1 -1
- package/dist/components/stack/index.d.ts +1 -1
- package/dist/components/stack/index.d.ts.map +1 -1
- package/dist/components/stack/index.js.map +1 -1
- package/dist/components/surface/Surface.d.ts +41 -3
- package/dist/components/surface/Surface.d.ts.map +1 -1
- package/dist/components/surface/Surface.js +79 -6
- package/dist/components/surface/Surface.js.map +1 -1
- package/dist/components/surface/index.d.ts +1 -1
- package/dist/components/surface/index.d.ts.map +1 -1
- package/dist/components/surface/index.js +1 -1
- package/dist/components/surface/index.js.map +1 -1
- package/dist/components/tabs/Tabs.d.ts +27 -6
- package/dist/components/tabs/Tabs.d.ts.map +1 -1
- package/dist/components/tabs/Tabs.js +10 -6
- package/dist/components/tabs/Tabs.js.map +1 -1
- package/dist/components/tabs/index.d.ts +1 -1
- package/dist/components/tabs/index.d.ts.map +1 -1
- package/dist/components/tabs/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/components/z-stack/ZStack.d.ts +43 -0
- package/dist/components/z-stack/ZStack.d.ts.map +1 -0
- package/dist/components/z-stack/ZStack.js +70 -0
- package/dist/components/z-stack/ZStack.js.map +1 -0
- package/dist/components/z-stack/index.d.ts +2 -0
- package/dist/components/z-stack/index.d.ts.map +1 -0
- package/dist/components/z-stack/index.js +2 -0
- package/dist/components/z-stack/index.js.map +1 -0
- 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/frame.d.ts +2 -0
- package/dist/frame.d.ts.map +1 -0
- package/dist/frame.js +2 -0
- package/dist/frame.js.map +1 -0
- package/dist/grid.d.ts +1 -1
- package/dist/grid.d.ts.map +1 -1
- package/dist/grid.js.map +1 -1
- package/dist/image.d.ts +1 -1
- package/dist/image.d.ts.map +1 -1
- package/dist/image.js +1 -1
- package/dist/image.js.map +1 -1
- package/dist/index.d.ts +12 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/section.d.ts +2 -0
- package/dist/section.d.ts.map +1 -0
- package/dist/section.js +2 -0
- package/dist/section.js.map +1 -0
- package/dist/stack.d.ts +1 -1
- package/dist/stack.d.ts.map +1 -1
- package/dist/stack.js.map +1 -1
- package/dist/styles/accordion.css +1 -1
- package/dist/styles/accordion.css.map +1 -1
- package/dist/styles/alert-dialog.css +1 -1
- package/dist/styles/alert-dialog.css.map +1 -1
- package/dist/styles/app-bar.css +1 -1
- package/dist/styles/app-bar.css.map +1 -1
- package/dist/styles/appearance.css +2 -0
- package/dist/styles/appearance.css.map +1 -0
- package/dist/styles/aspect-ratio.css +1 -1
- package/dist/styles/aspect-ratio.css.map +1 -1
- package/dist/styles/avatar.css +1 -1
- package/dist/styles/avatar.css.map +1 -1
- package/dist/styles/badge.css +1 -1
- package/dist/styles/badge.css.map +1 -1
- package/dist/styles/bottom-navigation.css +1 -1
- package/dist/styles/bottom-navigation.css.map +1 -1
- package/dist/styles/breadcrumb.css +1 -1
- package/dist/styles/breadcrumb.css.map +1 -1
- package/dist/styles/button.css +1 -1
- package/dist/styles/button.css.map +1 -1
- package/dist/styles/card.css +1 -1
- package/dist/styles/card.css.map +1 -1
- package/dist/styles/carousel.css +2 -0
- package/dist/styles/carousel.css.map +1 -0
- package/dist/styles/checkbox-group.css +1 -1
- package/dist/styles/checkbox-group.css.map +1 -1
- package/dist/styles/checkbox.css +1 -1
- package/dist/styles/checkbox.css.map +1 -1
- package/dist/styles/chip.css +1 -1
- package/dist/styles/chip.css.map +1 -1
- package/dist/styles/code-block.css +1 -1
- package/dist/styles/code-block.css.map +1 -1
- package/dist/styles/code.css +1 -1
- package/dist/styles/code.css.map +1 -1
- package/dist/styles/collapsible.css +1 -1
- package/dist/styles/collapsible.css.map +1 -1
- package/dist/styles/combobox.css +1 -1
- package/dist/styles/combobox.css.map +1 -1
- package/dist/styles/container.css +1 -1
- package/dist/styles/container.css.map +1 -1
- package/dist/styles/context-menu.css +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/data-grid.css +1 -1
- package/dist/styles/data-grid.css.map +1 -1
- package/dist/styles/dialog.css +1 -1
- package/dist/styles/dialog.css.map +1 -1
- package/dist/styles/divider.css +1 -1
- package/dist/styles/divider.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 +1 -1
- package/dist/styles/dropdown-menu.css.map +1 -1
- package/dist/styles/feed.css +1 -1
- package/dist/styles/feed.css.map +1 -1
- package/dist/styles/field.css +1 -1
- package/dist/styles/field.css.map +1 -1
- package/dist/styles/fieldset.css +1 -1
- package/dist/styles/fieldset.css.map +1 -1
- package/dist/styles/file-upload.css +1 -1
- package/dist/styles/file-upload.css.map +1 -1
- package/dist/styles/form.css +1 -1
- package/dist/styles/form.css.map +1 -1
- package/dist/styles/frame.css +2 -0
- package/dist/styles/frame.css.map +1 -0
- package/dist/styles/grid.css +1 -1
- package/dist/styles/grid.css.map +1 -1
- package/dist/styles/hide.css +1 -1
- package/dist/styles/hide.css.map +1 -1
- package/dist/styles/hover-card.css +1 -1
- package/dist/styles/hover-card.css.map +1 -1
- package/dist/styles/icon-button.css +1 -1
- package/dist/styles/icon-button.css.map +1 -1
- package/dist/styles/icon.css +1 -1
- package/dist/styles/icon.css.map +1 -1
- package/dist/styles/image.css +1 -1
- package/dist/styles/image.css.map +1 -1
- package/dist/styles/input.css +1 -1
- package/dist/styles/input.css.map +1 -1
- package/dist/styles/link.css +1 -1
- package/dist/styles/link.css.map +1 -1
- package/dist/styles/list.css +1 -1
- package/dist/styles/list.css.map +1 -1
- package/dist/styles/menubar.css +1 -1
- package/dist/styles/menubar.css.map +1 -1
- package/dist/styles/multi-select.css +1 -1
- package/dist/styles/multi-select.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/number-input.css +1 -1
- package/dist/styles/number-input.css.map +1 -1
- package/dist/styles/otp-field.css +1 -1
- package/dist/styles/otp-field.css.map +1 -1
- package/dist/styles/pagination.css +1 -1
- package/dist/styles/pagination.css.map +1 -1
- package/dist/styles/password-toggle-field.css +1 -1
- package/dist/styles/password-toggle-field.css.map +1 -1
- package/dist/styles/popover.css +1 -1
- package/dist/styles/popover.css.map +1 -1
- package/dist/styles/progress-circle.css +1 -1
- package/dist/styles/progress-circle.css.map +1 -1
- package/dist/styles/progress.css +1 -1
- package/dist/styles/progress.css.map +1 -1
- package/dist/styles/radio-group.css +1 -1
- package/dist/styles/radio-group.css.map +1 -1
- package/dist/styles/rating.css +1 -1
- package/dist/styles/rating.css.map +1 -1
- package/dist/styles/scroll-area.css +1 -1
- package/dist/styles/scroll-area.css.map +1 -1
- package/dist/styles/section.css +2 -0
- package/dist/styles/section.css.map +1 -0
- package/dist/styles/select.css +1 -1
- package/dist/styles/select.css.map +1 -1
- package/dist/styles/show.css +1 -1
- package/dist/styles/show.css.map +1 -1
- package/dist/styles/sidebar.css +1 -1
- package/dist/styles/sidebar.css.map +1 -1
- package/dist/styles/skeleton.css +1 -1
- package/dist/styles/skeleton.css.map +1 -1
- package/dist/styles/skip-link.css +1 -1
- package/dist/styles/skip-link.css.map +1 -1
- package/dist/styles/slider.css +1 -1
- package/dist/styles/slider.css.map +1 -1
- package/dist/styles/stack.css +1 -1
- package/dist/styles/stack.css.map +1 -1
- package/dist/styles/surface.css +1 -1
- package/dist/styles/surface.css.map +1 -1
- package/dist/styles/swipeable-item.css +1 -1
- package/dist/styles/swipeable-item.css.map +1 -1
- package/dist/styles/switch.css +1 -1
- package/dist/styles/switch.css.map +1 -1
- package/dist/styles/table.css +1 -1
- package/dist/styles/table.css.map +1 -1
- package/dist/styles/tabs.css +1 -1
- package/dist/styles/tabs.css.map +1 -1
- package/dist/styles/text.css +1 -1
- package/dist/styles/text.css.map +1 -1
- package/dist/styles/textarea.css +1 -1
- package/dist/styles/textarea.css.map +1 -1
- package/dist/styles/toast.css +1 -1
- package/dist/styles/toast.css.map +1 -1
- package/dist/styles/toggle-group.css +1 -1
- package/dist/styles/toggle-group.css.map +1 -1
- package/dist/styles/toggle.css +1 -1
- package/dist/styles/toggle.css.map +1 -1
- package/dist/styles/toolbar.css +1 -1
- package/dist/styles/toolbar.css.map +1 -1
- package/dist/styles/tooltip.css +1 -1
- package/dist/styles/tooltip.css.map +1 -1
- package/dist/styles/tree-grid.css +1 -1
- package/dist/styles/tree-grid.css.map +1 -1
- package/dist/styles/tree.css +1 -1
- package/dist/styles/tree.css.map +1 -1
- package/dist/styles/visually-hidden.css +1 -1
- package/dist/styles/visually-hidden.css.map +1 -1
- package/dist/styles/z-stack.css +2 -0
- package/dist/styles/z-stack.css.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/dist/surface.d.ts +1 -1
- package/dist/surface.d.ts.map +1 -1
- package/dist/surface.js +1 -1
- package/dist/surface.js.map +1 -1
- package/dist/tokens.css +1 -1
- package/dist/tokens.css.map +1 -1
- package/dist/z-stack.d.ts +2 -0
- package/dist/z-stack.d.ts.map +1 -0
- package/dist/z-stack.js +2 -0
- package/dist/z-stack.js.map +1 -0
- package/docs/guides/appearance-and-tokens.md +91 -1
- package/package.json +22 -2
|
@@ -8,32 +8,58 @@ Build complete interfaces from Brick's structural, content, navigation, action,
|
|
|
8
8
|
|
|
9
9
|
1. Map the page into landmarks, bounded regions, layout relationships, content, navigation, actions, media, and responsive changes.
|
|
10
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.
|
|
13
|
-
5.
|
|
11
|
+
3. Compose from the outside inward: AppBar or page landmark, Section, Container, Grid or Stack, Surface or Card, then content and controls.
|
|
12
|
+
4. Decide how each child participates in its parent: content-sized, fixed, automatic, proportional, placed, stretched, or deliberately constrained.
|
|
13
|
+
5. 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
|
+
6. Audit responsive behavior, accessibility, CSS delivery, and native fallbacks before treating the composition as complete.
|
|
14
15
|
|
|
15
16
|
## Selection map
|
|
16
17
|
|
|
17
18
|
- **page width and gutters:** use Container. Do not reproduce max-width and inline padding on every section.
|
|
18
|
-
- **
|
|
19
|
+
- **major page-region rhythm:** use Section. Keep paint in Surface, width and gutters in Container, and local child relationships in Stack or Grid.
|
|
20
|
+
- **row or column relationship:** use HStack, VStack, or responsive Stack. Use fixed-axis conveniences when the axis stays fixed and Stack when the same content changes axis at a Brick breakpoint.
|
|
21
|
+
- **child flex allocation:** use Stack.Item. Choose content-sized, fixed, automatic, or proportional growth before writing flex CSS.
|
|
22
|
+
- **child grid participation:** use Grid.Item. Use spans, placement, or self-alignment; keep a real wrapper when it establishes the participation box and use asChild only when the child should be that box.
|
|
23
|
+
- **local logical size constraint:** use Frame. Use only for inline/block size or min/max constraints; keep parent participation on the owning layout Item and overflow in ScrollArea.
|
|
24
|
+
- **overlapping depth relationship:** use ZStack. Prefer Surface media anatomy for ordinary media, scrim, and foreground compositions.
|
|
19
25
|
- **track-based responsive layout:** use Grid. Use Stack when only one axis matters.
|
|
20
26
|
- **visual region:** use Surface or Card. Use Card for titled or actionable contained content and Surface for a general visual boundary.
|
|
27
|
+
- **local light or dark semantic-token boundary:** use Appearance. Pass exactly one existing host; it may contain any number of descendants, and Appearance adds no paint, layout, or wrapper.
|
|
21
28
|
- **brand or content image:** use Image. Keep alt text and fallback behavior intentional.
|
|
29
|
+
- **one of several peer campaigns or authored content regions:** use Carousel. Keep invariant evidence outside; let each Slide own a complete Surface when its media and message belong together.
|
|
22
30
|
- **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.
|
|
31
|
+
- **responsive desktop and mobile alternatives:** use Show and Hide. Use only when interface or content changes; use responsive Stack when only arrangement changes.
|
|
24
32
|
- **grouped application actions:** use Toolbar. Do not use AppBar.Toolbar as an ARIA toolbar.
|
|
33
|
+
- **several related disclosure sections:** use Accordion. Preserve Header, Trigger, Content, and ContentInner ownership; use Collapsible for one disclosure.
|
|
34
|
+
- **semantic item or sequence content:** use List. Use structured row parts only when needed and keep Trailing compact on narrow screens.
|
|
25
35
|
|
|
26
36
|
## Rules
|
|
27
37
|
|
|
28
38
|
- **MUST:** Assign page structure to Brick components before writing element-level CSS.
|
|
39
|
+
- **MUST:** Use Section's named responsive rhythm for major page regions; use as=div when spacing is needed without thematic section semantics.
|
|
40
|
+
- **MUST:** When Surface paint must cover Section rhythm, compose Surface asChild around Section so one host keeps the responsibilities separate.
|
|
41
|
+
- **MUST:** Build from a blueprint, select the owning Brick components, render their defaults, choose supported props, then apply Theme, Block, or application customization in that order.
|
|
42
|
+
- **MUST:** Keep one copy of content when only its layout changes; use responsive Stack values instead of duplicated Show/Hide trees.
|
|
43
|
+
- **MUST:** Use responsive Grid tracks, gaps, spans, and alignment or responsive ZStack logical placement when only those relationships change; do not duplicate content or change semantic order.
|
|
44
|
+
- **MUST:** Separate component internal geometry from parent participation; configure the finished component for its anatomy and the owning layout or Item part for its relationship to siblings.
|
|
45
|
+
- **MUST:** Use Frame for a qualified local logical size constraint instead of repeating width/height CSS or adding size props to a finished component; do not use Frame when Container measure, layout participation, AspectRatio, or ScrollArea owns the actual job.
|
|
46
|
+
- **MUST:** Keep a real layout-item wrapper when it establishes flex or grid participation or the definite parent size required by ScrollArea, Carousel fill, or Image fill; asChild is not a wrapper-removal goal by itself.
|
|
29
47
|
- **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
48
|
- **MUST:** Preserve document landmarks and semantic elements when Brick does not provide an owner; Brick-first is not permission to erase HTML meaning.
|
|
49
|
+
- **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.
|
|
50
|
+
- **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.
|
|
31
51
|
- **SHOULD:** Express reusable brand values through semantic Brick tokens and a theme rather than repeating literal application values.
|
|
52
|
+
- **MUST:** For a locally dark or light region, pass the existing region owner as the one direct child of Appearance and provide complete appearance-dependent color and shadow values for explicit light and dark re-entry; keep typography, density, geometry, and motion on the shared Theme root, and do not recolor descendants independently or add a Surface only to carry appearance.
|
|
53
|
+
- **MUST:** When a portal leaves a local appearance scope, either target a portal container inside that scope or apply Appearance to every portalled visual root; never assume the trigger's CSS ancestry crosses the portal.
|
|
54
|
+
- **SHOULD:** Use ZStack for reusable nine-position overlap; retain narrow application positioning only for artwork coordinates that ZStack intentionally does not own.
|
|
55
|
+
- **MUST:** Classify findings before changing a package: behavior and accessibility belong to Atom, finished reusable component paint belongs to Brick, brand values belong to Theme, repeated responsive section composition may belong to Block or Blueprint, and one-page art direction remains application-owned.
|
|
32
56
|
- **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.
|
|
33
57
|
- **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.
|
|
34
58
|
- **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.
|
|
35
59
|
- **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.
|
|
36
60
|
- **SHOULD:** Classify repeated purposeful sections as Block candidates and repeated page arrangements as Blueprint candidates only after real reuse evidence.
|
|
61
|
+
- **SHOULD:** Split long product compositions by stable responsibility—authored content, repeated item, invariant supporting region, and outer assembly—without pretending those local modules are reusable Brick components.
|
|
62
|
+
- **MUST:** Comment non-obvious ownership, accessibility order, breakpoint, sizing, and browser-lifecycle constraints; do not add comments that only translate a component name or prop into prose.
|
|
37
63
|
|
|
38
64
|
## Customization order
|
|
39
65
|
|
|
@@ -73,19 +99,29 @@ Emit this record for every native/framework fallback or direct stable-hook decla
|
|
|
73
99
|
|
|
74
100
|
- Inspect the rendered DOM, accessible names, heading order, landmarks, focus order, keyboard operation, touch targets, contrast, zoom, and RTL behavior.
|
|
75
101
|
- Test every adopted breakpoint without JavaScript-dependent first-paint flicker.
|
|
76
|
-
- Confirm layout primitives own ordinary gap, alignment, wrapping, width, and visibility before accepting custom CSS.
|
|
102
|
+
- Confirm layout primitives own ordinary gap, alignment, wrapping, width, and visibility before accepting custom CSS; verify separately meaningful inline nodes use layout gap rather than literal spaces or offsets.
|
|
103
|
+
- Confirm every ScrollArea, Carousel fill, and Image fill composition can name the ancestor that establishes its definite size; use Frame when that ancestor needs an explicit logical size constraint, and never expect the child to invent it.
|
|
104
|
+
- Confirm light to dark to light and dark to light to dark scopes restore the theme's complete semantic foreground, background, boundary, action, focus, status, scrim, shadow, and interaction-state pairs without child-by-child recoloring.
|
|
105
|
+
- Confirm every portalled visual root either remains inside the intended theme/appearance container or receives an explicit Appearance scope.
|
|
77
106
|
- 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.
|
|
107
|
+
- Confirm source order follows rendered ownership, static content is separate from interaction assembly when it obscures the component tree, and comments explain why a constraint exists rather than what an obvious line does.
|
|
78
108
|
- Run the package's CSS-delivery check and the application's accessibility, browser, and performance checks.
|
|
79
109
|
|
|
80
110
|
## Related guidance
|
|
81
111
|
|
|
82
112
|
- `layer-selection`
|
|
113
|
+
- `appearance`
|
|
83
114
|
- `app-bar`
|
|
115
|
+
- `section`
|
|
84
116
|
- `container`
|
|
85
117
|
- `stack`
|
|
118
|
+
- `z-stack`
|
|
86
119
|
- `grid`
|
|
120
|
+
- `frame`
|
|
87
121
|
- `surface`
|
|
88
122
|
- `card`
|
|
89
123
|
- `navigation-menu`
|
|
90
124
|
- `show`
|
|
91
125
|
- `hide`
|
|
126
|
+
- `accordion`
|
|
127
|
+
- `list`
|
|
@@ -48,6 +48,16 @@
|
|
|
48
48
|
"intent": "navigation destination",
|
|
49
49
|
"use": "Link or Button with href",
|
|
50
50
|
"note": "Use Link for ordinary navigation and Button only for an emphasized destination."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"intent": "grouped disclosure sections",
|
|
54
|
+
"use": "Accordion",
|
|
55
|
+
"note": "Choose Collapsible for one independent disclosure and Tabs for one shared switching panel."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"intent": "ordered or unordered content",
|
|
59
|
+
"use": "List",
|
|
60
|
+
"note": "Choose NavList, an interactive collection, Table, or DataGrid when rows navigate, select, activate, or expose data relationships."
|
|
51
61
|
}
|
|
52
62
|
],
|
|
53
63
|
"rules": [
|
|
@@ -102,6 +112,8 @@
|
|
|
102
112
|
"text",
|
|
103
113
|
"image",
|
|
104
114
|
"show",
|
|
105
|
-
"hide"
|
|
115
|
+
"hide",
|
|
116
|
+
"accordion",
|
|
117
|
+
"list"
|
|
106
118
|
]
|
|
107
119
|
}
|
|
@@ -21,6 +21,8 @@ Choose the correct FLOWSTACK layer and require Brick-first composition when buil
|
|
|
21
21
|
- **responsive presence:** use Show or Hide. Use CSS media visibility rather than rendering two JavaScript-controlled trees.
|
|
22
22
|
- **image with resilient loading:** use Image. Use an adapter only when a framework image optimizer provides a measured capability Brick lacks.
|
|
23
23
|
- **navigation destination:** use Link or Button with href. Use Link for ordinary navigation and Button only for an emphasized destination.
|
|
24
|
+
- **grouped disclosure sections:** use Accordion. Choose Collapsible for one independent disclosure and Tabs for one shared switching panel.
|
|
25
|
+
- **ordered or unordered content:** use List. Choose NavList, an interactive collection, Table, or DataGrid when rows navigate, select, activate, or expose data relationships.
|
|
24
26
|
|
|
25
27
|
## Rules
|
|
26
28
|
|
|
@@ -55,3 +57,5 @@ Choose the correct FLOWSTACK layer and require Brick-first composition when buil
|
|
|
55
57
|
- `image`
|
|
56
58
|
- `show`
|
|
57
59
|
- `hide`
|
|
60
|
+
- `accordion`
|
|
61
|
+
- `list`
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "flowstack.agent-component.v1",
|
|
3
|
+
"id": "list",
|
|
4
|
+
"name": "List",
|
|
5
|
+
"package": "@flowstack-ui/brick",
|
|
6
|
+
"layer": "brick",
|
|
7
|
+
"kind": "component",
|
|
8
|
+
"purpose": "Render finished ordered or unordered content with native list semantics, optional structured rows, markers, density, and boundaries.",
|
|
9
|
+
"useWhen": [
|
|
10
|
+
"Content is naturally a set of peer items or a sequence and needs Brick's finished list presentation."
|
|
11
|
+
],
|
|
12
|
+
"avoidWhen": [
|
|
13
|
+
{
|
|
14
|
+
"condition": "Rows are persistent route destinations or need current-route state.",
|
|
15
|
+
"useInstead": "NavList"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"condition": "Rows form a keyboard-operated choice, action collection, data table, or two-dimensional grid.",
|
|
19
|
+
"useInstead": "Listbox, Menu, Table, or DataGrid according to the interaction"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"condition": "Content only needs visual spacing and has no list relationship.",
|
|
23
|
+
"useInstead": "Stack or Grid"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"composition": [
|
|
27
|
+
"Compose Root > Item; for structured rows use Leading, Content with Title and Description, then Trailing in that order.",
|
|
28
|
+
"Use ordered only when sequence changes meaning and preserve native list hosts when composing with asChild or render.",
|
|
29
|
+
"Keep Trailing for compact metadata or controls; when a long action would narrow supporting copy, place the action with the title inside Content using Brick layout instead."
|
|
30
|
+
],
|
|
31
|
+
"rules": [
|
|
32
|
+
{
|
|
33
|
+
"id": "list-native-relationship",
|
|
34
|
+
"level": "must",
|
|
35
|
+
"statement": "Use List only for a real item or sequence relationship and preserve native list semantics."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "list-structured-order",
|
|
39
|
+
"level": "must",
|
|
40
|
+
"statement": "Keep structured row parts in Leading, Content, Trailing order and use one Content and one Trailing maximum per Item."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "list-trailing-width",
|
|
44
|
+
"level": "must",
|
|
45
|
+
"statement": "Keep Trailing compact; move long actions into a Content-owned layout when a fixed trailing column would damage narrow-screen reading."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "list-no-interaction",
|
|
49
|
+
"level": "must",
|
|
50
|
+
"statement": "Do not add row selection, activation, focus movement, or navigation behavior to List; choose the component that owns that interaction."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"id": "list-css",
|
|
54
|
+
"level": "must",
|
|
55
|
+
"statement": "Load styles.css or core.css plus list.css."
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"commonMistakes": [
|
|
59
|
+
{
|
|
60
|
+
"mistake": "Using List as a generic row layout, making an Item itself clickable, or placing a long action in Trailing until supporting text becomes a narrow column.",
|
|
61
|
+
"correction": "Use Stack or Grid for non-list layout, NavList or another interaction owner for clickable rows, and move long actions into Content's own layout."
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"mistake": "Assuming an Item's disabled presentation disables controls inside it.",
|
|
65
|
+
"correction": "Apply the proper disabled contract to every interactive descendant; List's disabled state is descriptive and visual only."
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"validation": [
|
|
69
|
+
"Inspect ul or ol and li output, ordered meaning, marker behavior, structured-part order, nesting, roles, and CSS delivery.",
|
|
70
|
+
"Test long titles and descriptions, compact and comfortable density, all variants and markers, 320 CSS px, 200 and 400 percent zoom, RTL, and forced colors.",
|
|
71
|
+
"Confirm Trailing content does not squeeze Content, controls have names and touch targets, disabled descendants are handled explicitly, and List adds no keyboard model."
|
|
72
|
+
],
|
|
73
|
+
"related": [
|
|
74
|
+
"nav-list",
|
|
75
|
+
"stack",
|
|
76
|
+
"grid",
|
|
77
|
+
"text",
|
|
78
|
+
"divider"
|
|
79
|
+
]
|
|
80
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# List agent guide
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Render finished ordered or unordered content with native list semantics, optional structured rows, markers, density, and boundaries.
|
|
6
|
+
|
|
7
|
+
## Use when
|
|
8
|
+
|
|
9
|
+
- Content is naturally a set of peer items or a sequence and needs Brick's finished list presentation.
|
|
10
|
+
|
|
11
|
+
## Choose something else when
|
|
12
|
+
|
|
13
|
+
- Rows are persistent route destinations or need current-route state. Use NavList.
|
|
14
|
+
- Rows form a keyboard-operated choice, action collection, data table, or two-dimensional grid. Use Listbox, Menu, Table, or DataGrid according to the interaction.
|
|
15
|
+
- Content only needs visual spacing and has no list relationship. Use Stack or Grid.
|
|
16
|
+
|
|
17
|
+
## Required composition
|
|
18
|
+
|
|
19
|
+
- Compose Root > Item; for structured rows use Leading, Content with Title and Description, then Trailing in that order.
|
|
20
|
+
- Use ordered only when sequence changes meaning and preserve native list hosts when composing with asChild or render.
|
|
21
|
+
- Keep Trailing for compact metadata or controls; when a long action would narrow supporting copy, place the action with the title inside Content using Brick layout instead.
|
|
22
|
+
|
|
23
|
+
## Rules
|
|
24
|
+
|
|
25
|
+
- **MUST:** Use List only for a real item or sequence relationship and preserve native list semantics.
|
|
26
|
+
- **MUST:** Keep structured row parts in Leading, Content, Trailing order and use one Content and one Trailing maximum per Item.
|
|
27
|
+
- **MUST:** Keep Trailing compact; move long actions into a Content-owned layout when a fixed trailing column would damage narrow-screen reading.
|
|
28
|
+
- **MUST:** Do not add row selection, activation, focus movement, or navigation behavior to List; choose the component that owns that interaction.
|
|
29
|
+
- **MUST:** Load styles.css or core.css plus list.css.
|
|
30
|
+
|
|
31
|
+
## Common mistakes
|
|
32
|
+
|
|
33
|
+
- **Avoid:** Using List as a generic row layout, making an Item itself clickable, or placing a long action in Trailing until supporting text becomes a narrow column. **Instead:** Use Stack or Grid for non-list layout, NavList or another interaction owner for clickable rows, and move long actions into Content's own layout.
|
|
34
|
+
- **Avoid:** Assuming an Item's disabled presentation disables controls inside it. **Instead:** Apply the proper disabled contract to every interactive descendant; List's disabled state is descriptive and visual only.
|
|
35
|
+
|
|
36
|
+
## Validation checklist
|
|
37
|
+
|
|
38
|
+
- Inspect ul or ol and li output, ordered meaning, marker behavior, structured-part order, nesting, roles, and CSS delivery.
|
|
39
|
+
- Test long titles and descriptions, compact and comfortable density, all variants and markers, 320 CSS px, 200 and 400 percent zoom, RTL, and forced colors.
|
|
40
|
+
- Confirm Trailing content does not squeeze Content, controls have names and touch targets, disabled descendants are handled explicitly, and List adds no keyboard model.
|
|
41
|
+
|
|
42
|
+
## Related guidance
|
|
43
|
+
|
|
44
|
+
- `nav-list`
|
|
45
|
+
- `stack`
|
|
46
|
+
- `grid`
|
|
47
|
+
- `text`
|
|
48
|
+
- `divider`
|
|
@@ -1,14 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "flowstack.agent-manifest.v1",
|
|
3
3
|
"package": "@flowstack-ui/brick",
|
|
4
|
-
"packageVersion": "0.1.
|
|
4
|
+
"packageVersion": "0.1.6",
|
|
5
5
|
"components": [
|
|
6
|
+
{
|
|
7
|
+
"id": "accordion",
|
|
8
|
+
"name": "Accordion",
|
|
9
|
+
"json": "./accordion.json",
|
|
10
|
+
"markdown": "./accordion.md"
|
|
11
|
+
},
|
|
6
12
|
{
|
|
7
13
|
"id": "app-bar",
|
|
8
14
|
"name": "AppBar",
|
|
9
15
|
"json": "./app-bar.json",
|
|
10
16
|
"markdown": "./app-bar.md"
|
|
11
17
|
},
|
|
18
|
+
{
|
|
19
|
+
"id": "appearance",
|
|
20
|
+
"name": "Appearance",
|
|
21
|
+
"json": "./appearance.json",
|
|
22
|
+
"markdown": "./appearance.md"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": "badge",
|
|
26
|
+
"name": "Badge",
|
|
27
|
+
"json": "./badge.json",
|
|
28
|
+
"markdown": "./badge.md"
|
|
29
|
+
},
|
|
12
30
|
{
|
|
13
31
|
"id": "bottom-navigation",
|
|
14
32
|
"name": "BottomNavigation",
|
|
@@ -33,12 +51,24 @@
|
|
|
33
51
|
"json": "./card.json",
|
|
34
52
|
"markdown": "./card.md"
|
|
35
53
|
},
|
|
54
|
+
{
|
|
55
|
+
"id": "carousel",
|
|
56
|
+
"name": "Carousel",
|
|
57
|
+
"json": "./carousel.json",
|
|
58
|
+
"markdown": "./carousel.md"
|
|
59
|
+
},
|
|
36
60
|
{
|
|
37
61
|
"id": "checkbox",
|
|
38
62
|
"name": "Checkbox",
|
|
39
63
|
"json": "./checkbox.json",
|
|
40
64
|
"markdown": "./checkbox.md"
|
|
41
65
|
},
|
|
66
|
+
{
|
|
67
|
+
"id": "collapsible",
|
|
68
|
+
"name": "Collapsible",
|
|
69
|
+
"json": "./collapsible.json",
|
|
70
|
+
"markdown": "./collapsible.md"
|
|
71
|
+
},
|
|
42
72
|
{
|
|
43
73
|
"id": "container",
|
|
44
74
|
"name": "Container",
|
|
@@ -75,6 +105,12 @@
|
|
|
75
105
|
"json": "./form.json",
|
|
76
106
|
"markdown": "./form.md"
|
|
77
107
|
},
|
|
108
|
+
{
|
|
109
|
+
"id": "frame",
|
|
110
|
+
"name": "Frame",
|
|
111
|
+
"json": "./frame.json",
|
|
112
|
+
"markdown": "./frame.md"
|
|
113
|
+
},
|
|
78
114
|
{
|
|
79
115
|
"id": "grid",
|
|
80
116
|
"name": "Grid",
|
|
@@ -93,6 +129,12 @@
|
|
|
93
129
|
"json": "./icon-button.json",
|
|
94
130
|
"markdown": "./icon-button.md"
|
|
95
131
|
},
|
|
132
|
+
{
|
|
133
|
+
"id": "icon",
|
|
134
|
+
"name": "Icon",
|
|
135
|
+
"json": "./icon.json",
|
|
136
|
+
"markdown": "./icon.md"
|
|
137
|
+
},
|
|
96
138
|
{
|
|
97
139
|
"id": "image",
|
|
98
140
|
"name": "Image",
|
|
@@ -111,6 +153,12 @@
|
|
|
111
153
|
"json": "./link.json",
|
|
112
154
|
"markdown": "./link.md"
|
|
113
155
|
},
|
|
156
|
+
{
|
|
157
|
+
"id": "list",
|
|
158
|
+
"name": "List",
|
|
159
|
+
"json": "./list.json",
|
|
160
|
+
"markdown": "./list.md"
|
|
161
|
+
},
|
|
114
162
|
{
|
|
115
163
|
"id": "nav-list",
|
|
116
164
|
"name": "NavList",
|
|
@@ -135,6 +183,12 @@
|
|
|
135
183
|
"json": "./scroll-area.json",
|
|
136
184
|
"markdown": "./scroll-area.md"
|
|
137
185
|
},
|
|
186
|
+
{
|
|
187
|
+
"id": "section",
|
|
188
|
+
"name": "Section",
|
|
189
|
+
"json": "./section.json",
|
|
190
|
+
"markdown": "./section.md"
|
|
191
|
+
},
|
|
138
192
|
{
|
|
139
193
|
"id": "show",
|
|
140
194
|
"name": "Show",
|
|
@@ -188,6 +242,12 @@
|
|
|
188
242
|
"name": "Toolbar",
|
|
189
243
|
"json": "./toolbar.json",
|
|
190
244
|
"markdown": "./toolbar.md"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"id": "z-stack",
|
|
248
|
+
"name": "ZStack",
|
|
249
|
+
"json": "./z-stack.json",
|
|
250
|
+
"markdown": "./z-stack.md"
|
|
191
251
|
}
|
|
192
252
|
],
|
|
193
253
|
"guides": [
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
}
|
|
17
17
|
],
|
|
18
18
|
"composition": [
|
|
19
|
-
"Compose Root > List > Item > Link; use SectionLabel for static groups and add SectionTrigger plus SectionContent only for real collapsible groups."
|
|
19
|
+
"Compose Root > List > Item > Link; use SectionLabel for static groups and add SectionTrigger plus SectionContent only for real collapsible groups. When repeated rows need Dividers, each Item owns its complete row or collapsible Section before the following boundary."
|
|
20
20
|
],
|
|
21
21
|
"rules": [
|
|
22
22
|
{
|
|
@@ -29,6 +29,16 @@
|
|
|
29
29
|
"level": "must",
|
|
30
30
|
"statement": "Use NavList's section and item anatomy rather than rebuilding rows, badges, icons, and collapse behavior with arbitrary divs."
|
|
31
31
|
},
|
|
32
|
+
{
|
|
33
|
+
"id": "nav-list-group-boundary",
|
|
34
|
+
"level": "must",
|
|
35
|
+
"statement": "Place a Divider after the complete navigation item or collapsible section it separates; never place it between a SectionTrigger and the SectionContent that trigger controls, and keep repeated boundaries under one consistent layout owner."
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "nav-list-shell-alignment",
|
|
39
|
+
"level": "must",
|
|
40
|
+
"statement": "Use the logical row-padding tokens when labels and trailing artwork need independent alignment with a surrounding shell; do not shift indicators with margins or transforms."
|
|
41
|
+
},
|
|
32
42
|
{
|
|
33
43
|
"id": "nav-list-css",
|
|
34
44
|
"level": "must",
|
|
@@ -37,18 +47,19 @@
|
|
|
37
47
|
],
|
|
38
48
|
"commonMistakes": [
|
|
39
49
|
{
|
|
40
|
-
"mistake": "Using buttons for routes
|
|
41
|
-
"correction": "Use Link for destinations
|
|
50
|
+
"mistake": "Using buttons for routes, adding a collapsible trigger that controls no content, placing a Divider between a trigger and its controlled destinations, or moving disclosure indicators with positional CSS.",
|
|
51
|
+
"correction": "Use Link for destinations, SectionLabel alone for static groups, keep a collapsible Section intact before its boundary, and use the logical row-padding tokens for shell alignment."
|
|
42
52
|
}
|
|
43
53
|
],
|
|
44
54
|
"validation": [
|
|
45
|
-
"Check current, hover, focus, collapsed, expanded, long labels, icons, counts, zoom, narrow widths, and RTL.",
|
|
55
|
+
"Check current, hover, focus, collapsed, expanded, complete-group divider placement, long labels, icons, counts, zoom, narrow widths, and RTL.",
|
|
46
56
|
"Confirm links and section relationships remain semantic and CSS is loaded."
|
|
47
57
|
],
|
|
48
58
|
"related": [
|
|
49
59
|
"sidebar",
|
|
50
60
|
"drawer",
|
|
51
61
|
"navigation-menu",
|
|
52
|
-
"link"
|
|
62
|
+
"link",
|
|
63
|
+
"divider"
|
|
53
64
|
]
|
|
54
65
|
}
|
package/dist/agents/nav-list.md
CHANGED
|
@@ -14,21 +14,23 @@ Style persistent route navigation with current state, optional section labels, a
|
|
|
14
14
|
|
|
15
15
|
## Required composition
|
|
16
16
|
|
|
17
|
-
- Compose Root > List > Item > Link; use SectionLabel for static groups and add SectionTrigger plus SectionContent only for real collapsible groups.
|
|
17
|
+
- Compose Root > List > Item > Link; use SectionLabel for static groups and add SectionTrigger plus SectionContent only for real collapsible groups. When repeated rows need Dividers, each Item owns its complete row or collapsible Section before the following boundary.
|
|
18
18
|
|
|
19
19
|
## Rules
|
|
20
20
|
|
|
21
21
|
- **MUST:** Set current destination state from the route and keep route items as links.
|
|
22
22
|
- **MUST:** Use NavList's section and item anatomy rather than rebuilding rows, badges, icons, and collapse behavior with arbitrary divs.
|
|
23
|
+
- **MUST:** Place a Divider after the complete navigation item or collapsible section it separates; never place it between a SectionTrigger and the SectionContent that trigger controls, and keep repeated boundaries under one consistent layout owner.
|
|
24
|
+
- **MUST:** Use the logical row-padding tokens when labels and trailing artwork need independent alignment with a surrounding shell; do not shift indicators with margins or transforms.
|
|
23
25
|
- **MUST:** Load styles.css or core.css plus nav-list.css.
|
|
24
26
|
|
|
25
27
|
## Common mistakes
|
|
26
28
|
|
|
27
|
-
- **Avoid:** Using buttons for routes
|
|
29
|
+
- **Avoid:** Using buttons for routes, adding a collapsible trigger that controls no content, placing a Divider between a trigger and its controlled destinations, or moving disclosure indicators with positional CSS. **Instead:** Use Link for destinations, SectionLabel alone for static groups, keep a collapsible Section intact before its boundary, and use the logical row-padding tokens for shell alignment.
|
|
28
30
|
|
|
29
31
|
## Validation checklist
|
|
30
32
|
|
|
31
|
-
- Check current, hover, focus, collapsed, expanded, long labels, icons, counts, zoom, narrow widths, and RTL.
|
|
33
|
+
- Check current, hover, focus, collapsed, expanded, complete-group divider placement, long labels, icons, counts, zoom, narrow widths, and RTL.
|
|
32
34
|
- Confirm links and section relationships remain semantic and CSS is loaded.
|
|
33
35
|
|
|
34
36
|
## Related guidance
|
|
@@ -37,3 +39,4 @@ Style persistent route navigation with current state, optional section labels, a
|
|
|
37
39
|
- `drawer`
|
|
38
40
|
- `navigation-menu`
|
|
39
41
|
- `link`
|
|
42
|
+
- `divider`
|
|
@@ -39,6 +39,16 @@
|
|
|
39
39
|
"level": "must",
|
|
40
40
|
"statement": "Keep contents focused on navigation destinations rather than commands or unrelated marketing panels."
|
|
41
41
|
},
|
|
42
|
+
{
|
|
43
|
+
"id": "navigation-menu-panel-link",
|
|
44
|
+
"level": "must",
|
|
45
|
+
"statement": "Use Link variant=panel with one direct Surface child when one rich destination should own the complete clickable area; let Surface own inset, radius, border, elevation, and background, and keep all composed children non-interactive and concise."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "navigation-menu-panel-focus",
|
|
49
|
+
"level": "must",
|
|
50
|
+
"statement": "Preserve the panel Link's focus fallback; with a direct Surface the ring follows that Surface, and without one the Link itself must remain visibly focused."
|
|
51
|
+
},
|
|
42
52
|
{
|
|
43
53
|
"id": "navigation-menu-rsc-import",
|
|
44
54
|
"level": "must",
|
|
@@ -58,11 +68,15 @@
|
|
|
58
68
|
{
|
|
59
69
|
"mistake": "Adding use client to an entire Next page only to dereference the legacy NavigationMenu runtime object.",
|
|
60
70
|
"correction": "Use the RSC-safe module-namespace subpath so only the interactive Navigation Menu parts remain client-owned."
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"mistake": "Placing a small link inside a separately clickable-looking Surface, styling NavigationMenu.Link as a duplicate Surface, or nesting a Link or Button inside NavigationMenu.Link.",
|
|
74
|
+
"correction": "Wrap one direct Surface child with the panel Link so the anchor owns interaction and Surface owns container paint and geometry."
|
|
61
75
|
}
|
|
62
76
|
],
|
|
63
77
|
"validation": [
|
|
64
78
|
"Test hover, click, focus, arrow keys, Escape, outside interaction, links, viewport transitions, active-trigger centering, boundary collision, arrow alignment, zoom, narrow widths, and RTL.",
|
|
65
|
-
"Confirm destination semantics, Root-relative geometry, documented customization hooks, and CSS delivery.",
|
|
79
|
+
"Confirm destination semantics, Root-relative geometry, panel focus fallback, documented customization hooks, and CSS delivery.",
|
|
66
80
|
"In a React Server Component consumer, confirm the module-namespace form passes a production prerender without promoting the page to use client."
|
|
67
81
|
],
|
|
68
82
|
"related": [
|
|
@@ -22,6 +22,8 @@ Present polished disclosure navigation while Atom owns trigger geometry, viewpor
|
|
|
22
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
23
|
- **MUST:** Do not invent overlay props such as side, align, sideOffset, or alignOffset; NavigationMenu does not expose the floating-overlay positioning API.
|
|
24
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.
|
|
25
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.
|
|
26
28
|
- **MUST:** Load styles.css or core.css plus navigation-menu.css and every child component stylesheet.
|
|
27
29
|
|
|
@@ -29,11 +31,12 @@ Present polished disclosure navigation while Atom owns trigger geometry, viewpor
|
|
|
29
31
|
|
|
30
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.
|
|
31
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.
|
|
32
35
|
|
|
33
36
|
## Validation checklist
|
|
34
37
|
|
|
35
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.
|
|
36
|
-
- Confirm destination semantics, Root-relative geometry, documented customization hooks, and CSS delivery.
|
|
39
|
+
- Confirm destination semantics, Root-relative geometry, panel focus fallback, documented customization hooks, and CSS delivery.
|
|
37
40
|
- In a React Server Component consumer, confirm the module-namespace form passes a production prerender without promoting the page to use client.
|
|
38
41
|
|
|
39
42
|
## Related guidance
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"package": "@flowstack-ui/brick",
|
|
6
6
|
"layer": "brick",
|
|
7
7
|
"kind": "component",
|
|
8
|
-
"purpose": "Style a bounded scroll viewport and scrollbar
|
|
8
|
+
"purpose": "Style a bounded scroll viewport and native scrollbar presentation while preserving Atom and native input behavior.",
|
|
9
9
|
"useWhen": [
|
|
10
10
|
"A rail, code region, table wrapper, or bounded panel needs Brick scrollbar presentation and owned overflow behavior."
|
|
11
11
|
],
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
}
|
|
17
17
|
],
|
|
18
18
|
"composition": [
|
|
19
|
-
"Compose Viewport and
|
|
19
|
+
"Compose Viewport inside Root and give Root a real size constraint from its parent layout; Brick's current native scrollbar presentation needs no authored Scrollbar or Thumb parts."
|
|
20
20
|
],
|
|
21
21
|
"rules": [
|
|
22
22
|
{
|
|
@@ -24,6 +24,11 @@
|
|
|
24
24
|
"level": "must",
|
|
25
25
|
"statement": "Provide a bounded size; ScrollArea cannot create meaningful scrolling without a constrained viewport."
|
|
26
26
|
},
|
|
27
|
+
{
|
|
28
|
+
"id": "scroll-area-parent-owner",
|
|
29
|
+
"level": "must",
|
|
30
|
+
"statement": "Identify the parent that owns the maximum or fixed block size before styling Viewport; do not apply a random height directly to the scrolling part."
|
|
31
|
+
},
|
|
27
32
|
{
|
|
28
33
|
"id": "scroll-area-native",
|
|
29
34
|
"level": "must",
|
|
@@ -43,7 +48,7 @@
|
|
|
43
48
|
],
|
|
44
49
|
"validation": [
|
|
45
50
|
"Test both axes, mouse, trackpad, touch, keyboard, focus ring, nested scrolling, mobile tables, zoom, and RTL.",
|
|
46
|
-
"Confirm the
|
|
51
|
+
"Confirm the parent constraint, viewport geometry, and CSS are loaded."
|
|
47
52
|
],
|
|
48
53
|
"related": [
|
|
49
54
|
"table",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Purpose
|
|
4
4
|
|
|
5
|
-
Style a bounded scroll viewport and scrollbar
|
|
5
|
+
Style a bounded scroll viewport and native scrollbar presentation while preserving Atom and native input behavior.
|
|
6
6
|
|
|
7
7
|
## Use when
|
|
8
8
|
|
|
@@ -14,11 +14,12 @@ Style a bounded scroll viewport and scrollbar anatomy while preserving Atom and
|
|
|
14
14
|
|
|
15
15
|
## Required composition
|
|
16
16
|
|
|
17
|
-
- Compose Viewport and
|
|
17
|
+
- Compose Viewport inside Root and give Root a real size constraint from its parent layout; Brick's current native scrollbar presentation needs no authored Scrollbar or Thumb parts.
|
|
18
18
|
|
|
19
19
|
## Rules
|
|
20
20
|
|
|
21
21
|
- **MUST:** Provide a bounded size; ScrollArea cannot create meaningful scrolling without a constrained viewport.
|
|
22
|
+
- **MUST:** Identify the parent that owns the maximum or fixed block size before styling Viewport; do not apply a random height directly to the scrolling part.
|
|
22
23
|
- **MUST:** Preserve wheel, trackpad, touch, keyboard, focus, and nested page scrolling.
|
|
23
24
|
- **MUST:** Load styles.css or core.css plus scroll-area.css.
|
|
24
25
|
|
|
@@ -29,7 +30,7 @@ Style a bounded scroll viewport and scrollbar anatomy while preserving Atom and
|
|
|
29
30
|
## Validation checklist
|
|
30
31
|
|
|
31
32
|
- Test both axes, mouse, trackpad, touch, keyboard, focus ring, nested scrolling, mobile tables, zoom, and RTL.
|
|
32
|
-
- Confirm the
|
|
33
|
+
- Confirm the parent constraint, viewport geometry, and CSS are loaded.
|
|
33
34
|
|
|
34
35
|
## Related guidance
|
|
35
36
|
|