fix(ui): honor stats bar desktop gutters
This commit is contained in:
@@ -688,7 +688,7 @@
|
|||||||
},
|
},
|
||||||
"packages/ui": {
|
"packages/ui": {
|
||||||
"name": "@wrnexus/ui",
|
"name": "@wrnexus/ui",
|
||||||
"version": "0.8.48",
|
"version": "0.8.49",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@wrnexus/core": "workspace:*",
|
"@wrnexus/core": "workspace:*",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -152,9 +152,21 @@ component StatsBar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.wrn-stats-bar__inner {
|
.wrn-stats-bar__inner {
|
||||||
width: min(calc(100% - 2rem), 80rem);
|
width: min(100%, 80rem);
|
||||||
margin-inline: auto;
|
margin-inline: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wrn-stats-bar[data-gutter="sm"] .wrn-stats-bar__inner {
|
||||||
|
width: min(calc(100% - 2rem), 80rem);
|
||||||
|
}
|
||||||
|
|
||||||
|
.wrn-stats-bar[data-gutter="md"] .wrn-stats-bar__inner {
|
||||||
|
width: min(calc(100% - 4rem), 80rem);
|
||||||
|
}
|
||||||
|
|
||||||
|
.wrn-stats-bar[data-gutter="lg"] .wrn-stats-bar__inner {
|
||||||
|
width: min(calc(100% - 6rem), 80rem);
|
||||||
|
}
|
||||||
.wrn-stats-bar[data-outer-spacing="md"] { margin-block: 2rem; }
|
.wrn-stats-bar[data-outer-spacing="md"] { margin-block: 2rem; }
|
||||||
.wrn-stats-bar[data-radius="xl"] .wrn-stats-bar__surface { overflow: hidden; border-radius: 1.25rem; }
|
.wrn-stats-bar[data-radius="xl"] .wrn-stats-bar__surface { overflow: hidden; border-radius: 1.25rem; }
|
||||||
.wrn-stats-bar[data-shadow="sm"] .wrn-stats-bar__surface { box-shadow: 0 10px 30px rgb(15 23 42 / 0.05); }
|
.wrn-stats-bar[data-shadow="sm"] .wrn-stats-bar__surface { box-shadow: 0 10px 30px rgb(15 23 42 / 0.05); }
|
||||||
@@ -491,7 +503,9 @@ component StatsBar {
|
|||||||
|
|
||||||
@media (max-width: 639px) {
|
@media (max-width: 639px) {
|
||||||
.wrn-stats-bar[data-mobile-columns="1"] .wrn-stats-bar__surface { grid-template-columns: 1fr; }
|
.wrn-stats-bar[data-mobile-columns="1"] .wrn-stats-bar__surface { grid-template-columns: 1fr; }
|
||||||
|
.wrn-stats-bar[data-gutter="sm"] .wrn-stats-bar__inner,
|
||||||
.wrn-stats-bar[data-gutter="md"] .wrn-stats-bar__inner { width: calc(100% - 2rem); }
|
.wrn-stats-bar[data-gutter="md"] .wrn-stats-bar__inner { width: calc(100% - 2rem); }
|
||||||
|
.wrn-stats-bar[data-gutter="lg"] .wrn-stats-bar__inner { width: calc(100% - 3rem); }
|
||||||
.wrn-stats-bar[data-max-width="full"] .wrn-stats-bar__surface {
|
.wrn-stats-bar[data-max-width="full"] .wrn-stats-bar__surface {
|
||||||
border-inline: 0;
|
border-inline: 0;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@wrnexus/ui",
|
"name": "@wrnexus/ui",
|
||||||
"version": "0.8.48",
|
"version": "0.8.49",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
|
|||||||
@@ -3194,6 +3194,16 @@ test("breadcrumb default separators remain visible without generated icon CSS",
|
|||||||
expect(html).not.toContain("icon-[lucide--chevron-right]");
|
expect(html).not.toContain("icon-[lucide--chevron-right]");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("stats bar desktop gutters align its surface with container content", () => {
|
||||||
|
const source = readFileSync(uiComponentPath("StatsBar"), "utf8");
|
||||||
|
expect(source).toMatch(
|
||||||
|
/data-gutter="md"[^}]+width: min\(calc\(100% - 4rem\), 80rem\)/s,
|
||||||
|
);
|
||||||
|
expect(source).toMatch(
|
||||||
|
/data-gutter="lg"[^}]+width: min\(calc\(100% - 6rem\), 80rem\)/s,
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
test("mega menu bridges the gap between its trigger and panel", async () => {
|
test("mega menu bridges the gap between its trigger and panel", async () => {
|
||||||
const source = readFileSync(uiComponentPath("MegaMenu"), "utf8");
|
const source = readFileSync(uiComponentPath("MegaMenu"), "utf8");
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user