@redsift/ds-mcp-server 12.5.3-alpha.5 → 12.5.3-alpha.7
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/consumer-instructions/.cursorrules +14 -0
- package/consumer-instructions/.windsurfrules +18 -4
- package/consumer-instructions/CLAUDE.md +25 -11
- package/consumer-instructions/redsift-design-system.instructions.md +107 -12
- package/data/docs/components/charts/Axis.json +6 -1
- package/data/docs/components/charts/BarChart.json +7 -1
- package/data/docs/components/charts/BaseBarChart.json +1 -1
- package/data/docs/components/charts/ChartContainerTitle.json +5 -1
- package/data/docs/components/charts/Legend.json +6 -1
- package/data/docs/components/charts/LineChart.json +8 -2
- package/data/docs/components/charts/PieChart.json +6 -1
- package/data/docs/components/charts/ScatterPlot.json +6 -1
- package/data/docs/components/dashboard/ChartEmptyState.json +8 -1
- package/data/docs/components/dashboard/Dashboard.json +6 -1
- package/data/docs/components/dashboard/DataCard.json +18 -1
- package/data/docs/components/dashboard/DataCardBody.json +9 -1
- package/data/docs/components/dashboard/DataCardHeader.json +8 -1
- package/data/docs/components/dashboard/DataCardListbox.json +10 -1
- package/data/docs/components/dashboard/DataRow.json +7 -1
- package/data/docs/components/dashboard/PdfExportButton.json +6 -1
- package/data/docs/components/dashboard/TimeSeriesBarChart.json +6 -1
- package/data/docs/components/dashboard/WithFilters.json +5 -1
- package/data/docs/components/design-system/Alert.json +8 -1
- package/data/docs/components/design-system/AppBar.json +6 -1
- package/data/docs/components/design-system/AppContent.json +8 -1
- package/data/docs/components/design-system/AppSidePanel.json +9 -1
- package/data/docs/components/design-system/Badge.json +6 -1
- package/data/docs/components/design-system/Breadcrumbs.json +10 -1
- package/data/docs/components/design-system/Button.json +10 -1
- package/data/docs/components/design-system/Card.json +15 -1
- package/data/docs/components/design-system/CardActions.json +8 -1
- package/data/docs/components/design-system/CardBody.json +7 -1
- package/data/docs/components/design-system/CardHeader.json +8 -1
- package/data/docs/components/design-system/DetailedCard.json +12 -1
- package/data/docs/components/design-system/DetailedCardHeader.json +4 -1
- package/data/docs/components/design-system/DetailedCardSection.json +4 -1
- package/data/docs/components/design-system/Flexbox.json +14 -1
- package/data/docs/components/design-system/Grid.json +6 -1
- package/data/docs/components/design-system/Heading.json +16 -1
- package/data/docs/components/design-system/Icon.json +6 -1
- package/data/docs/components/design-system/IconButton.json +14 -1
- package/data/docs/components/design-system/Pill.json +15 -1
- package/data/docs/components/design-system/Skeleton.json +10 -1
- package/data/docs/components/design-system/SkeletonCircle.json +6 -1
- package/data/docs/components/design-system/SkeletonText.json +6 -1
- package/data/docs/components/design-system/Tab.json +9 -1
- package/data/docs/components/design-system/TabPanel.json +10 -1
- package/data/docs/components/design-system/Tabs.json +12 -1
- package/data/docs/components/design-system/Text.json +14 -1
- package/data/docs/components/design-system/TextField.json +6 -1
- package/data/docs/components/pickers/Combobox.json +12 -1
- package/data/docs/components/pickers/ComboboxContent.json +6 -1
- package/data/docs/components/pickers/MenuButton.json +10 -1
- package/data/docs/components/pickers/MenuButtonContent.json +5 -1
- package/data/docs/components/pickers/Select.json +11 -1
- package/data/docs/components/popovers/Dialog.json +10 -1
- package/data/docs/components/popovers/Toggletip.json +11 -1
- package/data/docs/components/popovers/Tooltip.json +9 -1
- package/data/docs/components/table/DataGrid.json +9 -1
- package/data/docs/components/table/StatefulDataGrid.json +6 -1
- package/data/docs/components-index.json +341 -555
- package/data/docs/components.json +7945 -24342
- package/data/docs/llms-full.txt +879 -2546
- package/data/docs/llms.txt +55 -77
- package/data/docs/patterns-catalog.md +191 -0
- package/data/docs/patterns.json +365 -27
- package/data/metadata.json +2 -2
- package/data/patterns/drilldowned-datagrid-server-side.mdx +19 -0
- package/data/prompts/ds-advisor.md +103 -0
- package/dist/data-store.d.ts +23 -1
- package/dist/data-store.d.ts.map +1 -1
- package/dist/data-store.js +69 -15
- package/dist/data-store.js.map +1 -1
- package/dist/pattern-store.d.ts +23 -1
- package/dist/pattern-store.d.ts.map +1 -1
- package/dist/pattern-store.js +94 -22
- package/dist/pattern-store.js.map +1 -1
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +56 -27
- package/dist/prompts.js.map +1 -1
- package/dist/resources.d.ts.map +1 -1
- package/dist/resources.js +60 -6
- package/dist/resources.js.map +1 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +12 -0
- package/dist/tools.js.map +1 -1
- package/dist/types.d.ts +11 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +4 -2
|
@@ -40,6 +40,16 @@ When applying colors, spacing, or typography:
|
|
|
40
40
|
1. Call `search_design_tokens` to find the correct token names and CSS custom properties.
|
|
41
41
|
2. Do not hardcode color hex values — use the design token CSS variables.
|
|
42
42
|
|
|
43
|
+
## Rule 5 — Host App Setup (Adopting or Migrating to DS)
|
|
44
|
+
|
|
45
|
+
When adopting `@redsift/*` components in a new project or migrating from raw HTML/CSS/Tailwind:
|
|
46
|
+
|
|
47
|
+
1. Read the `design-system://getting-started/host-app` MCP resource FIRST.
|
|
48
|
+
2. Ensure the app entry point imports `@redsift/design-system/style/index.css`.
|
|
49
|
+
3. Wrap the app with `<AppContainer>` (full Red Sift shell) or `<ThemeProvider value={{ theme }}>` (standalone). Do NOT pass `theme` to every individual component — use context at the root.
|
|
50
|
+
4. Import icons from `@redsift/icons`, not `@mdi/js`.
|
|
51
|
+
5. Remove conflicting Tailwind/utility-CSS classes (`bg-*`, `text-*`, `border-*`, `dark:*`) from elements that render or wrap DS components.
|
|
52
|
+
|
|
43
53
|
## Common Mistakes
|
|
44
54
|
|
|
45
55
|
These are real examples of props that do NOT exist in the Red Sift DS:
|
|
@@ -52,6 +62,10 @@ These are real examples of props that do NOT exist in the Red Sift DS:
|
|
|
52
62
|
- `import { Select } from '@redsift/design-system'` → Should be `@redsift/pickers`
|
|
53
63
|
- `import { Dialog } from '@redsift/design-system'` → Should be `@redsift/popovers`
|
|
54
64
|
- `import { DataGrid } from '@redsift/design-system'` → Should be `@redsift/table`
|
|
65
|
+
- Passing `theme` to every component → Wrap app with `<AppContainer>` or `<ThemeProvider>` at root
|
|
66
|
+
- Missing `@redsift/design-system/style/index.css` import → Must import at app entry point
|
|
67
|
+
- `import { mdiPlus } from '@mdi/js'` → Should be `@redsift/icons`
|
|
68
|
+
- Tailwind `bg-*`/`text-*`/`dark:*` on DS wrappers → Use DS tokens or layout primitives
|
|
55
69
|
|
|
56
70
|
## NEVER Do This
|
|
57
71
|
|
|
@@ -10,7 +10,7 @@ This project uses the **Red Sift Design System** (`@redsift/*` packages). The de
|
|
|
10
10
|
|
|
11
11
|
1. Configure the MCP server — see [MCP Server docs](https://design-system.redsift.io/introduction/mcp-server)
|
|
12
12
|
2. Copy this file to your project root as `.cursorrules`
|
|
13
|
-
3. Verify: ask the AI
|
|
13
|
+
3. Verify: ask the AI _"What props does Button accept?"_ — it should call `get_component_props`, not answer from memory
|
|
14
14
|
|
|
15
15
|
## Rule 1 — Mandatory Prop Lookup
|
|
16
16
|
|
|
@@ -40,6 +40,16 @@ When applying colors, spacing, or typography:
|
|
|
40
40
|
1. Call `search_design_tokens` to find the correct token names and CSS custom properties.
|
|
41
41
|
2. Do not hardcode color hex values — use the design token CSS variables.
|
|
42
42
|
|
|
43
|
+
## Rule 5 — Host App Setup (Adopting or Migrating to DS)
|
|
44
|
+
|
|
45
|
+
When adopting `@redsift/*` components in a new project or migrating from raw HTML/CSS/Tailwind:
|
|
46
|
+
|
|
47
|
+
1. Read the `design-system://getting-started/host-app` MCP resource FIRST.
|
|
48
|
+
2. Ensure the app entry point imports `@redsift/design-system/style/index.css`.
|
|
49
|
+
3. Wrap the app with `<AppContainer>` (full Red Sift shell) or `<ThemeProvider value={{ theme }}>` (standalone). Do NOT pass `theme` to every individual component — use context at the root.
|
|
50
|
+
4. Import icons from `@redsift/icons`, not `@mdi/js`.
|
|
51
|
+
5. Remove conflicting Tailwind/utility-CSS classes (`bg-*`, `text-*`, `border-*`, `dark:*`) from elements that render or wrap DS components.
|
|
52
|
+
|
|
43
53
|
## Common Mistakes
|
|
44
54
|
|
|
45
55
|
These are real examples of props that do NOT exist in the Red Sift DS:
|
|
@@ -52,6 +62,10 @@ These are real examples of props that do NOT exist in the Red Sift DS:
|
|
|
52
62
|
- `import { Select } from '@redsift/design-system'` → Should be `@redsift/pickers`
|
|
53
63
|
- `import { Dialog } from '@redsift/design-system'` → Should be `@redsift/popovers`
|
|
54
64
|
- `import { DataGrid } from '@redsift/design-system'` → Should be `@redsift/table`
|
|
65
|
+
- Passing `theme` to every component → Wrap app with `<AppContainer>` or `<ThemeProvider>` at root
|
|
66
|
+
- Missing `@redsift/design-system/style/index.css` import → Must import at app entry point
|
|
67
|
+
- `import { mdiPlus } from '@mdi/js'` → Should be `@redsift/icons`
|
|
68
|
+
- Tailwind `bg-*`/`text-*`/`dark:*` on DS wrappers → Use DS tokens or layout primitives
|
|
55
69
|
|
|
56
70
|
## NEVER Do This
|
|
57
71
|
|
|
@@ -75,6 +89,6 @@ import { Select } from '@redsift/design-system';
|
|
|
75
89
|
|
|
76
90
|
Test that your AI assistant is using the MCP server correctly with these prompts:
|
|
77
91
|
|
|
78
|
-
1.
|
|
79
|
-
2.
|
|
80
|
-
3.
|
|
92
|
+
1. _"What props does Button accept?"_ → Should call `get_component_props`, NOT answer from memory
|
|
93
|
+
2. _"Import the Select component"_ → Should call `get_component_usage`, return `@redsift/pickers`
|
|
94
|
+
3. _"Create a data table page"_ → Should call `search_patterns` first, then follow the pattern spec
|
|
@@ -40,6 +40,16 @@ When applying colors, spacing, or typography:
|
|
|
40
40
|
1. Call `search_design_tokens` to find the correct token names and CSS custom properties.
|
|
41
41
|
2. Do not hardcode color hex values — use the design token CSS variables.
|
|
42
42
|
|
|
43
|
+
## Rule 5 — Host App Setup (Adopting or Migrating to DS)
|
|
44
|
+
|
|
45
|
+
When adopting `@redsift/*` components in a new project or migrating from raw HTML/CSS/Tailwind:
|
|
46
|
+
|
|
47
|
+
1. Read the `design-system://getting-started/host-app` MCP resource FIRST.
|
|
48
|
+
2. Ensure the app entry point imports `@redsift/design-system/style/index.css`.
|
|
49
|
+
3. Wrap the app with `<AppContainer>` (full Red Sift shell) or `<ThemeProvider value={{ theme }}>` (standalone). Do NOT pass `theme` to every individual component — use context at the root.
|
|
50
|
+
4. Import icons from `@redsift/icons`, not `@mdi/js`.
|
|
51
|
+
5. Remove conflicting Tailwind/utility-CSS classes (`bg-*`, `text-*`, `border-*`, `dark:*`) from elements that render or wrap DS components.
|
|
52
|
+
|
|
43
53
|
## NEVER Do This
|
|
44
54
|
|
|
45
55
|
These are concrete examples of wrong code. **Every single one will fail:**
|
|
@@ -62,17 +72,21 @@ import { Select } from '@redsift/design-system';
|
|
|
62
72
|
|
|
63
73
|
## Common Mistakes
|
|
64
74
|
|
|
65
|
-
| Wrong (guessed) | Correct (actual)
|
|
66
|
-
| --------------------------------------------------- |
|
|
67
|
-
| `variant="primary"` | Look up actual variants
|
|
68
|
-
| `size="sm"` / `size="lg"` | Most components have no size prop
|
|
69
|
-
| `colorScheme="red"` | Does not exist
|
|
70
|
-
| `isDisabled` | `disabled`
|
|
71
|
-
| `onPress` | `onClick`
|
|
72
|
-
| `leftIcon` / `rightIcon` | Look up actual icon prop names
|
|
73
|
-
| `import { Select } from '@redsift/design-system'` | `import { Select } from '@redsift/pickers'`
|
|
74
|
-
| `import { Dialog } from '@redsift/design-system'` | `import { Dialog } from '@redsift/popovers'`
|
|
75
|
-
| `import { DataGrid } from '@redsift/design-system'` | `import { DataGrid } from '@redsift/table'`
|
|
75
|
+
| Wrong (guessed) | Correct (actual) | How to verify |
|
|
76
|
+
| --------------------------------------------------- | ----------------------------------------------------------- | ------------------------------------------ |
|
|
77
|
+
| `variant="primary"` | Look up actual variants | `get_component_props` for the component |
|
|
78
|
+
| `size="sm"` / `size="lg"` | Most components have no size prop | `get_component_props` for the component |
|
|
79
|
+
| `colorScheme="red"` | Does not exist | `get_component_props` for the component |
|
|
80
|
+
| `isDisabled` | `disabled` | `get_component_props` for the component |
|
|
81
|
+
| `onPress` | `onClick` | `get_component_props` for the component |
|
|
82
|
+
| `leftIcon` / `rightIcon` | Look up actual icon prop names | `get_component_props` for the component |
|
|
83
|
+
| `import { Select } from '@redsift/design-system'` | `import { Select } from '@redsift/pickers'` | `get_component_usage` |
|
|
84
|
+
| `import { Dialog } from '@redsift/design-system'` | `import { Dialog } from '@redsift/popovers'` | `get_component_usage` |
|
|
85
|
+
| `import { DataGrid } from '@redsift/design-system'` | `import { DataGrid } from '@redsift/table'` | `get_component_usage` |
|
|
86
|
+
| Passing `theme` to every component | Wrap app with `<AppContainer>` or `<ThemeProvider>` at root | `design-system://getting-started/host-app` |
|
|
87
|
+
| Missing `@redsift/design-system/style/index.css` | Must import at app entry point | `design-system://getting-started/host-app` |
|
|
88
|
+
| `import { mdiPlus } from '@mdi/js'` | `import { mdiPlus } from '@redsift/icons'` | `get_component_usage` |
|
|
89
|
+
| Tailwind `bg-*`/`text-*`/`dark:*` on DS wrappers | Use DS tokens or layout primitives | `design-system://getting-started/host-app` |
|
|
76
90
|
|
|
77
91
|
## Verification
|
|
78
92
|
|
|
@@ -15,6 +15,7 @@ This project uses the **Red Sift Design System** (`@redsift/*` packages). The de
|
|
|
15
15
|
1. Configure the MCP server in `.vscode/mcp.json` — see [MCP Server docs](https://design-system.redsift.io/introduction/mcp-server)
|
|
16
16
|
2. Copy this file to `.github/instructions/` in your project
|
|
17
17
|
3. Verify: ask the AI _"What props does Button accept?"_ — it should call `get_component_props`, not answer from memory
|
|
18
|
+
4. **For automated code generation (Software Factory / agent workflows):** also load the `design-system://prompts/ds-advisor` MCP resource into the system prompt — it contains the component selection cheat sheet, anti-patterns, and disambiguation rules
|
|
18
19
|
|
|
19
20
|
## Rule 1 — Mandatory Prop Lookup
|
|
20
21
|
|
|
@@ -44,9 +45,53 @@ When applying colors, spacing, or typography:
|
|
|
44
45
|
1. Call `search_design_tokens` to find the correct token names and CSS custom properties.
|
|
45
46
|
2. Do not hardcode color hex values — use the design token CSS variables.
|
|
46
47
|
|
|
48
|
+
## Rule 5 — Host App Setup (Adopting or Migrating to DS)
|
|
49
|
+
|
|
50
|
+
When adopting `@redsift/*` components in a new project or migrating from raw HTML/CSS/Tailwind:
|
|
51
|
+
|
|
52
|
+
1. Read the `design-system://getting-started/host-app` MCP resource FIRST.
|
|
53
|
+
2. Ensure the app entry point imports `@redsift/design-system/style/index.css`.
|
|
54
|
+
3. Wrap the app with `<AppContainer>` (full Red Sift shell) or `<ThemeProvider value={{ theme }}>` (standalone). Do NOT pass `theme` to every individual component — use context at the root.
|
|
55
|
+
4. Import icons from `@redsift/icons`, not `@mdi/js`.
|
|
56
|
+
5. Remove conflicting Tailwind/utility-CSS classes (`bg-*`, `text-*`, `border-*`, `dark:*`) from elements that render or wrap DS components.
|
|
57
|
+
|
|
58
|
+
## Rule 6 — Semantic Colors Only
|
|
59
|
+
|
|
60
|
+
When setting colors on DS components:
|
|
61
|
+
|
|
62
|
+
1. **Never use hex/rgb literals** (`#22c55e`, `rgb(34, 197, 94)`) on DS component color props.
|
|
63
|
+
2. **Never use CSS variable fallbacks** like `color="var(--rs-color-green-500, #22c55e)"`.
|
|
64
|
+
3. **Always use semantic color values:** `"success"`, `"warning"`, `"error"`, `"info"`, `"no-data"`, `"question"`, or palette names from `NeutralColorPalette` / `PresentationColorPalette`.
|
|
65
|
+
4. If asked which hex color to use, **refuse** — return the semantic token name instead.
|
|
66
|
+
|
|
67
|
+
## Rule 7 — Icons from @redsift/icons Only
|
|
68
|
+
|
|
69
|
+
1. **Never use unicode glyphs** (✓, ✕, ⚠, ›, •) as visual indicators — import the equivalent `mdi*` icon from `@redsift/icons`.
|
|
70
|
+
2. **Never import from `@mdi/js`** — always use `@redsift/icons` (the DS re-exports the mdi icon set).
|
|
71
|
+
3. Render icons with the `<Icon>` component from `@redsift/design-system`, e.g. `<Icon path={mdiCheck} />`.
|
|
72
|
+
|
|
73
|
+
## Rule 8 — Component Selection
|
|
74
|
+
|
|
75
|
+
When choosing which component to use, follow this cheat sheet:
|
|
76
|
+
|
|
77
|
+
| UI Intent | Correct Component | Package | Common Mistake |
|
|
78
|
+
| ------------------------ | -------------------------------------- | ------------------------ | ------------------------------------------------- |
|
|
79
|
+
| KPI / metric tile | `DataCard` + `DataRow` | `@redsift/dashboard` | Using `Card` with inline styles |
|
|
80
|
+
| Status badge | `<Pill color="success">Label</Pill>` | `@redsift/design-system` | `<Pill label="..." />` (label prop doesn't exist) |
|
|
81
|
+
| Loading placeholder | `Skeleton` / `SkeletonText` | `@redsift/design-system` | `Skeleton` from `@mui/material` |
|
|
82
|
+
| Collapsible detail panel | `DetailedCard` + `DetailedCardSection` | `@redsift/design-system` | Custom accordion with Card |
|
|
83
|
+
| Generic container | `Card` | `@redsift/design-system` | Using Card for KPI tiles (use DataCard) |
|
|
84
|
+
| Modal / dialog | `Dialog` compound component | `@redsift/popovers` | Building custom overlay |
|
|
85
|
+
|
|
86
|
+
## Rule 9 — Refusal Rules
|
|
87
|
+
|
|
88
|
+
1. If asked to provide a hex color for a DS component → **refuse** and return the semantic token name.
|
|
89
|
+
2. If asked to wrap a DS component in `styled-components` to change its visual appearance → **refuse** and propose using the component's built-in props, composition, or filing a DS feature request.
|
|
90
|
+
3. If the requested component does not exist in any `@redsift/*` package → say so and propose the closest existing primitive or composition.
|
|
91
|
+
|
|
47
92
|
## NEVER Do This
|
|
48
93
|
|
|
49
|
-
These are concrete examples of wrong code. **Every single one will fail:**
|
|
94
|
+
These are concrete examples of wrong code. **Every single one will fail or produce incorrect results:**
|
|
50
95
|
|
|
51
96
|
```tsx
|
|
52
97
|
// ❌ WRONG — Button has NO size prop
|
|
@@ -62,21 +107,71 @@ These are concrete examples of wrong code. **Every single one will fail:**
|
|
|
62
107
|
|
|
63
108
|
// ❌ WRONG — wrong package
|
|
64
109
|
import { Select } from '@redsift/design-system';
|
|
110
|
+
|
|
111
|
+
// ❌ WRONG — Use DataCard for KPI tiles, not Card with inline styles
|
|
112
|
+
<Card style={{ borderLeft: '4px solid green' }}>
|
|
113
|
+
// ✅ RIGHT
|
|
114
|
+
<DataCard color="success">
|
|
115
|
+
|
|
116
|
+
// ❌ WRONG — Pill uses children, not label
|
|
117
|
+
<Pill label="Active" />
|
|
118
|
+
// ✅ RIGHT
|
|
119
|
+
<Pill color="success">Active</Pill>
|
|
120
|
+
|
|
121
|
+
// ❌ WRONG — gap takes a string
|
|
122
|
+
<Flexbox gap={4}>
|
|
123
|
+
// ✅ RIGHT
|
|
124
|
+
<Flexbox gap="4px">
|
|
125
|
+
|
|
126
|
+
// ❌ WRONG — use mdi icons, not unicode characters
|
|
127
|
+
<Text>✓ Trusted</Text>
|
|
128
|
+
// ✅ RIGHT
|
|
129
|
+
<Icon path={mdiCheck} /> <Text>Trusted</Text>
|
|
130
|
+
|
|
131
|
+
// ❌ WRONG — use DS Skeleton, not MUI
|
|
132
|
+
import { Skeleton } from '@mui/material';
|
|
133
|
+
// ✅ RIGHT
|
|
134
|
+
import { Skeleton } from '@redsift/design-system';
|
|
135
|
+
|
|
136
|
+
// ❌ WRONG — hex color on DS component
|
|
137
|
+
<Heading color="#22c55e">Title</Heading>
|
|
138
|
+
// ✅ RIGHT
|
|
139
|
+
<Heading color="success">Title</Heading>
|
|
140
|
+
|
|
141
|
+
// ❌ WRONG — CSS variable fallback on DS component
|
|
142
|
+
<Text color="var(--rs-color-green-500, #22c55e)">Status</Text>
|
|
143
|
+
// ✅ RIGHT
|
|
144
|
+
<Text color="success">Status</Text>
|
|
145
|
+
|
|
146
|
+
// ❌ WRONG — import from @mdi/js
|
|
147
|
+
import { mdiPlus } from '@mdi/js';
|
|
148
|
+
// ✅ RIGHT
|
|
149
|
+
import { mdiPlus } from '@redsift/icons';
|
|
65
150
|
```
|
|
66
151
|
|
|
67
152
|
## Common Mistakes
|
|
68
153
|
|
|
69
|
-
| Wrong (guessed) | Correct (actual)
|
|
70
|
-
| --------------------------------------------------- |
|
|
71
|
-
| `variant="primary"` | Look up actual variants
|
|
72
|
-
| `size="sm"` / `size="lg"` | Most components have no size prop
|
|
73
|
-
| `colorScheme="red"` | Does not exist
|
|
74
|
-
| `isDisabled` | `disabled`
|
|
75
|
-
| `onPress` | `onClick`
|
|
76
|
-
| `leftIcon` / `rightIcon` | Look up actual icon prop names
|
|
77
|
-
| `import { Select } from '@redsift/design-system'` | `import { Select } from '@redsift/pickers'`
|
|
78
|
-
| `import { Dialog } from '@redsift/design-system'` | `import { Dialog } from '@redsift/popovers'`
|
|
79
|
-
| `import { DataGrid } from '@redsift/design-system'` | `import { DataGrid } from '@redsift/table'`
|
|
154
|
+
| Wrong (guessed) | Correct (actual) | How to verify |
|
|
155
|
+
| --------------------------------------------------- | ----------------------------------------------------------- | ------------------------------------------ |
|
|
156
|
+
| `variant="primary"` | Look up actual variants | `get_component_props` for the component |
|
|
157
|
+
| `size="sm"` / `size="lg"` | Most components have no size prop | `get_component_props` for the component |
|
|
158
|
+
| `colorScheme="red"` | Does not exist | `get_component_props` for the component |
|
|
159
|
+
| `isDisabled` | `disabled` | `get_component_props` for the component |
|
|
160
|
+
| `onPress` | `onClick` | `get_component_props` for the component |
|
|
161
|
+
| `leftIcon` / `rightIcon` | Look up actual icon prop names | `get_component_props` for the component |
|
|
162
|
+
| `import { Select } from '@redsift/design-system'` | `import { Select } from '@redsift/pickers'` | `get_component_usage` |
|
|
163
|
+
| `import { Dialog } from '@redsift/design-system'` | `import { Dialog } from '@redsift/popovers'` | `get_component_usage` |
|
|
164
|
+
| `import { DataGrid } from '@redsift/design-system'` | `import { DataGrid } from '@redsift/table'` | `get_component_usage` |
|
|
165
|
+
| Passing `theme` to every component | Wrap app with `<AppContainer>` or `<ThemeProvider>` at root | `design-system://getting-started/host-app` |
|
|
166
|
+
| Missing `@redsift/design-system/style/index.css` | Must import at app entry point | `design-system://getting-started/host-app` |
|
|
167
|
+
| `import { mdiPlus } from '@mdi/js'` | `import { mdiPlus } from '@redsift/icons'` | `get_component_usage` |
|
|
168
|
+
| Tailwind `bg-*`/`text-*`/`dark:*` on DS wrappers | Use DS tokens or layout primitives | `design-system://getting-started/host-app` |
|
|
169
|
+
| `<Pill label="Active" />` | `<Pill color="success">Active</Pill>` (children) | `get_component_props` for Pill |
|
|
170
|
+
| `<Flexbox gap={4}>` | `<Flexbox gap="4px">` (string, not number) | `get_component_props` for Flexbox |
|
|
171
|
+
| `<Card>` for KPI tiles | `<DataCard>` from `@redsift/dashboard` | `get_component_props` for DataCard |
|
|
172
|
+
| `import { Skeleton } from '@mui/material'` | `import { Skeleton } from '@redsift/design-system'` | `get_component_usage` for Skeleton |
|
|
173
|
+
| Hex/rgb colors on DS components | Use semantic colors: `"success"`, `"error"`, etc. | `get_component_props` for the component |
|
|
174
|
+
| Unicode glyphs (✓, ✕, ⚠) as indicators | `<Icon path={mdiCheck} />` from `@redsift/icons` | `get_component_usage` for Icon |
|
|
80
175
|
|
|
81
176
|
## Verification
|
|
82
177
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "BaseBarChart",
|
|
3
|
-
"description": "BarChart visualizes categorical data with rectangular bars.\nBuilt on D3.js with responsive sizing and interactive tooltips.\n\nSupports horizontal/vertical orientation, stacked/grouped bars,\nand various legend placements.\n\nData format: `CategoryData` `[{ key: string, value: number }]`",
|
|
3
|
+
"description": "BarChart visualizes categorical data with rectangular bars.\nBuilt on D3.js with responsive sizing and interactive tooltips.\n\nThis is the only public entry point for bar charts. Do not import\n`RenderedLinearBarChart`, `RenderedOrdinalBarChart`, `EmptyBarChart`, or\n`LoadingBarChart` directly — `BarChart` selects the correct renderer\n(linear vs. ordinal scale) automatically based on the data type,\nand manages all loading and empty states internally.\n\nSupports horizontal/vertical orientation, stacked/grouped bars,\nand various legend placements.\n\nData format: `CategoryData` `[{ key: string, value: number }]`",
|
|
4
4
|
"package": "@redsift/charts",
|
|
5
5
|
"filePath": "packages/charts/src/components/BarChart/BarChart.tsx",
|
|
6
6
|
"props": [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "LineChart",
|
|
3
|
-
"description": "LineChart displays trends over time or continuous data.\nBuilt on D3.js with smooth interpolation and interactive data points.\n\nData format: `LinearData` `[{ key: Date, value: number, label?: string }]`",
|
|
3
|
+
"description": "LineChart displays trends over time or continuous data.\nBuilt on D3.js with smooth interpolation and interactive data points.\n\nThis is the only public entry point for line charts. Do not import\n`RenderedLineChart`, `EmptyLineChart`, or `LoadingLineChart` directly —\nthose are internal sub-components that `LineChart` selects automatically\nbased on whether `data` is present and non-empty.\n\nData format: `LinearData` `[{ key: Date, value: number, label?: string }]`",
|
|
4
4
|
"package": "@redsift/charts",
|
|
5
5
|
"filePath": "packages/charts/src/components/LineChart/LineChart.tsx",
|
|
6
6
|
"props": [
|
|
@@ -749,5 +749,11 @@
|
|
|
749
749
|
}
|
|
750
750
|
],
|
|
751
751
|
"examples": [],
|
|
752
|
-
"tags": {}
|
|
752
|
+
"tags": {},
|
|
753
|
+
"keywords": [
|
|
754
|
+
"line graph",
|
|
755
|
+
"time series",
|
|
756
|
+
"trend chart",
|
|
757
|
+
"line visualization"
|
|
758
|
+
]
|
|
753
759
|
}
|
|
@@ -296,5 +296,22 @@
|
|
|
296
296
|
}
|
|
297
297
|
],
|
|
298
298
|
"examples": [],
|
|
299
|
-
"tags": {}
|
|
299
|
+
"tags": {},
|
|
300
|
+
"usageRules": [
|
|
301
|
+
"DataCard.Header, DataCard.Body, and DataCard.Listbox must be direct children of <DataCard>. Never nest them inside each other (e.g. Listbox inside Body) — nesting doubles margins and breaks layout.",
|
|
302
|
+
"Use DataCard.Body for static/link DataRow children. Use DataCard.Listbox for interactive filter-selection DataRow children. Do not combine both in one DataCard.",
|
|
303
|
+
"The `slot` prop is not supported. Do not pass slot=\"heading\" or similar — use the compound sub-component API instead."
|
|
304
|
+
],
|
|
305
|
+
"disambiguation": "DataCard is a purpose-built KPI/metric tile from @redsift/dashboard. This is the correct component 9 out of 10 times when building \"a card with a big number\" or \"summary cards above a grid\". Do NOT use Card or DetailedCard for this.",
|
|
306
|
+
"antiPatterns": [
|
|
307
|
+
"❌ <Card style={{ borderLeft: \"4px solid green\" }}> for KPI tiles → ✅ <DataCard color=\"success\"> — DataCard is purpose-built for metric tiles."
|
|
308
|
+
],
|
|
309
|
+
"keywords": [
|
|
310
|
+
"kpi tile",
|
|
311
|
+
"metric tile",
|
|
312
|
+
"stat card",
|
|
313
|
+
"kpi card",
|
|
314
|
+
"summary card",
|
|
315
|
+
"metric card"
|
|
316
|
+
]
|
|
300
317
|
}
|
|
@@ -435,5 +435,13 @@
|
|
|
435
435
|
}
|
|
436
436
|
],
|
|
437
437
|
"examples": [],
|
|
438
|
-
"tags": {}
|
|
438
|
+
"tags": {},
|
|
439
|
+
"usageRules": [
|
|
440
|
+
"Must be a direct child of <DataCard>. Do not place DataCard.Listbox or DataCard.Header inside DataCard.Body.",
|
|
441
|
+
"Children should be <DataRow> components."
|
|
442
|
+
],
|
|
443
|
+
"keywords": [
|
|
444
|
+
"metric body",
|
|
445
|
+
"kpi body"
|
|
446
|
+
]
|
|
439
447
|
}
|
|
@@ -300,5 +300,12 @@
|
|
|
300
300
|
}
|
|
301
301
|
],
|
|
302
302
|
"examples": [],
|
|
303
|
-
"tags": {}
|
|
303
|
+
"tags": {},
|
|
304
|
+
"usageRules": [
|
|
305
|
+
"Must be a direct child of <DataCard>, not nested inside DataCard.Body or DataCard.Listbox."
|
|
306
|
+
],
|
|
307
|
+
"keywords": [
|
|
308
|
+
"metric header",
|
|
309
|
+
"kpi header"
|
|
310
|
+
]
|
|
304
311
|
}
|
|
@@ -533,5 +533,14 @@
|
|
|
533
533
|
}
|
|
534
534
|
],
|
|
535
535
|
"examples": [],
|
|
536
|
-
"tags": {}
|
|
536
|
+
"tags": {},
|
|
537
|
+
"usageRules": [
|
|
538
|
+
"Must be a direct child of <DataCard>. Do not place DataCard.Body or DataCard.Header inside DataCard.Listbox.",
|
|
539
|
+
"Children should be <DataRow> components with onClick and hasFilterIcon for drilldown interactions."
|
|
540
|
+
],
|
|
541
|
+
"keywords": [
|
|
542
|
+
"metric listbox",
|
|
543
|
+
"kpi listbox",
|
|
544
|
+
"filter listbox"
|
|
545
|
+
]
|
|
537
546
|
}
|
|
@@ -294,5 +294,14 @@
|
|
|
294
294
|
}
|
|
295
295
|
],
|
|
296
296
|
"examples": [],
|
|
297
|
-
"tags": {}
|
|
297
|
+
"tags": {},
|
|
298
|
+
"usageRules": [
|
|
299
|
+
"Only accepts Breadcrumbs.Item as children. Non-Item children are silently ignored and will not render.",
|
|
300
|
+
"The last Breadcrumbs.Item is automatically marked as the current page and is not clickable.",
|
|
301
|
+
"Provide an aria-label for accessibility (e.g. aria-label=\"Breadcrumb navigation\")."
|
|
302
|
+
],
|
|
303
|
+
"keywords": [
|
|
304
|
+
"breadcrumb nav",
|
|
305
|
+
"path navigation"
|
|
306
|
+
]
|
|
298
307
|
}
|