@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.
- package/LICENSE +1 -1
- package/README.md +53 -23
- package/dist/context/accordion.md +93 -0
- package/dist/context/action-sheet.md +117 -0
- package/dist/context/alert-dialog.md +122 -0
- package/dist/context/alert.md +110 -0
- package/dist/context/app-shell.md +98 -0
- package/dist/context/aspect-ratio.md +92 -0
- package/dist/context/avatar-group.md +111 -0
- package/dist/context/avatar.md +100 -0
- package/dist/context/badge.md +119 -0
- package/dist/context/block/console-app.md +66 -0
- package/dist/context/block/dashboard-charts.md +61 -0
- package/dist/context/block/empty-dashboard.md +60 -0
- package/dist/context/block/login-page.md +60 -0
- package/dist/context/block/notification-center.md +61 -0
- package/dist/context/block/page-with-breadcrumb.md +54 -0
- package/dist/context/block/settings-form-page.md +60 -0
- package/dist/context/block/sidebar-app.md +55 -0
- package/dist/context/block/stats-cards.md +61 -0
- package/dist/context/block/users-table-page.md +61 -0
- package/dist/context/blockquote.md +95 -0
- package/dist/context/bottom-sheet.md +112 -0
- package/dist/context/breadcrumb.md +106 -0
- package/dist/context/button-group.md +100 -0
- package/dist/context/button.md +117 -0
- package/dist/context/calendar.md +118 -0
- package/dist/context/card.md +90 -0
- package/dist/context/carousel.md +101 -0
- package/dist/context/chart/area-chart.md +99 -0
- package/dist/context/chart/bar-chart.md +114 -0
- package/dist/context/chart/boxplot.md +82 -0
- package/dist/context/chart/bubble-chart.md +80 -0
- package/dist/context/chart/bullet.md +75 -0
- package/dist/context/chart/calendar.md +79 -0
- package/dist/context/chart/candlestick.md +104 -0
- package/dist/context/chart/combo-chart.md +78 -0
- package/dist/context/chart/funnel.md +87 -0
- package/dist/context/chart/gauge.md +87 -0
- package/dist/context/chart/heatmap.md +77 -0
- package/dist/context/chart/histogram.md +74 -0
- package/dist/context/chart/kpi.md +70 -0
- package/dist/context/chart/line-chart.md +113 -0
- package/dist/context/chart/meter.md +71 -0
- package/dist/context/chart/pie-chart.md +126 -0
- package/dist/context/chart/polar.md +92 -0
- package/dist/context/chart/radar.md +81 -0
- package/dist/context/chart/radial-bar.md +96 -0
- package/dist/context/chart/sankey.md +89 -0
- package/dist/context/chart/scatter-chart.md +90 -0
- package/dist/context/chart/sparkline.md +69 -0
- package/dist/context/chart/stream.md +88 -0
- package/dist/context/chart/sunburst.md +93 -0
- package/dist/context/chart/treemap.md +84 -0
- package/dist/context/chat-bubble.md +116 -0
- package/dist/context/checkbox-card.md +104 -0
- package/dist/context/checkbox.md +104 -0
- package/dist/context/code-snippet.md +118 -0
- package/dist/context/code.md +103 -0
- package/dist/context/collapsible.md +104 -0
- package/dist/context/color-picker.md +101 -0
- package/dist/context/combobox.md +125 -0
- package/dist/context/command-menu.md +121 -0
- package/dist/context/comparison.md +117 -0
- package/dist/context/contained-list.md +103 -0
- package/dist/context/context-menu.md +103 -0
- package/dist/context/copy-button.md +106 -0
- package/dist/context/data-list.md +99 -0
- package/dist/context/data-table.md +149 -0
- package/dist/context/date-picker.md +116 -0
- package/dist/context/date-range-picker.md +113 -0
- package/dist/context/dock.md +117 -0
- package/dist/context/drawer.md +111 -0
- package/dist/context/dropdown.md +96 -0
- package/dist/context/editable.md +101 -0
- package/dist/context/editor/code-editor.md +146 -0
- package/dist/context/editor/highlight.md +74 -0
- package/dist/context/empty-state.md +101 -0
- package/dist/context/fab.md +128 -0
- package/dist/context/field.md +118 -0
- package/dist/context/file-uploader.md +121 -0
- package/dist/context/filter.md +129 -0
- package/dist/context/flow/flow-background.md +103 -0
- package/dist/context/flow/flow-canvas.md +82 -0
- package/dist/context/flow/flow-controls.md +84 -0
- package/dist/context/flow/flow-edge.md +128 -0
- package/dist/context/flow/flow-handle.md +83 -0
- package/dist/context/flow/flow-minimap.md +89 -0
- package/dist/context/flow/flow-node.md +97 -0
- package/dist/context/flow/flow-panel.md +75 -0
- package/dist/context/flow/flow-story.md +145 -0
- package/dist/context/flow/flow.md +139 -0
- package/dist/context/form.md +104 -0
- package/dist/context/header-panel.md +96 -0
- package/dist/context/header.md +104 -0
- package/dist/context/heading.md +107 -0
- package/dist/context/hover-card.md +108 -0
- package/dist/context/icon-button.md +115 -0
- package/dist/context/image.md +115 -0
- package/dist/context/indicator.md +95 -0
- package/dist/context/inline-loading.md +101 -0
- package/dist/context/input-group.md +122 -0
- package/dist/context/input.md +101 -0
- package/dist/context/item.md +109 -0
- package/dist/context/join.md +97 -0
- package/dist/context/kbd.md +100 -0
- package/dist/context/label.md +117 -0
- package/dist/context/layout/app-shell.md +85 -0
- package/dist/context/layout/auth-layout.md +74 -0
- package/dist/context/layout/auto-grid.md +69 -0
- package/dist/context/layout/center.md +67 -0
- package/dist/context/layout/columns.md +70 -0
- package/dist/context/layout/dashboard-layout.md +68 -0
- package/dist/context/layout/grid.md +70 -0
- package/dist/context/layout/masonry.md +70 -0
- package/dist/context/layout/page-header.md +75 -0
- package/dist/context/layout/section.md +69 -0
- package/dist/context/layout/settings-layout.md +68 -0
- package/dist/context/layout/spacer.md +64 -0
- package/dist/context/layout/split-view.md +71 -0
- package/dist/context/layout/stack.md +93 -0
- package/dist/context/link.md +112 -0
- package/dist/context/list.md +109 -0
- package/dist/context/log-viewer.md +124 -0
- package/dist/context/menu-button.md +137 -0
- package/dist/context/menu.md +108 -0
- package/dist/context/menubar.md +92 -0
- package/dist/context/modal.md +96 -0
- package/dist/context/multi-select.md +104 -0
- package/dist/context/native-select.md +118 -0
- package/dist/context/navigation-menu.md +95 -0
- package/dist/context/notification.md +116 -0
- package/dist/context/number-input.md +117 -0
- package/dist/context/otp-input.md +98 -0
- package/dist/context/overflow-menu.md +107 -0
- package/dist/context/pagination.md +123 -0
- package/dist/context/password-input.md +100 -0
- package/dist/context/popover.md +108 -0
- package/dist/context/progress-bar.md +107 -0
- package/dist/context/progress-circle.md +101 -0
- package/dist/context/progress-indicator.md +105 -0
- package/dist/context/progress.md +109 -0
- package/dist/context/prose.md +110 -0
- package/dist/context/pull-to-refresh.md +101 -0
- package/dist/context/qr-code.md +101 -0
- package/dist/context/radial-progress.md +117 -0
- package/dist/context/radio-card.md +95 -0
- package/dist/context/radio.md +94 -0
- package/dist/context/rating-group.md +97 -0
- package/dist/context/relative-time.md +90 -0
- package/dist/context/resizable.md +102 -0
- package/dist/context/scroll-area.md +101 -0
- package/dist/context/search.md +113 -0
- package/dist/context/section/cta.md +83 -0
- package/dist/context/section/feature-grid.md +98 -0
- package/dist/context/section/hero.md +101 -0
- package/dist/context/section/media-masonry.md +77 -0
- package/dist/context/section/page-footer.md +101 -0
- package/dist/context/section/stats-band.md +81 -0
- package/dist/context/segmented-control.md +101 -0
- package/dist/context/select.md +101 -0
- package/dist/context/separator.md +88 -0
- package/dist/context/sheet.md +100 -0
- package/dist/context/shell-header.md +105 -0
- package/dist/context/side-nav.md +134 -0
- package/dist/context/skeleton.md +101 -0
- package/dist/context/skip-nav.md +103 -0
- package/dist/context/slider.md +98 -0
- package/dist/context/spinner.md +89 -0
- package/dist/context/stack.md +96 -0
- package/dist/context/stat.md +101 -0
- package/dist/context/status.md +105 -0
- package/dist/context/steps.md +124 -0
- package/dist/context/structured-list.md +107 -0
- package/dist/context/swap.md +100 -0
- package/dist/context/swipe-item.md +110 -0
- package/dist/context/switcher.md +97 -0
- package/dist/context/tabs.md +93 -0
- package/dist/context/tag.md +110 -0
- package/dist/context/tags-input.md +94 -0
- package/dist/context/text.md +111 -0
- package/dist/context/textarea.md +98 -0
- package/dist/context/tile.md +116 -0
- package/dist/context/time-picker.md +102 -0
- package/dist/context/timeline.md +93 -0
- package/dist/context/toast.md +91 -0
- package/dist/context/toc.md +110 -0
- package/dist/context/toggle-group.md +118 -0
- package/dist/context/toggle.md +103 -0
- package/dist/context/toggletip.md +119 -0
- package/dist/context/tooltip.md +92 -0
- package/dist/context/tree-view.md +107 -0
- package/dist/context/user.md +100 -0
- package/dist/context/visually-hidden.md +90 -0
- package/dist/context.json +22456 -0
- package/dist/index.d.mts +3 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +73 -32
- package/dist/index.mjs.map +1 -1
- package/dist/marketplace.json +70 -0
- package/dist/registry.json +2832 -358
- package/dist/tokens.catalog.json +2375 -0
- package/dist/tokens.variants.json +3291 -0
- package/package.json +4 -3
- package/readme.body.md +53 -23
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# EmptyDashboard
|
|
2
|
+
|
|
3
|
+
**Category:** display
|
|
4
|
+
**Description:** Dashboard page showing an empty state with a call-to-action button.
|
|
5
|
+
|
|
6
|
+
## When to use
|
|
7
|
+
|
|
8
|
+
- A first-run or zero-data dashboard with an empty state and primary CTA
|
|
9
|
+
- Guiding users to create their first item
|
|
10
|
+
|
|
11
|
+
## When NOT to use
|
|
12
|
+
|
|
13
|
+
- Data already exists — use DashboardCharts or DashboardLayout
|
|
14
|
+
- A generic empty state inside a component — use an inline EmptyState
|
|
15
|
+
|
|
16
|
+
## Related components
|
|
17
|
+
|
|
18
|
+
- **DashboardCharts** (alternative): Use once the dashboard has data to display
|
|
19
|
+
|
|
20
|
+
## Accessibility rationale
|
|
21
|
+
|
|
22
|
+
Provides a main landmark with a clear heading and actionable CTA.
|
|
23
|
+
|
|
24
|
+
## Props
|
|
25
|
+
|
|
26
|
+
| Name | Type | Required | Default | Description |
|
|
27
|
+
| -------------- | ------------ | -------- | ------- | -------------------------- |
|
|
28
|
+
| `onCreateItem` | `() => void` | No | — | Create item button handler |
|
|
29
|
+
|
|
30
|
+
## Examples
|
|
31
|
+
|
|
32
|
+
### Default
|
|
33
|
+
|
|
34
|
+
Empty dashboard
|
|
35
|
+
|
|
36
|
+
```jsx
|
|
37
|
+
<EmptyDashboard />
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## AI context prompt
|
|
41
|
+
|
|
42
|
+
Copy this into an LLM context bar before editing this component:
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
I am modifying the cascivo EmptyDashboard component (display). Dashboard page showing an empty state with a call-to-action button.
|
|
46
|
+
|
|
47
|
+
Architecture constraints — follow exactly:
|
|
48
|
+
- Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
|
|
49
|
+
- Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
|
|
50
|
+
- Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
|
|
51
|
+
- Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
|
|
52
|
+
- CSS logical properties only (RTL-safe).
|
|
53
|
+
|
|
54
|
+
EmptyDashboard is strictly bound to these tokens — use only these, do not invent token names:
|
|
55
|
+
none declared
|
|
56
|
+
|
|
57
|
+
Accessibility: role "generic", WCAG 2.1-AA. Keep it AA.
|
|
58
|
+
|
|
59
|
+
Do not invent props, tokens, or global viewport media queries.
|
|
60
|
+
```
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# LoginPage
|
|
2
|
+
|
|
3
|
+
**Category:** display
|
|
4
|
+
**Description:** Authentication login page with email and password form.
|
|
5
|
+
|
|
6
|
+
## When to use
|
|
7
|
+
|
|
8
|
+
- A complete login page with email and password form
|
|
9
|
+
- Standing up authentication quickly with validation built in
|
|
10
|
+
|
|
11
|
+
## When NOT to use
|
|
12
|
+
|
|
13
|
+
- You only need the centered auth frame — use AuthLayout
|
|
14
|
+
- A multi-step signup or onboarding flow
|
|
15
|
+
|
|
16
|
+
## Related components
|
|
17
|
+
|
|
18
|
+
- **AuthLayout** (contained-by): Renders inside the centered auth layout
|
|
19
|
+
|
|
20
|
+
## Accessibility rationale
|
|
21
|
+
|
|
22
|
+
Form fields are labeled and validation messages are associated for screen readers.
|
|
23
|
+
|
|
24
|
+
## Props
|
|
25
|
+
|
|
26
|
+
| Name | Type | Required | Default | Description |
|
|
27
|
+
| ---------- | ------------------------------- | -------- | ------- | --------------------------------------- |
|
|
28
|
+
| `onSubmit` | `(values: LoginValues) => void` | No | — | Called with valid form values on submit |
|
|
29
|
+
|
|
30
|
+
## Examples
|
|
31
|
+
|
|
32
|
+
### Default
|
|
33
|
+
|
|
34
|
+
Login page
|
|
35
|
+
|
|
36
|
+
```jsx
|
|
37
|
+
<LoginPage />
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## AI context prompt
|
|
41
|
+
|
|
42
|
+
Copy this into an LLM context bar before editing this component:
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
I am modifying the cascivo LoginPage component (display). Authentication login page with email and password form.
|
|
46
|
+
|
|
47
|
+
Architecture constraints — follow exactly:
|
|
48
|
+
- Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
|
|
49
|
+
- Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
|
|
50
|
+
- Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
|
|
51
|
+
- Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
|
|
52
|
+
- CSS logical properties only (RTL-safe).
|
|
53
|
+
|
|
54
|
+
LoginPage is strictly bound to these tokens — use only these, do not invent token names:
|
|
55
|
+
none declared
|
|
56
|
+
|
|
57
|
+
Accessibility: role "generic", WCAG 2.1-AA. Keep it AA.
|
|
58
|
+
|
|
59
|
+
Do not invent props, tokens, or global viewport media queries.
|
|
60
|
+
```
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# NotificationCenter
|
|
2
|
+
|
|
3
|
+
**Category:** display
|
|
4
|
+
**Description:** A list of notification alerts with a mark-all-read action.
|
|
5
|
+
|
|
6
|
+
## When to use
|
|
7
|
+
|
|
8
|
+
- A list of notification alerts with a mark-all-read action
|
|
9
|
+
- An inbox or activity panel surfaced from a header bell
|
|
10
|
+
|
|
11
|
+
## When NOT to use
|
|
12
|
+
|
|
13
|
+
- Transient feedback after an action — use a Toast
|
|
14
|
+
- A single inline status message — use an Alert
|
|
15
|
+
|
|
16
|
+
## Related components
|
|
17
|
+
|
|
18
|
+
- **Alert** (contains): Each notification is rendered as an alert item
|
|
19
|
+
|
|
20
|
+
## Accessibility rationale
|
|
21
|
+
|
|
22
|
+
Notification items use alert semantics so screen readers announce new entries.
|
|
23
|
+
|
|
24
|
+
## Props
|
|
25
|
+
|
|
26
|
+
| Name | Type | Required | Default | Description |
|
|
27
|
+
| --------------- | ---------------- | -------- | ------- | ----------------------------- |
|
|
28
|
+
| `notifications` | `Notification[]` | No | — | Notification items to display |
|
|
29
|
+
| `onMarkAllRead` | `() => void` | No | — | Mark all read button handler |
|
|
30
|
+
|
|
31
|
+
## Examples
|
|
32
|
+
|
|
33
|
+
### Default
|
|
34
|
+
|
|
35
|
+
Notification center
|
|
36
|
+
|
|
37
|
+
```jsx
|
|
38
|
+
<NotificationCenter />
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## AI context prompt
|
|
42
|
+
|
|
43
|
+
Copy this into an LLM context bar before editing this component:
|
|
44
|
+
|
|
45
|
+
```text
|
|
46
|
+
I am modifying the cascivo NotificationCenter component (display). A list of notification alerts with a mark-all-read action.
|
|
47
|
+
|
|
48
|
+
Architecture constraints — follow exactly:
|
|
49
|
+
- Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
|
|
50
|
+
- Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
|
|
51
|
+
- Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
|
|
52
|
+
- Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
|
|
53
|
+
- CSS logical properties only (RTL-safe).
|
|
54
|
+
|
|
55
|
+
NotificationCenter is strictly bound to these tokens — use only these, do not invent token names:
|
|
56
|
+
none declared
|
|
57
|
+
|
|
58
|
+
Accessibility: role "generic", WCAG 2.1-AA. Keep it AA.
|
|
59
|
+
|
|
60
|
+
Do not invent props, tokens, or global viewport media queries.
|
|
61
|
+
```
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# PageWithBreadcrumb
|
|
2
|
+
|
|
3
|
+
**Category:** display
|
|
4
|
+
**Description:** A centered content page with a breadcrumb navigation and page header.
|
|
5
|
+
|
|
6
|
+
## When to use
|
|
7
|
+
|
|
8
|
+
- A centered content page with breadcrumb navigation and a page header
|
|
9
|
+
- Deep pages where users need hierarchical context
|
|
10
|
+
|
|
11
|
+
## When NOT to use
|
|
12
|
+
|
|
13
|
+
- Top-level pages with no hierarchy to express
|
|
14
|
+
- You only need the header without breadcrumbs — use PageHeader
|
|
15
|
+
|
|
16
|
+
## Related components
|
|
17
|
+
|
|
18
|
+
- **PageHeader** (contains): Uses a page header with a breadcrumb slot
|
|
19
|
+
|
|
20
|
+
## Accessibility rationale
|
|
21
|
+
|
|
22
|
+
Breadcrumb renders as a labeled navigation region for screen reader orientation.
|
|
23
|
+
|
|
24
|
+
## Examples
|
|
25
|
+
|
|
26
|
+
### Default
|
|
27
|
+
|
|
28
|
+
Page with breadcrumb
|
|
29
|
+
|
|
30
|
+
```jsx
|
|
31
|
+
<PageWithBreadcrumb />
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## AI context prompt
|
|
35
|
+
|
|
36
|
+
Copy this into an LLM context bar before editing this component:
|
|
37
|
+
|
|
38
|
+
```text
|
|
39
|
+
I am modifying the cascivo PageWithBreadcrumb component (display). A centered content page with a breadcrumb navigation and page header.
|
|
40
|
+
|
|
41
|
+
Architecture constraints — follow exactly:
|
|
42
|
+
- Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
|
|
43
|
+
- Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
|
|
44
|
+
- Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
|
|
45
|
+
- Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
|
|
46
|
+
- CSS logical properties only (RTL-safe).
|
|
47
|
+
|
|
48
|
+
PageWithBreadcrumb is strictly bound to these tokens — use only these, do not invent token names:
|
|
49
|
+
none declared
|
|
50
|
+
|
|
51
|
+
Accessibility: role "generic", WCAG 2.1-AA. Keep it AA.
|
|
52
|
+
|
|
53
|
+
Do not invent props, tokens, or global viewport media queries.
|
|
54
|
+
```
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# SettingsFormPage
|
|
2
|
+
|
|
3
|
+
**Category:** display
|
|
4
|
+
**Description:** Settings page with profile form inside a two-column settings layout.
|
|
5
|
+
|
|
6
|
+
## When to use
|
|
7
|
+
|
|
8
|
+
- A settings page with a profile form inside a two-column settings layout
|
|
9
|
+
- Account or preferences pages with a save action
|
|
10
|
+
|
|
11
|
+
## When NOT to use
|
|
12
|
+
|
|
13
|
+
- You only need the layout frame — use SettingsLayout
|
|
14
|
+
- A focused single-field edit — use an inline form
|
|
15
|
+
|
|
16
|
+
## Related components
|
|
17
|
+
|
|
18
|
+
- **SettingsLayout** (contained-by): Composes the two-column settings layout
|
|
19
|
+
|
|
20
|
+
## Accessibility rationale
|
|
21
|
+
|
|
22
|
+
Form fields are labeled and validation messages are associated for screen readers.
|
|
23
|
+
|
|
24
|
+
## Props
|
|
25
|
+
|
|
26
|
+
| Name | Type | Required | Default | Description |
|
|
27
|
+
| -------- | ---------------------------------- | -------- | ------- | --------------------------------------- |
|
|
28
|
+
| `onSave` | `(values: SettingsValues) => void` | No | — | Called with valid form values on submit |
|
|
29
|
+
|
|
30
|
+
## Examples
|
|
31
|
+
|
|
32
|
+
### Default
|
|
33
|
+
|
|
34
|
+
Settings form page
|
|
35
|
+
|
|
36
|
+
```jsx
|
|
37
|
+
<SettingsFormPage />
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## AI context prompt
|
|
41
|
+
|
|
42
|
+
Copy this into an LLM context bar before editing this component:
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
I am modifying the cascivo SettingsFormPage component (display). Settings page with profile form inside a two-column settings layout.
|
|
46
|
+
|
|
47
|
+
Architecture constraints — follow exactly:
|
|
48
|
+
- Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
|
|
49
|
+
- Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
|
|
50
|
+
- Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
|
|
51
|
+
- Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
|
|
52
|
+
- CSS logical properties only (RTL-safe).
|
|
53
|
+
|
|
54
|
+
SettingsFormPage is strictly bound to these tokens — use only these, do not invent token names:
|
|
55
|
+
none declared
|
|
56
|
+
|
|
57
|
+
Accessibility: role "generic", WCAG 2.1-AA. Keep it AA.
|
|
58
|
+
|
|
59
|
+
Do not invent props, tokens, or global viewport media queries.
|
|
60
|
+
```
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# SidebarApp
|
|
2
|
+
|
|
3
|
+
**Category:** display
|
|
4
|
+
**Description:** Full app shell with collapsible side navigation and top header.
|
|
5
|
+
|
|
6
|
+
## When to use
|
|
7
|
+
|
|
8
|
+
- A ready-made app shell with opinionated collapsible sidebar and top header
|
|
9
|
+
- Standing up an authenticated app frame quickly
|
|
10
|
+
|
|
11
|
+
## When NOT to use
|
|
12
|
+
|
|
13
|
+
- You want a bare shell to compose your own nav — use AppShell
|
|
14
|
+
- A dashboard-specific layout — use DashboardLayout
|
|
15
|
+
|
|
16
|
+
## Related components
|
|
17
|
+
|
|
18
|
+
- **AppShell** (alternative): Use the bare layout primitive for custom navigation
|
|
19
|
+
- **ConsoleApp** (alternative): Use the Carbon-parity console shell for icon-rail navigation
|
|
20
|
+
|
|
21
|
+
## Accessibility rationale
|
|
22
|
+
|
|
23
|
+
Provides header and navigation landmarks for screen reader orientation.
|
|
24
|
+
|
|
25
|
+
## Examples
|
|
26
|
+
|
|
27
|
+
### Default
|
|
28
|
+
|
|
29
|
+
App with sidebar navigation
|
|
30
|
+
|
|
31
|
+
```jsx
|
|
32
|
+
<SidebarApp />
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## AI context prompt
|
|
36
|
+
|
|
37
|
+
Copy this into an LLM context bar before editing this component:
|
|
38
|
+
|
|
39
|
+
```text
|
|
40
|
+
I am modifying the cascivo SidebarApp component (display). Full app shell with collapsible side navigation and top header.
|
|
41
|
+
|
|
42
|
+
Architecture constraints — follow exactly:
|
|
43
|
+
- Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
|
|
44
|
+
- Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
|
|
45
|
+
- Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
|
|
46
|
+
- Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
|
|
47
|
+
- CSS logical properties only (RTL-safe).
|
|
48
|
+
|
|
49
|
+
SidebarApp is strictly bound to these tokens — use only these, do not invent token names:
|
|
50
|
+
none declared
|
|
51
|
+
|
|
52
|
+
Accessibility: role "generic", WCAG 2.1-AA. Keep it AA.
|
|
53
|
+
|
|
54
|
+
Do not invent props, tokens, or global viewport media queries.
|
|
55
|
+
```
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# StatsCards
|
|
2
|
+
|
|
3
|
+
**Category:** display
|
|
4
|
+
**Description:** Grid of KPI stat cards with trend badges.
|
|
5
|
+
|
|
6
|
+
## When to use
|
|
7
|
+
|
|
8
|
+
- A grid of KPI stat cards with trend badges
|
|
9
|
+
- Summarising headline metrics at the top of a dashboard
|
|
10
|
+
|
|
11
|
+
## When NOT to use
|
|
12
|
+
|
|
13
|
+
- A full charts dashboard — use DashboardCharts
|
|
14
|
+
- A single metric — use a Kpi card
|
|
15
|
+
|
|
16
|
+
## Related components
|
|
17
|
+
|
|
18
|
+
- **Kpi** (contains): Each card displays a KPI metric with a delta
|
|
19
|
+
- **DashboardLayout** (contained-by): Commonly fills the dashboard stats strip
|
|
20
|
+
|
|
21
|
+
## Accessibility rationale
|
|
22
|
+
|
|
23
|
+
Each stat card is a labeled figure for screen reader context.
|
|
24
|
+
|
|
25
|
+
## Props
|
|
26
|
+
|
|
27
|
+
| Name | Type | Required | Default | Description |
|
|
28
|
+
| ------- | -------- | -------- | ------- | ------------- |
|
|
29
|
+
| `stats` | `Stat[]` | No | — | KPI stat data |
|
|
30
|
+
|
|
31
|
+
## Examples
|
|
32
|
+
|
|
33
|
+
### Default
|
|
34
|
+
|
|
35
|
+
Demo KPI stats
|
|
36
|
+
|
|
37
|
+
```jsx
|
|
38
|
+
<StatsCards />
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## AI context prompt
|
|
42
|
+
|
|
43
|
+
Copy this into an LLM context bar before editing this component:
|
|
44
|
+
|
|
45
|
+
```text
|
|
46
|
+
I am modifying the cascivo StatsCards component (display). Grid of KPI stat cards with trend badges.
|
|
47
|
+
|
|
48
|
+
Architecture constraints — follow exactly:
|
|
49
|
+
- Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
|
|
50
|
+
- Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
|
|
51
|
+
- Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
|
|
52
|
+
- Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
|
|
53
|
+
- CSS logical properties only (RTL-safe).
|
|
54
|
+
|
|
55
|
+
StatsCards is strictly bound to these tokens — use only these, do not invent token names:
|
|
56
|
+
none declared
|
|
57
|
+
|
|
58
|
+
Accessibility: role "generic", WCAG 2.1-AA. Keep it AA.
|
|
59
|
+
|
|
60
|
+
Do not invent props, tokens, or global viewport media queries.
|
|
61
|
+
```
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# UsersTablePage
|
|
2
|
+
|
|
3
|
+
**Category:** display
|
|
4
|
+
**Description:** Full users management page with table, search, and invite action.
|
|
5
|
+
|
|
6
|
+
## When to use
|
|
7
|
+
|
|
8
|
+
- A full user-management page with table, search, and invite action
|
|
9
|
+
- Admin list views over a collection of records
|
|
10
|
+
|
|
11
|
+
## When NOT to use
|
|
12
|
+
|
|
13
|
+
- A read-only data display — use a plain Table
|
|
14
|
+
- A dashboard overview — use DashboardCharts
|
|
15
|
+
|
|
16
|
+
## Related components
|
|
17
|
+
|
|
18
|
+
- **PageHeader** (contains): Uses a page header with title and invite action
|
|
19
|
+
|
|
20
|
+
## Accessibility rationale
|
|
21
|
+
|
|
22
|
+
Table uses proper row/column semantics and the search field is labeled.
|
|
23
|
+
|
|
24
|
+
## Props
|
|
25
|
+
|
|
26
|
+
| Name | Type | Required | Default | Description |
|
|
27
|
+
| ---------- | ------------ | -------- | ------- | --------------------- |
|
|
28
|
+
| `users` | `User[]` | No | — | User data |
|
|
29
|
+
| `onInvite` | `() => void` | No | — | Invite button handler |
|
|
30
|
+
|
|
31
|
+
## Examples
|
|
32
|
+
|
|
33
|
+
### Default
|
|
34
|
+
|
|
35
|
+
Demo users table
|
|
36
|
+
|
|
37
|
+
```jsx
|
|
38
|
+
<UsersTablePage />
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## AI context prompt
|
|
42
|
+
|
|
43
|
+
Copy this into an LLM context bar before editing this component:
|
|
44
|
+
|
|
45
|
+
```text
|
|
46
|
+
I am modifying the cascivo UsersTablePage component (display). Full users management page with table, search, and invite action.
|
|
47
|
+
|
|
48
|
+
Architecture constraints — follow exactly:
|
|
49
|
+
- Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
|
|
50
|
+
- Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
|
|
51
|
+
- Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
|
|
52
|
+
- Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
|
|
53
|
+
- CSS logical properties only (RTL-safe).
|
|
54
|
+
|
|
55
|
+
UsersTablePage is strictly bound to these tokens — use only these, do not invent token names:
|
|
56
|
+
none declared
|
|
57
|
+
|
|
58
|
+
Accessibility: role "generic", WCAG 2.1-AA. Keep it AA.
|
|
59
|
+
|
|
60
|
+
Do not invent props, tokens, or global viewport media queries.
|
|
61
|
+
```
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Blockquote
|
|
2
|
+
|
|
3
|
+
**Category:** display
|
|
4
|
+
**Description:** Quoted passage with optional attribution footer
|
|
5
|
+
|
|
6
|
+
## When to use
|
|
7
|
+
|
|
8
|
+
- Setting off a quoted passage from another source with visual emphasis
|
|
9
|
+
- Attributing a quote to a person or work via the cite footer
|
|
10
|
+
|
|
11
|
+
## When NOT to use
|
|
12
|
+
|
|
13
|
+
- Indenting or emphasizing your own non-quoted text — use Text styling
|
|
14
|
+
- Inline quotations within a sentence — use a <q> element
|
|
15
|
+
|
|
16
|
+
## Anti-patterns
|
|
17
|
+
|
|
18
|
+
### blockquote semantics tell assistive tech the content is a quotation; misusing it misleads readers
|
|
19
|
+
|
|
20
|
+
**Bad:** `Using <Blockquote> purely to indent a callout`
|
|
21
|
+
**Good:** `A Card or styled Text block for non-quote emphasis`
|
|
22
|
+
**Why:** blockquote semantics tell assistive tech the content is a quotation; misusing it misleads readers
|
|
23
|
+
|
|
24
|
+
## Related components
|
|
25
|
+
|
|
26
|
+
- **Prose** (pairs-with): Prose styles blockquotes among other long-form elements automatically
|
|
27
|
+
|
|
28
|
+
## Accessibility rationale
|
|
29
|
+
|
|
30
|
+
Renders a native <blockquote> with the attribution in <footer><cite>, so the quotation and its source are semantically distinct to assistive tech
|
|
31
|
+
|
|
32
|
+
## Props
|
|
33
|
+
|
|
34
|
+
| Name | Type | Required | Default | Description |
|
|
35
|
+
| ------ | -------- | -------- | --------- | --------------------------------------------------------- |
|
|
36
|
+
| `cite` | `string` | No | undefined | URL of the quote’s source (sets the HTML cite attribute). |
|
|
37
|
+
|
|
38
|
+
## Tokens
|
|
39
|
+
|
|
40
|
+
- `--cascivo-color-border-strong`
|
|
41
|
+
- `--cascivo-color-text`
|
|
42
|
+
- `--cascivo-color-text-subtle`
|
|
43
|
+
- `--cascivo-font-sans`
|
|
44
|
+
- `--cascivo-font-medium`
|
|
45
|
+
- `--cascivo-leading-relaxed`
|
|
46
|
+
- `--cascivo-text-sm`
|
|
47
|
+
- `--cascivo-text-base`
|
|
48
|
+
|
|
49
|
+
## Examples
|
|
50
|
+
|
|
51
|
+
### Default
|
|
52
|
+
|
|
53
|
+
```jsx
|
|
54
|
+
<Blockquote>Less, but better.</Blockquote>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### With attribution
|
|
58
|
+
|
|
59
|
+
Attribution renders as <footer><cite>
|
|
60
|
+
|
|
61
|
+
```jsx
|
|
62
|
+
<Blockquote cite="Dieter Rams">Less, but better.</Blockquote>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Boundaries
|
|
66
|
+
|
|
67
|
+
| Area | Level | Note |
|
|
68
|
+
| ----------- | -------- | ---------------------------------------------------------------------- |
|
|
69
|
+
| attribution | flexible | cite is optional; omit when the source is given in surrounding context |
|
|
70
|
+
| token names | strict | Border and text colors must resolve to --cascivo-\* tokens |
|
|
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 Blockquote component (display). Quoted passage with optional attribution footer
|
|
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
|
+
Blockquote is strictly bound to these tokens — use only these, do not invent token names:
|
|
87
|
+
--cascivo-color-border-strong, --cascivo-color-text, --cascivo-color-text-subtle, --cascivo-font-sans, --cascivo-font-medium, --cascivo-leading-relaxed, --cascivo-text-sm, --cascivo-text-base
|
|
88
|
+
|
|
89
|
+
Accessibility: role "blockquote", WCAG 2.2-AA. Keep it AA.
|
|
90
|
+
|
|
91
|
+
Do not change (strict): token names — Border and text colors must resolve to --cascivo-* tokens
|
|
92
|
+
Flexible: attribution.
|
|
93
|
+
|
|
94
|
+
Do not invent props, tokens, or global viewport media queries.
|
|
95
|
+
```
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# BottomSheet
|
|
2
|
+
|
|
3
|
+
**Category:** overlay
|
|
4
|
+
**Description:** Mobile bottom sheet with drag-to-resize detents, velocity-projected snapping, and drag-to-dismiss
|
|
5
|
+
|
|
6
|
+
## When to use
|
|
7
|
+
|
|
8
|
+
- A mobile surface that rises from the bottom and can be resized between detents by dragging
|
|
9
|
+
- Showing secondary content, filters, or a form where the user can peek at half height then expand
|
|
10
|
+
- A touch-first overlay that dismisses by flinging or dragging it down past the lowest detent
|
|
11
|
+
|
|
12
|
+
## When NOT to use
|
|
13
|
+
|
|
14
|
+
- A short yes/no confirmation — use AlertDialog
|
|
15
|
+
- A non-resizable edge panel without gestures — use Drawer or Sheet
|
|
16
|
+
- A desktop-first side panel for navigation — use Drawer
|
|
17
|
+
|
|
18
|
+
## Anti-patterns
|
|
19
|
+
|
|
20
|
+
### A resizable gesture surface is overkill for a focused yes/no decision
|
|
21
|
+
|
|
22
|
+
**Bad:** `<BottomSheet title="Delete item?">Are you sure?</BottomSheet>`
|
|
23
|
+
**Good:** `<AlertDialog title="Delete item?" />`
|
|
24
|
+
**Why:** A resizable gesture surface is overkill for a focused yes/no decision
|
|
25
|
+
|
|
26
|
+
## Related components
|
|
27
|
+
|
|
28
|
+
- **Sheet** (alternative): Use Sheet for a fixed-height panel from any edge; BottomSheet adds resize detents
|
|
29
|
+
- **Drawer** (alternative): Use Drawer for a plain edge dialog without resize detents
|
|
30
|
+
|
|
31
|
+
## Accessibility rationale
|
|
32
|
+
|
|
33
|
+
Renders role="dialog" with aria-modal; the title labels it via aria-labelledby and the description via aria-describedby. FocusScope traps Tab focus and restores it on close; DismissableLayer handles Escape and outside-pointer dismissal. The grab handle is a labelled separator and a Close button gives a non-gesture dismissal path so the sheet stays keyboard-operable.
|
|
34
|
+
|
|
35
|
+
## Props
|
|
36
|
+
|
|
37
|
+
| Name | Type | Required | Default | Description |
|
|
38
|
+
| -------------- | ------------------------------------- | -------- | ----------- | ------------------------------------------------------------- |
|
|
39
|
+
| `open` | `boolean` | No | — | Whether the component is open (controlled). |
|
|
40
|
+
| `defaultOpen` | `boolean` | No | — | Whether the component is open on first render (uncontrolled). |
|
|
41
|
+
| `onOpenChange` | `(open: boolean) => void` | No | — | Called with the next open state when it changes. |
|
|
42
|
+
| `snapPoints` | `number[]` | No | [0.5, 0.92] | Detent heights as ascending fractions of the viewport (0–1) |
|
|
43
|
+
| `activeSnap` | `number` | No | — | The controlled snap-point index. |
|
|
44
|
+
| `defaultSnap` | `number` | No | 0 | The initial snap-point index when uncontrolled. |
|
|
45
|
+
| `onSnapChange` | `(index: number) => void` | No | — | Called with the new snap-point index when it changes. |
|
|
46
|
+
| `title` | `React.ReactNode` | No | — | Title text for the component. |
|
|
47
|
+
| `description` | `React.ReactNode` | No | — | Supporting description text. |
|
|
48
|
+
| `children` | `React.ReactNode` | No | — | Content rendered inside the component. |
|
|
49
|
+
| `labels` | `{ close?: string; handle?: string }` | No | — | Overrides for the component’s user-visible strings (i18n). |
|
|
50
|
+
| `className` | `string` | No | — | Additional CSS class names merged onto the root element. |
|
|
51
|
+
|
|
52
|
+
## Tokens
|
|
53
|
+
|
|
54
|
+
- `--cascivo-color-surface`
|
|
55
|
+
- `--cascivo-color-border`
|
|
56
|
+
- `--cascivo-radius-overlay`
|
|
57
|
+
- `--cascivo-shadow-overlay`
|
|
58
|
+
- `--cascivo-motion-enter`
|
|
59
|
+
- `--cascivo-motion-exit`
|
|
60
|
+
- `--cascivo-target-min-coarse`
|
|
61
|
+
- `--cascivo-z-overlay`
|
|
62
|
+
|
|
63
|
+
## Examples
|
|
64
|
+
|
|
65
|
+
### Basic
|
|
66
|
+
|
|
67
|
+
```jsx
|
|
68
|
+
<BottomSheet open={isOpen} onOpenChange={setIsOpen} title="Filters">
|
|
69
|
+
<FilterForm />
|
|
70
|
+
</BottomSheet>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Custom detents
|
|
74
|
+
|
|
75
|
+
Snaps between three detents by dragging the handle; opens at half height.
|
|
76
|
+
|
|
77
|
+
```jsx
|
|
78
|
+
<BottomSheet defaultOpen snapPoints={[0.25, 0.5, 0.9]} defaultSnap={1} title="Nearby">
|
|
79
|
+
<PlacesList />
|
|
80
|
+
</BottomSheet>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Boundaries
|
|
84
|
+
|
|
85
|
+
| Area | Level | Note |
|
|
86
|
+
| ------------- | -------- | ---------------------------------------------------------------------- |
|
|
87
|
+
| snapPoints | flexible | Any ascending list of viewport fractions; the sheet snaps between them |
|
|
88
|
+
| open state | flexible | Controlled (open/onOpenChange) or uncontrolled (defaultOpen) |
|
|
89
|
+
| active detent | flexible | Controlled (activeSnap/onSnapChange) or uncontrolled (defaultSnap) |
|
|
90
|
+
|
|
91
|
+
## AI context prompt
|
|
92
|
+
|
|
93
|
+
Copy this into an LLM context bar before editing this component:
|
|
94
|
+
|
|
95
|
+
```text
|
|
96
|
+
I am modifying the cascivo BottomSheet component (overlay). Mobile bottom sheet with drag-to-resize detents, velocity-projected snapping, and drag-to-dismiss
|
|
97
|
+
|
|
98
|
+
Architecture constraints — follow exactly:
|
|
99
|
+
- Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
|
|
100
|
+
- Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
|
|
101
|
+
- Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
|
|
102
|
+
- Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
|
|
103
|
+
- CSS logical properties only (RTL-safe).
|
|
104
|
+
|
|
105
|
+
BottomSheet is strictly bound to these tokens — use only these, do not invent token names:
|
|
106
|
+
--cascivo-color-surface, --cascivo-color-border, --cascivo-radius-overlay, --cascivo-shadow-overlay, --cascivo-motion-enter, --cascivo-motion-exit, --cascivo-target-min-coarse, --cascivo-z-overlay
|
|
107
|
+
|
|
108
|
+
Accessibility: role "dialog", WCAG 2.2-AA, keyboard: Escape/Tab/Shift+Tab. Keep it AA.
|
|
109
|
+
Flexible: snapPoints, open state, active detent.
|
|
110
|
+
|
|
111
|
+
Do not invent props, tokens, or global viewport media queries.
|
|
112
|
+
```
|