@cascivo/mcp 0.1.8 → 0.3.3

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 (205) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +53 -22
  3. package/dist/context/accordion.md +93 -0
  4. package/dist/context/action-sheet.md +117 -0
  5. package/dist/context/alert-dialog.md +122 -0
  6. package/dist/context/alert.md +110 -0
  7. package/dist/context/app-shell.md +98 -0
  8. package/dist/context/aspect-ratio.md +92 -0
  9. package/dist/context/avatar-group.md +111 -0
  10. package/dist/context/avatar.md +100 -0
  11. package/dist/context/badge.md +119 -0
  12. package/dist/context/block/console-app.md +66 -0
  13. package/dist/context/block/dashboard-charts.md +61 -0
  14. package/dist/context/block/empty-dashboard.md +60 -0
  15. package/dist/context/block/login-page.md +60 -0
  16. package/dist/context/block/notification-center.md +61 -0
  17. package/dist/context/block/page-with-breadcrumb.md +54 -0
  18. package/dist/context/block/settings-form-page.md +60 -0
  19. package/dist/context/block/sidebar-app.md +55 -0
  20. package/dist/context/block/stats-cards.md +61 -0
  21. package/dist/context/block/users-table-page.md +61 -0
  22. package/dist/context/blockquote.md +95 -0
  23. package/dist/context/bottom-sheet.md +112 -0
  24. package/dist/context/breadcrumb.md +106 -0
  25. package/dist/context/button-group.md +100 -0
  26. package/dist/context/button.md +117 -0
  27. package/dist/context/calendar.md +118 -0
  28. package/dist/context/card.md +90 -0
  29. package/dist/context/carousel.md +101 -0
  30. package/dist/context/chart/area-chart.md +99 -0
  31. package/dist/context/chart/bar-chart.md +114 -0
  32. package/dist/context/chart/boxplot.md +82 -0
  33. package/dist/context/chart/bubble-chart.md +80 -0
  34. package/dist/context/chart/bullet.md +75 -0
  35. package/dist/context/chart/calendar.md +79 -0
  36. package/dist/context/chart/candlestick.md +104 -0
  37. package/dist/context/chart/combo-chart.md +78 -0
  38. package/dist/context/chart/funnel.md +87 -0
  39. package/dist/context/chart/gauge.md +87 -0
  40. package/dist/context/chart/heatmap.md +77 -0
  41. package/dist/context/chart/histogram.md +74 -0
  42. package/dist/context/chart/kpi.md +70 -0
  43. package/dist/context/chart/line-chart.md +113 -0
  44. package/dist/context/chart/meter.md +71 -0
  45. package/dist/context/chart/pie-chart.md +126 -0
  46. package/dist/context/chart/polar.md +92 -0
  47. package/dist/context/chart/radar.md +81 -0
  48. package/dist/context/chart/radial-bar.md +96 -0
  49. package/dist/context/chart/sankey.md +89 -0
  50. package/dist/context/chart/scatter-chart.md +90 -0
  51. package/dist/context/chart/sparkline.md +69 -0
  52. package/dist/context/chart/stream.md +88 -0
  53. package/dist/context/chart/sunburst.md +93 -0
  54. package/dist/context/chart/treemap.md +84 -0
  55. package/dist/context/chat-bubble.md +116 -0
  56. package/dist/context/checkbox-card.md +104 -0
  57. package/dist/context/checkbox.md +104 -0
  58. package/dist/context/code-snippet.md +118 -0
  59. package/dist/context/code.md +103 -0
  60. package/dist/context/collapsible.md +104 -0
  61. package/dist/context/color-picker.md +101 -0
  62. package/dist/context/combobox.md +125 -0
  63. package/dist/context/command-menu.md +121 -0
  64. package/dist/context/comparison.md +117 -0
  65. package/dist/context/contained-list.md +103 -0
  66. package/dist/context/context-menu.md +103 -0
  67. package/dist/context/copy-button.md +106 -0
  68. package/dist/context/data-list.md +99 -0
  69. package/dist/context/data-table.md +149 -0
  70. package/dist/context/date-picker.md +116 -0
  71. package/dist/context/date-range-picker.md +113 -0
  72. package/dist/context/dock.md +117 -0
  73. package/dist/context/drawer.md +111 -0
  74. package/dist/context/dropdown.md +96 -0
  75. package/dist/context/editable.md +101 -0
  76. package/dist/context/editor/code-editor.md +146 -0
  77. package/dist/context/editor/highlight.md +74 -0
  78. package/dist/context/empty-state.md +101 -0
  79. package/dist/context/fab.md +128 -0
  80. package/dist/context/field.md +118 -0
  81. package/dist/context/file-uploader.md +121 -0
  82. package/dist/context/filter.md +129 -0
  83. package/dist/context/flow/flow-background.md +103 -0
  84. package/dist/context/flow/flow-canvas.md +82 -0
  85. package/dist/context/flow/flow-controls.md +84 -0
  86. package/dist/context/flow/flow-edge.md +128 -0
  87. package/dist/context/flow/flow-handle.md +83 -0
  88. package/dist/context/flow/flow-minimap.md +89 -0
  89. package/dist/context/flow/flow-node.md +97 -0
  90. package/dist/context/flow/flow-panel.md +75 -0
  91. package/dist/context/flow/flow-story.md +145 -0
  92. package/dist/context/flow/flow.md +139 -0
  93. package/dist/context/form.md +104 -0
  94. package/dist/context/header-panel.md +96 -0
  95. package/dist/context/header.md +104 -0
  96. package/dist/context/heading.md +107 -0
  97. package/dist/context/hover-card.md +108 -0
  98. package/dist/context/icon-button.md +115 -0
  99. package/dist/context/image.md +115 -0
  100. package/dist/context/indicator.md +95 -0
  101. package/dist/context/inline-loading.md +101 -0
  102. package/dist/context/input-group.md +122 -0
  103. package/dist/context/input.md +101 -0
  104. package/dist/context/item.md +109 -0
  105. package/dist/context/join.md +97 -0
  106. package/dist/context/kbd.md +100 -0
  107. package/dist/context/label.md +117 -0
  108. package/dist/context/layout/app-shell.md +85 -0
  109. package/dist/context/layout/auth-layout.md +74 -0
  110. package/dist/context/layout/auto-grid.md +69 -0
  111. package/dist/context/layout/center.md +67 -0
  112. package/dist/context/layout/columns.md +70 -0
  113. package/dist/context/layout/dashboard-layout.md +68 -0
  114. package/dist/context/layout/grid.md +70 -0
  115. package/dist/context/layout/masonry.md +70 -0
  116. package/dist/context/layout/page-header.md +75 -0
  117. package/dist/context/layout/section.md +69 -0
  118. package/dist/context/layout/settings-layout.md +68 -0
  119. package/dist/context/layout/spacer.md +64 -0
  120. package/dist/context/layout/split-view.md +71 -0
  121. package/dist/context/layout/stack.md +93 -0
  122. package/dist/context/link.md +112 -0
  123. package/dist/context/list.md +109 -0
  124. package/dist/context/log-viewer.md +124 -0
  125. package/dist/context/menu-button.md +137 -0
  126. package/dist/context/menu.md +108 -0
  127. package/dist/context/menubar.md +92 -0
  128. package/dist/context/modal.md +96 -0
  129. package/dist/context/multi-select.md +104 -0
  130. package/dist/context/native-select.md +118 -0
  131. package/dist/context/navigation-menu.md +95 -0
  132. package/dist/context/notification.md +116 -0
  133. package/dist/context/number-input.md +117 -0
  134. package/dist/context/otp-input.md +98 -0
  135. package/dist/context/overflow-menu.md +107 -0
  136. package/dist/context/pagination.md +123 -0
  137. package/dist/context/password-input.md +100 -0
  138. package/dist/context/popover.md +108 -0
  139. package/dist/context/progress-bar.md +107 -0
  140. package/dist/context/progress-circle.md +101 -0
  141. package/dist/context/progress-indicator.md +105 -0
  142. package/dist/context/progress.md +109 -0
  143. package/dist/context/prose.md +110 -0
  144. package/dist/context/pull-to-refresh.md +101 -0
  145. package/dist/context/qr-code.md +101 -0
  146. package/dist/context/radial-progress.md +117 -0
  147. package/dist/context/radio-card.md +95 -0
  148. package/dist/context/radio.md +94 -0
  149. package/dist/context/rating-group.md +97 -0
  150. package/dist/context/relative-time.md +90 -0
  151. package/dist/context/resizable.md +102 -0
  152. package/dist/context/scroll-area.md +101 -0
  153. package/dist/context/search.md +113 -0
  154. package/dist/context/section/cta.md +83 -0
  155. package/dist/context/section/feature-grid.md +98 -0
  156. package/dist/context/section/hero.md +101 -0
  157. package/dist/context/section/media-masonry.md +77 -0
  158. package/dist/context/section/page-footer.md +101 -0
  159. package/dist/context/section/stats-band.md +81 -0
  160. package/dist/context/segmented-control.md +101 -0
  161. package/dist/context/select.md +101 -0
  162. package/dist/context/separator.md +88 -0
  163. package/dist/context/sheet.md +100 -0
  164. package/dist/context/shell-header.md +105 -0
  165. package/dist/context/side-nav.md +134 -0
  166. package/dist/context/skeleton.md +101 -0
  167. package/dist/context/skip-nav.md +103 -0
  168. package/dist/context/slider.md +98 -0
  169. package/dist/context/spinner.md +89 -0
  170. package/dist/context/stack.md +96 -0
  171. package/dist/context/stat.md +101 -0
  172. package/dist/context/status.md +105 -0
  173. package/dist/context/steps.md +124 -0
  174. package/dist/context/structured-list.md +107 -0
  175. package/dist/context/swap.md +100 -0
  176. package/dist/context/swipe-item.md +110 -0
  177. package/dist/context/switcher.md +97 -0
  178. package/dist/context/tabs.md +93 -0
  179. package/dist/context/tag.md +110 -0
  180. package/dist/context/tags-input.md +94 -0
  181. package/dist/context/text.md +111 -0
  182. package/dist/context/textarea.md +98 -0
  183. package/dist/context/tile.md +116 -0
  184. package/dist/context/time-picker.md +102 -0
  185. package/dist/context/timeline.md +93 -0
  186. package/dist/context/toast.md +91 -0
  187. package/dist/context/toc.md +110 -0
  188. package/dist/context/toggle-group.md +118 -0
  189. package/dist/context/toggle.md +103 -0
  190. package/dist/context/toggletip.md +119 -0
  191. package/dist/context/tooltip.md +92 -0
  192. package/dist/context/tree-view.md +107 -0
  193. package/dist/context/user.md +100 -0
  194. package/dist/context/visually-hidden.md +90 -0
  195. package/dist/context.json +22456 -0
  196. package/dist/index.d.mts +5 -2
  197. package/dist/index.d.mts.map +1 -1
  198. package/dist/index.mjs +374 -64
  199. package/dist/index.mjs.map +1 -1
  200. package/dist/marketplace.json +70 -0
  201. package/dist/registry.json +5622 -786
  202. package/dist/tokens.catalog.json +2375 -0
  203. package/dist/tokens.variants.json +3291 -0
  204. package/package.json +4 -3
  205. package/readme.body.md +53 -22
