@godxjp/ui-mcp 0.4.0 → 0.4.1
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 +17 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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 {
|
|
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",
|