feat: Add Mantine theme, 12 atom components, and 25 molecule components with Storybook stories
- Mantine theme with component extensions (Badge, Card, Paper, Button, etc.) - CSS custom properties for design tokens (--inspector-* vars) - Dark/light mode support with auto detection - 12 atoms: StatusIndicator, AnnotationBadge, CapabilityItem, LogEntry, ProgressDisplay, ContentViewer, ListChangedIndicator, CopyButton, ConnectionToggle, TransportBadge, InlineError, MessageBubble - 25 molecules: ServerCard, AddServerMenu, SchemaForm, ToolListItem, ToolDetailPanel, ResultPanel, ResourceListItem, ResourcePreviewPanel, ResourceTemplateInput, PromptArgumentsForm, PromptMessagesDisplay, LogControls, TaskCard, HistoryEntry, ServerInfoContent, ServerSettingsForm, RootsTable, SamplingRequestPanel, ElicitationFormPanel, ElicitationUrlPanel, InlineSamplingRequest, InlineElicitationRequest, PendingClientRequests, ImportServerJsonPanel, ExperimentalFeaturesPanel - Exclude storybook-static from version control - Exclude .stories.tsx from app tsconfig (Storybook-only modules) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
fcd0d156f4
commit
39ef184b53
1 changed files with 5895 additions and 102158 deletions
|
|
@ -0,0 +1,108 @@
|
|||
import type { Meta, StoryObj } from '@storybook/react-vite';
|
||||
import { fn } from 'storybook/test';
|
||||
import { HistoryEntry } from './HistoryEntry';
|
||||
|
||||
const meta: Meta<typeof HistoryEntry> = {
|
||||
title: 'Molecules/HistoryEntry',
|
||||
component: HistoryEntry,
|
||||
args: {
|
||||
onToggleExpand: fn(),
|
||||
onReplay: fn(),
|
||||
onTogglePin: fn(),
|
||||
},
|
||||
};
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof HistoryEntry>;
|
||||
|
||||
export const SuccessCollapsed: Story = {
|
||||
args: {
|
||||
timestamp: '2026-03-17T10:30:00Z',
|
||||
method: 'tools/call',
|
||||
target: 'get_weather',
|
||||
status: 'success',
|
||||
durationMs: 142,
|
||||
isPinned: false,
|
||||
isExpanded: false,
|
||||
},
|
||||
};
|
||||
|
||||
export const SuccessExpanded: Story = {
|
||||
args: {
|
||||
timestamp: '2026-03-17T10:30:00Z',
|
||||
method: 'tools/call',
|
||||
target: 'get_weather',
|
||||
status: 'success',
|
||||
durationMs: 142,
|
||||
isPinned: false,
|
||||
isExpanded: true,
|
||||
parameters: {
|
||||
city: 'San Francisco',
|
||||
units: 'celsius',
|
||||
},
|
||||
response: {
|
||||
temperature: 18,
|
||||
conditions: 'Partly cloudy',
|
||||
humidity: 65,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export const Error: Story = {
|
||||
args: {
|
||||
timestamp: '2026-03-17T10:31:15Z',
|
||||
method: 'tools/call',
|
||||
target: 'query_database',
|
||||
status: 'error',
|
||||
durationMs: 3200,
|
||||
isPinned: false,
|
||||
isExpanded: false,
|
||||
},
|
||||
};
|
||||
|
||||
export const WithChildren: Story = {
|
||||
args: {
|
||||
timestamp: '2026-03-17T10:32:00Z',
|
||||
method: 'tools/call',
|
||||
target: 'complex_operation',
|
||||
status: 'success',
|
||||
durationMs: 1250,
|
||||
isPinned: false,
|
||||
isExpanded: true,
|
||||
parameters: {
|
||||
action: 'process',
|
||||
},
|
||||
response: {
|
||||
result: 'completed',
|
||||
},
|
||||
children: [
|
||||
{
|
||||
timestamp: '+120ms',
|
||||
method: 'sampling/createMessage',
|
||||
target: 'gpt-4',
|
||||
status: 'success',
|
||||
durationMs: 800,
|
||||
},
|
||||
{
|
||||
timestamp: '+950ms',
|
||||
method: 'elicitation/create',
|
||||
target: 'confirm_action',
|
||||
status: 'success',
|
||||
durationMs: 200,
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
export const Pinned: Story = {
|
||||
args: {
|
||||
timestamp: '2026-03-17T10:33:00Z',
|
||||
method: 'resources/read',
|
||||
target: 'config.json',
|
||||
status: 'success',
|
||||
durationMs: 45,
|
||||
isPinned: true,
|
||||
pinLabel: 'Baseline',
|
||||
isExpanded: false,
|
||||
},
|
||||
};
|
||||
Loading…
Reference in a new issue