// Shared UI components: tags, priority pills, progress bars, status pills, checkbox. const { Icons: UIIcons } = window; const PRIORITY_META = { high: { label: 'Yüksek', cls: 'prio-high' }, medium: { label: 'Orta', cls: 'prio-med' }, low: { label: 'Düşük', cls: 'prio-low' }, }; const STATUS_META = { todo: { label: 'Yapılacak', color: '#94a3b8', bg: 'var(--status-todo-bg)', fg: 'var(--status-todo)' }, doing: { label: 'Devam Eden', color: '#3b82f6', bg: 'var(--status-doing-bg)', fg: 'var(--status-doing)' }, review: { label: 'İncelemede', color: '#a855f7', bg: 'var(--status-review-bg)', fg: 'var(--status-review)' }, done: { label: 'Tamamlandı', color: '#10b981', bg: 'var(--status-done-bg)', fg: 'var(--status-done)' }, }; const Tag = ({ tag }) => ( {tag.name} ); const Priority = ({ value }) => { const m = PRIORITY_META[value] || PRIORITY_META.medium; return ( {m.label} ); }; const StatusPill = ({ status }) => { const m = STATUS_META[status] || STATUS_META.todo; return ( {m.label} ); }; const Checkbox = ({ checked, onChange, size = 22 }) => (
{ e.stopPropagation(); onChange?.(!checked); }} > {checked && }
); const ProgressBar = ({ value, color = 'var(--accent)' }) => (
); const Avatar = ({ name, color }) => { const initials = name.split(' ').map(s => s[0]).join('').slice(0,2).toUpperCase(); return
{initials}
; }; const EmptyState = ({ icon, title, subtitle, action }) => (
{icon}
{title}
{subtitle &&
{subtitle}
} {action &&
{action}
}
); window.UI = { Tag, Priority, StatusPill, Checkbox, ProgressBar, Avatar, EmptyState, PRIORITY_META, STATUS_META };