Files
ss-tools/frontend/tailwind.config.js
busya bc3e288d0b refactor(frontend): extract TopNavbar.Model — search logic, semantic compliance
- Extract TopNavbarModel.svelte.ts (303 LOC) — search state, debounce,
  API aggregation, drawer preference hydration
- TopNavbar.svelte: 605→389 LOC (INV_7 compliance)
- Remove duplicate JSDoc metadata (INV_4)
- Add @RATIONALE, @REJECTED, @PRE, @POST, @SIDE_EFFECT, @DATA_CONTRACT
- Replace raw Tailwind (from-sky-500/via-cyan-500/to-indigo-600 →
  from-brand-gradient-from/via-brand-gradient-via/to-brand-gradient-to)
- Replace raw Tailwind focus:ring-sky-200 → focus:ring-primary-ring-light
- Fix hardcoded i18n 'Ассистент' → $t.assistant.assistant
- Add primary.ring-light token to tailwind.config.js
- Replace any types with concrete interfaces (DashboardSearchResult, etc.)
- 16 naked functions → 0 (INV_1)
2026-07-05 08:50:43 +03:00

132 lines
5.6 KiB
JavaScript
Executable File

/** @type {import('tailwindcss').Config} */
export default {
content: [
"./index.html",
"./src/**/*.{svelte,js,ts,jsx,tsx}",
],
theme: {
extend: {
colors: {
// ── Semantic action palette (light surfaces) ──────────────
primary: {
DEFAULT: '#2563eb', // blue-600
hover: '#1d4ed8', // blue-700
ring: '#3b82f6', // blue-500
'ring-light': '#bae6fd', // sky-200 — focus ring for non-critical controls
light: '#eff6ff', // blue-50
},
secondary: {
DEFAULT: '#f3f4f6', // gray-100
hover: '#e5e7eb', // gray-200
text: '#111827', // gray-900
ring: '#6b7280', // gray-500
},
destructive: {
DEFAULT: '#dc2626', // red-600
hover: '#b91c1c', // red-700
ring: '#ef4444', // red-500
light: '#fef2f2', // red-50
},
success: {
DEFAULT: '#22c55e', // green-500
hover: '#16a34a', // green-600
ring: '#4ade80', // green-400
light: '#f0fdf4', // green-50
},
warning: {
DEFAULT: '#f59e0b', // amber-500
hover: '#d97706', // amber-600
ring: '#fbbf24', // amber-400
light: '#fffbeb', // amber-50
},
info: {
DEFAULT: '#0ea5e9', // sky-500
hover: '#0284c7', // sky-600
ring: '#38bdf8', // sky-400
light: '#f0f9ff', // sky-50
},
ghost: {
hover: '#f3f4f6', // gray-100
text: '#374151', // gray-700
ring: '#6b7280', // gray-500
},
// ── Surface hierarchy ─────────────────────────────────────
surface: {
page: '#f8fafc', // slate-50
card: '#ffffff', // white
muted: '#f1f5f9', // slate-100
overlay: 'rgba(15, 23, 42, 0.5)', // slate-900/50 — modal backdrop
},
// ── Border hierarchy ──────────────────────────────────────
border: {
DEFAULT: '#e2e8f0', // slate-200
strong: '#cbd5e1', // slate-300
},
// ── Text hierarchy ────────────────────────────────────────
text: {
DEFAULT: '#0f172a', // slate-900
muted: '#64748b', // slate-500
subtle: '#94a3b8', // slate-400
inverse: '#ffffff', // white
},
// ── Dark terminal palette (log viewer, task drawer) ───────
terminal: {
bg: '#0f172a', // slate-900
surface: '#1e293b', // slate-800
border: '#334155', // slate-700
text: {
DEFAULT: '#cbd5e1', // slate-300
muted: '#475569', // slate-600
subtle: '#64748b', // slate-500
bright: '#e2e8f0', // slate-200
heading: '#f1f5f9', // slate-100
},
accent: '#22d3ee', // cyan-400
},
// ── Log level palette ─────────────────────────────────────
log: {
debug: '#64748b',
info: '#38bdf8',
warning: '#fbbf24',
error: '#f87171',
},
// ── Log source palette ────────────────────────────────────
source: {
plugin: '#4ade80',
api: '#c084fc',
git: '#fb923c',
system: '#38bdf8',
},
// ── Brand identity ──────────────────────────────────────
brand: {
'gradient-from': '#0ea5e9', // sky-500
'gradient-via': '#06b6d4', // cyan-500
'gradient-to': '#4f46e5', // indigo-600
},
// ── Category gradient tokens (sidebar/breadcrumb icons) ──
category: {
dashboards: { from: '#e0f2fe', to: '#bae6fd', text: '#0369a1', ring: '#7dd3fc' }, // sky
datasets: { from: '#dcfce7', to: '#bbf7d0', text: '#15803d', ring: '#86efac' }, // emerald→success
migration: { from: '#ffedd5', to: '#fed7aa', text: '#c2410c', ring: '#fdba74' }, // orange→warning
git: { from: '#f3e8ff', to: '#e9d5ff', text: '#7e22ce', ring: '#d8b4fe' }, // purple
translation: { from: '#cffafe', to: '#99f6e4', text: '#0f766e', ring: '#5eead4' }, // cyan/teal→info
validation: { from: '#fef3c7', to: '#fde68a', text: '#a16207', ring: '#fcd34d' }, // amber
reports: { from: '#ede9fe', to: '#ddd6fe', text: '#6d28d9', ring: '#c4b5fd' }, // violet
tools: { from: '#f1f5f9', to: '#e2e8f0', text: '#334155', ring: '#94a3b8' }, // slate→surface
admin: { from: '#ffe4e6', to: '#fecdd3', text: '#be123c', ring: '#fda4af' }, // rose→destructive
maintenance: { from: '#ffedd5', to: '#fed7aa', text: '#c2410c', ring: '#fdba74' }, // orange→warning
assistant: { from: '#f3e8ff', to: '#e9d5ff', text: '#6b21a8', ring: '#d8b4fe' }, // violet→purple
},
},
width: {
sidebar: '240px',
'sidebar-collapsed': '64px',
},
fontFamily: {
mono: ['"JetBrains Mono"', '"Fira Code"', 'monospace'],
},
},
},
plugins: [],
}