mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-05-01 01:05:00 +00:00
86 lines
1.8 KiB
JSON
86 lines
1.8 KiB
JSON
{
|
|
"$schema": "https://metabuilder.dev/schemas/package-storybook.schema.json",
|
|
"featured": true,
|
|
"title": "Dashboard Components",
|
|
"description": "Dashboard layouts and stat cards",
|
|
"stories": [
|
|
{
|
|
"name": "StatsCard",
|
|
"render": "stats",
|
|
"description": "Single stat card with trend indicator",
|
|
"args": {
|
|
"label": "Total Users",
|
|
"value": "1,234",
|
|
"icon": "People",
|
|
"trend": {
|
|
"direction": "up",
|
|
"percentage": 12.5
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "DashboardLayout",
|
|
"render": "layout",
|
|
"description": "Complete dashboard with multiple widgets",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"renders": {
|
|
"stats": {
|
|
"description": "Single stat card with trend indicator",
|
|
"featured": true
|
|
},
|
|
"layout": {
|
|
"description": "Full dashboard layout with widgets"
|
|
}
|
|
},
|
|
"defaultContext": {
|
|
"user": {
|
|
"id": "demo-user",
|
|
"username": "demo_user",
|
|
"level": 2,
|
|
"email": "demo@example.com"
|
|
},
|
|
"tenant": {
|
|
"id": "demo-tenant",
|
|
"name": "Demo Organization"
|
|
}
|
|
},
|
|
"contextVariants": [
|
|
{
|
|
"name": "Standard User",
|
|
"description": "Can view dashboard",
|
|
"context": {
|
|
"user": {
|
|
"username": "user",
|
|
"level": 2
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Admin",
|
|
"description": "Can view and configure dashboard",
|
|
"context": {
|
|
"user": {
|
|
"username": "admin",
|
|
"level": 3
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"scripts": {
|
|
"renderFunctions": ["stats", "layout"],
|
|
"ignoredScripts": ["tests"]
|
|
},
|
|
"parameters": {
|
|
"layout": "padded",
|
|
"backgrounds": {
|
|
"default": "light",
|
|
"values": [
|
|
{ "name": "light", "value": "#f5f5f5" },
|
|
{ "name": "dark", "value": "#1a1a1a" }
|
|
]
|
|
}
|
|
}
|
|
}
|