# @shiftdesignsystem@shiftdesignsystem/design-system

The toolbox design system. **A package, not a folder.** Owns tokens, primitives, motion vocabulary, theme, icons, and patterns. Consumed by every app in this monorepo and (eventually) by external projects.

**Status: scaffolded, empty.** Content migration is Stage 3.

## Public API (planned)

| Subpath | Contents |
|---|---|
| `@shiftdesignsystem/design-system` | Top-level barrel — common exports |
| `@shiftdesignsystem/design-system/tokens` | TS token exports + generated CSS imports |
| `@shiftdesignsystem/design-system/primitives` | Button, Input, Dialog, … (~40 primitives) |
| `@shiftdesignsystem/design-system/motion` | Variants, transitions, hooks, motion primitives |
| `@shiftdesignsystem/design-system/theme` | ThemeProvider, useTheme, dark mode |
| `@shiftdesignsystem/design-system/icons` | Lucide wrapper + custom SVGs |
| `@shiftdesignsystem/design-system/patterns` | Compound patterns (data-table, filters-panel, …) |
| `@shiftdesignsystem/design-system/styles/keyframes.css` | Centralized `@keyframes` |
| `@shiftdesignsystem/design-system/styles/tokens/*` | Generated CSS primitives |

Anything not in `package.json#exports` is internal. Don't import from deep paths.

## Future structure

```
src/
├── index.ts
├── tokens/
│   ├── source/        JSON tokens (moved from /design-tokens/)
│   ├── generated/     CSS primitives (moved from /src/app/*-primitives.css)
│   ├── tokens.ts
│   └── index.ts
├── primitives/        One folder per primitive (button/, input/, dialog/, …)
├── patterns/
├── motion/            primitives/, variants/, transitions/, hooks/, keyframes.css
├── theme/
└── icons/
scripts/               Token generation scripts
```

## Dependency rule

Design-system may only import from `@toolbox/shared` and `tooling/*`. **It MUST NOT import from any app or any platform package.** This is what makes it extractable to a separate repo later.

## Rule for agents

Before adding a component here, ask: does it depend on a domain concept (vehicles, campaigns, dealerships)? If yes, it belongs in `@toolbox/workspace/features/<domain>/`, not here. The design system is domain-agnostic.

shadcn `components.json` in each app will target this package's `primitives/` folder so `npx shadcn add <component>` lands new primitives here.
