@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
+ # PullToRefresh
2
+
3
+ **Category:** feedback
4
+ **Description:** Wraps a scrollable region and triggers a refresh when pulled down past a threshold at the top
5
+
6
+ ## When to use
7
+
8
+ - A scrollable list or feed on touch devices that the user refreshes by pulling down from the top
9
+ - Mobile screens where a dedicated refresh button would be redundant or out of reach
10
+ - Content that updates on demand and benefits from a familiar pull gesture
11
+
12
+ ## When NOT to use
13
+
14
+ - Desktop, pointer-first surfaces — provide an explicit Refresh button
15
+ - Content that auto-refreshes or paginates on scroll — use infinite scroll instead
16
+ - Regions that are not the primary scroll container of the screen
17
+
18
+ ## Anti-patterns
19
+
20
+ ### Pull-to-refresh is touch-only; keyboard and pointer users need an explicit control
21
+
22
+ **Bad:** `Wrapping a non-scrolling element and relying on pull as the only refresh path`
23
+ **Good:** `Wrap the scroll container and also expose a Refresh control for non-touch users`
24
+ **Why:** Pull-to-refresh is touch-only; keyboard and pointer users need an explicit control
25
+
26
+ ## Related components
27
+
28
+ - **Spinner** (contains): Shows the Spinner while the refresh promise settles
29
+ - **ScrollArea** (pairs-with): Wraps a scrollable region; pair with the app’s scroll container
30
+
31
+ ## Accessibility rationale
32
+
33
+ The gesture is a touch-only enhancement: it arms only at scrollTop 0 and uses touch-action/overscroll containment so normal scrolling and keyboard use are unaffected. A polite aria-live status region announces the pull, release, and refreshing states (strings from the i18n catalog), and the Spinner exposes role="status" while loading. Because pull-to-refresh cannot be performed without a pointer, apps should also offer an explicit refresh control for keyboard users.
34
+
35
+ ## Props
36
+
37
+ | Name | Type | Required | Default | Description |
38
+ | ----------- | ---------------------------------------------------------- | -------- | ------- | ----------------------------------------------------------------------------- |
39
+ | `onRefresh` | `() => Promise<unknown> \| unknown` | Yes | — | Called when the pull passes the threshold; the spinner shows until it settles |
40
+ | `children` | `React.ReactNode` | Yes | — | Content rendered inside the component. |
41
+ | `threshold` | `number` | No | 64 | Pull distance (px) required to trigger a refresh. |
42
+ | `disabled` | `boolean` | No | — | When true, disables the control and removes it from the tab order. |
43
+ | `labels` | `{ pull?: string; release?: string; refreshing?: string }` | No | — | Overrides for the component’s user-visible strings (i18n). |
44
+ | `className` | `string` | No | — | Additional CSS class names merged onto the root element. |
45
+
46
+ ## Tokens
47
+
48
+ - `--cascivo-color-text-muted`
49
+ - `--cascivo-motion-enter`
50
+
51
+ ## Examples
52
+
53
+ ### Basic
54
+
55
+ The spinner shows until the returned promise settles.
56
+
57
+ ```jsx
58
+ <PullToRefresh onRefresh={() => refetch()}>
59
+ <FeedList items={items} />
60
+ </PullToRefresh>
61
+ ```
62
+
63
+ ### Custom threshold
64
+
65
+ Requires a longer pull before a refresh is triggered.
66
+
67
+ ```jsx
68
+ <PullToRefresh onRefresh={loadLatest} threshold={96}>
69
+ <MessageList />
70
+ </PullToRefresh>
71
+ ```
72
+
73
+ ## Boundaries
74
+
75
+ | Area | Level | Note |
76
+ | --------- | -------- | ---------------------------------------------------------------- |
77
+ | threshold | flexible | Pull distance required to trigger is configurable (default 64px) |
78
+ | onRefresh | flexible | May return a promise; the spinner persists until it settles |
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 PullToRefresh component (feedback). Wraps a scrollable region and triggers a refresh when pulled down past a threshold at the top
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
+ PullToRefresh is strictly bound to these tokens — use only these, do not invent token names:
95
+ --cascivo-color-text-muted, --cascivo-motion-enter
96
+
97
+ Accessibility: role "status", WCAG 2.2-AA. Keep it AA.
98
+ Flexible: threshold, onRefresh.
99
+
100
+ Do not invent props, tokens, or global viewport media queries.
101
+ ```
@@ -0,0 +1,101 @@
1
+ # QrCode
2
+
3
+ **Category:** display
4
+ **Description:** Encodes a URL or short text into a scannable SVG QR code
5
+
6
+ ## When to use
7
+
8
+ - Letting users scan a URL, contact, or short token with a phone camera
9
+ - Bridging print or screen to a digital destination
10
+ - Sharing a link where typing it would be error-prone
11
+
12
+ ## When NOT to use
13
+
14
+ - Encoding long or sensitive payloads — QR codes are public and capacity-limited
15
+ - Where a plain, copyable link or button is more accessible
16
+
17
+ ## Anti-patterns
18
+
19
+ ### Long payloads force a dense, hard-to-scan code; encode a short URL that redirects instead
20
+
21
+ **Bad:** `<QrCode value={veryLongString} />`
22
+ **Good:** `<QrCode value="https://cascivo.dev/s/abc" />`
23
+ **Why:** Long payloads force a dense, hard-to-scan code; encode a short URL that redirects instead
24
+
25
+ ## Related components
26
+
27
+ - **CopyButton** (pairs-with): Offer a copyable link alongside the QR code for non-camera contexts
28
+
29
+ ## Accessibility rationale
30
+
31
+ Rendered as role="img" with an accessible label so screen-reader users know a QR code is present; the underlying link should also be available as text since a QR code is not operable by assistive tech
32
+
33
+ ## Props
34
+
35
+ | Name | Type | Required | Default | Description |
36
+ | ----------------- | -------------------------- | -------- | ------------ | ----------------------------------------------------- |
37
+ | `value` | `string` | Yes | — | Text or URL to encode |
38
+ | `size` | `number` | No | 128 | Visual size of the component (e.g. 'sm', 'md', 'lg'). |
39
+ | `errorCorrection` | `'L' \| 'M' \| 'Q' \| 'H'` | No | M | Higher levels tolerate more damage but hold less data |
40
+ | `radius` | `string` | No | — | CSS length rounding the corners |
41
+ | `fill` | `string` | No | currentColor | Foreground color of the QR modules. |
42
+ | `background` | `string` | No | transparent | Background color behind the QR code. |
43
+ | `label` | `string` | No | — | Text label for the control. |
44
+
45
+ ## Tokens
46
+
47
+ - `--cascivo-color-text`
48
+
49
+ ## Examples
50
+
51
+ ### URL
52
+
53
+ ```jsx
54
+ <QrCode value="https://cascivo.dev" />
55
+ ```
56
+
57
+ ### High error correction
58
+
59
+ ```jsx
60
+ <QrCode value="https://cascivo.dev" errorCorrection="H" size={200} />
61
+ ```
62
+
63
+ ### Custom colors
64
+
65
+ ```jsx
66
+ <QrCode
67
+ value="cascivo"
68
+ fill="var(--cascivo-color-accent)"
69
+ background="var(--cascivo-color-surface)"
70
+ />
71
+ ```
72
+
73
+ ## Boundaries
74
+
75
+ | Area | Level | Note |
76
+ | --------------- | -------- | ------------------------------------------------------------------------------------------------ |
77
+ | errorCorrection | flexible | Raise to Q/H when the code may be printed small or partially obscured |
78
+ | colors | flexible | Defaults to currentColor; keep sufficient contrast between fill and background to stay scannable |
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 QrCode component (display). Encodes a URL or short text into a scannable SVG QR code
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
+ QrCode is strictly bound to these tokens — use only these, do not invent token names:
95
+ --cascivo-color-text
96
+
97
+ Accessibility: role "img", WCAG 2.2-AA. Keep it AA.
98
+ Flexible: errorCorrection, colors.
99
+
100
+ Do not invent props, tokens, or global viewport media queries.
101
+ ```
@@ -0,0 +1,117 @@
1
+ # RadialProgress
2
+
3
+ **Category:** feedback
4
+ **Description:** Circular progress indicator using conic-gradient, with percentage label and variant colors
5
+
6
+ ## When to use
7
+
8
+ - Dashboard KPI metrics showing completion percentage
9
+ - Skill or profile completion meters
10
+ - Storage or quota usage displays
11
+
12
+ ## When NOT to use
13
+
14
+ - Unknown-length operations where completion is not measurable — use Spinner
15
+ - Linear progress where a bar is more readable — use Progress or ProgressBar
16
+ - Comparing multiple values against each other — use a chart component
17
+
18
+ ## Anti-patterns
19
+
20
+ ### RadialProgress implies a known completion percentage; fake cycling breaks the semantic contract
21
+
22
+ **Bad:** `<RadialProgress value={indeterminate} /> with a fake cycling value`
23
+ **Good:** `<Spinner /> for indeterminate loading states`
24
+ **Why:** RadialProgress implies a known completion percentage; fake cycling breaks the semantic contract
25
+
26
+ ## Related components
27
+
28
+ - **Spinner** (alternative): Use for indeterminate loading where total duration is unknown
29
+ - **Progress** (alternative): Use when a horizontal bar is more appropriate for the layout
30
+ - **ProgressCircle** (alternative): Similar shape but ProgressCircle uses SVG stroke; RadialProgress uses CSS conic-gradient
31
+
32
+ ## Accessibility rationale
33
+
34
+ Renders a div with role="progressbar", aria-valuenow (clamped 0–100), aria-valuemin=0, aria-valuemax=100. Provide aria-label when no visible label describes the metric being measured.
35
+
36
+ ## Props
37
+
38
+ | Name | Type | Required | Default | Description |
39
+ | ------------ | ---------------------------------------------------------- | -------- | ------- | -------------------------------------------------------- |
40
+ | `value` | `number` | Yes | — | The controlled value. |
41
+ | `size` | `'sm' \| 'md' \| 'lg'` | No | md | Visual size of the component (e.g. 'sm', 'md', 'lg'). |
42
+ | `variant` | `'primary' \| 'info' \| 'success' \| 'warning' \| 'error'` | No | primary | Selects the visual style variant. |
43
+ | `children` | `React.ReactNode` | No | — | Content rendered inside the component. |
44
+ | `aria-label` | `string` | No | — | Accessible label used when no visible label is present. |
45
+ | `className` | `string` | No | — | Additional CSS class names merged onto the root element. |
46
+
47
+ ## Tokens
48
+
49
+ - `--cascivo-color-primary`
50
+ - `--cascivo-color-info`
51
+ - `--cascivo-color-success`
52
+ - `--cascivo-color-warning`
53
+ - `--cascivo-color-error`
54
+ - `--cascivo-color-surface`
55
+ - `--cascivo-color-surface-2`
56
+ - `--cascivo-color-text`
57
+ - `--cascivo-radius-full`
58
+
59
+ ## Examples
60
+
61
+ ### Default
62
+
63
+ Primary color, md size, auto percentage label
64
+
65
+ ```jsx
66
+ <RadialProgress value={72} />
67
+ ```
68
+
69
+ ### Success large
70
+
71
+ Completed state with success color at large size
72
+
73
+ ```jsx
74
+ <RadialProgress value={100} size="lg" variant="success" />
75
+ ```
76
+
77
+ ### Custom label
78
+
79
+ Override the default percentage label with custom content
80
+
81
+ ```jsx
82
+ <RadialProgress value={45} variant="warning">
83
+ 45 GB
84
+ </RadialProgress>
85
+ ```
86
+
87
+ ## Boundaries
88
+
89
+ | Area | Level | Note |
90
+ | ----- | -------- | ---------------------------------------------------------------------------- |
91
+ | label | flexible | Default is the percentage string; pass children to override with any content |
92
+ | color | strict | Color resolves through --cascivo-color-\* semantic tokens via data-variant |
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 RadialProgress component (feedback). Circular progress indicator using conic-gradient, with percentage label and variant colors
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
+ RadialProgress is strictly bound to these tokens — use only these, do not invent token names:
109
+ --cascivo-color-primary, --cascivo-color-info, --cascivo-color-success, --cascivo-color-warning, --cascivo-color-error, --cascivo-color-surface, --cascivo-color-surface-2, --cascivo-color-text, --cascivo-radius-full
110
+
111
+ Accessibility: role "progressbar", WCAG 2.2-AA. Keep it AA.
112
+
113
+ Do not change (strict): color — Color resolves through --cascivo-color-* semantic tokens via data-variant
114
+ Flexible: label.
115
+
116
+ Do not invent props, tokens, or global viewport media queries.
117
+ ```
@@ -0,0 +1,95 @@
1
+ # RadioCard
2
+
3
+ **Category:** inputs
4
+ **Description:** Selectable card backed by a native radio input. Use RadioCardGroup for single-select groups.
5
+
6
+ ## When to use
7
+
8
+ - Single-select from a few options where each choice needs a title plus supporting description (plans, tiers, shipping methods)
9
+ - Selection UIs where a larger, more prominent click target improves clarity over a plain radio
10
+
11
+ ## When NOT to use
12
+
13
+ - Plain text options with no description — use Radio for a lighter footprint
14
+ - A compact inline switch between a few modes — use SegmentedControl
15
+ - Too many options to render as cards — use Select
16
+
17
+ ## Anti-patterns
18
+
19
+ ### RadioCard reads its name, selected value, and change handler from RadioCardGroup context; outside a group it has no shared name and cannot enforce single-selection
20
+
21
+ **Bad:** `<RadioCard ... /> rendered standalone without RadioCardGroup`
22
+ **Good:** `<RadioCardGroup name="plan" label="Plan"><RadioCard value="pro" title="Pro" /></RadioCardGroup>`
23
+ **Why:** RadioCard reads its name, selected value, and change handler from RadioCardGroup context; outside a group it has no shared name and cannot enforce single-selection
24
+
25
+ ## Related components
26
+
27
+ - **Radio** (alternative): Use for plain text options without descriptions
28
+ - **CheckboxCard** (alternative): Use the card pattern when multiple selections are allowed
29
+ - **SegmentedControl** (alternative): Use for a compact inline single choice
30
+
31
+ ## Accessibility rationale
32
+
33
+ Each card is a <label> wrapping a native <input type="radio"> and RadioCardGroup applies role="radiogroup" with an aria-label, so selection, arrow-key navigation, and label association come from the platform rather than custom click handling.
34
+
35
+ ## Props
36
+
37
+ | Name | Type | Required | Default | Description |
38
+ | ------------- | ----------- | -------- | ------- | -------------------- |
39
+ | `value` | `string` | Yes | — | Radio value |
40
+ | `title` | `ReactNode` | Yes | — | Card title |
41
+ | `description` | `ReactNode` | No | — | Optional description |
42
+ | `disabled` | `boolean` | No | — | Disables the card |
43
+
44
+ ## Tokens
45
+
46
+ - `--cascivo-color-accent`
47
+ - `--cascivo-color-border`
48
+ - `--cascivo-radius-surface`
49
+ - `--cascivo-color-active-bg`
50
+
51
+ ## Examples
52
+
53
+ ### Plan selector
54
+
55
+ Single-select plan picker
56
+
57
+ ```jsx
58
+ <RadioCardGroup name="plan" defaultValue="pro" label="Plan">
59
+ <RadioCard value="free" title="Free" description="For hobbyists" />
60
+ <RadioCard value="pro" title="Pro" description="For professionals" />
61
+ <RadioCard value="team" title="Team" description="For teams" />
62
+ </RadioCardGroup>
63
+ ```
64
+
65
+ ## Boundaries
66
+
67
+ | Area | Level | Note |
68
+ | --------------------- | -------- | ------------------------------------------------------------------------- |
69
+ | token names | strict | Card and indicator styling must resolve to the listed --cascivo-\* tokens |
70
+ | title and description | flexible | title and description accept arbitrary ReactNode content |
71
+
72
+ ## AI context prompt
73
+
74
+ Copy this into an LLM context bar before editing this component:
75
+
76
+ ```text
77
+ I am modifying the cascivo RadioCard component (inputs). Selectable card backed by a native radio input. Use RadioCardGroup for single-select groups.
78
+
79
+ Architecture constraints — follow exactly:
80
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
81
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
82
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
83
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
84
+ - CSS logical properties only (RTL-safe).
85
+
86
+ RadioCard is strictly bound to these tokens — use only these, do not invent token names:
87
+ --cascivo-color-accent, --cascivo-color-border, --cascivo-radius-surface, --cascivo-color-active-bg
88
+
89
+ Accessibility: role "radiogroup", WCAG 2.2-AA, keyboard: ArrowDown/ArrowUp/Space. Keep it AA.
90
+
91
+ Do not change (strict): token names — Card and indicator styling must resolve to the listed --cascivo-* tokens
92
+ Flexible: title and description.
93
+
94
+ Do not invent props, tokens, or global viewport media queries.
95
+ ```
@@ -0,0 +1,94 @@
1
+ # Radio
2
+
3
+ **Category:** inputs
4
+ **Description:** Single choice from a set, grouped with RadioGroup
5
+
6
+ ## When to use
7
+
8
+ - Choosing exactly one option from a small, mutually exclusive set (roughly 2–6) where all options should stay visible
9
+ - Form fields where the choices need plain text labels and a familiar radio affordance
10
+
11
+ ## When NOT to use
12
+
13
+ - Selecting one of many options where showing them all is impractical — use Select
14
+ - Each option needs a title plus description or richer layout — use RadioCard
15
+ - A compact inline switch between a few views or modes — use SegmentedControl
16
+
17
+ ## Anti-patterns
18
+
19
+ ### Checkboxes imply multi-select; a radio group communicates and enforces single-choice semantics to assistive tech
20
+
21
+ **Bad:** `Multiple <Checkbox> where only one may be selected`
22
+ **Good:** `<RadioGroup name="plan"><Radio value="pro" label="Pro" /><Radio value="team" label="Team" /></RadioGroup>`
23
+ **Why:** Checkboxes imply multi-select; a radio group communicates and enforces single-choice semantics to assistive tech
24
+
25
+ ## Related components
26
+
27
+ - **RadioCard** (alternative): Use when each option needs a title, description, or card layout
28
+ - **SegmentedControl** (alternative): Use for a compact inline single choice among a few options
29
+ - **Select** (alternative): Use when there are too many options to show inline
30
+
31
+ ## Accessibility rationale
32
+
33
+ Each Radio is a native <input type="radio"> wrapped in a <label>, and RadioGroup applies role="radiogroup" with a shared name so the browser provides roving arrow-key navigation, single-selection, and label association for free.
34
+
35
+ ## Props
36
+
37
+ | Name | Type | Required | Default | Description |
38
+ | ---------- | --------- | -------- | ------- | ------------------------------------------------------------------ |
39
+ | `label` | `string` | No | — | Text label for the control. |
40
+ | `value` | `string` | Yes | — | The controlled value. |
41
+ | `disabled` | `boolean` | No | false | When true, disables the control and removes it from the tab order. |
42
+ | `name` | `string` | No | — | Form field name shared by the radio group. |
43
+
44
+ ## Tokens
45
+
46
+ - `--cascivo-color-surface`
47
+ - `--cascivo-color-accent`
48
+ - `--cascivo-color-border-strong`
49
+ - `--cascivo-color-text-on-accent`
50
+ - `--cascivo-radius-full`
51
+ - `--cascivo-focus-ring`
52
+
53
+ ## Examples
54
+
55
+ ### Group
56
+
57
+ ```jsx
58
+ <RadioGroup name="plan" defaultValue="pro">
59
+ <Radio value="pro" label="Pro" />
60
+ <Radio value="team" label="Team" />
61
+ </RadioGroup>
62
+ ```
63
+
64
+ ## Boundaries
65
+
66
+ | Area | Level | Note |
67
+ | ----------------------------- | -------- | ------------------------------------------------------------------------------ |
68
+ | token names | strict | Control and label styling must resolve to the listed --cascivo-\* tokens |
69
+ | option labels and orientation | flexible | Labels are free text and the group supports horizontal or vertical orientation |
70
+
71
+ ## AI context prompt
72
+
73
+ Copy this into an LLM context bar before editing this component:
74
+
75
+ ```text
76
+ I am modifying the cascivo Radio component (inputs). Single choice from a set, grouped with RadioGroup
77
+
78
+ Architecture constraints — follow exactly:
79
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
80
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
81
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
82
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
83
+ - CSS logical properties only (RTL-safe).
84
+
85
+ Radio is strictly bound to these tokens — use only these, do not invent token names:
86
+ --cascivo-color-surface, --cascivo-color-accent, --cascivo-color-border-strong, --cascivo-color-text-on-accent, --cascivo-radius-full, --cascivo-focus-ring
87
+
88
+ Accessibility: role "radio", WCAG 2.2-AA, keyboard: ArrowUp/ArrowDown/ArrowLeft/ArrowRight/Space. Keep it AA.
89
+
90
+ Do not change (strict): token names — Control and label styling must resolve to the listed --cascivo-* tokens
91
+ Flexible: option labels and orientation.
92
+
93
+ Do not invent props, tokens, or global viewport media queries.
94
+ ```
@@ -0,0 +1,97 @@
1
+ # RatingGroup
2
+
3
+ **Category:** inputs
4
+ **Description:** Star rating input with accessible radio group pattern
5
+
6
+ ## When to use
7
+
8
+ - Capturing a discrete subjective rating on a small fixed scale (e.g. 1–5 stars)
9
+ - Displaying an existing rating read-only as a compact star summary
10
+
11
+ ## When NOT to use
12
+
13
+ - Choosing along a continuous or large numeric range — use Slider
14
+ - Entering an exact bounded number with steppers — use NumberInput
15
+ - A non-rating single choice among labeled options — use Radio or SegmentedControl
16
+
17
+ ## Anti-patterns
18
+
19
+ ### A slider communicates a continuous magnitude; RatingGroup uses radio semantics so each star is an exclusive discrete choice announced as "N of M stars"
20
+
21
+ **Bad:** `<Slider min={1} max={5} step={1} /> labeled as a star rating`
22
+ **Good:** `<RatingGroup value={rating} onValueChange={setRating} />`
23
+ **Why:** A slider communicates a continuous magnitude; RatingGroup uses radio semantics so each star is an exclusive discrete choice announced as "N of M stars"
24
+
25
+ ## Related components
26
+
27
+ - **Slider** (alternative): Use for continuous or larger numeric ranges
28
+ - **NumberInput** (alternative): Use when an exact typed number is needed rather than a rating
29
+
30
+ ## Accessibility rationale
31
+
32
+ Each star is a <button role="radio"> inside a role="radiogroup" with aria-checked on the selected value and an aria-label like "3 of 5 stars"; when readOnly or disabled the stars drop out of the tab order so a non-interactive rating is not announced as actionable.
33
+
34
+ ## Props
35
+
36
+ | Name | Type | Required | Default | Description |
37
+ | --------------- | ---------------------- | -------- | ------- | ------------------------------------------------------------------ |
38
+ | `value` | `number` | Yes | — | The controlled value. |
39
+ | `onValueChange` | `(v: number) => void` | No | — | Called with the new value when it changes. |
40
+ | `max` | `number` | No | 5 | Maximum allowed value. |
41
+ | `size` | `'sm' \| 'md' \| 'lg'` | No | md | Visual size of the component (e.g. 'sm', 'md', 'lg'). |
42
+ | `disabled` | `boolean` | No | false | When true, disables the control and removes it from the tab order. |
43
+ | `readOnly` | `boolean` | No | false | When true, the value is shown but cannot be edited. |
44
+ | `labels` | `RatingGroupLabels` | No | — | Overrides for the component’s user-visible strings (i18n). |
45
+
46
+ ## Tokens
47
+
48
+ - `--cascivo-color-warning`
49
+ - `--cascivo-color-border-strong`
50
+ - `--cascivo-color-accent`
51
+ - `--cascivo-radius-sm`
52
+
53
+ ## Examples
54
+
55
+ ### Basic
56
+
57
+ ```jsx
58
+ <RatingGroup value={3} onValueChange={() => {}} />
59
+ ```
60
+
61
+ ### Read only
62
+
63
+ ```jsx
64
+ <RatingGroup value={4} readOnly />
65
+ ```
66
+
67
+ ## Boundaries
68
+
69
+ | Area | Level | Note |
70
+ | ---------------- | -------- | ------------------------------------------------------------------------- |
71
+ | token names | strict | Star styling must resolve to the listed --cascivo-\* tokens |
72
+ | scale and labels | flexible | max sets the scale and labels.rating customizes the per-star announcement |
73
+
74
+ ## AI context prompt
75
+
76
+ Copy this into an LLM context bar before editing this component:
77
+
78
+ ```text
79
+ I am modifying the cascivo RatingGroup component (inputs). Star rating input with accessible radio group pattern
80
+
81
+ Architecture constraints — follow exactly:
82
+ - Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
83
+ - Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
84
+ - Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
85
+ - Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
86
+ - CSS logical properties only (RTL-safe).
87
+
88
+ RatingGroup is strictly bound to these tokens — use only these, do not invent token names:
89
+ --cascivo-color-warning, --cascivo-color-border-strong, --cascivo-color-accent, --cascivo-radius-sm
90
+
91
+ Accessibility: role "radiogroup", WCAG 2.2-AA, keyboard: Tab/Space/Enter. Keep it AA.
92
+
93
+ Do not change (strict): token names — Star styling must resolve to the listed --cascivo-* tokens
94
+ Flexible: scale and labels.
95
+
96
+ Do not invent props, tokens, or global viewport media queries.
97
+ ```