@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.
Files changed (149) hide show
  1. package/README.md +6 -1
  2. package/dist/agents/app-bar.json +69 -0
  3. package/dist/agents/app-bar.md +46 -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 +54 -0
  17. package/dist/agents/divider.md +39 -0
  18. package/dist/agents/drawer.json +76 -0
  19. package/dist/agents/drawer.md +46 -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 +57 -0
  27. package/dist/agents/grid.md +39 -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 +184 -0
  37. package/dist/agents/interface-composition.md +93 -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 +65 -0
  44. package/dist/agents/nav-list.md +42 -0
  45. package/dist/agents/navigation-menu.json +90 -0
  46. package/dist/agents/navigation-menu.md +49 -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 +65 -0
  64. package/dist/agents/text.md +42 -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/alert-dialog/AlertDialog.d.ts +7 -0
  70. package/dist/components/alert-dialog/AlertDialog.d.ts.map +1 -1
  71. package/dist/components/alert-dialog/AlertDialog.js +2 -2
  72. package/dist/components/alert-dialog/AlertDialog.js.map +1 -1
  73. package/dist/components/alert-dialog/index.d.ts +1 -1
  74. package/dist/components/alert-dialog/index.d.ts.map +1 -1
  75. package/dist/components/alert-dialog/index.js.map +1 -1
  76. package/dist/components/button/Button.js +2 -2
  77. package/dist/components/button/Button.js.map +1 -1
  78. package/dist/components/chip/Chip.js +4 -4
  79. package/dist/components/chip/Chip.js.map +1 -1
  80. package/dist/components/dialog/Dialog.d.ts +7 -0
  81. package/dist/components/dialog/Dialog.d.ts.map +1 -1
  82. package/dist/components/dialog/Dialog.js +2 -2
  83. package/dist/components/dialog/Dialog.js.map +1 -1
  84. package/dist/components/dialog/index.d.ts +1 -1
  85. package/dist/components/dialog/index.d.ts.map +1 -1
  86. package/dist/components/dialog/index.js.map +1 -1
  87. package/dist/components/drawer/Drawer.d.ts +8 -1
  88. package/dist/components/drawer/Drawer.d.ts.map +1 -1
  89. package/dist/components/drawer/Drawer.js +3 -2
  90. package/dist/components/drawer/Drawer.js.map +1 -1
  91. package/dist/components/drawer/index.d.ts +1 -1
  92. package/dist/components/drawer/index.d.ts.map +1 -1
  93. package/dist/components/drawer/index.js.map +1 -1
  94. package/dist/components/grid/Grid.d.ts +9 -2
  95. package/dist/components/grid/Grid.d.ts.map +1 -1
  96. package/dist/components/grid/Grid.js +51 -4
  97. package/dist/components/grid/Grid.js.map +1 -1
  98. package/dist/components/icon-button/IconButton.js +2 -2
  99. package/dist/components/icon-button/IconButton.js.map +1 -1
  100. package/dist/components/navigation-menu/NavigationMenu.d.ts +6 -3
  101. package/dist/components/navigation-menu/NavigationMenu.d.ts.map +1 -1
  102. package/dist/components/navigation-menu/NavigationMenu.js +2 -2
  103. package/dist/components/navigation-menu/NavigationMenu.js.map +1 -1
  104. package/dist/components/navigation-menu/index.d.ts +1 -1
  105. package/dist/components/navigation-menu/index.d.ts.map +1 -1
  106. package/dist/components/navigation-menu/index.js.map +1 -1
  107. package/dist/components/text/Text.d.ts +1 -1
  108. package/dist/components/text/Text.d.ts.map +1 -1
  109. package/dist/components/text/Text.js.map +1 -1
  110. package/dist/drawer.d.ts +1 -0
  111. package/dist/drawer.d.ts.map +1 -1
  112. package/dist/drawer.js +1 -0
  113. package/dist/drawer.js.map +1 -1
  114. package/dist/index.d.ts +3 -3
  115. package/dist/index.d.ts.map +1 -1
  116. package/dist/index.js +1 -1
  117. package/dist/index.js.map +1 -1
  118. package/dist/navigation-menu.d.ts +1 -0
  119. package/dist/navigation-menu.d.ts.map +1 -1
  120. package/dist/navigation-menu.js +1 -0
  121. package/dist/navigation-menu.js.map +1 -1
  122. package/dist/styles/alert-dialog.css +1 -1
  123. package/dist/styles/alert-dialog.css.map +1 -1
  124. package/dist/styles/badge.css +1 -1
  125. package/dist/styles/badge.css.map +1 -1
  126. package/dist/styles/code-block.css.map +1 -1
  127. package/dist/styles/context-menu.css.map +1 -1
  128. package/dist/styles/core.css +1 -1
  129. package/dist/styles/core.css.map +1 -1
  130. package/dist/styles/dialog.css +1 -1
  131. package/dist/styles/dialog.css.map +1 -1
  132. package/dist/styles/drawer.css +1 -1
  133. package/dist/styles/drawer.css.map +1 -1
  134. package/dist/styles/dropdown-menu.css.map +1 -1
  135. package/dist/styles/nav-list.css +1 -1
  136. package/dist/styles/nav-list.css.map +1 -1
  137. package/dist/styles/navigation-menu.css +1 -1
  138. package/dist/styles/navigation-menu.css.map +1 -1
  139. package/dist/styles/sidebar.css.map +1 -1
  140. package/dist/styles/text.css +1 -1
  141. package/dist/styles/text.css.map +1 -1
  142. package/dist/styles.css +1 -1
  143. package/dist/styles.css.map +1 -1
  144. package/dist/tokens.css +1 -1
  145. package/dist/tokens.css.map +1 -1
  146. package/docs/guides/agent-knowledge.md +44 -0
  147. package/docs/guides/appearance-and-tokens.md +6 -0
  148. package/docs/guides/installation.md +11 -6
  149. package/package.json +11 -5
