/** 左侧组件面板图标:内联 SVG,跟随当前文字颜色 */
|
export function qualityIcon(paths: string): string {
|
return `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6"
|
stroke-linecap="round" stroke-linejoin="round" width="22" height="22">${paths}</svg>`;
|
}
|
|
export const QUALITY_ICONS = {
|
heading: qualityIcon('<path d="M6 4v16M18 4v16M6 12h12"/>'),
|
text: qualityIcon('<path d="M4 6h16M4 12h16M4 18h10"/>'),
|
image: qualityIcon(
|
'<rect x="3" y="4" width="18" height="16" rx="2"/><circle cx="8.5" cy="9.5" r="1.5"/><path d="m21 16-5-5-6 6-3-3-4 4"/>',
|
),
|
divider: qualityIcon('<path d="M3 12h18"/>'),
|
spacer: qualityIcon('<path d="M12 4v16M8 4h8M8 20h8"/>'),
|
table: qualityIcon(
|
'<rect x="3" y="4" width="18" height="16" rx="2"/><path d="M3 10h18M3 15h18M9 10v10M15 10v10"/>',
|
),
|
header: qualityIcon('<rect x="3" y="4" width="18" height="6" rx="1"/><path d="M6 7h6"/>'),
|
footer: qualityIcon(
|
'<rect x="3" y="14" width="18" height="6" rx="1"/><path d="M6 17h6"/>',
|
),
|
sample: qualityIcon(
|
'<rect x="3" y="5" width="18" height="14" rx="2"/><path d="M7 9h4M7 13h6M15 9h2"/>',
|
),
|
inspection: qualityIcon(
|
'<path d="M9 4h6v3H9z"/><rect x="4" y="7" width="16" height="14" rx="2"/><path d="m8 14 2.5 2.5L16 11"/>',
|
),
|
qualityTable: qualityIcon(
|
'<rect x="3" y="4" width="18" height="16" rx="2"/><path d="M3 9h18M8 9v11M13 9v11M3 14h18"/>',
|
),
|
groupedTable: qualityIcon(
|
'<rect x="3" y="4" width="18" height="16" rx="2"/><path d="M3 9h18M8 9v11M8 14h13"/>',
|
),
|
result: qualityIcon(
|
'<circle cx="12" cy="12" r="8"/><path d="m8.5 12.5 2.5 2.5 4.5-5"/>',
|
),
|
} as const;
|