@godxjp/ui-mcp 0.4.1 → 0.4.2
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 +7 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -352,23 +352,27 @@ const columns: ColumnDef<Member>[] = [
|
|
|
352
352
|
{
|
|
353
353
|
name: "CardStat",
|
|
354
354
|
group: "data-display",
|
|
355
|
-
tagline: "KPI tile
|
|
355
|
+
tagline: "KPI tile. \u26A0\uFE0F CardStat IS ALREADY a bordered Card \u2014 render it DIRECTLY in ResponsiveGrid. NEVER wrap it in <Card>/<CardContent> (that double-borders it \u2192 looks too thick). NO accent prop (accent is a Card prop).",
|
|
356
356
|
props: [
|
|
357
357
|
{ name: "label", type: "ReactNode", required: true, description: "Metric name." },
|
|
358
358
|
{ name: "value", type: "ReactNode", required: true, description: "Metric value (string/number/ReactNode)." },
|
|
359
359
|
{ name: "hint", type: "ReactNode", description: "Secondary context below the value." },
|
|
360
|
-
{ name: "delta", type: "ReactNode", description: "Compact trend text beside the value." },
|
|
360
|
+
{ name: "delta", type: "ReactNode", description: "Compact trend text beside the value. Sign-aware tone (+ green / - red)." },
|
|
361
361
|
{ name: "layout", type: '"stacked" | "inline"', defaultValue: '"stacked"', description: "stacked = label over value; inline = label left / value right." },
|
|
362
362
|
{ name: "align", type: '"start" | "end"', description: "Align the metric group." }
|
|
363
363
|
],
|
|
364
364
|
example: `import { CardStat } from "@godxjp/ui/data-display";
|
|
365
365
|
import { ResponsiveGrid } from "@godxjp/ui/layout";
|
|
366
366
|
|
|
367
|
+
// \u2705 CardStat sits directly in the grid \u2014 it draws its own card + border.
|
|
367
368
|
<ResponsiveGrid columns={3}>
|
|
368
369
|
<CardStat label="\u7DCF\u4F1A\u54E1\u6570" value="12,450" hint="\u5148\u6708\u6BD4 +3%" />
|
|
369
370
|
<CardStat label="\u6708\u6B21\u58F2\u4E0A" value="\xA58,200,000" delta="+12%" />
|
|
370
371
|
<CardStat label="\u5229\u7528\u7387" value="68.4%" />
|
|
371
|
-
</ResponsiveGrid
|
|
372
|
+
</ResponsiveGrid>
|
|
373
|
+
|
|
374
|
+
// \u274C Double border \u2014 do NOT wrap CardStat in a Card:
|
|
375
|
+
// <Card><CardContent><CardStat label="x" value="1" /></CardContent></Card>`,
|
|
372
376
|
storyPath: "data-display/CardStat.stories.tsx",
|
|
373
377
|
rules: []
|
|
374
378
|
},
|