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,68 @@
|
|||
import type { Meta, StoryObj } from '@storybook/react-vite'
|
||||
import { fn } from 'storybook/test'
|
||||
import { ResourcePreviewPanel } from './ResourcePreviewPanel'
|
||||
|
||||
const meta: Meta<typeof ResourcePreviewPanel> = {
|
||||
title: 'Molecules/ResourcePreviewPanel',
|
||||
component: ResourcePreviewPanel,
|
||||
args: {
|
||||
onCopy: fn(),
|
||||
onSubscribe: fn(),
|
||||
onUnsubscribe: fn(),
|
||||
},
|
||||
}
|
||||
|
||||
export default meta
|
||||
type Story = StoryObj<typeof ResourcePreviewPanel>
|
||||
|
||||
export const JsonResource: Story = {
|
||||
args: {
|
||||
uri: 'file:///config.json',
|
||||
mimeType: 'application/json',
|
||||
content: JSON.stringify({ name: 'mcp-inspector', version: '2.0.0', debug: true }, null, 2),
|
||||
isSubscribed: false,
|
||||
lastUpdated: '2026-03-17T10:30:00Z',
|
||||
},
|
||||
}
|
||||
|
||||
export const TextResource: Story = {
|
||||
args: {
|
||||
uri: 'file:///readme.txt',
|
||||
mimeType: 'text/plain',
|
||||
content: 'This is a plain text resource with some example content.\nLine two of the content.',
|
||||
isSubscribed: false,
|
||||
},
|
||||
}
|
||||
|
||||
export const Subscribed: Story = {
|
||||
args: {
|
||||
uri: 'file:///data.json',
|
||||
mimeType: 'application/json',
|
||||
content: JSON.stringify({ status: 'active' }, null, 2),
|
||||
isSubscribed: true,
|
||||
lastUpdated: '2026-03-17T12:00:00Z',
|
||||
},
|
||||
}
|
||||
|
||||
export const NotSubscribed: Story = {
|
||||
args: {
|
||||
uri: 'file:///data.json',
|
||||
mimeType: 'application/json',
|
||||
content: JSON.stringify({ status: 'active' }, null, 2),
|
||||
isSubscribed: false,
|
||||
},
|
||||
}
|
||||
|
||||
export const WithAnnotations: Story = {
|
||||
args: {
|
||||
uri: 'file:///settings.json',
|
||||
mimeType: 'application/json',
|
||||
content: JSON.stringify({ theme: 'dark', lang: 'en' }, null, 2),
|
||||
isSubscribed: false,
|
||||
annotations: {
|
||||
audience: 'application',
|
||||
priority: 0.8,
|
||||
},
|
||||
lastUpdated: '2026-03-17T09:00:00Z',
|
||||
},
|
||||
}
|
||||
Loading…
Reference in a new issue