@@ -0,0 +1,109 @@
1
+ # Item
2
+
3
+ **Category:** display
4
+ **Description:** Generic content row primitive with media, content, and action regions
5
+
6
+ ## When to use
7
+
8
+ - Composing a single content row with leading media, a text block, and trailing actions
9
+ - Building list, menu, or card rows from a consistent layout primitive
10
+ - Slotting a row onto a real anchor or button via asChild for navigation or selection
11
+
12
+ ## When NOT to use
13
+
14
+ - A full surface with elevation and padding regions — use Card
15
+ - Key-value metadata pairs — use DataList
16
+
17
+ ## Anti-patterns
18
+
19
+ ### asChild merges row styling onto the real interactive element instead of nesting a non-semantic div
20
+
21
+ **Bad:** `Wrapping an Item div in an anchor to make the whole row clickable`
22
+ **Good:** `Use Item asChild with the anchor as the single child so semantics and focus are native`
23
+ **Why:** asChild merges row styling onto the real interactive element instead of nesting a non-semantic div
24
+
25
+ ## Related components
26
+
27
+ - **Card** (alternative): Card is a padded surface; Item is a lightweight horizontal row
28
+ - **ContainedListItem** (alternative): ContainedListItem is bound to a contained list; Item is a free-standing row
29
+
30
+ ## Accessibility rationale
31
+
32
+ Item is presentational by default; the slotted element determines the role and focus behaviour, so wrap it asChild around a button or link when the row is interactive
33
+
34
+ ## Props
35
+
36
+ | Name | Type | Required | Default | Description |
37
+ | --------- | ---------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------- |
38
+ | `asChild` | `boolean` | No | false | When true, renders the child element as the root via Slot, merging props (polymorphic rendering). |
39
+ | `variant` | `'default' \| 'muted'` | No | default | Selects the visual style variant. |
40
+ | `size` | `'sm' \| 'md'` | No | md | Visual size of the component (e.g. 'sm', 'md', 'lg'). |
41
+
42
+ ## Tokens
43
+
44
+ - `--cascivo-color-text`
45
+ - `--cascivo-color-text-subtle`
46
+ - `--cascivo-color-bg-subtle`
47
+ - `--cascivo-radius-item`
48
+ - `--cascivo-space-3`
49
+
50
+ ## Examples
51
+
52
+ ### Item with media, content, and actions
53
+
54
+ ```jsx
55
+ <Item>
56
+ <ItemMedia>
57
+ <Avatar />
58
+ </ItemMedia>
59
+ <ItemContent>
60
+ <ItemTitle>Ada Lovelace</ItemTitle>
61
+ <ItemDescription>Mathematician</ItemDescription>
62
+ </ItemContent>
63
+ <ItemActions>
64
+ <Button size="sm">Edit</Button>
65
+ </ItemActions>
66
+ </Item>
67
+ ```
68
+
69
+ ### As a link via asChild
70
+
71
+ ```jsx
72
+ <Item asChild>
73
+ <a href="/profile">
74
+ <ItemContent>
75
+ <ItemTitle>Profile</ItemTitle>
76
+ </ItemContent>
77
+ </a>
78
+ </Item>
79
+ ```
80
+
81
+ ## Boundaries
82
+
83
+ | Area | Level | Note |
84
+ | ---------------- | -------- | --------------------------------------------------------------------------- |
85
+ | variant and size | flexible | Tune density and emphasis to match the surrounding list |
86
+ | compound parts | flexible | Media, content, title, description, and actions are optional and composable |
87
+
88
+ ## AI context prompt
89
+
90
+ Copy this into an LLM context bar before editing this component:
91
+
92
+ ```text
93
+ I am modifying the cascivo Item component (display). Generic content row primitive with media, content, and action regions
94
+
95
+ Architecture constraints — follow exactly:
96
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
97
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
98
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
99
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
100
+ - CSS logical properties only (RTL-safe).
101
+
102
+ Item is strictly bound to these tokens — use only these, do not invent token names:
103
+ --cascivo-color-text, --cascivo-color-text-subtle, --cascivo-color-bg-subtle, --cascivo-radius-item, --cascivo-space-3
104
+
105
+ Accessibility: role "none", WCAG 2.2-AA. Keep it AA.
106
+ Flexible: variant and size, compound parts.
107
+
108
+ Do not invent props, tokens, or global viewport media queries.
109
+ ```
@@ -0,0 +1,97 @@
1
+ # Join
2
+
3
+ **Category:** layout
4
+ **Description:** Groups adjacent children into a seamless joined element by removing interior borders and radii
5
+
6
+ ## When to use
7
+
8
+ - Input + button search groups where the two controls should appear as one unit
9
+ - Segmented button rows where buttons share borders
10
+
11
+ ## When NOT to use
12
+
13
+ - Independent adjacent buttons that should remain visually separate
14
+ - SegmentedControl — it has its own built-in grouping and selection semantics
15
+
16
+ ## Related components
17
+
18
+ - **SegmentedControl** (alternative): SegmentedControl has built-in selection state; Join is purely a layout wrapper
19
+ - **InputGroup** (alternative): InputGroup handles input + addon joining; Join is the general-purpose grouping primitive
20
+
21
+ ## Accessibility rationale
22
+
23
+ Join is a layout-only container (role="none"). Accessibility semantics belong on the individual child controls — buttons carry their own role, inputs their labels.
24
+
25
+ ## Props
26
+
27
+ | Name | Type | Required | Default | Description |
28
+ | ------------- | ---------------------------- | -------- | ---------- | -------------------------------------------------------- |
29
+ | `children` | `React.ReactNode` | Yes | — | Content rendered inside the component. |
30
+ | `orientation` | `'horizontal' \| 'vertical'` | No | horizontal | Layout orientation of the component. |
31
+ | `className` | `string` | No | — | Additional CSS class names merged onto the root element. |
32
+
33
+ ## Examples
34
+
35
+ ### Search group
36
+
37
+ Input and button joined into a single search control
38
+
39
+ ```jsx
40
+ <Join>
41
+ <Input placeholder="Search…" />
42
+ <Button>Go</Button>
43
+ </Join>
44
+ ```
45
+
46
+ ### Segmented buttons
47
+
48
+ Segmented button row with no gaps between items
49
+
50
+ ```jsx
51
+ <Join>
52
+ <Button variant="secondary">Day</Button>
53
+ <Button variant="secondary">Week</Button>
54
+ <Button variant="secondary">Month</Button>
55
+ </Join>
56
+ ```
57
+
58
+ ### Vertical stack
59
+
60
+ Vertically joined button group
61
+
62
+ ```jsx
63
+ <Join orientation="vertical">
64
+ <Button>Top</Button>
65
+ <Button>Middle</Button>
66
+ <Button>Bottom</Button>
67
+ </Join>
68
+ ```
69
+
70
+ ## Boundaries
71
+
72
+ | Area | Level | Note |
73
+ | ----------- | -------- | ---------------------------------------------------------------------------- |
74
+ | orientation | flexible | Horizontal and vertical grouping are both supported via the orientation prop |
75
+
76
+ ## AI context prompt
77
+
78
+ Copy this into an LLM context bar before editing this component:
79
+
80
+ ```text
81
+ I am modifying the cascivo Join component (layout). Groups adjacent children into a seamless joined element by removing interior borders and radii
82
+
83
+ Architecture constraints — follow exactly:
84
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
85
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
86
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
87
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
88
+ - CSS logical properties only (RTL-safe).
89
+
90
+ Join is strictly bound to these tokens — use only these, do not invent token names:
91
+ none declared
92
+
93
+ Accessibility: role "none", WCAG 2.2-AA. Keep it AA.
94
+ Flexible: orientation.
95
+
96
+ Do not invent props, tokens, or global viewport media queries.
97
+ ```
@@ -0,0 +1,100 @@
1
+ # Kbd
2
+
3
+ **Category:** display
4
+ **Description:** Displays a keyboard key or shortcut
5
+
6
+ ## When to use
7
+
8
+ - Showing a keyboard key or shortcut the user should press
9
+ - Documenting hotkeys in menus, tooltips, or help text
10
+
11
+ ## When NOT to use
12
+
13
+ - Inline code, commands, or identifiers — use Code
14
+ - A short label that is not a key press — use Badge or Text
15
+
16
+ ## Anti-patterns
17
+
18
+ ### Kbd is for keys to press, not shell commands or code
19
+
20
+ **Bad:** `<Kbd>npm install</Kbd>`
21
+ **Good:** `<Code>npm install</Code>`
22
+ **Why:** Kbd is for keys to press, not shell commands or code
23
+
24
+ ## Related components
25
+
26
+ - **Code** (alternative): Code marks literal code; Kbd marks keys to press
27
+
28
+ ## Accessibility rationale
29
+
30
+ Renders a native <kbd> element so assistive tech identifies the content as keyboard input; compose multiple <kbd> for a chord rather than encoding the combination in one string
31
+
32
+ ## Props
33
+
34
+ | Name | Type | Required | Default | Description |
35
+ | ------ | -------------- | -------- | ------- | ----------------------------------------------------- |
36
+ | `size` | `'sm' \| 'md'` | No | md | Visual size of the component (e.g. 'sm', 'md', 'lg'). |
37
+
38
+ ## Tokens
39
+
40
+ - `--cascivo-color-text-subtle`
41
+ - `--cascivo-color-surface-raised`
42
+ - `--cascivo-color-border`
43
+ - `--cascivo-color-border-strong`
44
+ - `--cascivo-radius-sm`
45
+
46
+ ## Examples
47
+
48
+ ### Single key
49
+
50
+ ```jsx
51
+ <Kbd>⌘</Kbd>
52
+ ```
53
+
54
+ ### Shortcut
55
+
56
+ Compose multiple keys to show a shortcut
57
+
58
+ ```jsx
59
+ <span>
60
+ <Kbd>⌘</Kbd> + <Kbd>K</Kbd>
61
+ </span>
62
+ ```
63
+
64
+ ### Small
65
+
66
+ ```jsx
67
+ <Kbd size="sm">Esc</Kbd>
68
+ ```
69
+
70
+ ## Boundaries
71
+
72
+ | Area | Level | Note |
73
+ | ----------- | -------- | ------------------------------------------------------ |
74
+ | size | flexible | sm fits inline help; md matches body text |
75
+ | token names | strict | Surface and border must resolve to --cascivo-\* tokens |
76
+
77
+ ## AI context prompt
78
+
79
+ Copy this into an LLM context bar before editing this component:
80
+
81
+ ```text
82
+ I am modifying the cascivo Kbd component (display). Displays a keyboard key or shortcut
83
+
84
+ Architecture constraints — follow exactly:
85
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
86
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
87
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
88
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
89
+ - CSS logical properties only (RTL-safe).
90
+
91
+ Kbd is strictly bound to these tokens — use only these, do not invent token names:
92
+ --cascivo-color-text-subtle, --cascivo-color-surface-raised, --cascivo-color-border, --cascivo-color-border-strong, --cascivo-radius-sm
93
+
94
+ Accessibility: role "kbd", WCAG 2.2-AA. Keep it AA.
95
+
96
+ Do not change (strict): token names — Surface and border must resolve to --cascivo-* tokens
97
+ Flexible: size.
98
+
99
+ Do not invent props, tokens, or global viewport media queries.
100
+ ```
@@ -0,0 +1,117 @@
1
+ # Label
2
+
3
+ **Category:** inputs
4
+ **Description:** Accessible caption for a form control
5
+
6
+ ## When to use
7
+
8
+ - Naming a single form control (input, select, checkbox) so clicking the text focuses it
9
+ - Marking a field as required with a visible and screen-reader-announced indicator
10
+
11
+ ## When NOT to use
12
+
13
+ - Labeling a group of controls — use a <fieldset>/<legend> instead
14
+ - Static body copy that is not associated with a control — use a plain text element
15
+
16
+ ## Anti-patterns
17
+
18
+ ### Without htmlFor the label is not programmatically associated, so click-to-focus and screen-reader naming break
19
+
20
+ **Bad:** `<Label>Email</Label><input id="email" />`
21
+ **Good:** `<Label htmlFor="email">Email</Label><input id="email" />`
22
+ **Why:** Without htmlFor the label is not programmatically associated, so click-to-focus and screen-reader naming break
23
+
24
+ ### The required marker is rendered for you with an accessible text alternative; a hand-added asterisk is silent to screen readers
25
+
26
+ **Bad:** `<Label required>Email <span>*</span></Label>`
27
+ **Good:** `<Label required>Email</Label>`
28
+ **Why:** The required marker is rendered for you with an accessible text alternative; a hand-added asterisk is silent to screen readers
29
+
30
+ ## Related components
31
+
32
+ - **Field** (contained-by): Field composes Label with a control, description, and error and wires the ids automatically
33
+ - **Input** (pairs-with): A label names the input it points at via htmlFor
34
+
35
+ ## Accessibility rationale
36
+
37
+ Renders a native <label> so the platform handles click-to-focus and accessible naming; the required marker pairs an aria-hidden asterisk with visually-hidden localized text so the requirement is both seen and announced
38
+
39
+ ## Props
40
+
41
+ | Name | Type | Required | Default | Description |
42
+ | ---------- | ----------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------- |
43
+ | `htmlFor` | `string` | No | — | Id of the form control this label is associated with. |
44
+ | `asChild` | `boolean` | No | false | When true, renders the child element as the root via Slot, merging props (polymorphic rendering). |
45
+ | `required` | `boolean` | No | false | When true, marks the field as required. |
46
+ | `disabled` | `boolean` | No | false | When true, disables the control and removes it from the tab order. |
47
+ | `children` | `ReactNode` | Yes | — | Content rendered inside the component. |
48
+ | `labels` | `{ required?: string }` | No | — | Overrides for the component’s user-visible strings (i18n). |
49
+
50
+ ## Tokens
51
+
52
+ - `--cascivo-space-1`
53
+ - `--cascivo-font-sans`
54
+ - `--cascivo-text-sm`
55
+ - `--cascivo-font-medium`
56
+ - `--cascivo-leading-snug`
57
+ - `--cascivo-leading-none`
58
+ - `--cascivo-color-text`
59
+ - `--cascivo-color-destructive`
60
+
61
+ ## Examples
62
+
63
+ ### Basic
64
+
65
+ ```jsx
66
+ <Label htmlFor="email">Email</Label>
67
+ ```
68
+
69
+ ### Required
70
+
71
+ ```jsx
72
+ <Label htmlFor="email" required>
73
+ Email
74
+ </Label>
75
+ ```
76
+
77
+ ### asChild
78
+
79
+ Render the label semantics onto a custom element via Slot.
80
+
81
+ ```jsx
82
+ <Label asChild htmlFor="email">
83
+ <span>Email</span>
84
+ </Label>
85
+ ```
86
+
87
+ ## Boundaries
88
+
89
+ | Area | Level | Note |
90
+ | ----------- | -------- | ------------------------------------------------------------ |
91
+ | token names | strict | Colors and type must resolve to --cascivo-\* semantic tokens |
92
+ | label copy | flexible | Free, within tone guidance |
93
+
94
+ ## AI context prompt
95
+
96
+ Copy this into an LLM context bar before editing this component:
97
+
98
+ ```text
99
+ I am modifying the cascivo Label component (inputs). Accessible caption for a form control
100
+
101
+ Architecture constraints — follow exactly:
102
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
103
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
104
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
105
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
106
+ - CSS logical properties only (RTL-safe).
107
+
108
+ Label is strictly bound to these tokens — use only these, do not invent token names:
109
+ --cascivo-space-1, --cascivo-font-sans, --cascivo-text-sm, --cascivo-font-medium, --cascivo-leading-snug, --cascivo-leading-none, --cascivo-color-text, --cascivo-color-destructive
110
+
111
+ Accessibility: role "label", WCAG 2.2-AA. Keep it AA.
112
+
113
+ Do not change (strict): token names — Colors and type must resolve to --cascivo-* semantic tokens
114
+ Flexible: label copy.
115
+
116
+ Do not invent props, tokens, or global viewport media queries.
117
+ ```
@@ -0,0 +1,85 @@
1
+ # AppShell
2
+
3
+ **Category:** layout
4
+ **Description:** Full-page application shell with persisted collapsible sidebar. Includes a signal-driven top progress bar with determinate progress, error state, and dismissible error strip.
5
+
6
+ ## When to use
7
+
8
+ - A full-page application frame with header, collapsible sidebar, and content
9
+ - You need a bare shell to compose your own navigation into
10
+
11
+ ## When NOT to use
12
+
13
+ - You want opinionated, prewired sidebar navigation — use SidebarApp
14
+ - A simple centered content page — use Section or Center
15
+ - You just need a drop-in header + toggleable nav with no persistence — use the published `AppShell` from @cascivo/react (a `nav` prop, no copy-paste), not this richer copy-paste shell.
16
+
17
+ ## Related components
18
+
19
+ - **AppShell (@cascivo/react)** (alternative): The published, self-contained AppShell: header + a single `nav` slot with an animated accessible drawer, no persistence/progress/aside. Same name, simpler prop surface (`nav` vs this shell’s `sideNav`/`aside`/`persistKey`/`state`). Use it for a quick drop-in; use this copy-paste shell when you need persisted collapse, a progress bar, or a right aside.
20
+ - **SidebarApp** (alternative): Use the opinionated block when you want prewired sidebar nav
21
+ - **DashboardLayout** (alternative): Use for a stats-strip dashboard page rather than a bare shell
22
+
23
+ ## Accessibility rationale
24
+
25
+ Provides landmark structure with header and navigation regions for screen reader orientation.
26
+
27
+ ## Props
28
+
29
+ | Name | Type | Required | Default | Description |
30
+ | ------------ | ----------------- | -------- | ------- | ------------------------------------------------------------------------------ |
31
+ | `header` | `ReactNode` | Yes | — | Top header slot |
32
+ | `sideNav` | `ReactNode` | No | — | Side navigation slot |
33
+ | `aside` | `ReactNode` | No | — | Right aside slot |
34
+ | `children` | `ReactNode` | Yes | — | Main content |
35
+ | `persistKey` | `string \| false` | No | — | localStorage key prefix. Pass false to disable persistence. |
36
+ | `state` | `ShellState` | No | — | External shell state from createShellState(). Created internally when omitted. |
37
+
38
+ ## Tokens
39
+
40
+ - `--cascivo-space-3`
41
+ - `--cascivo-space-4`
42
+ - `--cascivo-space-6`
43
+ - `--cascivo-duration-200`
44
+ - `--cascivo-ease-out`
45
+ - `--cascivo-color-border`
46
+ - `--cascivo-color-surface`
47
+ - `--cascivo-font-size-xs`
48
+ - `--cascivo-color-accent`
49
+ - `--cascivo-color-destructive`
50
+ - `--cascivo-color-destructive-subtle`
51
+ - `--cascivo-focus-ring`
52
+
53
+ ## Examples
54
+
55
+ ### Basic
56
+
57
+ App shell with collapsible nav
58
+
59
+ ```jsx
60
+ <AppShell header={<Header />} sideNav={<Nav />}>
61
+ content
62
+ </AppShell>
63
+ ```
64
+
65
+ ## AI context prompt
66
+
67
+ Copy this into an LLM context bar before editing this component:
68
+
69
+ ```text
70
+ I am modifying the cascivo AppShell component (layout). Full-page application shell with persisted collapsible sidebar. Includes a signal-driven top progress bar with determinate progress, error state, and dismissible error strip.
71
+
72
+ Architecture constraints — follow exactly:
73
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
74
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
75
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
76
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
77
+ - CSS logical properties only (RTL-safe).
78
+
79
+ AppShell is strictly bound to these tokens — use only these, do not invent token names:
80
+ --cascivo-space-3, --cascivo-space-4, --cascivo-space-6, --cascivo-duration-200, --cascivo-ease-out, --cascivo-color-border, --cascivo-color-surface, --cascivo-font-size-xs, --cascivo-color-accent, --cascivo-color-destructive, --cascivo-color-destructive-subtle, --cascivo-focus-ring
81
+
82
+ Accessibility: role "generic", WCAG 2.1-AA. Keep it AA.
83
+
84
+ Do not invent props, tokens, or global viewport media queries.
85
+ ```
@@ -0,0 +1,74 @@
1
+ # AuthLayout
2
+
3
+ **Category:** layout
4
+ **Description:** Centered card layout for authentication pages (login, register, forgot password).
5
+
6
+ ## When to use
7
+
8
+ - Centered card layout for authentication pages — login, register, reset
9
+ - Focused single-task pages with an optional logo and minimal chrome
10
+
11
+ ## When NOT to use
12
+
13
+ - General centered content — use Center
14
+ - A full app frame after sign-in — use AppShell or SidebarApp
15
+
16
+ ## Related components
17
+
18
+ - **LoginPage** (contains): The login page block renders inside this layout
19
+ - **Center** (alternative): Use for plain centering without the auth card framing
20
+
21
+ ## Accessibility rationale
22
+
23
+ Provides a main landmark wrapping the focused auth content.
24
+
25
+ ## Props
26
+
27
+ | Name | Type | Required | Default | Description |
28
+ | ---------- | ----------- | -------- | ------- | -------------------------------------- |
29
+ | `children` | `ReactNode` | Yes | — | Auth form content |
30
+ | `logo` | `ReactNode` | No | — | Optional logo displayed above the form |
31
+
32
+ ## Tokens
33
+
34
+ - `--cascivo-color-bg-subtle`
35
+ - `--cascivo-color-surface`
36
+ - `--cascivo-color-border`
37
+ - `--cascivo-radius-lg`
38
+ - `--cascivo-space-4`
39
+ - `--cascivo-space-6`
40
+ - `--cascivo-space-8`
41
+
42
+ ## Examples
43
+
44
+ ### Login
45
+
46
+ Centered auth card with logo
47
+
48
+ ```jsx
49
+ <AuthLayout logo={<img src="/logo.svg" alt="Logo" />}>
50
+ <form>...</form>
51
+ </AuthLayout>
52
+ ```
53
+
54
+ ## AI context prompt
55
+
56
+ Copy this into an LLM context bar before editing this component:
57
+
58
+ ```text
59
+ I am modifying the cascivo AuthLayout component (layout). Centered card layout for authentication pages (login, register, forgot password).
60
+
61
+ Architecture constraints — follow exactly:
62
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
63
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
64
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
65
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
66
+ - CSS logical properties only (RTL-safe).
67
+
68
+ AuthLayout is strictly bound to these tokens — use only these, do not invent token names:
69
+ --cascivo-color-bg-subtle, --cascivo-color-surface, --cascivo-color-border, --cascivo-radius-lg, --cascivo-space-4, --cascivo-space-6, --cascivo-space-8
70
+
71
+ Accessibility: role "generic", WCAG 2.1-AA. Keep it AA.
72
+
73
+ Do not invent props, tokens, or global viewport media queries.
74
+ ```
@@ -0,0 +1,69 @@
1
+ # AutoGrid
2
+
3
+ **Category:** layout
4
+ **Description:** Media-query-free responsive grid — columns auto-fill based on available space.
5
+
6
+ ## When to use
7
+
8
+ - Responsive card or tile grids that auto-fit columns to available width
9
+ - Avoiding media queries — tracks wrap based on a minimum track width
10
+
11
+ ## When NOT to use
12
+
13
+ - A fixed, known column count — use Grid
14
+ - Single-direction stacking — use Stack
15
+
16
+ ## Related components
17
+
18
+ - **Grid** (alternative): Use when an explicit column count is required
19
+
20
+ ## Accessibility rationale
21
+
22
+ Pure layout primitive with no semantic role; does not affect the accessibility tree.
23
+
24
+ ## Props
25
+
26
+ | Name | Type | Required | Default | Description |
27
+ | ----- | ----------------------------- | -------- | ------- | ------------------------------------------------------ |
28
+ | `min` | `string` | No | "16rem" | Minimum track width before items wrap to fewer columns |
29
+ | `gap` | `1\|2\|3\|4\|5\|6\|8\|10\|12` | No | 4 | Spacing token step |
30
+
31
+ ## Tokens
32
+
33
+ - `--cascivo-space-*`
34
+
35
+ ## Examples
36
+
37
+ ### Auto-filling grid
38
+
39
+ Items fill available space and wrap when narrower than 12rem
40
+
41
+ ```jsx
42
+ <AutoGrid min="12rem" gap={4}>
43
+ <div>Card 1</div>
44
+ <div>Card 2</div>
45
+ <div>Card 3</div>
46
+ </AutoGrid>
47
+ ```
48
+
49
+ ## AI context prompt
50
+
51
+ Copy this into an LLM context bar before editing this component:
52
+
53
+ ```text
54
+ I am modifying the cascivo AutoGrid component (layout). Media-query-free responsive grid — columns auto-fill based on available space.
55
+
56
+ Architecture constraints — follow exactly:
57
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
58
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
59
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
60
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
61
+ - CSS logical properties only (RTL-safe).
62
+
63
+ AutoGrid is strictly bound to these tokens — use only these, do not invent token names:
64
+ --cascivo-space-*
65
+
66
+ Accessibility: role "generic", WCAG 2.1-AA. Keep it AA.
67
+
68
+ Do not invent props, tokens, or global viewport media queries.
69
+ ```