@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,48 @@
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 owning Stack, Toolbar, menu, or surface 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-css",
29
+ "level": "must",
30
+ "statement": "Load styles.css or core.css plus divider.css."
31
+ }
32
+ ],
33
+ "commonMistakes": [
34
+ {
35
+ "mistake": "Using a bordered div or text glyph for every separator.",
36
+ "correction": "Use Divider when there is a boundary and Stack gap when there is only spacing."
37
+ }
38
+ ],
39
+ "validation": [
40
+ "Check orientation, contrast, forced colors, zoom, and semantics.",
41
+ "Confirm it is not focusable and CSS is loaded."
42
+ ],
43
+ "related": [
44
+ "stack",
45
+ "toolbar",
46
+ "surface"
47
+ ]
48
+ }
@@ -0,0 +1,37 @@
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 owning Stack, Toolbar, menu, or surface 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:** Load styles.css or core.css plus divider.css.
23
+
24
+ ## Common mistakes
25
+
26
+ - **Avoid:** Using a bordered div or text glyph for every separator. **Instead:** Use Divider when there is a boundary and Stack gap when there is only spacing.
27
+
28
+ ## Validation checklist
29
+
30
+ - Check orientation, contrast, forced colors, zoom, and semantics.
31
+ - Confirm it is not focusable and CSS is loaded.
32
+
33
+ ## Related guidance
34
+
35
+ - `stack`
36
+ - `toolbar`
37
+ - `surface`
@@ -0,0 +1,56 @@
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, placement, and full-screen mobile presentation from content needs without duplicating mounted dialog trees."
31
+ },
32
+ {
33
+ "id": "drawer-css",
34
+ "level": "must",
35
+ "statement": "Load styles.css or core.css plus drawer.css."
36
+ }
37
+ ],
38
+ "commonMistakes": [
39
+ {
40
+ "mistake": "Building a mobile menu as an absolutely positioned div or placing Close outside the labeled content hierarchy.",
41
+ "correction": "Use Drawer anatomy and compose the menu content with Brick navigation and layout components."
42
+ }
43
+ ],
44
+ "validation": [
45
+ "Test labeling, initial focus, focus containment/return, Escape, overlay, Close, scroll lock, touch, reduced motion, narrow screens, and nested portals.",
46
+ "Confirm CSS and every composed child component stylesheet are loaded."
47
+ ],
48
+ "related": [
49
+ "sidebar",
50
+ "dialog",
51
+ "nav-list",
52
+ "stack",
53
+ "show",
54
+ "hide"
55
+ ]
56
+ }
@@ -0,0 +1,41 @@
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, placement, and full-screen mobile presentation from content needs without duplicating mounted dialog trees.
23
+ - **MUST:** Load styles.css or core.css plus drawer.css.
24
+
25
+ ## Common mistakes
26
+
27
+ - **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.
28
+
29
+ ## Validation checklist
30
+
31
+ - Test labeling, initial focus, focus containment/return, Escape, overlay, Close, scroll lock, touch, reduced motion, narrow screens, and nested portals.
32
+ - Confirm CSS and every composed child component stylesheet are loaded.
33
+
34
+ ## Related guidance
35
+
36
+ - `sidebar`
37
+ - `dialog`
38
+ - `nav-list`
39
+ - `stack`
40
+ - `show`
41
+ - `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,48 @@
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-css",
29
+ "level": "must",
30
+ "statement": "Load styles.css or core.css plus grid.css."
31
+ }
32
+ ],
33
+ "commonMistakes": [
34
+ {
35
+ "mistake": "Keeping too many columns until cards become unreadably narrow.",
36
+ "correction": "Reduce columns at the content's real minimum width, not at a device-name breakpoint."
37
+ }
38
+ ],
39
+ "validation": [
40
+ "Test intrinsic sizing, overflow, zoom, narrow widths, source order, and RTL.",
41
+ "Confirm each child remains readable before and after track changes."
42
+ ],
43
+ "related": [
44
+ "stack",
45
+ "card",
46
+ "surface"
47
+ ]
48
+ }
@@ -0,0 +1,37 @@
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:** Load styles.css or core.css plus grid.css.
23
+
24
+ ## Common mistakes
25
+
26
+ - **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.
27
+
28
+ ## Validation checklist
29
+
30
+ - Test intrinsic sizing, overflow, zoom, narrow widths, source order, and RTL.
31
+ - Confirm each child remains readable before and after track changes.
32
+
33
+ ## Related guidance
34
+
35
+ - `stack`
36
+ - `card`
37
+ - `surface`
@@ -0,0 +1,54 @@
1
+ {
2
+ "schema": "flowstack.agent-component.v1",
3
+ "id": "hide",
4
+ "name": "Hide",
5
+ "package": "@flowstack-ui/brick",
6
+ "layer": "brick",
7
+ "kind": "component",
8
+ "purpose": "Hide content through Brick's CSS breakpoint contract without JavaScript viewport state or hydration flicker.",
9
+ "useWhen": [
10
+ "One composition should be absent at selected Brick breakpoints while remaining present elsewhere."
11
+ ],
12
+ "avoidWhen": [
13
+ {
14
+ "condition": "Content should be visually hidden but remain available to assistive technology, or should not render for business reasons.",
15
+ "useInstead": "VisuallyHidden or application conditional rendering"
16
+ }
17
+ ],
18
+ "composition": [
19
+ "Wrap the smallest complete region whose presence changes; pair with Show only when desktop and mobile genuinely need distinct compositions."
20
+ ],
21
+ "rules": [
22
+ {
23
+ "id": "hide-css-breakpoint",
24
+ "level": "must",
25
+ "statement": "Use Hide instead of JavaScript matchMedia for first-paint responsive visibility."
26
+ },
27
+ {
28
+ "id": "hide-no-semantic-loss",
29
+ "level": "must",
30
+ "statement": "Do not hide the only accessible name, error, instruction, or required content at a breakpoint."
31
+ },
32
+ {
33
+ "id": "hide-css",
34
+ "level": "must",
35
+ "statement": "Load styles.css or core.css plus hide.css."
36
+ }
37
+ ],
38
+ "commonMistakes": [
39
+ {
40
+ "mistake": "Using Hide without its modular CSS or duplicating two interactive trees with conflicting IDs.",
41
+ "correction": "Load hide.css and verify alternate compositions have independent valid relationships."
42
+ }
43
+ ],
44
+ "validation": [
45
+ "Test boundary pixels, zoom, first paint, hydration, focus order, and duplicate IDs across all visibility states.",
46
+ "Confirm CSS is loaded."
47
+ ],
48
+ "related": [
49
+ "show",
50
+ "visually-hidden",
51
+ "app-bar",
52
+ "drawer"
53
+ ]
54
+ }
@@ -0,0 +1,39 @@
1
+ # Hide agent guide
2
+
3
+ ## Purpose
4
+
5
+ Hide content through Brick's CSS breakpoint contract without JavaScript viewport state or hydration flicker.
6
+
7
+ ## Use when
8
+
9
+ - One composition should be absent at selected Brick breakpoints while remaining present elsewhere.
10
+
11
+ ## Choose something else when
12
+
13
+ - Content should be visually hidden but remain available to assistive technology, or should not render for business reasons. Use VisuallyHidden or application conditional rendering.
14
+
15
+ ## Required composition
16
+
17
+ - Wrap the smallest complete region whose presence changes; pair with Show only when desktop and mobile genuinely need distinct compositions.
18
+
19
+ ## Rules
20
+
21
+ - **MUST:** Use Hide instead of JavaScript matchMedia for first-paint responsive visibility.
22
+ - **MUST:** Do not hide the only accessible name, error, instruction, or required content at a breakpoint.
23
+ - **MUST:** Load styles.css or core.css plus hide.css.
24
+
25
+ ## Common mistakes
26
+
27
+ - **Avoid:** Using Hide without its modular CSS or duplicating two interactive trees with conflicting IDs. **Instead:** Load hide.css and verify alternate compositions have independent valid relationships.
28
+
29
+ ## Validation checklist
30
+
31
+ - Test boundary pixels, zoom, first paint, hydration, focus order, and duplicate IDs across all visibility states.
32
+ - Confirm CSS is loaded.
33
+
34
+ ## Related guidance
35
+
36
+ - `show`
37
+ - `visually-hidden`
38
+ - `app-bar`
39
+ - `drawer`