filtre multiple
This commit is contained in:
@@ -282,3 +282,98 @@
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
/* === COMPOSANT MULTI-SELECT VANILLA === */
|
||||
.pf-multi-select {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/* Le bouton déclencheur (réutilise le style des filtres) */
|
||||
.pf-ms-trigger {
|
||||
padding: 6px 16px;
|
||||
border-radius: 20px;
|
||||
border: 1px solid var(--border-light);
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
backdrop-filter: blur(8px);
|
||||
font-size: 0.85rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-main);
|
||||
cursor: pointer;
|
||||
box-shadow: var(--shadow-sm);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
user-select: none;
|
||||
}
|
||||
.pf-ms-trigger:hover {
|
||||
border-color: #cbd5e1;
|
||||
}
|
||||
.pf-ms-trigger.active {
|
||||
border-color: var(--primary);
|
||||
box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
|
||||
}
|
||||
|
||||
/* Le menu déroulant */
|
||||
.pf-ms-dropdown {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: calc(100% + 8px);
|
||||
left: 0;
|
||||
background: white;
|
||||
border: 1px solid var(--border-light);
|
||||
border-radius: 12px;
|
||||
padding: 8px;
|
||||
box-shadow: var(--shadow-lg);
|
||||
z-index: 100;
|
||||
min-width: 200px;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
max-height: 60vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.pf-ms-dropdown.open {
|
||||
display: flex;
|
||||
animation: popDown 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
||||
}
|
||||
|
||||
/* Les options (checkboxes) */
|
||||
.pf-ms-option {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
font-size: 0.85rem;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
padding: 8px 10px;
|
||||
border-radius: 6px;
|
||||
color: var(--text-main);
|
||||
transition: 0.2s;
|
||||
}
|
||||
.pf-ms-option:hover {
|
||||
background: #f8fafc;
|
||||
}
|
||||
.pf-ms-option input[type="checkbox"] {
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
accent-color: var(--primary);
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
.pf-ms-option.is-all {
|
||||
font-weight: 700;
|
||||
border-bottom: 1px solid #e2e8f0;
|
||||
padding-bottom: 10px;
|
||||
margin-bottom: 4px;
|
||||
border-radius: 6px 6px 0 0;
|
||||
}
|
||||
|
||||
@keyframes popDown {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(-10px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user