@godxjp/ui-mcp 0.4.0 → 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 CHANGED
@@ -150,10 +150,12 @@ export function CrmLayout({ children }: { children: React.ReactNode }) {
150
150
  { name: "product", type: "{ name: string; role?: string; color?: string }", description: "Product/workspace block at the top." },
151
151
  { name: "brand", type: "ReactNode", description: "Custom brand node replacing the product block." },
152
152
  { name: "collapsed", type: "boolean", defaultValue: "false", description: "Icon-only mode; labels/section headings hidden." },
153
- { name: "footer", type: "ReactNode", description: "Bottom slot (user info, logout)." }
153
+ { name: "footer", type: "ReactNode", description: "Bottom slot (user info, logout). The .sb-footer wrapper supplies the top border + padding; YOUR content must use SEMANTIC token classes \u2014 `text-muted-foreground text-xs` outer with a `text-foreground font-medium` primary line. Do NOT use raw `opacity-*` / arbitrary `text-[11px]` (washed-out, off-design)." }
154
154
  ],
155
155
  example: `import { Sidebar } from "@godxjp/ui/layout";
156
- import { LayoutDashboard, Users } from "lucide-react";
156
+ import { Stack } from "@godxjp/ui/layout";
157
+ import { Button } from "@godxjp/ui/general";
158
+ import { LayoutDashboard, Users, LogOut } from "lucide-react";
157
159
  import { router, usePage } from "@inertiajs/react";
158
160
 
159
161
  export function AppSidebar() {
@@ -167,11 +169,23 @@ export function AppSidebar() {
167
169
  { id: "/members", label: "\u4F1A\u54E1\u7BA1\u7406", icon: Users },
168
170
  ] }]}
169
171
  product={{ name: "JOVY CRM", role: "\u672C\u90E8" }}
172
+ footer={
173
+ // Canonical footer: semantic tokens only (see Sidebar story).
174
+ <Stack gap="sm">
175
+ <div className="text-muted-foreground text-xs">
176
+ <div className="text-foreground font-medium">\u5C71\u7530 \u82B1\u5B50</div>
177
+ <div>ABC\u30D5\u30A1\u30FC\u30DE\u30B7\u30FC</div>
178
+ </div>
179
+ <Button variant="ghost" size="sm" className="w-full justify-start" onClick={() => router.post("/logout")}>
180
+ <LogOut className="size-4" />\u30ED\u30B0\u30A2\u30A6\u30C8
181
+ </Button>
182
+ </Stack>
183
+ }
170
184
  />
171
185
  );
172
186
  }`,
173
187
  storyPath: "layout/Sidebar.stories.tsx",
174
- rules: [23]
188
+ rules: [2, 23]
175
189
  },
176
190
  {
177
191
  name: "Topbar",
@@ -338,23 +352,27 @@ const columns: ColumnDef<Member>[] = [
338
352
  {
339
353
  name: "CardStat",
340
354
  group: "data-display",
341
- tagline: "KPI tile with label, value, optional hint and delta. NO accent prop (accent is a Card prop).",
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).",
342
356
  props: [
343
357
  { name: "label", type: "ReactNode", required: true, description: "Metric name." },
344
358
  { name: "value", type: "ReactNode", required: true, description: "Metric value (string/number/ReactNode)." },
345
359
  { name: "hint", type: "ReactNode", description: "Secondary context below the value." },
346
- { 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)." },
347
361
  { name: "layout", type: '"stacked" | "inline"', defaultValue: '"stacked"', description: "stacked = label over value; inline = label left / value right." },
348
362
  { name: "align", type: '"start" | "end"', description: "Align the metric group." }
349
363
  ],
350
364
  example: `import { CardStat } from "@godxjp/ui/data-display";
351
365
  import { ResponsiveGrid } from "@godxjp/ui/layout";
352
366
 
367
+ // \u2705 CardStat sits directly in the grid \u2014 it draws its own card + border.
353
368
  <ResponsiveGrid columns={3}>
354
369
  <CardStat label="\u7DCF\u4F1A\u54E1\u6570" value="12,450" hint="\u5148\u6708\u6BD4 +3%" />
355
370
  <CardStat label="\u6708\u6B21\u58F2\u4E0A" value="\xA58,200,000" delta="+12%" />
356
371
  <CardStat label="\u5229\u7528\u7387" value="68.4%" />
357
- </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>`,
358
376
  storyPath: "data-display/CardStat.stories.tsx",
359
377
  rules: []
360
378
  },