@flowstack-ui/brick 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/README.md +6 -1
  2. package/dist/agents/app-bar.json +57 -0
  3. package/dist/agents/app-bar.md +42 -0
  4. package/dist/agents/bottom-navigation.json +55 -0
  5. package/dist/agents/bottom-navigation.md +40 -0
  6. package/dist/agents/breadcrumb.json +48 -0
  7. package/dist/agents/breadcrumb.md +37 -0
  8. package/dist/agents/button.json +49 -0
  9. package/dist/agents/button.md +38 -0
  10. package/dist/agents/card.json +50 -0
  11. package/dist/agents/card.md +39 -0
  12. package/dist/agents/checkbox.json +49 -0
  13. package/dist/agents/checkbox.md +38 -0
  14. package/dist/agents/container.json +54 -0
  15. package/dist/agents/container.md +39 -0
  16. package/dist/agents/divider.json +48 -0
  17. package/dist/agents/divider.md +37 -0
  18. package/dist/agents/drawer.json +56 -0
  19. package/dist/agents/drawer.md +41 -0
  20. package/dist/agents/field.json +57 -0
  21. package/dist/agents/field.md +42 -0
  22. package/dist/agents/fieldset.json +49 -0
  23. package/dist/agents/fieldset.md +38 -0
  24. package/dist/agents/form.json +49 -0
  25. package/dist/agents/form.md +38 -0
  26. package/dist/agents/grid.json +48 -0
  27. package/dist/agents/grid.md +37 -0
  28. package/dist/agents/hide.json +54 -0
  29. package/dist/agents/hide.md +39 -0
  30. package/dist/agents/icon-button.json +54 -0
  31. package/dist/agents/icon-button.md +39 -0
  32. package/dist/agents/image.json +59 -0
  33. package/dist/agents/image.md +40 -0
  34. package/dist/agents/input.json +48 -0
  35. package/dist/agents/input.md +37 -0
  36. package/dist/agents/interface-composition.json +174 -0
  37. package/dist/agents/interface-composition.md +91 -0
  38. package/dist/agents/layer-selection.json +107 -0
  39. package/dist/agents/layer-selection.md +57 -0
  40. package/dist/agents/link.json +47 -0
  41. package/dist/agents/link.md +36 -0
  42. package/dist/agents/manifest.json +207 -0
  43. package/dist/agents/nav-list.json +54 -0
  44. package/dist/agents/nav-list.md +39 -0
  45. package/dist/agents/navigation-menu.json +76 -0
  46. package/dist/agents/navigation-menu.md +46 -0
  47. package/dist/agents/pagination.json +48 -0
  48. package/dist/agents/pagination.md +37 -0
  49. package/dist/agents/scroll-area.json +54 -0
  50. package/dist/agents/scroll-area.md +39 -0
  51. package/dist/agents/show.json +54 -0
  52. package/dist/agents/show.md +39 -0
  53. package/dist/agents/sidebar.json +56 -0
  54. package/dist/agents/sidebar.md +41 -0
  55. package/dist/agents/skip-link.json +53 -0
  56. package/dist/agents/skip-link.md +38 -0
  57. package/dist/agents/stack.json +48 -0
  58. package/dist/agents/stack.md +37 -0
  59. package/dist/agents/surface.json +48 -0
  60. package/dist/agents/surface.md +37 -0
  61. package/dist/agents/tabs.json +54 -0
  62. package/dist/agents/tabs.md +39 -0
  63. package/dist/agents/text.json +60 -0
  64. package/dist/agents/text.md +41 -0
  65. package/dist/agents/textarea.json +48 -0
  66. package/dist/agents/textarea.md +37 -0
  67. package/dist/agents/toolbar.json +55 -0
  68. package/dist/agents/toolbar.md +40 -0
  69. package/dist/components/button/Button.js +2 -2
  70. package/dist/components/button/Button.js.map +1 -1
  71. package/dist/components/chip/Chip.js +4 -4
  72. package/dist/components/chip/Chip.js.map +1 -1
  73. package/dist/components/icon-button/IconButton.js +2 -2
  74. package/dist/components/icon-button/IconButton.js.map +1 -1
  75. package/dist/navigation-menu.d.ts +1 -0
  76. package/dist/navigation-menu.d.ts.map +1 -1
  77. package/dist/navigation-menu.js +1 -0
  78. package/dist/navigation-menu.js.map +1 -1
  79. package/dist/styles/code-block.css +1 -1
  80. package/dist/styles/code-block.css.map +1 -1
  81. package/dist/styles/core.css +1 -1
  82. package/dist/styles/core.css.map +1 -1
  83. package/dist/styles/navigation-menu.css +1 -1
  84. package/dist/styles/navigation-menu.css.map +1 -1
  85. package/dist/styles/swipeable-item.css.map +1 -1
  86. package/dist/styles.css +1 -1
  87. package/dist/styles.css.map +1 -1
  88. package/docs/guides/agent-knowledge.md +44 -0
  89. package/docs/guides/appearance-and-tokens.md +6 -0
  90. package/docs/guides/installation.md +11 -6
  91. package/package.json +11 -5
