@reinvented/design 0.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 ADDED
@@ -0,0 +1,179 @@
1
+ # @reinvented/design
2
+
3
+ Opinionated design system for the Reinvented platform. Built on **Shadcn/ui + Radix + Tailwind CSS** with a **Linear-inspired** dark-first premium aesthetic.
4
+
5
+ ## Design Principles
6
+
7
+ - **Dark-first** — Nearly-black backgrounds (`#0a0a0b`) with subtle surface elevation, not obvious cards
8
+ - **Restrained palette** — Mostly grays with one accent color (violet-blue `#5b6af0`), used sparingly on interactive elements
9
+ - **Muted borders** — No heavy shadows in dark mode; borders at 4–16% white opacity
10
+ - **Tight typography** — Inter font, compact scale (11px–36px), 4 main text styles
11
+ - **Smooth animations** — Subtle fade-in, slide-up, scale-in transitions (200ms default)
12
+ - **Consistency-first** — Composition components with locked styling prevent visual drift
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ pnpm add @reinvented/design
18
+ ```
19
+
20
+ Import CSS in your app entry:
21
+
22
+ ```tsx
23
+ import "@reinvented/design/css";
24
+ ```
25
+
26
+ ## Usage
27
+
28
+ ### Primitives (flexible, accept className)
29
+
30
+ ```tsx
31
+ import { Button, Input, Card, Badge, Dialog } from "@reinvented/design";
32
+
33
+ <Button variant="primary" size="md">Save</Button>
34
+ <Button variant="ghost" size="sm">Cancel</Button>
35
+ <Input label="Email" placeholder="you@example.com" error="Required" />
36
+ <Badge variant="success">Active</Badge>
37
+ ```
38
+
39
+ ### Composition Components (locked, no className)
40
+
41
+ These are the **recommended API** — use them for guaranteed visual consistency:
42
+
43
+ ```tsx
44
+ import { ContentCard, PageHeader, ListItem, FormSection, ActionBar, EmptyState } from "@reinvented/design";
45
+
46
+ <PageHeader title="Settings" description="Manage your account" actions={<Button>Save</Button>} />
47
+
48
+ <ContentCard title="Profile" description="Your personal information">
49
+ <Input label="Name" />
50
+ </ContentCard>
51
+
52
+ <ListItem
53
+ leading={<UserIcon size={16} />}
54
+ title="John Doe"
55
+ description="john@example.com"
56
+ trailing={<Badge>Admin</Badge>}
57
+ onClick={() => navigate("/users/1")}
58
+ />
59
+
60
+ <EmptyState
61
+ icon={<InboxIcon size={32} />}
62
+ title="No items yet"
63
+ description="Create your first item to get started"
64
+ action={<Button>Create</Button>}
65
+ />
66
+ ```
67
+
68
+ ### Layout
69
+
70
+ ```tsx
71
+ import { AppShell, TopBar, SideRail, SideRailItem, PageContainer } from "@reinvented/design";
72
+
73
+ <AppShell
74
+ topBar={<TopBar brand={<Logo />} actions={<Avatar />} />}
75
+ sideRail={
76
+ <SideRail>
77
+ <SideRailItem active tooltip="Home"><HomeIcon size={18} /></SideRailItem>
78
+ <SideRailItem tooltip="Settings"><SettingsIcon size={18} /></SideRailItem>
79
+ </SideRail>
80
+ }
81
+ >
82
+ <PageContainer>
83
+ {/* Page content */}
84
+ </PageContainer>
85
+ </AppShell>
86
+ ```
87
+
88
+ ### Icons
89
+
90
+ ```tsx
91
+ import { DynamicIcon, Settings, ChevronRight } from "@reinvented/design";
92
+
93
+ // Static icon
94
+ <Settings size={16} />
95
+
96
+ // Dynamic icon by name string (for app manager)
97
+ <DynamicIcon name="Settings" size={16} />
98
+ ```
99
+
100
+ ### Hooks
101
+
102
+ ```tsx
103
+ import { useTheme, useMediaQuery } from "@reinvented/design";
104
+
105
+ const { theme, toggleTheme, isDark } = useTheme();
106
+ const isMobile = useMediaQuery("(max-width: 768px)");
107
+ ```
108
+
109
+ ### Utilities
110
+
111
+ ```tsx
112
+ import { cn } from "@reinvented/design";
113
+
114
+ <div className={cn("text-fg-primary", isActive && "text-accent")} />
115
+ ```
116
+
117
+ ### Command Palette
118
+
119
+ ```tsx
120
+ import { CommandPalette, CommandGroup, CommandItem, CommandEmpty } from "@reinvented/design";
121
+
122
+ <CommandPalette placeholder="Search or jump to…">
123
+ <CommandEmpty>No results found.</CommandEmpty>
124
+ <CommandGroup heading="Actions">
125
+ <CommandItem onSelect={() => navigate("/settings")}>Settings</CommandItem>
126
+ </CommandGroup>
127
+ </CommandPalette>
128
+ // Opens with Cmd+K / Ctrl+K
129
+ ```
130
+
131
+ ## Token Reference
132
+
133
+ | Token | Dark Value | Purpose |
134
+ |-------|-----------|---------|
135
+ | `--bg-base` | `#0a0a0b` | App background |
136
+ | `--bg-surface` | `#111113` | Cards, panels |
137
+ | `--bg-elevated` | `#191a1f` | Dropdowns, popovers |
138
+ | `--fg-primary` | `#ededef` | Primary text |
139
+ | `--fg-secondary` | `#a1a1a6` | Secondary text |
140
+ | `--fg-muted` | `#6e6e76` | Placeholder, hints |
141
+ | `--accent` | `#5b6af0` | Interactive elements |
142
+ | `--border-default` | `rgba(255,255,255,0.08)` | Standard borders |
143
+
144
+ ## Component Catalog
145
+
146
+ ### Primitives
147
+ Button, Input, Badge, Avatar, Card, Label, Dialog, DropdownMenu, Toast, Separator, ScrollArea, Select, Switch, Checkbox, Tabs, Tooltip, Skeleton, Sheet
148
+
149
+ ### Composition (locked)
150
+ ContentCard, PageHeader, ListItem, FormSection, ActionBar, EmptyState
151
+
152
+ ### Layout
153
+ AppShell, TopBar, SideRail, BottomBar, PageContainer
154
+
155
+ ### Feedback & Overlays
156
+ Spinner, ErrorBoundary, CommandPalette
157
+
158
+ ## Tailwind Config
159
+
160
+ Consuming apps should extend the design system's Tailwind config:
161
+
162
+ ```ts
163
+ // tailwind.config.ts in your app
164
+ import designConfig from "@reinvented/design/tailwind";
165
+
166
+ export default {
167
+ presets: [designConfig],
168
+ content: [
169
+ "./src/**/*.{ts,tsx}",
170
+ "../../packages/design/src/**/*.{ts,tsx}",
171
+ ],
172
+ };
173
+ ```
174
+
175
+ ## Adding New Components
176
+
177
+ 1. Create the component in `src/components/`
178
+ 2. Export it from `src/index.ts`
179
+ 3. Run `pnpm build` to verify