feat(ui): 自研 Celadon 组件族入库与 AntD 消费全量替换 - base(Kbd/StatusBadge/IconButton/ToolButton)+product(EmptyState/Callout/SegmentedControl/Checkbox/Select/Tooltip/Switch), composio 视觉基底, globals.css 覆盖清理 (ADR-0008)
This commit is contained in:
1 parent
0dcd8e1c72
commit
c3e2758736
128 files changed
+2791
-737
No files matched your search
@@ -1,4 +1,6 @@
|
||||
import { App, Button, Dropdown, Input, Select, Tooltip } from "antd";
|
||||
import { App, Button, Dropdown, Input, Select } from "antd";
|
||||
import { Tooltip } from "@/components/ui/base/tooltip";
|
||||
|
||||
import { Boxes, Check, Clapperboard, Heart, Library, LoaderCircle, Megaphone, MoreHorizontal, Palette, Plus, Puzzle, Search, ShoppingBag, Sparkles, UserRound } from "lucide-react";
|
||||
import type { LucideIcon } from "lucide-react";
|
||||
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from "react";
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import { Button, Input, Modal, Segmented, Skeleton, Tooltip, Tree } from "antd";
|
||||
import { Button, Input, Modal, Skeleton, Tree } from "antd";
|
||||
import { Tooltip } from "@/components/ui/base/tooltip";
|
||||
|
||||
import { SegmentedControl } from "@/components/ui/base/segmented-control";
|
||||
import type { DataNode } from "antd/es/tree";
|
||||
import { Check, ChevronRight, Code2, ExternalLink, File, FileArchive, FileCode2, FileImage, FileText, Folder, FolderOpen, Heart, Pencil, Plus, RefreshCw, Users } from "lucide-react";
|
||||
import { useEffect, useMemo, useState, type MouseEvent, type ReactNode } from "react";
|
||||
@@ -140,7 +143,7 @@ export function SkillDetailModal({ skill, loading, mutating, categories, onClose
|
||||
<main className="skill-package-preview">
|
||||
<div className="skill-package-preview-toolbar">
|
||||
<div className="min-w-0 flex-1 truncate font-mono text-xs text-foreground/58">{activePath || "请选择文件"}</div>
|
||||
{canPreviewMarkdown ? <Segmented size="small" value={previewMode} onChange={(value) => setPreviewMode(value as PreviewMode)} options={[{ value: "preview", label: <span className="inline-flex items-center gap-1"><FileText className="size-3.5" />预览</span> }, { value: "source", label: <span className="inline-flex items-center gap-1"><Code2 className="size-3.5" />源码</span> }]} /> : null}
|
||||
{canPreviewMarkdown ? <SegmentedControl size="sm" value={previewMode} onChange={(value) => setPreviewMode(value as PreviewMode)} options={[{ value: "preview", label: <span className="inline-flex items-center gap-1"><FileText className="size-3.5" />预览</span> }, { value: "source", label: <span className="inline-flex items-center gap-1"><Code2 className="size-3.5" />源码</span> }]} /> : null}
|
||||
{activePath ? <Tooltip title="打开原始文件"><a className="skill-package-raw-link" href={skillFileRawURL(skill.skill_id, activePath)} target="_blank" rel="noreferrer" aria-label="打开原始文件"><ExternalLink className="size-4" /></a></Tooltip> : null}
|
||||
</div>
|
||||
<div className="skill-package-preview-body thin-scrollbar">
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { App, Button, Drawer, Form, Input, Select, Switch } from "antd";
|
||||
import { App, Button, Drawer, Form, Input } from "antd";
|
||||
import { Select } from "@/components/ui/base/select";
|
||||
import { Switch } from "@/components/ui/base/switch";
|
||||
import { Minus, Plus, Save, Wand2 } from "lucide-react";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import { App, Button, Form, Input, Modal, Segmented, Select, Switch, Upload, type UploadFile } from "antd";
|
||||
import { App, Button, Form, Input, Modal, Upload, type UploadFile } from "antd";
|
||||
import { Select } from "@/components/ui/base/select";
|
||||
import { Switch } from "@/components/ui/base/switch";
|
||||
import { SegmentedControl } from "@/components/ui/base/segmented-control";
|
||||
import { FileArchive, FileText, GitBranch, UploadCloud } from "lucide-react";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
@@ -90,7 +93,7 @@ export function SkillInstallModal({ open, onClose, onInstalled, onManualCreate }
|
||||
)}
|
||||
>
|
||||
<p className="mb-4 text-sm leading-6 text-foreground/55">支持标准 <code>SKILL.md</code>、包含多层目录的 ZIP 技能包,或公开 GitHub 仓库。名称和简介会优先从技能入口自动读取。</p>
|
||||
<Segmented className="skill-install-mode" block options={modeOptions} value={mode} onChange={(value) => { setMode(value as InstallMode); setFileList([]); }} />
|
||||
<SegmentedControl className="skill-install-mode" block options={modeOptions} value={mode} onChange={(value) => { setMode(value as InstallMode); setFileList([]); }} />
|
||||
|
||||
<Form form={form} layout="vertical" requiredMark="optional" className="skill-install-form">
|
||||
{mode === "github" ? (
|
||||
|
||||
Reference in new issue
Block a user