@reinvented/design 1.0.0 → 1.1.0
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/README.md +1 -1
- package/SKILL.md +214 -0
- package/package.json +4 -3
- package/skills/apps/analytics.md +103 -0
- package/skills/apps/booking-scheduling.md +97 -0
- package/skills/apps/content-management.md +52 -0
- package/skills/apps/crm.md +80 -0
- package/skills/apps/e-commerce.md +109 -0
- package/skills/apps/education.md +79 -0
- package/skills/apps/finance.md +68 -0
- package/skills/apps/health-fitness.md +72 -0
- package/skills/apps/marketplace.md +99 -0
- package/skills/apps/messaging.md +84 -0
- package/skills/apps/portfolio-personal.md +90 -0
- package/skills/apps/project-management.md +95 -0
- package/skills/apps/saas-dashboard.md +104 -0
- package/skills/apps/social-platform.md +50 -0
- package/skills/blocks/auth.md +106 -0
- package/skills/blocks/communication.md +98 -0
- package/skills/blocks/content.md +107 -0
- package/skills/blocks/data-management.md +109 -0
- package/skills/blocks/data-viz.md +92 -0
- package/skills/blocks/ecommerce.md +126 -0
- package/skills/blocks/feedback.md +97 -0
- package/skills/blocks/filtering.md +127 -0
- package/skills/blocks/marketing.md +136 -0
- package/skills/blocks/media.md +102 -0
- package/skills/blocks/navigation.md +136 -0
- package/skills/blocks/onboarding.md +75 -0
- package/skills/blocks/profiles.md +131 -0
- package/skills/blocks/scheduling.md +117 -0
- package/skills/blocks/settings.md +102 -0
- package/skills/components/advanced-components.md +142 -0
- package/skills/components/avatar.md +92 -0
- package/skills/components/badge.md +105 -0
- package/skills/components/button.md +87 -0
- package/skills/components/card.md +144 -0
- package/skills/components/chart.md +88 -0
- package/skills/components/dialog.md +109 -0
- package/skills/components/dropdown-menu.md +117 -0
- package/skills/components/extended-components.md +187 -0
- package/skills/components/feedback.md +165 -0
- package/skills/components/form.md +112 -0
- package/skills/components/input.md +107 -0
- package/skills/components/map.md +53 -0
- package/skills/components/navigation.md +73 -0
- package/skills/components/overlay.md +77 -0
- package/skills/components/page-header.md +51 -0
- package/skills/components/select.md +175 -0
- package/skills/components/table.md +102 -0
- package/skills/components/tabs.md +105 -0
- package/skills/components/utilities.md +138 -0
- package/skills/devices/desktop.md +43 -0
- package/skills/devices/mobile.md +77 -0
- package/skills/foundation/design-principles.md +77 -0
- package/skills/foundation/design-tokens.md +121 -0
- package/skills/foundation/mockup-generation.md +118 -0
- package/skills/foundation/rules.md +54 -0
- package/skills/foundation/tailwind-usage.md +204 -0
- package/skills/layouts/dashboard.md +71 -0
- package/skills/layouts/full-page-form.md +75 -0
- package/skills/layouts/list-detail.md +70 -0
- package/skills/layouts/marketing.md +70 -0
- package/skills/layouts/responsive.md +67 -0
- package/skills/layouts/settings-page.md +106 -0
- package/skills/layouts/sidebar.md +73 -0
- package/skills/layouts/topbar.md +68 -0
- package/skills/patterns/auth.md +131 -0
- package/skills/patterns/content-display.md +164 -0
- package/skills/patterns/dashboards.md +104 -0
- package/skills/patterns/data-tables.md +113 -0
- package/skills/patterns/empty-states.md +71 -0
- package/skills/patterns/error-states.md +73 -0
- package/skills/patterns/forms.md +136 -0
- package/skills/patterns/loading-states.md +92 -0
- package/skills/patterns/navigation.md +113 -0
- package/skills/patterns/notifications.md +91 -0
- package/skills/patterns/onboarding.md +42 -0
- package/skills/patterns/search.md +55 -0
- package/skills/patterns/settings.md +132 -0
- package/skills/patterns/user-profiles.md +67 -0
- package/skills/personas/business-operator.md +114 -0
- package/skills/personas/consumer-casual.md +60 -0
- package/skills/personas/consumer-power-user.md +109 -0
- package/skills/personas/creative-professional.md +109 -0
- package/skills/personas/enterprise-admin.md +134 -0
- package/skills/visual/color-usage.md +62 -0
- package/skills/visual/dark-mode.md +50 -0
- package/skills/visual/polish-techniques.md +101 -0
- package/skills/visual/spacing-composition.md +69 -0
- package/skills/visual/transitions-animations.md +66 -0
- package/skills/visual/typography-hierarchy.md +66 -0
- package/DESIGN_GUIDE.md +0 -148
package/README.md
CHANGED
|
@@ -154,7 +154,7 @@ examples/ Full skeleton examples
|
|
|
154
154
|
- **[Components](docs/components/index.md)** — Component usage guides
|
|
155
155
|
- **[Patterns](docs/patterns/index.md)** — Reusable UI patterns
|
|
156
156
|
- **[Layouts](docs/layouts/index.md)** — Page layout recipes
|
|
157
|
-
- **[
|
|
157
|
+
- **[AI Agent Guide](SKILL.md)** — Full design system skill guide for AI agents
|
|
158
158
|
|
|
159
159
|
## Contributing
|
|
160
160
|
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# Reinvented Design System — AI Agent Guide
|
|
2
|
+
|
|
3
|
+
You are building a UI using the Reinvented design system, which is a React + Radix UI + shadcn + Tailwind CSS system. Your output must be indistinguishable from something the shadcn team would build: clean, precise, professional, and intuitive in both light and dark mode.
|
|
4
|
+
|
|
5
|
+
## Before You Write Any Code
|
|
6
|
+
|
|
7
|
+
**Stop and plan.** Read this entire file first. Then follow the structured journey below to determine exactly what to build.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Step 1: Understand the Constraints
|
|
12
|
+
|
|
13
|
+
Read these foundation docs before anything else:
|
|
14
|
+
|
|
15
|
+
| Doc | What it tells you |
|
|
16
|
+
|-----|-------------------|
|
|
17
|
+
| `skills/foundation/rules.md` | Non-negotiable constraints — read first |
|
|
18
|
+
| `skills/foundation/design-principles.md` | The aesthetic philosophy — what "good" means |
|
|
19
|
+
| `skills/foundation/design-tokens.md` | Exact color values, spacing scale, typography |
|
|
20
|
+
| `skills/foundation/tailwind-usage.md` | How to use Tailwind classes with this system |
|
|
21
|
+
|
|
22
|
+
> **Mockup mode?** If you're generating a standalone mockup (not production code), also read `skills/foundation/mockup-generation.md` for output format, dummy data, and placeholder components.
|
|
23
|
+
|
|
24
|
+
## Step 2: Determine the Context
|
|
25
|
+
|
|
26
|
+
From the user's prompt, determine:
|
|
27
|
+
|
|
28
|
+
### 2a. Device Target
|
|
29
|
+
What viewport is primary? Read the relevant doc:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
Desktop (default if unspecified) → skills/devices/desktop.md
|
|
33
|
+
Mobile → skills/devices/mobile.md
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Desktop is the default. It covers laptops, large monitors, and tablets (which behave like small desktops). Only read `skills/devices/mobile.md` if the prompt explicitly targets phones or mobile-first.
|
|
37
|
+
|
|
38
|
+
### 2b. Target Persona
|
|
39
|
+
Who is the end user? Read the relevant doc:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
General consumer / casual user → skills/personas/consumer-casual.md
|
|
43
|
+
Power user / developer → skills/personas/consumer-power-user.md
|
|
44
|
+
Business operator / back-office → skills/personas/business-operator.md
|
|
45
|
+
Creative / designer type → skills/personas/creative-professional.md
|
|
46
|
+
Enterprise admin / compliance → skills/personas/enterprise-admin.md
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
If the prompt doesn't specify a persona, default to **consumer-casual** for B2C apps and **business-operator** for B2B apps.
|
|
50
|
+
|
|
51
|
+
### 2c. App Category
|
|
52
|
+
What type of application is this? Read the relevant doc:
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
Admin panel, SaaS dashboard → skills/apps/saas-dashboard.md
|
|
56
|
+
Online store, product catalog → skills/apps/e-commerce.md
|
|
57
|
+
Tasks, boards, sprints → skills/apps/project-management.md
|
|
58
|
+
Chat, conversations → skills/apps/messaging.md
|
|
59
|
+
Blog, CMS, publishing → skills/apps/content-management.md
|
|
60
|
+
Feed, profiles, social → skills/apps/social-platform.md
|
|
61
|
+
Charts, reports, data viz → skills/apps/analytics.md
|
|
62
|
+
Listings, buyers & sellers → skills/apps/marketplace.md
|
|
63
|
+
Appointments, calendar → skills/apps/booking-scheduling.md
|
|
64
|
+
Banking, budgets, transactions → skills/apps/finance.md
|
|
65
|
+
Workouts, health tracking → skills/apps/health-fitness.md
|
|
66
|
+
Courses, learning → skills/apps/education.md
|
|
67
|
+
Contacts, deals, pipeline → skills/apps/crm.md
|
|
68
|
+
Personal site, portfolio → skills/apps/portfolio-personal.md
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
If the prompt doesn't match any category, skip this step — the patterns and layouts docs will be sufficient.
|
|
72
|
+
|
|
73
|
+
## Step 3: Choose a Layout
|
|
74
|
+
|
|
75
|
+
Based on your analysis, select a page layout. Read the relevant doc:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
Sidebar navigation + content area → skills/layouts/sidebar.md
|
|
79
|
+
Top navigation + content area → skills/layouts/topbar.md
|
|
80
|
+
Stats + charts + tables → skills/layouts/dashboard.md
|
|
81
|
+
List on left, detail on right → skills/layouts/list-detail.md
|
|
82
|
+
Settings with section nav → skills/layouts/settings-page.md
|
|
83
|
+
Landing page / marketing → skills/layouts/marketing.md
|
|
84
|
+
Centered form or wizard → skills/layouts/full-page-form.md
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Also read `skills/layouts/responsive.md` if targeting multiple devices.
|
|
88
|
+
|
|
89
|
+
## Step 4: Identify Patterns
|
|
90
|
+
|
|
91
|
+
Which UI patterns does your view need? Read each relevant doc:
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
Table with search/filter/sort → skills/patterns/data-tables.md
|
|
95
|
+
Create/edit forms → skills/patterns/forms.md
|
|
96
|
+
Navigation structure → skills/patterns/navigation.md
|
|
97
|
+
Card grids, list views → skills/patterns/content-display.md
|
|
98
|
+
Stats + KPI cards + overview → skills/patterns/dashboards.md
|
|
99
|
+
Empty state (no data yet) → skills/patterns/empty-states.md
|
|
100
|
+
Loading / skeleton states → skills/patterns/loading-states.md
|
|
101
|
+
Error handling UI → skills/patterns/error-states.md
|
|
102
|
+
Login / signup / auth → skills/patterns/auth.md
|
|
103
|
+
First-run / setup wizard → skills/patterns/onboarding.md
|
|
104
|
+
Settings / preferences → skills/patterns/settings.md
|
|
105
|
+
Global search / command palette → skills/patterns/search.md
|
|
106
|
+
Alerts, notification center → skills/patterns/notifications.md
|
|
107
|
+
User profile / account → skills/patterns/user-profiles.md
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Step 4.5: Check for Blocks
|
|
111
|
+
|
|
112
|
+
Before assembling primitives from scratch, check if a composite **Block** already exists for your domain. If one exists, you MUST use it instead of rebuilding the pattern manually. Read the relevant doc:
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
Communication & Chat → skills/blocks/communication.md
|
|
116
|
+
Media & Realtime → skills/blocks/media.md
|
|
117
|
+
E-Commerce & Catalog → skills/blocks/ecommerce.md
|
|
118
|
+
Knowledge & Content → skills/blocks/content.md
|
|
119
|
+
Data Visualization → skills/blocks/data-viz.md
|
|
120
|
+
Data Management → skills/blocks/data-management.md
|
|
121
|
+
Identity & Auth → skills/blocks/auth.md
|
|
122
|
+
User Profiles → skills/blocks/profiles.md
|
|
123
|
+
Settings & Config → skills/blocks/settings.md
|
|
124
|
+
Onboarding & Walkthroughs → skills/blocks/onboarding.md
|
|
125
|
+
Feedback & Status → skills/blocks/feedback.md
|
|
126
|
+
Filtering & Search → skills/blocks/search.md
|
|
127
|
+
Scheduling & Calendaring → skills/blocks/scheduling.md
|
|
128
|
+
Navigation & Shells → skills/blocks/navigation.md
|
|
129
|
+
Marketing & Landing → skills/blocks/marketing.md
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Component Cheat Sheet
|
|
133
|
+
|
|
134
|
+
Use this mapping to select the right component for your intent. Once selected, proceed to Step 5 to read its documentation.
|
|
135
|
+
|
|
136
|
+
| Need | Use Component |
|
|
137
|
+
|------|---------------|
|
|
138
|
+
| **Button/action** | `Button` with appropriate variant |
|
|
139
|
+
| **Form inputs** | `Input`, `Select`, `Switch`, `Checkbox`, `RadioGroup`, `Textarea`, `Slider` |
|
|
140
|
+
| **Toggle 2–5 choices** | `ToggleGroup` + `ToggleGroupItem` |
|
|
141
|
+
| **Data display** | `Table`, `Card`, `Badge`, `Avatar` |
|
|
142
|
+
| **Charts/Data viz** | `DonutChart`, `BarChart`, `LineChart`, `AreaChart` |
|
|
143
|
+
| **Overlays** | `Dialog` (modal), `Sheet` (side panel), `Drawer` (bottom sheet), `AlertDialog` (confirmation) |
|
|
144
|
+
| **Feedback** | `Alert`, `Progress`, `Skeleton`, `Toast` (via sonner plugin) |
|
|
145
|
+
| **Layout/Structure** | `PageHeader`, `Card`, `Separator`, `Resizable`, `ScrollArea`, `Accordion`, `Collapsible` |
|
|
146
|
+
| **Empty states** | `Empty` |
|
|
147
|
+
| **Menus** | `DropdownMenu`, `ContextMenu`, `Menubar` |
|
|
148
|
+
| **Tooltips/info** | `Tooltip`, `HoverCard`, `Popover` |
|
|
149
|
+
|
|
150
|
+
## Step 5: Look Up Components
|
|
151
|
+
|
|
152
|
+
**CRITICAL RULE: DO NOT GUESS COMPONENT PROPS.**
|
|
153
|
+
Unlike generic HTML elements, Shadcn components have highly specific prop structures.
|
|
154
|
+
For each primitive component you plan to use, **you must read its doc file**:
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
components/button.md — Button variants, sizes, icons, loading
|
|
159
|
+
components/card.md — Card, CardHeader, CardContent, etc.
|
|
160
|
+
components/input.md — Input, Textarea, Label
|
|
161
|
+
components/badge.md — Badge variants and usage
|
|
162
|
+
components/avatar.md — Avatar sizes and fallbacks
|
|
163
|
+
components/dialog.md — Dialog, AlertDialog
|
|
164
|
+
components/select.md — Select, Checkbox, Switch, RadioGroup, Slider
|
|
165
|
+
components/dropdown-menu.md — DropdownMenu, ContextMenu, Menubar
|
|
166
|
+
components/table.md — Table and all subcomponents
|
|
167
|
+
components/tabs.md — Tabs, Accordion, Collapsible
|
|
168
|
+
components/navigation.md — Breadcrumb, Pagination
|
|
169
|
+
components/page-header.md — PageHeader, PageHeaderTitle, PageHeaderActions
|
|
170
|
+
components/feedback.md — Alert, Tooltip, Popover, HoverCard, Progress, Toast
|
|
171
|
+
components/overlay.md — Sheet, ScrollArea
|
|
172
|
+
components/form.md — Form validation components
|
|
173
|
+
components/utilities.md — Separator, Skeleton, Toggle, ToggleGroup, Command, ComponentPlaceholder (Mockup Mode Only)
|
|
174
|
+
components/chart.md — DonutChart, BarChart, LineChart, AreaChart and data visualizations
|
|
175
|
+
components/map.md — InteractiveMap for rendering mapping bounds, locations, and vectors
|
|
176
|
+
components/advanced-components.md — Complex interactive tools (Accordion, Calendar, Carousel, Drawer, Resizable)
|
|
177
|
+
components/extended-components.md — Catch-all for additional UI elements not covered above
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## Step 6: Apply Visual Polish
|
|
181
|
+
|
|
182
|
+
Read the relevant visual docs for finishing touches:
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
visual/spacing-composition.md — Page rhythm, spacing hierarchy
|
|
186
|
+
visual/color-usage.md — Semantic color application
|
|
187
|
+
visual/typography-hierarchy.md — Type scale in context
|
|
188
|
+
visual/transitions-animations.md — Motion and hover effects
|
|
189
|
+
visual/dark-mode.md — Dark mode considerations
|
|
190
|
+
visual/polish-techniques.md — Subtle effects that elevate quality
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## Step 7: Write the Code
|
|
194
|
+
|
|
195
|
+
Now — and only now — write the code. Your plan should be:
|
|
196
|
+
|
|
197
|
+
1. **Declare your structure**: Top-level layout → sections → component composition
|
|
198
|
+
2. **Apply spacing hierarchy**: Tight within groups, loose between sections
|
|
199
|
+
3. **Handle all states**: Loading skeletons, empty states, error handling
|
|
200
|
+
4. **Polish**: Hover effects, transitions, consistent icon usage
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Quality Bar
|
|
205
|
+
|
|
206
|
+
Your output **passes** if a designer would look at it and say "that's clean shadcn." It **fails** if:
|
|
207
|
+
|
|
208
|
+
- There are raw HTML elements where DS components exist
|
|
209
|
+
- Spacing is inconsistent or arbitrary
|
|
210
|
+
- Colors are hardcoded instead of using tokens
|
|
211
|
+
- The layout feels cramped or excessively sparse
|
|
212
|
+
- It wouldn't work in dark mode
|
|
213
|
+
- Interactive elements lack hover/focus states
|
|
214
|
+
- The visual hierarchy is flat (everything the same size/weight)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reinvented/design",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"exports": {
|
|
@@ -17,9 +17,10 @@
|
|
|
17
17
|
"files": [
|
|
18
18
|
"src/",
|
|
19
19
|
"docs/",
|
|
20
|
+
"skills/",
|
|
21
|
+
"SKILL.md",
|
|
20
22
|
"tailwind.config.js",
|
|
21
|
-
"tsconfig.json"
|
|
22
|
-
"DESIGN_GUIDE.md"
|
|
23
|
+
"tsconfig.json"
|
|
23
24
|
],
|
|
24
25
|
"scripts": {
|
|
25
26
|
"build": "tsc --noEmit",
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# App Type: Analytics
|
|
2
|
+
|
|
3
|
+
Charts, reports, data visualization, and filtered data views.
|
|
4
|
+
|
|
5
|
+
## Layout
|
|
6
|
+
Use `layouts/sidebar.md` as the root wrapper with a prominent date range filter in the topbar header. Analytics apps require maximum horizontal space, so the sidebar should be collapsible if possible.
|
|
7
|
+
|
|
8
|
+
## Key Screens
|
|
9
|
+
|
|
10
|
+
1. **Overview Dashboard** — High-level metrics, 4 KPI cards, small sparkline charts.
|
|
11
|
+
2. **Detailed Report** — Full-width interactive chart area + granular data table below.
|
|
12
|
+
3. **Custom Report Builder** — Deep filter panel on the left/top + chart configuration.
|
|
13
|
+
|
|
14
|
+
## Component Composition Example
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
<!-- Analytics Dashboard Layout -->
|
|
18
|
+
<div className="space-y-6">
|
|
19
|
+
<!-- Interactive Header -->
|
|
20
|
+
<div className="flex flex-col sm:flex-row sm:items-center justify-between gap-4">
|
|
21
|
+
<div>
|
|
22
|
+
<h1 className="text-2xl font-bold tracking-tight">Audience Overview</h1>
|
|
23
|
+
<p className="text-muted-foreground">Traffic and engagement metrics.</p>
|
|
24
|
+
</div>
|
|
25
|
+
<div className="flex items-center gap-2">
|
|
26
|
+
<!-- Filter Bar -->
|
|
27
|
+
<Select>
|
|
28
|
+
<SelectTrigger className="w-32">
|
|
29
|
+
<SelectValue placeholder="All Users" />
|
|
30
|
+
</SelectTrigger>
|
|
31
|
+
</Select>
|
|
32
|
+
<Button variant="outline" className="w-60 justify-start text-left font-normal">
|
|
33
|
+
<CalendarIcon className="mr-2 h-4 w-4" />
|
|
34
|
+
<span>Last 30 Days</span>
|
|
35
|
+
</Button>
|
|
36
|
+
<Button variant="outline" size="icon">
|
|
37
|
+
<Download className="w-4 h-4" />
|
|
38
|
+
</Button>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<!-- KPI Grid -->
|
|
43
|
+
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
|
|
44
|
+
<Card v-for="metric in metrics" :key="metric.label">
|
|
45
|
+
<CardHeader className="pb-2">
|
|
46
|
+
<CardTitle className="text-sm font-medium text-muted-foreground">{{ metric.label }}</CardTitle>
|
|
47
|
+
</CardHeader>
|
|
48
|
+
<CardContent>
|
|
49
|
+
<div className="text-3xl font-bold">{{ metric.value }}</div>
|
|
50
|
+
<div className="flex items-center gap-1 mt-1" className={metric.trend > 0 ? 'text-success' : 'text-destructive'}>
|
|
51
|
+
<TrendingUp v-if="metric.trend > 0" className="w-4 h-4" />
|
|
52
|
+
<TrendingDown v-else className="w-4 h-4" />
|
|
53
|
+
<span className="text-xs font-medium">{{ Math.abs(metric.trend) }}% vs prior</span>
|
|
54
|
+
</div>
|
|
55
|
+
</CardContent>
|
|
56
|
+
</Card>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<!-- Primary Chart Area -->
|
|
60
|
+
<Card>
|
|
61
|
+
<CardHeader className="flex flex-row items-center justify-between">
|
|
62
|
+
<div>
|
|
63
|
+
<CardTitle>Traffic Sources</CardTitle>
|
|
64
|
+
<CardDescription>Daily active users by acquisition channel.</CardDescription>
|
|
65
|
+
</div>
|
|
66
|
+
<div className="flex items-center gap-2">
|
|
67
|
+
<!-- Chart Controls -->
|
|
68
|
+
<Button variant="ghost" size="sm" className="h-8">Daily</Button>
|
|
69
|
+
<Button variant="secondary" size="sm" className="h-8">Weekly</Button>
|
|
70
|
+
<Button variant="ghost" size="sm" className="h-8">Monthly</Button>
|
|
71
|
+
</div>
|
|
72
|
+
</CardHeader>
|
|
73
|
+
<CardContent>
|
|
74
|
+
<!-- In mockups, use ComponentPlaceholder here -->
|
|
75
|
+
<ComponentPlaceholder name="StackedBarChart" description="Stacked bar chart showing Daily Active Users by Channel (Organic, Direct, Social, Paid)" height="350px" /> <!-- (Mockup Mode Only) -->
|
|
76
|
+
</CardContent>
|
|
77
|
+
</Card>
|
|
78
|
+
|
|
79
|
+
<!-- Data Table Section -->
|
|
80
|
+
<Card>
|
|
81
|
+
<CardHeader>
|
|
82
|
+
<CardTitle>Top Referrers</CardTitle>
|
|
83
|
+
</CardHeader>
|
|
84
|
+
<CardContent className="p-0">
|
|
85
|
+
<!-- Insert Table component here -->
|
|
86
|
+
</CardContent>
|
|
87
|
+
</Card>
|
|
88
|
+
</div>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Anti-Patterns (DO NOT DO)
|
|
92
|
+
|
|
93
|
+
- ❌ **Do not bury the date selector**: It must be visible at all times on the top right of the dashboard view.
|
|
94
|
+
- ❌ **Do not use pie charts for more than 5 categories**: If there are many segments, use a horizontal bar chart or a data table.
|
|
95
|
+
- ❌ **Do not use heavy colors for charts**: Maintain quiet confidence. Charts should use `primary` and `secondary` token variants, not arbitrary hex codes.
|
|
96
|
+
- ❌ **Do not show naked numbers**: All stats must have a context (e.g., "+12.5% vs last month" or "Target: 50k").
|
|
97
|
+
|
|
98
|
+
## Design Notes
|
|
99
|
+
|
|
100
|
+
- **Charts**: In mockups, use `ComponentPlaceholder` (Mockup Mode Only) with deeply descriptive text. In production, use a real chart library and wrap it in a `<Card>` with a descriptive `CardTitle`.
|
|
101
|
+
- **Comparison**: Show period-over-period changes in stat cards ("+12.5% vs last month").
|
|
102
|
+
- **Export**: Always include a "Download" or "Export" `<Button variant="outline">` near the primary data view.
|
|
103
|
+
- **Empty States**: If a metric has no data for a period, show an empty state inside the card using `text-muted-foreground` and a simple icon, not a broken chart.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# App Type: Booking & Scheduling
|
|
2
|
+
|
|
3
|
+
Calendars, time slot selection, appointment management, and confirmations.
|
|
4
|
+
|
|
5
|
+
## Layout
|
|
6
|
+
- **Customer Side**: Use `layouts/topbar.md` or `layouts/full-page-form.md`. Keep distractions to a minimum so they convert (book).
|
|
7
|
+
- **Business/Admin Side**: Use `layouts/sidebar.md` to navigate between Calendar, Staff, Services, and Settings.
|
|
8
|
+
|
|
9
|
+
## Key Screens
|
|
10
|
+
1. **Calendar View** — Month/week grid showing staff availability and scheduled events.
|
|
11
|
+
2. **Time Slot Picker** — Date selection + interactive grid of available time slots.
|
|
12
|
+
3. **Booking Form** — Information gathering (Name, Email, Service Notes).
|
|
13
|
+
4. **Booking Confirmation** — Clean card summarizing the booked details with an "Add to Calendar" CTA.
|
|
14
|
+
|
|
15
|
+
## Component Composition Example
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
<!-- Interactive Booking Flow Layout -->
|
|
19
|
+
<div className="max-w-4xl mx-auto py-12 px-4">
|
|
20
|
+
<div className="mb-8 text-center space-y-2">
|
|
21
|
+
<h1 className="text-3xl font-bold tracking-tight">Book an Appointment</h1>
|
|
22
|
+
<p className="text-muted-foreground text-lg">Select a date and time that works for you.</p>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-8 items-start">
|
|
26
|
+
<!-- Left: Service Details & Date Picker Placeholder -->
|
|
27
|
+
<div className="space-y-6">
|
|
28
|
+
<Card>
|
|
29
|
+
<CardHeader>
|
|
30
|
+
<div className="flex justify-between items-start">
|
|
31
|
+
<div className="space-y-1">
|
|
32
|
+
<CardTitle>Initial Consultation</CardTitle>
|
|
33
|
+
<CardDescription>Video Call</CardDescription>
|
|
34
|
+
</div>
|
|
35
|
+
<Badge variant="secondary">30 min</Badge>
|
|
36
|
+
</div>
|
|
37
|
+
</CardHeader>
|
|
38
|
+
<CardContent>
|
|
39
|
+
<p className="text-sm text-muted-foreground">
|
|
40
|
+
A quick introductory call to discuss your needs and how we can help before committing to a full project.
|
|
41
|
+
</p>
|
|
42
|
+
</CardContent>
|
|
43
|
+
</Card>
|
|
44
|
+
|
|
45
|
+
<!-- Calendar Placeholder (Actual DS doesn't have a complex calendar component) -->
|
|
46
|
+
<Card>
|
|
47
|
+
<CardHeader>
|
|
48
|
+
<CardTitle>Select Date</CardTitle>
|
|
49
|
+
</CardHeader>
|
|
50
|
+
<CardContent>
|
|
51
|
+
<!-- In mockups, use ComponentPlaceholder here -->
|
|
52
|
+
<ComponentPlaceholder name="Calendar" description="Monthly Date Picker" height="300px" /> <!-- (Mockup Mode Only) -->
|
|
53
|
+
</CardContent>
|
|
54
|
+
</Card>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<!-- Right: Time Slots Grid -->
|
|
58
|
+
<Card>
|
|
59
|
+
<CardHeader>
|
|
60
|
+
<CardTitle>Available Times</CardTitle>
|
|
61
|
+
<CardDescription>October 24, 2023</CardDescription>
|
|
62
|
+
</CardHeader>
|
|
63
|
+
<CardContent>
|
|
64
|
+
<div className="grid grid-cols-2 gap-3">
|
|
65
|
+
<Button
|
|
66
|
+
v-for="time in ['09:00 AM', '09:30 AM', '10:00 AM', '11:30 AM', '01:00 PM', '02:30 PM']"
|
|
67
|
+
:key="time"
|
|
68
|
+
variant="outline"
|
|
69
|
+
className="w-full justify-center hover:bg-primary hover:text-primary-foreground hover:border-primary transition-colors text-sm"
|
|
70
|
+
>
|
|
71
|
+
{{ time }}
|
|
72
|
+
</Button>
|
|
73
|
+
|
|
74
|
+
<!-- Disabled State Example -->
|
|
75
|
+
<Button variant="outline" className="w-full justify-center text-muted-foreground opacity-50 cursor-not-allowed" disabled>
|
|
76
|
+
03:00 PM
|
|
77
|
+
</Button>
|
|
78
|
+
</div>
|
|
79
|
+
</CardContent>
|
|
80
|
+
<CardFooter className="pt-6 border-t mt-6">
|
|
81
|
+
<Button className="w-full" size="lg" disabled>Continue</Button>
|
|
82
|
+
</CardFooter>
|
|
83
|
+
</Card>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Anti-Patterns (DO NOT DO)
|
|
89
|
+
|
|
90
|
+
- ❌ **Do not build complex raw HTML `<table>` elements for responsive calendars**: They will break on mobile. Always use `ComponentPlaceholder` (Mockup Mode Only) for the monthly view calendar grid.
|
|
91
|
+
- ❌ **Do not use dropdowns (`<Select>`) for time slots**: Dropdowns hide availability. Use a visible grid of `<Button>` elements so the user sees all options at a glance (as shown in the example above).
|
|
92
|
+
- ❌ **Do not make the user guess the duration**: Always include a `Badge` indicating the duration (e.g., `variant="secondary"`, "30 min").
|
|
93
|
+
- ❌ **Do not overload the booking screen**: Do not include the payment form, personal details form, and time-picker on the same view. Use progressive disclosure.
|
|
94
|
+
|
|
95
|
+
## Design Notes
|
|
96
|
+
- **Selected State**: When a time slot is selected, shift the button to `variant="default"`.
|
|
97
|
+
- **Time Zones**: If building a remote-service booking UI, ensure a time zone selector (`<Select>`) is placed right above the time slots grid.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# App Type: Content Management
|
|
2
|
+
|
|
3
|
+
Blog editors, CMS dashboards, media libraries, and publishing workflows.
|
|
4
|
+
|
|
5
|
+
## Layout
|
|
6
|
+
Use `layouts/sidebar.md` with content types in nav (Posts, Pages, Media, Categories).
|
|
7
|
+
|
|
8
|
+
## Key Screens
|
|
9
|
+
1. **Content list** — Table with title, status (Draft/Published/Scheduled), author, date, actions
|
|
10
|
+
2. **Content editor** — Full-width editor area with toolbar, side panel for metadata
|
|
11
|
+
3. **Media library** — Card grid of thumbnails with file info
|
|
12
|
+
|
|
13
|
+
## Content List
|
|
14
|
+
Use `patterns/data-tables.md` with status badges:
|
|
15
|
+
- Published → `Badge variant="default"`
|
|
16
|
+
- Draft → `Badge variant="secondary"`
|
|
17
|
+
- Scheduled → `Badge variant="outline"`
|
|
18
|
+
|
|
19
|
+
## Editor Layout
|
|
20
|
+
```tsx
|
|
21
|
+
<div className="flex h-full">
|
|
22
|
+
<div className="flex-1 max-w-3xl mx-auto px-6 py-8">
|
|
23
|
+
<Input className="text-2xl font-bold border-0 px-0 focus-visible:ring-0 placeholder:text-muted-foreground"
|
|
24
|
+
placeholder="Post title..." defaultValue="title" />
|
|
25
|
+
<!-- In mockups: ComponentPlaceholder. In production: use a real editor -->
|
|
26
|
+
<ComponentPlaceholder name="RichTextEditor" description="Full WYSIWYG editor with formatting toolbar" height="500px" /> <!-- (Mockup Mode Only) -->
|
|
27
|
+
</div>
|
|
28
|
+
<aside className="w-72 border-l p-4 space-y-4 shrink-0">
|
|
29
|
+
<div className="space-y-2">
|
|
30
|
+
<Label>Status</Label>
|
|
31
|
+
<Select defaultValue="status">
|
|
32
|
+
<SelectTrigger><SelectValue /></SelectTrigger>
|
|
33
|
+
<SelectContent>
|
|
34
|
+
<SelectItem value="draft">Draft</SelectItem>
|
|
35
|
+
<SelectItem value="published">Published</SelectItem>
|
|
36
|
+
</SelectContent>
|
|
37
|
+
</Select>
|
|
38
|
+
</div>
|
|
39
|
+
<div className="space-y-2">
|
|
40
|
+
<Label>Category</Label>
|
|
41
|
+
<Select defaultValue="category">
|
|
42
|
+
<SelectTrigger><SelectValue placeholder="Select" /></SelectTrigger>
|
|
43
|
+
<SelectContent>
|
|
44
|
+
<SelectItem value="tech">Technology</SelectItem>
|
|
45
|
+
<SelectItem value="design">Design</SelectItem>
|
|
46
|
+
</SelectContent>
|
|
47
|
+
</Select>
|
|
48
|
+
</div>
|
|
49
|
+
<Button className="w-full">Publish</Button>
|
|
50
|
+
</aside>
|
|
51
|
+
</div>
|
|
52
|
+
```
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# App Type: CRM
|
|
2
|
+
|
|
3
|
+
Contact management, deal pipelines, and sales activity tracking.
|
|
4
|
+
|
|
5
|
+
## Layout
|
|
6
|
+
Use `layouts/sidebar.md`. Nav items: Dashboard, Contacts, Deals, Activities, Reports.
|
|
7
|
+
|
|
8
|
+
## Key Screens
|
|
9
|
+
|
|
10
|
+
### 1. Pipeline View (Kanban)
|
|
11
|
+
|
|
12
|
+
```tsx
|
|
13
|
+
<div className="flex gap-4 overflow-x-auto pb-4">
|
|
14
|
+
<div v-for="stage in stages" :key="stage.name" className="w-72 shrink-0 space-y-3">
|
|
15
|
+
<div className="flex items-center justify-between">
|
|
16
|
+
<h3 className="text-sm font-semibold">{{ stage.name }}</h3>
|
|
17
|
+
<Badge variant="secondary">{{ stage.deals.length }}</Badge>
|
|
18
|
+
</div>
|
|
19
|
+
<div className="space-y-2">
|
|
20
|
+
<Card v-for="deal in stage.deals" :key="deal.id"
|
|
21
|
+
className="cursor-pointer hover:bg-accent/50 transition-colors">
|
|
22
|
+
<CardContent className="p-3 space-y-2">
|
|
23
|
+
<p className="text-sm font-medium">{{ deal.company }}</p>
|
|
24
|
+
<div className="flex items-center justify-between">
|
|
25
|
+
<span className="text-sm font-bold">${{ deal.value.toLocaleString() }}</span>
|
|
26
|
+
<Badge variant="outline" className="text-xs">{{ deal.probability }}%</Badge>
|
|
27
|
+
</div>
|
|
28
|
+
<div className="flex items-center gap-2">
|
|
29
|
+
<div className="w-5 h-5 rounded-full bg-muted shrink-0" />
|
|
30
|
+
<span className="text-xs text-muted-foreground">{{ deal.owner }}</span>
|
|
31
|
+
</div>
|
|
32
|
+
</CardContent>
|
|
33
|
+
</Card>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Pipeline stages: Lead → Qualified → Proposal → Negotiation → Closed Won / Closed Lost.
|
|
40
|
+
|
|
41
|
+
### 2. Contact List
|
|
42
|
+
Standard data table (see `patterns/data-tables.md`) with columns:
|
|
43
|
+
- Name + company (avatar + name pattern)
|
|
44
|
+
- Email
|
|
45
|
+
- Phone
|
|
46
|
+
- Last contacted (relative time, `text-muted-foreground`)
|
|
47
|
+
- Deal value (right-aligned, `font-bold`)
|
|
48
|
+
- Actions (three-dot menu)
|
|
49
|
+
|
|
50
|
+
### 3. Contact Detail
|
|
51
|
+
- Profile header: Avatar + name + company + role
|
|
52
|
+
- Stats row: Total deal value, Open deals count, Last contact date
|
|
53
|
+
- Tabbed content: Activity timeline, Associated deals, Notes, Files
|
|
54
|
+
|
|
55
|
+
### 4. Activity Timeline
|
|
56
|
+
|
|
57
|
+
```tsx
|
|
58
|
+
<div className="space-y-4">
|
|
59
|
+
<div v-for="event in events" :key="event.id" className="flex gap-3">
|
|
60
|
+
<div className="flex flex-col items-center">
|
|
61
|
+
<div className="w-8 h-8 rounded-full bg-muted flex items-center justify-center shrink-0">
|
|
62
|
+
<component :is="event.icon" className="w-4 h-4 text-muted-foreground" />
|
|
63
|
+
</div>
|
|
64
|
+
<div className="w-px flex-1 bg-border" />
|
|
65
|
+
</div>
|
|
66
|
+
<div className="pb-4">
|
|
67
|
+
<p className="text-sm"><span className="font-medium">{{ event.user }}</span> {{ event.action }}</p>
|
|
68
|
+
<p className="text-xs text-muted-foreground">{{ event.time }}</p>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Use icons per type: `Phone` for calls, `Mail` for emails, `Calendar` for meetings, `FileText` for notes.
|
|
75
|
+
|
|
76
|
+
## Design Notes
|
|
77
|
+
- **Deal values**: Right-aligned in tables, `font-bold`, formatted as currency
|
|
78
|
+
- **Pipeline card colors**: Use `border-l-4` with different border colors per stage if desired (use token-based: `border-primary`, `border-warning`, `border-success`)
|
|
79
|
+
- **Quick actions**: Contact cards should have icon buttons for Call (`Phone`), Email (`Mail`), Schedule (`Calendar`)
|
|
80
|
+
- **Search**: Global search should cover contacts, deals, and activities
|