Adds waitlist UI with drawer and responsive styles

Implements a new waitlist component with mini card, drawer, and interactive functionality

Introduces:
- Waitlist mini card with badge
- Drawer overlay with detailed waitlist entries
- Responsive CSS for various waitlist UI elements
- Interactive JavaScript for opening/closing drawer and handling actions
This commit is contained in:
Janus C. H. Knudsen 2026-01-03 16:43:35 +01:00
parent 0137a4b4f9
commit 4ead6bb544
2 changed files with 513 additions and 0 deletions

View file

@ -867,3 +867,291 @@ swp-date-display i {
grid-template-columns: 1fr;
}
}
/* ==========================================
WAITLIST MINI CARD
========================================== */
swp-waitlist-card {
display: flex;
align-items: center;
gap: 12px;
padding: 16px;
background: var(--color-surface);
border: 1px solid var(--color-border);
border-radius: 8px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
cursor: pointer;
transition: all 0.15s ease;
}
swp-waitlist-card:hover {
border-color: var(--color-teal);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
swp-waitlist-icon {
position: relative;
font-size: 24px;
color: var(--color-text-secondary);
}
swp-waitlist-badge {
position: absolute;
top: -8px;
right: -8px;
min-width: 20px;
height: 20px;
padding: 0 6px;
background: var(--color-teal);
color: white;
font-size: 11px;
font-weight: 600;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
}
swp-waitlist-label {
font-size: 14px;
font-weight: 500;
color: var(--color-text);
}
/* ==========================================
WAITLIST DRAWER
========================================== */
swp-drawer-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.3);
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
z-index: 999;
}
swp-drawer-overlay.visible {
opacity: 1;
visibility: visible;
}
swp-waitlist-drawer {
position: fixed;
top: 0;
right: 0;
width: 420px;
height: 100vh;
background: var(--color-surface);
border-left: 1px solid var(--color-border);
box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
transform: translateX(100%);
transition: transform 0.3s ease;
z-index: 1000;
display: flex;
flex-direction: column;
}
swp-waitlist-drawer.open {
transform: translateX(0);
}
swp-drawer-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20px 24px;
border-bottom: 1px solid var(--color-border);
}
swp-drawer-title {
font-size: 16px;
font-weight: 600;
color: var(--color-text);
display: flex;
align-items: center;
gap: 8px;
}
swp-drawer-title swp-count {
font-size: 14px;
font-weight: 500;
color: var(--color-text-secondary);
}
swp-drawer-close {
width: 32px;
height: 32px;
border-radius: 6px;
background: var(--color-background-alt);
border: none;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: var(--color-text-secondary);
transition: all 0.15s ease;
}
swp-drawer-close:hover {
background: var(--color-background-hover);
color: var(--color-text);
}
swp-drawer-close i {
font-size: 18px;
}
swp-drawer-body {
flex: 1;
overflow-y: auto;
padding: 16px;
}
swp-waitlist-list {
display: flex;
flex-direction: column;
gap: 12px;
}
swp-waitlist-item {
display: flex;
flex-direction: column;
gap: 12px;
padding: 16px;
background: var(--color-background-alt);
border-radius: 8px;
border: 1px solid var(--color-border);
}
swp-waitlist-customer {
display: flex;
align-items: center;
gap: 12px;
}
swp-waitlist-customer swp-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
background: var(--color-teal);
color: white;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
font-weight: 600;
flex-shrink: 0;
}
swp-waitlist-customer-info {
flex: 1;
}
swp-waitlist-name {
font-size: 14px;
font-weight: 600;
color: var(--color-text);
}
swp-waitlist-phone {
font-size: 12px;
color: var(--color-text-secondary);
}
swp-waitlist-service {
font-size: 13px;
font-weight: 500;
color: var(--color-teal);
padding: 6px 10px;
background: color-mix(in srgb, var(--color-teal) 10%, transparent);
border-radius: 4px;
display: inline-block;
}
swp-waitlist-meta {
display: flex;
flex-direction: column;
gap: 6px;
}
swp-waitlist-periods {
display: flex;
align-items: center;
gap: 6px;
flex-wrap: wrap;
}
swp-waitlist-periods swp-label {
font-size: 12px;
color: var(--color-text-secondary);
}
swp-waitlist-period-tag {
font-size: 11px;
padding: 3px 8px;
background: var(--color-background);
border-radius: 4px;
color: var(--color-text);
}
swp-waitlist-dates {
display: flex;
align-items: center;
gap: 16px;
}
swp-waitlist-date {
font-size: 11px;
color: var(--color-text-secondary);
display: flex;
align-items: center;
gap: 4px;
}
swp-waitlist-date i {
font-size: 12px;
}
swp-waitlist-date.expires {
color: var(--color-text-secondary);
}
swp-waitlist-date.expires.soon {
color: var(--color-amber);
font-weight: 500;
}
swp-waitlist-actions {
display: flex;
gap: 8px;
padding-top: 8px;
border-top: 1px solid var(--color-border);
}
swp-waitlist-actions swp-btn {
flex: 1;
justify-content: center;
padding: 8px 12px;
font-size: 12px;
}
swp-waitlist-empty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 48px 24px;
text-align: center;
}
swp-waitlist-empty i {
font-size: 48px;
color: var(--color-border);
margin-bottom: 16px;
}
swp-waitlist-empty span {
font-size: 14px;
color: var(--color-text-secondary);
}