build(storybook): migrate from @repo/ui to @repo/core-ui

This commit is contained in:
2026-05-05 09:11:23 +02:00
parent a7d37d8a0f
commit 346e77ed0c
3 changed files with 11 additions and 11 deletions

View File

@@ -2,7 +2,7 @@
## Purpose
Centralized Storybook instance that pulls and renders all stories from `packages/ui`. Provides a visual development environment, component documentation, and MCP integration for AI agents.
Centralized Storybook instance that pulls and renders all stories from `packages/core-ui`. Provides a visual development environment, component documentation, and MCP integration for AI agents.
## Port: 6006
@@ -19,7 +19,7 @@ import type { StorybookConfig } from "@storybook/react-vite";
const config: StorybookConfig = {
framework: "@storybook/react-vite",
stories: ["../../../packages/ui/src/**/*.stories.@(ts|tsx)"],
stories: ["../../../packages/core-ui/src/**/*.stories.@(ts|tsx)"],
addons: ["@storybook/addon-essentials"],
docs: {
autodocs: "tag",
@@ -36,7 +36,7 @@ const config: StorybookConfig = {
```
Key configuration details:
- **`stories`** glob reaches into `packages/ui/src/` to find all `.stories.tsx` files
- **`stories`** glob reaches into `packages/core-ui/src/` to find all `.stories.tsx` files
- **`viteFinal`** adds the `@tailwindcss/vite` plugin so Tailwind v4 classes render correctly in stories
- **`autodocs: "tag"`** generates documentation pages for stories tagged with `"autodocs"`
- **`@storybook/addon-essentials`** includes Controls, Actions, Backgrounds, Viewport, Docs
@@ -45,7 +45,7 @@ Key configuration details:
```typescript
import type { Preview } from "@storybook/react";
import "../../../packages/ui/src/styles/globals.css";
import "../../../packages/core-ui/src/styles/globals.css";
const preview: Preview = {
parameters: {
@@ -78,7 +78,7 @@ Stories are organized by Atomic Design level via the `title` field in story meta
### Existing Stories
| Story title | Component | Location in `@repo/ui` |
| Story title | Component | Location in `@repo/core-ui` |
|---|---|---|
| `Atoms/Button` | Button (5 variants: Default, Secondary, Destructive, Outline, Ghost) | `src/atoms/button/button.stories.tsx` |
| `Atoms/Input` | Input (Default, Disabled) | `src/atoms/input/input.stories.tsx` |
@@ -120,7 +120,7 @@ Always query MCP before creating new UI components:
| Dependency | Purpose |
|---|---|
| `@repo/ui` | Source of all component stories |
| `@repo/core-ui` | Source of all component stories |
| `@storybook/react-vite` | Storybook framework using Vite bundler |
| `@storybook/addon-essentials` | Controls, Actions, Docs, Backgrounds, Viewport |
| `@tailwindcss/vite` | Vite plugin for Tailwind CSS v4 |
@@ -131,5 +131,5 @@ Always query MCP before creating new UI components:
## Cross-References
- **Component source:** `packages/ui/` -- see `packages/ui/AGENTS.md`
- **Tailwind tokens:** `packages/ui/src/styles/globals.css`
- **Component source:** `packages/core-ui/` -- see `packages/core-ui/AGENTS.md`
- **Tailwind tokens:** `packages/core-ui/src/styles/globals.css`