121 lines
7.8 KiB
CSS
121 lines
7.8 KiB
CSS
@layer frost.components {
|
|
.frost-card, .frost-surface {
|
|
border: 1px solid var(--frost-color-border);
|
|
border-radius: var(--frost-radius-lg);
|
|
background: var(--frost-color-surface);
|
|
}
|
|
|
|
.frost-card { padding: var(--frost-space-6); }
|
|
.frost-card--flat { box-shadow: none; }
|
|
.frost-card--elevated { box-shadow: var(--frost-shadow-md); }
|
|
.frost-card--interactive { transition: border-color var(--frost-duration-base) var(--frost-ease-standard), box-shadow var(--frost-duration-base) var(--frost-ease-standard), transform var(--frost-duration-fast) var(--frost-ease-out); }
|
|
.frost-card--interactive:hover,
|
|
.frost-card--interactive:focus-within { border-color: var(--frost-color-border-strong); box-shadow: var(--frost-shadow-md); transform: translateY(-1px); }
|
|
|
|
.frost-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
min-height: 1.5rem;
|
|
padding: var(--frost-space-1) var(--frost-space-2);
|
|
border: 1px solid var(--frost-color-border);
|
|
border-radius: var(--frost-radius-pill);
|
|
background: var(--frost-color-surface-soft);
|
|
color: var(--frost-color-text);
|
|
font-size: 0.8125rem;
|
|
font-weight: 650;
|
|
line-height: 1;
|
|
}
|
|
|
|
.frost-badge--success { border-color: var(--frost-color-success); border-color: color-mix(in srgb, var(--frost-color-success) 45%, var(--frost-color-border)); color: var(--frost-color-success); }
|
|
.frost-badge--warning { border-color: var(--frost-color-warning); border-color: color-mix(in srgb, var(--frost-color-warning) 45%, var(--frost-color-border)); color: var(--frost-color-warning); }
|
|
.frost-badge--danger { border-color: var(--frost-color-danger); border-color: color-mix(in srgb, var(--frost-color-danger) 45%, var(--frost-color-border)); color: var(--frost-color-danger); }
|
|
.frost-badge--info { border-color: var(--frost-color-info); border-color: color-mix(in srgb, var(--frost-color-info) 45%, var(--frost-color-border)); color: var(--frost-color-info); }
|
|
|
|
.frost-notice { padding: var(--frost-space-4); border: 1px solid var(--frost-color-border-strong); border-radius: var(--frost-radius-md); background: var(--frost-color-surface-soft); color: var(--frost-color-text); }
|
|
.frost-notice--info { border-color: var(--frost-color-info); }
|
|
.frost-notice--success { border-color: var(--frost-color-success); }
|
|
.frost-notice--warning { border-color: var(--frost-color-warning); }
|
|
.frost-notice--danger { border-color: var(--frost-color-danger); }
|
|
|
|
.frost-alert { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: var(--frost-space-3); padding: var(--frost-space-4); border: 1px solid var(--frost-color-border); border-radius: var(--frost-radius-md); background: var(--frost-color-surface); color: var(--frost-color-text); }
|
|
.frost-alert--info { border-color: var(--frost-color-info); }
|
|
.frost-alert--success { border-color: var(--frost-color-success); }
|
|
.frost-alert--warning { border-color: var(--frost-color-warning); }
|
|
.frost-alert--danger { border-color: var(--frost-color-danger); }
|
|
.frost-alert__title { font-weight: 700; }
|
|
.frost-alert__body { color: var(--frost-color-text-muted); }
|
|
|
|
.frost-toast-region { position: fixed; inset: var(--frost-space-4) var(--frost-space-4) auto auto; z-index: var(--frost-z-toast); display: grid; width: min(26rem, calc(100vw - 2rem)); gap: var(--frost-space-3); }
|
|
.frost-toast { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--frost-space-3); padding: var(--frost-space-4); border: 1px solid var(--frost-color-border-strong); border-radius: var(--frost-radius-md); background: var(--frost-color-surface); color: var(--frost-color-text); box-shadow: var(--frost-shadow-lg); }
|
|
.frost-toast--success { border-inline-start: 0.3rem solid var(--frost-color-success); }
|
|
.frost-toast--warning { border-inline-start: 0.3rem solid var(--frost-color-warning); }
|
|
.frost-toast--danger { border-inline-start: 0.3rem solid var(--frost-color-danger); }
|
|
|
|
.frost-dropdown, .frost-popover { position: relative; display: inline-block; }
|
|
.frost-dropdown__menu, .frost-popover__content { position: absolute; top: calc(100% + var(--frost-space-2)); left: 0; z-index: var(--frost-z-popover); min-width: 12rem; padding: var(--frost-space-2); border: 1px solid var(--frost-color-border-strong); border-radius: var(--frost-radius-md); background: var(--frost-color-surface); color: var(--frost-color-text); box-shadow: var(--frost-shadow-md); }
|
|
.frost-dropdown__menu[hidden], .frost-popover__content[hidden] { display: none; }
|
|
.frost-dropdown__menu--end, .frost-popover__content--end { right: 0; left: auto; }
|
|
.frost-dropdown__item { display: block; width: 100%; padding: var(--frost-space-2) var(--frost-space-3); border: 0; border-radius: var(--frost-radius-sm); background: transparent; color: inherit; text-align: start; text-decoration: none; }
|
|
.frost-dropdown__item:hover, .frost-dropdown__item:focus-visible { background: var(--frost-color-surface-hover); }
|
|
|
|
.frost-tooltip { position: relative; }
|
|
.frost-tooltip::after { position: absolute; bottom: calc(100% + var(--frost-space-2)); left: 50%; z-index: var(--frost-z-popover); width: max-content; max-width: 16rem; padding: var(--frost-space-2) var(--frost-space-3); border-radius: var(--frost-radius-sm); background: var(--frost-color-text); color: var(--frost-color-bg); content: attr(data-frost-tooltip); font-size: var(--frost-font-size-sm); line-height: 1.3; opacity: 0; pointer-events: none; transform: translate(-50%, 0.25rem); transition: opacity var(--frost-duration-fast) var(--frost-ease-out), transform var(--frost-duration-fast) var(--frost-ease-out); }
|
|
.frost-tooltip:hover::after, .frost-tooltip:focus-visible::after, .frost-tooltip:focus-within::after { opacity: 1; transform: translate(-50%, 0); }
|
|
|
|
.frost-backdrop {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: var(--frost-color-overlay);
|
|
z-index: var(--frost-z-overlay);
|
|
}
|
|
|
|
.frost-modal {
|
|
position: fixed;
|
|
inset: 0;
|
|
display: grid;
|
|
place-items: center;
|
|
padding: var(--frost-space-4);
|
|
z-index: var(--frost-z-modal);
|
|
}
|
|
|
|
dialog.frost-modal { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; border: 0; background: transparent; }
|
|
dialog.frost-modal::backdrop { background: var(--frost-color-backdrop); }
|
|
dialog.frost-modal[open] { display: grid; }
|
|
|
|
.frost-modal__content {
|
|
width: min(100%, 32rem);
|
|
max-height: min(90vh, 42rem);
|
|
overflow: auto;
|
|
padding: var(--frost-space-6);
|
|
border: 1px solid var(--frost-color-border-strong);
|
|
border-radius: var(--frost-radius-lg);
|
|
background: var(--frost-color-surface);
|
|
color: var(--frost-color-text);
|
|
box-shadow: var(--frost-shadow-lg);
|
|
}
|
|
|
|
.frost-modal__header,
|
|
.frost-modal__footer { display: flex; align-items: center; gap: var(--frost-space-3); }
|
|
.frost-modal__header { justify-content: space-between; margin-block-end: var(--frost-space-4); }
|
|
.frost-modal__body { display: grid; gap: var(--frost-space-4); }
|
|
.frost-modal__footer { justify-content: flex-end; margin-block-start: var(--frost-space-4); }
|
|
.frost-modal--fullscreen .frost-modal__content { width: 100%; max-height: 100%; min-height: 100%; border-radius: 0; }
|
|
.frost-modal--drawer { place-items: stretch end; padding: 0; }
|
|
.frost-modal--drawer .frost-modal__content { width: min(100%, 28rem); max-height: none; height: 100%; border-radius: var(--frost-radius-lg) 0 0 var(--frost-radius-lg); }
|
|
|
|
[data-theme="dark"] .frost-tooltip::after { background: var(--frost-color-surface-soft); color: var(--frost-color-text); }
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.frost-card--interactive:hover,
|
|
.frost-card--interactive:focus-within { transform: none; }
|
|
}
|
|
}
|
|
|
|
@layer frost.utilities {
|
|
.frost-text-muted { color: var(--frost-color-text-muted); }
|
|
.frost-text-center { text-align: center; }
|
|
.frost-width-full { width: 100%; }
|
|
.frost-overflow-auto { overflow: auto; }
|
|
}
|
|
|