@uibot/registry 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -9
- package/dist/shadcn/r/admin-dashboard.json +70 -0
- package/dist/shadcn/r/admin-shell.json +148 -0
- package/dist/shadcn/r/ai-chat.json +74 -0
- package/dist/shadcn/r/analytics-dashboard.json +65 -0
- package/dist/shadcn/r/app-shell-floating.json +54 -0
- package/dist/shadcn/r/app-shell-icon-rail.json +54 -0
- package/dist/shadcn/r/app-shell-inset.json +54 -0
- package/dist/shadcn/r/app-shell-settings.json +54 -0
- package/dist/shadcn/r/app-shell-sidebar.json +54 -0
- package/dist/shadcn/r/app-shell-workspace.json +54 -0
- package/dist/shadcn/r/auth.json +61 -0
- package/dist/shadcn/r/blog.json +64 -0
- package/dist/shadcn/r/charts.json +211 -0
- package/dist/shadcn/r/content.json +444 -0
- package/dist/shadcn/r/creation-html-generation.json +29 -0
- package/dist/shadcn/r/creation-reference-generation.json +29 -0
- package/dist/shadcn/r/creation-revision-export.json +27 -0
- package/dist/shadcn/r/creation-shared.json +24 -0
- package/dist/shadcn/r/creation-workspace.json +33 -0
- package/dist/shadcn/r/crm.json +67 -0
- package/dist/shadcn/r/dashboard.json +147 -0
- package/dist/shadcn/r/data-studio.json +368 -0
- package/dist/shadcn/r/data-table.json +224 -0
- package/dist/shadcn/r/data.json +320 -0
- package/dist/shadcn/r/ecommerce.json +65 -0
- package/dist/shadcn/r/feedback.json +300 -0
- package/dist/shadcn/r/field.json +164 -0
- package/dist/shadcn/r/form.json +425 -0
- package/dist/shadcn/r/grid.json +188 -0
- package/dist/shadcn/r/interactive.json +355 -0
- package/dist/shadcn/r/kanban.json +154 -0
- package/dist/shadcn/r/layout.json +529 -0
- package/dist/shadcn/r/lms.json +74 -0
- package/dist/shadcn/r/marketing.json +402 -0
- package/dist/shadcn/r/nav.json +257 -0
- package/dist/shadcn/r/portfolio.json +62 -0
- package/dist/shadcn/r/presentation.json +454 -0
- package/dist/shadcn/r/pricing.json +63 -0
- package/dist/shadcn/r/primitives.json +360 -0
- package/dist/shadcn/r/saas-landing.json +60 -0
- package/dist/shadcn/r/sections.json +734 -0
- package/dist/shadcn/r/settings.json +72 -0
- package/dist/shadcn/r/shadcn-admin-shell.json +49 -0
- package/dist/shadcn/r/shadcn-admin.json +76 -0
- package/dist/shadcn/r/store.json +75 -0
- package/dist/shadcn/r/support-inbox.json +63 -0
- package/dist/shadcn/r/team-directory.json +59 -0
- package/dist/shadcn/r/uibot-base.json +30 -0
- package/dist/shadcn/r/uibot-theme.json +86 -0
- package/dist/shadcn/r/workspace.json +174 -0
- package/dist/shadcn/registry.json +615 -0
- package/dist/shadcn.d.ts +10 -5
- package/package.json +2 -2
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "data",
|
|
4
|
+
"type": "registry:ui",
|
|
5
|
+
"description": "Unordered list of child blocks. Use with divided or compact for different visual densities.",
|
|
6
|
+
"dependencies": [
|
|
7
|
+
"react"
|
|
8
|
+
],
|
|
9
|
+
"registryDependencies": [
|
|
10
|
+
"@uibot/uibot-base"
|
|
11
|
+
],
|
|
12
|
+
"files": [
|
|
13
|
+
{
|
|
14
|
+
"path": "components/uibot/data.tsx",
|
|
15
|
+
"target": "components/uibot/data.tsx",
|
|
16
|
+
"content": "import type { RendererComponent } from \"@/lib/uibot-renderer\";\nimport type { ReactNode } from \"react\";\nimport { cn } from \"@/lib/utils\";\n\n/** Repeated list of items */\nexport const List: RendererComponent = (props, ctx) => {\n const divided = props[\"divided\"] === true;\n const compact = props[\"compact\"] === true;\n\n return (\n <ul\n className={cn(\n \"uibot-list\",\n divided ? \"divide-y divide-border\" : compact ? \"space-y-1\" : \"space-y-2\",\n )}\n data-uibot-type=\"List\"\n aria-label={typeof props[\"label\"] === \"string\" ? props[\"label\"] : undefined}\n >\n {ctx.children as ReactNode[]}\n </ul>\n );\n};\n\n/** Data table with columns and rows */\nexport const Table: RendererComponent = (props) => {\n const columns = Array.isArray(props[\"columns\"])\n ? (props[\"columns\"] as Array<{ key: string; label: string; align?: string }>)\n : [];\n const rows = Array.isArray(props[\"rows\"])\n ? (props[\"rows\"] as Array<Record<string, unknown>>)\n : [];\n const striped = props[\"striped\"] !== false;\n const caption = typeof props[\"caption\"] === \"string\" ? props[\"caption\"] : null;\n\n return (\n <div className=\"uibot-table w-full overflow-auto rounded-lg border\" data-uibot-type=\"Table\">\n <table className=\"w-full text-sm\">\n {caption && (\n <caption className=\"mb-1 py-2 text-sm text-muted-foreground\">{caption}</caption>\n )}\n <thead>\n <tr className=\"border-b bg-muted/50\">\n {columns.map((col) => (\n <th\n key={col.key}\n scope=\"col\"\n className={cn(\n \"px-4 py-3 text-xs font-medium uppercase tracking-wide text-muted-foreground\",\n col.align === \"right\"\n ? \"text-right\"\n : col.align === \"center\"\n ? \"text-center\"\n : \"text-left\",\n )}\n >\n {col.label}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {rows.map((row, i) => (\n <tr\n key={i}\n className={cn(\n \"border-b transition-colors last:border-0 hover:bg-muted/30\",\n striped && i % 2 === 1 ? \"bg-muted/10\" : \"\",\n )}\n >\n {columns.map((col) => (\n <td\n key={col.key}\n className={cn(\n \"px-4 py-3 text-foreground\",\n col.align === \"right\"\n ? \"text-right\"\n : col.align === \"center\"\n ? \"text-center\"\n : \"\",\n )}\n >\n {String(row[col.key] ?? \"\")}\n </td>\n ))}\n </tr>\n ))}\n {rows.length === 0 && (\n <tr>\n <td\n colSpan={columns.length || 1}\n className=\"px-4 py-10 text-center text-sm text-muted-foreground\"\n >\n {typeof props[\"emptyText\"] === \"string\" ? props[\"emptyText\"] : \"No data\"}\n </td>\n </tr>\n )}\n </tbody>\n </table>\n </div>\n );\n};\n\nconst TREND_UP = (\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 14 14\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <polyline points=\"2 10 7 4 12 10\" />\n </svg>\n);\nconst TREND_DOWN = (\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 14 14\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n >\n <polyline points=\"2 4 7 10 12 4\" />\n </svg>\n);\n\n/** Single statistic display (number + label) */\nexport const Stat: RendererComponent = (props) => {\n const trend = props[\"trend\"] as \"up\" | \"down\" | undefined;\n const change =\n typeof props[\"change\"] === \"string\" || typeof props[\"change\"] === \"number\"\n ? String(props[\"change\"])\n : null;\n\n return (\n <div\n className=\"uibot-stat bg-card text-card-foreground rounded-xl border p-5 shadow-sm\"\n data-uibot-type=\"Stat\"\n >\n <p className=\"text-sm font-medium text-muted-foreground\">\n {typeof props[\"label\"] === \"string\" ? props[\"label\"] : \"Stat\"}\n </p>\n <p className=\"mt-1.5 text-3xl font-bold tracking-tight\">\n {props[\"value\"] !== undefined ? String(props[\"value\"]) : \"—\"}\n </p>\n {(change !== null || typeof props[\"description\"] === \"string\") && (\n <div className=\"mt-1.5 flex items-center gap-1.5\">\n {trend && (\n <span\n className={cn(\n \"flex items-center\",\n trend === \"up\" ? \"text-green-600\" : \"text-destructive\",\n )}\n >\n {trend === \"up\" ? TREND_UP : TREND_DOWN}\n </span>\n )}\n {change !== null && (\n <span\n className={cn(\n \"text-xs font-medium\",\n trend === \"up\"\n ? \"text-green-600\"\n : trend === \"down\"\n ? \"text-destructive\"\n : \"text-muted-foreground\",\n )}\n >\n {change}\n </span>\n )}\n {typeof props[\"description\"] === \"string\" && (\n <span className=\"text-xs text-muted-foreground\">{props[\"description\"]}</span>\n )}\n </div>\n )}\n </div>\n );\n};\n\n/** Simple inline Markdown renderer */\nfunction renderMarkdown(text: string): ReactNode[] {\n const lines = text.split(\"\\n\");\n const nodes: ReactNode[] = [];\n let listItems: ReactNode[] = [];\n\n const flushList = () => {\n if (listItems.length > 0) {\n nodes.push(\n <ul key={`ul-${nodes.length}`} className=\"my-2 ml-4 list-disc space-y-1 text-sm\">\n {listItems}\n </ul>,\n );\n listItems = [];\n }\n };\n\n const inlineFormat = (raw: string, key: string): ReactNode => {\n // Very small inline parser: **bold**, *italic*, `code`\n const parts = raw.split(/(\\*\\*[^*]+\\*\\*|\\*[^*]+\\*|`[^`]+`)/g);\n if (parts.length === 1) return raw;\n return (\n <span key={key}>\n {parts.map((p, i) => {\n if (p.startsWith(\"**\") && p.endsWith(\"**\"))\n return (\n <strong key={i} className=\"font-semibold\">\n {p.slice(2, -2)}\n </strong>\n );\n if (p.startsWith(\"*\") && p.endsWith(\"*\")) return <em key={i}>{p.slice(1, -1)}</em>;\n if (p.startsWith(\"`\") && p.endsWith(\"`\"))\n return (\n <code key={i} className=\"rounded bg-muted px-1 py-0.5 font-mono text-[0.8em]\">\n {p.slice(1, -1)}\n </code>\n );\n return p;\n })}\n </span>\n );\n };\n\n lines.forEach((line, i) => {\n const hm = /^(#{1,6})\\s+(.+)$/.exec(line);\n if (hm) {\n flushList();\n const level = hm[1]!.length;\n const sizeMap = [\"text-2xl\", \"text-xl\", \"text-lg\", \"text-base\", \"text-sm\", \"text-xs\"];\n const cls = cn(\"font-semibold leading-tight my-2\", sizeMap[level - 1] ?? \"text-base\");\n const Tag = `h${level}` as \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n nodes.push(\n <Tag key={i} className={cls}>\n {inlineFormat(hm[2]!, `h-${i}`)}\n </Tag>,\n );\n return;\n }\n\n const lm = /^[-*]\\s+(.+)$/.exec(line);\n if (lm) {\n listItems.push(<li key={i}>{inlineFormat(lm[1]!, `li-${i}`)}</li>);\n return;\n }\n\n flushList();\n if (line.trim() === \"\") {\n nodes.push(<br key={i} />);\n } else {\n nodes.push(\n <p key={i} className=\"my-1 text-sm leading-relaxed\">\n {inlineFormat(line, `p-${i}`)}\n </p>,\n );\n }\n });\n\n flushList();\n return nodes;\n}\n\n/** Markdown text content renderer */\nexport const Markdown: RendererComponent = (props) => {\n const content = typeof props[\"content\"] === \"string\" ? props[\"content\"] : \"\";\n return (\n <div className=\"uibot-markdown text-foreground\" data-uibot-type=\"Markdown\">\n {renderMarkdown(content)}\n </div>\n );\n};\n\nconst HEADING_SIZE: Record<number, string> = {\n 1: \"text-4xl\",\n 2: \"text-3xl\",\n 3: \"text-2xl\",\n 4: \"text-xl\",\n 5: \"text-lg\",\n 6: \"text-base\",\n};\n\n/** Section heading (h1–h6) */\nexport const Heading: RendererComponent = (props) => {\n const lvl = typeof props[\"level\"] === \"number\" ? Math.min(6, Math.max(1, props[\"level\"])) : 2;\n const size = HEADING_SIZE[lvl] ?? \"text-3xl\";\n const weight = lvl <= 2 ? \"font-bold\" : \"font-semibold\";\n const text = typeof props[\"text\"] === \"string\" ? props[\"text\"] : \"\";\n const muted = props[\"muted\"] === true ? \"text-muted-foreground\" : \"text-foreground\";\n const cls = cn(\n \"uibot-heading tracking-tight leading-tight\",\n size,\n weight,\n muted,\n typeof props.className === \"string\" ? props.className : \"\",\n );\n const Tag = `h${lvl}` as \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n return (\n <Tag className={cls} data-uibot-type=\"Heading\">\n {text}\n </Tag>\n );\n};\n\n/** Body paragraph text */\nexport const Paragraph: RendererComponent = (props) => (\n <p\n className={cn(\n \"uibot-paragraph leading-relaxed\",\n props[\"size\"] === \"sm\" ? \"text-sm\" : props[\"size\"] === \"lg\" ? \"text-lg\" : \"text-sm\",\n props[\"muted\"] === true ? \"text-muted-foreground\" : \"text-foreground\",\n )}\n data-uibot-type=\"Paragraph\"\n >\n {typeof props[\"text\"] === \"string\" ? props[\"text\"] : \"\"}\n </p>\n);\n",
|
|
17
|
+
"type": "registry:ui"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"path": "components/uibot/data.uibot.json",
|
|
21
|
+
"target": "components/uibot/data.uibot.json",
|
|
22
|
+
"content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"data\",\n \"channel\": \"public\",\n \"components\": [\n {\n \"name\": \"Heading\",\n \"export\": \"Heading\",\n \"module\": \"data.tsx\",\n \"catalog\": {\n \"name\": \"Heading\",\n \"description\": \"Semantic heading tag h1–h6 with size automatically mapped to the level.\",\n \"category\": \"primitive\",\n \"level\": \"L1\",\n \"tags\": [\n \"text\",\n \"heading\",\n \"typography\"\n ],\n \"props\": {\n \"text\": {\n \"type\": \"string\"\n },\n \"level\": {\n \"type\": \"integer\",\n \"default\": 2,\n \"description\": \"1=largest, 6=smallest\"\n },\n \"muted\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"Render in muted-foreground\"\n }\n },\n \"usageScenarios\": [\n \"Section title above a Table or Card\",\n \"Hero headline on a landing page\"\n ],\n \"constraints\": [\n \"Use only one h1 per page\"\n ]\n }\n },\n {\n \"name\": \"List\",\n \"export\": \"List\",\n \"module\": \"data.tsx\",\n \"catalog\": {\n \"name\": \"List\",\n \"description\": \"Unordered list of child blocks. Use with divided or compact for different visual densities.\",\n \"category\": \"composite\",\n \"level\": \"L2\",\n \"tags\": [\n \"list\"\n ],\n \"props\": {\n \"divided\": {\n \"type\": \"boolean\",\n \"default\": false,\n \"description\": \"Add hairline dividers between items\"\n },\n \"compact\": {\n \"type\": \"boolean\",\n \"default\": false\n },\n \"label\": {\n \"type\": \"string\",\n \"description\": \"ARIA label\"\n }\n },\n \"usageScenarios\": [\n \"Recent activity feed\",\n \"Search result list\"\n ],\n \"constraints\": []\n }\n },\n {\n \"name\": \"Markdown\",\n \"export\": \"Markdown\",\n \"module\": \"data.tsx\",\n \"catalog\": {\n \"name\": \"Markdown\",\n \"description\": \"Renders Markdown source into HTML. Supports # headings, **bold**, *italic*, `code`, and - lists.\",\n \"category\": \"primitive\",\n \"level\": \"L1\",\n \"tags\": [\n \"text\",\n \"markdown\",\n \"content\"\n ],\n \"props\": {\n \"content\": {\n \"type\": \"string\",\n \"description\": \"Markdown source text\"\n }\n },\n \"usageScenarios\": [\n \"Documentation sections\",\n \"Feature descriptions on a landing page\",\n \"Release notes\"\n ],\n \"constraints\": [\n \"No HTML injection; only Markdown syntax is parsed\"\n ]\n }\n },\n {\n \"name\": \"Paragraph\",\n \"export\": \"Paragraph\",\n \"module\": \"data.tsx\",\n \"catalog\": {\n \"name\": \"Paragraph\",\n \"description\": \"Body text block. Use size='lg' for lead copy, size='sm' for captions.\",\n \"category\": \"primitive\",\n \"level\": \"L1\",\n \"tags\": [\n \"text\",\n \"typography\"\n ],\n \"props\": {\n \"text\": {\n \"type\": \"string\"\n },\n \"size\": {\n \"type\": \"string\",\n \"enum\": [\n \"sm\",\n \"md\",\n \"lg\"\n ],\n \"default\": \"md\"\n },\n \"muted\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n },\n \"usageScenarios\": [\n \"Feature description below a Heading\",\n \"Helper caption below a form field\"\n ],\n \"constraints\": []\n }\n },\n {\n \"name\": \"Stat\",\n \"export\": \"Stat\",\n \"module\": \"data.tsx\",\n \"catalog\": {\n \"name\": \"Stat\",\n \"description\": \"KPI metric card: large value, label, optional trend arrow, and change string.\",\n \"category\": \"primitive\",\n \"level\": \"L2\",\n \"tags\": [\n \"stat\",\n \"kpi\",\n \"metric\"\n ],\n \"props\": {\n \"label\": {\n \"type\": \"string\"\n },\n \"value\": {\n \"type\": \"string\",\n \"description\": \"Main metric value, e.g. 1,234 or $12k\"\n },\n \"change\": {\n \"type\": \"string\",\n \"description\": \"Change label, e.g. \\\"+12% vs last month\\\"\"\n },\n \"trend\": {\n \"type\": \"string\",\n \"enum\": [\n \"up\",\n \"down\"\n ]\n },\n \"description\": {\n \"type\": \"string\",\n \"description\": \"Secondary helper text\"\n }\n },\n \"usageScenarios\": [\n \"Dashboard KPI row (4 Stat blocks side-by-side in a Box[direction=row])\",\n \"Single revenue metric in a Card\"\n ],\n \"constraints\": [\n \"Do not put detailed charts inside a Stat; use Stat only for a single number + context\"\n ]\n }\n },\n {\n \"name\": \"Table\",\n \"export\": \"Table\",\n \"module\": \"data.tsx\",\n \"catalog\": {\n \"name\": \"Table\",\n \"description\": \"Data grid with typed columns and row data. Columns define keys and display labels.\",\n \"category\": \"composite\",\n \"level\": \"L2\",\n \"tags\": [\n \"table\",\n \"grid\",\n \"data\"\n ],\n \"props\": {\n \"columns\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"key\": {\n \"type\": \"string\"\n },\n \"label\": {\n \"type\": \"string\"\n },\n \"align\": {\n \"type\": \"string\",\n \"enum\": [\n \"left\",\n \"center\",\n \"right\"\n ]\n }\n }\n },\n \"description\": \"[{key, label, align?}]\"\n },\n \"rows\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\"\n },\n \"description\": \"Array of data objects keyed to column.key\"\n },\n \"emptyText\": {\n \"type\": \"string\",\n \"default\": \"No data\"\n },\n \"striped\": {\n \"type\": \"boolean\",\n \"default\": true\n },\n \"caption\": {\n \"type\": \"string\"\n }\n },\n \"usageScenarios\": [\n \"User management list\",\n \"Order history table\",\n \"API endpoint catalog\"\n ],\n \"constraints\": [\n \"rows entries must have keys matching column.key; missing keys render empty string\",\n \"Avoid more than 8 columns\"\n ]\n }\n }\n ]\n}\n",
|
|
23
|
+
"type": "registry:ui"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"meta": {
|
|
27
|
+
"category": "composite",
|
|
28
|
+
"level": "L2",
|
|
29
|
+
"props": {
|
|
30
|
+
"divided": {
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"default": false,
|
|
33
|
+
"description": "Add hairline dividers between items"
|
|
34
|
+
},
|
|
35
|
+
"compact": {
|
|
36
|
+
"type": "boolean",
|
|
37
|
+
"default": false
|
|
38
|
+
},
|
|
39
|
+
"label": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "ARIA label"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"scenarios": [
|
|
45
|
+
"Recent activity feed",
|
|
46
|
+
"Search result list"
|
|
47
|
+
],
|
|
48
|
+
"constraints": [],
|
|
49
|
+
"provides": [
|
|
50
|
+
"List",
|
|
51
|
+
"Table",
|
|
52
|
+
"Stat",
|
|
53
|
+
"Markdown",
|
|
54
|
+
"Heading",
|
|
55
|
+
"Paragraph"
|
|
56
|
+
],
|
|
57
|
+
"uibot": {
|
|
58
|
+
"schema": "uibot.registry.item.v1",
|
|
59
|
+
"item": "data",
|
|
60
|
+
"channel": "public",
|
|
61
|
+
"components": [
|
|
62
|
+
{
|
|
63
|
+
"name": "Heading",
|
|
64
|
+
"export": "Heading",
|
|
65
|
+
"module": "data.tsx",
|
|
66
|
+
"catalog": {
|
|
67
|
+
"name": "Heading",
|
|
68
|
+
"description": "Semantic heading tag h1–h6 with size automatically mapped to the level.",
|
|
69
|
+
"category": "primitive",
|
|
70
|
+
"level": "L1",
|
|
71
|
+
"tags": [
|
|
72
|
+
"text",
|
|
73
|
+
"heading",
|
|
74
|
+
"typography"
|
|
75
|
+
],
|
|
76
|
+
"props": {
|
|
77
|
+
"text": {
|
|
78
|
+
"type": "string"
|
|
79
|
+
},
|
|
80
|
+
"level": {
|
|
81
|
+
"type": "integer",
|
|
82
|
+
"default": 2,
|
|
83
|
+
"description": "1=largest, 6=smallest"
|
|
84
|
+
},
|
|
85
|
+
"muted": {
|
|
86
|
+
"type": "boolean",
|
|
87
|
+
"default": false,
|
|
88
|
+
"description": "Render in muted-foreground"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"usageScenarios": [
|
|
92
|
+
"Section title above a Table or Card",
|
|
93
|
+
"Hero headline on a landing page"
|
|
94
|
+
],
|
|
95
|
+
"constraints": [
|
|
96
|
+
"Use only one h1 per page"
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "List",
|
|
102
|
+
"export": "List",
|
|
103
|
+
"module": "data.tsx",
|
|
104
|
+
"catalog": {
|
|
105
|
+
"name": "List",
|
|
106
|
+
"description": "Unordered list of child blocks. Use with divided or compact for different visual densities.",
|
|
107
|
+
"category": "composite",
|
|
108
|
+
"level": "L2",
|
|
109
|
+
"tags": [
|
|
110
|
+
"list"
|
|
111
|
+
],
|
|
112
|
+
"props": {
|
|
113
|
+
"divided": {
|
|
114
|
+
"type": "boolean",
|
|
115
|
+
"default": false,
|
|
116
|
+
"description": "Add hairline dividers between items"
|
|
117
|
+
},
|
|
118
|
+
"compact": {
|
|
119
|
+
"type": "boolean",
|
|
120
|
+
"default": false
|
|
121
|
+
},
|
|
122
|
+
"label": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"description": "ARIA label"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"usageScenarios": [
|
|
128
|
+
"Recent activity feed",
|
|
129
|
+
"Search result list"
|
|
130
|
+
],
|
|
131
|
+
"constraints": []
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "Markdown",
|
|
136
|
+
"export": "Markdown",
|
|
137
|
+
"module": "data.tsx",
|
|
138
|
+
"catalog": {
|
|
139
|
+
"name": "Markdown",
|
|
140
|
+
"description": "Renders Markdown source into HTML. Supports # headings, **bold**, *italic*, `code`, and - lists.",
|
|
141
|
+
"category": "primitive",
|
|
142
|
+
"level": "L1",
|
|
143
|
+
"tags": [
|
|
144
|
+
"text",
|
|
145
|
+
"markdown",
|
|
146
|
+
"content"
|
|
147
|
+
],
|
|
148
|
+
"props": {
|
|
149
|
+
"content": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"description": "Markdown source text"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"usageScenarios": [
|
|
155
|
+
"Documentation sections",
|
|
156
|
+
"Feature descriptions on a landing page",
|
|
157
|
+
"Release notes"
|
|
158
|
+
],
|
|
159
|
+
"constraints": [
|
|
160
|
+
"No HTML injection; only Markdown syntax is parsed"
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"name": "Paragraph",
|
|
166
|
+
"export": "Paragraph",
|
|
167
|
+
"module": "data.tsx",
|
|
168
|
+
"catalog": {
|
|
169
|
+
"name": "Paragraph",
|
|
170
|
+
"description": "Body text block. Use size='lg' for lead copy, size='sm' for captions.",
|
|
171
|
+
"category": "primitive",
|
|
172
|
+
"level": "L1",
|
|
173
|
+
"tags": [
|
|
174
|
+
"text",
|
|
175
|
+
"typography"
|
|
176
|
+
],
|
|
177
|
+
"props": {
|
|
178
|
+
"text": {
|
|
179
|
+
"type": "string"
|
|
180
|
+
},
|
|
181
|
+
"size": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"enum": [
|
|
184
|
+
"sm",
|
|
185
|
+
"md",
|
|
186
|
+
"lg"
|
|
187
|
+
],
|
|
188
|
+
"default": "md"
|
|
189
|
+
},
|
|
190
|
+
"muted": {
|
|
191
|
+
"type": "boolean",
|
|
192
|
+
"default": false
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"usageScenarios": [
|
|
196
|
+
"Feature description below a Heading",
|
|
197
|
+
"Helper caption below a form field"
|
|
198
|
+
],
|
|
199
|
+
"constraints": []
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"name": "Stat",
|
|
204
|
+
"export": "Stat",
|
|
205
|
+
"module": "data.tsx",
|
|
206
|
+
"catalog": {
|
|
207
|
+
"name": "Stat",
|
|
208
|
+
"description": "KPI metric card: large value, label, optional trend arrow, and change string.",
|
|
209
|
+
"category": "primitive",
|
|
210
|
+
"level": "L2",
|
|
211
|
+
"tags": [
|
|
212
|
+
"stat",
|
|
213
|
+
"kpi",
|
|
214
|
+
"metric"
|
|
215
|
+
],
|
|
216
|
+
"props": {
|
|
217
|
+
"label": {
|
|
218
|
+
"type": "string"
|
|
219
|
+
},
|
|
220
|
+
"value": {
|
|
221
|
+
"type": "string",
|
|
222
|
+
"description": "Main metric value, e.g. 1,234 or $12k"
|
|
223
|
+
},
|
|
224
|
+
"change": {
|
|
225
|
+
"type": "string",
|
|
226
|
+
"description": "Change label, e.g. \"+12% vs last month\""
|
|
227
|
+
},
|
|
228
|
+
"trend": {
|
|
229
|
+
"type": "string",
|
|
230
|
+
"enum": [
|
|
231
|
+
"up",
|
|
232
|
+
"down"
|
|
233
|
+
]
|
|
234
|
+
},
|
|
235
|
+
"description": {
|
|
236
|
+
"type": "string",
|
|
237
|
+
"description": "Secondary helper text"
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
"usageScenarios": [
|
|
241
|
+
"Dashboard KPI row (4 Stat blocks side-by-side in a Box[direction=row])",
|
|
242
|
+
"Single revenue metric in a Card"
|
|
243
|
+
],
|
|
244
|
+
"constraints": [
|
|
245
|
+
"Do not put detailed charts inside a Stat; use Stat only for a single number + context"
|
|
246
|
+
]
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"name": "Table",
|
|
251
|
+
"export": "Table",
|
|
252
|
+
"module": "data.tsx",
|
|
253
|
+
"catalog": {
|
|
254
|
+
"name": "Table",
|
|
255
|
+
"description": "Data grid with typed columns and row data. Columns define keys and display labels.",
|
|
256
|
+
"category": "composite",
|
|
257
|
+
"level": "L2",
|
|
258
|
+
"tags": [
|
|
259
|
+
"table",
|
|
260
|
+
"grid",
|
|
261
|
+
"data"
|
|
262
|
+
],
|
|
263
|
+
"props": {
|
|
264
|
+
"columns": {
|
|
265
|
+
"type": "array",
|
|
266
|
+
"items": {
|
|
267
|
+
"type": "object",
|
|
268
|
+
"properties": {
|
|
269
|
+
"key": {
|
|
270
|
+
"type": "string"
|
|
271
|
+
},
|
|
272
|
+
"label": {
|
|
273
|
+
"type": "string"
|
|
274
|
+
},
|
|
275
|
+
"align": {
|
|
276
|
+
"type": "string",
|
|
277
|
+
"enum": [
|
|
278
|
+
"left",
|
|
279
|
+
"center",
|
|
280
|
+
"right"
|
|
281
|
+
]
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
"description": "[{key, label, align?}]"
|
|
286
|
+
},
|
|
287
|
+
"rows": {
|
|
288
|
+
"type": "array",
|
|
289
|
+
"items": {
|
|
290
|
+
"type": "object"
|
|
291
|
+
},
|
|
292
|
+
"description": "Array of data objects keyed to column.key"
|
|
293
|
+
},
|
|
294
|
+
"emptyText": {
|
|
295
|
+
"type": "string",
|
|
296
|
+
"default": "No data"
|
|
297
|
+
},
|
|
298
|
+
"striped": {
|
|
299
|
+
"type": "boolean",
|
|
300
|
+
"default": true
|
|
301
|
+
},
|
|
302
|
+
"caption": {
|
|
303
|
+
"type": "string"
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
"usageScenarios": [
|
|
307
|
+
"User management list",
|
|
308
|
+
"Order history table",
|
|
309
|
+
"API endpoint catalog"
|
|
310
|
+
],
|
|
311
|
+
"constraints": [
|
|
312
|
+
"rows entries must have keys matching column.key; missing keys render empty string",
|
|
313
|
+
"Avoid more than 8 columns"
|
|
314
|
+
]
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
]
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
3
|
+
"name": "ecommerce",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "Shop — All products",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"@uibot/data",
|
|
8
|
+
"@uibot/feedback",
|
|
9
|
+
"@uibot/form",
|
|
10
|
+
"@uibot/grid",
|
|
11
|
+
"@uibot/interactive",
|
|
12
|
+
"@uibot/layout",
|
|
13
|
+
"@uibot/nav"
|
|
14
|
+
],
|
|
15
|
+
"files": [
|
|
16
|
+
{
|
|
17
|
+
"path": "lib/uibot/templates/ecommerce.uibot.yaml",
|
|
18
|
+
"target": "lib/uibot/templates/ecommerce.uibot.yaml",
|
|
19
|
+
"content": "version: \"2.0\"\npages:\n - id: ecommerce\n path: /\n title: Shop — All products\n blocks:\n - type: PageLayout\n props:\n title: Atelier\n slots:\n headerActions:\n - type: Link\n props:\n label: \"Cart · 2\"\n href: \"#\"\n variant: button\n children:\n - type: Box\n props:\n className: \"flex items-end justify-between mb-4 border-b border-border pb-4\"\n children:\n - type: Box\n children:\n - type: Heading\n props:\n level: 2\n text: \"New arrivals\"\n - type: Paragraph\n props:\n size: sm\n muted: true\n text: \"Demo catalog · 4 sample SKUs · photos not attached\"\n - type: Box\n props:\n className: \"w-48\"\n children:\n - type: Form\n children:\n - type: \"Form.Select\"\n props:\n name: sort\n options:\n - value: featured\n label: Featured\n - value: price-asc\n label: \"Price: low to high\"\n - value: newest\n label: Newest\n - type: \"Form.Submit\"\n props:\n label: Apply\n variant: ghost\n - type: Grid\n props:\n cols: \"4\"\n responsive: true\n gap: lg\n children:\n - type: Card\n props:\n className: \"rounded-none border border-border shadow-none\"\n children:\n - type: Box\n props:\n className: \"h-40 -mx-6 -mt-6 mb-3 border-b border-border bg-muted/40 flex items-center justify-center\"\n children:\n - type: Paragraph\n props:\n size: sm\n muted: true\n text: \"No image\"\n - type: BadgeGroup\n props:\n items:\n - label: New\n tone: success\n - type: Heading\n props:\n level: 4\n text: \"Linen Overshirt\"\n - type: Stat\n props:\n value: \"$128\"\n description: \"sample price\"\n - type: Button\n props:\n label: Add to cart\n full: true\n - type: Card\n props:\n className: \"rounded-none border border-border shadow-none\"\n children:\n - type: Box\n props:\n className: \"h-40 -mx-6 -mt-6 mb-3 border-b border-border bg-muted/40 flex items-center justify-center\"\n children:\n - type: Paragraph\n props:\n size: sm\n muted: true\n text: \"No image\"\n - type: Heading\n props:\n level: 4\n text: \"Wool Trousers\"\n - type: Stat\n props:\n value: \"$96\"\n change: \"$120\"\n description: \"was $120 · sample\"\n - type: Button\n props:\n label: Add to cart\n full: true\n - type: Card\n props:\n className: \"rounded-none border border-border shadow-none\"\n children:\n - type: Box\n props:\n className: \"h-40 -mx-6 -mt-6 mb-3 border-b border-border bg-muted/40 flex items-center justify-center\"\n children:\n - type: Paragraph\n props:\n size: sm\n muted: true\n text: \"No image\"\n - type: Heading\n props:\n level: 4\n text: \"Canvas Tote\"\n - type: Stat\n props:\n value: \"$54\"\n description: \"sample price\"\n - type: Button\n props:\n label: Add to cart\n full: true\n - type: Card\n props:\n className: \"rounded-none border border-border shadow-none\"\n children:\n - type: Box\n props:\n className: \"h-40 -mx-6 -mt-6 mb-3 border-b border-border bg-muted/40 flex items-center justify-center\"\n children:\n - type: Paragraph\n props:\n size: sm\n muted: true\n text: \"No image\"\n - type: BadgeGroup\n props:\n items:\n - label: Low stock\n tone: warning\n - type: Heading\n props:\n level: 4\n text: \"Leather Belt\"\n - type: Stat\n props:\n value: \"$72\"\n description: \"2 left in demo\"\n - type: Button\n props:\n label: Add to cart\n full: true\n",
|
|
20
|
+
"type": "registry:lib"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"path": "lib/uibot/templates/ecommerce.uibot.json",
|
|
24
|
+
"target": "lib/uibot/templates/ecommerce.uibot.json",
|
|
25
|
+
"content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"ecommerce\",\n \"channel\": \"public\",\n \"template\": {\n \"file\": \"ecommerce.uibot.yaml\",\n \"contract\": {\n \"name\": \"ecommerce\",\n \"description\": \"Shop — All products\",\n \"level\": \"L4\",\n \"category\": \"template\",\n \"keywords\": [\n \"ecommerce\",\n \"ecommerce\",\n \"uibot-template\"\n ],\n \"composedFrom\": [\n \"BadgeGroup\",\n \"Box\",\n \"Button\",\n \"Card\",\n \"Form\",\n \"Form.Select\",\n \"Form.Submit\",\n \"Grid\",\n \"Heading\",\n \"Link\",\n \"PageLayout\",\n \"Paragraph\",\n \"Stat\"\n ]\n }\n }\n}\n",
|
|
26
|
+
"type": "registry:lib"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"meta": {
|
|
30
|
+
"uibot": {
|
|
31
|
+
"schema": "uibot.registry.item.v1",
|
|
32
|
+
"item": "ecommerce",
|
|
33
|
+
"channel": "public",
|
|
34
|
+
"template": {
|
|
35
|
+
"file": "ecommerce.uibot.yaml",
|
|
36
|
+
"contract": {
|
|
37
|
+
"name": "ecommerce",
|
|
38
|
+
"description": "Shop — All products",
|
|
39
|
+
"level": "L4",
|
|
40
|
+
"category": "template",
|
|
41
|
+
"keywords": [
|
|
42
|
+
"ecommerce",
|
|
43
|
+
"ecommerce",
|
|
44
|
+
"uibot-template"
|
|
45
|
+
],
|
|
46
|
+
"composedFrom": [
|
|
47
|
+
"BadgeGroup",
|
|
48
|
+
"Box",
|
|
49
|
+
"Button",
|
|
50
|
+
"Card",
|
|
51
|
+
"Form",
|
|
52
|
+
"Form.Select",
|
|
53
|
+
"Form.Submit",
|
|
54
|
+
"Grid",
|
|
55
|
+
"Heading",
|
|
56
|
+
"Link",
|
|
57
|
+
"PageLayout",
|
|
58
|
+
"Paragraph",
|
|
59
|
+
"Stat"
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|