Add interactive component catalog and browser regression tests
This commit is contained in:
@@ -0,0 +1,296 @@
|
||||
@layer catalog {
|
||||
:root { scroll-padding-block-start: var(--frost-space-4); }
|
||||
|
||||
body.catalog-page {
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
background: var(--frost-color-bg);
|
||||
}
|
||||
|
||||
.catalog-shell {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr);
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.catalog-sidebar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
align-self: start;
|
||||
height: 100vh;
|
||||
padding: var(--frost-space-6);
|
||||
overflow-y: auto;
|
||||
border-inline-end: 1px solid var(--frost-color-border);
|
||||
background: var(--frost-color-surface);
|
||||
}
|
||||
|
||||
.catalog-brand {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: var(--frost-space-2);
|
||||
color: var(--frost-color-text);
|
||||
font-size: var(--frost-font-size-lg);
|
||||
font-weight: 800;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.catalog-brand__mark {
|
||||
display: grid;
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
place-items: center;
|
||||
border-radius: var(--frost-radius-md);
|
||||
background: var(--frost-color-accent);
|
||||
color: var(--frost-color-on-accent);
|
||||
font-size: var(--frost-font-size-sm);
|
||||
}
|
||||
|
||||
.catalog-sidebar__intro {
|
||||
margin-block: var(--frost-space-3) var(--frost-space-6);
|
||||
color: var(--frost-color-text-muted);
|
||||
font-size: var(--frost-font-size-sm);
|
||||
}
|
||||
|
||||
.catalog-search { margin-block-end: var(--frost-space-6); }
|
||||
.catalog-search .frost-label { font-size: var(--frost-font-size-sm); }
|
||||
|
||||
.catalog-nav {
|
||||
display: grid;
|
||||
gap: var(--frost-space-1);
|
||||
}
|
||||
|
||||
.catalog-nav__label {
|
||||
margin-block-end: var(--frost-space-2);
|
||||
color: var(--frost-color-text-muted);
|
||||
font-size: 0.8125rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.catalog-nav__link {
|
||||
padding: var(--frost-space-2) var(--frost-space-3);
|
||||
border-radius: var(--frost-radius-sm);
|
||||
color: var(--frost-color-text-muted);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.catalog-nav__link:hover,
|
||||
.catalog-nav__link:focus-visible {
|
||||
background: var(--frost-color-surface-soft);
|
||||
color: var(--frost-color-text);
|
||||
}
|
||||
|
||||
.catalog-main {
|
||||
width: min(100%, 82rem);
|
||||
padding: var(--frost-space-8) clamp(var(--frost-space-4), 4vw, var(--frost-space-10));
|
||||
}
|
||||
|
||||
.catalog-hero {
|
||||
position: relative;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
gap: var(--frost-space-6);
|
||||
align-items: start;
|
||||
margin-block-end: var(--frost-space-8);
|
||||
padding: clamp(var(--frost-space-6), 4vw, var(--frost-space-10));
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--frost-color-border);
|
||||
border-radius: var(--frost-radius-xl);
|
||||
background:
|
||||
radial-gradient(circle at 88% 20%, color-mix(in srgb, var(--frost-color-accent) 24%, transparent), transparent 28%),
|
||||
var(--frost-color-surface);
|
||||
}
|
||||
|
||||
.catalog-eyebrow {
|
||||
margin: 0 0 var(--frost-space-2);
|
||||
color: var(--frost-color-accent);
|
||||
font-size: var(--frost-font-size-sm);
|
||||
font-weight: 750;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.catalog-hero h1 {
|
||||
max-width: 14ch;
|
||||
margin: 0;
|
||||
font-size: var(--frost-font-size-2xl);
|
||||
}
|
||||
|
||||
.catalog-hero__copy {
|
||||
max-width: 62ch;
|
||||
margin-block: var(--frost-space-4);
|
||||
color: var(--frost-color-text-muted);
|
||||
font-size: var(--frost-font-size-lg);
|
||||
}
|
||||
|
||||
.catalog-hero__meta { align-items: center; }
|
||||
|
||||
.catalog-empty {
|
||||
padding: var(--frost-space-8);
|
||||
border: 1px dashed var(--frost-color-border-strong);
|
||||
border-radius: var(--frost-radius-lg);
|
||||
color: var(--frost-color-text-muted);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.catalog-list {
|
||||
display: grid;
|
||||
gap: var(--frost-space-8);
|
||||
}
|
||||
|
||||
.catalog-component {
|
||||
padding: 0;
|
||||
overflow: visible;
|
||||
scroll-margin-block-start: var(--frost-space-4);
|
||||
}
|
||||
|
||||
.catalog-component[hidden] { display: none; }
|
||||
|
||||
.catalog-component__header {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
gap: var(--frost-space-4);
|
||||
padding: var(--frost-space-6);
|
||||
border-block-end: 1px solid var(--frost-color-border);
|
||||
}
|
||||
|
||||
.catalog-component__header h2 { margin: 0 0 var(--frost-space-2); }
|
||||
.catalog-component__header p { margin: 0; color: var(--frost-color-text-muted); }
|
||||
.catalog-component__header > .frost-badge { align-self: start; }
|
||||
|
||||
.catalog-live {
|
||||
padding: clamp(var(--frost-space-4), 3vw, var(--frost-space-8));
|
||||
background: var(--frost-color-surface-soft);
|
||||
}
|
||||
|
||||
.catalog-live--overlay { min-height: 11rem; }
|
||||
|
||||
.catalog-live__label {
|
||||
display: block;
|
||||
margin-block-end: var(--frost-space-4);
|
||||
color: var(--frost-color-text-muted);
|
||||
font-size: 0.8125rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.catalog-details {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1.25fr) minmax(16rem, 0.75fr);
|
||||
gap: var(--frost-space-6);
|
||||
padding: var(--frost-space-6);
|
||||
}
|
||||
|
||||
.catalog-code {
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--frost-color-border);
|
||||
border-radius: var(--frost-radius-md);
|
||||
background: #101820;
|
||||
}
|
||||
|
||||
.catalog-code__toolbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: var(--frost-space-3);
|
||||
min-height: 3rem;
|
||||
padding: var(--frost-space-2) var(--frost-space-3);
|
||||
border-block-end: 1px solid #31414d;
|
||||
color: #c9d5dd;
|
||||
font-size: var(--frost-font-size-sm);
|
||||
}
|
||||
|
||||
.catalog-copy {
|
||||
min-height: 2rem;
|
||||
padding: var(--frost-space-1) var(--frost-space-3);
|
||||
border: 1px solid #526675;
|
||||
border-radius: var(--frost-radius-sm);
|
||||
background: #1b2933;
|
||||
color: #f2f7f9;
|
||||
font: inherit;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.catalog-copy:hover { background: #273a47; }
|
||||
|
||||
.catalog-code pre {
|
||||
max-height: 18rem;
|
||||
margin: 0;
|
||||
padding: var(--frost-space-4);
|
||||
overflow: auto;
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
background: transparent;
|
||||
color: #e8f1f5;
|
||||
font-size: var(--frost-font-size-sm);
|
||||
line-height: 1.55;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.catalog-code code { color: inherit; background: transparent; }
|
||||
|
||||
.catalog-a11y {
|
||||
padding: var(--frost-space-5);
|
||||
border: 1px solid color-mix(in srgb, var(--frost-color-success) 40%, var(--frost-color-border));
|
||||
border-radius: var(--frost-radius-md);
|
||||
background: color-mix(in srgb, var(--frost-color-success) 8%, var(--frost-color-surface));
|
||||
}
|
||||
|
||||
.catalog-a11y h3 {
|
||||
margin: 0 0 var(--frost-space-3);
|
||||
color: var(--frost-color-text);
|
||||
font-size: var(--frost-font-size-base);
|
||||
}
|
||||
|
||||
.catalog-a11y ul {
|
||||
display: grid;
|
||||
gap: var(--frost-space-2);
|
||||
margin: 0;
|
||||
padding-inline-start: var(--frost-space-5);
|
||||
color: var(--frost-color-text-muted);
|
||||
font-size: var(--frost-font-size-sm);
|
||||
}
|
||||
|
||||
.catalog-demo-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: var(--frost-space-4);
|
||||
}
|
||||
|
||||
.catalog-demo-card { min-height: 8rem; }
|
||||
.catalog-demo-form { max-width: 34rem; }
|
||||
.catalog-footer { padding-block: var(--frost-space-10) var(--frost-space-4); color: var(--frost-color-text-muted); font-size: var(--frost-font-size-sm); }
|
||||
|
||||
@media (max-width: 64rem) {
|
||||
.catalog-shell { grid-template-columns: 1fr; }
|
||||
.catalog-sidebar {
|
||||
position: static;
|
||||
z-index: 20;
|
||||
height: auto;
|
||||
padding: var(--frost-space-4);
|
||||
overflow: visible;
|
||||
border-inline-end: 0;
|
||||
border-block-end: 1px solid var(--frost-color-border);
|
||||
}
|
||||
.catalog-sidebar__intro { display: none; }
|
||||
.catalog-search { margin-block: var(--frost-space-4); }
|
||||
.catalog-nav { display: flex; overflow-x: auto; padding-block-end: var(--frost-space-1); }
|
||||
.catalog-nav__label { display: none; }
|
||||
.catalog-nav__link { flex: 0 0 auto; }
|
||||
.catalog-main { padding-block-start: var(--frost-space-6); }
|
||||
}
|
||||
|
||||
@media (max-width: 48rem) {
|
||||
.catalog-hero,
|
||||
.catalog-component__header,
|
||||
.catalog-details { grid-template-columns: 1fr; }
|
||||
.catalog-hero__actions { justify-self: start; }
|
||||
.catalog-details { padding: var(--frost-space-4); }
|
||||
.catalog-demo-grid { grid-template-columns: 1fr; }
|
||||
.catalog-component__header { padding: var(--frost-space-5); }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user