Refactors admin page design to move each 'facet' of admin into its own component.

This commit is contained in:
2026-07-10 01:14:30 -07:00
parent a4093e86b1
commit c02c0cdde9
30 changed files with 1970 additions and 1757 deletions
@@ -0,0 +1,192 @@
@use '../../styles/variables' as *;
@use '../../styles/mixins' as *;
.theme-panel {
.theme-harmony-bar {
display: flex;
justify-content: space-between;
align-items: center;
padding: $spacing-md;
background: rgba($primary-blue, 0.05);
border-radius: $radius-md;
margin-bottom: $spacing-lg;
flex-wrap: wrap;
gap: $spacing-sm;
.harmony-info {
display: flex;
align-items: center;
gap: $spacing-sm;
.harmony-label {
font-weight: 600;
color: $neutral-medium;
font-size: 0.9rem;
}
.harmony-rule {
color: $primary-blue;
font-weight: 600;
font-size: 0.95rem;
}
}
.auto-variants-toggle {
display: flex;
align-items: center;
gap: $spacing-sm;
font-size: 0.875rem;
color: $neutral-dark;
cursor: pointer;
input[type="checkbox"] {
width: 16px;
height: 16px;
cursor: pointer;
}
}
}
.theme-message {
padding: $spacing-sm $spacing-md;
border-radius: $radius-md;
font-size: 0.875rem;
margin-bottom: $spacing-md;
text-align: center;
&.theme-success {
background: rgba($success-green, 0.1);
color: $success-green;
}
&.theme-error {
background: rgba($danger-red, 0.1);
color: $danger-red;
}
}
}
.color-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: $spacing-md;
margin-bottom: $spacing-xl;
}
.color-card {
display: flex;
align-items: center;
gap: $spacing-sm;
padding: $spacing-sm $spacing-md;
background: $neutral-white;
border: 2px solid $neutral-light;
border-radius: $radius-md;
transition: border-color $transition-fast, box-shadow $transition-fast;
&.has-issue {
border-color: #e6a817;
box-shadow: 0 0 0 1px rgba(230, 168, 23, 0.3);
}
&:hover {
border-color: $primary-blue-muted;
}
}
.color-swatch {
position: relative;
width: 40px;
height: 40px;
border-radius: $radius-sm;
flex-shrink: 0;
cursor: pointer;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
transition: transform $transition-fast;
&:hover {
transform: scale(1.1);
}
input[type="color"] {
position: absolute;
inset: 0;
opacity: 0;
width: 100%;
height: 100%;
cursor: pointer;
border: none;
padding: 0;
background: none;
}
}
.color-info {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 2px;
.color-name {
font-size: 0.85rem;
font-weight: 600;
color: $neutral-dark;
white-space: nowrap;
}
.color-hex {
font-size: 0.75rem;
color: $neutral-medium;
font-family: var(--font-mono, monospace);
}
}
.color-status {
font-size: 1.1rem;
flex-shrink: 0;
width: 24px;
text-align: center;
.harmony-ok {
color: $success-green;
}
.harmony-warn {
color: #e6a817;
}
}
.theme-actions {
display: flex;
justify-content: flex-end;
gap: $spacing-sm;
flex-wrap: wrap;
padding-top: $spacing-md;
border-top: 1px solid $neutral-light;
}
.btn-save-theme {
@include button-style($primary-blue, $neutral-white, $primary-blue-light);
&:disabled {
opacity: 0.6;
cursor: not-allowed;
}
}
.btn-outline-theme {
background: transparent;
border: 2px solid $primary-blue;
color: $primary-blue;
border-radius: $radius-md;
padding: $spacing-sm $spacing-lg;
font-size: 0.95rem;
font-weight: 600;
cursor: pointer;
transition: background $transition-fast, color $transition-fast;
&:hover {
background: $primary-blue;
color: $neutral-white;
}
}