@cascivo/mcp 0.2.0 → 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 -23
  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 +3 -1
  197. package/dist/index.d.mts.map +1 -1
  198. package/dist/index.mjs +73 -32
  199. package/dist/index.mjs.map +1 -1
  200. package/dist/marketplace.json +70 -0
  201. package/dist/registry.json +2832 -358
  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 -23
@@ -0,0 +1,101 @@
1
+ # Hero
2
+
3
+ **Category:** layout
4
+ **Description:** Page hero section — centered or split layout with eyebrow, title, description, actions and media slots. Replace demo content before shipping.
5
+
6
+ ## When to use
7
+
8
+ - The primary page intro with eyebrow, title, description, actions, and media
9
+ - Landing-page tops in centered or split layout
10
+
11
+ ## When NOT to use
12
+
13
+ - An application page top — use PageHeader
14
+ - A mid-page conversion prompt — use Cta
15
+
16
+ ## Related components
17
+
18
+ - **PageHeader** (alternative): Use for app pages rather than marketing landings
19
+ - **Cta** (pairs-with): Reinforce the hero with a CTA band later on the page
20
+
21
+ ## Accessibility rationale
22
+
23
+ Renders a section with the page-level heading as its primary landmark.
24
+
25
+ ## Props
26
+
27
+ | Name | Type | Required | Default | Description |
28
+ | -------------- | ----------------------- | -------- | ---------- | --------------------------------------------------------------- |
29
+ | `variant` | `"centered" \| "split"` | No | "centered" | Layout variant: centered (single column) or split (two columns) |
30
+ | `title` | `ReactNode` | Yes | — | Primary heading content |
31
+ | `eyebrow` | `ReactNode` | No | — | Small monospace label above the title |
32
+ | `description` | `ReactNode` | No | — | Supporting paragraph below the title |
33
+ | `actions` | `ReactNode` | No | — | Buttons or links rendered in a row below the description |
34
+ | `media` | `ReactNode` | No | — | Right-hand slot in the split variant (image, demo, code block) |
35
+ | `headingLevel` | `1 \| 2 \| 3` | No | 1 | HTML heading level for document outline control |
36
+
37
+ ## Tokens
38
+
39
+ - `--cascivo-text-4xl`
40
+ - `--cascivo-text-lg`
41
+ - `--cascivo-text-sm`
42
+ - `--cascivo-font-mono`
43
+ - `--cascivo-font-bold`
44
+ - `--cascivo-text-secondary`
45
+ - `--cascivo-space-*`
46
+
47
+ ## Examples
48
+
49
+ ### Centered hero
50
+
51
+ Single-column hero with eyebrow, headline, description, and CTA buttons
52
+
53
+ ```jsx
54
+ <Hero
55
+ eyebrow="v8 — Assembly Included"
56
+ title="Ship the dashboard your ops team deserves"
57
+ description="Cascade gives you charts, layouts and sections — fully composed, copy-paste ready."
58
+ actions={
59
+ <>
60
+ <Button>Get started</Button>
61
+ <Button variant="ghost">View docs</Button>
62
+ </>
63
+ }
64
+ />
65
+ ```
66
+
67
+ ### Split hero
68
+
69
+ Two-column layout with copy on the left and media on the right
70
+
71
+ ```jsx
72
+ <Hero
73
+ variant="split"
74
+ title="Signal-driven, CSS-native"
75
+ description="Fine-grained reactivity with zero re-renders. Beautiful by default."
76
+ actions={<Button>Start building</Button>}
77
+ media={<img src="/preview.png" alt="Dashboard preview" />}
78
+ />
79
+ ```
80
+
81
+ ## AI context prompt
82
+
83
+ Copy this into an LLM context bar before editing this component:
84
+
85
+ ```text
86
+ I am modifying the cascivo Hero component (layout). Page hero section — centered or split layout with eyebrow, title, description, actions and media slots. Replace demo content before shipping.
87
+
88
+ Architecture constraints — follow exactly:
89
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
90
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
91
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
92
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
93
+ - CSS logical properties only (RTL-safe).
94
+
95
+ Hero is strictly bound to these tokens — use only these, do not invent token names:
96
+ --cascivo-text-4xl, --cascivo-text-lg, --cascivo-text-sm, --cascivo-font-mono, --cascivo-font-bold, --cascivo-text-secondary, --cascivo-space-*
97
+
98
+ Accessibility: role "region", WCAG 2.1-AA. Keep it AA.
99
+
100
+ Do not invent props, tokens, or global viewport media queries.
101
+ ```
@@ -0,0 +1,77 @@
1
+ # MediaMasonry
2
+
3
+ **Category:** layout
4
+ **Description:** Masonry gallery section — native CSS masonry where supported, multi-column fallback elsewhere (fallback orders tiles top-to-bottom per column). Tiles style themselves; section provides only the layout shell.
5
+
6
+ ## When to use
7
+
8
+ - A full-width media gallery section with masonry packing
9
+ - Showcasing images or media tiles of varying heights
10
+
11
+ ## When NOT to use
12
+
13
+ - A bare masonry primitive without section framing — use Masonry
14
+ - Uniform-height cards in rows — use AutoGrid
15
+
16
+ ## Related components
17
+
18
+ - **Masonry** (contains): Uses the masonry primitive for tile packing
19
+
20
+ ## Accessibility rationale
21
+
22
+ Renders a section shell; tiles supply their own accessible content.
23
+
24
+ ## Props
25
+
26
+ | Name | Type | Required | Default | Description |
27
+ | -------------- | ----------------------------- | -------- | ------- | ------------------------------------------------------------------------- |
28
+ | `children` | `ReactNode` | Yes | — | Tile elements (images, cards, quotes) — consumer-provided and self-styled |
29
+ | `title` | `ReactNode` | No | — | Section heading above the gallery |
30
+ | `description` | `ReactNode` | No | — | Subheading below the section title |
31
+ | `headingLevel` | `1 \| 2 \| 3` | No | 2 | HTML heading level for the section title |
32
+ | `cols` | `number` | No | 3 | Number of masonry columns |
33
+ | `gap` | `1\|2\|3\|4\|5\|6\|8\|10\|12` | No | 4 | Gap between tiles (spacing token step) |
34
+
35
+ ## Tokens
36
+
37
+ - `--cascivo-text-2xl`
38
+ - `--cascivo-text-base`
39
+ - `--cascivo-font-bold`
40
+ - `--cascivo-text-secondary`
41
+ - `--cascivo-space-*`
42
+
43
+ ## Examples
44
+
45
+ ### Media gallery
46
+
47
+ Masonry gallery with three image tiles; falls back to CSS columns in unsupported browsers
48
+
49
+ ```jsx
50
+ <MediaMasonry title="Customer stories" cols={3} gap={4}>
51
+ <img src="/photo-1.jpg" alt="Team at desk" />
52
+ <img src="/photo-2.jpg" alt="Product screenshot" />
53
+ <img src="/photo-3.jpg" alt="Dashboard view" />
54
+ </MediaMasonry>
55
+ ```
56
+
57
+ ## AI context prompt
58
+
59
+ Copy this into an LLM context bar before editing this component:
60
+
61
+ ```text
62
+ I am modifying the cascivo MediaMasonry component (layout). Masonry gallery section — native CSS masonry where supported, multi-column fallback elsewhere (fallback orders tiles top-to-bottom per column). Tiles style themselves; section provides only the layout shell.
63
+
64
+ Architecture constraints — follow exactly:
65
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
66
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
67
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
68
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
69
+ - CSS logical properties only (RTL-safe).
70
+
71
+ MediaMasonry is strictly bound to these tokens — use only these, do not invent token names:
72
+ --cascivo-text-2xl, --cascivo-text-base, --cascivo-font-bold, --cascivo-text-secondary, --cascivo-space-*
73
+
74
+ Accessibility: role "region", WCAG 2.1-AA. Keep it AA.
75
+
76
+ Do not invent props, tokens, or global viewport media queries.
77
+ ```
@@ -0,0 +1,101 @@
1
+ # PageFooter
2
+
3
+ **Category:** layout
4
+ **Description:** Site footer — AutoGrid of link groups with a brand/meta bottom row. Renders a <footer> element with a <nav aria-label="Footer"> wrapping the link columns.
5
+
6
+ ## When to use
7
+
8
+ - A site footer with grouped link columns and a brand/meta bottom row
9
+ - Closing marketing or app pages with secondary navigation
10
+
11
+ ## When NOT to use
12
+
13
+ - Primary top navigation — use AppShell or a header
14
+ - A conversion prompt — use Cta
15
+
16
+ ## Related components
17
+
18
+ - **AutoGrid** (contains): Uses an auto-fit grid to lay out link groups
19
+
20
+ ## Accessibility rationale
21
+
22
+ Renders a footer element wrapping a labeled Footer navigation region.
23
+
24
+ ## Props
25
+
26
+ | Name | Type | Required | Default | Description |
27
+ | -------- | --------------- | -------- | ------- | ------------------------------------------------------------------------ |
28
+ | `groups` | `FooterGroup[]` | Yes | — | Array of link groups, each with a title and array of {label, href} links |
29
+ | `brand` | `ReactNode` | No | — | Brand name or logo shown in the bottom row |
30
+ | `meta` | `ReactNode` | No | — | Meta line in the bottom row (license, copyright, etc.) |
31
+
32
+ ## Tokens
33
+
34
+ - `--cascivo-text-sm`
35
+ - `--cascivo-font-mono`
36
+ - `--cascivo-font-semibold`
37
+ - `--cascivo-text-primary`
38
+ - `--cascivo-text-secondary`
39
+ - `--cascivo-color-border`
40
+ - `--cascivo-color-accent`
41
+ - `--cascivo-space-*`
42
+
43
+ ## Examples
44
+
45
+ ### Site footer
46
+
47
+ Three-column footer with brand and license meta
48
+
49
+ ```jsx
50
+ <PageFooter
51
+ brand="Cascade"
52
+ meta="MIT licensed. Built with care."
53
+ groups={[
54
+ {
55
+ title: 'Product',
56
+ links: [
57
+ { label: 'Components', href: '/components' },
58
+ { label: 'Charts', href: '/charts' },
59
+ { label: 'Layouts', href: '/layouts' },
60
+ ],
61
+ },
62
+ {
63
+ title: 'Developers',
64
+ links: [
65
+ { label: 'Docs', href: '/docs' },
66
+ { label: 'GitHub', href: 'https://github.com/cascivo/cascivo' },
67
+ { label: 'Changelog', href: '/changelog' },
68
+ ],
69
+ },
70
+ {
71
+ title: 'Resources',
72
+ links: [
73
+ { label: 'Figma kit', href: '/figma' },
74
+ { label: 'Storybook', href: '/storybook' },
75
+ ],
76
+ },
77
+ ]}
78
+ />
79
+ ```
80
+
81
+ ## AI context prompt
82
+
83
+ Copy this into an LLM context bar before editing this component:
84
+
85
+ ```text
86
+ I am modifying the cascivo PageFooter component (layout). Site footer — AutoGrid of link groups with a brand/meta bottom row. Renders a <footer> element with a <nav aria-label="Footer"> wrapping the link columns.
87
+
88
+ Architecture constraints — follow exactly:
89
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
90
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
91
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
92
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
93
+ - CSS logical properties only (RTL-safe).
94
+
95
+ PageFooter is strictly bound to these tokens — use only these, do not invent token names:
96
+ --cascivo-text-sm, --cascivo-font-mono, --cascivo-font-semibold, --cascivo-text-primary, --cascivo-text-secondary, --cascivo-color-border, --cascivo-color-accent, --cascivo-space-*
97
+
98
+ Accessibility: role "contentinfo", WCAG 2.1-AA. Keep it AA.
99
+
100
+ Do not invent props, tokens, or global viewport media queries.
101
+ ```
@@ -0,0 +1,81 @@
1
+ # StatsBand
2
+
3
+ **Category:** layout
4
+ **Description:** KPI strip — horizontal band of stats with optional delta and inline sparkline trend. Wraps via AutoGrid on narrow containers. No visible heading; provide aria-label for accessibility.
5
+
6
+ ## When to use
7
+
8
+ - A horizontal KPI strip with optional deltas and inline sparkline trends
9
+ - A marketing or dashboard band summarising headline numbers
10
+
11
+ ## When NOT to use
12
+
13
+ - A grid of full stat cards — use StatsCards
14
+ - A single metric — use a Kpi card
15
+
16
+ ## Related components
17
+
18
+ - **StatsCards** (alternative): Use the card grid block for richer per-stat framing
19
+ - **Sparkline** (contains): Embeds inline sparkline trends per stat
20
+
21
+ ## Accessibility rationale
22
+
23
+ Has no visible heading; consumers must supply an aria-label for the band.
24
+
25
+ ## Props
26
+
27
+ | Name | Type | Required | Default | Description |
28
+ | ------------ | ------------ | -------- | ------------- | ------------------------------------------------------------------------------------------------------ |
29
+ | `stats` | `StatItem[]` | Yes | — | Array of stat items: label, value, optional delta (e.g. "+3.2%"), optional trend numbers for sparkline |
30
+ | `aria-label` | `string` | No | "Key metrics" | Accessible label for the stats region |
31
+
32
+ ## Tokens
33
+
34
+ - `--cascivo-text-2xl`
35
+ - `--cascivo-text-sm`
36
+ - `--cascivo-font-bold`
37
+ - `--cascivo-font-mono`
38
+ - `--cascivo-text-secondary`
39
+ - `--cascivo-color-border`
40
+ - `--cascivo-surface-subtle`
41
+ - `--cascivo-space-*`
42
+
43
+ ## Examples
44
+
45
+ ### KPI band with trends
46
+
47
+ Four KPI cells — three with sparkline trends and signed deltas
48
+
49
+ ```jsx
50
+ <StatsBand
51
+ aria-label="Performance metrics"
52
+ stats={[
53
+ { label: 'p99 latency', value: '184 ms', delta: '-12 ms', trend: [210, 205, 198, 192, 184] },
54
+ { label: 'Error rate', value: '0.12%', delta: '-0.03%', trend: [0.18, 0.16, 0.15, 0.14, 0.12] },
55
+ { label: 'Uptime', value: '99.98%', trend: [99.95, 99.97, 99.98, 99.99, 99.98] },
56
+ { label: 'Deploys today', value: '7' },
57
+ ]}
58
+ />
59
+ ```
60
+
61
+ ## AI context prompt
62
+
63
+ Copy this into an LLM context bar before editing this component:
64
+
65
+ ```text
66
+ I am modifying the cascivo StatsBand component (layout). KPI strip — horizontal band of stats with optional delta and inline sparkline trend. Wraps via AutoGrid on narrow containers. No visible heading; provide aria-label for accessibility.
67
+
68
+ Architecture constraints — follow exactly:
69
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
70
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
71
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
72
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
73
+ - CSS logical properties only (RTL-safe).
74
+
75
+ StatsBand is strictly bound to these tokens — use only these, do not invent token names:
76
+ --cascivo-text-2xl, --cascivo-text-sm, --cascivo-font-bold, --cascivo-font-mono, --cascivo-text-secondary, --cascivo-color-border, --cascivo-surface-subtle, --cascivo-space-*
77
+
78
+ Accessibility: role "region", WCAG 2.1-AA. Keep it AA.
79
+
80
+ Do not invent props, tokens, or global viewport media queries.
81
+ ```
@@ -0,0 +1,101 @@
1
+ # SegmentedControl
2
+
3
+ **Category:** inputs
4
+ **Description:** Mutually exclusive toggle group
5
+
6
+ ## When to use
7
+
8
+ - A compact inline single choice among a few mutually exclusive options (2–5) such as view modes or time ranges
9
+ - Switching between alternatives where all options should stay visible in a tight horizontal space
10
+
11
+ ## When NOT to use
12
+
13
+ - Switching between full panels of page content — use Tabs
14
+ - A single binary on/off state — use Toggle
15
+ - More options than comfortably fit inline, or options needing descriptions — use Select or RadioCard
16
+
17
+ ## Anti-patterns
18
+
19
+ ### A pair of buttons does not convey exclusive selection; SegmentedControl uses radio semantics with aria-checked and arrow-key navigation so the single-choice state is announced
20
+
21
+ **Bad:** `Two <Button> elements toggling which is "active" via app state`
22
+ **Good:** `<SegmentedControl options={[{label:"Day",value:"day"},{label:"Week",value:"week"}]} value={range} onValueChange={setRange} />`
23
+ **Why:** A pair of buttons does not convey exclusive selection; SegmentedControl uses radio semantics with aria-checked and arrow-key navigation so the single-choice state is announced
24
+
25
+ ## Related components
26
+
27
+ - **Toggle** (alternative): Use for a single binary on/off state, not a multi-option choice
28
+ - **Radio** (alternative): Use for a vertical or longer single-choice list with plain labels
29
+ - **Select** (alternative): Use when there are too many options to show inline
30
+
31
+ ## Accessibility rationale
32
+
33
+ Wraps role="radio" buttons in a role="group" with aria-checked marking the selected segment, and ArrowLeft/ArrowRight move selection across enabled segments (skipping disabled ones) so keyboard users get standard single-choice navigation.
34
+
35
+ ## Props
36
+
37
+ | Name | Type | Required | Default | Description |
38
+ | --------------- | -------------------------- | -------- | ------- | ------------------------------------------------------------------ |
39
+ | `options` | `SegmentedControlOption[]` | Yes | — | The selectable options. |
40
+ | `value` | `string` | Yes | — | The controlled value. |
41
+ | `onValueChange` | `(v: string) => void` | Yes | — | Called with the new value when it changes. |
42
+ | `size` | `'sm' \| 'md' \| 'lg'` | No | md | Visual size of the component (e.g. 'sm', 'md', 'lg'). |
43
+ | `disabled` | `boolean` | No | false | When true, disables the control and removes it from the tab order. |
44
+
45
+ ## Tokens
46
+
47
+ - `--cascivo-color-bg-subtle`
48
+ - `--cascivo-color-border`
49
+ - `--cascivo-color-surface`
50
+ - `--cascivo-color-text`
51
+ - `--cascivo-radius-md`
52
+ - `--cascivo-radius-sm`
53
+ - `--cascivo-shadow-sm`
54
+
55
+ ## Examples
56
+
57
+ ### Basic
58
+
59
+ ```jsx
60
+ <SegmentedControl
61
+ options={[
62
+ { label: 'Day', value: 'day' },
63
+ { label: 'Week', value: 'week' },
64
+ { label: 'Month', value: 'month' },
65
+ ]}
66
+ value="day"
67
+ onValueChange={() => {}}
68
+ />
69
+ ```
70
+
71
+ ## Boundaries
72
+
73
+ | Area | Level | Note |
74
+ | ------------- | -------- | ----------------------------------------------------------------------- |
75
+ | token names | strict | Segment styling must resolve to the listed --cascivo-\* tokens |
76
+ | option labels | flexible | option label and value are free, and individual options may be disabled |
77
+
78
+ ## AI context prompt
79
+
80
+ Copy this into an LLM context bar before editing this component:
81
+
82
+ ```text
83
+ I am modifying the cascivo SegmentedControl component (inputs). Mutually exclusive toggle group
84
+
85
+ Architecture constraints — follow exactly:
86
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
87
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
88
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
89
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
90
+ - CSS logical properties only (RTL-safe).
91
+
92
+ SegmentedControl is strictly bound to these tokens — use only these, do not invent token names:
93
+ --cascivo-color-bg-subtle, --cascivo-color-border, --cascivo-color-surface, --cascivo-color-text, --cascivo-radius-md, --cascivo-radius-sm, --cascivo-shadow-sm
94
+
95
+ Accessibility: role "group", WCAG 2.2-AA, keyboard: ArrowLeft/ArrowRight. Keep it AA.
96
+
97
+ Do not change (strict): token names — Segment styling must resolve to the listed --cascivo-* tokens
98
+ Flexible: option labels.
99
+
100
+ Do not invent props, tokens, or global viewport media queries.
101
+ ```
@@ -0,0 +1,101 @@
1
+ # Select
2
+
3
+ **Category:** inputs
4
+ **Description:** Native select menu styled to match the design system
5
+
6
+ ## When to use
7
+
8
+ - Choosing exactly one value from a known, finite list inside a form
9
+ - A compact single-value picker where the native OS dropdown UX is acceptable
10
+ - You want zero-JS reliability and built-in mobile/keyboard handling from a real <select>
11
+
12
+ ## When NOT to use
13
+
14
+ - Users need to filter/search a long list — use Combobox
15
+ - Multiple values must be selectable — use MultiSelect
16
+ - Triggering actions or commands rather than picking a form value — use Dropdown or Menu
17
+
18
+ ## Anti-patterns
19
+
20
+ ### A long unfiltered native list is hard to scan; Combobox adds type-ahead filtering
21
+
22
+ **Bad:** `<Select options={fiftyCountries} placeholder="Search country" />`
23
+ **Good:** `<Combobox options={fiftyCountries} />`
24
+ **Why:** A long unfiltered native list is hard to scan; Combobox adds type-ahead filtering
25
+
26
+ ## Related components
27
+
28
+ - **Combobox** (alternative): Use when the list is long and needs filtering/search
29
+ - **MultiSelect** (alternative): Use when more than one value can be chosen
30
+ - **Dropdown** (alternative): Use for action menus, not single-value form selection
31
+
32
+ ## Accessibility rationale
33
+
34
+ Renders a native <select> so options, type-ahead, and arrow-key navigation come from the platform; error text is linked via aria-describedby and role="alert" with aria-invalid on the control.
35
+
36
+ ## Props
37
+
38
+ | Name | Type | Required | Default | Description |
39
+ | ------------- | -------------------------------------------------------- | -------- | ------- | ------------------------------------------------------------------ |
40
+ | `label` | `string` | No | — | Text label for the control. |
41
+ | `hint` | `string` | No | — | Supplementary hint text shown with the control. |
42
+ | `error` | `string` | No | — | Error message shown when the value is invalid. |
43
+ | `placeholder` | `string` | No | — | Placeholder text shown when the field is empty. |
44
+ | `options` | `{ value: string; label: string; disabled?: boolean }[]` | Yes | — | The selectable options. |
45
+ | `size` | `'sm' \| 'md' \| 'lg'` | No | md | Visual size of the component (e.g. 'sm', 'md', 'lg'). |
46
+ | `disabled` | `boolean` | No | false | When true, disables the control and removes it from the tab order. |
47
+
48
+ ## Tokens
49
+
50
+ - `--cascivo-color-surface`
51
+ - `--cascivo-color-border`
52
+ - `--cascivo-color-accent`
53
+ - `--cascivo-color-text-muted`
54
+ - `--cascivo-radius-input`
55
+ - `--cascivo-focus-ring`
56
+
57
+ ## Examples
58
+
59
+ ### Basic
60
+
61
+ ```jsx
62
+ <Select label="Role" options={[{ value: 'admin', label: 'Admin' }]} />
63
+ ```
64
+
65
+ ### With placeholder
66
+
67
+ ```jsx
68
+ <Select label="Country" placeholder="Choose…" options={countries} />
69
+ ```
70
+
71
+ ## Boundaries
72
+
73
+ | Area | Level | Note |
74
+ | ------------- | -------- | ---------------------------------------------------------------------------- |
75
+ | token names | strict | Visual props must resolve to --cascivo-color-\* / radius / focus-ring tokens |
76
+ | option labels | flexible | Free, supplied by the consumer via the options array |
77
+
78
+ ## AI context prompt
79
+
80
+ Copy this into an LLM context bar before editing this component:
81
+
82
+ ```text
83
+ I am modifying the cascivo Select component (inputs). Native select menu styled to match the design system
84
+
85
+ Architecture constraints — follow exactly:
86
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
87
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
88
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
89
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
90
+ - CSS logical properties only (RTL-safe).
91
+
92
+ Select is strictly bound to these tokens — use only these, do not invent token names:
93
+ --cascivo-color-surface, --cascivo-color-border, --cascivo-color-accent, --cascivo-color-text-muted, --cascivo-radius-input, --cascivo-focus-ring
94
+
95
+ Accessibility: role "listbox", WCAG 2.2-AA, keyboard: ArrowUp/ArrowDown/Space. Keep it AA.
96
+
97
+ Do not change (strict): token names — Visual props must resolve to --cascivo-color-* / radius / focus-ring tokens
98
+ Flexible: option labels.
99
+
100
+ Do not invent props, tokens, or global viewport media queries.
101
+ ```
@@ -0,0 +1,88 @@
1
+ # Separator
2
+
3
+ **Category:** display
4
+ **Description:** Visual or semantic divider between content
5
+
6
+ ## When to use
7
+
8
+ - Dividing groups of content within a section or menu
9
+ - Adding a vertical rule between inline items (orientation="vertical")
10
+ - Marking a meaningful thematic break (decorative=false)
11
+
12
+ ## When NOT to use
13
+
14
+ - Adding spacing only — use margin/padding, not a separator
15
+ - Bordering a container — use the container border, not a separator
16
+
17
+ ## Anti-patterns
18
+
19
+ ### Separators imply a content division; using them for spacing misleads assistive tech
20
+
21
+ **Bad:** `Multiple separators stacked to create whitespace`
22
+ **Good:** `Use spacing tokens for gaps; one separator for a real break`
23
+ **Why:** Separators imply a content division; using them for spacing misleads assistive tech
24
+
25
+ ## Related components
26
+
27
+ - **Card** (contained-by): Often used to divide regions inside a Card
28
+
29
+ ## Accessibility rationale
30
+
31
+ role="separator" when meaningful so screen readers announce the division; setting decorative hides it from the accessibility tree when it is purely visual
32
+
33
+ ## Props
34
+
35
+ | Name | Type | Required | Default | Description |
36
+ | ------------- | ---------------------------- | -------- | ---------- | ------------------------------------------------------------------------ |
37
+ | `orientation` | `'horizontal' \| 'vertical'` | No | horizontal | Layout orientation of the component. |
38
+ | `decorative` | `boolean` | No | false | When true, the separator is purely visual and hidden from assistive tech |
39
+
40
+ ## Tokens
41
+
42
+ - `--cascivo-color-border`
43
+
44
+ ## Examples
45
+
46
+ ### Horizontal
47
+
48
+ ```jsx
49
+ <Separator />
50
+ ```
51
+
52
+ ### Vertical
53
+
54
+ ```jsx
55
+ <Separator orientation="vertical" />
56
+ ```
57
+
58
+ ## Boundaries
59
+
60
+ | Area | Level | Note |
61
+ | ----------- | -------- | ---------------------------------------------------------------- |
62
+ | decorative | flexible | Mark decorative when the break carries no meaning beyond visuals |
63
+ | token names | strict | Color must resolve to --cascivo-color-border |
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 Separator component (display). Visual or semantic divider between content
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
+ Separator is strictly bound to these tokens — use only these, do not invent token names:
80
+ --cascivo-color-border
81
+
82
+ Accessibility: role "separator", WCAG 2.2-AA. Keep it AA.
83
+
84
+ Do not change (strict): token names — Color must resolve to --cascivo-color-border
85
+ Flexible: decorative.
86
+
87
+ Do not invent props, tokens, or global viewport media queries.
88
+ ```