mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
167 lines
3.2 KiB
SCSS
167 lines
3.2 KiB
SCSS
// Panel Atoms - Material Design 3 (CSS Module)
|
|
// =============================================
|
|
// Flat selectors for panel/surface styling using M3 tokens
|
|
|
|
// Base panel
|
|
.panel {
|
|
background: var(--mat-sys-surface-container);
|
|
border-radius: var(--mat-sys-corner-medium);
|
|
overflow: hidden;
|
|
}
|
|
|
|
// Elevated panel
|
|
.panelElevated {
|
|
composes: panel;
|
|
box-shadow: var(--mat-sys-level2);
|
|
}
|
|
|
|
// Outlined panel
|
|
.panelOutlined {
|
|
composes: panel;
|
|
border: 1px solid var(--mat-sys-outline-variant);
|
|
background: var(--mat-sys-surface);
|
|
}
|
|
|
|
// Fixed position variants
|
|
.panelFixedBr {
|
|
composes: panel;
|
|
position: fixed;
|
|
bottom: 16px;
|
|
right: 16px;
|
|
z-index: var(--z-dropdown);
|
|
}
|
|
|
|
.panelFixedBl {
|
|
composes: panel;
|
|
position: fixed;
|
|
bottom: 16px;
|
|
left: 16px;
|
|
z-index: var(--z-dropdown);
|
|
}
|
|
|
|
.panelFixedTr {
|
|
composes: panel;
|
|
position: fixed;
|
|
top: 16px;
|
|
right: 16px;
|
|
z-index: var(--z-dropdown);
|
|
}
|
|
|
|
.panelFixedTl {
|
|
composes: panel;
|
|
position: fixed;
|
|
top: 16px;
|
|
left: 16px;
|
|
z-index: var(--z-dropdown);
|
|
}
|
|
|
|
// Panel header
|
|
.panelHeader {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 12px 16px;
|
|
background: var(--mat-sys-primary);
|
|
color: var(--mat-sys-on-primary);
|
|
}
|
|
|
|
.panelHeaderSecondary {
|
|
composes: panelHeader;
|
|
background: var(--mat-sys-secondary);
|
|
color: var(--mat-sys-on-secondary);
|
|
}
|
|
|
|
.panelHeaderTertiary {
|
|
composes: panelHeader;
|
|
background: var(--mat-sys-tertiary);
|
|
color: var(--mat-sys-on-tertiary);
|
|
}
|
|
|
|
.panelHeaderSurface {
|
|
composes: panelHeader;
|
|
background: var(--mat-sys-surface-container-high);
|
|
color: var(--mat-sys-on-surface);
|
|
}
|
|
|
|
.panelHeaderClickable {
|
|
cursor: pointer;
|
|
transition: background-color var(--mat-sys-motion-duration-short4) var(--mat-sys-motion-easing-standard);
|
|
}
|
|
|
|
.panelHeaderClickable:hover {
|
|
background: color-mix(in srgb, var(--mat-sys-primary) calc(100% - 8%), var(--mat-sys-on-primary));
|
|
}
|
|
|
|
// Panel title
|
|
.panelTitle {
|
|
flex: 1;
|
|
font-family: var(--mat-sys-title-small-font);
|
|
font-size: var(--mat-sys-title-small-size);
|
|
font-weight: var(--mat-sys-title-small-weight);
|
|
line-height: var(--mat-sys-title-small-line-height);
|
|
margin: 0;
|
|
}
|
|
|
|
// Panel body
|
|
.panelBody {
|
|
max-height: 300px;
|
|
overflow-y: auto;
|
|
padding: 16px;
|
|
}
|
|
|
|
.panelBodyNoPadding {
|
|
composes: panelBody;
|
|
padding: 0;
|
|
}
|
|
|
|
.panelBodyScroll {
|
|
composes: panelBody;
|
|
max-height: 400px;
|
|
}
|
|
|
|
// Panel footer
|
|
.panelFooter {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 12px 16px;
|
|
font-family: var(--mat-sys-body-small-font);
|
|
font-size: var(--mat-sys-body-small-size);
|
|
color: var(--mat-sys-on-surface-variant);
|
|
border-top: 1px solid var(--mat-sys-outline-variant);
|
|
}
|
|
|
|
.panelFooterActions {
|
|
composes: panelFooter;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
// Panel content section
|
|
.panelSection {
|
|
padding: 16px;
|
|
border-bottom: 1px solid var(--mat-sys-outline-variant);
|
|
}
|
|
|
|
.panelSection:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
// Collapsible panel
|
|
.panelCollapsible {
|
|
composes: panel;
|
|
}
|
|
|
|
.panelCollapsible .panelBody {
|
|
display: grid;
|
|
grid-template-rows: 1fr;
|
|
transition: grid-template-rows var(--mat-sys-motion-duration-medium2) var(--mat-sys-motion-easing-emphasized);
|
|
}
|
|
|
|
.panelCollapsed .panelBody {
|
|
grid-template-rows: 0fr;
|
|
}
|
|
|
|
.panelCollapsed .panelBody > * {
|
|
overflow: hidden;
|
|
}
|