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,4 +1,6 @@
|
||||
import { Alert, Button, InputNumber, Select, Switch, Tag } from "antd";
|
||||
import { Button, InputNumber, Select, Tag } from "antd";
|
||||
import { Switch } from "@/components/ui/base/switch";
|
||||
import { Callout } from "@/components/ui/product/callout";
|
||||
import { RotateCcw } from "lucide-react";
|
||||
import type { ReactNode } from "react";
|
||||
|
||||
@@ -233,7 +235,7 @@ export function CapabilityScopeEditor({ capability, sourceSpecs, value, onChange
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
{sourceError ? <Alert type="warning" showIcon message="当前选择需要调整" description={`${sourceError}。可重新选择,或采用全部可用范围。`} /> : null}
|
||||
{sourceError ? <Callout tone="warning" title="当前选择需要调整">{`${sourceError}。可重新选择,或采用全部可用范围。`}</Callout> : null}
|
||||
|
||||
{source.operations?.length ? (
|
||||
<CapabilityBlock title="生成方式">
|
||||
@@ -263,7 +265,7 @@ export function CapabilityScopeEditor({ capability, sourceSpecs, value, onChange
|
||||
</div>
|
||||
</div>
|
||||
<div className="col-span-12 sm:col-span-1">
|
||||
<Switch size="small" checked={Boolean(selected)} onChange={(enabled) => updateInput(current, definition.name, enabled ? limit : undefined, update)} />
|
||||
<Switch size="sm" checked={Boolean(selected)} onChange={(enabled) => updateInput(current, definition.name, enabled ? limit : undefined, update)} />
|
||||
</div>
|
||||
<div className="col-span-6 sm:col-span-3">
|
||||
<NumberInput
|
||||
@@ -310,7 +312,7 @@ export function CapabilityScopeEditor({ capability, sourceSpecs, value, onChange
|
||||
</CapabilityBlock>
|
||||
) : null}
|
||||
|
||||
{!sourceInputs.length && !sourceOptions.length && !source.operations?.length ? <Alert type="info" showIcon message="该类型暂无额外能力参数" description="线路仍可按优先级和权重参与路由。" /> : null}
|
||||
{!sourceInputs.length && !sourceOptions.length && !source.operations?.length ? <Callout tone="info" title="该类型暂无额外能力参数">线路仍可按优先级和权重参与路由。</Callout> : null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -481,7 +483,7 @@ function OptionRuleEditor({ definition, source, value, onChange }: { definition:
|
||||
<div className="text-xs text-foreground/45">{constraintSummary(source, definition.unit)}</div>
|
||||
</div>
|
||||
<div className="col-span-12 sm:col-span-1">
|
||||
<Switch size="small" checked={Boolean(value)} onChange={(enabled) => onChange(enabled ? source : undefined)} />
|
||||
<Switch size="sm" checked={Boolean(value)} onChange={(enabled) => onChange(enabled ? source : undefined)} />
|
||||
</div>
|
||||
<div className="col-span-12 sm:col-span-6">
|
||||
{source.values ? (
|
||||
|
||||
Reference in New Issue
Block a user