core/panel/styles/Table.module.css

562 lines
9.0 KiB
CSS
Raw Normal View History

2025-06-30 18:25:26 +00:00
.table-container {
2025-07-02 19:30:21 +00:00
width: 100%;
overflow-x: auto;
margin: 0.5rem 0;
2025-06-30 18:25:26 +00:00
}
.table {
2025-07-02 19:30:21 +00:00
width: 100%;
border-collapse: collapse;
2025-06-30 18:25:26 +00:00
}
.table th,
.table td {
2025-07-02 19:30:21 +00:00
padding: 0.75rem;
text-align: left;
border-bottom: 1px solid var(--border-color);
2025-06-30 18:25:26 +00:00
}
.table th {
2025-07-02 19:30:21 +00:00
background-color: var(--bg-color-dark);
font-weight: 600;
color: var(--text-color);
white-space: nowrap;
2025-06-30 18:25:26 +00:00
}
.table td {
2025-07-02 19:30:21 +00:00
color: var(--text-color);
2025-06-30 18:25:26 +00:00
}
.badge-container {
2025-07-02 19:30:21 +00:00
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
2025-06-30 18:25:26 +00:00
}
.badge {
2025-07-02 19:30:21 +00:00
display: inline-block;
padding: 0.25rem 0.5rem;
border-radius: 4px;
font-size: 0.75rem;
line-height: 1;
white-space: nowrap;
2025-06-30 18:25:26 +00:00
}
.role-badge {
2025-07-02 19:30:21 +00:00
background-color: var(--primary-color-light);
color: var(--primary-color-dark);
2025-06-30 18:25:26 +00:00
}
.author-badge {
2025-07-02 19:30:21 +00:00
background-color: var(--success-color-light);
color: var(--success-color-dark);
2025-06-30 18:25:26 +00:00
}
.topic-badge {
2025-07-02 19:30:21 +00:00
background-color: var(--info-color-light);
color: var(--info-color-dark);
2025-06-30 18:25:26 +00:00
}
.actions {
2025-07-02 19:30:21 +00:00
display: flex;
gap: 0.5rem;
justify-content: flex-end;
2025-06-30 18:25:26 +00:00
}
.table-empty {
2025-07-02 19:30:21 +00:00
text-align: center;
padding: 2rem;
color: var(--text-color-light);
2025-06-30 18:25:26 +00:00
}
.table-loading {
2025-07-02 19:30:21 +00:00
position: relative;
min-height: 200px;
2025-06-30 18:25:26 +00:00
}
.table-loading::after {
2025-07-02 19:30:21 +00:00
content: "";
position: absolute;
top: 50%;
left: 50%;
width: 2rem;
height: 2rem;
margin: -1rem;
border: 2px solid var(--primary-color);
border-right-color: transparent;
border-radius: 50%;
animation: table-loading 0.75s linear infinite;
2025-06-30 18:25:26 +00:00
}
@keyframes table-loading {
2025-07-02 19:30:21 +00:00
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
2025-06-30 18:25:26 +00:00
}
/* Базовые стили для таблицы и контейнера */
.container {
2025-07-02 19:30:21 +00:00
padding: 10px;
2025-06-30 18:25:26 +00:00
}
.header {
2025-07-02 19:30:21 +00:00
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
}
/* Стили для TableControls */
.tableControls {
margin-bottom: 15px;
}
.controlsContainer {
display: flex;
justify-content: space-between;
align-items: center;
gap: 12px;
flex-wrap: nowrap;
}
.controlsRight {
display: flex;
align-items: center;
gap: 10px;
flex-shrink: 0;
}
.searchContainer {
display: flex;
align-items: center;
flex: 1;
max-width: 400px;
}
.searchInput {
padding: 8px 12px;
border: 1px solid #ddd;
border-radius: 4px 0 0 4px;
font-size: 14px;
color: #333;
flex-grow: 1;
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
transition: border-color 0.2s ease;
border-right: none;
}
.searchInput:focus {
outline: none;
border-color: #4f46e5;
box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}
.searchInput::placeholder {
color: #aaa;
}
.searchButton {
padding: 8px 16px;
background-color: #4f46e5;
color: white;
border: none;
border-radius: 0 4px 4px 0;
cursor: pointer;
font-size: 14px;
transition: background-color 0.2s ease;
white-space: nowrap;
}
.searchButton:hover {
background-color: #4338ca;
2025-06-30 18:25:26 +00:00
}
.table {
2025-07-02 19:30:21 +00:00
width: 100%;
border-collapse: collapse;
margin: 0;
font-size: 14px;
2025-06-30 18:25:26 +00:00
}
.table th,
.table td {
2025-07-02 19:30:21 +00:00
padding: 12px 15px;
text-align: left;
border-bottom: 1px solid #ddd;
2025-06-30 18:25:26 +00:00
}
.table th {
2025-07-02 19:30:21 +00:00
background-color: #f8f9fa;
font-weight: 600;
color: #333;
2025-06-30 18:25:26 +00:00
}
.table tbody tr {
2025-07-02 19:30:21 +00:00
transition: background-color 0.2s ease;
}
/* Стили для кнопок */
.button {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
border: none;
border-radius: 8px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
position: relative;
user-select: none;
outline: none;
padding: 0.75rem 1.5rem;
font-size: 1rem;
background-color: #f8f9fa;
color: #6c757d;
border: 1px solid #dee2e6;
}
.button:hover:not(:disabled) {
background-color: #6c757d;
color: white;
border-color: #6c757d;
transform: translateY(-1px);
}
.button:active:not(:disabled) {
transform: translateY(0);
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}
.button:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.primary {
background-color: #4f46e5;
color: white;
border: none;
}
.primary:hover:not(:disabled) {
background-color: #4338ca;
2025-06-30 18:25:26 +00:00
}
2025-07-02 19:30:21 +00:00
.secondary {
background-color: #f8f9fa;
color: #6c757d;
border: 1px solid #dee2e6;
2025-06-30 18:25:26 +00:00
}
2025-07-02 19:30:21 +00:00
.secondary:hover:not(:disabled) {
background-color: #6c757d;
color: white;
}
.danger {
background-color: #dc3545;
color: white;
border: none;
}
.danger:hover:not(:disabled) {
background-color: #c82333;
2025-06-30 18:25:26 +00:00
}
/* Стили для действий */
.action-button {
2025-07-02 19:30:21 +00:00
font-size: 12px;
padding: 6px 12px;
margin: 0 2px;
2025-06-30 18:25:26 +00:00
}
/* Стили для предупреждающих сообщений */
.warning-text {
2025-07-02 19:30:21 +00:00
color: #e74c3c;
font-weight: 500;
margin: 10px 0;
font-size: 14px;
2025-06-30 18:25:26 +00:00
}
/* Стили для модальных действий */
.modal-actions {
2025-07-02 19:30:21 +00:00
display: flex;
gap: 10px;
justify-content: flex-end;
margin-top: 20px;
padding-top: 15px;
border-top: 1px solid #eee;
2025-06-30 18:25:26 +00:00
}
.clickable-row:hover {
2025-07-02 19:30:21 +00:00
background-color: #f8f9fa;
transition: background-color 0.2s ease;
2025-06-30 18:25:26 +00:00
}
.delete-button {
2025-07-02 19:30:21 +00:00
background: none;
border: none;
color: #6c757d;
font-size: 18px;
font-weight: bold;
cursor: pointer;
padding: 4px 8px;
border-radius: 4px;
transition: all 0.2s ease;
line-height: 1;
min-width: 24px;
height: 24px;
display: flex;
align-items: center;
justify-content: center;
2025-06-30 18:25:26 +00:00
}
.delete-button:hover {
2025-07-02 19:30:21 +00:00
background-color: #dc3545;
color: white;
transform: scale(1.1);
2025-06-30 18:25:26 +00:00
}
.delete-button:active {
2025-07-02 19:30:21 +00:00
transform: scale(0.95);
2025-06-30 18:25:26 +00:00
}
2025-06-30 20:37:21 +00:00
/* Стили для чекбоксов и пакетного удаления */
.checkbox-column {
2025-07-02 19:30:21 +00:00
width: 40px;
text-align: center;
2025-06-30 20:37:21 +00:00
}
.checkbox {
2025-07-02 19:30:21 +00:00
cursor: pointer;
width: 18px;
height: 18px;
2025-06-30 20:37:21 +00:00
}
.batch-actions {
2025-07-02 19:30:21 +00:00
display: flex;
gap: 10px;
margin-bottom: 10px;
2025-06-30 20:37:21 +00:00
}
.selected-count {
2025-07-02 19:30:21 +00:00
display: flex;
align-items: center;
font-size: 14px;
color: #666;
margin-right: 10px;
2025-06-30 20:37:21 +00:00
}
.select-all-container {
2025-07-02 19:30:21 +00:00
display: flex;
align-items: center;
margin-right: 15px;
2025-06-30 20:37:21 +00:00
}
.select-all-label {
2025-07-02 19:30:21 +00:00
margin-left: 5px;
font-size: 14px;
cursor: pointer;
2025-06-30 20:37:21 +00:00
}
/* Кнопка пакетного удаления */
.batch-delete-button {
2025-07-02 19:30:21 +00:00
background-color: #dc3545;
color: white;
border: none;
padding: 6px 12px;
border-radius: 4px;
font-size: 14px;
cursor: pointer;
display: flex;
align-items: center;
gap: 5px;
transition: background-color 0.2s;
2025-06-30 20:37:21 +00:00
}
.batch-delete-button:hover {
2025-07-02 19:30:21 +00:00
background-color: #c82333;
2025-06-30 20:37:21 +00:00
}
.batch-delete-button:disabled {
2025-07-02 19:30:21 +00:00
background-color: #e9a8ae;
cursor: not-allowed;
2025-06-30 20:37:21 +00:00
}
2025-06-30 22:20:48 +00:00
/* Новые стили для улучшенной панели поиска */
.searchSection {
2025-07-02 19:30:21 +00:00
background: #f8f9fa;
border: 1px solid #e9ecef;
border-radius: 8px;
padding: 16px;
margin-bottom: 20px;
2025-06-30 22:20:48 +00:00
}
.searchRow {
2025-07-02 19:30:21 +00:00
margin-bottom: 12px;
2025-06-30 22:20:48 +00:00
}
.fullWidthSearch {
2025-07-02 19:30:21 +00:00
width: 100%;
padding: 12px 16px;
border: 1px solid #ced4da;
border-radius: 6px;
font-size: 14px;
background: white;
transition:
border-color 0.2s ease,
box-shadow 0.2s ease;
2025-06-30 22:20:48 +00:00
}
.fullWidthSearch:focus {
2025-07-02 19:30:21 +00:00
outline: none;
border-color: #4f46e5;
box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
2025-06-30 22:20:48 +00:00
}
.fullWidthSearch::placeholder {
2025-07-02 19:30:21 +00:00
color: #6c757d;
font-style: italic;
2025-06-30 22:20:48 +00:00
}
.filtersRow {
2025-07-02 19:30:21 +00:00
display: flex;
gap: 12px;
align-items: center;
flex-wrap: wrap;
2025-06-30 22:20:48 +00:00
}
.statusFilter {
2025-07-02 19:30:21 +00:00
padding: 8px 12px;
border: 1px solid #ced4da;
border-radius: 4px;
font-size: 14px;
background: white;
color: #495057;
cursor: pointer;
min-width: 140px;
height: 38px;
2025-06-30 22:20:48 +00:00
}
.statusFilter:focus {
2025-07-02 19:30:21 +00:00
outline: none;
border-color: #4f46e5;
2025-06-30 22:20:48 +00:00
}
/* Стили для сортируемых заголовков */
.sortableHeader {
2025-07-02 19:30:21 +00:00
cursor: pointer;
user-select: none;
transition: all 0.2s ease;
position: relative;
background-color: var(--bg-color-dark, #f8f9fa);
2025-06-30 22:20:48 +00:00
}
.sortableHeader:hover {
2025-07-02 19:30:21 +00:00
background-color: #e9ecef !important;
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.sortableHeader:active {
transform: translateY(0);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
2025-06-30 22:20:48 +00:00
}
.headerContent {
2025-07-02 19:30:21 +00:00
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
gap: 8px;
padding: 0.25rem 0;
2025-06-30 22:20:48 +00:00
}
.sortIcon {
2025-07-02 19:30:21 +00:00
font-size: 14px;
color: #6c757d;
margin-left: auto;
min-width: 18px;
text-align: center;
opacity: 0.6;
transition: all 0.2s ease;
font-weight: bold;
2025-06-30 22:20:48 +00:00
}
.sortableHeader:hover .sortIcon {
2025-07-02 19:30:21 +00:00
opacity: 1;
color: #495057;
transform: scale(1.1);
2025-06-30 22:20:48 +00:00
}
.sortableHeader[data-active="true"] .sortIcon {
2025-07-02 19:30:21 +00:00
color: #4f46e5;
opacity: 1;
font-weight: bold;
transform: scale(1.2);
}
.disabledHeader {
cursor: not-allowed;
opacity: 0.6;
}
.disabledHeader:hover {
background-color: var(--bg-color-dark, #f8f9fa) !important;
transform: none;
box-shadow: none;
2025-06-30 22:20:48 +00:00
}
/* Улучшенные адаптивные стили */
@media (max-width: 768px) {
2025-07-02 19:30:21 +00:00
.filtersRow {
flex-direction: column;
align-items: stretch;
}
2025-06-30 22:20:48 +00:00
2025-07-02 19:30:21 +00:00
.statusFilter {
min-width: auto;
}
2025-06-30 22:20:48 +00:00
2025-07-02 19:30:21 +00:00
.headerContent {
font-size: 12px;
}
2025-06-30 22:20:48 +00:00
2025-07-02 19:30:21 +00:00
.sortIcon {
font-size: 10px;
}
2025-06-30 22:20:48 +00:00
}
@media (max-width: 480px) {
2025-07-02 19:30:21 +00:00
.searchSection {
padding: 12px;
}
2025-06-30 22:20:48 +00:00
2025-07-02 19:30:21 +00:00
.fullWidthSearch {
padding: 10px 12px;
font-size: 13px;
}
2025-06-30 22:20:48 +00:00
2025-07-02 19:30:21 +00:00
.filtersRow {
gap: 8px;
}
2025-06-30 22:20:48 +00:00
}
/* Улучшения существующих стилей */
.controls {
2025-07-02 19:30:21 +00:00
display: flex;
gap: 12px;
align-items: center;
flex-wrap: wrap;
2025-06-30 22:20:48 +00:00
}
2025-07-02 19:30:21 +00:00
/* Стиль для ячейки с body топика */
.bodyCell {
background-color: #f8f9fa;
transition: background-color 0.2s ease;
2025-06-30 22:20:48 +00:00
}