@@ -0,0 +1,39 @@
1
+ # Container agent guide
2
+
3
+ ## Purpose
4
+
5
+ Own consistent centered content width, logical page gutters, and size variants for sections and application shells.
6
+
7
+ ## Use when
8
+
9
+ - Page or section content needs a shared maximum inline size and responsive logical gutters.
10
+
11
+ ## Choose something else when
12
+
13
+ - The region needs a visual boundary or only a local one-axis relationship. Use Surface/Card or Stack.
14
+
15
+ ## Required composition
16
+
17
+ - Place section content inside Container, then use Stack or Grid for internal relationships; let full-bleed backgrounds live outside it.
18
+
19
+ ## Rules
20
+
21
+ - **MUST:** Use Container rather than repeating application max-width, auto-margin, and gutter CSS across sections.
22
+ - **MUST:** Do not use Container as a visual card or background owner.
23
+ - **MUST:** Load styles.css or core.css plus container.css.
24
+
25
+ ## Common mistakes
26
+
27
+ - **Avoid:** Applying a separate max-width class to every page section or nesting Containers without a width reason. **Instead:** Use one deliberate Container boundary per aligned content region.
28
+
29
+ ## Validation checklist
30
+
31
+ - Check gutters and max width at all adopted breakpoints, zoom levels, and RTL.
32
+ - Confirm full-bleed and contained regions align intentionally and CSS is loaded.
33
+
34
+ ## Related guidance
35
+
36
+ - `stack`
37
+ - `grid`
38
+ - `surface`
39
+ - `card`
@@ -0,0 +1,54 @@
1
+ {
2
+ "schema": "flowstack.agent-component.v1",
3
+ "id": "divider",
4
+ "name": "Divider",
5
+ "package": "@flowstack-ui/brick",
6
+ "layer": "brick",
7
+ "kind": "component",
8
+ "purpose": "Render a finished decorative or semantic content boundary with horizontal or vertical visual recipes.",
9
+ "useWhen": [
10
+ "Adjacent content groups need a visible boundary and Atom Divider semantics."
11
+ ],
12
+ "avoidWhen": [
13
+ {
14
+ "condition": "Spacing alone expresses the relationship or the boundary is interactive.",
15
+ "useInstead": "Stack gap or a dedicated splitter"
16
+ }
17
+ ],
18
+ "composition": [
19
+ "Use Divider.Root inside the layout owner shared by the adjacent complete groups and choose decorative=false only when the separation has meaning."
20
+ ],
21
+ "rules": [
22
+ {
23
+ "id": "divider-meaning",
24
+ "level": "must",
25
+ "statement": "Choose semantic versus decorative behavior independently from color, thickness, and orientation."
26
+ },
27
+ {
28
+ "id": "divider-group-owner",
29
+ "level": "must",
30
+ "statement": "Place Divider between complete semantic or interactive groups under one consistent layout owner; do not split a trigger from the content it controls."
31
+ },
32
+ {
33
+ "id": "divider-css",
34
+ "level": "must",
35
+ "statement": "Load styles.css or core.css plus divider.css."
36
+ }
37
+ ],
38
+ "commonMistakes": [
39
+ {
40
+ "mistake": "Using a bordered div or text glyph for every separator, or placing a Divider inside only part of a repeated group's anatomy.",
41
+ "correction": "Use Divider when there is a boundary, Stack gap when there is only spacing, and keep repeated boundaries after complete groups under the same owner."
42
+ }
43
+ ],
44
+ "validation": [
45
+ "Check orientation, adjacent-group ownership, contrast, forced colors, zoom, and semantics.",
46
+ "Confirm it is not focusable and CSS is loaded."
47
+ ],
48
+ "related": [
49
+ "stack",
50
+ "toolbar",
51
+ "surface",
52
+ "nav-list"
53
+ ]
54
+ }
@@ -0,0 +1,39 @@
1
+ # Divider agent guide
2
+
3
+ ## Purpose
4
+
5
+ Render a finished decorative or semantic content boundary with horizontal or vertical visual recipes.
6
+
7
+ ## Use when
8
+
9
+ - Adjacent content groups need a visible boundary and Atom Divider semantics.
10
+
11
+ ## Choose something else when
12
+
13
+ - Spacing alone expresses the relationship or the boundary is interactive. Use Stack gap or a dedicated splitter.
14
+
15
+ ## Required composition
16
+
17
+ - Use Divider.Root inside the layout owner shared by the adjacent complete groups and choose decorative=false only when the separation has meaning.
18
+
19
+ ## Rules
20
+
21
+ - **MUST:** Choose semantic versus decorative behavior independently from color, thickness, and orientation.
22
+ - **MUST:** Place Divider between complete semantic or interactive groups under one consistent layout owner; do not split a trigger from the content it controls.
23
+ - **MUST:** Load styles.css or core.css plus divider.css.
24
+
25
+ ## Common mistakes
26
+
27
+ - **Avoid:** Using a bordered div or text glyph for every separator, or placing a Divider inside only part of a repeated group's anatomy. **Instead:** Use Divider when there is a boundary, Stack gap when there is only spacing, and keep repeated boundaries after complete groups under the same owner.
28
+
29
+ ## Validation checklist
30
+
31
+ - Check orientation, adjacent-group ownership, contrast, forced colors, zoom, and semantics.
32
+ - Confirm it is not focusable and CSS is loaded.
33
+
34
+ ## Related guidance
35
+
36
+ - `stack`
37
+ - `toolbar`
38
+ - `surface`
39
+ - `nav-list`
@@ -0,0 +1,76 @@
1
+ {
2
+ "schema": "flowstack.agent-component.v1",
3
+ "id": "drawer",
4
+ "name": "Drawer",
5
+ "package": "@flowstack-ui/brick",
6
+ "layer": "brick",
7
+ "kind": "component",
8
+ "purpose": "Present a finished modal side sheet while Atom owns focus, dismissal, portal, scroll-lock, and labeling behavior.",
9
+ "useWhen": [
10
+ "A temporary modal task or navigation panel should enter from a screen edge."
11
+ ],
12
+ "avoidWhen": [
13
+ {
14
+ "condition": "The side region is persistent layout or the overlay has no edge meaning.",
15
+ "useInstead": "Sidebar or Dialog"
16
+ }
17
+ ],
18
+ "composition": [
19
+ "Compose Trigger and Portal with Overlay and Content; put a header containing Title, Description when useful, and Close inside Content, then use Stack/NavList for its body."
20
+ ],
21
+ "rules": [
22
+ {
23
+ "id": "drawer-anatomy",
24
+ "level": "must",
25
+ "statement": "Use Drawer parts rather than hand-building overlay, focus trap, Escape, outside interaction, or portal behavior."
26
+ },
27
+ {
28
+ "id": "drawer-responsive",
29
+ "level": "must",
30
+ "statement": "Choose size and placement from content needs: use xl when content may need the viewport but should shrink when short, and full only when the surface must always fill it."
31
+ },
32
+ {
33
+ "id": "drawer-content-growth",
34
+ "level": "must",
35
+ "statement": "Let top and bottom Drawers grow naturally to their selected size cap; keep long overflow in Drawer.Body instead of forcing a fixed application height."
36
+ },
37
+ {
38
+ "id": "drawer-footer-layout",
39
+ "level": "must",
40
+ "statement": "Use Footer justify for simple action distribution, a Brick layout component inside Footer for complex grouping, and Button fullWidth only when the action itself should fill the row."
41
+ },
42
+ {
43
+ "id": "drawer-rsc-import",
44
+ "level": "must",
45
+ "statement": "In React Server Components, import the component subpath as import * as Drawer from @flowstack-ui/brick/drawer; use the legacy root-package runtime object only inside a client-owned module."
46
+ },
47
+ {
48
+ "id": "drawer-css",
49
+ "level": "must",
50
+ "statement": "Load styles.css or core.css plus drawer.css."
51
+ }
52
+ ],
53
+ "commonMistakes": [
54
+ {
55
+ "mistake": "Building a mobile menu as an absolutely positioned div or placing Close outside the labeled content hierarchy.",
56
+ "correction": "Use Drawer anatomy and compose the menu content with Brick navigation and layout components."
57
+ },
58
+ {
59
+ "mistake": "Adding use client to an entire Next page only to dereference the legacy Drawer runtime object.",
60
+ "correction": "Use the RSC-safe module-namespace subpath so only Drawer remains client-owned."
61
+ }
62
+ ],
63
+ "validation": [
64
+ "Test labeling, initial focus, focus containment/return, Escape, overlay, Close, scroll lock, content growth and capped Body overflow, touch, reduced motion, narrow screens, and nested portals.",
65
+ "Confirm CSS and every composed child component stylesheet are loaded.",
66
+ "In a React Server Component consumer, confirm the module-namespace form passes a production prerender without promoting the page to use client."
67
+ ],
68
+ "related": [
69
+ "sidebar",
70
+ "dialog",
71
+ "nav-list",
72
+ "stack",
73
+ "show",
74
+ "hide"
75
+ ]
76
+ }
@@ -0,0 +1,46 @@
1
+ # Drawer agent guide
2
+
3
+ ## Purpose
4
+
5
+ Present a finished modal side sheet while Atom owns focus, dismissal, portal, scroll-lock, and labeling behavior.
6
+
7
+ ## Use when
8
+
9
+ - A temporary modal task or navigation panel should enter from a screen edge.
10
+
11
+ ## Choose something else when
12
+
13
+ - The side region is persistent layout or the overlay has no edge meaning. Use Sidebar or Dialog.
14
+
15
+ ## Required composition
16
+
17
+ - Compose Trigger and Portal with Overlay and Content; put a header containing Title, Description when useful, and Close inside Content, then use Stack/NavList for its body.
18
+
19
+ ## Rules
20
+
21
+ - **MUST:** Use Drawer parts rather than hand-building overlay, focus trap, Escape, outside interaction, or portal behavior.
22
+ - **MUST:** Choose size and placement from content needs: use xl when content may need the viewport but should shrink when short, and full only when the surface must always fill it.
23
+ - **MUST:** Let top and bottom Drawers grow naturally to their selected size cap; keep long overflow in Drawer.Body instead of forcing a fixed application height.
24
+ - **MUST:** Use Footer justify for simple action distribution, a Brick layout component inside Footer for complex grouping, and Button fullWidth only when the action itself should fill the row.
25
+ - **MUST:** In React Server Components, import the component subpath as import * as Drawer from @flowstack-ui/brick/drawer; use the legacy root-package runtime object only inside a client-owned module.
26
+ - **MUST:** Load styles.css or core.css plus drawer.css.
27
+
28
+ ## Common mistakes
29
+
30
+ - **Avoid:** Building a mobile menu as an absolutely positioned div or placing Close outside the labeled content hierarchy. **Instead:** Use Drawer anatomy and compose the menu content with Brick navigation and layout components.
31
+ - **Avoid:** Adding use client to an entire Next page only to dereference the legacy Drawer runtime object. **Instead:** Use the RSC-safe module-namespace subpath so only Drawer remains client-owned.
32
+
33
+ ## Validation checklist
34
+
35
+ - Test labeling, initial focus, focus containment/return, Escape, overlay, Close, scroll lock, content growth and capped Body overflow, touch, reduced motion, narrow screens, and nested portals.
36
+ - Confirm CSS and every composed child component stylesheet are loaded.
37
+ - In a React Server Component consumer, confirm the module-namespace form passes a production prerender without promoting the page to use client.
38
+
39
+ ## Related guidance
40
+
41
+ - `sidebar`
42
+ - `dialog`
43
+ - `nav-list`
44
+ - `stack`
45
+ - `show`
46
+ - `hide`
@@ -0,0 +1,57 @@
1
+ {
2
+ "schema": "flowstack.agent-component.v1",
3
+ "id": "field",
4
+ "name": "Field",
5
+ "package": "@flowstack-ui/brick",
6
+ "layer": "brick",
7
+ "kind": "component",
8
+ "purpose": "Visually arrange one control with its label, description, error, and inherited Atom field relationships.",
9
+ "useWhen": [
10
+ "One finished control needs a visible label and may need help or error text."
11
+ ],
12
+ "avoidWhen": [
13
+ {
14
+ "condition": "Several related controls share one group label.",
15
+ "useInstead": "Fieldset, with Field inside when individual controls also need labels"
16
+ }
17
+ ],
18
+ "composition": [
19
+ "Compose Field.Root -> Field.Label -> one control -> optional Field.Description -> optional Field.Error."
20
+ ],
21
+ "rules": [
22
+ {
23
+ "id": "field-one-control",
24
+ "level": "must",
25
+ "statement": "Associate one Field with one control."
26
+ },
27
+ {
28
+ "id": "field-marker",
29
+ "level": "must",
30
+ "statement": "Field.Label already renders the default required marker; never add a second asterisk or RequiredIndicator unless the default is disabled."
31
+ },
32
+ {
33
+ "id": "field-css",
34
+ "level": "must",
35
+ "statement": "Load styles.css or core.css plus field.css and the owned control stylesheet."
36
+ }
37
+ ],
38
+ "commonMistakes": [
39
+ {
40
+ "mistake": "Adding a manual required asterisk beside a required Field.Label.",
41
+ "correction": "Set required on Field.Root and use the built-in Label marker, or explicitly replace it once."
42
+ }
43
+ ],
44
+ "validation": [
45
+ "Confirm label, description, and error relationships.",
46
+ "Confirm exactly one required marker.",
47
+ "Check vertical and horizontal layouts at narrow widths."
48
+ ],
49
+ "related": [
50
+ "@flowstack-ui/atom/agents/field",
51
+ "form",
52
+ "fieldset",
53
+ "input",
54
+ "textarea",
55
+ "checkbox"
56
+ ]
57
+ }
@@ -0,0 +1,42 @@
1
+ # Field agent guide
2
+
3
+ ## Purpose
4
+
5
+ Visually arrange one control with its label, description, error, and inherited Atom field relationships.
6
+
7
+ ## Use when
8
+
9
+ - One finished control needs a visible label and may need help or error text.
10
+
11
+ ## Choose something else when
12
+
13
+ - Several related controls share one group label. Use Fieldset, with Field inside when individual controls also need labels.
14
+
15
+ ## Required composition
16
+
17
+ - Compose Field.Root -> Field.Label -> one control -> optional Field.Description -> optional Field.Error.
18
+
19
+ ## Rules
20
+
21
+ - **MUST:** Associate one Field with one control.
22
+ - **MUST:** Field.Label already renders the default required marker; never add a second asterisk or RequiredIndicator unless the default is disabled.
23
+ - **MUST:** Load styles.css or core.css plus field.css and the owned control stylesheet.
24
+
25
+ ## Common mistakes
26
+
27
+ - **Avoid:** Adding a manual required asterisk beside a required Field.Label. **Instead:** Set required on Field.Root and use the built-in Label marker, or explicitly replace it once.
28
+
29
+ ## Validation checklist
30
+
31
+ - Confirm label, description, and error relationships.
32
+ - Confirm exactly one required marker.
33
+ - Check vertical and horizontal layouts at narrow widths.
34
+
35
+ ## Related guidance
36
+
37
+ - `@flowstack-ui/atom/agents/field`
38
+ - `form`
39
+ - `fieldset`
40
+ - `input`
41
+ - `textarea`
42
+ - `checkbox`
@@ -0,0 +1,49 @@
1
+ {
2
+ "schema": "flowstack.agent-component.v1",
3
+ "id": "fieldset",
4
+ "name": "Fieldset",
5
+ "package": "@flowstack-ui/brick",
6
+ "layer": "brick",
7
+ "kind": "component",
8
+ "purpose": "Render a finished native group for related controls with a legend, group messaging, and inherited Atom state.",
9
+ "useWhen": [
10
+ "Multiple related controls answer one group question."
11
+ ],
12
+ "avoidWhen": [
13
+ {
14
+ "condition": "Only one control needs a label.",
15
+ "useInstead": "Field"
16
+ }
17
+ ],
18
+ "composition": [
19
+ "Compose Fieldset.Root -> Fieldset.Legend -> optional description/error -> Fields or grouped choices."
20
+ ],
21
+ "rules": [
22
+ {
23
+ "id": "fieldset-legend",
24
+ "level": "must",
25
+ "statement": "Give the related group a meaningful legend."
26
+ },
27
+ {
28
+ "id": "fieldset-css",
29
+ "level": "must",
30
+ "statement": "Load styles.css or core.css plus fieldset.css and child component styles."
31
+ }
32
+ ],
33
+ "commonMistakes": [
34
+ {
35
+ "mistake": "Using visual heading and div wrappers for a related choice group.",
36
+ "correction": "Use Fieldset so the group label and state remain semantic."
37
+ }
38
+ ],
39
+ "validation": [
40
+ "Inspect fieldset and legend semantics.",
41
+ "Check group messaging, state propagation, spacing, and responsive layout."
42
+ ],
43
+ "related": [
44
+ "@flowstack-ui/atom/agents/fieldset",
45
+ "form",
46
+ "field",
47
+ "checkbox"
48
+ ]
49
+ }
@@ -0,0 +1,38 @@
1
+ # Fieldset agent guide
2
+
3
+ ## Purpose
4
+
5
+ Render a finished native group for related controls with a legend, group messaging, and inherited Atom state.
6
+
7
+ ## Use when
8
+
9
+ - Multiple related controls answer one group question.
10
+
11
+ ## Choose something else when
12
+
13
+ - Only one control needs a label. Use Field.
14
+
15
+ ## Required composition
16
+
17
+ - Compose Fieldset.Root -> Fieldset.Legend -> optional description/error -> Fields or grouped choices.
18
+
19
+ ## Rules
20
+
21
+ - **MUST:** Give the related group a meaningful legend.
22
+ - **MUST:** Load styles.css or core.css plus fieldset.css and child component styles.
23
+
24
+ ## Common mistakes
25
+
26
+ - **Avoid:** Using visual heading and div wrappers for a related choice group. **Instead:** Use Fieldset so the group label and state remain semantic.
27
+
28
+ ## Validation checklist
29
+
30
+ - Inspect fieldset and legend semantics.
31
+ - Check group messaging, state propagation, spacing, and responsive layout.
32
+
33
+ ## Related guidance
34
+
35
+ - `@flowstack-ui/atom/agents/fieldset`
36
+ - `form`
37
+ - `field`
38
+ - `checkbox`
@@ -0,0 +1,49 @@
1
+ {
2
+ "schema": "flowstack.agent-component.v1",
3
+ "id": "form",
4
+ "name": "Form",
5
+ "package": "@flowstack-ui/brick",
6
+ "layer": "brick",
7
+ "kind": "component",
8
+ "purpose": "Provide a finished native submission boundary and consistent form rhythm while Atom owns submission and validation behavior.",
9
+ "useWhen": [
10
+ "Related controls submit user input as one operation."
11
+ ],
12
+ "avoidWhen": [
13
+ {
14
+ "condition": "Controls are unrelated immediate settings or actions.",
15
+ "useInstead": "Individual Field and Button compositions"
16
+ }
17
+ ],
18
+ "composition": [
19
+ "Compose Form -> Fieldset for related groups -> Field for each control -> a named submit Button."
20
+ ],
21
+ "rules": [
22
+ {
23
+ "id": "form-native",
24
+ "level": "must",
25
+ "statement": "Keep native submission available and give submitted controls names."
26
+ },
27
+ {
28
+ "id": "form-css",
29
+ "level": "must",
30
+ "statement": "Load styles.css or core.css plus form.css and every rendered child component stylesheet."
31
+ }
32
+ ],
33
+ "commonMistakes": [
34
+ {
35
+ "mistake": "Treating Form as a complete login or contact workflow.",
36
+ "correction": "Keep business workflow in the application or a future Block; Form owns the generic visual boundary."
37
+ }
38
+ ],
39
+ "validation": [
40
+ "Submit with keyboard and pointer.",
41
+ "Inspect submitted values, invalid relationships, spacing, and narrow-layout behavior."
42
+ ],
43
+ "related": [
44
+ "@flowstack-ui/atom/agents/form",
45
+ "field",
46
+ "fieldset",
47
+ "button"
48
+ ]
49
+ }
@@ -0,0 +1,38 @@
1
+ # Form agent guide
2
+
3
+ ## Purpose
4
+
5
+ Provide a finished native submission boundary and consistent form rhythm while Atom owns submission and validation behavior.
6
+
7
+ ## Use when
8
+
9
+ - Related controls submit user input as one operation.
10
+
11
+ ## Choose something else when
12
+
13
+ - Controls are unrelated immediate settings or actions. Use Individual Field and Button compositions.
14
+
15
+ ## Required composition
16
+
17
+ - Compose Form -> Fieldset for related groups -> Field for each control -> a named submit Button.
18
+
19
+ ## Rules
20
+
21
+ - **MUST:** Keep native submission available and give submitted controls names.
22
+ - **MUST:** Load styles.css or core.css plus form.css and every rendered child component stylesheet.
23
+
24
+ ## Common mistakes
25
+
26
+ - **Avoid:** Treating Form as a complete login or contact workflow. **Instead:** Keep business workflow in the application or a future Block; Form owns the generic visual boundary.
27
+
28
+ ## Validation checklist
29
+
30
+ - Submit with keyboard and pointer.
31
+ - Inspect submitted values, invalid relationships, spacing, and narrow-layout behavior.
32
+
33
+ ## Related guidance
34
+
35
+ - `@flowstack-ui/atom/agents/form`
36
+ - `field`
37
+ - `fieldset`
38
+ - `button`
@@ -0,0 +1,57 @@
1
+ {
2
+ "schema": "flowstack.agent-component.v1",
3
+ "id": "grid",
4
+ "name": "Grid",
5
+ "package": "@flowstack-ui/brick",
6
+ "layer": "brick",
7
+ "kind": "component",
8
+ "purpose": "Arrange content on tokenized two-dimensional tracks with public column, row, gap, and item-placement controls.",
9
+ "useWhen": [
10
+ "Content needs coordinated rows and columns or responsive card tracks."
11
+ ],
12
+ "avoidWhen": [
13
+ {
14
+ "condition": "The layout has one primary row or column.",
15
+ "useInstead": "Stack"
16
+ }
17
+ ],
18
+ "composition": [
19
+ "Choose Grid tracks from the minimum readable child size; use Grid.Item placement only when source order remains meaningful."
20
+ ],
21
+ "rules": [
22
+ {
23
+ "id": "grid-source-order",
24
+ "level": "must",
25
+ "statement": "Keep DOM order meaningful; visual placement must not create a confusing keyboard or reading sequence."
26
+ },
27
+ {
28
+ "id": "grid-item-as-child",
29
+ "level": "must",
30
+ "statement": "Use Grid.Item asChild when an existing link, Surface, or component should itself receive placement; provide exactly one element and preserve its native semantics."
31
+ },
32
+ {
33
+ "id": "grid-css",
34
+ "level": "must",
35
+ "statement": "Load styles.css or core.css plus grid.css."
36
+ }
37
+ ],
38
+ "commonMistakes": [
39
+ {
40
+ "mistake": "Keeping too many columns until cards become unreadably narrow.",
41
+ "correction": "Reduce columns at the content's real minimum width, not at a device-name breakpoint."
42
+ },
43
+ {
44
+ "mistake": "Adding a Grid.Item wrapper and height CSS around an element that should itself stretch as the grid item.",
45
+ "correction": "Compose that one element with Grid.Item asChild."
46
+ }
47
+ ],
48
+ "validation": [
49
+ "Test intrinsic sizing, overflow, zoom, narrow widths, source order, and RTL.",
50
+ "Confirm each child remains readable before and after track changes."
51
+ ],
52
+ "related": [
53
+ "stack",
54
+ "card",
55
+ "surface"
56
+ ]
57
+ }
@@ -0,0 +1,39 @@
1
+ # Grid agent guide
2
+
3
+ ## Purpose
4
+
5
+ Arrange content on tokenized two-dimensional tracks with public column, row, gap, and item-placement controls.
6
+
7
+ ## Use when
8
+
9
+ - Content needs coordinated rows and columns or responsive card tracks.
10
+
11
+ ## Choose something else when
12
+
13
+ - The layout has one primary row or column. Use Stack.
14
+
15
+ ## Required composition
16
+
17
+ - Choose Grid tracks from the minimum readable child size; use Grid.Item placement only when source order remains meaningful.
18
+
19
+ ## Rules
20
+
21
+ - **MUST:** Keep DOM order meaningful; visual placement must not create a confusing keyboard or reading sequence.
22
+ - **MUST:** Use Grid.Item asChild when an existing link, Surface, or component should itself receive placement; provide exactly one element and preserve its native semantics.
23
+ - **MUST:** Load styles.css or core.css plus grid.css.
24
+
25
+ ## Common mistakes
26
+
27
+ - **Avoid:** Keeping too many columns until cards become unreadably narrow. **Instead:** Reduce columns at the content's real minimum width, not at a device-name breakpoint.
28
+ - **Avoid:** Adding a Grid.Item wrapper and height CSS around an element that should itself stretch as the grid item. **Instead:** Compose that one element with Grid.Item asChild.
29
+
30
+ ## Validation checklist
31
+
32
+ - Test intrinsic sizing, overflow, zoom, narrow widths, source order, and RTL.
33
+ - Confirm each child remains readable before and after track changes.
34
+
35
+ ## Related guidance
36
+
37
+ - `stack`
38
+ - `card`
39
+ - `surface`