UNPKG

mcp-web-ui

Version:

Ultra-lightweight vanilla JavaScript framework for MCP servers - Zero dependencies, perfect security, 2-3KB bundle size

250 lines (207 loc) 4.72 kB
/* ListComponent Multi-Section Styles */ /* Multi-section layout */ .component-list.multi-section { --section-spacing: 1.5rem; --section-border: 1px solid #e2e8f0; --section-border-radius: 8px; --section-bg: #f8fafc; --section-header-padding: 1rem; --section-content-padding: 0.5rem; --transition-duration: 0.3s; --transition-easing: ease-in-out; } .multi-sections { display: flex; flex-direction: column; gap: var(--section-spacing); } /* Section container */ .list-section { border: var(--section-border); border-radius: var(--section-border-radius); overflow: hidden; background: white; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); transition: box-shadow var(--transition-duration) var(--transition-easing); } .list-section:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); } /* Section header */ .section-header { display: flex; justify-content: space-between; align-items: center; padding: var(--section-header-padding); background: var(--section-bg); border-bottom: var(--section-border); cursor: pointer; transition: background-color var(--transition-duration) var(--transition-easing); } .section-header:hover { background: #f1f5f9; } .section-title { display: flex; align-items: center; gap: 0.5rem; flex: 1; } .section-icon { font-size: 1.2em; } .section-name { margin: 0; font-size: 1.1em; font-weight: 600; color: #1e293b; } .section-count { color: #64748b; font-size: 0.9em; margin-left: 0.5rem; } .section-toggle { background: none; border: none; color: #64748b; cursor: pointer; font-size: 1.2em; padding: 0.25rem; border-radius: 4px; transition: all var(--transition-duration) var(--transition-easing); } .section-toggle:hover { background: #e2e8f0; color: #334155; } .section-toggle:focus { outline: 2px solid #3b82f6; outline-offset: 2px; } /* Section content */ .section-content { padding: var(--section-content-padding); transition: all var(--transition-duration) var(--transition-easing); overflow: hidden; } .section-content.collapsed { height: 0; padding: 0; opacity: 0; } .section-content.empty { padding: 2rem; text-align: center; } .section-empty-state { color: #64748b; font-style: italic; } /* Section-specific styling */ .list-section[data-section="false"] .section-header { background: #dbeafe; /* Blue tint for todo section */ } .list-section[data-section="true"] .section-header { background: #dcfce7; /* Green tint for completed section */ } .list-section[data-section="false"] .section-name { color: #1e40af; } .list-section[data-section="true"] .section-name { color: #166534; } /* Item transitions between sections */ .item-transition { transition: all var(--transition-duration) var(--transition-easing); transform: translateX(0); opacity: 1; } .item-transition.moving { transform: translateX(100%); opacity: 0.5; } .item-transition.entering { transform: translateX(-100%); opacity: 0.5; } /* Completed items styling in multi-section mode */ .multi-section .list-item.completed { opacity: 0.8; } .multi-section .list-item.completed .item-text { text-decoration: line-through; color: #64748b; } /* Section-specific item styling */ .list-section[data-section="true"] .list-item { border-left: 3px solid #10b981; } .list-section[data-section="false"] .list-item { border-left: 3px solid #3b82f6; } /* Responsive design */ @media (max-width: 768px) { .multi-sections { gap: 1rem; } .section-header { padding: 0.75rem; } .section-title { gap: 0.375rem; } .section-name { font-size: 1em; } .section-count { font-size: 0.8em; } } /* Animation keyframes */ @keyframes sectionExpand { from { height: 0; opacity: 0; } to { height: auto; opacity: 1; } } @keyframes sectionCollapse { from { height: auto; opacity: 1; } to { height: 0; opacity: 0; } } /* Accessibility improvements */ .section-toggle:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; } @media (prefers-reduced-motion: reduce) { .item-transition, .section-content, .section-header { transition: none; } } /* High contrast mode support */ @media (prefers-contrast: high) { .section-header { border-bottom: 2px solid #000; } .list-section { border: 2px solid #000; } .section-name { color: #000; } }