@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
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Visual: Transitions & Animations
|
|
2
|
+
|
|
3
|
+
Motion design for interactive elements.
|
|
4
|
+
|
|
5
|
+
## Standard Transitions
|
|
6
|
+
|
|
7
|
+
Apply these to all interactive elements:
|
|
8
|
+
|
|
9
|
+
```html
|
|
10
|
+
<!-- Color change on hover (buttons, links, list items) -->
|
|
11
|
+
className="transition-colors duration-150"
|
|
12
|
+
|
|
13
|
+
<!-- Shadow change on hover (cards) -->
|
|
14
|
+
className="transition-shadow duration-150"
|
|
15
|
+
|
|
16
|
+
<!-- Multi-property transitions -->
|
|
17
|
+
className="transition-all duration-200"
|
|
18
|
+
|
|
19
|
+
<!-- Opacity reveal (show-on-hover elements) -->
|
|
20
|
+
className="opacity-0 group-hover:opacity-100 transition-opacity"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Loading Spinner
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
<Loader2 className="w-4 h-4 animate-spin" />
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Always `animate-spin` on `Loader2` icon. Never use custom CSS animations for spinners.
|
|
30
|
+
|
|
31
|
+
## Hover Effects
|
|
32
|
+
|
|
33
|
+
| Element | Hover Class | Notes |
|
|
34
|
+
|---------|-------------|-------|
|
|
35
|
+
| Buttons | Built into DS components | No extra classes needed |
|
|
36
|
+
| Cards (clickable) | `hover:bg-accent/50 transition-colors` | Subtle background tint |
|
|
37
|
+
| List items | `hover:bg-accent transition-colors` | Slightly stronger than cards |
|
|
38
|
+
| Table rows | Built into `TableRow` | Hover effect is automatic |
|
|
39
|
+
| Icons/actions | `opacity-0 group-hover:opacity-100` | Reveal-on-hover pattern |
|
|
40
|
+
| Links | `hover:text-foreground transition-colors` | On `text-muted-foreground` elements |
|
|
41
|
+
|
|
42
|
+
## Animation Principles
|
|
43
|
+
|
|
44
|
+
1. **Subtle is better** — animations should be felt, not seen
|
|
45
|
+
2. **150ms for color** — fast enough to feel instant, slow enough to be smooth
|
|
46
|
+
3. **200ms for position/size** — slightly longer for spatial changes
|
|
47
|
+
4. **300ms for entrances** — dialogs, sheets, dropdowns
|
|
48
|
+
5. **No animation for data** — text, numbers, and status changes should be instant
|
|
49
|
+
|
|
50
|
+
## Button Press Effect
|
|
51
|
+
|
|
52
|
+
For a subtle "pressed" feeling:
|
|
53
|
+
```html
|
|
54
|
+
className="active:scale-[0.98] transition-transform"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Staggered Animations
|
|
58
|
+
|
|
59
|
+
For list items appearing on load, use CSS animation delays:
|
|
60
|
+
```html
|
|
61
|
+
<div v-for="(item, i) in items" :key="item.id"
|
|
62
|
+
className="animate-in fade-in slide-in-from-bottom-2"
|
|
63
|
+
:style="{ animationDelay: `${i * 50}ms` }">
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Only use staggered animations for initial page load, not for content that's already visible.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Visual: Typography Hierarchy
|
|
2
|
+
|
|
3
|
+
How to use type scale to create clear information architecture.
|
|
4
|
+
|
|
5
|
+
## The Hierarchy Stack
|
|
6
|
+
|
|
7
|
+
Every page should have a clear top-to-bottom reading Order:
|
|
8
|
+
|
|
9
|
+
| Level | Classes | Use | Example |
|
|
10
|
+
|-------|---------|-----|---------|
|
|
11
|
+
| **1. Page Title** | `text-2xl font-bold` | One per page, topmost heading | "Dashboard", "Team Members" |
|
|
12
|
+
| **2. Page Subtitle** | `text-muted-foreground` (default size or `text-sm`) | Directly below page title | "Overview of your workspace." |
|
|
13
|
+
| **3. Section Heading** | `text-lg font-semibold` | Separates major content areas | "Recent Activity", "Settings" |
|
|
14
|
+
| **4. Card Title** | Varies by `CardTitle` context | Inside cards/panels | "Total Revenue", "Profile" |
|
|
15
|
+
| **5. Body Text** | `text-sm` | Standard content | Table cells, descriptions |
|
|
16
|
+
| **6. Label** | `text-sm font-medium` | Form labels, nav items | "Email", "Projects" |
|
|
17
|
+
| **7. Caption / Meta** | `text-xs text-muted-foreground` | Timestamps, counts, helper text | "Updated 2 hours ago" |
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
1. **One `text-2xl font-bold` per page** — the page title. Never two.
|
|
22
|
+
2. **`text-sm` is the default body size** — not `text-base`. This keeps the UI compact and professional.
|
|
23
|
+
3. **Font weights serve meaning**:
|
|
24
|
+
- `font-bold` (700): Page titles, large stat values
|
|
25
|
+
- `font-semibold` (600): Section headings, card titles
|
|
26
|
+
- `font-medium` (500): Labels, nav items, emphasized body text
|
|
27
|
+
- Default (400): Body text, descriptions
|
|
28
|
+
4. **Color creates hierarchy too**: `text-foreground` for primary text, `text-muted-foreground` for secondary
|
|
29
|
+
|
|
30
|
+
## Common Patterns
|
|
31
|
+
|
|
32
|
+
### Page Header
|
|
33
|
+
```tsx
|
|
34
|
+
<div>
|
|
35
|
+
<h1 className="text-2xl font-bold">Projects</h1>
|
|
36
|
+
<p className="text-muted-foreground">Manage and track all your projects.</p>
|
|
37
|
+
</div>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Section with Content
|
|
41
|
+
```tsx
|
|
42
|
+
<div className="space-y-4">
|
|
43
|
+
<h2 className="text-lg font-semibold">Recent Activity</h2>
|
|
44
|
+
<!-- content -->
|
|
45
|
+
</div>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Stat Display
|
|
49
|
+
```tsx
|
|
50
|
+
<div className="text-2xl font-bold">$45,231</div>
|
|
51
|
+
<p className="text-xs text-muted-foreground">+20.1% from last month</p>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Anti-Patterns
|
|
55
|
+
|
|
56
|
+
```html
|
|
57
|
+
<!-- ❌ Too many heading sizes — confusing hierarchy -->
|
|
58
|
+
<h1 className="text-3xl">Page</h1>
|
|
59
|
+
<h2 className="text-2xl">Section</h2>
|
|
60
|
+
<h3 className="text-xl">Subsection</h3>
|
|
61
|
+
<h4 className="text-lg">Sub-subsection</h4>
|
|
62
|
+
|
|
63
|
+
<!-- ✅ Clean two-level hierarchy -->
|
|
64
|
+
<h1 className="text-2xl font-bold">Page</h1>
|
|
65
|
+
<h2 className="text-lg font-semibold">Section</h2>
|
|
66
|
+
```
|
package/DESIGN_GUIDE.md
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
# Reinvented Design Guide
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
The Reinvented design system uses **Shadcn-vue** components with custom **Radix-vue** primitives,
|
|
5
|
-
**Tailwind CSS** for styling, and **Lucide** icons. All UI surfaces share this consistent foundation.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Typography
|
|
10
|
-
|
|
11
|
-
| Token | Size | Weight | Use |
|
|
12
|
-
|---------------|--------|----------|------------------------|
|
|
13
|
-
| `text-xs` | 12px | 400 | Timestamps, captions |
|
|
14
|
-
| `text-sm` | 14px | 400–500 | Body text, labels |
|
|
15
|
-
| `text-base` | 16px | 400 | Default body |
|
|
16
|
-
| `text-lg` | 18px | 600 | Section headings |
|
|
17
|
-
| `text-xl` | 20px | 600 | Page subtitles |
|
|
18
|
-
| `text-2xl` | 24px | 700 | Page titles |
|
|
19
|
-
| `text-3xl` | 30px | 700 | Hero text |
|
|
20
|
-
|
|
21
|
-
**Font:** Inter (loaded via Google Fonts).
|
|
22
|
-
**Line height:** Use `leading-tight` (1.25) for headings, `leading-normal` (1.5) for body.
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## Colors
|
|
27
|
-
|
|
28
|
-
Our brand color is **purple** (`hsl(252 100% 63%)`).
|
|
29
|
-
|
|
30
|
-
| Token | Light | Dark | Use |
|
|
31
|
-
|-----------------|-------------------|-------------------|------------------------|
|
|
32
|
-
| `primary` | Purple 63% | Purple 69% | Buttons, links, focus |
|
|
33
|
-
| `secondary` | Zinc 96% | Zinc 16% | Secondary actions |
|
|
34
|
-
| `muted` | Zinc 96% | Zinc 16% | Backgrounds, disabled |
|
|
35
|
-
| `destructive` | Red 60% | Red 31% | Delete, errors |
|
|
36
|
-
| `success` | Green 36% | Green 45% | Confirmations |
|
|
37
|
-
| `warning` | Amber 50% | Amber 55% | Alerts |
|
|
38
|
-
| `info` | Blue 60% | Blue 65% | Information |
|
|
39
|
-
|
|
40
|
-
**Usage rules:**
|
|
41
|
-
- Never hardcode colors — always use `hsl(var(--token))`
|
|
42
|
-
- Use `text-muted-foreground` for secondary text (not arbitrary gray)
|
|
43
|
-
- Apply `bg-card` for card surfaces, `bg-background` for page backgrounds
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Spacing
|
|
48
|
-
|
|
49
|
-
Based on **4px increments**. Use Tailwind utilities:
|
|
50
|
-
|
|
51
|
-
| Class | Value | Use |
|
|
52
|
-
|----------|-------|----------------------------|
|
|
53
|
-
| `gap-1` | 4px | Icon-to-text gap |
|
|
54
|
-
| `gap-2` | 8px | Between small elements |
|
|
55
|
-
| `gap-3` | 12px | Between form fields |
|
|
56
|
-
| `gap-4` | 16px | Section spacing |
|
|
57
|
-
| `gap-6` | 24px | Between major sections |
|
|
58
|
-
| `p-4` | 16px | Standard padding |
|
|
59
|
-
| `p-6` | 24px | Card padding |
|
|
60
|
-
| `px-4` | 16px | Page horizontal padding |
|
|
61
|
-
|
|
62
|
-
**Rules:**
|
|
63
|
-
- Always use spacing tokens, never arbitrary values
|
|
64
|
-
- Vertical rhythm: Use `gap-4` or `gap-6` for stacking sections
|
|
65
|
-
- Horizontal rhythm: Use `gap-2` or `gap-3` for inline elements
|
|
66
|
-
|
|
67
|
-
---
|
|
68
|
-
|
|
69
|
-
## Icons
|
|
70
|
-
|
|
71
|
-
- **Library:** Lucide Vue Next (`lucide-vue-next`)
|
|
72
|
-
- **NO emojis** anywhere in the UI
|
|
73
|
-
- Default icon size: `16px` (`w-4 h-4`)
|
|
74
|
-
- In buttons/nav: `w-4 h-4`
|
|
75
|
-
- In empty states: `w-12 h-12` with `text-muted-foreground`
|
|
76
|
-
- Always use `stroke-width="2"` (Lucide default)
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## Shadows & Borders
|
|
81
|
-
|
|
82
|
-
| Token | CSS | Use |
|
|
83
|
-
|-------------|-------------------------------|----------------------------|
|
|
84
|
-
| `shadow-sm` | Subtle 1px shadow | Cards, buttons |
|
|
85
|
-
| `shadow-md` | Medium depth | Dropdowns, popovers |
|
|
86
|
-
| `shadow-lg` | Strong depth | Modals, dialogs |
|
|
87
|
-
| `rounded-md`| `calc(var(--radius) - 2px)` | Inputs, small elements |
|
|
88
|
-
| `rounded-lg`| `var(--radius)` (10px) | Cards, containers |
|
|
89
|
-
|
|
90
|
-
---
|
|
91
|
-
|
|
92
|
-
## Component Guidelines
|
|
93
|
-
|
|
94
|
-
### When to use existing components
|
|
95
|
-
Always check `@reinvented/design` first:
|
|
96
|
-
```ts
|
|
97
|
-
import { Button, Card, Input, Avatar, Badge } from '@reinvented/design'
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
### Using Radix primitives
|
|
101
|
-
For Dialog, DropdownMenu, Tabs, Tooltip, PopoverSelect, etc.:
|
|
102
|
-
```ts
|
|
103
|
-
import { Dialog, DialogTrigger, DialogContent, DialogTitle } from '@reinvented/design'
|
|
104
|
-
```
|
|
105
|
-
Style them using `cn()` and Tailwind:
|
|
106
|
-
```vue
|
|
107
|
-
<DialogContent :class="cn('fixed inset-0 z-50 flex items-center justify-center')">
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### Building new components
|
|
111
|
-
1. Create in `packages/ds/src/components/ui/<name>/`
|
|
112
|
-
2. Use `cn()` for class merging
|
|
113
|
-
3. Accept `class` prop for customization
|
|
114
|
-
4. Use design tokens (never hardcode colors)
|
|
115
|
-
5. Export from barrel (`src/index.ts`)
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
## Page Patterns
|
|
120
|
-
|
|
121
|
-
Import from `@reinvented/design/patterns/*`:
|
|
122
|
-
|
|
123
|
-
| Pattern | Use |
|
|
124
|
-
|--------------|----------------------------------------------|
|
|
125
|
-
| `ListView` | Lists with search, filters, items |
|
|
126
|
-
| `DetailView` | Detail pages with hero, tabs, content |
|
|
127
|
-
| `FormView` | Forms with validation and submit |
|
|
128
|
-
| `EmptyState` | Centered empty state with icon and CTA |
|
|
129
|
-
|
|
130
|
-
---
|
|
131
|
-
|
|
132
|
-
## Dark Mode
|
|
133
|
-
|
|
134
|
-
- Controlled via `.dark` class on `<html>` or `<body>`
|
|
135
|
-
- All tokens automatically switch in dark mode
|
|
136
|
-
- Test both modes when building surfaces
|
|
137
|
-
- Use `dark:` prefix sparingly — prefer CSS variable-driven theming
|
|
138
|
-
|
|
139
|
-
---
|
|
140
|
-
|
|
141
|
-
## Do NOT
|
|
142
|
-
|
|
143
|
-
- Use `alert()`, `confirm()`, or `prompt()` — use Dialog/AlertDialog
|
|
144
|
-
- Use emojis — use Lucide icons
|
|
145
|
-
- Hardcode colors — use CSS variables
|
|
146
|
-
- Use arbitrary Tailwind values (e.g., `text-[#333]`) — use tokens
|
|
147
|
-
- Create split-screen layouts — use single-column responsive design
|
|
148
|
-
- Use `@apply` excessively — prefer utility classes in templates
|