@@ -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
+ }
@@ -0,0 +1,37 @@
1
+ # Surface agent guide
2
+
3
+ ## Purpose
4
+
5
+ Apply semantic background layers, boundaries, elevation, radius, and inset without implying a specific content object.
6
+
7
+ ## Use when
8
+
9
+ - A region needs a semantic visual plane but Card, Dialog, or another purposeful component would add the wrong anatomy.
10
+
11
+ ## Choose something else when
12
+
13
+ - The region represents one bounded subject with card anatomy. Use Card.
14
+
15
+ ## Required composition
16
+
17
+ - Choose Surface level and boundary by hierarchy, then compose public layout and content components inside.
18
+
19
+ ## Rules
20
+
21
+ - **SHOULD:** Choose surface level by information hierarchy, not decoration alone.
22
+ - **MUST:** Load styles.css or core.css plus surface.css.
23
+
24
+ ## Common mistakes
25
+
26
+ - **Avoid:** Using arbitrary background colors to recreate a surface. **Instead:** Use Surface and theme its semantic tokens.
27
+
28
+ ## Validation checklist
29
+
30
+ - Check foreground contrast against the selected surface in every appearance.
31
+ - Confirm nested surfaces communicate hierarchy without excessive borders or elevation.
32
+
33
+ ## Related guidance
34
+
35
+ - `card`
36
+ - `stack`
37
+ - `grid`
@@ -0,0 +1,54 @@
1
+ {
2
+ "schema": "flowstack.agent-component.v1",
3
+ "id": "tabs",
4
+ "name": "Tabs",
5
+ "package": "@flowstack-ui/brick",
6
+ "layer": "brick",
7
+ "kind": "component",
8
+ "purpose": "Style related in-page panel switching while Atom owns tab semantics, selection, roving focus, and indicator geometry.",
9
+ "useWhen": [
10
+ "A small set of related panels shares one page and one panel is normally active."
11
+ ],
12
+ "avoidWhen": [
13
+ {
14
+ "condition": "Choices navigate to routes or multiple sections should remain open.",
15
+ "useInstead": "Link/NavList or Accordion"
16
+ }
17
+ ],
18
+ "composition": [
19
+ "Compose Trigger and optional Indicator inside List with matching Content values inside Root; lay out panel content with Brick components."
20
+ ],
21
+ "rules": [
22
+ {
23
+ "id": "tabs-related-panels",
24
+ "level": "must",
25
+ "statement": "Use Tabs only for related in-page panels, not to imitate a site navigation underline."
26
+ },
27
+ {
28
+ "id": "tabs-overflow",
29
+ "level": "must",
30
+ "statement": "Define a deliberate narrow-width overflow or wrapping policy without clipping triggers or indicator focus."
31
+ },
32
+ {
33
+ "id": "tabs-css",
34
+ "level": "must",
35
+ "statement": "Load styles.css or core.css plus tabs.css."
36
+ }
37
+ ],
38
+ "commonMistakes": [
39
+ {
40
+ "mistake": "Using Tabs for routes, clipping focus/indicator edges, or mismatching Trigger and Content values.",
41
+ "correction": "Use navigation links for routes and keep complete paired tab anatomy."
42
+ }
43
+ ],
44
+ "validation": [
45
+ "Check automatic/manual activation, arrows, Home/End, Enter/Space, disabled, controlled, keep-mounted, overflow, focus rings, themes, zoom, and RTL.",
46
+ "Confirm CSS is loaded."
47
+ ],
48
+ "related": [
49
+ "accordion",
50
+ "navigation-menu",
51
+ "bottom-navigation",
52
+ "scroll-area"
53
+ ]
54
+ }
@@ -0,0 +1,39 @@
1
+ # Tabs agent guide
2
+
3
+ ## Purpose
4
+
5
+ Style related in-page panel switching while Atom owns tab semantics, selection, roving focus, and indicator geometry.
6
+
7
+ ## Use when
8
+
9
+ - A small set of related panels shares one page and one panel is normally active.
10
+
11
+ ## Choose something else when
12
+
13
+ - Choices navigate to routes or multiple sections should remain open. Use Link/NavList or Accordion.
14
+
15
+ ## Required composition
16
+
17
+ - Compose Trigger and optional Indicator inside List with matching Content values inside Root; lay out panel content with Brick components.
18
+
19
+ ## Rules
20
+
21
+ - **MUST:** Use Tabs only for related in-page panels, not to imitate a site navigation underline.
22
+ - **MUST:** Define a deliberate narrow-width overflow or wrapping policy without clipping triggers or indicator focus.
23
+ - **MUST:** Load styles.css or core.css plus tabs.css.
24
+
25
+ ## Common mistakes
26
+
27
+ - **Avoid:** Using Tabs for routes, clipping focus/indicator edges, or mismatching Trigger and Content values. **Instead:** Use navigation links for routes and keep complete paired tab anatomy.
28
+
29
+ ## Validation checklist
30
+
31
+ - Check automatic/manual activation, arrows, Home/End, Enter/Space, disabled, controlled, keep-mounted, overflow, focus rings, themes, zoom, and RTL.
32
+ - Confirm CSS is loaded.
33
+
34
+ ## Related guidance
35
+
36
+ - `accordion`
37
+ - `navigation-menu`
38
+ - `bottom-navigation`
39
+ - `scroll-area`