@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,100 @@
1
+ # Sheet
2
+
3
+ **Category:** overlay
4
+ **Description:** Slide-in panel from any edge, using popover=manual and @starting-style animations
5
+
6
+ ## When to use
7
+
8
+ - Showing secondary content or a form in a panel that slides in from a screen edge
9
+ - Navigation, filters, or detail views that benefit from full-height side space without leaving the page
10
+ - Mobile-friendly drawers where a centered modal would feel cramped
11
+
12
+ ## When NOT to use
13
+
14
+ - A short confirmation or focused decision — use Modal or AlertDialog
15
+ - Small contextual content anchored to a trigger — use Popover
16
+
17
+ ## Anti-patterns
18
+
19
+ ### A full edge-to-edge panel is overkill for a yes/no decision; AlertDialog is the right scale and semantics
20
+
21
+ **Bad:** `<Sheet title="Delete item?">Are you sure?</Sheet>`
22
+ **Good:** `<AlertDialog title="Delete item?" />`
23
+ **Why:** A full edge-to-edge panel is overkill for a yes/no decision; AlertDialog is the right scale and semantics
24
+
25
+ ## Related components
26
+
27
+ - **Modal** (alternative): Use for centered, focused dialogs rather than edge panels
28
+ - **Popover** (alternative): Use for small content anchored to a trigger element
29
+
30
+ ## Accessibility rationale
31
+
32
+ Uses popover="manual" with role="dialog" and aria-modal so it is announced as a modal surface; when a title is provided it labels the dialog via aria-labelledby (so rich title nodes stay accessible), and Escape/Tab handling comes from the popover platform behavior.
33
+
34
+ ## Props
35
+
36
+ | Name | Type | Required | Default | Description |
37
+ | --------- | --------------------------------------- | -------- | ------- | ------------------------------------------- |
38
+ | `open` | `boolean` | Yes | — | Whether the component is open (controlled). |
39
+ | `onClose` | `() => void` | Yes | — | Called when the component is closed. |
40
+ | `title` | `React.ReactNode` | No | — | Title text for the component. |
41
+ | `side` | `'start' \| 'end' \| 'top' \| 'bottom'` | No | end | Edge the component is anchored to. |
42
+
43
+ ## Tokens
44
+
45
+ - `--cascivo-color-surface`
46
+ - `--cascivo-color-border`
47
+ - `--cascivo-radius-lg`
48
+ - `--cascivo-shadow-xl`
49
+ - `--cascivo-motion-enter`
50
+ - `--cascivo-motion-exit`
51
+
52
+ ## Examples
53
+
54
+ ### Basic
55
+
56
+ ```jsx
57
+ <Sheet open={isOpen} onClose={() => setIsOpen(false)} title="Filters">
58
+ <FilterForm />
59
+ </Sheet>
60
+ ```
61
+
62
+ ### Bottom sheet
63
+
64
+ ```jsx
65
+ <Sheet open={isOpen} onClose={close} side="bottom" title="Share">
66
+ <ShareOptions />
67
+ </Sheet>
68
+ ```
69
+
70
+ ## Boundaries
71
+
72
+ | Area | Level | Note |
73
+ | ------------ | -------- | ----------------------------------------------------------------------------------- |
74
+ | side | strict | Limited to start \| end \| top \| bottom — drives the slide direction and animation |
75
+ | body content | flexible | Any children; consumer owns the panel contents |
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 Sheet component (overlay). Slide-in panel from any edge, using popover=manual and @starting-style animations
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
+ Sheet is strictly bound to these tokens — use only these, do not invent token names:
92
+ --cascivo-color-surface, --cascivo-color-border, --cascivo-radius-lg, --cascivo-shadow-xl, --cascivo-motion-enter, --cascivo-motion-exit
93
+
94
+ Accessibility: role "dialog", WCAG 2.2-AA, keyboard: Escape/Tab/Shift+Tab. Keep it AA.
95
+
96
+ Do not change (strict): side — Limited to start | end | top | bottom — drives the slide direction and animation
97
+ Flexible: body content.
98
+
99
+ Do not invent props, tokens, or global viewport media queries.
100
+ ```
@@ -0,0 +1,105 @@
1
+ # ShellHeader
2
+
3
+ **Category:** navigation
4
+ **Description:** Console application header: brand with prefix, dropdown nav menus, global icon actions, hamburger, skip-to-content
5
+
6
+ ## When to use
7
+
8
+ - Building console/admin app chrome with brand, dropdown nav, and global icon actions
9
+ - Providing a hamburger that toggles a SideNav and a skip-to-content link
10
+ - Hosting global controls (notifications, switcher, user menu) in one top bar
11
+
12
+ ## When NOT to use
13
+
14
+ - A simple marketing or app top bar — use Header
15
+ - In-page section headings — use Heading
16
+
17
+ ## Anti-patterns
18
+
19
+ ### ShellHeader carries console machinery (dropdowns, icon actions, hamburger) that is overkill for simple sites
20
+
21
+ **Bad:** `Reaching for ShellHeader on a basic landing page`
22
+ **Good:** `<Header> for simple top bars`
23
+ **Why:** ShellHeader carries console machinery (dropdowns, icon actions, hamburger) that is overkill for simple sites
24
+
25
+ ## Related components
26
+
27
+ - **SideNav** (pairs-with): The hamburger toggles a SideNav in the app shell
28
+ - **HeaderPanel** (pairs-with): Icon actions open HeaderPanels (notifications, switcher)
29
+ - **Header** (alternative): Header is the simpler top bar for non-console apps
30
+
31
+ ## Accessibility rationale
32
+
33
+ role="banner" landmarks the header; nav dropdowns expose aria-expanded, icon actions use aria-pressed, the hamburger reports aria-expanded, and a skip-to-content link lets keyboard users bypass the chrome
34
+
35
+ ## Props
36
+
37
+ | Name | Type | Required | Default | Description |
38
+ | ------------------- | ------------------------------- | -------- | --------------- | ---------------------------------------------------------------------------------------- |
39
+ | `brand` | `ShellHeaderBrand \| ReactNode` | No | — | Brand: { prefix?, name, href? } or free-form node |
40
+ | `nav` | `ShellHeaderNavItem[]` | No | — | Top nav: links ({ label, href, active?, onClick? }) or dropdown menus ({ label, items }) |
41
+ | `actions` | `ShellHeaderAction[]` | No | — | Right-aligned global icon actions with aria-pressed |
42
+ | `end` | `ReactNode` | No | — | Free-form trailing slot (user menu, theme switcher) |
43
+ | `onMenuClick` | `() => void` | No | — | Renders the hamburger button; call shell.toggleSideNav |
44
+ | `menuExpanded` | `boolean` | No | — | aria-expanded for the hamburger button |
45
+ | `skipToContentHref` | `string \| false` | No | '#cascade-main' | Skip-link target; false disables the link |
46
+ | `labels` | `ShellHeaderLabels` | No | — | i18n overrides for built-in strings |
47
+
48
+ ## Tokens
49
+
50
+ - `--cascivo-shell-header-block-size`
51
+ - `--cascivo-color-surface`
52
+ - `--cascivo-color-border`
53
+ - `--cascivo-color-text`
54
+ - `--cascivo-color-text-subtle`
55
+ - `--cascivo-color-accent`
56
+ - `--cascivo-radius-control`
57
+
58
+ ## Examples
59
+
60
+ ### Console header
61
+
62
+ Brand with prefix, dropdown nav, global icon action
63
+
64
+ ```jsx
65
+ <ShellHeader
66
+ brand={{ prefix: 'cascivo', name: 'Console', href: '/' }}
67
+ nav={[
68
+ { label: 'Dashboard', href: '/dash', active: true },
69
+ { label: 'Manage', items: [{ label: 'Users', href: '/users' }] },
70
+ ]}
71
+ actions={[{ id: 'notifications', label: 'Notifications', icon: <Bell /> }]}
72
+ />
73
+ ```
74
+
75
+ ## Boundaries
76
+
77
+ | Area | Level | Note |
78
+ | ------------------------- | -------- | ---------------------------------------------------------------------- |
79
+ | nav / actions / end slots | flexible | Brand, nav, actions, and end are composable and optional |
80
+ | token names | strict | Surfaces, sizing, and accent must resolve to --cascivo-\* shell tokens |
81
+
82
+ ## AI context prompt
83
+
84
+ Copy this into an LLM context bar before editing this component:
85
+
86
+ ```text
87
+ I am modifying the cascivo ShellHeader component (navigation). Console application header: brand with prefix, dropdown nav menus, global icon actions, hamburger, skip-to-content
88
+
89
+ Architecture constraints — follow exactly:
90
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
91
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
92
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
93
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
94
+ - CSS logical properties only (RTL-safe).
95
+
96
+ ShellHeader is strictly bound to these tokens — use only these, do not invent token names:
97
+ --cascivo-shell-header-block-size, --cascivo-color-surface, --cascivo-color-border, --cascivo-color-text, --cascivo-color-text-subtle, --cascivo-color-accent, --cascivo-radius-control
98
+
99
+ Accessibility: role "banner", WCAG 2.2-AA, keyboard: Tab/Enter/Space/ArrowDown/ArrowUp/Escape. Keep it AA.
100
+
101
+ Do not change (strict): token names — Surfaces, sizing, and accent must resolve to --cascivo-* shell tokens
102
+ Flexible: nav / actions / end slots.
103
+
104
+ Do not invent props, tokens, or global viewport media queries.
105
+ ```
@@ -0,0 +1,134 @@
1
+ # SideNav
2
+
3
+ **Category:** navigation
4
+ **Description:** Collapsible sidebar navigation with optional icons and one level of grouping
5
+
6
+ ## When to use
7
+
8
+ - Persistent primary navigation along the side of an app shell
9
+ - Grouping nav items one level deep with collapsible groups
10
+ - Saving space with a collapsible icon rail (collapsed / expandOnHover)
11
+
12
+ ## When NOT to use
13
+
14
+ - Top-level horizontal navigation — use Header or ShellHeader nav
15
+ - A transient contextual menu — use Dropdown
16
+
17
+ ## Anti-patterns
18
+
19
+ ### Deep nesting in a sidebar is hard to scan and the component supports only one level by design
20
+
21
+ **Bad:** `Nesting nav groups more than one level deep`
22
+ **Good:** `Flatten to a single level of grouping, or split into sections`
23
+ **Why:** Deep nesting in a sidebar is hard to scan and the component supports only one level by design
24
+
25
+ ## Related components
26
+
27
+ - **ShellHeader** (pairs-with): The header hamburger toggles SideNav collapse
28
+
29
+ ## Accessibility rationale
30
+
31
+ role="navigation" with an aria-label names the region; the collapse toggle has an explicit expand/collapse label, groups expose aria-expanded, and the collapsed rail provides tooltips/flyouts so icon-only items remain identifiable
32
+
33
+ ## Props
34
+
35
+ | Name | Type | Required | Default | Description |
36
+ | ------------------- | ------------------------------ | -------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
37
+ | `items` | `SideNavItem[]` | Yes | — | { label, href?, icon?, active?, items?, onClick?, disabled?, tone?, trailing?, render? } — an onClick-only item renders a focusable <button>; nested items render expandable menus (links, action sub-items with onSelect/selected, separators, labels); render() is an alignment-preserving escape hatch |
38
+ | `collapsed` | `boolean` | No | — | Controlled collapsed state (rail mode) |
39
+ | `defaultCollapsed` | `boolean` | No | false | Whether the rail is collapsed on first render (uncontrolled). |
40
+ | `onCollapsedChange` | `(collapsed: boolean) => void` | No | — | Called with the new collapsed state when it changes. |
41
+ | `ariaLabel` | `string` | No | Side navigation | Accessible label for the component. |
42
+ | `collapseLabel` | `string` | No | Collapse navigation | Accessible label for the collapse control. |
43
+ | `expandLabel` | `string` | No | Expand navigation | Accessible label for the expand control. |
44
+ | `expandOnHover` | `boolean` | No | false | Widens the rail as an overlay on hover/focus-within; suppresses tooltips/flyouts |
45
+ | `header` | `ReactNode` | No | — | Content rendered above the items, inside the item padding context (e.g. app-context pickers) |
46
+ | `footer` | `ReactNode` | No | — | Content rendered above the collapse toggle (e.g. version string, user info) |
47
+ | `className` | `string` | No | — | Additional CSS class names merged onto the root element. |
48
+
49
+ ## Tokens
50
+
51
+ - `--cascivo-sidenav-inline-size`
52
+ - `--cascivo-sidenav-rail-inline-size`
53
+ - `--cascivo-sidenav-bg`
54
+ - `--cascivo-color-surface`
55
+ - `--cascivo-color-border`
56
+ - `--cascivo-color-text`
57
+ - `--cascivo-color-text-subtle`
58
+ - `--cascivo-color-bg-subtle`
59
+ - `--cascivo-color-accent`
60
+ - `--cascivo-color-accent-subtle`
61
+ - `--cascivo-color-destructive`
62
+ - `--cascivo-color-warning`
63
+ - `--cascivo-color-success`
64
+ - `--cascivo-focus-ring`
65
+ - `--cascivo-motion-enter`
66
+ - `--cascivo-motion-exit`
67
+ - `--cascivo-motion-emphasis`
68
+
69
+ ## Examples
70
+
71
+ ### Basic
72
+
73
+ ```jsx
74
+ <SideNav
75
+ items={[
76
+ { label: 'Home', href: '/', active: true },
77
+ { label: 'Reports', href: '/reports' },
78
+ ]}
79
+ />
80
+ ```
81
+
82
+ ### With a group
83
+
84
+ ```jsx
85
+ <SideNav items={[{ label: 'Settings', items: [{ label: 'Profile', href: '/profile' }] }]} />
86
+ ```
87
+
88
+ ### Icon rail
89
+
90
+ Collapsed rail: icons-only with tooltips, grapheme fallback for icon-less items, flyout menus for groups
91
+
92
+ ```jsx
93
+ <SideNav collapsed items={[{ label: 'Home', href: '/', icon: <Home size={16} /> }]} />
94
+ ```
95
+
96
+ ### Expand on hover
97
+
98
+ Rail widens as CSS overlay on hover without reflowing adjacent content
99
+
100
+ ```jsx
101
+ <SideNav collapsed expandOnHover items={items} />
102
+ ```
103
+
104
+ ## Boundaries
105
+
106
+ | Area | Level | Note |
107
+ | ------------------------- | -------- | ---------------------------------------------------------------- |
108
+ | collapsed / expandOnHover | flexible | Rail behavior is configurable for density needs |
109
+ | token names | strict | Sizing, surfaces, and motion must resolve to --cascivo-\* tokens |
110
+
111
+ ## AI context prompt
112
+
113
+ Copy this into an LLM context bar before editing this component:
114
+
115
+ ```text
116
+ I am modifying the cascivo SideNav component (navigation). Collapsible sidebar navigation with optional icons and one level of grouping
117
+
118
+ Architecture constraints — follow exactly:
119
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
120
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
121
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
122
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
123
+ - CSS logical properties only (RTL-safe).
124
+
125
+ SideNav is strictly bound to these tokens — use only these, do not invent token names:
126
+ --cascivo-sidenav-inline-size, --cascivo-sidenav-rail-inline-size, --cascivo-sidenav-bg, --cascivo-color-surface, --cascivo-color-border, --cascivo-color-text, --cascivo-color-text-subtle, --cascivo-color-bg-subtle, --cascivo-color-accent, --cascivo-color-accent-subtle, --cascivo-color-destructive, --cascivo-color-warning, --cascivo-color-success, --cascivo-focus-ring, --cascivo-motion-enter, --cascivo-motion-exit, --cascivo-motion-emphasis
127
+
128
+ Accessibility: role "navigation", WCAG 2.2-AA, keyboard: Tab/Enter/Space/ArrowDown/ArrowUp/Escape. Keep it AA.
129
+
130
+ Do not change (strict): token names — Sizing, surfaces, and motion must resolve to --cascivo-* tokens
131
+ Flexible: collapsed / expandOnHover.
132
+
133
+ Do not invent props, tokens, or global viewport media queries.
134
+ ```
@@ -0,0 +1,101 @@
1
+ # Skeleton
2
+
3
+ **Category:** display
4
+ **Description:** Animated loading placeholder that mirrors the shape of pending content
5
+
6
+ ## When to use
7
+
8
+ - Indicating loading by mirroring the shape of the content that will appear
9
+ - Reducing layout shift while data for a known structure is fetching
10
+ - Loading larger content regions where shape preview reassures the user
11
+
12
+ ## When NOT to use
13
+
14
+ - Indeterminate work with no known content shape — use Spinner
15
+ - A view that is empty rather than loading — use EmptyState
16
+
17
+ ## Anti-patterns
18
+
19
+ ### A persistent skeleton signals perpetual loading and traps assistive tech in a pending state
20
+
21
+ **Bad:** `Leaving Skeleton mounted after data has loaded`
22
+ **Good:** `Swap Skeleton for the real content once data resolves`
23
+ **Why:** A persistent skeleton signals perpetual loading and traps assistive tech in a pending state
24
+
25
+ ## Related components
26
+
27
+ - **Spinner** (alternative): Spinner suits indeterminate work with no content shape to preview
28
+ - **EmptyState** (alternative): Use EmptyState when the result is empty, not loading
29
+
30
+ ## Accessibility rationale
31
+
32
+ Presentational by role — the placeholder shapes carry no meaning; the surrounding region should expose busy/loading state so assistive tech is not left guessing
33
+
34
+ ## Props
35
+
36
+ | Name | Type | Required | Default | Description |
37
+ | --------- | ------------------------------ | -------- | ------- | ----------------------------------------------------------------- |
38
+ | `variant` | `'text' \| 'circle' \| 'rect'` | No | text | Selects the visual style variant. |
39
+ | `width` | `string` | No | — | CSS length applied as an inline custom property |
40
+ | `height` | `string` | No | — | CSS length applied as an inline custom property |
41
+ | `lines` | `number` | No | 1 | Number of bars for the text variant; the last bar renders shorter |
42
+
43
+ ## Tokens
44
+
45
+ - `--cascivo-color-border`
46
+ - `--cascivo-color-bg-subtle`
47
+ - `--cascivo-radius-sm`
48
+ - `--cascivo-radius-full`
49
+ - `--cascivo-radius-component`
50
+
51
+ ## Examples
52
+
53
+ ### Text
54
+
55
+ ```jsx
56
+ <Skeleton lines={3} />
57
+ ```
58
+
59
+ ### Avatar
60
+
61
+ ```jsx
62
+ <Skeleton variant="circle" width="3rem" height="3rem" />
63
+ ```
64
+
65
+ ### Image
66
+
67
+ ```jsx
68
+ <Skeleton variant="rect" height="12rem" />
69
+ ```
70
+
71
+ ## Boundaries
72
+
73
+ | Area | Level | Note |
74
+ | ---------------------- | -------- | -------------------------------------------------------------- |
75
+ | variant and dimensions | flexible | Shape, width, height, and line count match the pending content |
76
+ | token names | strict | Background and radius must resolve to --cascivo-\* tokens |
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 Skeleton component (display). Animated loading placeholder that mirrors the shape of pending content
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
+ Skeleton is strictly bound to these tokens — use only these, do not invent token names:
93
+ --cascivo-color-border, --cascivo-color-bg-subtle, --cascivo-radius-sm, --cascivo-radius-full, --cascivo-radius-component
94
+
95
+ Accessibility: role "none", WCAG 2.2-AA. Keep it AA.
96
+
97
+ Do not change (strict): token names — Background and radius must resolve to --cascivo-* tokens
98
+ Flexible: variant and dimensions.
99
+
100
+ Do not invent props, tokens, or global viewport media queries.
101
+ ```
@@ -0,0 +1,103 @@
1
+ # SkipNav
2
+
3
+ **Category:** navigation
4
+ **Description:** Skip link that jumps keyboard users past the navigation to the main content
5
+
6
+ ## When to use
7
+
8
+ - Letting keyboard users jump past repeated navigation to the main content
9
+ - Meeting WCAG bypass-blocks by providing a skip link as the first focusable element
10
+ - Targeting a custom main-content anchor (targetId / matching SkipNavTarget id)
11
+
12
+ ## When NOT to use
13
+
14
+ - General in-page navigation — use anchor links or a table of contents
15
+ - Visible persistent navigation — this link is hidden until focused
16
+
17
+ ## Anti-patterns
18
+
19
+ ### A skip link only works if the user reaches it before tabbing through the nav it bypasses
20
+
21
+ **Bad:** `Placing SkipNavLink after the navigation in the DOM`
22
+ **Good:** `Make SkipNavLink the first focusable element on the page`
23
+ **Why:** A skip link only works if the user reaches it before tabbing through the nav it bypasses
24
+
25
+ ## Related components
26
+
27
+ - **ShellHeader** (alternative): ShellHeader has a built-in skip-to-content link for console shells
28
+
29
+ ## Accessibility rationale
30
+
31
+ Renders an anchor that is visually hidden until focused, then becomes visible so sighted keyboard users see where focus is; activating it moves focus to the matching target past the navigation
32
+
33
+ ## Props
34
+
35
+ | Name | Type | Required | Default | Description |
36
+ | ---------- | -------------------- | -------- | ------------------- | ----------------------------------------------------------- |
37
+ | `targetId` | `string` | No | cascade-skip-target | SkipNavLink: id of the SkipNavTarget to jump to |
38
+ | `labels` | `{ label?: string }` | No | — | SkipNavLink: overrides the built-in i18n label per instance |
39
+ | `id` | `string` | No | cascade-skip-target | SkipNavTarget: anchor id — must match the link targetId |
40
+
41
+ ## Tokens
42
+
43
+ - `--cascivo-color-surface`
44
+ - `--cascivo-color-border`
45
+ - `--cascivo-color-text`
46
+ - `--cascivo-radius-control`
47
+ - `--cascivo-focus-ring`
48
+
49
+ ## Examples
50
+
51
+ ### Default pair
52
+
53
+ SkipNavLink must be the first focusable element on the page
54
+
55
+ ```jsx
56
+ <>
57
+ <SkipNavLink />
58
+ <nav>…</nav>
59
+ <SkipNavTarget />
60
+ <main>…</main>
61
+ </>
62
+ ```
63
+
64
+ ### Custom target
65
+
66
+ ```jsx
67
+ <>
68
+ <SkipNavLink targetId="main-content" />
69
+ <SkipNavTarget id="main-content" />
70
+ </>
71
+ ```
72
+
73
+ ## Boundaries
74
+
75
+ | Area | Level | Note |
76
+ | ------------------------- | -------- | ----------------------------------------------------------- |
77
+ | target id | flexible | targetId/id may be customized as long as they match |
78
+ | first-focusable placement | strict | SkipNavLink must be the first focusable element to function |
79
+
80
+ ## AI context prompt
81
+
82
+ Copy this into an LLM context bar before editing this component:
83
+
84
+ ```text
85
+ I am modifying the cascivo SkipNav component (navigation). Skip link that jumps keyboard users past the navigation to the main content
86
+
87
+ Architecture constraints — follow exactly:
88
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
89
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
90
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
91
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
92
+ - CSS logical properties only (RTL-safe).
93
+
94
+ SkipNav is strictly bound to these tokens — use only these, do not invent token names:
95
+ --cascivo-color-surface, --cascivo-color-border, --cascivo-color-text, --cascivo-radius-control, --cascivo-focus-ring
96
+
97
+ Accessibility: role "link", WCAG 2.2-AA, keyboard: Tab/Enter. Keep it AA.
98
+
99
+ Do not change (strict): first-focusable placement — SkipNavLink must be the first focusable element to function
100
+ Flexible: target id.
101
+
102
+ Do not invent props, tokens, or global viewport media queries.
103
+ ```
@@ -0,0 +1,98 @@
1
+ # Slider
2
+
3
+ **Category:** inputs
4
+ **Description:** Range input for selecting a value within bounds
5
+
6
+ ## When to use
7
+
8
+ - Selecting a value within a continuous or stepped numeric range where approximate adjustment is fine
9
+ - Settings like volume, brightness, or opacity where dragging gives instant feedback
10
+ - When the bounds (min/max) matter more than entering an exact figure
11
+
12
+ ## When NOT to use
13
+
14
+ - A precise numeric value must be typed — use NumberInput
15
+ - Picking a discrete rating on a small scale where stars/icons read better — use RatingGroup
16
+
17
+ ## Anti-patterns
18
+
19
+ ### A huge range makes a single value impossible to hit by dragging; type the exact number instead
20
+
21
+ **Bad:** `<Slider label="Price" min={0} max={1000000} />`
22
+ **Good:** `<NumberInput label="Price" />`
23
+ **Why:** A huge range makes a single value impossible to hit by dragging; type the exact number instead
24
+
25
+ ## Related components
26
+
27
+ - **NumberInput** (alternative): Use when an exact, typed numeric value is required
28
+ - **RatingGroup** (alternative): Use for small discrete rating scales rather than a continuous range
29
+
30
+ ## Accessibility rationale
31
+
32
+ Renders a native <input type="range"> so the slider role, value announcements, and full arrow/Home/End keyboard support come from the platform without custom ARIA.
33
+
34
+ ## Props
35
+
36
+ | Name | Type | Required | Default | Description |
37
+ | -------------- | --------- | -------- | ------- | ------------------------------------------------------------------ |
38
+ | `label` | `string` | No | — | Text label for the control. |
39
+ | `min` | `number` | No | 0 | Minimum allowed value. |
40
+ | `max` | `number` | No | 100 | Maximum allowed value. |
41
+ | `step` | `number` | No | 1 | Increment between allowed values. |
42
+ | `value` | `number` | No | — | The controlled value. |
43
+ | `defaultValue` | `number` | No | — | The initial value when uncontrolled. |
44
+ | `disabled` | `boolean` | No | false | When true, disables the control and removes it from the tab order. |
45
+
46
+ ## Tokens
47
+
48
+ - `--cascivo-color-accent`
49
+ - `--cascivo-color-border-strong`
50
+ - `--cascivo-color-surface`
51
+ - `--cascivo-radius-full`
52
+ - `--cascivo-focus-ring`
53
+
54
+ ## Examples
55
+
56
+ ### Basic
57
+
58
+ ```jsx
59
+ <Slider label="Volume" defaultValue={50} />
60
+ ```
61
+
62
+ ### Stepped
63
+
64
+ ```jsx
65
+ <Slider label="Rating" min={0} max={5} step={1} />
66
+ ```
67
+
68
+ ## Boundaries
69
+
70
+ | Area | Level | Note |
71
+ | ------------ | -------- | -------------------------------------------------------------------------------------- |
72
+ | token names | strict | Track and thumb colors must resolve to --cascivo-color-\* / radius / focus-ring tokens |
73
+ | min/max/step | flexible | Consumer-defined bounds and increment |
74
+
75
+ ## AI context prompt
76
+
77
+ Copy this into an LLM context bar before editing this component:
78
+
79
+ ```text
80
+ I am modifying the cascivo Slider component (inputs). Range input for selecting a value within bounds
81
+
82
+ Architecture constraints — follow exactly:
83
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
84
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
85
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
86
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
87
+ - CSS logical properties only (RTL-safe).
88
+
89
+ Slider is strictly bound to these tokens — use only these, do not invent token names:
90
+ --cascivo-color-accent, --cascivo-color-border-strong, --cascivo-color-surface, --cascivo-radius-full, --cascivo-focus-ring
91
+
92
+ Accessibility: role "slider", WCAG 2.2-AA, keyboard: ArrowLeft/ArrowRight/ArrowUp/ArrowDown/Home/End. Keep it AA.
93
+
94
+ Do not change (strict): token names — Track and thumb colors must resolve to --cascivo-color-* / radius / focus-ring tokens
95
+ Flexible: min/max/step.
96
+
97
+ Do not invent props, tokens, or global viewport media queries.
98
+ ```