@cascivo/mcp 0.2.0 → 0.3.4
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,100 @@
|
|
|
1
|
+
# User
|
|
2
|
+
|
|
3
|
+
**Category:** display
|
|
4
|
+
**Description:** Identity composite: an avatar with a name, description, and optional action slot
|
|
5
|
+
|
|
6
|
+
## When to use
|
|
7
|
+
|
|
8
|
+
- Showing a person with their name and a secondary line (email, role) next to an avatar
|
|
9
|
+
- Identity rows inside menus, tables, navbars, and account switchers
|
|
10
|
+
- A compact, labelled identity primitive too granular for a page-section block
|
|
11
|
+
|
|
12
|
+
## When NOT to use
|
|
13
|
+
|
|
14
|
+
- Just an image with no name/description — use Avatar directly
|
|
15
|
+
- A full profile card with rich content — compose a Card instead
|
|
16
|
+
|
|
17
|
+
## Anti-patterns
|
|
18
|
+
|
|
19
|
+
### The name is the accessible identity label; an empty name leaves the avatar unlabelled
|
|
20
|
+
|
|
21
|
+
**Bad:** `<User name="" avatarProps={{ src: "/jane.jpg" }} />`
|
|
22
|
+
**Good:** `<User name="Jane Doe" avatarProps={{ src: "/jane.jpg", alt: "Jane Doe" }} />`
|
|
23
|
+
**Why:** The name is the accessible identity label; an empty name leaves the avatar unlabelled
|
|
24
|
+
|
|
25
|
+
## Related components
|
|
26
|
+
|
|
27
|
+
- **Avatar** (contains): User wraps Avatar and forwards avatarProps to it
|
|
28
|
+
- **AvatarGroup** (alternative): Use AvatarGroup to show several identities as an overlapping stack
|
|
29
|
+
|
|
30
|
+
## Accessibility rationale
|
|
31
|
+
|
|
32
|
+
The composite is a labelled group; the name provides the accessible identity and the avatar carries its own role="img"/alt — no redundant roles
|
|
33
|
+
|
|
34
|
+
## Props
|
|
35
|
+
|
|
36
|
+
| Name | Type | Required | Default | Description |
|
|
37
|
+
| ------------- | ------------- | -------- | ------- | ---------------------------------- |
|
|
38
|
+
| `name` | `ReactNode` | Yes | — | The user’s display name. |
|
|
39
|
+
| `description` | `ReactNode` | No | — | Supporting description text. |
|
|
40
|
+
| `avatarProps` | `AvatarProps` | No | — | Forwarded to the composed <Avatar> |
|
|
41
|
+
|
|
42
|
+
## Tokens
|
|
43
|
+
|
|
44
|
+
- `--cascivo-color-text`
|
|
45
|
+
- `--cascivo-color-text-muted`
|
|
46
|
+
- `--cascivo-space-3`
|
|
47
|
+
- `--cascivo-text-sm`
|
|
48
|
+
- `--cascivo-text-xs`
|
|
49
|
+
|
|
50
|
+
## Examples
|
|
51
|
+
|
|
52
|
+
### Basic
|
|
53
|
+
|
|
54
|
+
```jsx
|
|
55
|
+
<User
|
|
56
|
+
name="Jane Doe"
|
|
57
|
+
description="jane@acme.com"
|
|
58
|
+
avatarProps={{ src: '/jane.jpg', alt: 'Jane Doe' }}
|
|
59
|
+
/>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### With action
|
|
63
|
+
|
|
64
|
+
```jsx
|
|
65
|
+
<User name="Jane Doe" description="Admin">
|
|
66
|
+
<IconButton aria-label="More" />
|
|
67
|
+
</User>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Boundaries
|
|
71
|
+
|
|
72
|
+
| Area | Level | Note |
|
|
73
|
+
| ----------- | -------- | --------------------------------------------------------------- |
|
|
74
|
+
| description | flexible | Any ReactNode — email, role, or a status line |
|
|
75
|
+
| token names | strict | Name and description colors must resolve to --cascivo-\* tokens |
|
|
76
|
+
|
|
77
|
+
## AI context prompt
|
|
78
|
+
|
|
79
|
+
Copy this into an LLM context bar before editing this component:
|
|
80
|
+
|
|
81
|
+
```text
|
|
82
|
+
I am modifying the cascivo User component (display). Identity composite: an avatar with a name, description, and optional action slot
|
|
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
|
+
User is strictly bound to these tokens — use only these, do not invent token names:
|
|
92
|
+
--cascivo-color-text, --cascivo-color-text-muted, --cascivo-space-3, --cascivo-text-sm, --cascivo-text-xs
|
|
93
|
+
|
|
94
|
+
Accessibility: role "group", WCAG 2.2-AA. Keep it AA.
|
|
95
|
+
|
|
96
|
+
Do not change (strict): token names — Name and description colors must resolve to --cascivo-* tokens
|
|
97
|
+
Flexible: description.
|
|
98
|
+
|
|
99
|
+
Do not invent props, tokens, or global viewport media queries.
|
|
100
|
+
```
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# VisuallyHidden
|
|
2
|
+
|
|
3
|
+
**Category:** display
|
|
4
|
+
**Description:** Hides content visually while keeping it available to screen readers
|
|
5
|
+
|
|
6
|
+
## When to use
|
|
7
|
+
|
|
8
|
+
- Giving an icon-only control an accessible name without showing text
|
|
9
|
+
- Adding screen-reader-only context that would be redundant visually
|
|
10
|
+
- Providing off-screen labels for tables, links, or form controls
|
|
11
|
+
|
|
12
|
+
## When NOT to use
|
|
13
|
+
|
|
14
|
+
- Hiding content from everyone — use hidden or display:none
|
|
15
|
+
- Temporarily hiding then revealing UI — use conditional rendering
|
|
16
|
+
|
|
17
|
+
## Anti-patterns
|
|
18
|
+
|
|
19
|
+
### VisuallyHidden keeps content in the accessibility tree — using it to hide noise pollutes screen-reader output
|
|
20
|
+
|
|
21
|
+
**Bad:** `Wrapping decorative content in VisuallyHidden to "clean up" the layout`
|
|
22
|
+
**Good:** `aria-hidden on decorative elements; VisuallyHidden only for content screen readers need`
|
|
23
|
+
**Why:** VisuallyHidden keeps content in the accessibility tree — using it to hide noise pollutes screen-reader output
|
|
24
|
+
|
|
25
|
+
## Related components
|
|
26
|
+
|
|
27
|
+
- **SkipNav** (alternative): SkipNav uses a similar hidden-until-focused technique for skip links
|
|
28
|
+
|
|
29
|
+
## Accessibility rationale
|
|
30
|
+
|
|
31
|
+
Applies the standard clip technique so content stays in the DOM and accessibility tree while being painted off-screen — assistive tech reads it, sighted users do not see it
|
|
32
|
+
|
|
33
|
+
## Props
|
|
34
|
+
|
|
35
|
+
| Name | Type | Required | Default | Description |
|
|
36
|
+
| ---------- | ----------- | -------- | ------- | --------------------------------------------------------- |
|
|
37
|
+
| `children` | `ReactNode` | Yes | — | Content announced by assistive technology but not painted |
|
|
38
|
+
|
|
39
|
+
## Examples
|
|
40
|
+
|
|
41
|
+
### Icon button label
|
|
42
|
+
|
|
43
|
+
Gives an icon-only control an accessible name
|
|
44
|
+
|
|
45
|
+
```jsx
|
|
46
|
+
<button type="button">
|
|
47
|
+
<CloseIcon />
|
|
48
|
+
<VisuallyHidden>Close dialog</VisuallyHidden>
|
|
49
|
+
</button>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Table context
|
|
53
|
+
|
|
54
|
+
```jsx
|
|
55
|
+
<th>
|
|
56
|
+
Price <VisuallyHidden>(in euros)</VisuallyHidden>
|
|
57
|
+
</th>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Boundaries
|
|
61
|
+
|
|
62
|
+
| Area | Level | Note |
|
|
63
|
+
| -------------------- | -------- | ------------------------------------------------------- |
|
|
64
|
+
| children | flexible | Any text/content meant for assistive tech |
|
|
65
|
+
| visibility technique | strict | Must keep content in the a11y tree — never display:none |
|
|
66
|
+
|
|
67
|
+
## AI context prompt
|
|
68
|
+
|
|
69
|
+
Copy this into an LLM context bar before editing this component:
|
|
70
|
+
|
|
71
|
+
```text
|
|
72
|
+
I am modifying the cascivo VisuallyHidden component (display). Hides content visually while keeping it available to screen readers
|
|
73
|
+
|
|
74
|
+
Architecture constraints — follow exactly:
|
|
75
|
+
- Signals only (useSignal/useComputed/useSignalEffect from @cascivo/core). Never useState/useEffect/useContext/useReducer.
|
|
76
|
+
- Style only through --cascivo-* custom properties. No Tailwind, no inline styles, no CSS-in-JS.
|
|
77
|
+
- Responsive via @container queries on the canonical scale (30rem/40rem/64rem/80rem). Do not use global viewport @media breakpoints.
|
|
78
|
+
- Visual states (hover/focus/active/disabled) via CSS pseudo-classes, not JS.
|
|
79
|
+
- CSS logical properties only (RTL-safe).
|
|
80
|
+
|
|
81
|
+
VisuallyHidden is strictly bound to these tokens — use only these, do not invent token names:
|
|
82
|
+
none declared
|
|
83
|
+
|
|
84
|
+
Accessibility: role "none", WCAG 2.2-AA. Keep it AA.
|
|
85
|
+
|
|
86
|
+
Do not change (strict): visibility technique — Must keep content in the a11y tree — never display:none
|
|
87
|
+
Flexible: children.
|
|
88
|
+
|
|
89
|
+
Do not invent props, tokens, or global viewport media queries.
|
|
90
|
+
```
|