Add unified badge and dropdown preview components for admin lists
- Add .mpr-badge--preview base class with consistent sizing (20px height, pill shape) - Add color variants: -primary, -success, -warning, -muted - Add .mpr-dropdown-preview component for inline schedule details - Add schedule row layout with day/hours styling - Support material icons inside badges with proper sizing Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -518,4 +518,132 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Schedule Preview - uses shared mpr-dropdown-preview from prestashop-admin
|
||||
// =============================================================================
|
||||
// Schedule Dropdown Preview
|
||||
// Inline dropdown for schedule details in admin list
|
||||
// =============================================================================
|
||||
|
||||
.mpr-dropdown-preview {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
margin-top: 6px;
|
||||
z-index: 1000;
|
||||
padding: 0.625rem 0.75rem;
|
||||
background: $es-white;
|
||||
border: 1px solid $es-border-color;
|
||||
border-radius: $es-radius-lg;
|
||||
box-shadow: $es-shadow-lg;
|
||||
font-size: 12px;
|
||||
text-align: left;
|
||||
text-transform: none;
|
||||
font-weight: normal;
|
||||
white-space: nowrap; // Allow dropdown to grow as needed
|
||||
|
||||
&.is-open {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.mpr-dropdown-preview__item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
padding: 0.375rem 0;
|
||||
color: #666;
|
||||
line-height: 1.4;
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-bottom: 0.25rem;
|
||||
padding-bottom: 0.5rem;
|
||||
border-bottom: 1px solid rgba($es-border-color, 0.5);
|
||||
}
|
||||
|
||||
// Icon styles
|
||||
> .material-icons,
|
||||
> i:first-child {
|
||||
flex-shrink: 0;
|
||||
width: 16px;
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.mpr-dropdown-preview__muted {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
// Schedule inline layout
|
||||
.mpr-dropdown-preview__schedule {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.mpr-dropdown-preview__schedule-row {
|
||||
display: inline;
|
||||
|
||||
&:not(:last-child)::after {
|
||||
content: ',';
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.mpr-dropdown-preview__day {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.mpr-dropdown-preview__hours {
|
||||
color: $es-primary;
|
||||
font-weight: 500;
|
||||
margin-left: 0.25rem;
|
||||
}
|
||||
|
||||
// Badge trigger for preview dropdown/popover
|
||||
.mpr-badge--preview {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.25rem;
|
||||
position: relative;
|
||||
min-width: 20px;
|
||||
height: 20px;
|
||||
padding: 0 0.5rem;
|
||||
font-size: 0.75rem;
|
||||
font-weight: 600;
|
||||
border-radius: 50rem;
|
||||
cursor: pointer;
|
||||
text-transform: none;
|
||||
|
||||
.icon-eye {
|
||||
font-size: 10px;
|
||||
line-height: 1;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.material-icons {
|
||||
font-size: 12px;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.mpr-badge--preview-primary {
|
||||
background: $es-primary;
|
||||
color: $es-white;
|
||||
}
|
||||
|
||||
.mpr-badge--preview-success {
|
||||
background: #d4edda;
|
||||
color: #155724;
|
||||
}
|
||||
|
||||
.mpr-badge--preview-warning {
|
||||
background: #fff3cd;
|
||||
color: #856404;
|
||||
}
|
||||
|
||||
.mpr-badge--preview-muted {
|
||||
background: $es-slate-200;
|
||||
color: $es-text-muted;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user